Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rapala
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
rapala
11y ago
School choice fixes the wrong problem. Those children who have parents smart enough to select the right school are going to be better of in any case. It is those children that are left behind in the bad schools that need the systemic improv
32.
▲
by
rapala
11y ago
I was under the impression that many Finns have a genetical risk of hypertension. Thus studies about the link between salt intake and hypertension have been conducted, for example http://www.ncbi.nlm.nih.gov/pubmed/1704
33.
▲
by
rapala
11y ago
The percentage of households with a landline was quite shocking. Based on quick googling the percentage here in Finland is ~11%. Gives perspective to the pricing of internet services in the USA vs Europe.
34.
▲
by
rapala
11y ago
Do note that lower university degrees are relatively new thing in Finland. It is still common to consider your studies "done" only after you have graduated with a master's degree. Teaching teachers in university is also relat
35.
▲
by
rapala
11y ago
> This is a ridiculous scenario. If you have some files on your laptop that are super important, you probably shouldn't `rm -rf` them 1.5 seconds after uploading to your NAS. There is nothing ridiculous about a hard drive breaking b
36.
▲
by
rapala
11y ago
Does the off-site backup also contain the write that happened 1.5 seconds ago? What about the corruption that happened just before taking the backup?
37.
▲
by
rapala
11y ago
That sounds exactly like encapsulation and message passing. The essence of OO according to Alan Kay.
38.
▲
by
rapala
11y ago
If I remember correctly, raw lumber here in Finland is in inches and planed lumber in millimeters :)
39.
▲
by
rapala
11y ago
Or you could do: 1. Insert new User instance 2. Unique constraint violation? Tell user that the username is already registered.
40.
▲
by
rapala
11y ago
Standard Haskell has only single parameter type classes. With MultiParamTypeClasses you can define class Into a b where into :: a -> b Note that From would be the exact same class. I guess the distinction in Rust is relevant b
41.
▲
by
rapala
11y ago
Sending money and transfer item are a create operation against one resource. The same resourse actually, called transfer. That records who transfers what to whom and how much. Thats exactly how it is done in banking.
42.
▲
by
rapala
11y ago
One could write a macro that allows infix notation for arithmetics: (arithmetics 1 + 2 - 3) = (- (+ 1 2) 3) These kind of syntactic transformations are what macros enable.
43.
▲
by
rapala
12y ago
So the learning happens where? While watching the multimedia presentation? Homeworks are a central part of schooling because doing them is where most of the learning happens. Notetaking has also shown to be highly beneficial to learning. Th
44.
▲
by
rapala
12y ago
But all that math, biology and stuff, that has nothing to do about beeing a "good employee". There's a lot of things that the school system genuinely tries to teach. To me it seems that those life skills are an added bonus. S
45.
▲
by
rapala
12y ago
To me there is nothing major about a function returning. Every function does that. Implicit early returns on the other hand could be deceiving, but I don't know any languages that would support those.
46.
▲
by
rapala
12y ago
The trick is that now the keyword return marks an early return. And as early returns are often exceptional, I find the added visibility nice. On the other hand, every function in Rust, except those that contain an infinite loop, returns som
47.
▲
by
rapala
12y ago
Which can then be made to look exactly like the getLine >>= putStrLn case by doing greet name = putStrLn ("Hello, " ++ name) main = getLine >>= greet (Edited to include the definition of main)
48.
▲
by
rapala
12y ago
I don't support mandatory helmet laws because we have evidence that it actually increases the risk of cycling. Not using a helmet also only affects the cyclists risk of injury. Still, I personally advocate using a helmet when you cycle
49.
▲
by
rapala
12y ago
No, because they severly restrict the field of view, something that is not as big a problem on a closed race track.
50.
▲
by
rapala
12y ago
Because car or no car the head still goes crack when it hits the road. To me it seems obvious to reduce a risk of fatal injury with something as simple as a helmet.
51.
▲
by
rapala
12y ago
My take has always been that Clojure encourages one to model state when doing so is pragmatic. The tools provided (refs, agents, atoms and vars) are in my opinion excellent. For example, using dynamic variables for error handling can be ver
52.
▲
by
rapala
12y ago
That's because it is limited. It's not meant to be a way to provide polymorphism. One of the things that it does provide is the knowledge of every possible case and a reminder from the compiler if you missed one. This is not possi
53.
▲
by
rapala
12y ago
Oh come on. An armored vehicle loned to the local police in a case of a school shooting is going to undermine the goverment?
54.
▲
by
rapala
12y ago
In a way an unencrypted email is like a postcard. Anyone who gets their hands on it can read it without "opening" anything.
55.
▲
by
rapala
12y ago
Here's the same in Haskell: doDishes [] = done doDishes (dish:dishes) = clean dish >> doDishes dishes Very much a recursion in my opinion. Recursion can cause stack overflow in lazy language too. But lazy or s
56.
▲
by
rapala
12y ago
Recipes and other manuals are also extremely vague when compared to computer programs. Humans have such vast amounts of context and prior knowledge available to them that pedantic instructions are not needed. The only prior knowledge the co
57.
▲
by
rapala
12y ago
It's all about precision. To tell someone how to do the dishes seems easy. But give the same instructions to someone who has never done dishes and you quickly see the problem. It goes the other way too. I dare you to try and explain a
58.
▲
by
rapala
12y ago
One way to look at function composition is that it is a function to which you pass two functions and out comes a function: compose :: (b -> c) -> (a -> b) -> a -> c compose f g x = f (g x) I'm not sure about t
59.
▲
by
rapala
12y ago
Yeah, and the repos have all the same tests that are used by Travis for grading. So you can run those locally too.
60.
▲
by
rapala
12y ago
It's dead simple to tell apart a tail call. Does it look like return call(a, r, g, s) It is also very simple to test if the compiler does TCO. Just write def f(a): return f(a + 1) f(0) and wait for a stack overflow
More ›