Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
rak1507
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
61.
▲
by
rak1507
3y ago
Lots of people do Python so it makes sense that a lot of leaderboard solutions are in python! Hardly rigorous (n=1) but I got on the leaderboard for day 2 using K. Other people have before in array languages too.
62.
▲
by
rak1507
3y ago
> Regular expressions look a lot like Brainfuck. I'm sorry, have you ever seen a regular expression? No they do not.
63.
▲
J Playground (In browser repl/plots/more)
(jsoftware.github.io)
1 points
by
rak1507
3y ago
|
0 comments
64.
▲
by
rak1507
3y ago
There aren't. Feel free to try to come up with something. 'SQL' is pretty feature light (without specific extensions). Qsql is really great, it's a shame it's locked behind a proprietary language.
65.
▲
by
rak1507
3y ago
Whether or not someone should use J vs another language is an interesting, but entirely separate question. The original post was about rewriting things in the same language to be more 'readable', not to suggest everyone who does
66.
▲
by
rak1507
3y ago
The original article wasn't about the economics of different languages. It was about not using "clever" code. That J code isn't "clever", it's a very straightforward implementation of the problem, just in
67.
▲
by
rak1507
3y ago
It's not obtuse, it's an extremely obvious way to calculate a moving average. What would you do instead?
68.
▲
by
rak1507
3y ago
> Clearly, it takes a tremendous amount of skill to solve such a hard problem with such a small amount of code. Wrong. It is extremely easy. The code isn't golfed. It is regular J code that could be written by anyone who's look
69.
▲
by
rak1507
3y ago
Yeah BQN sort of has higher order functions but it still distinguishes between functions and data, so I don't think it would be that possible/easy to use combinatory logic style combinators. I haven't used BQN much though, so
70.
▲
by
rak1507
3y ago
Yeah, you can implement them like you could in anything - it varies per language but the lack of true higher order functions (anything except K) and lazy evaluation (all) means that there's not really an 'elegant' way for any
71.
▲
by
rak1507
3y ago
Unfortunately (as an array language fan) this isn't really true. Certain function composition operators that exist in array languages appear to have similarity with combinators, however array languages are unable to express true lambda
72.
▲
by
rak1507
3y ago
<mean message edited out - despite me really wanting to be mean to someone who's been programming for longer than I've been alive but seems to lack reading comprehension> You don't have to understand APL to know what it
73.
▲
by
rak1507
3y ago
Why has this thing of posting unchecked GPT4 output become popular? It's infuriating. The explanation is wrong, but who cares right? Oh great I see now they've added yet another APL-on-HN trope: the 'equivalent' (note: i
74.
▲
by
rak1507
3y ago
(⊢⊢⍤/⍨1<≢¨)({⍵[⍋⍵]}¨⊢∘⊂⌸⊢)words or something like that maybe
75.
▲
by
rak1507
4y ago
No.
76.
▲
H2O shakti k benchmark vs. polars/datatable/etc.
(shakti.com)
1 points
by
rak1507
4y ago
|
0 comments
77.
▲
by
rak1507
4y ago
It is beyond me how people continually compare things that are (supposedly) hard to read because of HIGH semantic density (regex/perl/APL/...) with things that are hard to read because of LOW density (brainfuck). It is a pret
78.
▲
by
rak1507
4y ago
Ah oops, I misremembered what they were.
79.
▲
by
rak1507
4y ago
Dyalog APL does this by default.
80.
▲
by
rak1507
4y ago
I think all people who try to learn APL for more than about 5 minutes end up realising most of their assumptions were completely wrong. Maybe they don't reach exactly the same conclusions (a lot of people do), but they reach similar on
81.
▲
by
rak1507
4y ago
Yes - the first thing you notice when you see APL is 'this looks weird'. Most people then assume 'this is complicated, hard to read, and hard to use', and move on with their lives. Some people decide to learn it anyway,
82.
▲
by
rak1507
4y ago
It seems like it might be easy to confuse things, but from experience, it isn't. I feel like in general, you're making a lot of (fairly reasonable) assumptions about what programming in an array language is like, but they aren
83.
▲
by
rak1507
4y ago
It's really unlikely (imo impossible) you'll forget what a symbol means in APL or K etc if you program in it reasonably often. There aren't many symbols, and most of them are used pretty frequently. If you do forget, there&#x
84.
▲
by
rak1507
4y ago
Ah, that code was added to the wiki page in 2006 apparently. A modern version is basically the same anyway. I will (maybe) agree that the python is easier to understand without any language knowledge - but that does not mean the K is not
85.
▲
by
rak1507
4y ago
2_&{&/x!/:2_!x}'!R is very understandable to someone who knows K. (Or at least, the idea is, do you know what dialect it uses? Where's the code from?) The (roughly) equivalent python is filter(lambda x:all(x%i&
86.
▲
by
rak1507
4y ago
APL is both dense and succinct, which both reduce code size. 'Regular' languages would be shorter with APL's semantics.
87.
▲
by
rak1507
4y ago
⊃ is 'first', ⍸ is where, f⍤g is like function composition, and ⍤1 means apply to each rank 1 (vector), so ⊃⍤⍸⍤1 means 'the first true for each vector'
88.
▲
by
rak1507
4y ago
Yes, that example is easy, although you got it wrong, I said 100 random walks of length 1000, which should be (1000, 100) not (100, 1000). However, there are still more 'moving parts' in numpy than in APL/J, you have to modif
89.
▲
by
rak1507
4y ago
The appeal isn't immediately obvious with simple things, but something more complicated like 'plot 100 random walks of length 1000' is basically as easy in J and slightly less easy in numpy. (How long would it take you to adj
90.
▲
by
rak1507
4y ago
You don't need a bunch - you need 1. I am an APL programmer, and I can tell you 100% for certain that anyone who knows any APL would find that easy to read. (Want to find more though? Go to one of these: https://aplwiki.com&
More ›