« first day (386 days earlier)
← previous day
next day →
last day (1082 days later) »
Wezl
12:00 AM
how do the types work?
lyxal
@Wezl learn vyxal so you can win at code golf
@Wezl there's numbers, strings, lists/generators and functions
lyxal
12:22 AM
I think I've made vectorisation great again
8 hours later…
Wasif
8:32 AM
how to subtract two element in list like
[2,1]
to
2-1
@lyxal ^
lyxal
÷-
is one way
⁽-ḭ
is another
÷-
is "push every item of the top of stack onto the stack and subtract"
⁽-ḭ
is "reduce right by function subtraction"
@Wasif
Wasif
thx
also how to execute a block of code n times
lyxal
8:55 AM
For loop
Wasif
oh range then a loop?
A username
What's the "global array"
lyxal
@Wasif No, simply number than loop
@Ausername the global array is an array accessible from anywhere - whether it be in a function/lambda or in main execution flow
Think of it as a register in the form of a stack
A username
@lyxal Ok, thanks!
lyxal
No worries I'm happy to help
@Wasif
3(...)
repeats the code 3 times
Because the for loop auto casts numbers to ranges, just like maps/filters/etc
Wasif
9:04 AM
also how to invert the sign of a number?
like -1 to 1 and 1 to -1
lyxal
N
Also, I'll be unavailable for the next 2 hours
o/
Wasif
bye @lyxal
good night
A username
@lyxal 7-9pm Australia time, so I'm guessing dinner?
Wasif
Yes! I have completed 5 vyxal answers in 30 day period! (I hope now bounties are eligible)
A username
Nice! I'm still working on number 1.
Wasif
9:12 AM
@Ausername go on
we believe in you
A username
@Wasif Thanks
How do I push to a list on the stack?
Wasif
@Ausername push to a list?
not stack?
A username
@Wasif Nvm, worked out a different way to do i
Wasif
then you have
J
builitin to do so
A username
9:53 AM
code to clear global array?
Also @lyxal
Your compressed Hello, World! example
outputs something else entirely.
A username
10:38 AM
@lyxal
My first Vyxal answer
It's awful I knoow
Bounty plz?
lyxal
10:58 AM
It's coming, I might have to wait a while to award it.
@Razetime get in here we've got a 5 answer bounty to award
lyxal
11:15 AM
@Ausername yes
lyxal
11:31 AM
@Ausername
1+
→
›
,
`<char>`
→
\<char>
A username
@lyxal Thanks!
lyxal
No worries
You've probably noticed the bounty :p
A username
Yes.
Working on another one.
Razetime
@lyxal yeye
lyxal
Well it doesn't matter now does it.
A username
11:56 AM
#2
lyxal
12:08 PM
Hey y'all should check the two new tips and upvote them
Because I need more rep because I'm giving it away
A username
I gave you a silver badge yesterday.
(On my question-voting spree to get electorate)
lyxal
Thanks you
A username
3/5
lyxal
12:26 PM
Lol FYI I can't award the bounty until I award the 3 ones I currently have going
You might be waiting a week for the 100 from me
A username
Ok.
A username
1:01 PM
4/5
lyxal
Stack mechanics (such as swapping, rotating and implicit input) could probably help shorten some of these
But with that,
24 hours ago
, by
lyxal
2 days ago
, by
Lyxal
2 days ago
, by
Lyxal
yesterday
, by
Lyxal
24 hours ago
, by
Lyxal
Okay so quick heads up, I'm going to be unavailable for the next 8 or 9 hours due to sleep
24 hours ago
, by
lyxal
2 days ago
, by
Lyxal
2 days ago
, by
Lyxal
yesterday
, by
Lyxal
24 hours ago
, by
Lyxal
If anyone has any questions, I'll make sure to answer them as soon as possible
o/ for now
A username
Bye
4 hours later…
hyper-neutrino
5:24 PM
@lyxal
Ė
(reciprocal) seems to wrap its elements when vectorizing: e.g.:
⟨1|2⟩Ė
outputs
⟨⟨1⟩|⟨0.5⟩⟩
is this some intended behavior i'm not familiar with or a bug
also imagine not having a favicon
smh
hyper-neutrino
5:39 PM
non-vectorizing inequality doesn't work:
Try it Online!
hyper-neutrino
6:05 PM
rotating ranges doesn't work because they are generators:
Try it Online!
is there any particular reason ranges are generators rather than just being lists?
does vyxal have operators / "quicks" (higher level functions)
or do you have to push functions to the stack and then use like map/reduce/whatever
i know about maplambda but like
3 hours later…
A username
9:05 PM
Lyxal will wake up in an hour or so.
1 hour later…
A username
10:17 PM
#5
« first day (386 days earlier)
← previous day
next day →
last day (1082 days later) »
all rooms
Transcript for
May
7
May '21
8
May
9
Vyxal
For discussion about Vyxal. Repo:
github.com/Vyxal/Vyxal
| Org:
...
1
actually-12-now
chat-bot
code-golf
dank-memes
discord
epic-gamers
joe
never-gonna-give-you-up
powered-by-copilot
rickroll
short-programs
too-many-tags
unicode
vyxal
vyxal-bot-2
we-currently-have-11
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile