Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
icen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
61.
▲
by
icen
7y ago
I can't speak to j, but using q, its cousin, at work looks quite a lot more like the graph APL posted above. It's spread out over several lines, and heavily commented. Most problems are also much simpler, and don't require an
62.
▲
by
icen
7y ago
> But what you're describing there should be a concept known to anyone familiar with a functional language. It seems you've just described what I would call mapping a function over an array. The other powerful notion is that a
63.
▲
by
icen
7y ago
There's a decent tutorial now at shakti.com: https://shakti.com/tutorial/
64.
▲
by
icen
7y ago
Yes of course. If you balanced the parentheses it would be syntactically valid k. It assumes a bunch of names, and would be unlikely to do anything useful, but it would be legal. The k7/shakti tutorial playfully notes that running one&
65.
▲
by
icen
7y ago
> alt-command-blah-blah-blah C-h f And then I type sort of what I want (with helm or ivy, it's a fuzzy match) and select it from the list, which brings up it's documentation and what keystrokes call it. There is also `where-is`
66.
▲
by
icen
8y ago
Why would you expect a k.c? This is b. There's a b.c.
67.
▲
by
icen
8y ago
A related operator is group (=), which creates a map between the unique elements of a list to their locations. x: 10 ? `a`b`c x `a`c`c`c`c`a`b`a`a`c =x a|0 5 7 8 b|,6 c|1 2 3 4 9
68.
▲
by
icen
8y ago
I think that this is a matter of practice. I write k/q almost daily, and don't struggle to read other people's code, or my own. Most code isn't clever oneliners, and is quite readable.
69.
▲
by
icen
8y ago
GNU APL is a perfectly reasonable APL implementation. There are open source implementations of some K versions - Kona, which is K3, and oK, which is ~K5. J is available under GPL3.
70.
▲
by
icen
8y ago
In terms of semantics, sure. However a real part of the charm of APL (and J, and K) are in the syntax, and how notating your program causes you to think about it differently. Something like or/and outer product in the game-of-life onel
71.
▲
by
icen
8y ago
tolower and related things I'm comfortable with - the main question I can't answer is where do you run the weidu mod?
72.
▲
by
icen
8y ago
Not OP, but for me it works flawlessly. Load times are instant, lots of nice quality of life features. Not tried multiplayer, but it's hard to make that worse. Also never worked out how to mod things, but if you're just after the
73.
▲
by
icen
8y ago
The proof of the incompleteness theorem only shows you that recursively-enumerable arithmetic systems are always missing something , because the construction always holds. It doesn't make any grand statements about the structure or na
74.
▲
by
icen
8y ago
emacs -Q is instantaneous for me. If you're querying MELPA and sychronising packages that might be a cause of the slowness.
75.
▲
by
icen
8y ago
Why does having my vote's power scale with my salary make me treat it more responsibly?
76.
▲
by
icen
8y ago
There are two key ideas: one is notation as a tool of thought, and thus the symbols are incredibly important (or, if not using symbols, to use similarly lightweight notation as in j/k). In a semantic sense, the key idea is that you com
77.
▲
by
icen
8y ago
You can extend kdb with c functions, but they need to take/return their internal K structures, so you'll need to wrap functions. `2:` is the thing to look at. Otherwise there's ipc clients, and a very nice native python integ
78.
▲
by
icen
8y ago
Do some deep learning. It's very straightfoward, and you only need some trivial IO. Writing a programming language in APL is not for the faint of heart - co-dfns is, alongside it's performance goals, to show that compilers aren&
79.
▲
by
icen
9y ago
There's plenty of nice modern classical music. Lots of it sounds 'normal' - you might like to try something by Thomas Ades, like Asyla or Totentanz .
80.
▲
by
icen
9y ago
There's a maximum amount of stuff a single function/code unit can do before becoming unreadable. When writing code, there's a tension between the semantic size of the implementation, and the semantic size of the constituent p
81.
▲
by
icen
9y ago
This syntax is very readable. The maximum semantic size of a function that's still easy to read is much larger. Functions that do entire things in one go are more common, and make reading about the entire program much easier - the game
82.
▲
by
icen
9y ago
Can't be used commercially.
83.
▲
by
icen
9y ago
If you want to try out K, you can either go to Kx and download the 32bit version of kdb+. \ at the prompt (on its own) will enter K mode. This uses K4. Alternatively, there's the free and open source Kona, which is an implementation of
84.
▲
by
icen
9y ago
> That includes absurdities like "We should write a compiler from JavaScript to wasm to make all our JS faster!" Is this this absurd? Given you can compile WASM whilst streaming, you should really precompile your JS into WASM i
85.
▲
by
icen
9y ago
In the worst case, it is commonly thought (this is P vs NP) that you will have to test a super-polynomial number of solutions. It doesn't have to be all of them.
86.
▲
by
icen
9y ago
A problem is in NP if a Turing machine, given the problem, can verify a given solution (assuming that the size of the solution is polynomial in the size of the problem) in a number of steps polynomial in the size of the problem. An exampl
87.
▲
by
icen
9y ago
The games themselves are fixed size. They can't be NP-hard, since NP-hardness is a property of difficulty with respect to input size. They show that you can generalise them and build levels that are NP-hard: for example, in the case of
88.
▲
by
icen
9y ago
Emacs has Tramp, and you can do the same thing!
89.
▲
by
icen
9y ago
One of the things that the GP complains about is evaluation order - in k it follows a simple rule very consistently - programs are evaluated top to bottom, and each expression is evaluated right to left. There are no precedence rules. The i
90.
▲
by
icen
9y ago
Yes, `%` is division. It's not that odd, if you look at the symbol - it looks quite similar to the division symbol `÷`. It's almost better asking where C got the idea that it should be mod from!
More ›