« first day (1463 days earlier)      last day (1192 days later) » 
00:00 - 14:0015:00 - 23:00

3:14 PM
@Marshall fixing the reshape seemed to have fix my "lists of size 1 getting passed to core fns" issue.

overall i think the vm is working correctly, but its getting a few hundred frames in before an assertion fails. somewhat confident the mistake is in my core fn implementation. tracking down where the function arguments originated from is difficult. i have friday off so im going to write some unit tests for the core fns and see if I can figure out what I did wrong.
 
i wish there was APL grammar somewhere
because i'm very lost in the language features
 
afaik, APL does not have a grammar like you might think
 
it's not context free, that I know
C isn't context free either(*), in fact, it has the same kind of problem.
 
its not? huh til
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
 
@cannadayr How do you parse (A)*B?
that, and C11 grammar is ambiguous due to _Atomic.
If A is a type name: dereference B, cast to A
if A isn't a type name: take variable A, multiply by B
so you need a feedback loop between the table of symbol names and the lexer (the gcc way)
or you can fix up the AST later (the clang way)
 
3:24 PM
huh interesting
 
APL has the same problem, and you can't parse it if you don't know if something is a variable, function, or operator
 
@cannadayr The layer 0 section in test/cases/prim.bqn has my tests for provided functionality. Shouldn't be hard to translate (but note that Match () isn't provided so you need to compare in the host language at the end). The version you're using doesn't have full character support, so you can ignore tests with arithmetic on characters. It would probably be better to add that based on the most recent JS VM though.
 
APL seems like a really hard to describe formally language that nobody bothered to describe, somehow
 
@KamilaSzewczyk BQN is context-free and has a grammar spec in mostly-BNF. The syntax isn't too different from APL.
 
@Marshall TY, this should be useful.
yep, reading some of Marshall's writings on bqn got me to move away from APL as my primary array language. its mind expanding but was created before some of the foundational programming theories were crafted.
for wtvr reason programming w/ symbols turned out to be too fruitful for me to switch to learning J or K yet
it works with my brain a lot more naturally
 
3:32 PM
same
 
honestly learning how to write this vm has been one of the more challenging yet informative technical projects ive attempted
 
so, APL-symbols-but-J-model would be closer to the ideal?
or s/J/something_else/, I don't have as much of outlook on all the languages
 
i dont know? one of my early bikeshedding criticisms of BQN is that id have to learn a new keyboard
i refuse to use a language bar hah
at least for input
 
@MartinJaniczek BQN has a much more consistent set of symbols, since it was designed in one go, based on 50 years of experience, and without technology limitations (other than having to find existing Unicode symbols).
 
@MartinJaniczek This is more or less what A+ is, despite it predating J. A+ is better than J in a few aspects, like having a sane function definition syntax and the ability to use functions as arguments by placing them in brackets. I think it doesn't have trains, but of course they could be added. I like the design of A+ a lot and referred to it in BQN design, but I haven't been able to get an interpreter for it running.
J and A+ both use the boxed array model, which I find complicated and inconvenient. I compared it to BQN's based array model here.
 
ngn
3:47 PM
in the k tree, 22 hours ago, by ktye
just realized that there is a debian package aplus-fsf. it even runs on wsl. did you ever try?
 
I feel like K is the black sheep of the array language family
 
@rak1507 is it? i feel like its been the one w/ the most capital backing it the last 20ish yrs (not that i was there...)
 
no one ever seems to mention it in discussions about languages
 
i think the ppl using it are just already in their community and dont talk about PLs
 
@rak1507 another contender is q
 
3:50 PM
@rak1507 it's certainly the most unlike APL of the bunch
 
Not treating the all elements of a matrix as immediate members of that matrix, is a pretty big departure, so yeah.
 
@rak1507 I wouldn't usually call it an array language because it doesn't have true multidimensional arrays. But I don't have a good name for the paradigm other than "K family".
 
I believe q is intended to be an array version of sQl.
 
Live stream on twitch.tv/adambrudz in 5 mins.
 
The intention being to make it more palatable to regular programmers. kx.com seem to want us to believe there is no k, only q.
 
ngn
3:57 PM
@Marshall vector language?
 
4:12 PM
i've heard of the D language
which was supposed to be the functional subset of Dyalog APL
are there any resources on it somewhere?
 
ngn
@KamilaSzewczyk could that be just a fancy name for dfns?
 
 
1 hour later…
RGS
5:45 PM
@Adám It was really cool, thanks.
 
ideas on simplifying this, while maintaining the {⎕←⍺⍵} part? {h←(-⍵÷2),(⍳⍵)-⍵÷2⋄{(⊃⍵){⎕←⍺⍵}⊃⌽⍵}¨,↑{⍵{⍺⍵}¨h}¨h} 10
 
@KamilaSzewczyk {(⊃⍵){⎕←⍺⍵}⊃⌽⍵}¨{⎕←⍺⍵}/¨
 
ngn
@KamilaSzewczyk ↑{⍵{⍺⍵}¨h}¨h -> ∘.{⍺⍵}⍨h
 
@Adám oh, the first thing was a common recurring idiom in my code, and that's much better
 
@KamilaSzewczyk h←(0,⍳⍵)-⍵÷2 or h←(÷∘2-⍨0,⍳)⍵
 
5:51 PM
{↑{..}/¨,∘.{⍺⍵}⍨(0,⍳⍵)-⍵÷2} 10
 
ngn
@Adám @KamilaSzewczyk you need to disclose after reduction, though
 
yeah i noticed
 
@KamilaSzewczyk you could also just {,∘.{⎕←⍺⍵}⍨(0,⍳⍵)-⍵÷2} 10
 
that's a whole lot better, thanks
 
ngn
@dzaima 0,⍳⍵ that doesn't look right. ⎕io=1?
 
5:56 PM
@ngn yeah (also i didn't write the 0,⍳⍵ part anyways)
 
ngn
not sure if @KamilaSzewczyk switched to 0 yesterday or not :)
 
6:17 PM
okay, with these tips i came up with solution to problem 27: {×/(⊃⍒{,∘.{a←⍺⋄b←⍵⋄{0pco b+(a×⍵)+⍵×⍵:⍵⋄∇⍵+1}0}⍨⍵}q)⊃(,∘.(⊣,⊢)⍨q←(0,⍳⍵)-⍵÷2)}2000
i think i can make it faster by factoring out the outer product, but it works quickly enough.
 
ngn
@KamilaSzewczyk ⊣,⊢ is ,
 
27 was a tough one, originally I couldn't find a clever way to do it so I used control flow (ew) but I refactored it today and it's fast ish
@KamilaSzewczyk ⎕IO←1?
p←∊∘(⍸10 pco 0 10000)⋄r←1000-⍨⍳2001 ⋄ n←⍳100 ⋄ ×/1↓{⍵⌷⍨⊃⍒⍵}↑{c[i],⍵,r⌷⍨i←⊃⍒c←+/∧\p r+⍤0 1⊢(n×n)+(⍵×n)}¨r
my solution
precomputing primes rather than using 1 pco is miles faster
 
ngn
how can you remember these numbers before pco.. i can't
 
I can only remember 1 (prime check) and 10 (for generating)
all the rest I'll aplcart if I ever need them, which I don't
 
6:36 PM
@rak1507 true
i could have thought of that
 
 
3 hours later…
9:09 PM
I don't know who from Dyalog to forward this to, but docs for Replicate First seem to only be accessible via search - link to them is missing where Replicate is in the tree on the left
 
@MartinJaniczek Same with Expand First. I'll log the issue.
@MartinJaniczek Logged as issue 18817.
 
10:07 PM
Added links to the Dyalog docs to the tool: janiczek.github.io/tryapl-elm
 
10:24 PM
beautiful
 
looks really great
I love the proper docs + completions, makes it so clear, definitely going to be recommending this as well as/instead of the regular tryapl to newbies
 
heh I was going to say I'll use it instead of tryapl
 
The one thing tryapl has that this one doesn't is the learn tab but I've never really looked at it so I don't know if it's any good
 
It definitely has more stuff in the left panel, yeah. My left panel is just an extension of the tooltips that normally are in the language bar at top
I wonder whether it would be worth it to change the mat examples to do mat←3 4⍴⍳12 instead to be more useful when clicking on them
 
00:00 - 14:0015:00 - 23:00

« first day (1463 days earlier)      last day (1192 days later) »