« first day (495 days earlier)      last day (1278 days later) » 

01:20
The issue I see with moving overloads into different files by type is deciding for multi-argument builtins which argument's type determines the type of the overload
That and in the case of array overloads, what about cases where the item type matters?
@user This is basically what already happens with lambdas and so on. I don't feel that this would be a good idea, as it would probably cause a bit of confusion and pain when transpiling.
BTW, can we have function input support?
Would require a parser for input
but doable
@emanresuA well vyxal lists are already evaluated
so it shouldn't be too much of a stretch
Ok
You have to handle lists containing functions, lists containing lists, etc
01:31
@UnrelatedString Even in the case of array overloads, the overload determining function could dip into the array and find its type and call the right function
@emanresuA just eval as vyxal
@exedraj Which lambdas do you mean?
@exedraj Oh tru
@user in the element functions
Oh
Those are inside strings, though, right?
01:32
no
Oh
def add(lhs, rhs, ctx):
    """Element +
    (num, num) -> lhs + rhs
    (num, str) -> str(lhs) + rhs
    (str, num) -> lhs + str(rhs)
    (str, str) -> lhs + rhs
    """

    ts = vy_type(lhs, rhs)
    return {
        (NUMBER_TYPE, NUMBER_TYPE): lambda: lhs + rhs,
        (NUMBER_TYPE, str): lambda: str(lhs) + rhs,
        (str, NUMBER_TYPE): lambda: lhs + str(rhs),
        (str, str): lambda: lhs + rhs,
    }.get(ts, lambda: vectorise(add, lhs, rhs, ctx=ctx))()
see
it already handles the overloads
and you really want to split those into different files?
So something like try { parse float } catch { eval as python } catch { eval as Vyxal } catch { stringify }?
@exedraj Yeah for add one function is okay
I'm talking about having a separate file for functions where the implementations take more than a couple lines
@emanresuA try: eval as simple python catch: eval as Vyxal catch: string
@user that's why you have helper functions
def mold(
    content: Union[list, LazyList.LazyList],
    shape: Union[list, LazyList.LazyList],
) -> Union[list, LazyList.LazyList]:
    """Mold one list to the shape of the other. Uses the mold function
    that Jelly uses."""
    # github.com/DennisMitchell/jellylanguage/blob/…
    for index in range(len(shape)):
        if type(shape[index]) == list:
            mold(content, shape[index])
        else:
            item = content.pop(0)
01:35
Yeah, so could the helper functions and the helper-user functions be in different files?
def log_mold_multi(lhs, rhs, ctx):
    """Element •
    (num, num) -> log_lhs(rhs)
    (num, str) -> [char * lhs for char in rhs]
    (str, num) -> [char * rhs for char in lhs]
    (str, str) -> lhs.with_capitalisation_of(rhs)
    (lst, lst) -> lhs molded to the shape of rhs
    """

    ts = vy_type(lhs, rhs, True)

    return {
        (NUMBER_TYPE, NUMBER_TYPE): lambda: sympy.Rational(math.log(lhs, rhs)),
        (NUMBER_TYPE, str): lambda: "".join([char * lhs for char in rhs]),
        (str, NUMBER_TYPE): lambda: "".join([char * rhs for char in lhs]),
@user I don't see why that would be helpful
it'd just create more places to look
¯\_(ツ)_/¯ Aight
keep it simple I think
that's what my philosophy is for vyxal at least
as simple as possible
having a distinction between overload-determiner and overload-implementer could be useful but segregating those between files seems counterproductive
Maybe sections inside the same file?
01:38
i'd just let each builtin be its own section, clearly delimited
(I do agree that array_builtins.py was a mistake)
I found that with different files for each type of helper function, I didn't know where to look for specific functions
having one single place where they have to be is much better
Yeah
@exedraj Interpreter.py: print “program is too complex!”
Hmm, smart quotes, are you on a phone?
01:43
Technically tablet, but yes.
Smart quotes bad
If your quotes get too smart, they'll usurp you
4
But they’re also lazy quotes, because it takes effort to make them not do that on mobile, so I don’t think they’ll be motivated enough to usurp me.
02:03
!!/hug
Bot iz ded
:(
Can you be bot?
02:38
@emanresuA (づ。◕‿‿◕。)づ
Since am bot, I will now disappear without reason and will not return for at least 5.782 hours.
dang
03:22
morning
03:32
Yes
afternon
Muy afternon
 
1 hour later…
04:57
does anyone know whose sock is vyxal-cookie
or is it still a mystery
 
2 hours later…
07:10
still a mystery
07:24
One thing I need to work on is generating testing functions from the YAML
because that's why there's a tests key
to help automate testing
meaning I need to learn how to YAML with python
07:41
@exedraj pip install pyyaml?
already done that
now I'm trying to figure out why it's telling me it's invalid
07:55
Probably indentation or something
 
2 hours later…
Welcome to the team :p
@PyGamer0 ^
@exedraj thx
Lol not like being a RO makes any difference
But hey you can now pin messages
Anyhow I gotta go now
I'd use the bot command, but the bot is dead
o/
If you do bot command I can be bot
!!/mak me coki
10:17
@PyGamer0 No, you sussy baka.
@emanresuA well i programmed the bot to always give me the cookie
except for sudo
and that output is for sude
Sorry (not sorry), I reprogrammed myself.
ooooofffff
 
3 hours later…
13:26
@exedraj use codecov??
I'll look at that tomorrow
but I do know that we're already using pytest
combined with YAML for auto generation of test for elements
@exedraj so it should be easy to integrate with it
13:42
The auto-generated YAML half works
I'm very happy with that
also WhErE bOt
@hyper-neutrino ^
14:02
4048
A: How do I break a string in YAML over multiple lines?

Steve BennettThere are 5 6 NINE (or 63*, depending how you count) different ways to write multi-line strings in YAML. TL;DR Use > most of the time: interior line breaks are stripped out, although you get one at the end: key: > Your long string here. Use | if you want those linebreaks to be preser...

@exedraj ^
To help you with the YAMLing
14:27
ysthakur opened PR #226 (Vyxal/Vyxal) (Vyxal:ysthakur-patch-1 → Vyxal:master): Update fb-testing to work with fb
!!/status
How was the PR reported but this doesn't work? Is the regex broken again?
15:08
@PyGamer0 Maybe it's you
@user nah idk how to make socks and i dont want to make a sock nor do i want to use another phone to make a sock
I was joking lol
Not joking lyxal
 
4 hours later…
18:52
19:30
i'll fix the bot on friday when i get home
codeanywhere is too hard to use on mobile
one of y'all can probably run a separate copy of the bot if you really care, the settings will just be wrong like who's sudo and who's admin
you'll need to figure out the config file format yourself tho
I was thinking about hosting a copy of the bot on pythonanywhere, just in case
19:55
!!/status
@hyper-neutrino I am doing nothing except answering your requests.
huh?
i fixed it?
since when?
ok never mind i guess the bot is fixed then
it gave me a port occupied error and i couldn't be bothered to fix it
!!/issue `ḃ` doesn't vectorise The `ḃ` command doesn't automatically vectorise, so when you try to use it on a list of numbers, it just returns 0. It should be changed to automatically vectorise, because at the moment it's pretty much useless on lists without `v`.<br><br>Example: Try it Online! enhancement on hold
19:56
Vyxal-Bot opened issue #227 in Vyxal/Vyxal: `ḃ` doesn't vectorise
oh wait
this only breaks one direction
never mind i guess it doesn't
ok not sure how the bot works but
guess it does
@AaronMiller I was too lazy too do that on github earlier
 
4 hours later…
23:52
!!/sus
@exedraj ඞ
Thank you vyxal bot for the epic victory royale
@VyxalBot hug
@exedraj ⊂((・▽・))⊃
:D
Dang i need a command to pat vyxal bot
Because robots need patting sometimes

« first day (495 days earlier)      last day (1278 days later) »