Vyxal

Latest version: v2.22.4.3

Safety actively analyzes 683322 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 26

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

3.3.0

_Alternatively, the infinite lists and inputs update_

Breaking Changes

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


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.

3.2.0

_Alternaitvely, the regular <s>show</s> 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.

3.1.0

_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_

3.0.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](https://github.com/Vyxal/VyxalS/tree/main), 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](https://github.com/Vyxal/Vyxal/blob/version-3/documentation/table.md).

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](https://github.com/Vyxal/Vyxal/blob/version-3/documentation/Tour.md).

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](https://github.com/Vyxal/Vyxal/blob/version-3/documentation/Literate%20Mode.md)

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

3.0.0beta.3

Welcome to the Third Version 3 Preview Release

_If you were expecting the copypasta from the last two version 3 pre-releases, then ha! You expected wrong! Nyeh heh heh!_

Ighto so version 3 is a little more developed than it was in June, but it still has a fair bit to go before it's actually ready to be used as a full language on sites like CGCC, week.golf and others. However, it is usable enough that people might want to use it for code golf challenges where vyncode cringes out and for some reason, there's something in v3 that v2 doesn't have.

Therefore, the pre-release series exists so that you can specify a language version (because claiming `Vyxal 3` in answer headers isn't a good idea yet), while still being able to submit an answer. This is the third installment in the series, with maybe one or two more coming before the full release.

On this release, you can find the native binaries + a compiled jar for vyxaling outside of stupid brick teeth (sbt).

What's New?

- Elements up to `ẋ` have been fully implemented. Some elements past `ẋ` have been implemented, but only partially (except for `Ḅ`, that's an exception).
- There's a debugger now. IIRC it's not actually finished yet, but it works in a sort of a fashion.
- There's a fancy repl now that activates if you aren't using SBT for development purposes. Featuring syntax highlighting!
- A few more modifiers have been implemented, so those are a thing.

What's Changed?

- There's now a set of "next n elements as a dyad" modifiers because:
- Some modifiers now have arity overloads. For example, `ᶜ` reduces a matrix by columns if given an element with 2+ arity, and otherwise maps an element over suffixes.
- The literate mode spelling of modifier keywords has been reworked so that they all end in `:`. This gives a clear and uniform indicator that they are modifiers and not elements.
- There's a new lexing system under the hood. Friendship with parser combinators ended. All my homies use fastparse now.


There'll be a few things I've missed in both sections which user will probably call me goofy for missing, but that's something I can live with.

Anyhow, yes that's the pre-release. Now would you like fries with that?

~ lyxal

Page 3 of 26

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.