chrispsn

Joined 9 years ago

Karma
1,055
Submissions
159
Member since
Jul 21
Sydney, Australia.
View on Hacker News

Recent submissions

Comment · 2 years ago
Click on k, then k.zip.
Comment · 2 years ago
Adding to RodgerTheGreat's comment: for me, k's power is its rich set of adverbs that are convenient to write.

Notice that aside from reverse (monadic |), all verb symbols in the above code are in most other languages (max as |, min as &, plus as +, minus as -). Adverbs (such as / for reduce and \ for scan-reduce) make the symbols we already have more generally applicable.

I think a language could go a long way with a small set of basic arithmetic symbols alongside a rich set of adverb symbols.

Comment · 2 years ago
Glad to hear it’s memorable!
Comment · 2 years ago
Comment · 3 years ago
Comment · 3 years ago
I think we need some kind of grouping function, but it doesn't have to be the 'generate group indices' function. I'm sure we'll have alternatives available such as `update ... by`.
Comment · 3 years ago
In the Wordle dict example, it would have helped if a type system could tell me I was wrong when I assumed that an indexing miss would generate an empty list.
Comment · 3 years ago
Comment · 3 years ago
Good point - added a simple explanation in the article:

Group tells you the places each element occurs in a list. It generates lists of indices.

Comment · 3 years ago
Yep, the comments are the BQN version.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton