« first day (4008 days earlier)      last day (118 days later) » 

12:00 AM
Welcome to the eleventh Learn You A Lang for Great Good! Today, we'll be learning Vyxal, a golfing language that aims to be both short and readable. During the day, Vyxal Bot will be active to assist people learning Vyxal, see the pin below for information about how to use it. During the event, feel free to post CMCs to practice Vyxal, ask questions about the language and so on.
12
 
pog
i was about to say in 1 sec
 
CMC: Output [1,1,2,2,2,3,3,3,3,4,4,4,4,4...n,n,...]
 
Is there supposed to be only 2 1s but 3 of everything else?
 
I'm not quite sure what the pattern is supposed to be either
but on a completely different note, we've got roughly 47 CMCs for y'all to do over the next day lol
 
wow
that's one every half hour
 
12:03 AM
I was busy last night lol
 
We're using this as a prime marketing oppurtunity /s
VMC: Given a string, determine if it contains entire lowercase letters
 
@emanresuA Is it your 2nd, 3rd, 5th or 7th marketing opportunity?
 
@BgilMidol I've got 7 bytes
!!/run ɾƛ›$ẋ;f _ 5
 
@lyxal ⟨ 1 | 1 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 4 | 4 | 4 | 4 | 4 | 5 | 5 | 5 | 5 | 5 | 5 ⟩
 
nice
 
12:06 AM
Before I start pouring out the CMC tank, does anyone want a short introduction/recap on the basics of Vyxal?
 
how to unlist a list
i forgot
 
@Niko you probably want ÷
!!/run ⟨4|3|7|4|1⟩÷
 
@lyxal 1
 
CMC: Output 2&3&4&5&6&7&8&9&:&;&<&=&>&?&@&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&[&\&]&^&_&&a&b&c&d`
 
@lyxal well if anyone wants a tutorial/explanation of anything, just ask me
 
12:09 AM
@BgilMidol (generated with print("&".join(map(chr, range(50,100+1)))))
 
@lyxal Or me
 
@emanresuA Or me
 
Þ∞÷ƛ:›(:)
 
... that won't work
 
@BgilMidol 9 bytes:
!!/run ₁:½$ṡC\&j
 
12:11 AM
yes
 
Þ∞÷ fails completely
 
@lyxal 2&3&4&5&6&7&8&9&:&;&<&=&>&?&@&A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V&W&X&Y&Z&[&\&]&^&_&`&a&b&c&d
 
it timed out
sad for me
 
Because you're appending an infinite list to the stack
 
^
 
12:11 AM
So whatever happens is undefined
 
And further, you're then mapping over an infinite range
 
@lyxal how does vyxal?
 
!!/run Þ∞ƛ:›(:)W - 5
 
theoretically it should work(if it will ever output lol)
 
@AaroneousMiller get keyboard and mash
 
12:12 AM
[@emanresuA: 60188502]
⟨ ⟨ 1 | 1 | 1 ⟩ | ⟨ 2 | 2 | 2 | 2 ⟩ | ⟨ 3 | 3 | 3 | 3 | 3 ⟩ | ⟨ 4 | 4 | 4 | 4 | 4 | 4 ⟩ | ⟨ 5 | 5 | 5 | 5 | 5 | 5 | 5 ⟩ | ⟨ 6 | 6 | 6 | 6 | 6 | 6 | 6 | 6 ⟩ | ⟨ 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 | 7 ⟩ | ⟨ 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 | 8 ⟩ | ⟨ 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 | 9 ⟩ | ⟨ 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 | 10 ⟩ | ⟨ 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 | 11 ⟩ | ⟨ 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 | 12 ⟩ | ⟨ 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 | 13 ⟩ 
 
@lyxal vtc Vyxal as dupe of Perl :P
 
@lyxal instructions unclear, i jellyed instead
 
CMC: Calculate if a string has both leading zeros and trailing zeros
 
Oh, and if we can keep outputs from the bot short if possible, that'd be great :)
 
@cairdcoinheringaahing can't believe I just got dupe hammered on a language
@AaroneousMiller rotate the keyboard upside down and try again
 
12:14 AM
ah, much thank
 
But caird doesn't have gold !
 
ovs and lyxal are the closest
 
VyMC: Return the nth fibonacci number without using ∆f or ÞF
for this, you'll be wanting to either use a for/while loop or and a lambda
 
Does Vyxal have recursive lambdas?
 
12:16 AM
Yes
 
x calls the current lambda/function
 
Please use the 5 flag for anything infinite as the Vyxal interpreter is single threaded.
 
^
 
CMC: Output ⟨ ⟨ 0 ⟩ ⟩ with exactly seven bytes
 
@BgilMidol ww#####
 
12:17 AM
ninja’d
 
@emanresuA I have powowow
rainbow also works
 
@lyxal on the topic of lambdas, I think I'll give a little explanation of how they work.
First, the syntax for a lambda is λ...
the arity of the lambda can be modified by including a number and a pipe after the λ
 
λ<optional arity>|<body>;
 
exactly.
lambdas push themselves to the stack
as if they were any old item on the stack
almost like writing stack.append(lambda args: body)
you can call a lambda on the stack using
this is like writing stack.pop()(args)
you can do other cool things with lambdas. Look for elements with fun overloads
 
!!/info
 
12:22 AM
@lyxal I have 6 bytes for both versions
 
Oh the list of elements page looks new
 
@BgilMidol it's magically autogenerated from a massive YAML file
@emanresuA is the md5 of the generator version 606437e2987305c6e1916db44a7007a4?
 
Where did the old one go?
 
@BgilMidol it was overwritten
 
12:24 AM
I prefer the old one
 
@lyxal speaking of type overloads, I might quickly address that
unlike languages like 05AB1E and Jelly where all built-ins do only one thing, Vyxal elements can do multiple things depending on what types they're given
The types that exist within Vyxal are number, string, list and function
which are abbreviated num, str, lst and fun respectively
 
@lyxal No, it's 89317d79b8a25c3600e353414899c2ef
 
can’t turn str into num
sad
 
@Niko got you covered
 
And the iteration based one is f51b5f22847c0448e300d52ff88e7c80
 
12:27 AM
!!/run `69000` 1+
 
:D
 
@lyxal 690001
 
pog
 
!!/run `69000` ⌊1+
 
@lyxal 69001
 
12:28 AM
as you can see, the first performs concatenation because it has str, num as its types
the second performs addition because it has num, num as its types
@emanresuA w...how?
 
The answer is in your email
 
VyMC: Return the factorial of the input without using ¡ or Π
 
Hint: ƒ
 
Make a range to input, then reduce with *?
 
@emanresuA speaking of ƒ, this is a perfect opportunity to introduce the topic of modifiers
 
12:36 AM
Nah, find the first positive integer divisible by all of 2, 3, ..., n :P
 
Modifiers are like quicks in Jelly except prefix
 
@cairdcoinheringaahing (yes, I know this doesn't work)
 
They can stack
For example, v is a modifier that vectorises whatever comes afterwards
 
I got this but it doesn't work for 0 afaict
 
The current list of modifiers is ß&v~₌₍⁽‡≬
 
12:38 AM
Let's just pretend 0 doesn't exist
 
The function stuff ⁽‡≬ group the next 1 / 2 / 3 elements into one when in modifiers
 
@BgilMidol ₍ht0=∑2=
too long too sad
 
@user Try it Online! for 4 bytes and 0 support
 
gonna go prep for test
 
Bye
 
12:39 AM
o/
 
@cairdcoinheringaahing I'm sure it could work with some modifications (turning 2, 3, ... into a multiset of their prime factors, then checking the prime factors of all numbers?
 
!!/run v‡4+ - [1, 2, 3, 4, 5]
 
@emanresuA ⟨ 5 | 6 | 7 | 8 | 9 ⟩
 
@Niko i should do that too
 
@lyxal ₌₍ are both "parallel application" modifiers
 
12:40 AM
@user Yeah, get the prime factors of 2 through n, get the prime factors of each number, find the first integer that matches
 
v    # Map the next element over the input
 ‡   # The next two elements as a single one
  4+ # Add 4
 
@lyxal that means that they take the next two elements (which can be single built-ins, structures, other combinations of modifiers) and apply them to the same stack, merging the results
e.g.
!!/run 3 4 ₍+-
 
@lyxal ⟨ 7 | -1 ⟩
 
It does 3 4 + first then 3 4 -
 
@emanresuA they're like Jelly's binding quicks except they don't specify arity
 
12:42 AM
leaves the results on the stack and places the results into a list
@emanresuA and if you want to specify arity, you can multiply them by the desired arity
 
@pxeger well, I repcapped yesterday, which is unusual
 
!!/run 3 6 ⁽+†
 
@lyxal 12
 
!!/run 3 6 ⁽+2*†
 
now up to 1<<6 repcaps!
 
12:43 AM
@lyxal 9
 
!!/run 1 6↲
 
@lyxal 64
 
that's 1 << 6 lol
 
I've repcapped 19 times :P
 
@VyxalBot as you can see, the arity of the single-element lambda was modified to be 2
because it takes two items instead of one
 
12:46 AM
@emanresuA you mean like this? :P
 
Uh... no
 
@AaroneousMiller eh close enough
 
@emanresuA but it uses ƒ tho
 
Clever but not what I meant
 
12:50 AM
I was more thinking something like 1ṡƒλ2|⅛‹(¼:⅛)!(+);
but yours is closer ;p
fun fact: 1ṡƒ‡1[⅛‹(¼:⅛)!(+)] also works
because structures are considered as an element to modifiers
 
@lyxal shouldn’t that return 1 tho?
It returns 0
 
@AaroneousMiller wdym?
it's a factorial implementation
 
But factorial(0) is 1
 
it returns 1 for 0
!!/run 1ṡƒ‡1[⅛‹(¼:⅛)!(+)] - 0
 
@lyxal 1
 
12:54 AM
@lyxal Hey
 
@Fmbalbuena howdy
 
sorry
!!/help
 
@Fmbalbuena !!/run `code` `flags (- to exclude)` `input line` `input line` ...
 
!!/info
 
12:54 AM
!!/random
 
@lyxal That’s not the message I replied to, I was replying to the 4 byter
 
@GingerIndustries hi!
 
!!/i am privileged
 
@AaroneousMiller huh, so it does.
 
Here’s a valid 4 byter w/ a flag: Try it Online!
 
12:56 AM
Ready for the next VyMC?
 
VyMC: print "Hello, World!"
 
!!/run kH
 
@lyxal Hello, World!
 
ez
 
@lyxal already there is, but you should do this in 1 byte
 
12:57 AM
there is no one byte way to do it
 
if you don't know then you are Noob
 
in Vyxal, 2 hours ago, by lyxal
Guess I'm just bad at vyxal
 
this has blanked
 
VyMC: Return whether an input is a prime number without using any of †æpṗṖǎǏǐ
 
@AaroneousMiller wait
 

« first day (4008 days earlier)      last day (118 days later) »