Vyxal Versions Save

A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.

v42.0

1 month ago

Vyxal 42.0

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.

New features

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)

Screenshot 2024-03-27 at 2 32 08 PM

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.

v3.4.1

3 months ago

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.

What's Changed

New Contributors

Full Changelog: https://github.com/Vyxal/Vyxal/compare/v3.4.0...v3.4.1

v3.4.0

4 months ago

Version 3.4.0

The OOPdate

with the correct build.sc attribute this time 🫠 (thanks to @TomaSatj for pointing that out)

Breaking Changes

  • Lambdas operating on the stack (with ! in the parameter list) will now assign to any arguments that aren't !s
  • Set operations no longer uniquify their result.

New Elements

  • ÞẠ 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 list

New Overloads

  • i 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.

Bug Fixes

  • Set operations no longer uniquify their result. Instead, they behave like APL set operations.

Other Changes (QoL, Interpreter, Ecosystem, etc)

  • There's now a redefine-element structure to allow for custom elements and modifiers.
  • There's also now support for OOP through Records and extension methods.

Closing Remarks

  • In the next release, expect codepage changes, a changed list of modifiers, better symbol choices for built-ins, and the introduction of a lot of missing things like combinations, random choice, etc.
  • New online interpreter is imminent, like actually for real this time

v3.3.0

4 months ago

Version 3.3.0

Alternatively, the infinite lists and inputs update

Breaking Changes

  • Base-252 string compression has been fixed to not remove leading as. 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.

New Elements

  • #? 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.

New Overloads

  • ÷ will now split a string into n: number chunks of equal size.

Changed Overloads

None

Bug Fixes

  • Special lambdas no longer try to read parameters in literate mode
  • Lambda to newline now handles modifiers inside the lambda properly.

Other Changes (QoL, Interpreter, Ecosystem, etc)

  • The R flag has been added to make numbers cast to range in iterable contexts
  • More keywords have been added to the literate mode for structure syntax.
  • Lambda to newline now has the keyword <-}

Closing Remarks

  • While the 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.
  • New website imminent.
  • Some development time was actually spent playing Undertale Yellow. It's a great fan-game set as a prequel to Undertale, and has a banger soundtrack. Also, it's free. You should go play it.

v3.2.0

5 months ago

Alternaitvely, the regular show expression update

Breaking Changes

  • '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

New Elements

  • Þ0 is zero pad

New Overloads

  • now works on numbers
  • M 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

Bug Fixes

  • Subtract now properly vectorises

Other Changes

  • The online interpreter no longer uses live output by default. Chromium browsers were having issues with a load of output request events overriding the timeout function. Use the , on the online interpreter to enable live output. Use it at your own risk on Chromium browsers.
  • Tests can be exlcuded from being run under native.

Closing Remarks

  • As you can tell, this was mostly a regex update, with a few set elements thrown in.
  • This 3.2.0 release is earlier than a Sunday so that a base-255 compressed string patch can be made without breaking permalinks coded as 3.2.0.
  • I may have missed one or two changes, but the regex is the most important part.
  • New website structure coming soon.

v3.1.0

5 months ago

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.

Breaking Changes

  • has been changed from being a shortcut for ḣ$ to being palindromise. Forgot that one.
  • The 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.

New Overloads

  • All of , , 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.

New Elements

  • If you've ever attempted Advent of Code, Conway's game of life, writing a befunge interpreter, or anything to do with grids, you'll know that finding the neighbours of each cell is a useful operation. Therefore, 4 digraphs have been added to assist with gridding: Þ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.

Other New Language Features

  • A preliminary set of CLI flags have been added. View them with the h flag.

Bug Fixes

  • Printing an infinite list will now actually result in output. Previously, the printing function used internally tried to cast the entire list to string. Obviously, this will never return a result because well how can you turn an infinite list into a string all at once it's infinite what do you expect it's just gonna keep running forever and ever that's like the definition of infinite do you not think that's what infinite means? Now, items will be printed one at a time. Basically, instead of a long-running sentence being generated at once, it'll be procedurally written, with punctuation, and you'll be able to understand it.
  • Printing strings within a list will now quote the strings. Forgot to make it do that. Big brain.
  • Printing functions will execute them before printing the result. This brings it in line with the vyxal 2 behaviour of printing functions.

Quality of Life Changes

  • The interpreter (both JVM [and possibly native? I forgor] and js) gives better error messages now. Instead of just giving some weird-ahh random stack-trace thing, it'll return a simple explanation by default. Cheers to @AMiller42 for making errors great again.
  • The lexer and parser have been refactored to remove a legacy exception class. They both contained code that was needed when 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).
  • The online interpreter will no longer keep printing beyond 10000 print statements. This means that if you halt a program that generates a lot of print statements really quick (e.g {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.
  • Further, print statements from a previous program execution will no longer interrupt/mix with future program executions. Who knew high efficiency could be problematic? Not me that's for sure.

Closing Remarks

  • Expect more releases with breaking changes like this one. It's still early days, and there's still a lot to re-implement from v2.
  • There's likely to be a few changes I missed when writing these notes. Hopefully they shouldn't be too much of a surprise, as the real major things have been listed.
  • I wanted to have like a conclusion section that tried to be witty or something but I didn't know how to make it a paragraph. So instead, I made it a section with list items. Also, I threw in a random fact. Everything after this sentence in list items is for fun and to make the release notes not so bland.
  • This sentence really didn't need to be a list item, but for consistency, because I can, and because it makes for a good meta-joke, I made it a list item.
  • They put plastic lining inside coca-cola cans so that the liquid inside does not get tainted by the aluminium. No seriously they do. Look it up if you don't believe me. I discovered this from a youtube short. Education! (tm)
  • My hand is sore from writing all these notes. Ouch.

See y'all next time with the next release.

~lyxal

Full Changelog: https://github.com/Vyxal/Vyxal/compare/v3.0.0...v3.1.0

v3.0.0

5 months ago

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!

What's New

See, I told you, here's the header! But more seriously,

New Codepage

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.

New Elements

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.

A Commitment to Staying Fresh

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!

New Structures

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.

Enhanced Modifiers

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.

Literate Mode

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

Conclusion

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

v2.22.0

6 months ago

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.

v2.21.13

6 months ago

What's Changed

Full Changelog: https://github.com/Vyxal/Vyxal/compare/v2.21.12...v2.21.13

v2.21.12

7 months ago

What's Changed

Full Changelog: https://github.com/Vyxal/Vyxal/compare/v2.21.11...v2.21.12