Hacker News new | past | comments | ask | show | jobs | submit | 5166cc9c39fa61's comments login

I think a good introduction to this style of coding is the first "proof of concept" prototype interpreter for a small subset of J, also written by Whitney:

https://code.jsoftware.com/wiki/Essays/Incunabulum

Once I realized it was K&R C, I thought it was pretty straightforward.


This is worth a look. Some of the old A+ stuff is as well. I'm told by reliable sources that an awful lot of Art's code looked like this over the years; even the more recent K7 stuff. Art's gonna do his thing. Opinions differ as to whether or not it is a generally good idea, but you can't argue with the results, and at this point I find stuff like the J source code to be fairly readable, even if it is really different from what most people are used to. Basically, you're just expressing C as APL primitives. If you understand APL primitives, it's not so bad.

If you want to see APL expressed as C primitives, something like Nial is pretty good: https://github.com/danlm/QNial7


I ran it through gcc -E and clang-format.

https://pastebin.com/21qiRDi5


And not surprisingly that makes it less readable. It is a lot harder to have one-character names when you need to scroll across many pages to look up what they mean. So the more code you have, the longer code you need. As Eric Evans points out, naming things in computer code is difficult and important; wrong names can be misleading. This style avoids the problem by avoiding names.


> Array languages are the most "obscure" of all paradigms I have looked into. Even concatenative ones have some few resources about how work.

Have you tried looking at APL books? There are dozens of books on APL you can find. There are journals and conference proceedings from ACM, IBM, Dyalog, and Vector UK. I started to get into APL more seriously last year and lack of resources is definitely not a problem in my experience, lack of time to read them all is. Also, it's more about thinking of algorithms in terms of matrix and array operations. A lot of the techniques and algorithms can be easily adapted from Matlab.


Well there are books like "Mastering Dyalog APL", but they don't help you think in the language. There is the "Finnish APL Idioms" book which helps a bit. APL and J certainly have libraries, but a lot of functions and libraries that are builtin to most languages are omitted from APL as you can replicate with 3 characters. That's where knowing idioms helps. I am just a novice, but really enjoy writing APL & J. Aaron Hsu has been on a couple of APL related posts on HN that I have linked to multiple times. He is a scheme guru that switched to APL a few years back and wrote the Co-Dfns parallel GPU compiler for Dyalog APL. He has some enlightening talks on YouTube as well. I mention him here as his APL code is extremely terse and similar to Whitney's C, and he did an excellent job defending it in the HN post which changed the way I look at code. Second, as a University TA, he's taught multiple courses on APL as a first programming language and has talked about writing a book that tries to teach how to THINK in APL and not just this is how you transpose the matrix using this symbol...etc. My problem is that I know what the symbols do, but don't know how to switch from imperative/OO thinking to how to think in terms of array primitives (inverse, transpose, sort, outer product...etc).


"J for C programmers" is, in my opinion, an excellent resource for how to think in array-oriented style. http://www.jsoftware.com/help/jforc/contents.htm


I've flipped through it before, but didn't remember it being very enlightening (note that I didn't read the full thing and do all the excercises). I'll have to give it another shot. Thanks for the tip!


> If the city was willing to sell at cost (seriously, morphine and oxy isn't expensive to make at all), it would also destroy that economy, and potentially free some back in the hands of the people.

There is a proposal for heroin buyers clubs in British Columbia that has a lot of support: https://www.cbc.ca/news/canada/british-columbia/heroin-buyer...

Legalization not only cuts down crime (from both drug dealers and drug addicts), it prevents overdose deaths and reduces occurrences of medical emergencies and hospitalizations. The city can also collect taxes on the drugs.


This was already tried in Switzerland, with promising results: https://psychnews.psychiatryonline.org/doi/full/10.1176/appi...

Most notably, drug dealers lost financial incentive to hook new users up on the drug, so no new users anymore.


Edit: deleted


uhh, care to explain? as written, it's kinda hard to read this post charitably.


It was an error in my reading comprehension and understanding of English. Post has been deleted since it wasn't conveying what I wanted.


I didn't downvote you and I hope that my comment comes across as more similar to a vuln disclosure than a threat.

Your employer is listed in your HN profile. Assuming that you actually work for that company, you should be careful making such comments, even if your intent is completely benign.

When I was a reporter (I'm not anymore) I trawled HN comments for stories. It is not inconceivable that some Gizmodo-esque rag might write "[Redacted] Employee Making Racist Comments on Tech Forum" or whatever.


Ah, I wasn't trying to be racist in my post. But I see now how that could be read in a bad way.


I figured, since I'm familiar with some of the stats too. Just be careful out here on the internet :)


I didn't realize police prosecute unfairly and was just looking at the stats...a friend shared an article on the targeting/prosecution breakdown and it wasn't favorable for young Blacks in the U.S.


I would take elisp over TypeScript any day. The tooling around TypeScript is hot garbage, debugging async code is a huge time waster, and things that are trivial with dynamic binding turn into major undertakings because of the module system. Also the verbosity and reams of boilerplate.


> Maybe it's the display, since I still only have the old 1600x panel.

It is most likely due to poor quality batteries. The "cells" in a 9-cell battery are 18650 batteries, which vary in capacity from 3400mAh at the high end, to counterfeit ones that are labelled to have 1200mAh capacity, but in reality have only a fraction of that. Lithium-ion batteries also have a limited shelf life, so even good quality aftermarket batteries will have a fraction of the rated capacity if they have been sitting in a warehouse for years.


> 16:9 for a work machine is a bad choice, and the resolution is horrible.

I found a way to turn 16:9 into an advantage: if you go for 70-character columns, you can get a 3-column display in a tiling WM or Emacs if your resolution is 1280 or more pixels horizontally (there are 5-pixel wide fonts out there, but none of them are very legible).


> If you haven't touched an NMB Thinkpad keyboard, you haven't actually used a proper Thinkpad.

All these years as a Thinkpad user, and I had no idea of NMB vs ALPS vs Chicony. I thought the variation in the keyboard feel in the machines I own and have used was due to wear alone. Thank you for opening up an entirely new horizon of Thinkpad snobbery.


> I don't think I've ever seen a laptop without one, and I used laptops back in the early/mid 90's.

Were you using PowerBooks? Touchpads were unusual in laptops until about 2000, when things started going downhill. All of the 1990s laptops I used that I can remember (IBM, Toshiba, Compaq) had superior pointing devices: trackpoint or trackballs.


If you are wondering "why drop support for the 386?," the diff for the removal of 386 support from the Linux kernel is a good read:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

tl;dr atomic instructions XADD and CMPXCHG, and serious bugs in many 386 CPUs. Also BSWAP was added in the 486 and speeds some things up a lot.


> Many German cities are so overcrowded that you need to network like in socialism to get what you want, as there are things that money can't buy (or at least only a lot more money can buy).

Similar situation in New York City for the past decade: https://www.thedailybeast.com/stuck-in-new-york-city-private...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: