A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.
After two years of top-secret development, we've created the ultimate version of Vyxal, light-years ahead of any other golfing language. We present to you: Vyxal 42.0.
More comparison operators
We've decided our current suite of comparison operators wasn't enough, so we added more. Vyxal 42.0 comes with ⩵
, ⩶
, ⩳
, ≃
, ⩾
, ⩽
, ⪌
, ⪋
, ⫺
, ⫹
, and ⪮
for all your comparison needs.
Lisp mode
Any piece of vyxal code that parses as valid Lisp will now be interpreted as a vyxal-based dialect of Lisp.. For example, instead of writing the boring old 1 5 + 2 * ? "x" j *
, you can write:
(*
(j ? "x")
(* 2
(+ 1 5)))
Haiku compliance
Worried that your Vyxal code isn't haiku-compliant? No more! With the new ḣ
flag you can ensure your code is a valid haiku.
> vyxal -ḣe "₇₀‛⁋k
ḋ←«Nꜝȯŀ
«ṅṅD⟑"
Code is haiku-compliant.
VYX
VYX is Vyxal 42.0's form of JSX. Embed arbitrary HTML in your Vyxal code with ease, and interpolate vyxal code within HTML.
#<div style={`width: %px`?%} onclick={`Hello, World!`,}>
<p>Hello, World!</p>
</div>
VyMail
Ever needed to send an email with Vyxal? Now you can?
> `*********@gmail.com` `Subject` `Hello, World!` #m
(Note: Outgoing mail may be used for promotional communications)
alvyxay
Vyxal 42.0's literate mode now supports Pig Latin:
> vyxal -el "5 ap<may 2 usplay endway"
[3, 4, 5, 6, 7]
Cat detection
We've added an advanced cat detector to determine whether a program was written by a cat, to avoid any issues with your cat stepping on your keyboard.
> 12====================;l;;;;;;;l
Cat detected. Please type "vyxal" to continue:
Uwuification
Vyxal 42.0 includes an uwuification builtin for all your uwuifying needs.
> `Vyxal is terse, elegant and readable` #u
Vyxaw is t-t-t-tewse, ewegawnt awnd weadabwe (ㅅꈍ ˘ ꈍ)
Infinite list summation
We've added support for summing infinite lists:
> Þ∞ƛ4≤;∑
4
> Þ∞∑
-1/12
It can also solve the Fermat Prime Conjecture:
> Þ∞ƛEE›æ;∑
5
(note: This functionality only works on quantum computers)
Cookies
Of course, Vyxal 42.0 wouldn't be complete without cookie functionality. Whereas older versions of Vyxal simply printed a cookie emoji, Vyxal 42.0's cookie builtin #🍪
will launch* a cookie directly to your location from Vyxal Corp HQ.
* Recipient may not survive delivery
All this and more with Vyxal 42.0! Click here to download.
Alternatively, the long overdue release with far too much stuff
So 3.5 is slowly coming along - the lexer is still under construction. In the mean time, here's a 3.4 release.
compare
by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2043
Θ
by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2059
İ
by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2060
ċ
by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2067
≠
vectorize by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2068
toVyxal
on GetVar
and SetVar
having wrong syntax by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2070
reshape
function & ÞR
element by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2069
ʀ
behavior with negative numbers by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2073
ŀ
collect by @lyxal in https://github.com/Vyxal/Vyxal/pull/2078
enum
, and group similar flags together by @RubenVerg in https://github.com/Vyxal/Vyxal/pull/2080
enum
, and group similar flags together" by @GingerIndustries in https://github.com/Vyxal/Vyxal/pull/2081
Full Changelog: https://github.com/Vyxal/Vyxal/compare/v3.4.0...v3.4.1
The OOPdate
with the correct build.sc attribute this time 🫠 (thanks to @TomaSatj for pointing that out)
!
in the parameter list) will now assign
to any arguments that aren't !
sÞẠ
performs multi-dimensional assignment. That is, it sets an item in a ragged
listÞi
performs multi-dimensional indexing. That is, it gets an item in a ragged
listi
will retrieve an attribute of a record, assuming the attribute is readable in context.Ạ
will write to an attribute of a record, assuming the attribute is writable in context.Alternatively, the infinite lists and inputs update
a
s. This is breaking because
any previous base-252 compression will now be invalid.ṫ
(tail-extract
) pushes a[:-1], a[-1]
instead of a[-1], a[:-1]
.ᴴ
(apply to head
) now vectorises dyads over the head of and the rest of an iterable.#?
returns a list of all inputsÞṆ
returns a list of all Ṇatural numbers >= 1ÞṬ
returns a list of all inṬegersÞP
returns a list of all the Prime numbersÞι
multiplies each item of a list by its 0-based indexÞκ
multiplies each item of a list by its 1-based index#¿
returns the number of inputs given to a program.#¤
returns the number of arguments in a context.Þ÷
splits a list into n chunks of equal size.÷
will now split a string into n: number
chunks of equal size.None
R
flag has been added to make numbers cast to range in iterable
contexts<-}
define
structure already has a pull request, it'll be added in 3.4.0, as the list of new things needed to be capped.Alternaitvely, the regular show expression update
ṅ
's set difference
behaviour has been made an overload of ṡ
.ṅ
is now palindromise
, rather than Ḥ
.Ẇ
performs the lst, lst
overload of ṡ
(partition into lengths)Ḥ
is once again a shortcut for ḣ$
.₉
now pushes an empty string instead of an empty listÞ0
is zero padḣ
now works on numbersM
performs regex-match
on two strings.ẋ
performs regex-search
on two strings.ẋ
will also now perform cartesian product with self
when given two listsḶ
escapes a string for usage in regex.Q
performs regex-groups
on two strings.y
can find all matches of a regex in a string.Ḋ
returns the span of a regex match.R
returns whether a regex matches a string at all (as compared to M updot which checks if an entire string matches)Ġ
finds all matches of a regex in a string, with overlapsẠ
can be used to perform regex substitution,
on the online interpreter to enable live
output. Use it at your own risk on Chromium browsers.Alternatively, "hey I've seen this one before! (2.7.0)" "what do you mean you've seen it before? it's brand new (3.1.0)"
Alternatively alternatively, "so, you've been busy huh..."
This release was bound to happen - there's no way version 3.0.0 had everything present in the latest 2.x release. It's taken 2 years of PRs and feature requests to achieve the level of stability of version 2. Here's to the many releases until v3 matches the expansiveness of v2.
Ḥ
has been changed from being a shortcut for ḣ$
to being palindromise
. Forgot that one.matrix inverse
overload of Ṃ
has been shifted onto a digraph (ÞṂ
). Ṃ
is now num: a ** -1
, str: a.split(" ")
.ṅ
has been changed to perform set difference
. Its old behaviour has been shifted to ”
(more on that later)Ċ
has been changed to perform symmetric set difference (set xor)
. Its old behaviour (cycle
) has been shifted onto a digraph (ÞĊ
)Q
has been changed to be equivalent to ⟇
in Vyxal 2 (remove at index
). The exit the program
overload has been put onto the digraph #Q
⁺
is now powerset
, as:²
is now num: square
, str: a split into pairs
. Lets be honest, how often are you going to need a third input? Jelly doesn't have a third input and it does just fine.ᶿ
is now bifuricate
(push the reverse of the top of the stack without popping). Unsafe (i.e typical order) cartesian product has been changed to ÞẊ
.⁾
is no longer surround
. Instead, it is now lst, lst: set intersection
, lst, num: flatten by depth
, num, str: character multiply
.₈
now pushes -1
instead of "abcdefghijklmnopqrstuvwxyz"
. n
now pushes that instead, when not inside any contexts.ᵒ
now casts numbers to range before tabling.Ṅ
has been changed to be num: is prime?
, str: quine cheese (prepend quoted form to string)
.There may be one or two other breaking changes I missed. However, the above changes are the main ones.
„
, ”
, “
now perform functions when not closing a string. These have taken on the join <thing> on (space|newlines|newlines)
elements (respectively). The idea here is that their functionality will never be performed on a string literal, so the string is going to be closed regardless of what closer is used. Therefore, they can be used as joining elements.R
now performs set union when given two lists.q
will now return the nth
prime when given a number. This was really nasty to implement - I had to borrow some of python's random
library to even begin implementing the list of all primes
function.⌊
has been given it's string to number
capacity that it has in Vyxal 2. It's different to standard eval
in that it removes non-numbers and will not evaluate lists.Þo
to get the horizontally + vertically adjacent cells (without wrapping around), ÞO
to do that but with wrapping around, Þȯ
to get all 8 neighbours (4 + diagonals, no wrapping), and ÞȮ
to do that but with wrapping. All 4 grid elements can also take a number as an rhs value to specify a) which cell to start from (then heading clockwise), and b) whether to include the middle cell. See the element descriptions for more info.∆q
returns the exponents of all prime factors of a number.∆ḟ
returns the exponents of all prime factors of a number, including 0s for primes that are not in the prime factorisation.h
flag.scala-parser-combinators
was used for lexing. fastparse
is the library used now, so a little cleaning was needed. @AMiller42 did that little cleaning (it's called he did a little cleaning).{1,}
- a while loop infinitely printing 1
), the browser won't be trying to play catch up. Technically the print requests will be queued by the browser, but they won't be acted upon.See y'all next time with the next release.
~lyxal
Full Changelog: https://github.com/Vyxal/Vyxal/compare/v3.0.0...v3.1.0
Alternatively, wake up babe, new major vyxal version just dropped.
In June 2021, the concept of a "Vyxal 3" was floated for the first time; it was going to be a minor upgrade to the parsing system and mostly consisted of a rerolled elements list. The idea was that it was going to be a quick in-and-out job - implement stuff, release and potentially start on further versions to keep improvements churning out. Thankfully, that idea didn't happen - spending several months on the version 2 rewrite has turned out to be a really good thing.
As version 2 long-term support took priority, Vyxal 3 was put on the back burner. For six months, it was left mostly untouched, with only a few planning artifacts generated. However, that time was crucial for learning about what works and what doesn't work when it comes to gofling languages. Indeed, the feature requests, bug fixes and code golf answers all helped to create a deeper knowledge about what a third iteration of Vyxal should look like.
Therefore, it's a good thing that it has taken this long to release this version. If the quick-release idea of 2021 had been implemented, then the resulting product would not have been as polished or as thought-out as it is now.
Before I get into the "what's new" section, I'd like to take a moment to shoutout @ysthakur, @Steffan153, @nayakrujul and everyone else who helped out along the way. Without the support of many people much smarter than I am, this release would have been delayed even further than it already is. @ysthakur and @Steffan153 were key to creating the infrastructure for the interpreter and element implementations - if they hadn't worked on VyxalS, the core parts of Vyxal 3 would not have been ready to go. And if it wasn't for @nayakrujul, a lot of elements would still be unimplemented, and some key golflang features would have been missed.
And of course there's also people like @gingershaped who developed and maintained the bot used in the Vyxal chatroom. The bot's services were (and still are) extremely helpful for knowing when commits had been made, when PRs had been opened, and when cookies needed to be eaten. Well, maybe not that last one, but things like the bot's status commands provided great morale boosts when things got slow and tedious. And people like @chunkybanana and @Seggan and @UnrelatedString and @zoomlogo and @mathcat4 who have stuck around since the beginning.
Anyhow, here's what's new!
See, I told you, here's the header! But more seriously,
The first majorly obvious new thing is the codepage. It's been completely redesigned to fix some of the issues with the old codepage. For example, there's a section of the codepage dedicated to modifiers. Also, uppercase updot letters have been moved to come before the lowrcase updot letters, as that's something that's always bugged me about Vyxal 2.
Another majorly obvious new thing is the new element set. There's a new focus on list manipulation that wasn't present in version 2 - when submitting code golf answers, I'd oftentimes notice that languages like Jelly and 05AB1E had operations like "partitions of a list" as a single byte where Vyxal had it as 2 bytes. The full list of elements can be found here.
One of the things that has always been a problem is backwards compatibility; because version 2 relies upon a free pythonanywhere plan for hosting the online interpreter, a permalink versioning system isn't possible (500mb of storage would fill up far too quickly if all 130+ releases were supported). Therefore, major language changes could not be made, meaning that any bad design choices were basically carved in stone - breaking thousands of code golf answers isn't ideal.
With version 3, the intention is that major changes can be easily made without breaking tons of existing answers, something that can be accomplished through archiving previous version code on a repository. Thankfully, Scala can compile to Javascript through scala.js, meaning that archives can be served entirely through github pages. No more forced staying in the past!
Structures such as the ternary, for loop, while loop, and lambda variants have always been a defining feature of Vyxal - they allow for easy control flow handling and for byte shaves where closing a function would be costly. Now, there are a few new structures joining the cast: a) reduce lambdas, b) decision problem structures, c) generator structures, and d) a dedicated if-elif-else structure. These structures can be seen in the tour file.
Where Vyxal 2 only had a handful of modifiers, Vyxal 3 has over 20. This increase is because modifiers have proven to be quite powerful - they allow for concise wrapping of elements in functionality that would otherwise take a lambda followed by an element. Further, arity grouping has been introduced to make modifiers even better. You can read about these things in the README on the main branch, or in the tour file.
A final major cool thing in Vyxal 3 is literate mode. This is probably my favourite new feature, as it allows Vyxal programs to be written using actual words, rather than symbols. As a brief example, here's a collatz conjecture program in literate mode:
## A collatz conjecture program
stdin := n
(. scan-fix: {if even? then halve else increment endif}) := collatz
$n $collatz call
You can find out more about literate mode here
Anyhow, that's a very brief overview of what's new with Vyxal 3. There's going to be a whole lot of things I've missed, but that's okay. This release note would be far too long if it were to summarise every single new thing.
I'd like to thank everyone who has stuck with us (us = Vyxal team) over the last 3 years, and everyone who has contributed code, time, ideas or support. This would be a whole lot harder if there wasn't a whole community to support the development process.
Having said that, that's it. That's the release notes, and that's Version 3 released to the public.
Would you like a cookie? 🍪
~ lyxal
So you're probably wondering why this isn't a 2.21.x release and a brand new minor version.
Well turns out the codepage didn't 100% match ascii, so it was changed. This is a breaking change, so it needs to be in its own minor release.
Also, Ǔ and ǔ are considered monadic to modifiers now. That was also a change that was made.
ǒ
to be table by @Lyxal in https://github.com/Vyxal/Vyxal/pull/1950
Full Changelog: https://github.com/Vyxal/Vyxal/compare/v2.21.12...v2.21.13
Full Changelog: https://github.com/Vyxal/Vyxal/compare/v2.21.11...v2.21.12