also the wealth of string overloads vyxal has reminds me, i'm sort of thinking about how something similar could work in a golflang where strings are character lists because i like character list strings in a conceptual-aesthetic way but one of the worst things about jelly is the only times math builtins aren't useless on strings are when they have bugged interactions with the character type just being python strings
so maybe one option could be to have overloads for lists that contain characters and may also contain integers, and have an operator for forcing that overload even if it is all integers
er, numbers in general
ofc having sensible overloads on the character level is also smart but there are only so many sensible character overloads lmao
the issue with my "string"-overload-forcer idea is you then need a sensible overload for that for anything that operates on characters or uniformly operates on lists, but maybe it could be a digraph prefix that just happens to correspond to a forced "string" overload for anything where that's sensible
and for any of those that aren't dedicated list builtins you want to be able to apply them to arbitrary lists some way or another anyways
though maybe i should actually look at some of the vyxal string overloads to see if there are any good ones that can't sensibly generalize to arbitrary lists
i was actually thinking of saying some string overloads could just be vectorizing versions of full-list list builtins but in the case of replace and split it's probably smarter to have some kind of depth inference thing
Really, I'd like a good statically-typed golfing language with something equivalent to typeclasses. I think that would solve some of these problems, because overloads and vectorisation are not really needed, because they're defined by the type system
Now might be a good time to tell you about my secret golfing language idea
i do feel like heterogeneous lists are more useful than not for a golflang but it might be possible to cover most of the janky niche usecases with a mix of algebraic kinds of data types
most of what i've seen ww use them for is just ragged/mixed/arbitrary depth lists of all the same "atomic" type of values but that's definitely way bigger than the question of mixed "atomic" values
i think compressing a program into a picture makes 3 bytes into one pixel and i think that is sort of... unfair sometimes (even tho piet for example doesn't use all colors
@emanresuA I did have some ideas for that: all literals, digraphs, and grouped functions (which are mapped over or something), are just encoded as integer literals
then you only need one syntactic concept to encompass all of those
and you pretty much can't have invalid syntax (due to unclosed strings, unfilled groups, unpaired digraphs, etc)
I also thought about trying to write an "optimising compiler", but in reverse, so that you can't write things that are suboptimal like 1+1 (you'd have to write 2 instead)
Given a positive integer n, randomly output n non negative integers that sum to one hundred. n will be at most 200. The output should be present as a list of integers (not sorted).
Your random sample should be uniformly sampled from all lists of n non negative integers that sum to one hundred.
Yo...
it works compressing a test file by 12.455%: https://dzaima.github.io/paste#07VN/T1JhFP7/foort/gh5L2kc/UyNrbAdDKDTbem1xUWIpvCgOvEIQtJSW2ZomE4nZoagWOlKZW1/jjnm7yfpHMDpk1bX6Dzx33Pued5n/ec5@w4nQ3r6fMN9ItdPV6P85IJ8pNoZCowbUqIocBEUIyOiuPh0aAQj2oBLchSyUfmpFWatkjTaZUJkWA4NDYSnYwnWCrO7KJiM5ulpOWW3eKoX5CZzIbiw656NBR3JIfTQmJygqWssskqJ9OCzs5SM7LZ7khajO1ih1NlBHBdULsINRnRwuMs9VhhBjWiRgyyQf@YDKJkcOkMKmEEWQsmNCE0Hn4ajDOzIlI9DkWk02En325ppjRb3bFpzGaU6n4zp9hMjaRJqb/qagAE51XlRK@n7w/1bt@xX@A8ffceuD3uqxpLvLALr3gxq2AVFqEieO/iMc76YUXQ4BvfmMNMP@wP8tz6GJbacBOyrbiCK1DDeZiHL2kCZ6Am4UtYa73Jc3k8a4Ut@O7DPcUNLwSoET/Bj/GA…
SBCS, or Single Byte Character Set, is used to refer to character encodings that use exactly one byte for each graphic character. An SBCS can accommodate a maximum of 256 symbols, and is useful for scripts that do not have many symbols or accented letters such as the Latin, Greek and Cyrillic scripts used mainly for European languages. Examples of SBCS encodings include ISO/IEC 646, the various ISO 8859 encodings, and the various Microsoft/IBM code pages.The term SBCS is commonly contrasted against the terms DBCS (double-byte character set) and TBCS (triple-byte character set), as well as MBCS...
@Nobody You tend to post a lot of noisy messages like this which don't add anything to the chat. Please read through our chat guidelines (especially the section "don't make noise").
language be like: - macros like C - simple like python - functional like haskell - object oriented like java - pattern matching like scala - typed like Typescript - fast like k - array oriented like APL - popular like javascript
I feel like array oriented languages mostly encourage you to keep your data as numbers in ndarrays, while object oriented languages have classes with named fields and stuff instead
> flax is a Python library. flax has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.
> kandi has reviewed flax and discovered the below as its top functions. This is intended to give you an instant insight into flax implemented functionality, and help decide if they suit your requirements.
Tokenise a program into tokens . Parse tokens . evaluate a monadic chain r Evaluate a dyadic chain . Convert a string to a number . Scans a list of links . Fold a list of links . Filter a list of links . Calculate a function of a function . indent a flax expression
This challenge requires integration with C, so you can stop reading if you're not interested.
Matrix multiplication is a simple operation, but the performance depends a lot on how efficiently the code is written.
Let's compute m = x * y. The following code is the implementation of the textbook al...
Challenge It's a bootstrapping challenge this time! Write a full program that, once run, writes the source code of another program that in turn, once run, writes the source code for an...
I've wrote functions to do carryless multiplication, division, modulo, factorization, exponentiation, and factorial, and it feels like I've been transported to some weird alternate universe where all the math stuff still works but the results are slightly different