« first day (468 days earlier)      last day (992 days later) » 

1:53 AM
@lyxal because of the edge cases i presented
how should (ak|bc) be parsed?
 
var = ak code = bc
 
and how do you plan to do that with your current lexer
 
yesn't
in the parser
 
right but
your tokens will be
( a k| b c )
the | won't be a token
 
ez
lexer ignores | in digraphs
 
1:55 AM
that sounds rather hacky
so presumably you no longer care about allowing non-identifier characters before the |?
 
I do care
 
then how about (ab`cd|ef`gh)
what should that do
 
a, b, cd|ef, g, h
no variable
 
so no digraphs should support |
and strings should take precedence over |
and non-alnums should still be allowed and simply ignored
 
correct
 
2:00 AM
hm. letting the lexer just spit out all the tokens and the parser fix the mess still feels wrong but this should work in theory
 
2:13 AM
well (`|`)
should be a string
containing a single |
only outer | should actually branch
 
2:25 AM
Lyxal pushed a commit to Vyxal/fresh-beginnings: Update Lexer.md
 
2:41 AM
i agree; that's just inconsistent with the description you previously had
so what about (ab`cd`ef|ghij)
 
var = abcdef code = ghij
at least, that's what it currently does
!!/run (ab`cd`ef|ghij) c
 
[@lyxal: 58742268]
0

STDERR:
global stack, register, printed, output, MAP_START, MAP_OFFSET, _join, _vertical_join, use_encoding, input_level, raw_strings, retain_items, reverse_args, this_function
for VAR_abcdef in VY_range(pop(stack)):
    context_level += 1
    context_values.append(VAR_abcdef)
    stack.append(VY_min(iterable(pop(stack))))
    stack.append(iterable(pop(stack))[0])
    rhs, lhs = pop(stack, 2)
    stack.append(index(lhs, rhs))
    rhs, lhs = pop(stack, 2); stack.append(join_on(lhs, rhs))
 
w....wait
since when does clicking full text open in a new tab?
is this an actual SE feature or is it because of my userscripts?
oh okay it's just a userscript
 
2:59 AM
Lyxal pushed a commit to Vyxal/fresh-beginnings: Made sure comments and digraphs lex properly
PR #204 (Vyxal/Vyxal) opened by Lyxal from Vyxal:fresh-beginnings into Vyxal:fb-lexer: Fresh beginnings
PR #204 (Vyxal/Vyxal) was merged by Lyxal from Vyxal:fresh-beginnings into Vyxal:fb-lexer: Fresh beginnings
Lyxal pushed a commit to Vyxal/fb-lexer: Fresh beginnings (#204)
 
Lyxal pushed a commit to Vyxal/fresh-beginnings: fixed a few bits of formatting mucked up by the merging (hello @hyper-neutrino)
 
hehe double ping
one in the chat and one in the email
hello @Razetime
 
good morning
 
you can now lex fizzbuzz
that is the only program you can lex
all other programs are just ignored ;p
 
3:10 AM
genius
 
fb-lexer branch: *exists*
redwolf, probably: *triggered*
 
3:57 AM
@VyxalBot did i do something wrong
@lyxal
 
@hyper-neutrino no
 
thonk
 
I never merged yours kekw
I copy pasted the comment lexing block from the pr
And left a comment on the pr
The merge was me updating the lexer branch from fb
And resolving merge conflicts messed up a few newlines
 
4:15 AM
nice
 
PR #203 (Vyxal/Vyxal) was closed by hyper-neutrino with unmerged commits.
hyper-neutrino deleted branch Vyxal/hyper/parser-fix
 
parser fix?
Bruh this is only the lexer
 
Uh.../
 
Howdy!
 
Hi
Is lex even a word?
 
4:22 AM
Yes
 
yeah i misnamed my branch and couldn't be bothered to fix it
 
Lol
I'll get started on drafting the parsing specs later today
But in summary (and while I remember this): structures will be dictionaries with the keys being the different branches
When parsing a structure, you concatenate everything to the default branch of the structure until a | is reached
 
4:56 AM
Upon reaching |, you start concatenating to the other branch
The branch that you concatenate to is called the active branch
32 mins ago, by lyxal
When parsing a structure, you concatenate everything to the default branch of the structure until a | is reached
That should say the starting branch
Because the default branch is for if there isn't any branching
I'll specify it all better later
This is just a high level summary
 
@lyxal do you remember what we discussed for how [a|b|c|d|...] might work
(worth considering for the others, maybe?)
 
@hyper-neutrino I do
And I'll consider that as I write the specs
@hyper-neutrino it seems only useful for if statements
 
okay ty
@lyxal i can't think of particularly reasonable uses for the other structures either
do you have something in mind; just ignore anything past the number of sensible branches and just merge the rest?
 
I just realised, probably <1b people have been rickrolled. What about people who watched it by choice?
 
5:03 AM
so like (a|b|c) == (a|bc)
 
Also, does it count as rickrolling if you don't know what a rickroll is?
 
@hyper-neutrino ignoring extraneous branches is what I'm currently leaning towards
@hyper-neutrino that could be a possibility, but it leads to inconsistency with the multi branch if statement
 
@Ausername baby shark has 9B views and there aren't that many people on the planet (even counting all people ever alive at any point in the 5 years since then, i don't think we recycle people that quickly) so uh
clearly 1 view != 1 person
so even if every view is a rickroll
it wouldn't be 1B people
@lyxal fair enough
i mean i guess behavior around "invalid" syntax doesn't need to be particularly optimized since one could just like, not be bad
barring source layout or restricted source or whatever where one behavior or another isn't necessarily any more or less helpful as long as it doesn't error
 
@hyper-neutrino and besides, any useful functionality coming from optimising invalid syntax would have to be justifiable in regards to bytes saved/used
 
@hyper-neutrino Maybe I should start sharkrolling people instead
 
5:08 AM
@Ausername no.
 
@lyxal true
postfix operators are modifiers right
and prefix are transformers?
 
Other way around
Postfix is transformer
Prefix is modifier
 
o
i assume we are keeping the latter for compatibility
will we be adding the former in the rewrite or will we add that as a feature for the future?
 
v2 will always have modifiers
v3 will have transformers
 
"Routine maintenance"? Come on...
This was not scheduled
And it's up again.
 
5:24 AM
@hyper-neutrino we're implementing the v2 element list
 
poggers
 
yeah you can hide your communities from the list
 
@Ausername wait which sites
 
5:25 AM
Why?
@hyper-neutrino MSE, about a minute ago
 
oh, okay
 
> This is a refactoring/rewrite, NOT a new language
 
BTW for v3 can we have Jyxal's behaviour of allowing multiple conditions in while loops?
 
@Ausername I'll consider putting that in 2.6
 
The way I'd implement it is if not pop(stack) break or something
 
5:31 AM
whatchu mean by multiple conditions
 
At each |, popping the stack and if falsy, breaking
 
@Ausername I'll consider it all when I actually write the parser specs
 
huh.
sounds like it's just a subsititute for logical or?
 
Wdym?
 
it's just condition or condition or condition right
 
5:34 AM
More condition and condition and condition.
 
so it's like having an infix and
 
sorta
 
so it kinda saves on stack manip
I guess it's cool
 
 
1 hour later…
6:42 AM
hey wait
where vybot
 
socket closed
and since for whatever reason my program doesn't crash when the socket closes
i can't just throw it into a bash while loop like i did for aplbot
 
welcome back vybot
@VyxalBot howdy!
 
i need to figure out a better idea eventually but for now
¯\_(ツ)_/¯
 
@VyxalBot hug
@VyxalBot lol u good
 
@lyxal I am doing you.
 
6:52 AM
._.
!!/hug
 
ha, gottem
!!/hug
 
!!/hug
 
@hyper-neutrino ༼ つ ◕_◕ ༽つ
@lyxal ⊂((・▽・))⊃
 
me when i can't remember the command
 
L
impostor
 
6:52 AM
@lyxal ⊂((・▽・))⊃
@lyxal ༼ つ ◕o◕ ༽つ
 
!!/repo list
 
!!/issue VyxalBotSE Add sus command When you use `sus`, it returns the amogus unicode character feature request
 
Vyxal-Bot opened issue #25 in Vyxal/VyxalBotSE: Add sus command
 
wonderful
 
!!/pull
 
@hyper-neutrino pulling new changes; I will restart in a few seconds if any updates are available
 
!!/sus
 
@hyper-neutrino ඞ
 
!!/sus
 
6:55 AM
@lyxal ඞ
 
:)
 
7:25 AM
chunkybanana opened issue #26 in Vyxal/VyxalBotSE: Close issue command
 
!!/hug
 
@Ausername ༼ つ ◕_◕ ༽つ
 
@lyxal nice. but... why is there a amogus Unicode char?
 
!!/sus
 
@Ausername ඞ
 
7:28 AM
Why not
it's probably Javanese / Java
 
I was sleeping when it hit 1b views...
 
me too
 
CMQ: has anybody seen Rick astleys comment?
on the video?
 
Yes
 
epic
 
7:50 AM
^ @lyxal Sorry
 
@lyxal why are you checking the string token 2 times? once elif head in "`»«" and then elif head == "`"
in lexer.py
line 156 and 184
 
Because backslashes escape backticks in only strings
 
uh?
oh okay understood
whats the difference between a tokentype.literal and a tokentype.string?
 
8:15 AM
!!/run Ǔ
 
@PyGamer0 ⟨0⟩
 
8:43 AM
Tams-Tams deleted branch VyxalBotSE/IWFSC-branch
 
^ forgot to do that
 
9:29 AM
@math tt.literal is dead code
 
oh. why is it used, then?
 
10:04 AM
eg. line 188
 
¹½⅓¼⅕⅙⅛²⅔⅖³¾⅗⅜⁴⅘⁵⅚⅝⁶⁷⅞⁸⁹⁰ⁿ <- @lyxal how about implementing this for Vyx
al
 
10:28 AM
@math probably because I forgot to clean all instances of it up
@PyGamer0 because most of those aren't actually that useful for code golf
 
I'm probably not going to be able to help with the rewrite that much - not because I don't have the time, but because I'm pretty bad at understanding other people's code, and writing understandable code. But, I could make a start on debugging all the functions and creating new ones so we have those to come back to once the rewrite is done. After all, we're still going to be using the same functions for everything, the parser/compiler are just going to be completely rewritten.
^ Big chungus of text
 
@Ausername being able to understanding the code is something we're trying to make easy
That's why we have a style guide, comment structures, specs and planning documents
 
True
But then again, look at Jyxal's parser
I understand it because I made it
And I suppose it sorta makes sense
 
10:47 AM
@Ausername why is Jyxal read only?
 
I archived it
 
yes why?
 
Gave up because I got to the stage where I had to implement a ton of builtins
and figure out how to vectorise generators
 
11:03 AM
@Ausername no one ever truly knows how to do that
:p
 
@Ausername what's that?
 
@math a kind of in-joke now
Would you like an explanation of the joke?
 
Speaking of that, sorry
 
@lyxal yes
 
@math vyxal lore time!
alright
so
back in v0.x, if you had a python generator object, it was just converted to a list
e.g. itertools.power
because lists were implemented through a custom Stack class I had
 
11:11 AM
ah
 
the major problem with that was that if you had a big generator, it'd take a long time to finish
so in v1, I made a Generator class that acts as a generic wrapper for all generators
 
And if you had an infinite generator
 
^ it wouldn't finish at all
 
@Ausername how can you do that in python?
 
def f():
    count = 0
    while 1:
        yield count
        count += 1
 
11:12 AM
ah okay
of course
 
that's half the story
the second half is vectorisation
 
The approach for mapping/filtering over a generator is (correct me if I'm wrong on this) have a list of functions to apply to it when evaluated.
 
@Ausername no
just use map
ez
 
@lyxal anyhow
as you would know, python doesn't exactly vectorise things like addition/subtraction etc
like [1,2,3,4] + 4 doesn't return [5, 6, 7, 8]
 
11:15 AM
^ that's what numpy is for, right?
 
it also doesn't vectorise my element functions
numpy is useless for the vectorisation rules vyxal requires
so instead, I just roll a custom vectorisation function
 
@lyxal element function what?
 
@math so you know how Vyxal is transpiled?
obviously I can't just transpile to straight python
so I need to define functions that implement the elements
(elements = built-ins)
 
you mean the list of functions in commands.py?
 
no
the functions in built-ins.py
 
11:17 AM
wait a sec
 
i use numpy for the arrays so i dont have to handle Vectorisation
 
commands.py is a list of strings to transpile each instruction to
 
@PyGamer0 does numpy concatenate strings and numbers?
chances are it doesn't
 
oh that file
the helper thingy
 
11:18 AM
I'll answer any questions on file structures/terminology once I'm done explaining the "vectorising generators" joke
Anyhow,
vectorisation mostly works fine on its own
as do generators
but the moment you mix the two together...
everything goes wrong
 
because of?
 
in The Nineteenth Byte, Jul 11 at 8:16, by lyxal
Generators are the polar opposite of Rick Astley: they give me up, let me down, make me cry and hurt me
in The Nineteenth Byte, Jul 2 at 12:23, by lyxal
@Ausername sigh why can't vectorisation and generators just play nice together!?
> Vectorisation? maybe but probably
Generators? hopefully (v2.5.3 release notes)
 
@lyxal wdym concatenate numbers
 
"abc" + 123
vyxal casts 123 to a string and joins
 
11:22 AM
yay
 
Many commits have been dedicated to fixing vectorisation and generators
 
but none succeeded
 
correct
 
we've even created a github issue tag for such purposes
@PyGamer0 well of course, but I can't exactly wrap in str when dealing with unknown stack objects
that's why I wrote a custom add function
and the vectorise function vectorises the add function
 
11:24 AM
@lyxal cant you get the type
 
the thing is that it's not just addition that needs vectorisation
basically every function needs vectorisation
and numpy doesn't have functions with the same type overloads Vyxal requires
it ends up being easier to just have a vectorise function than to special case each comamnd
 
Jyxal's vectorisation has its own problems
Basically I need a way to declare scoped variables without hoisting
but that is hard
 
@Ausername did you archive it?
 
Ye
a while ago
 
alright, time to go write the parser specs
 
11:32 AM
parser next?
 
correct
lexer first, then parser, then actual compiler
 
What's the difference between a lexer and a parser>
 
lexer = tokens
parser = grouped tokens
 
Oh
My parser was both
 
lol the current parser is also both
 
11:38 AM
Vylight's isn't really a proper parser since it just needs to output a state
It has some parsing-related stuff, so you can tell when you're in a string, but by default numeric chars are number-coloured, function chars are function-coloured, modifier chars are modifier-coloured, etc.
Also, what happened to the static version?>
 
I just realized I've never used generators in Vyxal...
how does eg. Ḟ work?
wrong copy
 
one moment
!!/run ⁽+dk≈Ḟ,
 
[@lyxal: 58745697]
⟨0|1|1|2|3|5|8|13|21|34|55|89|144|233|377|610|987|1597|2584|4181|6765|10946|17711|28657|46368|75025|121393|196418|317811|514229|832040|1346269|2178309|3524578|5702887|9227465|14930352|24157817|39088169|63245986|102334155|165580141|267914296|433494437|701408733|1134903170|1836311903|2971215073|4807526976|7778742049|12586269025|20365011074|32951280099|53316291173|86267571272|139583862445|225851433717|365435296162|591286729879|956722026041|1548008755920|2504730781961|4052739537881|6557470319842|10610209857723|17167680177565|27777890035288|44945570212853|72723460248141|117669
 
given a function and an initial vector, it repeatedly applies the function on a stack within the generator
roughly equivalent to:
def f():
    stack = initial
    for item in stack: yield item
    while True: # if you give it an extra number, it'll only generate a fixed number of items
        stack += function(stack)
        yield stack[-1]
 
Btw everything find-related is broken
 
11:49 AM
probably
 
@lyxal why's d there?
 
to make the function have arity of 2
multiplying a lambda by a number changes it's arity
 
Oh yeah
that weird builtin
'night
 
12:51 PM
Lyxal pushed a commit to Vyxal/fresh-beginnings: Create Parser.md
 
yes thank you vbyxak bot
 
1:05 PM
Yay, parser
 
1:26 PM
@user that's only the specs you sussy baka
!!/sus
 
@lyxal ඞ
 
^ is you
 
Bruh
!!/sus
 
@user ඞ
 
That's how sus works
 

« first day (468 days earlier)      last day (992 days later) »