Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pathsjs
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
151.
▲
by
pathsjs
10y ago
You are right, this situation is not trivial. But it is also quite rare in practice
152.
▲
by
pathsjs
10y ago
The situation that you describe could happen, but it is quite rare in practice. Usually, I call c functions that do their work and be done, such as BLAS. For such cases, you can either manually allocate the pointers you pass to c, or tempor
153.
▲
by
pathsjs
10y ago
Nim compiles to c, hence you can just call c functions. All you need is a signature, which can even be generated automatically from a c header. You can manually allocate memory if you want, and you can also pass pointers, either to manually
154.
▲
by
pathsjs
10y ago
You may be interested in Nim. If you can tolerate working without a REPL, Nim hits essentially all the bullet points you mentioned, from macros to coroutines, multiple dispatch, ability to call c trivially and python easily and so on. It ha
155.
▲
by
pathsjs
10y ago
Thank you!
156.
▲
by
pathsjs
10y ago
Is there a way to hear it in the background? Every time I switch tabs, it stops playing. Also, it sometimes mixes up songs from different periods (1958+1997)
157.
▲
by
pathsjs
10y ago
Python, Scala, OCaml, Nim, Haskell and more all have asynchronous operations for I/O - it's not something that is a JS only thing
158.
▲
by
pathsjs
10y ago
As far as I understand, this would only work if standard sequence types were defined inside a functor, which is not the case.
159.
▲
by
pathsjs
10y ago
I really miss the possibility of configuring dependencies per project in a easy way. OPAM will allow this using OPAM switches, but it is complex and error-prone, while most any other package manager (sbt, leiningen, maven, nimble, cargo, np
160.
▲
by
pathsjs
10y ago
It is actually annoying from a very practical point of view. You cannot, for example, write an algorithm that will work an any sequence type, and then apply it to a list. This is why, for instance, you have List.map and so on
161.
▲
by
pathsjs
11y ago
Ok, it may not be optimized. But this http://www.stufftoblowyourmind.com/wp-content/uploads/2009/0... is just more fun! :-)
162.
▲
by
pathsjs
11y ago
I just had a brief look at the tutorial, but it looks great! Kudos to the author!
163.
▲
by
pathsjs
11y ago
Sorry I was harsh. I tried the translation service and it work better. Anyway, I don't remember exactly all the articles I tried, but two of them were https://www.cs.princeton.edu/~chazelle/pubs/mst.pdf http
164.
▲
by
pathsjs
11y ago
Ok, here is a question. I went to the site and tried the document conversion service. I gave it three very clean PDF files containing CS articles. In all cases, what I got in response was "The input document failed to be converted beca
165.
▲
by
pathsjs
11y ago
The fact is that auto-pilot cars, as you describe them, won't be nearly as revolutionary as self-diriving cars. The latter would allow people to put to good use the time to commute to work; they would improve car-sharing to the point t
166.
▲
by
pathsjs
11y ago
I respectfully disagree. I know map, of course, yet clojure (or LISPs in general) is the only language where it is variadic. I definitely did not instantly grok what the Clojure version does - in fact, I know all the languages in the exampl
167.
▲
by
pathsjs
11y ago
What is `nim pretty`? I tried it, but it does not exist in current devel
168.
▲
by
pathsjs
11y ago
Thank you. s-exps are a pain, because you have to manually specify the function sexp_of_t for any type t that you want to support
169.
▲
by
pathsjs
11y ago
Can you expand on this point? When I tried OCaml a little time ago, it was a pain even to have a polymorphic print function. I would be surprised if there was a serialization mechanism that produces a binary form that cannot be adapted to p
170.
▲
by
pathsjs
11y ago
Ok, I see how it can work. Thank you very much for your explanation!
171.
▲
by
pathsjs
11y ago
I will try to be more clear. Say the size is actually unknown until runtime, for instance a vector is read from a file. You cannot apply directly any of the size-aware functions, because it will not typecheck. I only see two avenues: Either
172.
▲
by
pathsjs
11y ago
Yes, but my question is: even if you use erasure, what are you going to do at the call site? Won't you need to state a concrete size there? For usual generic types, erasure and code generation are equivalent in what they can do, becaus
173.
▲
by
pathsjs
11y ago
Thank you, I understand that, but I need a little more detail. Let me explain. Languages that have generics can either erase the generic argument at runtime (like Java or Scala do) or generate a different concrete type for each instantiatio
174.
▲
by
pathsjs
11y ago
Humans have to parse the syntax as well...
175.
▲
by
pathsjs
11y ago
Yeah, I have seen this for small periods of time. Anything longer and to avoid the battery drain the shutdown is used. This is why I mentioned hibernation. Standby is ok only for a few hours at most on laptops.
176.
▲
by
pathsjs
11y ago
Of all the non technical people I know, exactly zero know that hibernate even exists as an option. Everyone just switches off the pc when done.
177.
▲
by
pathsjs
11y ago
They really lost me at "Caching computations". It should be clear that the benchmark is NOT the quickest way to compute Fibonacci numbers. The reason why it is included at all is that - without caching - computing Fibonacci number
178.
▲
by
pathsjs
11y ago
Shameless plug: the design of this seems really similar to my own library paths.js. In both cases, the starting point is observing that nowadays people usually already use some framework to manipulate the DOM, so what is actually needed is
179.
▲
by
pathsjs
11y ago
Until you have to write a recipe...
180.
▲
by
pathsjs
11y ago
"honestly can't even guess what problems can be addressed with something like this" The problem is that OS package managers install things globally. This is a nightmare when developing, because * it makes much more difficult
More ›