rak1507

Joined 5 years ago

Karma
355
Submissions
195
Member since
May 20
uni student
View on Hacker News

Recent submissions

Comment · 11 months ago
You won't get anything from vapourware salesmen.
Comment · 11 months ago
It seemingly takes a long time to write good software too, co-dfns is infinity+1 years in progress...
Comment · 1 year ago
There's a difference between one line and short/terse/elegant.

  {m:(x,x)#til x*x; r:til[x]-x div 2; 2(flip r rotate')/m} 
generates magic squares of odd size, and the method is much clearer. This isn't even golfed as the variables have been left.
Comment · 1 year ago
There aren't really any complicated arguments being made, so I don't think a proof would be that involved.
Comment · 1 year ago
You definitely don't need to know any of that background to be able to arrive at the answer. To fully understand everything maybe, but all it takes is:

a = x^1 + x^4 + x^7 + ... = x(1 + x^3 + x^6 + ...) = x/(1-x^3)

a + a^3 + a^5 + ... = a(1 + a^2 + a^4 + ...) = a/(1-a^2)

Substitute + simplify. I don't think this is beyond a (fairly smart) elementary school student.

Comment · 1 year ago
Why not? All that is really required is knowing 1/(1-x) = 1+x+x^2+... and a bit of algebraic manipulation.
Comment · 1 year ago
Isn't referencing a source exactly the right way to go about pointing out someone is essentially lying about their background/credentials? I'm surprised people do not care about accuracy.
Comment · 1 year ago
I remembered it, and it seems like a reasonable assumption that your first experience of APL being so bad would put you off doing any more in the future.
Comment · 1 year ago
Most of it is boilerplate or written like it is Java, so it is pretty small compared to any real world projects.

To me professional implies production/real world/paid work, not just an unfinished academic project.

Comment · 1 year ago
Comment · 1 year ago
The append is the only thing that is O(1), finding the deletion mask is linear (≠ is linear, isn't it?) and the actual deletion is also linear (⌿ is also linear).

       ]runtime -repeat=1s 'v←k1 ⋄ v⌿⍨←v≠2'

 \* Benchmarking "v←k1 ⋄ v⌿⍨←v≠2", repeat=1s
 ┌──────────┬──────────────┐
 │          │(ms)          │
 ├──────────┼──────────────┤
 │CPU (avg):│0.008491847826│
 ├──────────┼──────────────┤
 │Elapsed:  │0.008466372283│
 └──────────┴──────────────┘
       ]runtime -repeat=1s 'v←k2 ⋄ v⌿⍨←v≠2'

 \* Benchmarking "v←k2 ⋄ v⌿⍨←v≠2", repeat=1s
 ┌──────────┬────────────┐
 │          │(ms)        │
 ├──────────┼────────────┤
 │CPU (avg):│0.8333333333│
 ├──────────┼────────────┤
 │Elapsed:  │0.83        │
 └──────────┴────────────┘
Comment · 1 year ago
The problem is that this isn't a "hashmap" in any meaningful sense, because all the operations are O(n).
Comment · 1 year ago
When it comes to subjective opinions, what other choice do you have? Your idea of doing studies is interesting but that's not even been done for most languages, yet claiming "python is unreadable" would clearly be laughable.

Either everyone who uses array languages does actually find them readable, or they're all persistently lying for... what reason? And forcing themselves to use something they don't find readable? Why would anyone do that! Especially considering a lot of array language users are hobbyists, who have chosen to use them, it's not like they're forced to.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton