Recent submissions

Comment · 9 years ago
Is there a good, terse primer on the features and coding idioms/best practices of C++17 for someone who was proficient in C++98 but hasn't touched the language in years?
Comment · 10 years ago
It's kind of strange that massive layoffs like these result in a stock uptick. At least for me it's a sign that the company is probably unhealthy and that its value is going to go down in the future.
Comment · 10 years ago
Eh? MyPy already implements generics. It would be a pretty useless type system otherwise since you couldn't give precise types to e.g. lists of ints.
Comment · 11 years ago
The creator of toki pona seems to be a fan of the Finnish language. Several of the words are loaned directly (although without umlauts) and keep their original Finnish meaning.

At a glance: älä, kala, -kin, nenä, nimi, sama, sinä are exact Finnish words and "pimeja" is a slight alteration of "pimeä". Kiwen, lipu, linja and walo are probably Finnish inspired as well.

Another common trend seems to be using a simplified and shortened forms of the phonetic spelling of English words such as "ale" (all), "en" (and), "insa" (inside), "jaki" (yucky), "jelo" (yellow), "kama" (come), "ken" (can), "kule" (color), "lukin" (looking), "mani" (money), "mi" (me), "mun" (moon), "nanpa" (number), "pata" (brother), "suwi" (sweet), "tawa" (towards), "toki" (talking), "tu" (two), "wan" (one) and "wile" (will).

Slightly distorted, but still close: "anpa" (under), "kulupu" (sounds like a Japanese transliteration of group, グループ), "pilin" (feeling), "sewi" (ceiling) and "sike" (circle).

This actually helps a lot in memorizing the vocabulary. :)

Comment · 11 years ago
Ah, right, sorry. I completely misread your post.

I guess there's something funky in the unicode handling on the site.

Comment · 11 years ago
You need to use curly braces in single-line do-expressions:

    do { line <- getLine; putStrLn line }
Comment · 11 years ago
Yeah, the online REPL is definitely not very useful or intuitive yet.

As it says, you can evaluate a single line Haskell "expression" and top-level declarations (like the sieve example) are not expressions. In addition, the sieve example declares an infinite list so there's no sensible way to print it.

You can fix all the above by using a let-expression on single line and only evaluating a finite part of the list using the 'take' function.

    let { primes = sieve [2..]; sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0] } in take 10 primes
Comment · 12 years ago
At least here in Finland it is much, much easier from a regulations perspective for a company to fire a bunch of people all at once rather than just few at a time.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton