« first day (2364 days earlier)      last day (299 days later) » 

12:33 PM
 
1:00 PM
@RubenVerg I believe (∨/∊⍤(⍵⍷¨⍨⊢))¨ can be written 1∊¨⍷¨∘⍵¨
And (e⍉)¨(e←{⍵/⍨∨⌿0≠⍵})¨ as (e⍤⍉e←{⍵/⍨∨⌿0≠⍵})¨
And {4 4⍴⍵⊤⍨16/2}¨⍳2*16 as 4 4∘⍴¨,⌿2⊥⍣¯1⍳2*16 if you use ⎕IO←0
 
all these are intuitively correct, I just have to wait five seconds to test it every time :)
@Adám no this one doesn't work
indices returns an empty vector
@Adám why do I need 0 io here?
 
Because otherwise we generate from 1 to 2*16 which takes 17 bits to represent. Your 16/2 chops the top bit.
 
actually what's that code doing in the first place, what does ,⌿ do on a list of scalars
@Adám wouldn't your 4 4∘⍴ also chop the top bit?
oh no it chops the bottom
 
@RubenVerg It isn't a list of scalars, but a matrix with one number represented in each column, so ,⌿ catenates each column to a vector, giving a vector of vectors.
 
oh sorry I thought you had an Each between inverse decode and iota
 
1:11 PM
That wouldn't work, as it'd strip leading 0s.
 
I think I don't really care if the 4 4⍴0 matrix doesn't appear, but I might care about another appearing twice
@Adám yeah that was why i was confused
 
@RubenVerg Oh, missing an enlist: 1∊∘∊¨⍷¨∘⍵¨ or 1∊¨∊¨⍷¨∘⍵¨
Three different epsilon eaches :-)
 
thanks for the help, dropped 7 bytes
just need to run all the possibilities again because the order of things has changed
 
If I'm not mistaken, {⍵/⍨×+⌿⍵} does the same as {⍵/⍨∨⌿0≠⍵} since you stay with non-negative integers.
 
ah yea this is one of the things aplcart taught me by heart and then i never questioned
 
1:39 PM
@RubenVerg afaict, you only ever use the argument once, in ⍷¨∘⍵ which means you could convert to a tradfn body, replacing with and saving the outer braces.
 
2:00 PM
Trying to simplify {({(⍳∘(⌈/⍵))⍵}|+\(⍵-(+/÷≢)⍵))⌷⍺} from youtu.be/SlA_T91gS6s?t=3003 - is {⍺⌷⍨⊃⍒|+\(⊢-+/÷≢)⍵} the best you can do?
That seems really inefficient though - should probably do {⍵⍳⌈/⍵} instead of ⊃⍒?
Oh hey look, it's a Y f g Y pattern!
 
Or (⊢⍳⌈/) but yes. We did have ⊃⍒ and ⊃⍋ optimised, but had to back that out because we didn't trust its quality.
@rabbitgrowth Yes, but an operator couldn't help you there because ⊢⍳Ø⌈/ would bind as ⊢(⍳Ø⌈)/
 
Why would you need the there?
Not sure how I missed ⊢⍳⌈/, kept on trying to do it as ⍳∘(⌈/)⍨
@Adám Interesting, I thought it'd just be like s/⊃⍋/{⍵⍳⌊/⍵}/ like RubenVerg said
 
Yes, but iiuc, it was one of a very large number of optimisations done by a single developer, several of which turned out to have faults. So we ripped out all this person's optimisations, adding them one-by-one, carefully.
 
Ah I see
Better safe than sorry
 
2:16 PM
As an anecdote, this explains our odd version numbering: 17.1, 18.0, 18.2. The 18.2 is actually a 17.2 because 18.0 was abandoned due to those optimisations being so widespread.
 
@Adám this sounds like a variation of the classic cheater dilemma - if you find evidence that some person"s feats were cheated, do you claim they're all cheated and then analyze each to deicide if they're genuine or do you keep them and analyze each for cheating?
 
@rabbitgrowth E488: Trailing characters: ⍵}/ :(
This optimization stuff is really interesting. Do you actually substitute APL code with faster APL code for the optimizations? I thought they'd be done in C or something
 
I think every instance is in C. It could be done using APL, though.
Btw, you can't just substitute ⊃⍋ with {⍵⍳⌊/⍵} as the latter ignores a left argument and can be an operand. ⊃⍋ with a number on the left picks the nth first, but cannot be used with an operator without composition/training.
 
@Adám that evals it only once? I can never remember the side effect rules with composition
 
Yes, the is evaluated once when first met.
 
2:29 PM
does (quad plus right) each arr call quad multiple times?
 
No, it gets input and then builds the train, which is then applied.
 
@Adám Yeah, surely you can't just literally do a search and replace like that
 
Oh right, {⍵⍳⌊/⍵} has a very limited domain (reals), whereas ⊃⍋ works on almost every type of data.
 
@Adám surely ({quad}plus right) each are asks multiple times?
 
Yes, that would.
 
2:39 PM
and that's because a lone quad is parsed as (A g h)?
 
Not necessarily:
      (⎕,⊢)¨1 2 3
⎕:
      -
┌────┬────┬────┐
│¯1 1│¯2 2│¯3 3│
└────┴────┴────┘
 
oh I thought quad took only nouns
parsing modern apl looks so hard
 
Basically impossible:
     ⌽⎕'abc' 'def'
⎕:
      'xyz'
┌───┬───┬───┐
│def│abc│xyz│
└───┴───┴───┘
     ⌽⎕'abc' 'def'
⎕:
      ⊃
cba
     ⌽⎕'abc' 'def'
⎕:
      ¨
┌───┬───┐
│cba│fed│
└───┴───┘
 
is there a decent way to force quad to be a noun/verb/modifier?
 
No, but you really shouldn't use in production. Use instead.
 
2:47 PM
decode jot (can't remember the name) only returns nouns, right?
oh I was also thinking about something, why was Circular chosen to be a dyad instead of an adverb that returns a monad?
 
@RubenVerg Execute can return the same as which is basically ⍎⍞
 
execute is also not a normal verb??
 
@RubenVerg 1. Because adverbs (monadic operators) didn't exist at the time when was designed. 2. because it allows useful things with outer product etc.
 
yeah no I think I'll keep the behavior I had expected from Dyalog in my dialect
 
@RubenVerg No, it can do fun stuff:
      1(⍎'+2'[?2])3
4
      1(⍎'+2'[?2])3
1 2 3
      1(⍎'+2'[?2])3
4
      1(⍎'+2'[?2])3
1 2 3
      1(⍎'+2'[?2])3
1 2 3
 
2:53 PM
@Adám I was trying to think of when you could need to dynamically modify the left argument to Circular, I guess Table makes sense
@Adám thanks I hate this
 
The design of enables doing thing like rotate an vector
 
@RubenVerg Me too. Super useful, though, when a variable specifies which function to call.
 
docs for execute don't really say it can return non nouns
I guess "expression" includes verbs and modifiers
one example of that could be nice though
 
Maybe better not to tell people? ;-)
 
@Adám What should the "correct" behaviour be?
 
2:58 PM
I don't have access to a standard Dyalog install on mobile, but tryapl's execute doesn't do what the docs say (though I'd expect it to be custom implemented to maintain the sandbox)
 
The "real" execute does return function trains
 
@rabbitgrowth This seems correct, no?
 
Meta programming!
CL-USER> (april:april "1(⍎'+2'[?2])3")
#(1 #<Anonymous Function #x302002C104EF> 3)
 
Yeah it does, but you said you hated it, so I thought there was something wrong or bad with it
 
lol this is kinda expected
 
3:04 PM
@RubenVerg Right, it can't output. But 1(⍎'+2'[?2])3 does work.
@rabbitgrowth I can hate something that's correct ;-)
 
does {⍎'⍨'} not work or does it do something weird like become a dop
 
@RubenVerg dfns cannot return functions or operators.
 
3:25 PM
I'm starting to doubt everything I know :)
I can kind of accept quad allowing non-nouns (if I start thinking about it as a special name and not as a niladic function)
but the verb execute returning a conjunction is just too much
 
You can write your own tradfn that returns a function or monadic operator too.
 
why only monadic operators?
 
Not sure. Much of this stuff seems haphazardly designed at best. Or maybe it just fell out of the implementation.
 
to me it sounds like implementation details leaking through (egthe result of the function is whatever was assigned to the return variable)
Todos,←todo "Consider if I want to do the weird stuff Dyalog does with Execute"‿Priority.Medium
 
 
1 hour later…
4:53 PM
From my search, it seems like the last conversation about this topic here was about 5 years ago, so... since then, has there been any development (or at least serious discussion) about APL/BQN and game development?
From what I've seen, the best bets right now would be using stuff like Py'n'APL with Pygame, or Lua*APL with Love2D, or some Rust + Game lib + BQN hackery... which could work but doesn't seem promising
 
 
2 hours later…
6:49 PM
I was working on a port of olc/pge for dyalog
I had some issue I can't remember though
 
7:26 PM
@AndréLeria Stormwind is the only notable entry.
 
Hmmm does it still exist? I can't find anything by searching "stormwind apl", "stormwind bqn" or "stormwind gamedev"
 
I'll check, thanks
 

« first day (2364 days earlier)      last day (299 days later) »