Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
giornogiovanna
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
giornogiovanna
7y ago
Hopefully this version's closer to the prompt.[0] Anyway, the F# code, IIUC, lets you do exactly what you want it to do, although you'd have to replace the ifs with guards. [0]: https://rosettacode.org/wiki/A
2.
▲
by
giornogiovanna
7y ago
I know these are extremely common suggestions, but… • 3Blue1Brown has great introductory series on linear algebra and calculus. • Khan Academy covers pretty much all of US high school mathematics, and you can go through it at whatever pace
3.
▲
by
giornogiovanna
7y ago
How does amb "in all its glory" handle an endless loop? Any solution I can think of seems prohibitively expensive.
4.
▲
by
giornogiovanna
7y ago
Besides GC and the lightweight syntax (relative to Rust), what is it about OCaml that makes it so wonderful for implementing complicated algorithms?
5.
▲
by
giornogiovanna
7y ago
Honestly, if you care about longevity, Rust simply isn't the language yet. I'd at least wait until there's a specification and a GCC frontend. Anyway, C does have some benefits as a programming language. • "Legacy"
6.
▲
by
giornogiovanna
7y ago
I thought this was going to be about bounding the time complexity of your algorithms; I don't know if any language does that yet. I suppose this title has a lot of interpretations.
7.
▲
Wunderlist – Join us on our new journey
(wunderlist.com)
5 points
by
giornogiovanna
7y ago
|
0 comments
8.
▲
by
giornogiovanna
7y ago
No one suggested that surveillance is as bad as cancer. All that was said is that blocking Facebook dating has a similar effect on surveillance ( in kind, not in degree ) as banning tobacco has on cancer.
9.
▲
by
giornogiovanna
7y ago
› It's important to realise that variables in mathematics and variables in programming have a lot in common, but they are not the same thing! I think the stated "differences" are actually similarities with programming languag
10.
▲
by
giornogiovanna
7y ago
> But for numerical work 1-based indexing is usually easier to work with. That's not really true in my experience, since all the nice properties of zero-based indexing transfer perfectly over to mathematics. But you're right, t
11.
▲
by
giornogiovanna
7y ago
I'm getting some serious déjà vu here. Anyway, pjmlp, if you have some time, could you please explain how WSL makes sense in a world where SPIR-V already exists? Both are intended mainly to be compiler targets, and both will need verif
12.
▲
by
giornogiovanna
7y ago
> Sounds more like a problem with the team, rather than a problem with the language. That's the same reply that people have to "C++ has too large a surface area". Granted, Swift isn't quite at C++ levels of complexity
13.
▲
by
giornogiovanna
7y ago
Never mind, I have no idea what Apple is doing. It looks like they're inventing yet another shading language. https://webkit.org/blog/9528/webgpu-and-wsl-in-safari/
14.
▲
by
giornogiovanna
7y ago
> So WebGPU with SPIR-V will work in Apple's browsers Yes, I think the idea is to embed a SPIRV-to-Metal compiler inside the browser. At least, that's what it looks like https://github.com/gfx-rs/wgpu is d
15.
▲
by
giornogiovanna
7y ago
The two main cases when linked lists are better are (a) when you want to guarantee a low cost per insert, since vector insertion is only O(1) amortized , and (b) when you want to insert in the middle, but somehow found that middle without
16.
▲
by
giornogiovanna
7y ago
Yep. Beyond that, there is at least one place[0] where the standard library uses undefined behavior "based on its privileged knowledge of rustc internals". [0]: https://doc.rust-lang.org/src/std/io/m
17.
▲
by
giornogiovanna
7y ago
Reference counting is a (low-throughput, low-latency) form of garbage collection.
18.
▲
by
giornogiovanna
7y ago
Ah, right, my bad. In my defense, JavaScript treats a value of `undefined` differently from an unset field / variable (e.g. when testing `object.hasOwnProperty('field')`).
19.
▲
by
giornogiovanna
7y ago
1. NOT NULL is very frequently used in schemas, because NULL is often an undesirable value (e.g. for a mandatory field). That doesn't make NULLs bad, and NULLs are still frequently used when you have optional fields or fields where NUL
20.
▲
by
giornogiovanna
7y ago
Just to be clear, undefined is not valid in JSON. The only types in JSON are nulls, strings, numbers, arrays, booleans and objects.
21.
▲
by
giornogiovanna
7y ago
The correct merge, in my opinion would be D: add z w = z + w My justification is that if you put each identifier on a separate line like this: fn add( x: i32, y: i32, ) -> i32 { x +
22.
▲
by
giornogiovanna
7y ago
In JavaScript the automatic semicolon insertion is almost universally reviled. Why not just have your editor insert the semicolons for you if it's such a pain to type them?
23.
▲
by
giornogiovanna
7y ago
Can I configure Git such that the merge of Haskell source code (any language will do) with base A: add x y = x + y left B: add z y = z + y and right C: add x w = x + w succeeds without a conflict?
24.
▲
by
giornogiovanna
7y ago
That is a very charitable portrait of the anti-vaccination movement. No, they aren't parents of vaccine-allergic children banding together "to cope with their problems". They are people spreading serious misinformation abou
25.
▲
by
giornogiovanna
7y ago
Using List.map and Option.map is more verbose and less general, but it's still most of the way there. OCaml still has currying, algebraic data types, "implicit" returns, tail call optimization, etc., and it encourages recursi
26.
▲
by
giornogiovanna
7y ago
Well, Haskell calls the empty list the "null" list (see List.null), so I could say that List.head crashes when it encounters a null. :P Anyway, the real lesson is that even if your language has sane defaults that force you to chec
27.
▲
by
giornogiovanna
7y ago
What special support does GHC have?
28.
▲
by
giornogiovanna
7y ago
Yeah, I don't know why Prelude.head doesn't return a Maybe. Anyway, the point stands. • In Java forgetting to check for null will crash your program. • In C, forgetting to check for NULL will lead to undefined behavior. • In Haske
29.
▲
by
giornogiovanna
7y ago
Yes, of course you can encode it in any language you want, but the point is that ML-ish languages make it extremely natural to think like this, and Java makes it impossibly painful. Haskell makes traditional imperative algorithms painful, t
30.
▲
by
giornogiovanna
7y ago
> Maybe it's because people spend too much time exchanging msgs in forums such as this, instead of having meaningfull exchanges with real people. What does "meaningfull" mean? For example, I learn a lot more from fora such
More ›