« first day (1336 days earlier)      last day (1311 days later) » 

ngn
1:30 AM
@Bubbler why catch the error? are you supposed to return anything when you encounter an undefined variable?
 
@ngn A single uninitialized variable is a valid statement.
 
ngn
@Bubbler i see. thanks.
@Bubbler why not n←# (without salt) instead of n←⎕NS⍬?
it could be even {#⊣{0::0⋄#⍎⍵}¨⍵}
 
1:47 AM
It's technically correct I guess, but testing it on TIO would be somewhat weird (since I'd need to copy the function all over the place and )clear after each test case)
Also I like the clarity of the current solution.
 
@Marshall another thing that might be helpful is a few test targets of raw bytecode samples. also btw going w/ the earlier interpreted vm for now
ah nvm found it same file
 
@cannadayr Do you have src/cjs.bqn working (I guess that follow-up comment means yes)? If so, getting a test target it as easy as $ src/cjs.bqn "1+1". It's much better to be able to modify the test code so I'd rather not provide any fixed bytecode that would be harder to change.
And yes, I'd implement the VM as an interpreter first on any platform.
 
 
4 hours later…
6:12 AM
@Bubbler Calls for adverse: ⌻←{⍺←⊢ ⋄ 0::⍺(⍵⍵⊣⊢)⍵ ⋄ ⍺ ⍺⍺ ⍵}
 
Yeah, right.
@Adám What is (⍵⍵⊣⊢) for?
 
@Bubbler So you can give adverse a constant right operand. E.g. ÷⌻42 would give 42 upon div-by-zero errors.
 
Oh, neat.
 
I should add this to Extended.
@Bubbler Btw, see J's
 
I'm well aware of that (and its name).
 
6:22 AM
Oh, then why were you wondering about ⍵⍵⊣⊢?
 
Well, somehow writing down ⍵⍵ makes me think it's a function...
 
I was a bit surprised when I found I needed ⍵⍵⊣⊢. I thought the new ⍵⍵⍨ would do, but nope.
 
⍵⍵⍥⊢ would almost work, only if accepted a constant left operand
And allowing constant left operand sounds like a sane choice for Depth, so why not Over...
 
My original proposal was to treat constant left operands as constant functions for all of just like @ does. (Oh and for too.)
@Bubbler Ah, Over, right, I was thinking Depth. Never thought of that, but sure. That would kind of obviate the need for Constant…
 
(Meanwhile, ⊢⍤⍵⍵ won't work because constant right operand for makes it Rank)
 
6:38 AM
Yeah, if I was to start over (BQN…) I'd make a rule that operators treat constant and function operands the same. (I.e. the function computes the corresponding constant/the constant is treated as a constant function.)
 
Agreed. Overloading a single symbol for not-so-related jobs is only a thing for golflangs.
 
I only proposed continuing that trend because the ship had sailed: (and to a lesser degree and @)
@Bubbler And K ;-)
 
Well, if we count monadic/dyadic functions, all of APL/J/K count as golflangs
and maybe Python :P
 
6:56 AM
is there a difference between ⍵⍵ and ⍵ ⍵?
 
@Razetime ⍵⍵ is the right operand (and its presence makes {...} a dyadic operator), while ⍵ ⍵ is two copies of right argument.
 
side note, that last one is impressive
 
7:12 AM
@Razetime Did you try running (and understanding!) them all?
 
7:23 AM
yes I did
you get 24 through a few operators, stringify and reverse at the end
then fill in with a billion nops
 
Do you get how it creates the value 24?
(I just realized modern and traditional get the 24 in the same way)
 
yep
i tried it a symbol at a time
the short version is pretty cute
 
 
2 hours later…
9:34 AM
@Adám Your bounties entered the grace period
 
Thanks for the reminder. Will process now.
 
 
3 hours later…
12:51 PM
@Marshall pushed changing "fmd" to 0 1 2
(next up i'll probably switch from using (FN[12]|TR3)O to separating the cases to synthetic headers at compile-time; should probably also think about finally adding non-0-depth LOC_ usage (but that'd still leave VAR_ for s (speaking of which, is there some reason i didn't implement •← with a VARM? ._.)))
 
1:46 PM
@dzaima Cool, adjusted on my end.
@dzaima Don't know if you noticed but the spec currently says a right argument of Nothing means the entire function expression doesn't get evaluated, including the function and left argument. I'm going to change it so all the parts are evaluated but the function isn't called to match the interpreted behavior that both implementations have now. So don't try to match the spec.
 
@Marshall ah, thanks for the heads-up. (i did remember that being the case, so i would have implemented it)
 
 
2 hours later…
3:59 PM
@Marshall briefly read part 2 last night and it seemed like a good guide for porting a vm.
answered a lotve latent questions
 
4:59 PM
In the BQN VM, what are the long arrays full of numbers doing?
 
@TessellatingHeckler Those are bytecode, compiled from programs in src/.
Just wrote up a description of what runtime, compile, and fmt1 are doing.
 
@Marshall I have been glancing through that, trying (not too hard) to follow what it's doing
One of the Advent of Code problems from a year or two ago included building a stack language interpreter, and I made one which converted to .Net instructions and ran them, I was trying to gauge if I'd stand any chance of running BQN bytecode with a similar approach
 
@TessellatingHeckler dzaima/BQN compiles to JVM bytecode
 
@dzaima indeed
that's dozens of files, class hierarchies, source code compiler, and I have no recent familiarity with Java, the JVM or any Java tooling
 
if you ignore src/APL/types and src/APL/errors (and also src/APL/tokenizer/types which are a bunch of tiny classes), you're down to "just" 15 files for the "core stuff". src/APL/Comp.java is the main tokens→BQN bytecode part, and src/APL/tools/JComp.java is the BQN bytecode→Java bytecode part
 
5:12 PM
And the bytecode's the same as self-hosted BQN, so you can use that compiler and only worry about JComp.java.
 
@TessellatingHeckler assuming C#, there's really not that much of a difference (as in, it's within the somewhat automatically transpilable territory). And as for the bytecode part - you know as much as i did before i wrote JComp.java (and you also have the advantage of knowing some bytecode-ish stuff before too)
 
it's just that the javascript vm interpreter is 200 lines, and that feels a lot more approachable than "just" 15 files where one of them is 1300 lines and another is 800 lines, y'know? and I have browsers and probably node installed already
just JComp.java, that's interesting
 
@TessellatingHeckler Nothing preventing you from writing an interpreter and then changing it to a transpiler later. That transition is pretty easy to do.
 
RGS
I have a random technical issue: just recently I bought a monitor and when I set the dyalog terp to full screen on that monitor everything feels slightly blurred
 
@TessellatingHeckler not that i expect you to use/look at any of my code. You just asked whether it was possible, and i noted it definitely is
@RGS OS/resolution/OS scaling/does it happen anywhere else?
(i assume windows & non-RIDE IDE because RIDE should really work just fine)
 
RGS
5:22 PM
@dzaima not the blurring. e.g. the tabs on firefox are fine and so are the VS Code panels
@dzaima the assumptions are correct
to whom it may concern: under Options > Configure I have the "Enable DPI scaling of the interpreter and dev environment" set and the "Enable DPI scaling of GUI application" was not. I tried setting the second one and it didn't work. Unsetting both fixed it
 
@RGS Try setting the second one, but leaving the first unset. Does that also fix it?
 
RGS
@Adám yes it does
but the shading makes it look like the way the 2nd one is set doesn't matter when the 1st is unset, right?
I just unset both because I wanted to leave the 2nd like it was when I started fiddling with it
 
@RGS Good. Just checking.
@RGS Good question. Can you ask johnd?
 
RGS
@Adám sure..? I do not have an actual question, I was just asking you if you were expecting something else to happen :P
But I can email johnd if that is necessary for whatever reason
 
@RGS Well, I'm kind of interested in whether one can (or is so supposed to be able to) have an unscaled IDE and a scaled app.
 
5:43 PM
@dzaima ah yes, no, I appreciate the link and pointers into dzaima/BQN, I do! It's not that I was asking if it's possible in general, it's that I was trying to scope whether I personally can do it :P
 
RGS
ah I just found out that one can write L ,⍨← item to prepend... I am very satisfied that it works :)
 
@RGS Oh, any function works for name f← value (well, inside dfns, you have to use f∘⊢ if f is the name of a function).
 
RGS
6:11 PM
@Adám nice
 
 
3 hours later…
RGS
9:38 PM
@Adám turns out that unsetting the first with the second set makes funny things happen. When I opened a help page, it was blurred and it spanned along both my monitors vertically; also the top bar with the windows icons to maximize, minimize and close were outside the top of the top monitor and I couldn't reach them
should I add this to my email to johnd?
 
10:13 PM
@RGS For sure.
 

« first day (1336 days earlier)      last day (1311 days later) »