Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
icen
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
icen
5y ago
It's no more magical than anything else. It just turns out that j has an operator that does exactly what you want. Having such operators and functions is far from an uncommon experience in j.
32.
▲
by
icen
5y ago
Dyadic `x / y` is different to monadic ` / y`
33.
▲
by
icen
5y ago
/ does different things depending on the arity of the preceding function. 'f/ x' is 'insert' - i.e. reduce, so that '+/ 1+i.10' yields 55. 'x f/ y' is 'table', inserting
34.
▲
by
icen
5y ago
I agree; I don't think BQN values terseness more than k. I think k values terseness a lot. I think it may be more convenient to write terse code in BQN over k, because there is greater facility to control function calls in a terse wa
35.
▲
by
icen
5y ago
Sadly it also has to consider the time it takes to compile code like that - we grumble, but not too loudly, at the time LLVM takes to compile things. If the JVM took that same time whilst running live that wouldn't be acceptable.
36.
▲
by
icen
5y ago
You might enjoy the language created by the author of the article, then. BQN is a language that favours terseness, even above and beyond k. It is in many ways an improvement on APL and J, importantly through a more convenient set of operato
37.
▲
by
icen
5y ago
You might be interested in Aaron Hsu's work on co-dfns, which is a compiler that compiles a subset of Dyalog APL to the GPU. https://github.com/Co-dfns/Co-dfns
38.
▲
by
icen
5y ago
There are other things aside from array broadcasting that languages stand to learn from APL. I think that the biggest one is looking carefully at the clever choice of primitives. To my knowledge other languages like Julia and numpy don'
39.
▲
by
icen
6y ago
As is so often the case in chess, a basic surveil of the theory can open up novelties in GM games. The seminal text 'Winning with the Bongcloud', is heartily recommended for anyone looking to understand this new opening. Here is a
40.
▲
by
icen
6y ago
Often in tournament chess you cannot offer a draw for the first 10 moves. However a 3-fold repetition is automatically a draw. The idea is to try and provoke games happening, even if the players come to the table wanting a draw (someone can
41.
▲
by
icen
6y ago
Emacs has an excellent APL keyboard implementation (via gnu-apl-mode) which uses . as a prefix for the apl keys.
42.
▲
by
icen
6y ago
There seems to be a bit of confusion here. Idris doesn't provide the same tools and guarantees as Rust does to manage memory, and instead requires that implementations provide a garbage collector. If you're producing code for a co
43.
▲
by
icen
6y ago
I have uMatrix and uBlock Origin on Firefox for Android. This has been available for a long time.
44.
▲
by
icen
6y ago
Not the name of the project (which is pronounced 'geeks') but the implementation of the shell and coreutils, as from the text in the article. This implementation is called 'Gash'.
45.
▲
by
icen
6y ago
q is k with all of the monadic verbs being replaced by English words: `+` is `flip`, `=` is `group`, `-` is `neg`, and so on. It also has q-sql, a SQL like sublanguage for conveniently working with tables. k has the verbs that implement it,
46.
▲
by
icen
6y ago
As the workhorse example, consider the length-indexed Vector: data Vec : Nat -> Type -> Type Each Vec has its length in its type. You get a type error if you try the following: f : Vec 3 Int -> Int f [1, 2, 3, 4]
47.
▲
by
icen
6y ago
Indeed - the Type/Kind hierarchy is unified when you write a dependently typed system. In simply typed lambda calculus, you have a system of values, types, and kinds, which are required to make sense of the structure. In dependent type
48.
▲
by
icen
6y ago
It is more that you can have values like `payload : if byte[TYPE_OFFSET] == TYPE_INT then Int else String`. You are required to disambiguate the type before anything useful can be done. What has happened is that you have types being passed
49.
▲
by
icen
6y ago
Dependent types let you do this. The type system ensures that you have all the types known at every point, and everything is sewn up before runtime - even though you don't know which type you will actually get ahead of time. Types are
50.
▲
by
icen
6y ago
Yes, the actual code will always tell you exactly what it does. There is always a necessary distinction between specification and implementation: if there weren't, one of them would have no value. We often suggest that the intent of a
51.
▲
by
icen
6y ago
You can specify the 2-vectors on the unit circle as "{ (x, y) : x, y in R | x^2 + y^2 - 1 < 0.000001 }" instead.
52.
▲
by
icen
6y ago
If you're passingly familiar with Haskell or similar languages, you could give Idris a try. https://www.idris-lang.org/
53.
▲
by
icen
6y ago
(Not OP.) When moving from dynamically/untyped/unityped languages to those with types, you are liberated from having to check the shape of inputs. If you're given something that claims to be a list of strings, it absolutely i
54.
▲
by
icen
6y ago
This is standard notation. The `x : A` supposes a value, `x`, inhabiting a type `A` (like in Rust, or ML, or maybe `A x` in C). On the right hand side of the turnstile, we have `B(x) : Type`, which is roughly what it looks like: `B` is a ty
55.
▲
by
icen
6y ago
You build vectors of the other conditions, and subtract them before the running sum.
56.
▲
by
icen
7y ago
It wouldn't surprise me if all of these languages were alive in some way or other. There are MLs and APLs and Pascals alive and well.
57.
▲
by
icen
7y ago
It keeps going! 3 3 3 ⍴ ⍳10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 M ← 3 3 3 ⍴ ⍳10 M*M 1.00000E0 4.00000E0 2.70000E1 2.56000E2
58.
▲
by
icen
7y ago
< grades upwards: for each element, the element of the returned array is its position if the array is sorted. x: 10?A:"abcdefghijklmnopqrstuvwxyz" x "ysyselacwl" +`x`y`z!(x;<x;<<x) x
59.
▲
by
icen
7y ago
dyadic | is or, or max. So e.g. 4 = |/1 2 3 4
60.
▲
by
icen
7y ago
And Intercal on Interstates: http://intercaloninterstates.org/
More ›