Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mlochbaum
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
mlochbaum
2y ago
Functionality is, at this time, extremely limited (and the first kfun was out in January so I don't think there's really any intention to get this to usability on a short timeframe). No support for paired syntax like parentheses,
62.
▲
by
mlochbaum
2y ago
Yes, when I took a look at shakti's database benchmarks before, they seemed entirely reasonable with typical array language implementation methods. I even compared shakti's sum-by benchmarks to BQN group followed by sum-each, whic
63.
▲
by
mlochbaum
2y ago
In modern APLs a character scalar is just a Unicode code point, which you might consider UTF-32. It's no trouble to work with. Although interfacing with things like filenames that can be invalid UTF-8 is a bit of a mess; Dyalog encodes
64.
▲
by
mlochbaum
2y ago
There's a tutorial explaining BQN's combinators not directly linked: https://mlochbaum.github.io/BQN/tutorial/combinator.html The symbols ⊸ and ⟜ are new in BQN and I think these are a good example of ho
65.
▲
by
mlochbaum
2y ago
It's much worse than that: based on measurements these use a loop that goes one set bit of the mask argument at a time. uops.info and so on measure a mask that's almost all zero so they vastly underreport. Worst case is in the hun
66.
▲
by
mlochbaum
3y ago
Language-specific web editors often do. I think Uiua ( https://www.uiua.org/ ) is the state of the art here, with the minor issue that most of the symbols aren't used in any other language. Several APL-likes have languag
67.
▲
by
mlochbaum
3y ago
I was inspired to write up a little section on Iverson's approach to naming (including his probable coinage of "bubble sort"): https://aplwiki.com/wiki/Ken_Iverson#Naming_things
68.
▲
by
mlochbaum
3y ago
The name "tacit" comes from the APL family as far as I know. It certainly fits with Iverson's style, as he was fond of seeking out just the right word to describe something regardless of obscurity ("ravel", "co
69.
▲
by
mlochbaum
3y ago
For what it's worth, GNU APL is GNU because the developer chose to associate their project with GNU, not because there was any sort of effort by GNU as an organization to implement APL (see also [0]). It implements what I think is a pr
70.
▲
by
mlochbaum
3y ago
"Who uses APL in production?" is a common question. These days, it's mostly those who haven't stopped using it. The historical use, while never quite mainstream, might be surprising to those who never realized APL had a
71.
▲
by
mlochbaum
3y ago
No, the k solution computes the unique elements and group independently. #:'=v[;1] uses group for the first column, and ?v[;1] uses unique for the second. (;) is list notation. Your analysis of the algorithm you've described is al
72.
▲
by
mlochbaum
3y ago
Have continued using it as an artist and listener, and there's no way I'd have known anything changed from the site. They updated the terms of use, but only as necessary to reflect the change in ownership. And they are still doing
73.
▲
by
mlochbaum
3y ago
I say it's nonsensical (and yes, Ks are bytecode interpreted). https://mlochbaum.github.io/BQN/implementation/kclaims.html#...
74.
▲
by
mlochbaum
3y ago
As in, compiling for FPGAs or running on them? Can't really say anything about compiling-for. I know building Verilog takes forever but I have no idea what it's doing. For running-on, APL adapts well to most hardware. I mean, we&#
75.
▲
by
mlochbaum
3y ago
There's a fundamental opposition between the functional programming approach to types and array programming principles, as I see it. In functional programming (particularly Haskell), types are used to make fine distinctions for safety.
76.
▲
by
mlochbaum
3y ago
Which is exactly why I said you block the computation to stay at a low cache level. With SIMD loads and stores I don't think this matters quite as much as you suggest, even without blocking. It's pretty much only arithmetic that c
77.
▲
by
mlochbaum
3y ago
I criticized the approach some in [0], after writing the BQN compiler in a similar style. Pioneering the array-based compiler paradigm is a major accomplishment, and if you did any programming with Aaron, you wouldn't question his abil
78.
▲
by
mlochbaum
3y ago
Complain about the language or documentation, but array language communities are absolutely friendly to outsiders! This tutorial lists some active forums, give them a try: https://github.com/razetime/ngn-k-tutorial&#x
79.
▲
by
mlochbaum
3y ago
Following this episode, I did find an AVX2 implementation of the maximum subarray sum that's about 25% faster than the sequential version, published here: https://gist.github.com/mlochbaum/b6e9701c6c1c617a2c2a4fb10
80.
▲
by
mlochbaum
3y ago
Previous discussion: https://news.ycombinator.com/item?id=31377262
81.
▲
by
mlochbaum
3y ago
Yes, you waste a lot of memory. Memory's cheap. If you need to, you can do the computation in blocks. Well, it's pretty rare to actually run out of memory but blocking is useful for staying at a lower cache level. Scalar languages
82.
▲
by
mlochbaum
3y ago
In the BQN compiler I'd write (⊂¯1++⍀m)⌷(m←c=LF)⌿ as the equivalent of (⊂⌈⍀m×⍳≢m←c=LF)⌷ using the function IT (indices-times but it also includes the ⌈⍀). Although I'm not sure it's inherently faster. Most of the cost is in s
83.
▲
by
mlochbaum
3y ago
Yeah, about fifteen minutes for lines 15 to 21. Which includes getting used to this n-(⊂¯1++⍀m)⌷(m←c=LF)⌿n←+⍀ pattern for sum-within-lines that appears everywhere. Pretty sure the k=¯1 checks do nothing (planning ahead for a future feature?
84.
▲
by
mlochbaum
3y ago
I don't put a lot of stock in the "write-only" accusation. I think it's mostly used by those who don't know APL because, first, it's clever, and second, they can't read the code. If I remember I implemen
85.
▲
by
mlochbaum
3y ago
Hey, even Dijkstra agrees with us on this one: > I remember how much more pleasant the predicate calculus became to work with after we had decided to give con- and disjunction the same binding power and thus to consider p ∧ q ∨ r an ill-
86.
▲
by
mlochbaum
3y ago
Here are my two cents on array compilation. I think a lot of the research goes in the direction of immediately fixing types and breaking array operations into scalar components because it's easy to compile, but this ignores some advant
87.
▲
by
mlochbaum
3y ago
I believe this is the original publication, 1982: https://dl.acm.org/doi/10.1145/947955.1083808
88.
▲
by
mlochbaum
3y ago
Bidirectional isn't benchmarked here, and only mentioned once offhand: > For example, we could already start searching for elements at the slot with expected (average) displacement from their perfect slot and probe bidirectional fro
89.
▲
by
mlochbaum
3y ago
Looks like full keys are always compared if hash codes test equal, which is what I'd expect. For example: https://github.com/questdb/questdb/blob/master/core/src/main...
90.
▲
by
mlochbaum
3y ago
Since the hashes are stored, you could order by hash. This would leave keys with the same hash unordered, so if you find an entry with equal hash but unequal key you have to keep probing, but that only matters on a full-hash collision.
More ›