Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pka
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
pka
8y ago
> The type system in Java also failed to catch the bug Java is not a theorem prover, and your comment was about theorem provers. > you wouldn't end up with an error in a specification Again, completely orthogonal to your argument
62.
▲
by
pka
8y ago
Re macros, I had a similar thought this morning. Except for code instrumentation and boilerplate generation I've actually never found macros to be useful. ADT DSLs + free monads or similar abstractions give you everything you need, in
63.
▲
by
pka
8y ago
“Saying it’s correct in the semantic sense” = proving the code. They found a bug in Java’s binary search after 10 years of it going unnoticed, so I think you’re overestimating your own ability to prove code correct in your head. Generative
64.
▲
by
pka
8y ago
This looks promising, can you expand on how this differs from clojure.spec and core.typed?
65.
▲
by
pka
8y ago
> i think in the distinct minority I'm not so sure about that. Even though the HN rating system shouldn't be abused to express dis/agreement it often is, and my comment seems to have more upvotes than downvotes so far. >
66.
▲
by
pka
8y ago
> In order to scale, Ruby applications need very high coverage. Exactly, this is the "at enormous cost" bit I hinted at.
67.
▲
by
pka
8y ago
From experience. I've worked on 5+ years old Ruby projects having around 100KLOC (including tests), and adding a timestamp to an internal API that affects several other internal microservices (something that shouldn't take more th
68.
▲
by
pka
8y ago
For curious onlookers: true, one can "can whip together apps so quickly", as long as: * Your code is empirically around ~1 KLOC * You won't have to maintain it in the future So yeah: if you're going to make a one-off-dep
69.
▲
by
pka
9y ago
Yes, they more or less had to lift while/for/if/switch etc into the continuation monad :)
70.
▲
by
pka
9y ago
This is not as general as a monad though, it's just feeding the output of one function into the next. I'm sure you know this, but the thing that makes monads a more general solution is that (because bind depends on a value produce
71.
▲
by
pka
9y ago
Of course! When I said "it can't be implemented" I meant the logic that the continuation monad itself encapsulates, not async computations in general. For those you wouldn't even need promises, you could just use callbac
72.
▲
by
pka
9y ago
Just to point out the probably obvious thing: that's only one type of monad (the state monad). There are many other things which form a monad and can't be represented easily in JS or other imperative languages. Even though even th
73.
▲
by
pka
9y ago
> native script is just superior to react native in so many ways Could you elaborate? If true that's amazing!
74.
▲
by
pka
9y ago
Yeah, your native vs truly native distinction is just splitting hairs. Unless you're making a game or an otherwise CPU intensive app why does it matter whether you create your UIViews from ObjC or a JS VM?
75.
▲
by
pka
9y ago
> But until it affects day to day dev work, there's a whole set of people that aren't going to give the slightest fuck. That's a seriously toxic attitude to have. People are using monads and other FP concepts daily to simp
76.
▲
by
pka
9y ago
> No global or hidden state Does that mean that one can detach an input field, save its state somewhere, create a new one and attach it somewhere else again and have it appear exactly as it was before (i.e. cursor position, selection, fo
77.
▲
by
pka
9y ago
Just a clarification for anybody else who might be reading this: there absolutely are mutable variables in pure fp languages like Haskell, you just have to explicitly ask for them (and reflect that fact in the type), i.e: do
78.
▲
by
pka
9y ago
> It is important to realize that they will increase bundle sizes Absolutely, and it wouldn't make sense to program a tiny static webpage in e.g. Purescript. That said, to put that into perspective, pulling 350 npm modules for a big
79.
▲
by
pka
9y ago
> And for non-functional languages? I would recommend Typescript then. > Frankly, I am not sure why is functional paradigm considered a savior and better approach for inherently non-concurrent web frontend technology. True, FP excels
80.
▲
by
pka
9y ago
> If anyone has advice on how someone who prefers rigour, simplicity, elegance, and decent PL design over the latest trend should approach web dev that would be massively helpful Sounds like Elm [0] (pure, functional, very very easy to s
81.
▲
by
pka
9y ago
I agree in general that sexps provide the best editing experience currently, but that's just a matter of tooling, it's not an inherent property of sexps vs infix or whitespace-dependent syntax. Check out [0], a structured editing
82.
▲
by
pka
9y ago
Yeah. Haskell is so imba people don't believe you when you tell them :) It's understandable to show skepticism about "the new shiny thing" (although Haskell is > 30 years old) because most new shiny things turn out to
83.
▲
by
pka
9y ago
I doubt it, other than syntactic sugar, which makes tuples really easy to use, like destructuring and construction. I.e. in Python, if you have a function that returns a tuple: a, b = f(xxx) To create a tuple you just do (a, b). In
84.
▲
by
pka
9y ago
Tuples are just two or more values with separate types lumped together, i.e. (Int, String). For example, in Haskell, to get the elements of a map, there's this function: assocs :: Map k v -> [(k, v)] which gives you an arra
85.
▲
by
pka
9y ago
(To you and everybody else) Point taken - apparently I mistook the particular echo chamber I happen to be in at that moment for a more general symptom. Glad to hear!
86.
▲
by
pka
9y ago
I started a new contracting gig a couple of months ago, in Ruby. I had used it briefly years before in another project, but it was so long ago that I had to learn it again basically from scratch. Although I don't really think the langu
87.
▲
by
pka
9y ago
Yes, easymotion is very nice! Still, it's a cognitive overload I'd rather not have.
88.
▲
by
pka
9y ago
My dream is having an actually working/accurate to the character consumer-grade eye tracker that people can glue onto their screen. Then to move around in vim, look at where you want to go and just press a key. I think this alone would
89.
▲
by
pka
9y ago
> People would deem this impossible with C for practical purposes, but I think it's just a matter of responsibility, discipline and devotion. When do you reach the point of saying "ok, that's enough discipline and devotion
90.
▲
by
pka
9y ago
Apart from this being the prime example for the argument for immutable data (i.e. just keep the whole state of your editor at every undo point somewhere; restore to previous states when undoing) the "OO way" doesn't even need
More ›