Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mlochbaum
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
mlochbaum
2y ago
Seems easy enough to use a parallel scan if you're willing to accept a little work inefficiency, right? Assign each scanner thread a block, first each one counts/xors how many quotes are in its block, exclusive scan on those (last
32.
▲
by
mlochbaum
2y ago
I think it's worth considering that application development and GUIs really aren't K's thing. For those, yes, you want to be pretty careful about the concept of a "character", but (as I understand it) in K you'
33.
▲
by
mlochbaum
2y ago
You win! Whitney was just out of graduate school at the time, and had worked some with APL at I.P. Sharp but was implementing "object-oriented languages, a lot of different LISPs, Prolog"[0]. Next was the more APL-like A around 19
34.
▲
by
mlochbaum
2y ago
Finding it increasingly funny how many people have come out of the woodworks to "defend" C by offering this or that method of explicit vectorization. What an indictment! C programmers can no longer even conceive of a language that
35.
▲
by
mlochbaum
2y ago
Got the introduction written at https://mlochbaum.github.io/BQN/implementation/compile/fusio... .
36.
▲
by
mlochbaum
2y ago
Several comments seem confused about this point: the article is not about manual SIMD, which of course C is perfectly capable of with intrinsics. It's discussing problems in compiling architecture-independent code to SIMD instructions,
37.
▲
by
mlochbaum
2y ago
https://beyondloom.com/decker/lil.html See also https://beyondloom.com/blog/rankingoffruits.html for a nice introduction to the query syntax and its relation to K. (And RodgerTheGreat is John Earn
38.
▲
by
mlochbaum
2y ago
ngn/k is mentioned, currently-maintained fork at https://codeberg.org/growler/k .
39.
▲
by
mlochbaum
2y ago
There's also a GC pause issue: reference counts are the main method, but when those don't do the job we rely on stop-the-world mark and sweep. And we do very little analysis so it's easy for namespaces and closures to form re
40.
▲
by
mlochbaum
2y ago
Regarding graphics, CBQN is not very suited to doing these natively as it runs on the CPU rather than GPU and has only double-precision and not single-precision floats. So, can you do some simple animation at 60FPS? Probably. Can you make a
41.
▲
by
mlochbaum
2y ago
I got stuck on sorting too, was working on SingeliSort ( https://github.com/mlochbaum/SingeliSort ) for a while. The basic performance is there but I need to get serious about testing before using it. But the radix sort
42.
▲
by
mlochbaum
2y ago
Wasn't the best section link, last paragraph here has more detail: https://mlochbaum.github.io/BQN/implementation/primitive/sor...
43.
▲
by
mlochbaum
2y ago
I have explored it, see https://mlochbaum.github.io/BQN/implementation/primitive/sor... . I implemented this method in Dyalog 18.0 with BlockQuicksort-like partitioning, using vectorized comparison with bit-bo
44.
▲
by
mlochbaum
2y ago
We implemented something like this in CBQN last year (mainly for modulus, as floor division isn't a primitive). Commit is https://github.com/dzaima/CBQN/commit/d333902 , some proofs of when and why it wor
45.
▲
by
mlochbaum
2y ago
My own take on relating scales geometrically: https://mlochbaum.github.io/BQN-Musician/theory/modulation.h... It does seem that I include all Chapman's scales (while saying nothing about chords), although odd
46.
▲
by
mlochbaum
2y ago
Array programming seems adaptable to any form of parallel processing: SIMD instructions, multi-core, or GPUs. I think it's because, in addition to their inherent parallelism, primitives are so simple that they make very few demands on
47.
▲
by
mlochbaum
2y ago
APL did catch on to some extent, see https://news.ycombinator.com/item?id=39471718 . Without getting into any discussion of the array paradigm itself, the reason commercial programming is such a winner-take-all system now i
48.
▲
by
mlochbaum
2y ago
Memory traffic is certainly the biggest problem that the array paradigm presents for implementation, yes. I'd quibble with calling that "poor locality": when working with large arrays, if any part of a cache line is accessed
49.
▲
by
mlochbaum
2y ago
K, for a start. Whitney's earlier dialect A+ too. See https://aplwiki.com/wiki/First-class_function .
50.
▲
by
mlochbaum
2y ago
It's in several, particularly newer APL dialects; see https://aplwiki.com/wiki/Under#History . Proud to say I originated the "structural" form used by Uiua, which is able to deal with transformations lik
51.
▲
by
mlochbaum
2y ago
Well this is pretty much the goal of the BQN website so my best attempts are there. I might point to the quick start page https://mlochbaum.github.io/BQN/doc/quick.html as a way to feel more comfortable with the s
52.
▲
by
mlochbaum
2y ago
Is this because all the code you see is through HN or similar? No one's going to share something titled "an unremarkable script I use to help run my business" here. Not sure what your threshold for code golf is, but you can s
53.
▲
by
mlochbaum
2y ago
The most uncompromisingly APL-ish code I've written is the BQN compiler[0]. Hard to write, hard to extend, hard to refactor. I generally recommend against writing this way in [1]. But... it's noticeably easy to debug. There's
54.
▲
by
mlochbaum
2y ago
Huh. This is the commit that introduces the register model: https://github.com/Co-dfns/Co-dfns/commit/f89919144f22441f21... In the compiler, it's working with dense adjacency matrix representations, so t
55.
▲
by
mlochbaum
2y ago
These are written in a generally basic and clean style (avoiding tacit programming which is sometimes considered hard to understand, e.g. function {s↑⍺↓⍵} instead of the train (s↑↓)). They're nice to read and I'd have no trouble m
56.
▲
by
mlochbaum
2y ago
I tried using search engines to find whether the fold function in Joy, a vastly better-known language, takes an initial element or not. Best I got, after some fiddling with search terms, was a Joy tutorial that did have an example of fold.
57.
▲
by
mlochbaum
2y ago
(I think we got off the rails a bit: the linked article looks to be ASCII-only! But I feel the need to defend myself...) This is a bit of a change-up from the usual "write-only language" complaint! But it does have the benefit of
58.
▲
by
mlochbaum
2y ago
Not quite the same, rip_shuffle does have some contortions to be able to run in-place (I'm still scratching my head about who's running these sorts of high-performance algorithms with no auxiliary memory available), so if those co
59.
▲
by
mlochbaum
2y ago
Performance-oriented library with no benchmarking instructions, fun. I get 850ms to shuffle 32-bit integers up to 1e8 with this library versus 400ms in BQN (•rand.Deal•_timed 1e8). However, BQN also has a large advantage at smaller sizes, s
60.
▲
by
mlochbaum
2y ago
I was able to make a variant of the higher-base version that runs in a single pass, by stopping when one partition fills up and using a different method for the remaining (asymptotically few) elements. I described the idea, which is based o
More ›