« first day (1244 days earlier)      last day (1413 days later) » 
00:00 - 23:0023:00 - 00:00

12:07 AM
ok imma guess - the amount of strings/objects/dfns in a given compiled thing is limited to 256. i'm guessing i didn't check that one of those overflowed
(oh i just don't check it at all)
 
@user721719 Perfect question for the 19th Byte chatroom, the general codegolf/programming/maths challenge/puzzle room for this site :) If you haven't already!
 
@dzaima yep, >256 dfns.. not the thing i expected. Almost didn't mention them in the message
@dzaima next up, >256 variables..
@dzaima aand >256 mutable variables...
aaand it completed executing!!!! (not >256 objects which was what i would have suspected, instead everything else was >256..)
 
12:39 AM
almost nothing works, but hey, it's at least trying.. ¯\\_(ツ)_/¯
https://dzaima.github.io/paste/#0vVNNaxNBGL7vr3jJxV2S4u5260GhsDEJxoOFih@nlHUzaVc3s2F2IglhoQeJGhEtpESEEigKCQi5CHqpwubov5hf0J/gO5ONtqUV9dCwu7yTmXk@3nlmHTbLlZwt@vv4rOW0e3FAt6FN66QRUFKHR@0g5CsBBdHf0@52Kfc6ZcYidh38qB3W6RUOjyOcJk8J6/IduZlH4IGECQmQTouROA4i@mdkuOiXzrR1JVEM9uycVoqaXkAzBXciCOqE8oB3YYnaiBjoeViB@chA1Go2L/pvoXd8sP8m/SzGEzGeJmcoa/hqbrFiopwp5LWz9D2xe4ggCDFNxPvnuEzCTKyCXVhFuALWTmGtcA1rfHJatdkKSRPJPY7mM8EuY163ih3obLT5RqMYYTficscnLbnoBhgx9/wnyoOqOPN8ohVvZ6qwBUtdtXNk/XgHttj9voqvIz4O8Dxt59KEgCUGX/Pi9dgUg0NwIHc6LKVARQXjQHwO6RfYIYx
 
@all What might people think of an operator that binds a function to its argument before everything else, sort of like curry, except it's immediately evaluated
Essentially, it'd be when you have something of the form (f a) func (g b) or something similar: One could do f→a func g b, or f→a func g→b for symmetry
With → being whatever the binding operator is, of course
 
@AviF.S. so basically an operatorish way to call a function?
 
Just because I've noticed that almost every time I want to use parentheses, it's only to surround a function/primitive to one argument. Just about every single time, I think!
@dzaima Yes, except with binding priority. So as to eliminate the need for parenthesis
 
full preprocessed source:
https://dzaima.github.io/paste/#0rVtbbxzHlX7vX1HJS7oROjsz2c2DYi8wFw45lEjKJGVLfmGazaY4YU/PqLuHksAdwAEMxaKsxM7GsBFsol3HRkggQF6CJA@xAyiP@Rf8BfkJqXOpW/cMRbHXD4mmu@qrU@ec@s6lmu12v3Hx5OOTixdn//z1p2dCXLw4FxfPPhAXz3928f4X8tW37@TD9L6YpvvxwTCN98XedJgUbwxT8a1vz7x25/rzvwvzu9ef/wbM711//t8/A4DlGgB/BoD@9QEunj0BhJUaCB/@ChBWayB8dAoIgzoIHwLCWp1d/A4QbtZBOAOEW9dHePl7AFi/PsB/wfyN689/C@Zv1lDB0/8FhNt1EL4EhLevj/AmzN@6/vz/hPnbdXbwFSDs1EH4P0C4UwfhC0B4pwbC6W8B4d06CCjD3RoIXyEt3KtzJL8BhPfqaPK5ROjUCFEXTz4BhE4dhP8GhG4dhE8BoVeHYL8GhBqR6uL5U0CoEar@DebXCVTPnwFCnUD1/BeAUCdQnf4cEOoEqlP0pzqB6vRjQLhVBw
 
I honestly can't think of a time I've needed parenthesis where it was more than (f n) or (× p) anywhere.
 
12:50 AM
@AviF.S. trains probably
 
Anyway, doesn't make that big a difference, just a possible aesthetic difference that can highlight symmetries like with f→a func g→b more elegantly than cluttering it up with 4 parentheses
 
Not four, just two, because (f a)func g b
 
@dzaima True. If there's a single thing that's not possible, a train will try to force you to do it!
But normally in dfns, I only seem to need to surround func+arg
@Bubbler Of course, but then again you lose the symmetry
I've always found that rather unappealing
Especially for something like f→n func g→n where it's so tantalizingly close to a fork/over and you really don't want to lose the symmetric pattern
But I always find uneven parentheses seem to do that
 
Then you might like Reverse Compose so you can write a f⍛func∘g b
 
Anyway, just an idea for someone's dialect like dzaima/ngn/Extended, or even BQN. Especially since I think one could use without new glyphs. I don't think it overlaps with the syntax for branching
 
12:55 AM
which I call "preprocess left/right pattern"
 
@Bubbler and in BQN that'd be a F⊸Func⟜G b
 
@dzaima Dude how lazy do you have to be to not define an identity for 0{(𝔽 𝕨 AVF1 𝕩) 𝔾 𝕩}(({⟨⟩ AXF0 ⟨𝕩⟩}{𝕨 ((1 {𝔽} 𝕨) ACF0 0) _AID1_ 𝔽‿𝔾 𝕩}(((1 + -) ≤{𝕩 𝔽 𝕨 AVF1 𝕩})) - ((1 + -) ≤))){𝕨 ((1 {𝔽} 𝕨) ACF0 0) _AID1_ 𝔽‿𝔾 𝕩}×
Pretty impressive that it's even minimally working though.
 
Very neat! I'm afraid if anyone comes up with another one we'll be out of symbols! With ∘/⍤/⍥/⍛ used up, is there any APL-looking symbol left?!
Underline & diaeresis are the only two modifiers in APL, no?
 
@Marshall i mean, just evaluating the source is easy, match was the most difficult part as it actually called stuff oh god
@AviF.S. well there's still ⌻⌼ but i doubt they'd be usable in many places
 
@dzaima That totally loses the ∘⍤⍥⍛ look, though
And elems are normally related to their boxes, I don't think
Eg. ⋄→⌺
 
1:00 AM
@AviF.S. also ⍜⌾ (and my used ᑈᐵ)
 
@dzaima @ngn @Adám @Marshall Anyone thinking the ^^^ construct is worth of being considered for respective dialects?
@dzaima Ah, that one's perfect! Didn't realize there was another size!
 
@AviF.S. Adam and I went through all possible combinators with some restrictions like not calling a function on its own output. We feel that ∘⍤⍥⍛⍨ are all the useful ones.
 
@dzaima Less sure about Mr. Donut though...
@Marshall Well, that's a relief!
 
@AviF.S. is "under" in BQN ( in dzaima/APL, or {⍵⍵⍣¯1 (⍵⍵ ⍺) ⍺⍺ (⍵⍵ ⍵)}, also structural under)
 
@AviF.S. It's pretty hard to justify an extra level of precedence in my opinion. I think the way BQN does it with reverse compose that dzaima pointed out is pretty good for the case you mentioned.
 
1:04 AM
^ +←1
 
@Marshall True, although things like (f a) func g b come up all the time, too
Which I personally still prefer as f→a func g b or f→a func g→b
 
@AviF.S. (that equals the a F⊸Func⟜G b i mentioned before)
 
@dzaima No that's when both args are the same
This has an a & b
 
@AviF.S. no, that's exactly equivalent to your expression
 
I am thinking a little about some kind of syntax to let you apply a function on the right to a value on the left (a bit like shell pipes), because that lets you straighten out control flow. Even that is kind of a long shot. I think it's likely to leave gaps.
 
1:06 AM
Haha, sorry, I didn't see the a at the beginning
I thought that was an 'a' as in the English article to introduce your expression, haha
Maybe if I learn to read that it'll be okay, but I'm finding f→a func g→b much more elegant than a F⊸Func⟜G b rn
 
@Marshall To avoid doubt about operators, we were considering "combinator" in the very strict sense of an operator that treats its operands like total black boxes and calls them on arguments, so Under wouldn't qualify. There may be other useful things like that out there to be found, but then it's probably more okay to use non-circle-based symbols for them.
 
ngn
@AviF.S. so much going on here in the orchard, i can't keep up
 
@ngn :D Same!
 
@AviF.S. I think it does look a little nicer, but working strictly with the operator syntax is a huge advantage. and also double as Bind.
 
@Marshall How's that?
 
1:13 AM
and the modified reference and its parser:
https://dzaima.github.io/paste/#0pVZbTxtHFH73r5jMi2251KD2oQ9QibSOhJSgFhr1AaXusjuuR92Ls7tOilxLjlS59mKTkAYZRSCKC6qR8ohKHxIjmUf@xfkF@Qk9c/H6ElMeYq28s@fyncucc2agfUhMw7YJd0lYZGQt98198pSHRZJmv5BsyQiL2dDLhkUeZAvcZglAhXLAlMxa7h41PYtRkvJ84m0@4V45IHe/XSXscZk/MWzmhkE6IVAI1F8QOgbIsj4rMJ@5Jvt087FLEwmodXNry@u5QY9Q33hKoXZJUYYm1pa/R@1MAs3Jd6KSIEQSz6C9g2vXcFggLcBpRJfvUmj0oXWAgAZyC3mz6Cv7dzJzV52rC9iuQ@M1tCJoNaDxNzR6gze/LkHzT2ieLH4JzVNoHkOzC9FfEHURUsA121DfhfofUN@D1jtoN7PQ3ob2S4ieQ7QL0QuIXkIjgvYFRK8omnVGZq8PrvcHPeHRs7eD8x8F1xpxobEP0b9wdACdbWj1YacJr3@H9hF0/oFoXwjLIHio5
 
@AviF.S. Well, a constant passed as an operand automatically becomes a constant function, so you have x c⊸F y is (c˜ x) F y is c F y. And copies a monadic argument to both sides (the monadic version isn't exactly like reverse compose), so c⊸F x is x c⊸F x or c F x.
 
@Marshall Not sure how well I'm understanding this, but we've agreed the other syntax is cleaner if implemented, no?
 
@dzaima and dzaima/BQN (with references to APL like everywhere still)
 
Which means the only barrier is "but working strictly with the operator syntax is a huge advantage"
So curious why that's the case
 
@dzaima Hooray!
 
1:21 AM
:)
(no dfn headers yet, let's see if i can manage to implement them tomorrow (or well today, it's 4:21) before i have to go)
after that, i'll be ready for the 70 bug report pings a couple days later
 
@AviF.S. It's one less thing to learn when starting the language, and keeps the syntax simpler. It means that definitions for those operators can be written in the language, and you can name the operators or pass them around as values.
 
and ^ is a rather big cost for something that's there to remove 2 parenthesis (or 0 if you're fine with ⊸⟜)
 
@Marshall Oh? I thought combinators also had a higher precedence...
Also, to argue that it's one less thing to learn, seems odd when no one is requiring anyone to learn it unless they choose. No one argues against adding libraries to a language because it's more to learn, I don't think
 
@dzaima Now that I have the source I can actually debug things properly. Maybe the reference implementation will be correct by the time you get back.
 
@AviF.S. libraries do hurt reading new codebases though
 
1:27 AM
@dzaima Isn't that what everyone said when trains were first introduced? And isn't that what people said when ⍤ was added even though atop already existed?
Meaning in most cases it only saves one character, replacing two parens with another, like the →?
 
@Marshall (well good luck trying to debug lol)
@AviF.S. trains can actually save huge amounts of ⍺s & ⍵s & dfns & parenthesis & logic, and the cost of adding is way less than that of adding trains, so it can be "way less useful"
will only ever save 2 parenthesis at most, and nothing in many cases, but it's new syntax
 
@AviF.S. It's about the utility you're getting versus the complication added to the language. Operators have higher precedence as a group, so there's some extra syntactic weight spread across a lot of useful functionality. It's definitely okay to design a language that has a lot of special syntax, but I am trying to make BQN very simple.
 
@dzaima actually, i'll see tomorrow about adding an actual stacktrace lister (by lazily wrapping the exec function in a try/catch/rethrow)
 
@dzaima Understood! Was just an idea; didn't mean to insist :) Though I do think I'll try it out if I ever make my own!
 
@dzaima also i'd really like to make it not store all those intermediate byte[]s as now i can parse a line without needing to parse the contents (due to using this before the actual "smart parser"), but that might be too much for the couple of hours i'll have
 
1:39 AM
@Marshall Understood! With the emphasis you're placing on simplicity, to the extent of replacing 'ifs' with ternary and not impl. other explicit control structures, it makes perfect sense! Was more thinking in Extended/dzaima it might have a place. Not just since it's more elegant, but also for golfing
@ngn Aww, why'd you delete your grammar policing?!
 
ngn
@AviF.S. because i don't want something as petty as that on permanent record :)
 
@ngn Aww. Well, I got a kick out of it!
 
^ +←1
 
I doubt anyone will be looking through the chat messages making value judgements :p I would've done the same though...
 
 
1 hour later…
2:46 AM
Just wanted to share something rather fun that I stumbled across by accident!
{a+←b ⋄ b+←a}⍣n⊢⍬
⎕←a,b will print out the 2n and 2n+1 Fibonacci numbers!
(If fibs are zero-indexed starting at 1,1,2,3...)
Whoopsies, I forgot to say one should first set: a b←1
So:
a b←1
{a+←b ⋄ b+←a}⍣n⊢⍬
⎕←a,b
Anyway, just thought it was rather fun!
 
ngn
@AviF.S. simpler as: ⊃(+\⌽)⍣n⍳2
 
@ngn Of course, of course! Am aware there are tons of simpler and far more efficient variants!
I just thought this one was neat. It hadn't occurred to me one could do such things until I was experimenting with something else
@ngn Although, that's super interesting! Hadn't seen that one before. It is a very similar technique!
 
ngn
@AviF.S. it is neat, yes. i don't mean to diminish the awesomeness of your discovery. just contribute to it.
 
@ngn Haha, not at all! That one is really super cool as well!
Yes, it's also very neat!
@ngn Have you seen such a formation already?
 
ngn
@AviF.S. yes, here
f:|+\ in k means f←⌽+\
 
2:57 AM
@ngn Ah, thanks! Was about to ask for translation!
@ngn Whose site is it?
 
ngn
@AviF.S. whitney's
 
@ngn My goodness! Very neat!
Do you prefer K to J?
 
ngn
@AviF.S. k, definitely, over both apl&j
(still love apl&j, though)
 
@ngn Really!? How interesting. Do you mind sharing a little on why?
@ngn I'd been under the impression that it was more of an industry language, somehow. And that if anything, (mathematical) purists preferred J
 
ngn
@AviF.S. much simpler, faster, profitable
 
3:03 AM
Hadn't realized K was advocated. Will look into it more, definitely!
@ngn Isn't that a little vague?
@ngn By simpler you mean to say more expressive aka simpler to express ideas, or simpler/lighter-weight syntax, like BQN?
 
ngn
@AviF.S. advocated - not sure. the k community doesn't need to proselytize. people usually come to us because they want to.
 
And by profitable... that's some unknow function of speed/ease to write, speed/ease to read and speed to run?
@ngn Haha, well 'preferred to other dialects' is what I hadn't realized
 
I appreciate many aspects of k, but I find it less 'pure' than apl in other senses
 
I don't know where I'd read about the industry stuff, but I'd been left under the impression that it was more specialized and better/necessary in some cases. But not that it was a language anyone would prefer for general use
 
ngn
@AviF.S. vague - not at all. "simpler" in kolmogorov's sense - it has a short description in the language you speak. the source of the k interpreter is much much smaller than the source of the dyalog interpreter, and it has fewer moving parts that might break.
 
3:07 AM
e.g. user-defined verbs are different from builtin ones. And lists sometimes act as objects and sometimes as verbs
 
@ngn Ah, so simpler in the BQN sense? Do you also find it more expressive?
Because that piece of code was certainly impressive for fibs
 
ngn
@AviF.S. i'm not sure what "expressive" means but probably not. apl uses a lot more codepoints from unicode (or "classic" encoding, or whatever), so it can pack more stuff in fewer bytes. but if you cosider a k character as 6 bits (verbs + 8 chars which is the max num of locals), k is the more expressive one
 
tl;dw the more code you accept as valid that does different things from other code, the more expressive your language is. Information density, essentially
 
3:26 AM
@Moonchild Not exactly accurate but I like to think of it as how closely the code maps to the way you think
Found this online, which is roughly how I understand it: "capable of concisely expressing understandable solutions to problems in a suitable target domain."
@ngn Less interested in the technical counting of characters and more in how easy/concise it is to read/write. And once you have an idea, how much effort it takes to express it in K vs. APL/J. Aka how closely the code resembles your actual intuition
Eg. (2∘+⍣3) 0 is shorter than 2 multiplied by 3 but the latter is more expressive, the way I would use the word
 
3:51 AM
@all Might a Wiki page be added comparing all the APL-like languages? There's very little info comparing and contrasting them online, and one SE question which isn't very helpful
@ngn All I notice is that K has a greatly reduced set of (ASCII) primitives-- I suppose there's the simplicity. And that it has triadic/tetradic versions of some. I also read somewhere that user-defined funcs don't work the same way, but don't see that on the wiki
Is there anything more elegant/expressive/interesting in K than J? Or is it simply the simplicity of the language, and its speed, that so appeals?
 
4:22 AM
@Bubbler @AviF.S. a f⍛func∘g b (or a F⊸Func⟜G b in BQN) is what Marshall called "split compose": APLcart, Wiki.
@AviF.S. Also "bar": / , etc.
@AviF.S. Go tacit: f⍤⊣ func g⍤⊢
@AviF.S. One possibility is to forgo the expressiveness of current trains, and let ⍺(f g h)⍵ be (f ⍺)g(h ⍵).
@AviF.S. I've been thinking of a "Dialects" page for a while…
 
4:54 AM
@all should APLcart's "(?)" documentation links prefer the Wiki over the Dyalog docs?
 
5:45 AM
@Adám I'd say no because I guess the entries are mainly for Dyalog APL, while the Wiki may have information for other impls that can be confusing to the user
 
@Adám IME, dyalog documentation is more thorough/complete than the apl wiki. Also, what @Bubbler said
 
@Adám Btw, would it be OK to add Complex Floor to APL features?
 
6:18 AM
@Bubbler Sure. I think it should be under "Concepts and paradigms", as it is to what "Total Array Ordering" is to .
 
 
2 hours later…
8:15 AM
Wow, 743 unread messages.
APL is taking off.
 
Yeah, I can barely catch up when I skip a day.
 
 
2 hours later…
RGS
10:09 AM
Hello @Adám , next up is boolean arrays/functions in APL or complex numbers in APL?
 
@RGS Since you're anyway deep in Booleans, why not continue with that? It also has a much broader audience than complex maths.
 
^ complex numbers are also imo not nearly as important (i.e. dzaima/APL has successfully survived without them)
 
RGS
@Adám sure thing; I'm assuming the notebook you merged is at least a 7 out of 10?
@dzaima yeah I know... It is just that complex numbers are cool :p but I believe Boolean arrays and functions are, in general, far more useful
 
10:30 AM
@RGS I think it is great.
@dzaima As did Dyalog until version 13.0
 
@Adám oh wow
 
Hey, APLX never added complex numbers, and I think APL+ doesn't have them either.
 
huh.
 
10:48 AM
progress; no clue what that arrow finds so interesting in the letter D in _AAD1_
https://dzaima.github.io/paste/#03VXLSsNAFN3fr7i4asBFJ1ofWQhT20LEFz53lphMJbSdyCRFpBRcSEGk4ELBTXHjooLgF6jQT8kX@AnOTVsfRUSlC@lMuMPMfZ7DnckCbuQLE2bcvNJfZgJs6QZKCTfi6iDMKxUoC0s16UZ@IDE@u0XXqVSEh9VAOp5Pm2PgvJDGuHmH9Zf21R3G56dkyRpx66Z7D/hh7JH4hT12H8hhAY0wctwyMOtnzt2HwdwjoUOYFqz7bjluXtghV8o5xiLnOVZE5DsFhnpn066OSXyGfFUvyNdIx7e11Nk6OlmSNLuklXTQiE@eKaz3ueoB0iEoo5q9eDBlwaBsDSvho5NKkXxpXz5SocZbpddGnQ4bdNpI3ONWG5ftFXsrn8MoQFmr7guFFVGKMDgUypEeKhHWKhH8BQL@YsD0uADJJECWhoCwt4o7BvJFjSNtDPCSRveQXp4wgQSjaxiY6fNqfs8r@4JXInXTqQr0RMm
 
11:02 AM
..the tabs i have open are the APL Orchard and 5 BQN pastes :D
 
RGS
@Adám awesome, I'll try to keep it up, then
 
11:46 AM
@dzaima in the process of doing this, and my worst fear - the reference parser executes, but somehow something manages to break actually evaluating the parsed reference
 
ngn
12:06 PM
@Moonchild watched it. interesting. so that's an attempt to define formally what it means for a feature F added to a given language L to be "expressive", but i don't see how that could be used to compare the "expressiveness" of two languages as different as k and apl.
btw, aplers like to describe k as a "reduced instruction set apl", and this phrase has been used publicly by k people too, but i think it's misleading. k is far out in the direction of lisp compared to apl&j (which are very close together), and has innovative features of its own.
@AviF.S. "easy to read/write", "effort it takes to express it", "intuition" - those are subjective. they depend on the background, habits, and skills of the programmer (and maybe the problem domain), rather than the language itself
@AviF.S. elegant/expressive/interesting - yes, there is. for example, one of the things i find most beautiful are the symmetries between k's / and \ in all their overloads
 
12:22 PM
@dzaima seems ngn/k allows a max of 127 constants in an evaluated thing. about what i expected
 
ngn
@dzaima not enough? :)
 
@ngn if i currently didn't have 11 errors, i'd test (i doubt it'd be enough)
(also i can't deduplicate constants as they're also used as a way to reference to tokens so error messages could point to the source)
@dzaima (with this refactoring i'm doing though, i'll be able to somewhat rely less on that by just storing a token array besides the bytecode array, with a 1:1 correspondence)
 
ngn
@dzaima which language are you talking about?
 
@ngn dzaima/BQN
(it's really fun when 2+2 generates 0 code)
 
ngn
@dzaima wow. your compiler/vm is nearly 1k lines of code.. mine (ngn/k) fits on a page. a dense page, but still a page.
 
12:37 PM
@ngn yeah, i obviously didn't go for compactness. (it's exactly 1000 right now :p)
(how much effort would it be for you to allow >1k constants?)
 
ngn
@dzaima probably not much, but why would i?
 
@ngn just curious how engraved in the system that limit is
 
ngn
@dzaima i'd just introduce a "load constant" instruction followed by a few more bytes for the index of the constant
 
@ngn so the same thing i did (or would do, i haven't actually extended constants to over >256)
@ngn which file
 
ngn
@dzaima do you expect a bqn function with that many constants ever to be written?
 
12:42 PM
@ngn that reference is probably somewhere on the limit
 
ngn
@dzaima b.c
 
@ngn also huge array constants would be a problem until those are special-cased by the compiler
 
ngn
@dzaima explaination (a bit old but still mostly relevant)
 
@ngn so 5.8x less non-whitespace characters
 
Somewhat better reference.bqn input file:
 
12:46 PM
@dzaima 3.9x less \w+s
 
ngn
@Marshall sorry for splitting your 2-part message
@dzaima depends on how wide your screen is (if you consider the wasted space after a line white)
 
@ngn screen space is a separate argument. i'm just fine with using IDE features to jump around quickly
@dzaima also turns out i have this whole day still (so ~10-15 hours, depending on when i go sleep)
 
ngn
@dzaima why do you need class Stk? java.util.* not good enough?
 
@ngn my Stk improved 2+2 from 45ns to 40ns or something
extremely pointless (and probably even more pointless now) but ¯\_(ツ)_/¯
 
ngn
@dzaima if you don't actively remove complexity from your code, you'll be crushed under its weight, it will get increasingly more difficult to make any changes, and this will be just another failed apl-like language impl on the pile of history :)
 
12:56 PM
@ngn i'll start removing stuff when i'm sure what needs to be removed. this whole folder could be removed with nothing lost, but i'm still keeping it around in case builtins are changed
@dzaima and currently most things in the compiler are completely up for being changed (i.e. what i'm supposed to be doing now, but 2+2 still gives 0 code)
 
ngn
@dzaima ok.. let me rephrase it. s/remove complexity/add simplicity/ :)
 
@ngn any examples of what types of things you mean?
 
ngn
@dzaima >99% of the software in the world is bloated
 
@ngn agreed
@dzaima (as i think currently most things in the compiler are relatively needed and can't be simplified much without losing refactorability/my view on simplicity)
@dzaima yay reference compiles again!
@ngn reference doesn't have >128 constants. ¯\_(ツ)_/¯
@dzaima i guess all constants would have to to be number literals, which are few there. All built-ins are replaced with variables, which definitely were >256
 
ngn
1:17 PM
@dzaima if one day you implement constant folding, that should reduce the need for slots even further
 
@ngn true
it's not that hard to implement though, and shouldn't really hurt anything
now it really likes to point at numbers as the currently executed thing..
https://dzaima.github.io/paste/#03VXNSgMxEL7nKQZPXfDQrNafPRRSbWHFP7TqbWXdTWVpm5XsFpFS8CAFkYIHC16KFw8tCD6BCn2UfQIfwczWqi2lVPFQmiwTkplMvu9jkk3DXjY3p0f1pvpSc8QUji8ld0ImT4OslL40oFARTuj5AqLrR3DsUom7UPaF7Xo4uSCM5ZIQ1TtQfW81OxDdXGEkrUWNh@4TgR/NQvOLeOg@44Y0aEFoO0VCjck2d5/73UKjUugG2fWcYlS/NQMmpX0Bx4yt02MAdpijoGYmzqoQ56fAttUAbAd97EBZdVpbHRYfmtlQTlyoRZdvmNYdRN1nOkTlv3ovH1kwSB@2ohXr0U4k0L637l4QqPaF9F6r4mINV2vx9qjRgk1zy8xn1yH0QVTKJ1xCiRdC8M@4tIULkgeVUkgmp2BZ1je@yRpZnAkWqZjFxhAL@gW3rQFbUySSWp8selT1qOEVYj4jEFp/qw@y9KmpPl5TOkJTFHTfLn
 
RGS
@ngn this compiles k to what?
 
ngn
@RGS to its own bytecode, which it then interprets
 
1:40 PM
bytecode of the preprocessed reference because why not:
https://dzaima.github.io/paste#07X1JciNJkuA9X4GJ29zczHytQ4uAACEtMtJdLdXLHEewRjBIAiRIRkbUC@YDLVGXmTPj1H/op8wL5gkDW1XNXNXdQDC6UnoyD5FOh9uupvvyN5P/ulpvJ3@a/vcP2//xcNw@HA/rD7@sD5vtH36ZFItJUUz0f/PF388nxemN9G/@Zfqnv5t8WN5sxIfT66uJ@@8fr//p721DAQ2FbShww89sQwkNpW0occNfd1xDBQ3VL3o49@bU8I8w4unDEj4sT29a39Uf/0HO7YglHvELO2IFHVW2YYUbLu@5hjU0rG3DOmrIbk4DDRvbsMENN2zDFhq2tmGLG67Yhh007GzDDjdc0w1Pmz/Fm@@2Qvgv3evtrnCvZ/i16/T0eo5f7@zX6Xk18LeY22bXxMELvRz0@qMfWxT4tduJwgP6P/zzP/7t5L9IYtw@3IgIxD/umK0REg@4sfM4tVbRBWFbl0Tr0@sq2sHwuo4WZ19Pfaf/9CflZh6B0S07dksP0hGDF
 
RGS
@ngn I don't understand
what is the point of creating your own bytecode for you to interpret?
 
@RGS in what other way would you store a program that's not compiled to machine code (doing so in the case of APL would be mostly pointless) but still needs to be evaluated with high performance?
 
ngn
@RGS some of the work can be done at compile time (e.g. resolve variable names to slot indices) and the runtime is faster this way
 
RGS
@dzaima I don't know, you tell me :P
@ngn this mention of slot indices: is this related to the conversation you and dzaima had about having some cap on the number of locals/constants/...?
 
@RGS these are different slots - here they're kind of "renaming" variables to consecutive numbers to not need a hashmap to get/set variables (dzaima/BQN doesn't do this at the moment)
 
RGS
1:48 PM
@dzaima yes, I think I understand.
 
@RGS (an AST might be an alternative, but 1) then the objects would probably be scattered around the memory resulting in way higher cache usage, 2) it'd use the regular stack which might be worse than a manual stack or something similar; and probably a couple more performance problems)
 
ngn
@RGS also, bytecode is stored compactly in memory. if i used a tree-walker instead of bytecode compiler+vm, the interpreter would have to "chase pointers" a lot more which is slow due to the way ram works
 
i did for a while consider the tree walker/AST approach though, mostly due to me knowing that trains are evaluated incredibly fast in dzaima/APL (at least compared to its dfns)
@dzaima dzaima/BQN trains still are interpreted the same way as in dzaima/APL btw, which is pretty much a tree walker
 
RGS
@ngn ok ok, and the bytecode compiler + the vm are in that b.c file? Or that is just the bytecode compiler?
 
ngn
@RGS it's both
@RGS separated with an empty line for readability :D
 
RGS
1:55 PM
@ngn that one literally made me Laugh Out Loud
maybe I would learn something from studying that file
 
ngn
@RGS if you're not accustomed to reading whitnified code, you probably won't. k.h and readme may be better starting points.
 
RGS
@ngn "whitnified"? was about to ask what the k.h file was, I noticed you include it in the b.c one.
 
ngn
@RGS this minimalist style of c coding was pioneered by the guy who wrote the incunabulum and later made k
 
RGS
@ngn ah so "whitnified" does refer to the name of a person, thanks. It just resembled the word "white" too much and I wanted to be sure it referred to a person, and not to "whitespace" :)
 
ngn
@dzaima i didn't bother with a decompiler, it's not that hard to read the bytecode in hex
 
2:10 PM
@ngn i like pretty things though :)
also way simpler for people who haven't seen the bytecode
 
ngn
@dzaima they are usually not interested. and those who are are smart enough to figure it out from the source or through experimentation in the repl.
 
ah, i was forcefully merging multiple pointer messages in one. fixed (still pointing at numbers though due to me backtracking to try to get _some_ pointer in case there's no other choice):
https://dzaima.github.io/paste#03VbNattAEL7PUww5WdCDV637o0NgHdug0LSlcZr0IqFK6yJsr8JKJg3G0EMxLcWlhwZyMb70YEOhT9AW8ij7BHmE7mqtmDbGmP5A8MjMsrPa2fm@nfFoG5/WG1u2HJ6pX2ULXB4mQrAwo@JlWhciEQ62ejzM4oSjfPcZw6DTYRF2Ex5EsZ6cwjZaaRaEbSAOUNoooxzOsH85PpuhfP9G7yIDOZpcfAE0cvG1eDytEMF24EkctuXwo5tSIYJT9CmtER@RPmsQVDNXz/qY@ydIH6kB6WO9Rg@UVqdN1WH5odVdtagNA/n6h3YbFQevkEVMf/sYf@sxUYiHcNuBAqaiId81LZW0vhx/@qZ9WFfIzq2@Ng60dZA7kKMx
@ngn even i don't know the hex codes of my bytecode (and might rearrange them at any point)
and i see no reason to restrict bytecode readability only to people who know the internals of the interpreter. Knowing how stacks and bytecode usually works should, and can be mostly enough
@dzaima and even if i did, reading roughly human readable words would still probably be easier than having to parse a stream of hexadecimal digits
 
ngn
@dzaima the reason is: it's hard to keep things in sync (compiler+decompiler instead of just compiler)
 
@ngn what's easier to keep in sync - the decompiler, or every users brain?
 
ngn
@dzaima users don't care about bytecode
 
2:18 PM
@ngn i do
 
ngn
@dzaima ok :) do what you want to do
 
(and with named constants for the bytecode instructions, the only desynchronization that can occur (provided don't rename the constants without renaming the corresponding name in the disassembler (easy to do as i can just jump to the usages from the variable)) is forgetting adding an instruction to the decompiler when its added to the compiler/interpreter, which is clearly noticable and still not that hard to remember to do (i've done it once i'll say though))
@dzaima i don't doubt that the issues will become bigger/more probable later on, but at the moment, while developing the basics, being able to visibly view the bytecode is a really useful thing
i even considered adding a thing that references which lines are the things each instruction will pop, but that's a bit too much required synchronization even for me
@dzaima and in that "later on" when the the bytecode formatter may be more broken, it'll be less important so it all works out in the end
 
ngn
@dzaima you're right, it may be more useful in the earlier stages
 
@dzaima (e.g. i'd like to see ngn/k's generated bytecode but can't be bothered to understand the whitnified code nor learn the conversions)
 
ngn
@dzaima .{} returns (src;bytecode;map;locals;consts)
 
2:40 PM
ಠ_ಠ i had that token-per-bytecode thing, but the object responsible for temporarily holding a byte[] + Token didn't actually store the token anywhere.. Now with that fixed:
https://dzaima.github.io/paste/#01VbNattAEL7PUww5WdCDV637o0NgHdug0LSldZr0YqFK6yJsS2ElkwZjyKGYhOLSQwO5GF96sKHQJ2gLeZR9gjxCd7WWf1JXBAoNnhWz7Cw7@823M7vaxpfV2pYpBhfyK22BHXoR58xLKH8XVzmPuIXNbuglQRSiOP@KnttuMx87Uej6gRqcwDYaceJ6LSAWUForohhMsXc9upii@PhBrSJ9MRxffQPUcvU9aw2lEMG04EXgtcTgsx1Tzt0TdCitEAeRvq4RlCNbjXqY@idIn8kO6XM1R/ellrtN5GbppuVdOakMfXH6S7n1s41zZIHpX5v2dzsmMmkg3LcgC1PSkK6aFApKX4@@/FA@jHlkl0ZPGfvK2k8diOEIn9p7dr1awSTCsNt
 
ngn
2:57 PM
@dzaima @Marshall why don't you write the compiler in bqn itself?
 
@ngn Marshall is planning to do something like that. And I 1) can't be bothered to, and 2) don't (didn't) have a way to bootstrap with features i'd like
 
@ngn c.bqn is a slightly incorrect BQN2NGN compiler for a very small subset of BQN.
Having dzaima/BQN for bootstrapping will be nice, and I will also probably add a backend for dzaima's bytecode so I can work on the compiler without worrying about the runtime.
 
ngn
nice
 
^^ number_of_bytecode_users+↩1 ⍝ 2 :p
@dzaima also 3) apparently i just like implementing things in java
@ngn also since you don't have a GC to worry about, couldn't you just include the pointer in the bytecode?
 
ngn
@dzaima good question
 
3:13 PM
(probably significantly more difficult to manage/keep sane)
 
Shoot! I forgot to save my last session! Is there any way to recuperate all then fns from it, or at least see last session's REPL? It's sometimes right above, but it's not consistent and this time it's a much older session that's above...
 
@Adám ↑
 
@ngn Of course it's all subjective and depends on the person's experience/mode of thinking. But I'm curious about it from your experience. Whether it's easier for you to translate your ideas into K than other APL-like langs.
 
@AviF.S. Not if you did )off.
 
Also, as you say, I have read about it being inspired, in part, by Scheme, but am not clear on how. Do you mind enlightening where Lisp comes in?
@Adám The point is I didn't remember to do any such thing. I just stopped coding and I suppose at some point I may have turned off/quit all or something. I don't quite remember
 
ngn
3:18 PM
@dzaima i'll think about that later. it would be ugly but it might be worth it, for speed
 
If closing the app counts as )off by default though, then I did.
But I closed the app on the other sessions from ages ago which seem to randomly appear and stick in the history for reasons unbeknownst to me
 
@AviF.S. Yeah, unfortunately, we don't have an auto-save function. Maybe I should try implementing a simple auto-save.
 
@dzaima also maybe some problems with the pointer being misaligned
 
@Adám Oh gosh...
 
@AviF.S. The last APL to close, overwrites the log.
 
3:19 PM
But then why are some sessions saved
?
 
@AviF.S. Define "session".
 
I meant the log, I guess
 
@AviF.S. "workspace" i guess is what you mean (session is a separate thing)
 
Very old ones from ages ago will stay there for a long time regardless of what else I work on
@dzaima Ah, that!
 
log, session, workspace. 3 separate things.
 
3:21 PM
@Adám Ugh
 
If you get used to closing APL with )continue you can always the last thing back with )load continue
 
That I'm aware of. But if I don't explicitly do so, which I rarely do, what it chooses to remember seems very random
I certainly didn't save the meaningless experiment that shows up in history
 
@AviF.S. i personally try to not have multiple windows of anything open
@dzaima also no immediate dfns (i.e. {2+2} is a regular dfn)
 
RGS
@Adám you merged my PR, so why does GitHub say my branch is 7 commits ahead, 1 behind Dyalog:master..? I understand the 1 behind is the commit of merging my PR. So why am I still 7 ahead..?
Shouldn't I just be 1 behind?
 
@RGS Because I squashed. So you don't have my squashed commit, and I don't have your separate commits.
 
RGS
3:33 PM
@Adám ah ok
thanks
wait so now if I write another notebook, I'll be many more commits ahead of Dyalog:master, won't I? so if I want to keep contributing what is the git way of doing it..?
 
ngn
@AviF.S. do i have to choose 1? :) generally i prefer k over apl, except for tasks involving linear algebra, unicode, or closures. i think golfing is more fun in apl because there are more primitives to combine in creative ways. as for j, i can't get past its syntax which is bizarre even by array language standards, but it does have a wealth of built-in types and operations which is sometimes exactly what you need.
@AviF.S. functions as first-class values, m-expressions, homoiconicity
unfortunately no closures, no hygienic (or any other) macros, no call/cc (deliberate design choices)
 
4:24 PM
@RGS IANAGW, but I think what you are doing when adding a notebook would be considered a new "feature", so the correct way is to branch off master, make your changes, PR, then discard that branch, then create a new branch off master for the next feature.
 
4:40 PM
@AviF.S. Here you go:
 AutoSave←{ ⍝ every ⍵ minutes - call with AutoSave&n
⍝ optional ⍺: filename (default is autosave.dws in temporary directory given by 739⌶0)
     ⍺←'/autosave.dws',⍨739⌶0
     ∇ ⎕DL 60×⍵⊣0 #.⎕SAVE ⍺
 }
 
RGS
@Adám seems reasonable, thanks for the idea. Also, what is ianagw? It looks like neither me nor Google know what it means
 
I Am Not A Git Wizard ;-)
@AviF.S. Uh oh, there's a typo. It should say ∇ ⍵⊣60×
Hm, Cv{∇⌊⎕DL⍵⊣0#.⎕SAVE⍺}&Ns to APLcart?
 
RGS
4:56 PM
@Adám an auto-save function? I think it could be cool
@Adám damn, I figured out the beginning but the GW was really throwing me off :P
 
 
3 hours later…
7:28 PM
way long overdue, but i finally updated paste's BQN font & highlighter to include ⊘◶
 
 
1 hour later…
RGS
8:48 PM
If I changed my mind how can I stop editing a multi-line object in the interpreter?
similar to how SHIFT+ESC works in single line mode
 
@RGS Ctrl+Break or Action>Interrupt
 
RGS
@Adám so if I don't have a break key I'll have to go with Action > Interrupt, right?
 
@RGS Do you have a Pause key?
 
RGS
@Adám I have a key I use to play/pause music, e.g. from spotify
but ctrl + that key did nothing
 
No, I mean an actual key.
 
RGS
8:51 PM
A key that says "pause"? not really
 
That's odd. If you're using a nonstandard (e.g. laptop) keyboard, you may need to hold the Fn key to access the Pause/Break key, but I think most keyboards have it.
 
RGS
brb, I'll try again when I get back
 
@RGS Try these
 
RGS
9:24 PM
@Adám Fn+B did the trick, thanks ^^
 
10:10 PM
@dzaima Got the reference implementations through 2↕↕5.
And use _amend ← {(<𝕨)⌾(𝕗⊑⊢)𝕩} in the preprocessor.
 
@Marshall the "not fast" wasn't kidding. 340ms..
still, i'm amazed it works
@Marshall i had to write 5 simple functions and screwed 2 up, _amend twice..
@dzaima (or more that it was possible to determine what didn't work)
 
10:47 PM
Is there a good way to set an outer variable within a smaller scope?
I know normally it can only be altered via modification statements, which of course could allow a roundabout way of resetting, but not ideal.
And what about declaring a variable in a dfn which should be accessible outside of its own scope? Possible?
 
RGS
@AviF.S. maybe try this
(I called the d dfn with a random argument there, the 4 has no meaning)
 
@Adám @RichardPark @past-ngn @past-Marshall
Quick Feature Idea: If you call F1 on an error message, it'll take you to its documentation
My goodness gracious! That's wonderful, thanks a bunch!! Also, stylistic point: If you're worried about confusing the reader, it's convenient to call such niladic functions with ⍬. The extra nice thing about it is you don't even need a space!
Eg. `⎕←callMeNow⍬`
 
00:00 - 23:0023:00 - 00:00

« first day (1244 days earlier)      last day (1413 days later) »