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

10:00 AM
bruh no
 
i was thinking of somehow maybe bringing infinite streams to APL
 
sounds tough
 
but i think it makes little sense given that APL works with entire vectors at once
that would be really cool though
 
otoh ^ +1
 
yeah it would be cool
 
10:11 AM
i was thinking if it may be possible to somehow trap out of bounds writes
 
@KamilaSzewczyk I guess it depends. would be possible, but not or .
 
absolutely
let's assume we have infinite streams, not matrices
obviously won't work, but ⌽⌽ should
 
Wouldn't really matter; matrices are just streams with a predefined stride.
 
it simplifies a lot
 
Maybe begin by splitting the primitives into two groups: those that can work, and those that cannot.
 
10:14 AM
Stream.iterate(1, i -> i * 2).forEach(System.out::println)
this would display powers of two, until a certain limit, then do other unrelated stuff in Java
i was thinking of bringing a similiar thing to APL, where we'd have the generator dfn which takes the last element as omega, and yields the next element
but this is now a concern: Stream.iterate(1, i -> i * 2).map(x -> x - 1).forEach(System.out::println)
 
the problem there is not having scalar pervasion and stuff
 
this shouldn't perform map over entire stream, so we'd have to somehow distinguish between terminal and nonterminal stream operations
 
having 2*⍳infinity would be cool
you can do something like that in KAP
 
for sure lazy evaluation would be awesome
 
10:17 AM
@Razetime Why not?
 
@Adám mostly because it barely resembles my answer
also I will have to rewrite the explanation :P
 
And?
 
that's it
 
Hm, I guess I'll have to post then.
 
it's so sad that functions aren't first class citizens
in terms of moving them around stuff
i can come up with an idea of storing transformations inside some sort of a vector, and then applying them continously when data is requested by a terminal operation
 
10:34 AM
@KamilaSzewczyk You can quite easily make them be. The main issue is syntax for arrayifying them and reactivating/applying them.
 
@Adám uhh i initially chose to take "lambdas" as strings, which i would then eval
but if you have a better idea then i'll surely implement it
 
Look at how it is done in BQN.
Or in K.
Or in J.
 
i vaguely remember some J, i forgot most of it now
hmm
 
I personally prefer BQN's way, at it makes it easier for humans to parse too.
 
since BQN's main implementation is in js , I can probably make a userscript for that as well
 
10:43 AM
if i wanted to allocate a glyph for starting a stream pipeline, which one would it be?
 
until you want to make it async
 
@KamilaSzewczyk ¦?
 
the semiliteral pipe
seems fine
thanks
 
Or maybe $?
 
$ is taken for other stuff
 
10:44 AM
Oh.
 
I like ¦
 
»
 
Not «?
 
or even
@Adám whatever you like
 
@Razetime That's good too.
Also
 
10:47 AM
double forward slash looks classy
 
@KamilaSzewczyk 🚿︎
;-)
 
🏞️
 
You mean 🏞︎.
 
yeah that looks better
 
 
1 hour later…
12:03 PM
      once←{0=≢⍵:⍺⋄((⍎∊'{'(⊃⍵)'}')⍺)∇1↓⍵}
      2 once '⍵+5' '⍵×2' '⎕←⍵'
14
14
      2 {⍺ once ⍵⋄({⍵×2}⍺)∇⍵} '⍵+1' '⎕←⍵'
3
3
why doesn't this infinitely loop?
the second dfn recurses infinitely, so it shouldn't halt
when i remove the ⍺ once ⍵⋄ bit, the code works correctly and throws out domain error on overflow.
 
@KamilaSzewczyk dfns are strange (read: stupid) and return on the first non-assignment statement
usually you either transform the code to use instead of , or do _←…⋄…
 
@dzaima
Illegal code
Illegal code
 
@DyalogAPL ಠ_ಠ
 
oh no.
this is really bad and scuffed, hmm
 
just do ⎕←⍺ once ⍵ and you'll get a stack overflow
that is, if you want to see the result of it
 
12:07 PM
i don't want to clog up the output with this incovation
i'll just assign to whatever
@DyalogAPL i think the bot is scuffed
it searches for the statement separator everywhere in the message, including overlapping matches
it should anchor to the beginning of the message
 
@KamilaSzewczyk it is sometimes used with the code mid-message. But a single-char code block of a diamond shouldn't be caught
 
userscript superiority :P
 
12:24 PM
so in the end, i made this:
 f←{
     blk←{(⍎∊'{'(⊃⍵)'}')⍺}
     once←{0=≢⍵:⍺ ⋄ (⍺ blk ⍵)∇ 1↓⍵}
     op←{x←⍺ once 1↓⍵ ⋄ (⍺ blk ⍵)∇ ⍵}
     0≠⎕NC'⍺':1 op ⍵
     1=≢⍺:⍺ op ⍵
     2=≢⍺:max←⊃⌽⍺ ⋄ (⊃⍺){⍺>max:0 ⋄ x←⍺ once 1↓⍵ ⋄ ((⍎∊'{'(⊃⍵)'}')⍺)∇ ⍵}⍵
 }
example usage: 2 f '⍵×2' '⍵+1' '⎕←⍵'
this is more or less comparable to Stream.iterate(2, x -> x * 2).map(x -> x + 1).forEach(System.out::println)
for now, my roadmap is to allow more operations than just map & for each
it's possible to limit the number of iterations by passing a vector to the left of f, which consists of the initial value first, and the maximum second
 
12:42 PM
It seems strange to me that (⊢÷+.×⍨) is faster than ⌹ for vectors despite them being the same thing
 
 
1 hour later…
2:00 PM
@rak1507 Possible to translate this?
1
A: Interlaced Rotations

xigoiJelly, 19 bytes ³L‘_ ŒJUC;ÇṂḂƲ¦€œịṁ Try it online! Explanation ³L‘_ Auxiliary monadic link ³ The input L Length ‘ + 1 _ - the argument ŒJUC;ÇṂḂƲ¦€œịṁ Main monadic link ŒJ Multidimensional indices U Reverse each € For each ...

 
probably, lets have a look...
 
@rak1507 Oops, I actually meant @Razetime but sure, go ahead!
 
I did wonder why you pinged me!
 
2:39 PM
@Adám looks possible
 
I gave up trying to understand the middle bit
 
that explanation format is weird
xigoi just came up one day and just decided to be a god at Jelly
 
2:56 PM
Morning everyone, a question: why isn't this valid in Dyalog? (1 2 3) (2 3 4) ∘.⌽[1] ⊂3 3 ⍴ ⍳9
 
why use ?
 
In order for it to work you need parens around the right operand: (1 2 3) (2 3 4) ∘.(⌽[1] )⊂3 3 ⍴ ⍳9
It's just an example
 
Simpler:
      (1 2 3) (2 3 4) ∘.⊖⊂3 3 ⍴ ⍳9
┌─────┬─────┐
│4 8 3│7 2 6│
│7 2 6│1 5 9│
│1 5 9│4 8 3│
└─────┴─────┘
 
To my knowledge, there should be no ambiguity about what function the axes are applied to, the outer product operator cannot produce a function taking axes
I know you can do that, my specific question is why you can't have axes applied to that function without wrapping it in parens
 
@phantomics Brackets in Dyalog are handled like an operator, except in special cases. Possibly no one considered that example. I know I haven't seen it.
 
3:00 PM
Right, they're technically an operator
The code without parens works in April, and the implementation wasn't particularly hard
A difference between April's model and other APLs is that April doesn't consider axes to be an operator, rather they're a way to pass extra arguments to a function or get indices of an array
 
@phantomics I don't think Dyalog defines brackets to be an operator (then +(/[1]) wouldn't make sense, but Dyalog supports it). They're just implemented as an operator.
 
Something else: when I enter 1e6 in Dyalog, it displays integer 1000000. Is this an actual integer? When a user's entered e-notation values can be represented as integers instead of floats does Dyalog implement them as integers? I can do things like ?1e6 when ? can't take floats as args.
 
@phantomics To the end user, an APL is supposed to treat numbers as numbers and characters and characters - the APLer isn't supposed to care (as much as is reasonable) about the inner workings of the machine
@phantomics At certain times, Dyalog will squeeze data into the smallest type which can represent the data while maintaining precision
 
@phantomics Semantically Dyalog only uses (complex) doubles (ignoring decfs and ⎕FR). It's allowed to reencode a double as an equal int at any time. Functions that only accept integers actually allow near-integers, so they're definitely defined on floats.
 
@Marshall Makes sense, that's why there are things like ⎕ct and other things to control epsilons
 
3:16 PM
@phantomics I think most of those conversions actually use a fixed tolerance and not ⎕CT (which is mainly for controlling tolerance when the user calls or dyadic or something like that). Hard to remember what uses which method though.
 
@phantomics Is there any reason you keep the anomalous ∘. syntax?
 
@Adám What anomalous syntax?
 
Normally, you can never have two dyadic operators in succession / an operator cannot take an operator as operand.
 
∘. is not taking an operator as its operand in the example, it's taking ⌽[1] as its operand
@RikedyP That's the impression I've had from APLs, it's interesting that a programming language that's considered so "hardcore" has features that abstract number representations for the user. I usually think of that as something you'd find in languages like Javascript or Basic
 
@phantomics But what is ∘.? One operator or two?
 
3:20 PM
@phantomics APL is not A Programming Language - it is an executable mathematical notation for expressing algorithms. Dyalog on the other hand...
 
@Adám In April, ∘. is actually not an operator. Technically, the ∘ is considered to be both the [∘ compose] operator as well as what's called a symbolic function, the symbolic function ∘ has no purpose other than to signal to the . operator that it should function as an outer product operator rather than inner
But in Dyalog I understand ∘. is a single operator
 
@phantomics So can a user defined operator also take as (left) operand?
 
@Adám That would cause a bug, the implementation of ∘. in April uses a special case in the compiler, but it's possible I could make that work
I'd have to come up with syntax for checking that ⍺⍺ is ∘.
 
@phantomics "special case" = "anomalous syntax", no?
 
In most APLs, ∘. is a special case of an operator that is more than one character long, which I consider to be significantly more anomalous
 
3:25 PM
@phantomics The programming community's impression of APL is way off here—the design always been focused on ease of use and not how well it matches the hardware or anything like that. Even APL\360 had a single numerical type, as well as other features like the interactive session that were radically user-friendly in the 60s.
 
@phantomics In Sharp APL, was "ace" or ⊂⍬ which was treated equivalently to a 0 by the completely normal dyadic . operator. But the symbol wasn't overloaded as a dyadic operator. I'm asking why you're keeping this anomaly alive, when good alternatives exist.
 
I think the fact that APL often fails badly in user-friendliness these days is due more to a lack of imagination on the part of APLers than lack of interest.
 
@Marshall I understand, it works well when you're working entirely within an APL environment, in my cases I'm often doing things with April where the numeric output format is important, like when I'm saving a .png image I need an array of 8-bit ints
 
@phantomics It should be up to the png-creating function to represent the given numbers using 8 bits each.
 
@Marshall APL has a similar problem to Lisp: during the late teletype/early video terminal years, it allowed users to build a set of interface tools so powerful and comprehensive they felt no need to create anything else for decades, and over time better interface paradigms were applied by vastly inferior languages
 
3:29 PM
@phantomics I don't think that's really right: you need to convert numbers to an 8-bit representation for storage, but that doesn't mean you need a special kind of number that only ever uses 8 bits.
 
@phantomics Are you aware that ∘.f≡f¨⍤0 ∞ ?
 
@Adám Interesting, so you're saying that ∘ was treated as a value in Sharp APL and was interpreted by the . operator in that context?
 
@phantomics Yes, it was done so the otherwise anomalous syntax became regular.
 
@Marshall What I'm doing isn't implementing types in APL like k does, rather April generally chooses a type for arrays that's efficient, like the output of ⍳ will always be an integer array. I do have a function that coerces arrays to a particular type and fails if that's not possible
 
@phantomics I don't think APL had exactly the same problem as Lisp (it's certainly not as extensible, which is usually considered the cause of the Lisp problem). APLers kept building new systems through the 80s at least, but they failed to apply techniques from other languages that they could have used because they were convinced non-APL programmers didn't know anything.
@phantomics Is that actually different from Dyalog's system?
 
3:34 PM
The function is called ⎕T for type, you can enter 3 ⎕T ⍳5 to convert the vector to 8-bit integers. A 3 on the left argument means convert to integers with width of 2^3
@Marshall You just said that Dyalog uses doubles for everything
 
@phantomics Semantically. There are many internal types though.
 
@Marshall I'm talking specifically about the interface paradigms for the languages. Lispers have relied on Emacs forever, which is quite powerful but has clunky keyboard commands and has a lot of teletype legacy limitations since it was one of the first video terminal apps. APL's UX also feels a lot like a mainframe terminal, since APL devs came up with such a powerful mainframe UX they never felt much need to change it. Both languages are kind of stuck at a local maximum for usability.
 
Sometimes I'd really like to see the Dyalog C/... source. I'd probably run away screaming afterwards though :)
 
@MartinJaniczek It's nothing like Whitney's code, if that's what you're thinking.
 
Is it historically correct to say that APL was the first programming language with a "reduce" concept?
 
3:40 PM
@Marshall Ok, that's what I thought before, my system is similar to Dyalog's then
 
@Marshall No no I didn't hint think of that (although I know what you mean), but it's probably going to be hairy nevertheless. All the vectorization bit optimizations I don't understand from the Dyalog conf videos :)
 
@xpqz I think so. I did some research on this before and the earliest other language I could find was Lisp, which added fold in the 70s.
 
@xpqz I've also heard of Lisp as being the first
 
@Marshall The idea being that it was part of APL from the first version, which was computerized in ....checks wikipedia..... 1965?
 
@MartinJaniczek It was in Iverson's publications before that. I think he even coined the term "reduction", but I can't find any hard evidence of this.
 
3:46 PM
Right, I just wanted to write that you could argue that the language existed before being runnable on a computer, so the term could be dated further back
 
The / notation is in The Description of Finite Sequential Processes but he doesn't call it a reduction. He says the domain is "any associative binary operation" though.
 
@Marshall @dzaima i think i figured out my perf issues :) i rewrote library having the "full picture" (more or less) in my head and its waaaaay smaller, more direct, and is much more idiomatic erlang.
turns out if you rewrite something 30 times it gets better
2
 
@Adám Did Sharp have an equivalent for the [∘ compose] operator?
 
@Adám I got the indices, but they're negative
      {{(1∘-)@(1+~2|⌊/⍵,(1+≢w)-⍵)⊢⍵}¨⌽¨,⍳⍴w←⍵}↑⎕JSON↑'["123","456","789"]'
┌───┬────┬────┬───┬────┬────┬───┬────┬────┐
│0 1│¯1 1│¯2 1│0 2│2 ¯1│¯2 2│0 3│¯1 3│¯2 3│
└───┴────┴────┴───┴────┴────┴───┴────┴────┘
 
@Marshall @phantomics thanks!
 
3:52 PM
just need to convert to normal indices and index
 
@Marshall So A Programming Language has the first use of the term "reduction" I can find, and it's the first to choose a direction (left to right!) making it apply to any function. But it was a long time before it was allowed it on functions other than primitives.
@phantomics List of operators here: doesn't look like it. SHARP did have Atop and Over, but they're the "close" forms that work at the rank of the right operand.
 
@Adám ported:
      {(⍴⍵)⍴⍵[{((≢w)∘+)@(0∘≥)⊢(1∘-)@(1+~2|⌊/⍵,(1+≢w)-⍵)⊢⍵}¨⌽¨,⍳⍴w←⍵]}↑⎕JSON↑'["123","456","789"]'
741
852
963
 
@Marshall Thanks, I'll consider if there's a way for ∘ to be a "regular" operand for . while also allowing it to be read as a pivotal operator. That's kind of a problem if it's interpreted as a value like ⍬ is
 
would be shorter with 0-indexing
 
@cannadayr Nice! I'm happy to look over it once you push a copy.
 
3:59 PM
@Marshall yep i should have some time today. i want to get written permission from my company before anything goes public (ive gotten verbal permissions from manager but want things on the up-n-up).
 
@phantomics Well, making ∘. be a case of . isn't really any easier to understand from the language user's perspective, so I wouldn't say it's too important to change anything.
 
@Marshall Yeah it's no different from the user's perspective, ∘. works like it always has
 
(I mean, if I were you I'd rip everything up and pick out a bunch of new symbols, but I'm me and I did do that.)
 
I think I would just not have outer product, rank is good enough
 
@Marshall I'll be delving into BQN soon, been meaning to get an idea of your approach with it. One difficulty, which you can't do much about until you get a custom font designed, is that some of the characters don't look like they're designed to be used together the way APL's do
Like the triangular braces look more thin and spidery than the other letters, whereas APL's characters in the APL fonts look more harmonious in terns of design since they were all originally on the same type ball
 
ngn
4:06 PM
@phantomics have you seen its definition in "a dictionary of apl"?
 
@ngn No, just looked it up, "the boxed empty list"
 
@phantomics I haven't felt that ⟨⟩ are out of place—certainly not any more than {}. Which font are you using?
 
@Marshall PragmataPro, for programming and for my browser's default monospaced font, I don't recall if another font was set for use on the BQN pages
 
@phantomics BQN's pages embed my extended DejaVu Sans Mono.
 
@Marshall I see, I can speak to it in more detail when I get around to going through the BQN tutorials
 
ngn
4:12 PM
@phantomics see also adam's summary of that
 
@ngn Neat thanks
 
@phantomics Hm, from the giant image of all Pragmata characters the angle brackets actually look a little heavier than parens to me.
 
@Marshall I just pasted some strings from your docs into a PragmataPro Emacs window and the characters look pretty good, the doublestruck letters I also use internally in April. PragmataPro could be a good choice for the language
 
Other than being terribly expensive…
 
4:31 PM
@Adám The price for me is easily worth the added comfort and productivity, I wouldn't make it a requirement for adopting a language though
 
what we rly need to do is get the unicode consortium give bqn its own unicode range
 
They already create chars for every silly thing imaginable
Having emojis in unicode was a huge mistake, there was so much more artistry to it when people had to build them out of regular chars
 
4:47 PM
@phantomics It is also incredibly dangerous as it introduces uncertainty into what the recipient will actually see, not to mention all the controversy about skin tone and gender…
 
I don't see how a font can really make a huge difference, to me it doesn't really matter all that much how a character looks really
 
@rak1507 I think the default RIDE APL font works quite nice for how APL usually looks (not a lot of breathing space, lot of stuff happening on a line). I thought about using it for my other programming (Elm) but I think a condensed-width font like Iosevka works better there for me (y'know, with normal-length variable names and so on)
 
I honestly have never paid any attention to what font I use, not sure what font RIDE uses but if it's the same one as what the windows IDE uses, it seems fine
 
Who is interested in using TryAPL API to develop e.g. a mobile app or better mobile experience and/or their own whatevers (it's a JSON API)?
@MartinJaniczek I like FairFax HD
 
@RikedyP I'd be interested in looking at that API and trying to experiment with some interface around that
No promises wrt. how much time I'd be able to give it though :)
 
5:02 PM
@MartinJaniczek Well the more the merrier, but also how is your JS? I'd like someone to tell me how to clean up my examples. Either way, drop an email to rpark@ and I'll send you some preliminary draft materials
 
@rak1507 "I'll shoot you :pistol:" makes a HUGE difference whether the displayed pistol is a colourful space water gun or a realistic firearm.
 
@Adám Best to leave firearms alone entirely in a space which is open to interpretation
 
@Adám I meant in the context of programming, but even still, the intent should still be clear
 
@Adám yeah 🙂🔫 doesn't have as much punch when it's just a water gun
@RikedyP I know JS but don't write it much. Could review your code though. I'll send you an email.
 
5:37 PM
Hahaha the "modern pentathlon" emoji
Multiple arrests and imprisonments for pistol, knife and bomb emoji
 
ngn
@RikedyP america? :)
 
@ngn America? I hardly know her
 
ngn
@RikedyP it's a space open to interpretation and it's got firearms
 
@ngn I understand. I also think it's a bad idea there too.
 
6:37 PM
Are there twitch-style videos of people solving real world tasks with apl/j? Asking because I’ve had lots of fun using J in Advent of code etc, but I’m struggling to see how it’s useful in more practical contexts. At work I spend all day writing micro services or glue code in Go, so I’m not expecting apl being a good candidate here, but it would be good to see how apl folks actually use apl
 
6:49 PM
@pitr i think theres a fewer short videos on youtube, but not anything like live coding (that i know of) but i think it could be neat
 
7:02 PM
@pitr Hm, I guess I could invite you to "look over my shoulder" while working, though much of what I do is "meta" in that I work on tools for people that write actual applications…
 
@Adám that would be super interesting!
 
Maybe I should host "open house"/"doors open" days when I know I'll actually be working on real APL stuff.
I'll take it up with management. I also have to watch out not to show any customer information, passwords, or proprietary code…
 
I think it’s a neat idea. Nothing proprietary as you say, but would be really good to see how you tackle problems
 
yeah sounds interesting
 
7:21 PM
honestly, i'd like to see that too
so far i treated APL as a potentially good language which is currently being wasted, hence useless for most applications i could think of
but maybe i'm missing something
i find it kind of ridiculous that you can spend 20 years on fixing a single interpreter bug, and the community is shattered like glass
there's Aaron's co-dfns, but without an open source interpreter this project is potentially much worse than it could have been
 
I could do some Bloxl/April streaming sessions
 
it always seemed weird to me that arthur whitney and dyalog people were so greedy to close down the interpreter source, instead of taking, for example, redhat approach on that
a.k.a. interpreter free & OSS, support and stuff paid
the only good reasoning I knew for closing down K/shakti/virtually any better APL implementation was probably the fact that people would start adding own builtins as they fit, making a million editions of the same language
but this reasoning is kind of horrible, because we have a few (unfortunately inferior, most probably, to dyalog APL / whitney's K) interpreters, and so far no serious fragmentation happened.
 
RGS
@Adám That would be very, very interesting.
 
8:02 PM
@RikedyP Tried a little experiment from a different language than JS. Works pretty nicely :) ellie-app.com/c7QzKBs45Mfa1
@MartinJaniczek @Adám it's a pity the APL386 font has different character widths for bold and regular weight. It no longer lines up (the premise of a monospaced font) when the two weights are next to each other.
 
ngn
0. whitney and dyalog are not on the same level
1. it's capitalism now, they are commercial companies, by law only liable to shareholders, they cannot _not_ be profit-maximizers
2. multiple editions of the same language shouldn't be a problem - making tools of thought is not only for the privileged. i think wasting resources is more of a problem.
3. the free software community itself is partially to blame for the fragmentation. the stream of started-but-not-finished k/apl implementations never ceases, and everyone seems to prefer writing a new one of their own, in a dialect of their own, in
 
@MartinJaniczek The font doesn't include a bold, so that's entirely the browser's doing. Try ellie-app.com/c7QJgnsmMBma1 instead.
 
@ngn Number 1 is questionable even for publicly held companies, but Dyalog and Shakti are privately held and definitely don't have that requirement.
 
@Adám Ah, that would explain it. Nice trick with the shadow.
Hm I have some weird interaction between the language bar and Elm's "input" event handler. It doesn't fire when inputting a character via the LB (in any way - backtick, clicking, ...). I'll need to go look at how the language bar is actually doing the inputting :)
 
8:23 PM
@ngn 2 - i don't think Dyalog/shakti being open-source would change much about the amount of reimplementations. 3 - it's kind of hard to achieve something that's not a goal (and doesn't really have a good reason to be)
 
My understanding is that most APL implementations are for the sheer experience and increased understanding that comes with it.
 
IMO crunching languages is much funner than crunching numbers
 
8:41 PM
APL seems ridicuously hard to parse
 
@KamilaSzewczyk 2 (⍎(?2)⊃'+3') 2
 
@KamilaSzewczyk You can't parse it statically. For example APL seems ridicuously hard to parse might be a valid expression in various programs and mean completely different things.
 
some languages just give up, embrace their dynamic nature, and can only be tokenized
 
no clue, it just seems like a really scary and delicate task
i can't wrap my head around parsing APL, but i have written parsers for a lot of languages before
 
@ngn I agree with your points but it's not as if you've made ngn/k very friendly to people who would want to contribute
 
8:44 PM
@Wezl forth, APL, Rebol ...
 
@KamilaSzewczyk if you ignore returning functions and assume that you know the type of each variable, it's not that difficult
 
ngn
@rak1507 it doesn't have to be code
 
@Wezl I wrote a pseudo-forth thingamabob and the lexer was literally .split(" ")
 
@ngn well what else?
 
ngn
@rak1507 bugs, docs, ideas, ui, integrations, spreading the word..
 
8:49 PM
fair enough
 
what are the general guidelines on writing an APL interpreter? is there a writeup on common optimizations, parsing methods?
 
<moon-child> @KamilaSzewczyk the j interpreter is opensource and quite performant (though I understand it's fallen behind dyalog recently)
 
@ngn docs are a daunting task, but there's plenty if you know where to look. This chatroom is full with ideas constantly. It's kind of hard to make integrations for The Perfect APL when it doesn't exist, nor submit bug reports to one
 
yeah i've read the J wiki entry about special combinations
 
moon-child: code_report is working on converting it to C++20…
 
8:52 PM
<moon-child> ...why???
 
because he is mad and naive and thinks macros are bad
(sorry if you're reading this)
 
Ask him.
 
<moon-child> @KamilaSzewczyk there is this jsoftware.com/papers/AIOJ/AIOJ.htm. I started work on an interpreter of my own a while ago and can share some advice on things not to do :P
 
watching him tear out all the optimisations hurts my soul
 
@rak1507 lmao
it's literally impossible to make an elegant APL interpreter, as far as my APL understanding goes
 
8:53 PM
apl_interpreter ← ⍎
 
<moon-child> jsoftware.com/books/pdf/aioj.pdf maybe this is an easier-to-read version of aioj
 
@DyalogAPL sure, i'll take it all
 
@KamilaSzewczyk Maybe go the BQN route and require a strict naming convention which makes a static parse possible?
 
<moon-child> I would not do evaluation the j interpreter does it fwiw. (My interpreter follows the j way, and that turned out to be a mistake.) You get a ton of dispatch penalty for dfns, and it's harder to do top-down sorts of analysis
 
@KamilaSzewczyk you tokenize (probably match parentheses too while at it), and parse dynamically. I like to refer to this about how the dynamic parsing works (in short, you evaluate each thing left-to-right, and decide what to do from the last 4 things on the stack)
 
8:55 PM
i ultimately want to make a fully functional APL dialect, with no OO or imperative leftovers
 
<moon-child> static parse is not hard even without quotation (bqn route). Establishing class is fairly easy as longa syou don't allow ⍎'+'
 
@KamilaSzewczyk Functional as in FP or function as in "working"?
 
FP
i don't plan to allow eval
 
@Adám those are equivalent, right?
 
because i was first concerned about it, but then i just decided to boot it
 
8:57 PM
@dzaima (and how that's done in dzaima/APL; though if you want functional, you best should go with something statically parsable)
 
@KamilaSzewczyk Sounds like BQN. Doc on FP.
 
moon-child: How can you allow an operand to be both an array and a function and still do a static parse?
 
ngn
confusingly FP is the programming language that pioneered function-level programming (the kind of tacit thing J does a lot), which is very different from functional programming :)
that's why i try to avoid abbreviating "functional programming" as "FP"
 
<moon-child> @Adám well, you can't. You can't do that even with dynamic parse unless you allow quotation, like bqn
 
Hence my conclusion that what BQN does is a good idea.
 

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