An ASCII-based golfing language
thunno / thunno2 Goto Github PK
View Code? Open in Web Editor NEWA concise golfing language
Home Page: https://not-thonnu.github.io/run
License: Creative Commons Zero v1.0 Universal
A concise golfing language
Home Page: https://not-thonnu.github.io/run
License: Creative Commons Zero v1.0 Universal
An ASCII-based golfing language
Short decription of what the command is
I'm stealing this idea from Factor because it's pretty useful, and I think it would come in handy for golf.
nmap
pops an integer n
and n
lists a1, ...aN
, and for each index i
in the shortest list, passes a1[i], a2[i], ...aN[i]
through a single callback. The results of the callback are collected to a single array.
For example: [1;2;3] [4;5;6] [7;8;9] 3 nmap + + ;
yields [12;15;18]
.
Also handy: 2map
, 3map
, which are the same as nmap
but with n
hardcoded.
[1;2;3] [4;5;6] [7;8;9] 3 nmap + + ; -> [12;15;18]
[1;2;3] [4;5;6] [7;8;9] 3map + + ; -> [12;15;18]
[1;2;3] [4;5;6] [7;8;9] 3map - + ; -> [4;5;6]
"Hello" "World!" 2map + ; -> ["WH";"oe";"rl";"ll";"do"]
Suggested by Jacob in #15
Short decription of what the command is
Assign ȧ
already exists, but it only really works for setting an item at a single index. It would be more useful if it worked on a list of indices and a list of items to set at those indices.
[1;2;3;4;5;6;7;8] [2;4;6] [9;10;11] assign -> [1;2;9;4;10;6;11;8]
# should still work if both arguments aren't lists:
[1;2;3;4;5;6;7;8] [2;4;6] 9 assign -> [1;2;9;4;9;6;9;8]
[1;2;3;4;5;6;7;8] 2 [9;10;11] assign -> [1;2;[9;10;11];4;5;6;7;8]
(I'm Jacob on SE)
This seems like a very cool language and good successor to the original Thunno. I realize it still seems to be in early development but I just wanted to point out that it is missing built-ins for dealing with codepoints.
The original Thunno was also missing these functions, which was pretty annoying at times and basically makes it not able to compete with other languages for many challenges.
Commands that would be very useful:
I don't know much python but I might be able to submit a PR if it would help @nayakrujul
Similar to this issue in the Jelly repo, I ran a corpus for Thunno 2.
Nothing wrong, just didn't want to waste #69.
I'm going to list a couple of the token names that don't really fit in with the others here. This is not a complete list.
Ȧ
isalphanum
should be one of is_alphanum is_alpha_num is_alphanumeric
Ḷ
dyadic_lcm
should allow dyadic_least_common_multiple
ɠ
two_fifty_six
should allow two_hundred_fifty_six
(but at that point, what's the point of having a token for this?)Ɲ
newline_join
should allow join_by_newlines
⁵
fifth
should allow fifth_power
⁴
fourth
should allow fourth_power
I
binary_range
should be inclusive_range
(I think?)H
from_hex
should allow from_hexadecimal
A
isalpha
should either be or allow is_alpha
I can't believe I've forgotten to add that...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.