« first day (4134 days earlier)      last day (40 days later) » 
00:00 - 13:0013:00 - 00:00

12:01 AM
Welp, looks like it's not gonna be ready :P
We can probably unpin the off-topic TNB message
 
So, some rSNBATWPL basics:
1. It's written in a variety of ways, including RSNBATWPL, rSNBATWPL, rSN, and raisin-batwaffle
2. It's always parsed right-to-left, and has no monads/unary operators (so 2 * 3 + 4 is 14)
 
@RadvylfPrograms Except it still doesn't work :|
 
Try "return " + text?
This works:
> Function("a", "b", "return (c,d)=>[a,b,c,d]")(1, 2)("c", "d")
 
Nah, it errors "module is undefined" despite it being in a function with an arg named module
 
So, with rSN, there are a few data types. Numbers work as expected with ints (0, 11, -4) and floats (2.2, 1.0, 1.1'2, 1.'3). Strings can use character literals ('a, '', '") or string literals ("abc", "a" 'b "cd"). We'll get to arrays, functions, built-ins, and identifiers soon.
@emanresuA What exactly is text
 
12:07 AM
Wait nvm it works now
 
Oh cool
 
@RadvylfPrograms The code loaded from github
 
@RadvylfPrograms wait 1.'3?tf kinda float is that? Some sort of imperial bit system?
 
So, as for arrays, there is no array literal syntax. However, the built-in , can be used to "build" arrays, in a somewhat haphazard process that occasionally needs parentheses and occasionally doesn't
@lyxal This is a cool feature of rSN: a ' in the fractional part makes everything after repeat infinitely
So 1.1'2 is 1.1222222222...
And 1.'3 is 4 / 3
 
It returns Null on the online version. Is that intentional?
 
12:10 AM
What's 1.'2'3?
 
@Romanp No, but if it does that, it's canon
Frick, seems my regex for detecting numbers is missing '
Well, no changing the language now
Okay, now functions. There are two flavors of functions: functions and built-ins
Both are called identically, either as infix functions or with {}
E.g., f{x} calls f with x as an argument, and f{x}{y} or x f y are two ways of calling it with two arguments
To make a function literal, simply use ~ in the same way you'd use ~. So, x ~ x + 1 is a function to increment a number.
 
hows't do I name my function
 
Now, our first ._.MC: Given two ints, divmod them ((x / y, x % y))
@lyxal With variables, since all functions are lambdas. Variable assignment is :
Prolly should've mentioned that earlier lol
a: 1 assigns 1 to a, classic stuff
 
func : ~ func
Recursion go brrr
 
Any string can be used as a variable name sometimes
@lyxal Yeah, func is being called with ~ as its first argument and Null as its second
Handy tip: dbg.pars{...} will show you how something was parsed
 
12:16 AM
oh that's helpful
 
@RadvylfPrograms x ~ y ~ x/y,(x%y) feels like it should work but knowing you it probably doesn't
 
x ~ y
curry
 
Plus I can't test it because you forgot to make the repl work on mobile
 
and i don't think rsnbatwpl has pattern matching for something that doesn't have actual literal syntax :P
 
@lyxal You got the precedence wrong
(x/y),x%y should work
 
12:20 AM
Called it
Knew it wasn't that simple
Still doesn't work on mobile
 
So, some quick control flow stuff: if {condition} {run} can be used for if statements, cond {condition} {if do} {if don't} can be used for if/else or ternary statements, and for {initial; condition; after} {run} can be used for looping (same w/ while {condition} {run} and do-while {condition} {run})
._.MC: Nth fibonacci number
Handy tip: . can be used to recurse in a (possibly unnamed) lambda
 
oh yeah when you first released the online interepreter i tried using infix if and that did... not work lmao
 
Just keep in mind, due to currying, it only works with single-arg functions
@UnrelatedString it actually does, you just gotta switch the intuitive ordering of the condition and thing to run
 
it was definitely something to do with evaluation working differently from {} calls
 
I've been busy and it's almost working
 
12:24 AM
hype
 
Make sure to use cond not if
 
@RadvylfPrograms x ~ cond {x < 2}{1}{.{x- 2}+.{x- 1}} but knowing you that's also probably wrong
 
and not cons either :P
 
Oh, and x-2 and x-1 will be interpreted as variables, since -s are allows. Try x- 1
 
You can thank SwiftKey for that :p
@RadvylfPrograms now just hold on a second. Your readme says =
 
12:27 AM
Does rSNBATWPL have any form of tail recursion?
 
Quick tip: f $ x is a built-in which calls f with x, so the final {...} in most places can be replaced with a $
@lyxal Oh frick it's = now, yeah
@emanresuA lol no
 
Another quick tip: {...} in a context which is clearly not calling the preceding thing, e.g., 1 + {2}, will auto-insert .
 
@emanresuA That's a local host link
 
So {.{x- 2}+.{x- 1}} can be golfed to {{x- 2}+{x- 1}}
 
12:29 AM
Oops
 
@RadvylfPrograms is that why {} is an infinite loop?
 
Yep!
._.MC: Pass an integer by reference
 
do not do this to me
 
I'm sorry what.
You implemented a by-reference system?
We're lucky there's no pass-by-name bs in this language
 
12:33 AM
are you sure there isn't
 
Good point
 
nscopd-id
That's basically pass-by-name :p
 
Ffs next thing you'll be telling me there's pass by result
 
rSN includes pass-by-value, pass-by-reference, and pass-by-name, so that you can choose the most readable one for your scenario (TM)
 
Flashbacks to early autohotkey
 
12:34 AM
 
a = 1; aid = id{a}; (aid) = 2; print{a}
 
“You want an array? Just name a bunch of variables A2 A2 A3…”
 
Don't give radvylf ideas
 
rSN does not have comments by the way, to encourage readable code. If you need comments, your code isn't doing its job.
@ATaco I...I didn't know about arrays when I first started using JS, and I'm not proud to admit this but...eval("n" + n) may have occured a few times
 
12:36 AM
@RadvylfPrograms well that's just simulating references/pointers, no?
 
@lyxal Basically, yeah. So you can pass an id to a function to pass a reference to it, and an nscopd-id to pass its name
Where id gets wacky is when you use it as the parameter of a function literal
 
@RadvylfPrograms what do you mean it's name?
 
@RadvylfPrograms honest question, did you have any particular strategy for passing those groups of variables around? because i can't think of any way that would be possible, but i also don't know js :)
 
@lyxal Doesn't seem to work
 
12:38 AM
a = 1; f = id{a} ~ Null; f{2}; print{a}
@UnrelatedString No, but I also didn't know functions were a thing. One of my early SO questions was asking about how to goto in JS because my only programming experience was on the TI-83
 
Also, btw, you can give variables arbitrary names: "x y" = 2; var{"x y"}
 
You can use @ to dereference IDs, if you need to do so
 
What does nscopd-id return?
 
12:40 AM
An id, but without a scope attached, so it uses the one it's dereferenced in
 
Because hopefully, your idea of pass by name is completely different to the really cursed method I'm thinking of
@RadvylfPrograms okay good you don't have true pass-by-name
 
Ah frick my github branches are cursed
 
Hey whaddya know, I forgot to implement .
 
Good job
 
Wait no, worse
I did, but +. is read as a single operator
So you need a space
 
12:43 AM
C has a built in qsort?!
C has nothing built in why qsort?!
 
._.MC: A function which returns the first n prime numbers
 
So there's pass by value, pass by reference and pass by what I assume is value-result
 
@RadvylfPrograms What's up with this?
 
It's hard to explain how nscopd-ids work, but basically, if I pass nscopd-id{"a"} to a function f = x ~ (a = 1; @{x}), it'll return 1
 
Does that textually substitute a where x is?
 
12:47 AM
@emanresuA : should be =, need a ; after the function definition
@lyxal No, so not fully pass-by-name-cursed, but close
 
You should add ASI
 
@RadvylfPrograms good.
At least you made one sensible decision
 
@emanresuA Yeah, it's gotten me a few times. Remembering ;s after for loops is especially tricky
Fun fact about the raisin language: id{'("prints"')} = ncon{"Hello, World!"} is a hello world program
 
Oh god
What's '(?
Are those char literals?
 
(ncon's not anything cursed, it just wraps a thing into a single element array)
@emanresuA Yeah
You can't have parens in strings
 
12:51 AM
... why
 
Parens are parsed before anything else
 
... why
 
Well because ; used to be first, but that broke the parens, so I moved parens to the top and downgraded ; to be right before operators
 
'Do youu have any idea what a tokenizer is
 
12:54 AM
Yes, and I have all of the pieces of one, but scattered around for various reasons
 
i'm beginning to think you started by just trying to make a praclang and eventually it was so cursed that you decided to embrace it
 
Fun fact: a trailing ' does some really cool stuff to the bracket autocompletion
I'd show y'all but you physically cannot dbg.pars it
Basically it eats the } it adds, meaning it's still unbalanced brackets after the autocompletion, which is undefined behavior
 
@RadvylfPrograms really cool
Knowing this language, I think cool is the wrong term
 
@emanresuA even with syntax fixes this hangs
 
Oh, even better, in a blank program ' will be the same as '' since the way I find the thing being quoted is .slice(-1)
 
12:56 AM
 
@emanresuA nah just takes a while for n = 34
turns out it wasn't hanging
 
No surprise - it's doing five million recursive calls in a lang that's not particularly known for efficiency
 
._.MC: Memoized fibonacci
 
1:14 AM
@RadvylfPrograms rSNBATWPL, 84 bytes: f=n~for{i=1;i<=n;++$i}{p=0;for{b=2;b<i;++$b}{if{not$i%b}{p=1}};if{not{p}}{print$i}};
it prints them, not returns them
 
wait that outputs primes up to n, not n prime numbers
 
@Steffan Does 0~~ do the not$ shorter?
 
that doesn't work
 
You can probably do $p=1 too
 
1:20 AM
could do not$p tho
 
I'm especially meaning the not$i%b
IIRC or is short-circuit
So p or print$i is probably shorter
And that trailing ; probably isn't needed
 
that doesn't work either
 
Ah, oops
It doesn't short circuit apparently
@Steffan p=b=2 should work
Since p will be set to b=2, which is Null
I'm absolutely sure you can golf at least one of those ifs with the $ trick
if{0~~i%b}$p=1, if{p!1}$print$i
Since rSN does recursion so golfily though, wouldn't be surprised if that'd save a lot over for loops
._.MC: Given a rectangular array of arrays, return an array of the sums of the columns
 
rSNBATWPL, 81 bytes: f=n~for{i=1;i<=n;++$i}{p=0;for{b=2;b<i;++$b}{if{not$i%b}$p=1};if{not$p}$print$i};
 
E.g., ((1, 2), (4, 8), (10, 20)) -> (15, 30)
You don't need to count the ; btw, it's needed if you do stuff afterward, but that's also true in a lot of languages
 
1:31 AM
Why doesn't this return a range?
 
@emanresuA Need a $
$i
 
Also <=n't
 
Oh wack
Add a space
For some reason?
 
@RadvylfPrograms rSNBATWPL, 72 bytes: f=a~for{i=0;i<size$a$0;++$i}{s=0;for{j=0;j<size$a;++$j}{s=s+a{j}{i}};s};
 
1:35 AM
@emanresuA Frick
That's another incident of aftermath from the awaitification
 
wait a{j}{i} can be a{j}{i}
 
I'm going to fix ' floats and that bug, just a sec
 
i mean a{j}$i lol
 
Yeah, that's what I was trying to get you to do with the ifs lol
 
@RadvylfPrograms Okay, DSO will pull that code from github once it's pushed
@Steffan a$j$i?
 
1:36 AM
nope
you would have to do (a$j)$i
 
ah frick rtl
OPERATOR PRECEDENCE EXISTS FOR A REASON
@RadvylfPrograms Can/should we unpin the Off-topic TNB message now?
 
+1 to ^
 
Go ahead and do it, you're an RO :p
Better to ask for forgiveness than permission (goes to rename TNB)
 
Lyxal can do it, they haven't used RO magic yet
 
doneski
 
1:44 AM
Feel the 12
 
@RadvylfPrograms not all the time
sometimes it's good to check if someone wants something a certain way to avoid making more work for yourself
 
Well, the two bugs with rSN have been fixed
on DSO too, pretty impressive
@emanresuA You led me to 6 more errors with that
 
@RadvylfPrograms It lazy loads the code from github :P
 
Oh, I figured it was some sort of cool auto-update-detection, but I just realized it's probably like, a fetch lol
 
It's not a server, it's completely static :P
 
1:50 AM
._.MC: Given a number, return how many steps it takes for the Collatz conjecture.
Should be pretty simple
 
pretty simple is the terminology you use when asking in a regular golfing language or practical language
this is radvylf we're talking about
pretty simple doesn't exist :p
 
@Steffan x~cond{x!1}{{cond{x%2}{1+x*3}$x/2}+1}$0
 
doesn't work
you need to actually recurse
 
Wdym "actually recurse"?
 
rSNBATWPL, 43 bytes: f=x~cond{x!1}{1+f{cond{x%2}{1+x*3}$x/2}}$0;
 
1:53 AM
(I know it doesn't work, that's a different issue)
@Steffan You can remove the f
and the f=
It'll auto-recurse if something's in {}s with no function name
 
oh nvm it works
idk what happened
._.MC: Given a number, convert it to binary.
I assume there's no builtin for this
 
@emanresuA What does DSO use to join the header, code, and footer?
 
newlines (IIRC)
 
Doesn't seem like it:
 
... never mind, looking at the code
 
2:02 AM
rSNBATWPL, 44 bytes: f=x~(while{x}{a=conc{x%2}$a;x=floor$x/2};a);
 
@Steffan Seems like infix would shorten that conc
 
recursive:
rSNBATWPL, 39 bytes: f=x~cond{x>1}{conc{f$floor$x/2}$x%2}$x;
oh right, x~cond{x>1}{conc{{floor$x/2}}$x%2}$x
36
rSNBATWPL, 34 bytes: x~cond{x>1}{{floor$x/2}conc x%2}$x
rSNBATWPL, 28 bytes: x~cond{x>1}{{x/2}conc x%2}$x
 
2:53 AM
._.MC: Given a rectangular array of arrays, find the product of the sums of all columns with positive products
(This one's intended to get y'all to use filt, rdc, flip, etc.)
 
is there a complete list of functions?
(almost typo'd that as fynctions)
 
No, but most of the useful ones are listed in the README. I'd just ctrl+f the source code for builtin: if you want to catch them all
I'll type up a gist listing them all, actually
But it'll be an hour or so
'cause I'm busy
 
@RadvylfPrograms there's only one instance of builtin: though
 
3:23 AM
Oops
partial: then
Oh frick there's over 100 builtins this is gonna be time consuming
 
rSNBATWPL, 111 bytes: f=a~(y=1;for{i=0;i<size$a$0;++$i}{s=0;p=1;for{j=0;j<size$a;++$j}{s=s+a{j}$i;p=p*a{j}$i};y=y*cond{p<0}{1}$s};y);
 
3:35 AM
._.MC: Shortest empty array literal (two categories: requires parentheses (except at the far right), and doesn't require parentheses)
I have four bytes for the first category
Oh boy, copy does some really neat stuff with IDs and functions
 
conc{}{}
actually conc{}$
 
Too bad con wouldn't work here
@Steffan Since this already requires parens, ()conc
 
3:54 AM
raisin-batwaffle built-in reference: gist.github.com/Radvylf/b8dd14834a0ef519238e0b9076807a76
._.MC: Make a dictionary. Should be a function which allows, at minimum, getting an item (with an arbitrary key) and setting an item (with arbitrary data)
An example of the interface could be dict = Dict{}; to make one, dict{do}{"a"} to retrieve an item, and dict{don't}{"b"}{100} to retrieve one, but some creativity is fine
You can assume no global variables already exist other than the ones in the current version
 
with the ubiltin table, for the earlier cmc: rSNBATWPL, 59 bytes: f=x~rdc{strfor{filt{flip$x}$a~rdc{a}{*}>=0}$k~rdc{k}{+}}$*;
(the one of the products off the sums of the transposed with positive products)
 
4:10 AM
I think infixing some of that will save a lot of bytes
E.g., couldn't rdc{a}{*} be a rdc*?
Wait no
The k rdc+ one could though
@RadvylfPrograms Actually even in parens this is shorter
 
oh no we are learning rSNBATWPL
*runs away from the computer*
 
5:02 AM
oh damn its LYAL again
and we're doing raisin batwaffle this is going to be amazing
 
lol
 
> Fun fact: a trailing ' does some really cool stuff to the bracket autocompletion

this is one of the most terrifying things about this language ive read so far
beautiful
why does this hang, im trying to do a collatz conjecture program
 
@Ginger much better
 
wait does *= not actually change the value of a variable
what the fuck
 
@RadvylfPrograms what did you do......
 
5:15 AM
but if theres spaces it works the other way
i love this language
 
lmao parser bugs go brerrr
 
it not a bug, its a feature!
 
parser feature go weeee
 
Wow
 
yeah randomly removing spaces can change whether a program works or hangs infinitely
 
5:19 AM
@des54321 need a $
 
i will make a programming language called "pSBATWPL" :P
 
I just found an old unpublished/incomplete esolang of mine
 
what is it?
 
It's one where the syntax looked like this:
/¯\
\_ \
 ¯ /¯
 _/
 
ooh
i like it
 
5:31 AM
noodles?
/* flax in c */
typdef struct flax_obj_t {
    void *arr;
    char type;
    int len;
    int is_scalar;
};

typedef struct flax_atom_t {
    int arity;
    flax_obj_t (*call)(int arg_count, flax_obj_t *); /* 1 or 2 arguments */
} flax_atom_t;
 
Don't do it
 
/* vyxal in c */
typdef struct vyxal_obj_t {
    void *arr;
    char type;
    int len;
    int is_scalar;
};

/* stack */
static vyxal_obj_t[69];
 
yesterday, by emanresu A
Speaking of which, @pxeger are you going to tell us what your golflang idea is? (radvylf has)
 
Aug 15, 2021 at 15:34, by pxeger
@PyGamer0 currently top secret
 
> Aug 15, 2021
 
5:46 AM
> Aug 15
huh that date sounds familiar
 
6:06 AM
0
Q: Reverse hex cipher

pajonkCharacters in strings are sometimes represented as their ASCII hexadecimal codes. Printable characters have two hex digits in their representation. Swapping those digits leads to another character, which will be our output. The table of relevant character codes can be found on Wikipedia. Details ...

 
6:19 AM
@NewPosts How did my answer to this get so many upvotes lol
 
it funny
 
It's a palindrome simply because C and H are their own inverses.
 
6:44 AM
aaaaand someone downvoted it for some reason lmao
damn you, python, and your sensible behavior on ill-formed inputs
 
7:01 AM
@UnrelatedString Me too, but it turns out two chars longer than what I have: ,80⎕DR 4⌽11⎕DR⍪⍞ Try it online!
 
7:15 AM
@UnrelatedString idk why people downvote good answers....
 
7:42 AM
@emanresuA yeah i wont make a golflang in c
i will make k in c then a golflang :P
 
 
2 hours later…
10:02 AM
@PyGamer0 as you can see i am serious about this :P
 
All I can say is... good luck
 
10:21 AM
TBH I'd say the hard part of K is train handling
 
i started that on 10th April
 
The rest is just simple operators determined by arity (cough jelly cough)
@PyGamer0 ... it's 25 may?
 
thing is: i have to do it in C
@emanresuA wdym
yes today is 25th of May
 
@emanresuA initial commit date was in April
 
^
 
10:23 AM
@PyGamer0 You hadn't edited it, I thought you meant you were gonna start it on 10 april next year
 
@emanresuA oh oof
anyways i have done
61 commits so far
 
Mostly named u, it appears
 
@emanresuA the beauty of type overloading
 
I see
 
10:25 AM
@emanresuA u for update :P
 
Golf your language, not your code or commit messages
Don't become Arthur Whitney
 
Or Radvylf
 
o_o
 
I'd say C is a good choice if you want speed, but then you kinda feel obligated to provide said speed :P
ngn/k does some sort of bytecode compilation iirc
But for an array language, dynamically allocating memory like that is gonna be a pain
 
idk i have never written an array language before
 
10:27 AM
@emanresuA just use linked lists lol
 
@PyGamer0 ... flax
 
@emanresuA is that an array language?
 
I'd say so
 
its not on the apl wiki
 
Its main datatype is arrays and it provides powerful operations on those arrays and quicks to modify those operations
@PyGamer0 That can be rectified.
 
10:29 AM
i know that exists
Apr 17 at 5:04, by DLosc
> mix of apple and bacon sprinkled with jelly
Apr 17 at 5:03, by PyGamer0
flax looks like a cursed mix of apl and bqn with sprinkles of jelly: +´⍳10
in flax, 17 secs ago, by PyGamer0
Also flax v0.x.x are all beta versions. I might push breaking changes a lot but once I feel that I will not make any major breaking changes then I will release v1.0.0
also owo == 🦉
 
Once you reach v1.0.0 I'll start trying to compile minor versions to wasm with some duct tape
 
ok nice
 
My current approach of manually pulling the files with a script, and writing them into the emscripten filesystem, produces some weird bugs that I'm not sure how to deal with
But if I do someday succeed in getting that done I can just run a certain script to pull the latest version of flax
Well, o/
 
o/
 
11:07 AM
@UnrelatedString and i made this Try it online!
 
11:27 AM
@PyGamer0 Huh, will he now work on ngn/k2?
 
@Adám idk ask him
 
11:46 AM
bingnib
@RadvylfPrograms is it the last language I'll ever learn because it'll kill me from insanity?
 
12:28 PM

 LET'SA CODE!

Chatroom for the WAHOO! Mario esolang.
 
00:00 - 13:0013:00 - 00:00

« first day (4134 days earlier)      last day (40 days later) »