« first day (4393 days earlier)      last day (43 days later) » 
00:00 - 21:0021:00 - 00:00

12:16 AM
@mousetail that image is missing the best bit...
also it can be simulated perfectly with union types
type X = Y | Z
class Y...
class Z...

val x = Y()
match x { is Y(...) -> ... is Z(...) -> ... }
12:34 AM
Now the problem: how would you match on a union type where each branch is not a concrete type?
type Foo = (X & Y) | (Y & Z) | (Z & X)
We're almost at 50% commitment for PLDI!
@Bubbler i dont see why you cant just enforce destructuring just on concrete types
you can still do x is (X & Y)
and x is X(...)
12:56 AM
alright, finished rewriting the package and function system
cracks knuckles time to start working on classes
this has been vastly simplified by the function rewrite
1:12 AM
@Seggan What are you guys working on?
I've implemented a Macro system in BrainChild, with the intent of it being usable to hack in Syntax.
macro ( (assignable) (/(\*\*|[*\/+-])/) "=" (expression) ) { $1 = $1 $2 $3 } is used to define x += 3
@AviFS Rol, a language ive been mentioning several times over the past few months
its intended to be a replacement for lua for those who hate lua's syntax (me)
it compiles to lua
@Seggan Ooh la la, link to info?
imm currently writing up some docs
1:18 AM
remind me tomorrow if i forget
@AviFS you wanna see something cool?
that's what I've been working on :p
1:58 AM
@lyxal what DLosc said :p
@lyxal that syntax looks startlingly like Dysfunctional's syntax :b
I could say the same thing but the other way around :p
what language is that, exactly?
verbose vyxal?
Vyxal 3 literate mode
thought so
Implemented just yesterday too
2:02 AM
It's available to play around with online
It's limited at the moment because a lot of stuff hasn't been implemented
But enough should be there that it's Turing complete.
at least vyxal doesn't have chain filters or stack commas or the other crazy syntax Dysfunctional uses
chain filters? stack commas?
the hell are you on about
I'll tell you... tomorrow q:
I take it stack commas treat things as stack items
2:08 AM
eh, not quite
you'll see
you'll all see
@Ginger this is actually quite similar to how v3 literate mode looks
here's a marginally more spicy Dysfunctional program that also happens to showcase those two features I mentioned:
yesterday, by Ginger
fib(n) -> ,1,1 swaplast ,{(##$)sum} replacelast ,{,1 (#$)sub} replacefirst ,{fib} ,{(#$)} (^#)if call
(it's a Fibonacci program, in case you couldn't tell)
it'd be 1 10 range { ctx-n 2 mod 0 ==} filter { 10 mul } map { sum } reduce
which is only slightly different to dysfunctional
huh, weird
great minds think alike (but fools rarely differ)
the end could also be fold- add though
@Ginger some lag behind several months :p
2:21 AM
@lyxal yeah the end is basically identical
2:32 AM
@AviFS pushed syntax examples, no actual docs yet tho. a bit more info in the readme
adding example problems
2:45 AM
LDQ: should [x, y, z, ...] be a mutable or immutable list?
3:03 AM
@Seggan Is it array destructuring syntax?
@Seggan Should be the same as what Lua uses if it's for Rol, immutable otherwise
Or just a list literal?
@user well erm lua has mutable lists
Best go with that then
Unless you don't care too much about compat, in which case immut is better
Also mutability is usually attached to a variable, not a value (like const x in JS)
unless you're considering something analogous to Object.freeze
3:45 AM
@Bubbler huh
i only heard of variable conferring immutability in rust
what i mean is i cant add to an immutable list but can to a mutable
3:59 AM
@Bubbler If you do const x = [], the list that x refers to is still mutable
@lyxal cool
@user Yes but x cannot be reassigned
But the object that x refers to can be changed
It's pretty common for "mutable" to refer to both variables and values
4:14 AM
Then there's Python's tuple vs. list
What about it?
another example of object mutability
I believe Python has both because list is index-assignable while tuple is hashable
@Seggan So one possible answer to this question is "have two kinds of list literals, one for mutable and one for immutable"
+1 to ^
i think mutable is more referring to whether the container is mutable or not, where both variables and lists are containers
4:41 AM
The limitations of a 16bit Instruction Pointer are catching up to me
You can emulate a 32-bit cell with two 16-bit cells. Gets slow quickly though.
5:00 AM
I could change the underlying structure to 32-bit cells instead of 16-bit cells, but that would destroy brainfuck compilablility
(That or re-write the step that I use to emulate 16-bit cells)
(Then again, a "True" BF implementation only supports 30k cells anyway, and a 32bit IP would be unuable anyway)
5:25 AM
Any substantial program is probably going to use more than 30k cells
3 hours later…
8:39 AM
@DLosc You somehow left your filesystem structure in a source map for the HBL interpreter.
9:32 AM
@Seggan but why would you
1 hour later…
10:58 AM
user image
Copilot knows too much
Pretty worrying if it starts learning to suggest code based on this site’s examples
Does it always use patterns from the project you are currently working on, or was the project just in the training data
@mousetail I don't have any project currently open
+ even the code I have in my vyxal directory never mentions what Vyxal is nor where its website is
+ vyxal.pythonanywhere.com was way too late to be in the training data
unless of course it's always being retrained
@mousetail the latter
I asked someone who I'm 99% sure doesn't have vyxal on their computer, and it gives the same completion
it must have been retrained
yeah, because copilot originally released in mid-2021 and v.pa only became a thing in late-2021
although the fact it "knows" the website suggests it's been overtrained
I suppose it's learned about it because it's autocompleted so much for it
if you try What is 05AB1E? it just gives [^1]
but if you try What is Vyxal, it gives Vyxal is a stack-based esoteric programming language. It is designed to be easy to learn, and to be easy to write programs in. It is also designed to be easy to implement, and to be easy to write interpreters for
05AB1E hasn't had much of a chance for copilot to do anything
Vyxal on the other hand is at least 50% copilot generated
11:33 AM
I conjecture that the majority of bugs in Vyxal are due to copilot
actually if the majority of the code is copilot generated then you might expect the majority of bugs to be because of copilot
I conjecture that disproportionately many bugs in Vyxal are due to copilot
you're not wrong
12:34 PM
UNBELIEVABLE!! 80% of people get this simple maths problem WRONG!!!
12:44 PM
> simple
20% of people used wolfram alpha
1:02 PM
@UnrelatedString because it doesnt work that way?
Q: Roll a painted cube

mousetailThere is a 1x1x1 cube placed on a infinite grid of 1x1 squares. The cube is painted on every side, so it leaves a mark on the grid when it moves. The sides of the cube are colored 6 distinct colors, re-presentable with any 6 distinct values. A 7th value represents a blank space. The cube can rol...

1:16 PM
@lyxal what!
@lyxal so, I heard you wanted to know more about Dysfunctional
well yes but also maybe not now
12:19am isn't good time for new language after getting frustrated at JS
I'm pretty busy for most of your morning
type up some stuff and I'll read as I get ready for bed
so, Dysfunctional programs make use of something that kinda resembles a stack
1:21 PM
for example, take the program input print, which functions as a cat program
to the untrained eye it may look like what we are doing is calling print on the result of calling input
but what really happens is that input gets called, its return value is appended to the stack, and print pops that value off and prints it
now, take the program input input print
you'd think it would take input twice and print both inputs, but that is wrong and bad and if you thought it you should be ashamed of yourself how could you
@Ginger That's how print(input()) would be run internally in a practlang
it does take input twice, but the second input call overwrites the return value of the first, so only that gets printed
this is where stack commas™ come in
a functional version of that program (assuming print pops all values off the stack) would be input ,input print
note the extra comma; it tells the Dysfunctional interpreter that instead of replacing the bottom stack value, that next input call's return value should be appended to the stack
That just sounds like a "pair" built in with extra steps
(you can also put a comma at the end, i.e. input input, print, which prepends the return value to the stack instead and would result in the two inputs being printed in reverse)
now we get to the spicy bit: stack filters (or "chain filters", but "stack filters" is more accurate)
(also I just realized that what input input print would actually do is take input, take input again with the first input as the prompt string, and print that :p)
1:29 PM
@Ginger joined by newlines or as a list of values?
@lyxal that's an implementation detail :b
I'm just figuring out the syntax
so suppose we have the program 1,2,3 + print
this program will sum 1, 2, and 3, and print the sum
but what if I only want to sum 2 and 3? well that's where stack filters come in handy
they are a way to filter the stack (shocker) so that a function only operates on certain items
@Ginger 1 2,3 + swap pop print
No need for your precious stack filters
@lyxal it's a demonstration, lyxal
as I was saying: in this case, if I only wanted to sum 2 and 3, I could change this program to 1,2,3 (##$)+ print
the bit in the parentheses is a stack filter, and it's basically saying "pass the last two items on the stack to this function and discard the rest"
@lyxal also wrong syntax lol, you probably meant 1 ,2 ,3 swap pop print
I explicitly removed the 1 from the chain
Because it isn't being summed
that program currently tries to call 2 on 1, which is an error
hmm, what that program does depends on the order in which commas are interpreted
it could either be 1 2, 3 or 1 2 ,3
anyway, stack filters use a syntax similar to regex
the ^ and $ characters are anchors for the beginning and end of the stack, respectively
# means "keep" and : means discard
and that's it, basically
for example the filter (^#:#) would keep the first and third stack items from the top and discard everything else
1:36 PM
Can I dynamically generate these filters?
@lyxal I don't have any syntax for that... yet
but it's probably possible
oh one other thing: you can declare lambdas with the syntax {code}, which can be moved around on the stack and called using the call function
they're used by if, for example
So if I have ` 1,2,3 (##$)+ print` why don't I just write 2, 3 + print?
it was an example lyxal
I know but where would I have excess data in my stack as an example? Wouldn't I always just have as much data as I need?
recursive functions
1:39 PM
How do I make lists?
and other cases I can't be bothered to think about right now
@lyxal [1, 2, 3, etc]
Can I turn 1,2,3 into a list?
you can do ranges and stuff with [0...] or [1...10] or [1.2.10] or such
@lyxal yes, there will probably be a function for that
So I can index into that list and completely bypass stack filters
Good to know :p
...yes, I guess
mfw my exciting new features are actually new ways of doing the same thing
1:42 PM
Where we're going we don't need stack filters! :p
Chains and list indexing all the way!
maybe I should remove lists entirely
It's dysfunctional not non-functional
the stack is the only list you'll ever need :b
Is it a real stack though?
Maybe have only pairs? But no dynamically sized lists
1:44 PM
@Ginger Or is it some sort of pseudo-stack
it's not quite a stack because things can be added from both sides
So it's a double ended queue kind of a thing
Where all operations try and consume everything on the thing
the math operators are greedy, yes
functions like if will only consume the amount they're supposed to, tho
1:46 PM
That just sounds inconvenient
it's Dysfunctional, I don't care about convenience
forks your dysfunctional to make it convenient
call it Therapy
No that's javascript
Therapy is what you need after writing javascript
1:48 PM
Jan 2 at 16:29, by Ginger
JS is a therapy group :p
Jan 2 at 16:29 Ginger was wrong
No, Jan 2 at 16:29 Ginger was Jan 2 at 16:29 Ginger
Language idea:

Some languages let you effectively define your own builtin. I propose a language where every function, including buit in ones and basic ones like assignment, can only be used once.

If you want to use one multiple times you must first copy the builtin to several new different names so you can use each of them once. This includes the operator you would use to redefine and copy builtins
yknow I could probably make Dysfunctional do that
2:16 PM
Another day another instance of a particular user trying to close things that really don't need to be closed :|
Can we get some LO votes on this and this?
@mousetail We don't apply that to trailing newlines in prints tho...
So why would it apply to leading newlines in prints?
@RydwolfPrograms That's not mandatory
I can imagine some weird late 20th century OS/programming language where the standard is to start lines with newlines instead of having trailing ones at all times
Then just use the equivelent of sys.stdout.write
@mousetail Not with the other rules we have, which I believe we shoudn't have
@mousetail Not all languages have that
My whole point is that this arbitrarily restricts less common and less normal languages
Every language that uses leading newlines does
2:23 PM
"Use a feature common in normal languages" is not a solution
Yes it is, again this has been discussed on meta a ton already
@mousetail How do you know that?
the consensus is that if a language can't compete just make your own version that can
That's stupid
Why should we bend to fit stupid rules instead of the rules just not being stupid
@RydwolfPrograms Because there are not that many practical old langauges that predate the trailing newlines convention
@RydwolfPrograms So there is something of a level playing field
Languages shouldn't get a huge buff simply because they are terrible
2:25 PM
@mousetail No
Using hard languages should be hard
Languages don't compete here. And the worst way to ruin a playing field is to have big holes in it.
We shouldn't add weird exceptions just because a language is hard to use
No we should not, thank you
A: Sandbox for Proposed Challenges

bigyihsuanDetermine the Octet(/Duplet/18-electron) Rule Tags: code-golfintegerchemistry Given an atomic number in the inclusive range [1,118], write the shortest program/function that outputs one of {2,8,18} if the element with that atomic number follows the duplet, octet, or 18-electron rule, respectively...

2:26 PM
We shouldn't have weird rules at all
@RydwolfPrograms Exactly, so we should enforce a sane output format for all languages
Btw there where previous attempt on meta to specify a IO format per language
Oh okay I can't believe I didn't think of that. Send me an email when you've got one :p
it proved too hard to maintain
Yeah because that's stupid
So it's eaier to have one for all languages
2:27 PM
Having default I/O rules, or per-language I/O rules, or whatever, is not a sustainable or good solution
It is necessarily though
We already have the right answer staring us in the face and have been basically using it for years
@mousetail No it is not
Default I/O rules disappear tomorrow. What happens?
All the golfing will turn into just finding the ideal IO format
No more actual coding
We start scoring by I/O format, like with different flag combinations. If you want to take cheaty input, go ahead, but people won't consider that competitive
The goal is to get people to use the most sensible input and ignore I/O entirely
No then you couldn't golf IO format at all
I do want to be able to compare solutions using eg. space seperation vs new line seperated output
Making those seperate categories is dumb
2:32 PM
Then compare them that way
That's what we do with flags
Offiically we don't compare them
But everyomne does anyway, according to the rules that make the most sense to them
Exactly, we want to avoid a similar situation
No, that is the perfect solution
It effectively ended the flag debate, and on terms even I as probably the biggest flag-hater am fine with
If we don't' compare by what we officially compare then why even officially decide what we compare aat all
And the site hasn't been overrun with flag abuse, nor has interesting use of flags died off
@RydwolfPrograms It very much has
2:34 PM
@mousetail To stop people like us getting into dumb arguments about it
@mousetail Vyxal is far less flaggy than it was a year ago
All new languages have been overrun with cheaty flags
Idk about that...
The newest language I can think of with flags is, honestly, Vyxal
Fig/Flax don't have them. None of the half-byte family does.
Maybe some esolangs do, idk, but those aren't designed for golfing anyway
@RydwolfPrograms Flax does, but they are necessary sometimes*
Japt and Vyxal are the only two major flag abusing languages I know of
Perl occasionally does, you sometimes see it in C, but they're praclangs lol
Yea it's mostly those 4 languages but they abuse it really badly
2:37 PM
> All new languages have been overrun with cheaty flags
And all of those are from more than three years ago lol
Flag abuse has gone down since the flag debate ended.
It's still really bad though
Meh. If someone uses a flag, add a byte to their score when comparing it with yours.
I might be a bit biased, but the vyxal flag answers I have seen were added as bonus solutions.
That's the overwhelming majority nowadays
It was bad in like, 2020-2021
4 mins ago, by mousetail
If we don't' compare by what we officially compare then why even officially decide what we compare aat all
2:38 PM
Flags are boring, I don’t even know why people bother working on that
5 mins ago, by Rydwolf Programs
It effectively ended the flag debate, and on terms even I as probably the biggest flag-hater am fine with
It's a meaningless solution that sounds good to both sides :p
Not really, it's' a meaningless compromise that technically gives people what they want while actually leaving both sides unhappy
@Fatalize iirc flax stores strings as integer arrays and you need a flag to output it as a string
@mousetail I'm happy, lyxal's happy, worked good enough
You're the only one unhappy here
@mathcat I understand that it serves a purpose to get shorter answers in general. But it’s still boring af
2:41 PM
Just because, as you said, you completely ignored the meta consensus
@mathcat That's a perfectly fine flag
Yeah, imo that is what flags are really for
The output is still the integer array, which is valid as an output format. The flag just makes it more user accessible.
Aug 23, 2022 at 14:40, by Radvylf Programs
My opinions on golfing language I/O are still summed up by my three black boxes model
You wouldn't need to score the flag in that case
Esolang designers spend too much time thinking about ways to cheat a few bytes in specific situations, and not enough on having an actually interesting language
2:43 PM
No literally it says so in the standard IO rules
@Fatalize Which esolang designers?
That's why we have them
That's the entire point
Most don't include flags nowadays
@RydwolfPrograms All of them, me included
2:43 PM
@mousetail The current flag rules override the defaults
And I’m not just talking about flags obviously
@Fatalize Oh wait, I thought you were talking about flags specifically
@RydwolfPrograms What I'm saying is, it would produce valid output without the flag, so you don't need to score the flag
Didn’t Jelly use to have a flag too? m or something for mathy stuff
@mousetail We don't score flags at all tho
It's a dead letter
But yeah, that makes sense
2:45 PM
I mean for the purpose of category
Seems the meta consensus is that flags don't count, but the de facto consensus is that you add your flags to your score
Well it's more subtle than that I think
People tend to only add flags they think are cheaty, which varies a lot per-person
And some flags, like Vyxal's r, are situation-dependent
You don't need to count flags if it would produce valid output without the flag
Even if the output would be very hard to read
Well yeah but a lot of flags have nothing to do with I/O
I see when I ignore y'all for a bit you go and propose entirely new sites?
Pretty successfully too :p
2:49 PM
It's a nice concept :D
The name's a little long, but hopefully the scope's big enough that it'll get a reasonable number of users
@Catija want to be the 100th commiter? :P
Wouldn't want to be accused of favoritism.
It's not like there's many sites in commitment that you could favor us over :p
Oh, sorry, my bad. :D
Who are we excluding? @SandboxPosts ?
Yeah, nobody likes @SandboxPosts
@cairdcoinheringaahing either you made a typo in the Best Of pinned message or you're a time traveler from 18200 years in the future :p
@mousetail Bob Smith
@Ginger lol
3:51 PM
Sad, I wanted to know what the best post of 20222 will be
well you'll have to wait 18200 years then
"What is our consensus on imaginary bytes" will win best meta post as post-quantum computers become more mainstream
Imaginary bytes?
Is that a weird name for qubits?
Also we could probably just score qubits as 2 bits each
No, qbits use normal natural numbers still
3:56 PM
these are post-quantum computers, their storage is measured in complex numbers
What is a "post-quantum computer"
Do you mean a quantum computer?
They haven't been invented yet\
Give it another 1000-2000 years
We'll also have started like 1000 new stack exchange sites by that point
Area 51 will look exactly the same though, just with more bugs
4:21 PM
chat still will have not been changed at all
4:35 PM
thats fine :P
4:58 PM
@emanresuA What where? 0_o
5:09 PM
@lyxal "Yo dawg, I heard you like stacks, so I put stacks in your stacks so you can stack while you stack"
Plug for my abandoned esolang, StackExchange, where the only data type is a stack
<insert obligatory time drug message>
5:52 PM
Q: Human oriented string comparison

Wheat WizardTraditionally when you compare two strings you use lexicographical comparison. That can be described by the recursive algorithm: $$ f(x, y)= \left\{\begin{array}[rr] \\ \mathrm{EQ} & \mathrm{if}\,\mid x\mid=0\,\mathrm{and}\,\mid y\mid=0 \\ \mathrm{GT} & \mathrm{if}\,\mid x\mid>0\,\mathrm{and}\,\m...

6:34 PM
Can we get some reopen votes on this
I agree with the close votes on this one.
2 hours later…
8:11 PM
@Fatalize jelly's flags are just i/o formatting; you're probably thinking of the abandoned fork M
Which of course stands for "Mmm...Jelly"
and yeah this is... staying closed
even if we do want to do some kind of open-ended ml popcon some day it should be better written and thought out than that one by a factor of 10
8:43 PM
A: Sandbox for Proposed Challenges

mousetailAvoid the hole code-golfopen-ended-function Given a continuous black-box function as a input, output a different continuous, differentiable function that never enters the box \$ 1.5 \leq x \leq 1 \wedge 1 \leq y \leq 1.5 \$. Your output must exactly match the input function when \$ x \leq 0 \vee...

00:00 - 21:0021:00 - 00:00

« first day (4393 days earlier)      last day (43 days later) »