Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
c-cube
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
331.
▲
by
c-cube
6y ago
The guy who wrote a program, not a library. GPL in a kernel doesn't contaminate the way it does in a library.
332.
▲
by
c-cube
6y ago
Types in Haskell are not just restriction, they're also used to generate code automatically for you using typeclasses. Something like [traversable]( https://wiki.haskell.org/Foldable_and_Traversable ) provides behavior j
333.
▲
by
c-cube
6y ago
If you compile a NIF you probably will not go out of your way to write "panic = abort" in your project. Unwinding is the default behavior.
334.
▲
by
c-cube
6y ago
Yes, in WW1 or WW2 you were able to… oh wait, rot in trenches with a gas mask, or be fighting somewhere in Europe or northern africa or the pacific, or be interned in a concentration camp. That sounds much better than having to wear a mask
335.
▲
by
c-cube
6y ago
The option type also prevents you from accessing the value if it's absent. Something a C union cannot do. Is there any example of options in an imperative language that would predate ML (which AFAIK introduced Some/None as the var
336.
▲
by
c-cube
6y ago
Use utf8 strings, not utf32. It's the standard in most new languages for good reasons. Have a standard iterator type. Syntax wise, something closer to rust would help newcomers (see ReasonML maybe).
337.
▲
by
c-cube
6y ago
What ocaml got recently, though, is do notation in the form of "let operators". It's very handy for applicative or monadic style.
338.
▲
by
c-cube
6y ago
They cite Twitter as using this pattern. That's hilarious, considering Twitter is currently one of the shittiest site around : half the time I click on a Twitter link (I don't have an account) it leads to "you are not allowed
339.
▲
by
c-cube
6y ago
Surely you mean 3-SAT, because 2-SAT is trivial :-)
340.
▲
by
c-cube
6y ago
The claim that more verbose, with keywords instead of braces/symbols is more readable is, imho, very subjective. It's easy to state "code is read more often than it is written" and jump to conclusions from there with no
341.
▲
by
c-cube
6y ago
That is just incorrect. Ada seems pretty nice, but it does not have a borrow checker, does it? I think deallocation is considered unsafe? Documentation points to [Unchecked_Deallocation]( https://docs.adacore.com/live/wa
342.
▲
by
c-cube
6y ago
There was at least the CS defying claim of "no GC, no leaks, simpler than rust" (I'm paraphrasing, but it was along these lines). Sounds easy when you just write it as a checkbox on a list of exciting features.
343.
▲
by
c-cube
6y ago
ATS is also harder to understand[1] (in my experience) and has a fraction of a fraction of the adoption rust managed to get, despite being older. To me that suggests that rust is more approachable, has better documentation, and would be use
344.
▲
by
c-cube
6y ago
Is there any reason why a group of users didn't fork the language? Lack of coordination?
345.
▲
by
c-cube
6y ago
This is a product, not a sum. It's just a pair of Reader and Writer. Sum types would also give you the ability to say "reader or writer" and use pattern matching to find out which one you were given. C-like languages traditio
346.
▲
by
c-cube
6y ago
Ada seems very nice, but compared to rust I think it lacks momentum and (some) ergonomics. It's sad, but a C-like syntax on top of the Ada semantics would possibly be more popular.
347.
▲
by
c-cube
6y ago
Rust is a bit safer. - it warns you if you ignore an error. - it forces variables and fields to be initialized. - it has sum types and generics instead of interface{}. - it prevents some race conditions at compile time. - it pushes programm
348.
▲
by
c-cube
6y ago
People use pattern matching all the time in ML or rust or haskell or Scala or Elm. It's totally uncontroversial there, and it's helpful to readability, not harmful. Erlang and Elixir also show it works in untyped languages pretty
349.
▲
by
c-cube
6y ago
If you want to reason about low level compiler optimizations, learn some assembly language. If you want to reason about type systems, learn how to read basic typing rules, it's not complicated. Sometimes planning before implementing is
350.
▲
by
c-cube
6y ago
Maybe a convention will arise, that you do all the imports in one file (basically like a `package.json` file) and import that from the rest of your code? It seems hackish to me but could work.
351.
▲
by
c-cube
6y ago
In ocaml, install merlin or the upcoming ocaml-lsp, you mean :) It's excellent tooling and provides completion, jump to def, etc. Annot files are very limited in comparison.
352.
▲
by
c-cube
6y ago
That makes for terrible docs and discoverability, which is the problem here. Maybe D should allow the user to name the return type (an existential variable) and static assert stuff on it: `SomeVar f(…) with isRange!SomeVar` or whatever. `au
353.
▲
by
c-cube
6y ago
That's hard to measure. If Go had sum types and generics I'd be more willing to give it a serious try , but in its current state I don't see myself writing complex algorithmic code in it. Maybe other people feel the same, esp
354.
▲
by
c-cube
7y ago
This company does very intriguing work, with some inspiration from numenta, as far as I know. The low resource usage (running on CPU, on a raspi!) is quite impressive. I wish there was more research on this approach.
355.
▲
by
c-cube
7y ago
But rST is deeply linked to python: as far as I know the only existing implementation is in python, the touted "extensibility" is based on python, etc. Other languages don't seem to adopt rST because they don't have this
356.
▲
by
c-cube
7y ago
You don't just wave a magic wand and get your code parallelized, though. Some algorithms are quite hard to parallelize (and it seems OCaml's user base is full of these, like theorem provers and compilers). Remember Amdahl's l
357.
▲
by
c-cube
7y ago
I guess valid TLS is not boring enough for this website?
358.
▲
by
c-cube
7y ago
how is Graal more polyglot than wasm?! Does it support low level languages as well? Besides, it's only one implementation (controlled by Oracle) and will probably remain so forever — who would want to risk a lawsuit by reimplementing i
359.
▲
by
c-cube
7y ago
For me static typing removes mental overhead. I have fewer things to keep in my head, I can trust the tools to have my back and point me to where I did stupid mistakes. It makes reasoning about the code more local. Also you can have stati
360.
▲
by
c-cube
7y ago
OCaml now has flambda, which is a significant improvement on its baseline optimizer. I think the difference wouldn't be that wide today :)
More ›