Live data from Hacker News

K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

github.com

31–40 of 93 posts

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#31
post #2

I was surprised at how verbose and commented the code was. Then I read the note saying that Whitney's original code was in `ref/` and the two files in the root were annotated by other kparc members.

Whitney is an unrealized IOCCC champion.

I know you're joking but people who write C like him would argue it's not obfuscated. It's certainly not intentionally written to be more difficult to read, and those who are practiced in the art often say that it's _easier_ to read.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#32
post #15

Earlier quoted context omitted.

Whitney is an unrealized IOCCC champion.

> Whitney is an unrealized IOCCC champion. no, that'd be fabrice bellard, who is actually a "realized" ioccc champ. atw doesn't do obfuscated c. you are led astray.

> atw doesn't do obfuscated c.

He writes as most of us code-golf. Makes you wonder how good his golfing would be if he tries.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#33
post #2

I was surprised at how verbose and commented the code was. Then I read the note saying that Whitney's original code was in `ref/` and the two files in the root were annotated by other kparc members.

Whitney is an unrealized IOCCC champion.

Pity that he writes in C; if he wrote in JavaScript, he wouldn't need a minifier.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#34
post #33

Earlier quoted context omitted.

Whitney is an unrealized IOCCC champion.

Pity that he writes in C; if he wrote in JavaScript, he wouldn't need a minifier.

Sorry, you didn't get him. He does not do it for the sake of making it harder to read, nor he would entertain language like Javascript.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#36
post #22

This looks like a cult I would happily dive into. Does anyone care to ELI5? I tried to read the code but did not understand a single line

Arthur Whitney is showing how to build an array language using C in array language form. AW is known for kdb+ which is often used in finance due to its extreme performance properties and ability for quants to quickly explore ideas. Personally, to get a better handle on how array languages worked, I implemented KlongPy which is a python implementation of Klong, which descends from K (which AW wrote). You have to play…

Ha! For those of us who were in the Morgan Stanley Fixed Income group for many years in the 1990s and 2000s AW is known for APLus which was used extensively for modeling and application work.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#37
post #33

Earlier quoted context omitted.

Pity that he writes in C; if he wrote in JavaScript, he wouldn't need a minifier.

Sorry, you didn't get him. He does not do it for the sake of making it harder to read, nor he would entertain language like Javascript.

it was a joke. i'm fascinated by his approach.

shakti.com has a suspiciously familiar looking snippet of javascript

was it him?

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#38
post #15

Earlier quoted context omitted.

Whitney is an unrealized IOCCC champion.

> Whitney is an unrealized IOCCC champion. no, that'd be fabrice bellard, who is actually a "realized" ioccc champ. atw doesn't do obfuscated c. you are led astray.

You know it's in jest, of course. However, he doesn't write C either - and you know that better than us. It's a DSL with its own idioms and quirks that just happens to be in C. Often hearing about "evils" of preprocessor (which I do and don't agree with) I wonder if he ever considered anything else, aside from C, that's also low level. Heck, even asm can be macro'd away.

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#39

I have a longstanding fascination with K and other "modern" APL derivatives. There are a few intersecting truisms about coding that I believe: one is that people's working memory varies: some have an immense amount, some less. Humans definitely process spatially better than in time series (e.g. comparing side by side rather than turning over a page.) This implies you should prefer succinct code and languages because…

For me Haskell, point free functions, and lenses are a happy medium :)

Re: K/simple: a tiny K interpreter for educational purposes by Arthur Whitney

#40

I have a longstanding fascination with K and other "modern" APL derivatives. There are a few intersecting truisms about coding that I believe: one is that people's working memory varies: some have an immense amount, some less. Humans definitely process spatially better than in time series (e.g. comparing side by side rather than turning over a page.) This implies you should prefer succinct code and languages because…

I don't know about Golang but there are languages where this sort of highly domain-optimized, super terse syntax could be embedded as a domain-specific sublanguage, in a significantly less hackish way than what C allows.
Post reply on HN