« first day (450 days earlier)      last day (1324 days later) » 

00:01
@lyxal I've put globals back into interpreter.py in my PR, as you suggested, and the FizzBuzz test works now
Lemme know if you want me to modify it more or smth
00:15
I'll have a look at it once I'm at my computer again
But in regards to github.com/orgs/Vyxal/teams/transpiler-design-team/discussions/…, what do you mean by deep vectorise?
Do you mean [1, 2, 3] + [4, 5, 6] -> [[5, 6, 7], [6, 7, 8], [7, 8, 9]]
Because if so, the existing vectorise function has an expl argument which makes it do the above
@user
@lyxal No, just normal addition ([5, 7, 9])
I wasn't thinking about changing the semantics of add, it was to make it easier to define add and shorten the code a bit while keeping it readable and easy to maintain
@user it does that normally
Honestly, I don't understand vectorization well enough myself, so I didn't open a PR
@lyxal Oh lol
Then why the last four cases for generators and lists?
Because they are special
And they need special handling
Okay, so vectorise can't handle them normally?
00:21
Well they need to be Vectorised element-wise somehow
That's why I was proposing a deep_vectorisze function that can handle those special cases
I'll draw up a PR after the code cleanup and restructuring and stuff is done, hopefully I'll grok vectorization myself by then
@user I mean I probably don't need those special cases
Because they all just have the same dictionary values
Oh
Which means a simple .get(types, lambda:...) would fix it
Iirc the special cases are remnants of earlier versions
Earlier and cursed versions
Hmm
00:27
Because unless there's some sort of vectorisation method I'm missing here, the current function should be relatively clear
 
8 hours later…
08:31
Mmm there's a lot of fun for me to have tonight
PR review, issue 147 and molding with generators
 
1 hour later…
09:39
Just a friendly reminder that for loops used to make you put the thing you were iterating over inside the for loop
Like if you wanted to do something 8 times, you'd write (8|...)
 
3 hours later…
12:41
I have some questions about how Vyxal works. Can I ask it now?
sure
I'm only rickrolling myself, so go ahead
So, the main file is interpreter, and the first thing it does is pass the code to the parser, right? What will the parser return?
@math It returns a list of tokens
Can you give an example?
in v2.4.x and lower, that was a list of Token objects - a custom class I had
in v2.5.x and higher, it's now a list of (number, dictionary/any)
@math sure
1 2 3W 4 5" v+
turns into
[(7, '1'), (7, '2'), (7, '3'), (0, 'W'), (7, '4'), (7, '5'), (0, '"'), (17, ('v', [(0, '+')]))]
₁ƛ₍₃₅kF½*∑∴
turns into
12:46
@lyxal What does the 7 stand for?
@math number
[(0, '₁'), (5, {11: '₍₃₅kF½*∑∴'}), (0, 'M')]
@lyxal ^
NONE = 0
IF = 1
FOR = 2
WHILE = 3
FUNCTION = 4
LAMBDA = 5
STRING = 6
NUMBER = 7
MAP = 8
LIST = 9
VAR_GET = 10
VAR_SET = 11
FUNC_REF = 12
COMPRESSED_NUMBER = 13
COMPRESSED_STRING = 14
CHARACTER = 15
DICTIONARY_STRING = 16
MONAD_TRANSFORMER = 17
DYAD_TRANSFORMER = 18
TRIAD_TRANSFORMER = 19
PARA_APPLY = 20
LAMBDA_NEWLINE = 21
FILTER = 23
SORT = 24
those are all the structures
STRING = 1
NUMBER = 2
IF_TRUE = 3
IF_FALSE = 4
FOR_VAR = 5
FOR_BODY = 6
WHILE_COND = 7
WHILE_BODY = 8
FUNC_NAME = 9
FUNC_BODY = 10
LAMBDA_BODY = 11
LIST_ITEM = 12
LIST_ITEMS = 13
VAR_NAME = 14
LAMBDA_ARGS = 15
COM_NUM_VALUE = 16
COM_STR_VALUE = 17
LAMBDA_GROUP = 18
and those are all of the keys
oh that's what the variables in the parser file do
correct
they are used for classification later on in the compilation process
why is the W in the first example a 0?
because it is considered NONE
a standard built-in
it isn't a structure
and it isn't a multi-byte value
so it's structure is NONE
12:50
ah
so, what does the interpreter do with these tokens?
for each token, it matches the first value (the structure type) and processes the second value (the structure data/value) accordingly
an example: to transpile NONE, you simply .get() the structure data from the command dictionary
that's clever
to transpile a LAMBDA, you first have to include all the juicy lambda boilerplate in the compiled code, then the rest of the structure data
@math I've had almost three years to figure out the most optimal way ;)
and the utilities file?
those are functions that aren't element helper functions
although to_ten and from_ten should probably be in the main file
utilities is mostly base conversion stuff
I think I decided to keep it separate because I figured that once I got it working, I'd keep it out of sight and out of mind
because base conversion is one of those things that takes me a bit longer to wrap my head around than the average code golfer
12:55
really nice, thanks
I noticed you asked about splitting the digraphs into separate dictionaries
and the funny thing is that before 2.5, that's how it was
there was the main command dictionary, plus a dictionary for each digraph type
I figured I'd experiment with merging them into one dictionary in 2.5+ and the E branch
and last question: Why do you have a dictionary.py and a dictionary.txt?
you could just eval the txt file, right?
@math heh, you sure know how to expose my laziness in keeping legacy files ;p (I'm totally fine with the questions btw - this comment is 100% light-hearted)
@math and originally I did
but then I yeeted it all into a python file
because that's what everyone else does
and it's probably better as .py
you could probably just delete the .txt and the dictconv.py files and nothing would change functionality wise
actually I'll do that myself
I'm working on implementing #147, so I'll remove those files in the same commit
oh okay, didn't notice that dictionary.py = dictionary.txt+dictconv.py
@math in short: legacy files
@user speaking of legacy files: is reference_to_md.py still needed, or does the workflow automatically do it without relying on the file?
13:02
@lyxal bye then, I have a Matt Parker video to watch
o/
 
1 hour later…
14:12
Does Vyxal have commands with the arity 4 or 3?
@math There aren’t any arity 4 commands, but these are the arity 3 commands: ¢ V ŀ ẋ Ȧ Ḟ Ŀ Ṁ ∇ øV øṙ ¨M
@AaronMiller ok, thanks. also not arity > 4?
@math Right, at least none that I can find
@AaronMiller thanks
14:34
Announcement: If y'all would like a Vyxal resources site similar to my JHT site, please let me know what sort of stuff you'd like and what categories of builtins there are (elements, modifiers, and syntax?) and I can give the format that data should be in to adapt the site over to Vyxal.
4
@hyper-neutrino your site's awesome
@lyxal It's still needed. The workflow does do it automatically, but it basically just runs that and then commits. idk bash and stuff well enough to do it inside the workflow itself. In any case, Python's just easier to maintain
@hyper-neutrino shall I make a hyper ping?
@Ausername @Underslash @Razetime @UnrelatedString @wasif @pxeger @AviFS ^^^^
@lyxal Sorry to ping you again, but could you please merge/reject my PR before more changes are made? It's very hard to resolve conflicts owing to how big interpreter.py is
14:59
is splitting the files into more manageable components part of the cleanup
if not it might not hurt to try to do so
Yeah
The problem is that I can't do a math_builtin.py because builtins like ceiling also do stuff for string and aren't really mathy
I'll try an array_builtins.py maybe
obtw cumulative_reduce needs to be redone to be a bit more efficient
Wait, it's not even necessary, I think, there's a scanr_by_axis already
15:15
oh yeah cuz overloading lol
you could make math funcs, string funcs, etc. and then have a unified overloading function that calls each one depending
so for example you could have a ceiling function in math
and a split on space function in str
and then a unified command function that type checks and calls ceiling for numbers and split-on-space for str
that might be more confusing tho so idk if that's actually a good idea
15:57
Yeah, that's a good idea
Would also avoid having strings inside commands.py
 
7 hours later…
22:44
@user I would have done so last night but it got too late after fixing a few bugs. Dw, I haven't forgotten about doing so
Danke
23:27
Merged.
23:42
Is there (and if there isn't, could it be added) a flag that truncates all array outputs to 100 elements or so?

« first day (450 days earlier)      last day (1324 days later) »