Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pka
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
28 ms
·
241.
▲
by
pka
10y ago
Probably paredit. It's really so much better than non-structured editing. That said, there are structured editing plugins/modes/editors for other languages too. However, looking back at Lisp/Clojure now I really don'
242.
▲
by
pka
10y ago
This seems to be a lost cause, but I'll try one last time. The point is that even if there were some yet undiscovered particles or forces, they wouldn't have any effect whatsoever on the world around us. This we can say with c
243.
▲
by
pka
10y ago
You are missing the point. The author acknowledges that there may be particles that we haven't yet discovered, but even if there were, we can prove that they wouldn't impact everyday live. In other words, "we know what we don
244.
▲
by
pka
10y ago
So you would never steal, no matter the situation?
245.
▲
by
pka
10y ago
Trying to force your morals on other people (by claiming they are absolute) makes the world a worse place.
246.
▲
by
pka
11y ago
Agreed, really captivating writing style. Takes me back :)
247.
▲
by
pka
11y ago
Fair enough - if portability to systems without much more than a C compiler is a project goal, than C is obviously a good (the only?) choice :)
248.
▲
by
pka
11y ago
A mark could just be an offset inside the Text buffer instead of a direct pointer. Yes, dereferencing a mark would be slower, but do you really think that matters? I mean even if you did that 1M times/sec there wouldn't be a notic
249.
▲
by
pka
11y ago
I meant hard realtime [0]. Your operating system is probably not hard realtime, which means that any editor you run isn't either. [0] http://stackoverflow.com/questions/17308956/differences-betw...
250.
▲
by
pka
11y ago
I agree that often the choice of C is philosophical rather than technical, or we wouldn't see so much misuse of that language (and yes, I wouldn't count the build or package management system (or rather the non-existence thereof)
251.
▲
by
pka
11y ago
I tried out evil some time ago, and while it was very nice, it glitched out regularly - I would (mis)type a key combination and suddenly I'm dropped to Emacs and feel completely lost. Has this happened to you? On a side note, one of th
252.
▲
by
pka
11y ago
That's because it's a waste of time to write a program in a primitive language like C when you don't end-of-the-world absolutely need performance/hard realtime guarantees; even then it's a better idea to only writ
253.
▲
by
pka
11y ago
Immutable data structures look awful in mutable languages; also, the performance is worse. Still, don't confuse syntactic overhead with the general usability of an idea. Writing a['x'] += 3; would be godawful in pure assemb
254.
▲
by
pka
11y ago
In this particular case I would use some Quickcheck-like generative test library and give it a description of how to generate random dates (i.e. start by generating a day, then a month, then a combination of both etc) and then leave to it t
255.
▲
by
pka
11y ago
The situation you are describing is best handled by generative tests (i.e. Quickcheck). And this is basically the only time I would write an unit test - when I can not capture most invariants in the types. Everything else is basically doubl
256.
▲
by
pka
11y ago
I would say the most natural is STM - you don't need to change much, just wrap your concurrent, shared memory accessing code in a STM transaction, be careful with IO (or use a language which prohibits IO in a STM block like Haskell) an
257.
▲
by
pka
11y ago
Curried: map (f . fst) Uncurried: \xs -> map (\x -> f (fst x)) xs Now comparing this to js would just be unfair (edit: ES6 lambdas are probably ok).
258.
▲
by
pka
11y ago
The real discussion is not about package managers, micromodules, or whatever. It's about "real programmers can write left_pad by themselves" and everybody else just sucks. True scotsmen etc. Now I don't know why asm peop
259.
▲
by
pka
11y ago
Interesting. I was working on something similar [0] last year. Are you planning on publishing the code? [0] https://news.ycombinator.com/item?id=9954059
260.
▲
by
pka
11y ago
https://news.ycombinator.com/item?id=11334908
261.
▲
by
pka
11y ago
https://news.ycombinator.com/item?id=11334908
262.
▲
by
pka
11y ago
Relevant discussion, sadly it has been flagged: https://news.ycombinator.com/item?id=11334908
263.
▲
by
pka
11y ago
> and types deriving from Object are nullable by default So what's the point then?
264.
▲
by
pka
11y ago
I am constantly amazed at how people will find a way to fly to Mars in a bucket just so they don't have to learn how to operate a rocket :)
265.
▲
by
pka
11y ago
Cool, does it work for you now?
266.
▲
by
pka
11y ago
The tooling is not perfect, that's absolutely true. I have to say though that any imperfections (which are going to get fixed anyway) are well worth it if you want a pure strongly typed language for the web. There's simply nothing
267.
▲
by
pka
11y ago
Just for the obligatory record: Purescript is basically "Elm evolved". Everything Elm does, Purescript does better (FFI for example is such a chore in Elm). Drawback: the learning curve is basically as steep as Haskell's.
268.
▲
by
pka
11y ago
The point the author is trying to make is that all Javascript libraries should be annotated with types. Not necessarily Typescript, but that's the popular choice right now.
269.
▲
by
pka
11y ago
You can do that in Haskell as well though [0]. With ghci, making a code change is almost instantaneous even for big code bases, and you are assured that your code is self consistent. Then mess with your long-running state all you want. At l
270.
▲
by
pka
11y ago
Or even more beautiful - purescript-thermite. But just as js people are scared of Clojure, Clojure people are scared of Haskell :) (it's a joke)
More ›