« first day (4382 days earlier)      last day (447 days later) » 
00:00 - 19:0019:00 - 00:00

12:04 AM
@Seggan The matched part
Which, I assume, would be truthy
 
yeah it would
 
@Jacob I've heard tinylisp is not too hard to learn, the core language is pretty small (it's a lisp). There aren't as many builtins as other languages, but that just makes it more fun. And not too many people use it (no offense DLosc)
 
12:57 AM
> The less Javascript the better
well duh, that's the whole point of code golf!
dinguses only just realising what we've known for more than a decade
 
@OldSandboxPosts L + ratio + try breathing + oh wait that's right you can't + bot + not human
 
@Seggan Never return a boolean
Always a way to add more information. Return a string or array of mayches
 
1:30 AM
mhm
well its not exactly a boolean, but i return 1 or 0 respectively in fig
 
That's basically a boolean
What Radvylf is saying is that you can pack more information than whether or not the match succeeded into the result
Like the matched part of the string, the list of matched groups, etc.
 
yeah ik what hes saying just clarifying what i was going to do
 
1:56 AM
My bad, just realized I basically repeated Rydwolf
 
 
3 hours later…
5:43 AM
@lyxal Rydwolf is not going to like that
 
Rydwolf both defends and adores javascript
I meant to say something along the lines of "hates" oops
 
6:17 AM
Stockholm Syndrome
I'm trying to contribute a minor PR to the Scala compiler and I can't even do that much because WSL crashes every few minutes and it takes so long to compile
How do people contribute to big open source projects?
Wow, I can't even start WSL now. This is just great
 
6:30 AM
i'm actually not able to start wsl either at the moment
figured it was just because i'm out of ram since it claims insufficient system resources but maybe it's not a coincidence
okay yeah i just tried again and it worked fine lol
so yeah gl
 
Yeah it's working for me too now
Are we using the same computer lol
 
I go away for a few hours and you've already formed a new hivemind
I thought we were Code Golf and Coding Challenges, not Hivemind Creation and Brainpower Sharing
 
It's not Brainpower Sharing, just cloud computing
 
 
1 hour later…
8:00 AM
ayyyy desmos getting some recognition, very nice
also funny typo
"MathEnsusiast"
sus lol
im gonna just go ahead and fix that if u dont mind emanresu
 
there is a math enthusiast among us
 
Oops lmaooo
 
@user Code Golf and cloud computing
 
@emanresuA it was pretty funny lmao, i wonder how no one caught the mistake for that long tho
 
8:57 AM
Hi
 
9:37 AM
LDQ For a golfing lang, what should be the default value of a undefined variable?
 
something falsy
 
0 if falsy
 
@mousetail lets say if the variable name is lowercase it is false, uppercase it is true, and if it is a vowel it is converted into an integer implicitly
 
Variables don't have names in my language
There is a command to access the nth but allowing names would be too long
 
undefined
Basically just a falsy value
 
9:49 AM
But what would undefined do?
 
@Ginger But that is for beta, not definition
@mousetail if n is odd it is false, o.w. true, and if it is prime it is converted into an int implicitly
 
nothing
It's just an object that has no value
 
@mousetail interpret the rest of the program as vyxal
 
That would defeat the purpose of building my own language lol
 
9:51 AM
@UndoneStudios In a golfing lang it's very important that everything has a purpose, otherwise you are wasting bytes
 
run the rest as python
 
By undefined it should be just a placeholder until something else takes place of its value
 
@NumberBasher There are 1 char builtins for true and false already so there is really no use for anyone to use the variable access builtins for that purpose
 
(and i recommend undefined be just "u")
 
@UndoneStudios But what could it do that's useful for golfing?
The point is every program in this language needs to do something usefull
otherwise you are wasting space
and specifically do something that can't be done in a shorter way
 
9:52 AM
Nothing
 
well its like a control structure:62864740
 
Else you force the programmer to put in a value
 
@mousetail ^^
 
Again that would defeat the point
 
Yeah
But I recommend simply putting something similar to Number Basher's idea; if the variable looks like an i or a j it should be 0
 
9:53 AM
@mousetail like maybe it defaults to the imaginary number i
 
@mousetail 0. Not because it's falsey or anything like that but because more often than not, it's a really good starting value for accumulators, etc
 
Yeah
Besides for iterating it'll be useful too
 
I was thinking it would be 0 in addition but 1 in multiplication
does that sound uesfull?
 
It sounds confusing
How do you know whether I want to add or multiply?
 
Alternatively, the default empty value for whatever type is first applied to the variable
 
9:55 AM
It will return indefined, which is exactly the same as 0 in some some situations and 1 in others
 
@lyxal I imagine applying types would not be golfy
 
There are very loose types but most every operation should work on any type
 
But like if you add a string to the variable, it starts as an empty string
 
lets just default 1
 
@NumberBasher Yes
 
9:56 AM
If you add a number, it starts at 0
 
loop structures go one indexed
 
Or zero-indexed
 
solves every problem
 
Depends on mousetail's language
 
@lyxal Yea, or a empty array
 
9:57 AM
@UndoneStudios because default is 1, its one indexed
 
If it's 1 indexed, use 1, else 0
 
@mousetail if that's the only way to access undefined variables, maybe you could just make it modular?
 
@UndoneStudios It will probably be 1 indexed, since I asked earlier here and that was recomended
 
@mousetail Well I hadn't followed, so use 1
 
@UndoneStudios but we have multiplication
 
9:58 AM
But you can only start with a [] if you know the variable is a list
 
@UnrelatedString It will also be the value of some other builtins, like the one that gets the "previous value" in interation if this is the first value
Or the "first element" of a empty list
that type of thing
 
@mousetail Does an empty list even have an element?
 
What did I just say
 
> Or the "first element" of a empty list
 
If there is a element there I can obviously use that element, this only matters if there is none
 
10:00 AM
If I'm not wrong, I don't think empty lists have elements
 
That's the entire point
If it had a element I could use it and there would be no problem
 
@UndoneStudios The first element of an empty list would be the undefined value being discussed
 
That kind of makes it a non-empty list
 
No
It's length is 0, it has no elements, and if you loop over it it does nothing
 
It'd be as if there was as an if statement saying if list.length == 0 then return undefined
 
10:02 AM
So it's not a list
 
To summarise: it's being proposed that the default value of an empty variable be some constant literally named Undefined. This Undefined constant would also be the result of something like [][0]
 
Even in JS the first element of a empty list is undefined, nobody considers those "not a array"
But my lists are actually not lists since they can have a infinite length
So you are technically right
 
@lyxal as compared to just throwing an index out of bounds error
 
Ah
Makes sense
 
@mousetail those are still lists
 
10:06 AM
Speaking of langs does anyone think it's time to build a Scratch that fits better with CGCC rather than Scratch itself?
 
They are generators
@UndoneStudios Go for it
 
@mousetail I'd consider those technically lazylists, which are a type of list
 
Maybe, the term "list" isn't really properly defined
 
Iterable would probably be a better term then
Because that covers lists, generators and lazylists
 
@mousetail okay yeah in this case some kind of type inference actually would be the most reasonable way to make this useful
that or just 0
depending on how those things work
 
10:11 AM
@mousetail are you using raw generator objects provided by the language you're using or making some sort of wrapper class? (or something completely different?)
 
@mousetail meets haskell's definition :P
 
It will be custom, need a significant amount of custom behaviors
 
So a wrapper class for different generator types or something you make from scratch?
 
I don't know for sure yet, it might include a built in generator under the hood
 
That's what I mean by wrapper class
 
10:14 AM
and presumably it can still be non-destructively accessed instead of just being a raw stateful iterator
 
Yea in that case my answer is I don't know
@UnrelatedString Yep, though all types will be immutable and this would involve making a copy. Internally both copies would share data though
 
naturally
 
will there be this pointer thing
 
pointer thing?
 
@mousetail for inspiration, you might want to check out Vyxal's lazylist python class, it's VList scala class and pxeger's lazylist python class
Just for an example of the different ways infinite lists can be implemented in a golfing language
 
10:17 AM
Thanks
 
Because if there's one thing I know, it's that things like that can be hella painful
As some people here can testify to
Not to say not to do it, but to say to be careful :p
 
Yep I'm already afraid it's going to be the most complex part by far
 
Oh it's not the complexity I'm saying is painful (if you do it right, that won't matter). I'm saying that it can be annoying to get right at times
There can be all sorts of bugs you don't expect if you don't know what you're doing
 
unit testing
reminds me of how my unit tests in java are 3x as long as my actual code
 
i'd sure hope so :P
 
10:28 AM
Jul 11, 2021 at 8:16, by lyxal
Generators are the polar opposite of Rick Astley: they give me up, let me down, make me cry and hurt me
s/generators/lazylists
 
@lyxal The part where I want to keep multiple references and copy only when needed is a bit complex
 
Something you might want to build into your lazylist structure: A way to determine if a list is infinite or finite (at runtime)
It was a pain to integrate into vyxal
 
@mousetail If there's an equivalent of itertools.tee in the language you're implementing in, use that
@emanresuA it sure was. One of the changes ever made
 
@lyxal I specifically want to make sure, if I need to convert to a array at any point (for example when reversing), it will apply to all copies so I don't need to do something very expensive multiple times
 
You don't need to convert to array. Just store the result in another lazylist. And besides, why are you letting it update in all copies
That's a horrible idea that leads to bugs, bugs and more bugs
Make your lazylist immutable under the hood
 
10:32 AM
^
 
Return a new lazylist when you'd otherwise modify it
 
The copies wouldn't actually change though, at least not publically
 
Don't let them change at all
If I reverse a list, I don't want all copies reversed
I only want the list I want reversed to be reversed
And if you absolutely must allow the same LL reference to be in multiple places, then just update the internal generator and it'll automatically be in every reference
 
No you don't understand. Only that copy will be reversed. It's just all others would be converted to lists for efficiency prior the the reverse operation
If any of the others need their length checked later it would be more efficient
This is internal only, for the user of the langauge they wouldn't even notice the feature exists
 
i feel like you're overestimating the performance to be gained by that but yeah it's still a reasonable feature
 
10:45 AM
^
 
though come to think of it... if you want to copy only when necessary, and/or apply it maximally, then every intermediate node, every tail of the list, would also have to track this
actually i guess not?
 
are these copies references to the same LL object or the same list but distinct objects?
 
because you could pass the bookkeeping around separately from the deep list
 
@UnrelatedString That's my plan yes
 
@mousetail ... side effects go brrr
 
10:52 AM
Any function with side effects will be evaluated immediatly regardless
You can't create a lazy list with side effects, except maybe "looping forever" which I can't check for
 
If you have infinite lists properly implemented, not necessarily
 
i think maybe the better way to look at that is building a reversed list at the same time as computing the length of the original
2
 
For example mapping "add 3" over all positive integers should produce [4, 5, 6...]
 
I think for a golfing lang you'd want side effects to be evaluated in the most obvious order
So without any lazy stuff
 
i think if you designate what has side effects then mapping over an infinite list just automatically forces it in this model
which could even be desirable in some circumstances
 
10:55 AM
... infinite lists have to be lazy
 
Not if they have side effects
Then they'd just loop forever
This will actually be my only way of creating a infinite loop
 
or i guess not so much force it as just forcibly evaluate all of it
you'd probably not want to keep the previous elements if you know you won't use them
 
It's difficult and usually kludgy to determine whether something has side effects
 
but yeah for a "practical" example, the same idea but explicitly in haskell
 
True, though in some cases it might be impossible to tell if a loop is infinite or not
@emanresuA I have only 2 builtins that have side effects
Only output is considered a side effect
 
10:58 AM
...i feel like exempting side effects is unwise :P
 
^
We tried that with vyxal, didn't end well
 
unless you just mean covert stuff like the list optimization
or lazy evaluation in general
which is kind of out by default
 
My main idea is you'd never notice that the lists are actually lazy
 
that is how that tends to work :P
 
@mousetail The way we have it in vyxal, there's "known finite" and "known infinite". If you ask it to take the first five positive integers, it'll give [1, 2, 3, 4, 5] as a known finite list. If you ask it to take all positive integers less than 5 it'll give [1, 2, 3, 4... and because it's iterating over all items of an infinite list it'll continue computing terms even though it'll never find any.
It treats the latter case as infinite because, by any reasonable interpretation, it is.
 
 
1 hour later…
12:04 PM
@emanresuA Depends on how much "knowledge" it has
 
yeah in cases like that it should be useful to have some kind of further monotonicity flag
or maybe even a relaxed monotonicity flag
though the strict version could also be useful for things like enabling a binary search
 
Whispers' infinite lists have monotonicity flags, as well as a related list of unique elements in the sequence if said list is finite
 
@UnrelatedString read this as "related monotoxicity" and got really confused for a second
 
lmaoooooooooooooooooo
 
12:11 PM
capitalization?
i assume you don't want to require dealing with that but it is ambiguous
 
case sensitive
 
like if an acronym occurs capitalized are we expected to titlecase the words or just ignore it
 
ignore it
 
👌
 
"The acronym will be case-sensitive. If the acronym is "sbt", only "sbt" should be placed, not "SbT", "sbT", "SBT" and other variations."
I have that in the "ask question" model
 
12:15 PM
sounds good
 
0
Q: Salacious Bacon Tripod

lyxalIn a certain chatroom, we like making acronym jokes about the build tool we use called sbt. While it usually stands for "Scala Build Tool", we aim to come up with all sorts of meanings, such as: Stupid Brick Teeth Sussy Baka Training Shady Blue Tourists Seriously Big Toes Silly Bear Topics Salac...

 
...also in trying to think of a solution, just want to make 100% sure that we can count on the wordlists being in the order of the acronym (and equivalently, the acronym can be taken as the order of the wordlists)
 
> For the acronym "sbt", you'll receive: the large text to change, the acronym, a list of words starting with "s", a list of words starting with "b" and a list of words starting with "t".
also
> Inputs can be taken in any order.
 
i did say 100% :P
 
huh, only just looked up the definition of salacious
makes the hnq clickbait even better :p
 
12:24 PM
lmao nice
 
honestly, makes it even funnier
 
People see it and think that Cooking.SE is leaking
 
12:39 PM
@RydwolfPrograms so the deadline for defintion phase is 4 months, we have 1 more
 
am also glad l4m2 asked about the input lengths because i unintentionally made my first working attempt rely on that :P
wait the fix was trivial i just typoed it :P
 
@mousetail where is that mentioned? Just want to know if there's anything else in the source about other stage deadlines
 
51
Q: Changes to the Area 51 Process v3.0

Robert CartainoFor anyone who follows this site, you may have noticed that Area 51 has been churning out progressively weaker site proposals and more anemic site launches, about a third of which fail in private beta. There is nothing inherently wrong with most of these subjects; it's just that we've largely tap...

4 months for definition, 4 months for commitment, 2 years for beta
 
wait what
damn
 
@UnrelatedString so long as it doesn't impact how many building your trippy engine shells your answer has :p
@mousetail frick
 
 
3 hours later…
3:39 PM
Well, guess I'm going to start advertising more heavily in-person, try to get a few people from my comp sci class to do it maybe
 
Roan, the guy who just subscribed, is form my old comp sci class
 
If they haven't already, make sure to have them use their votes
 
They seem to have voted on questions that had 10 already :/
 
4:47 PM
well tell em to not
 
5:35 PM
LDQ: good ways of doing errors?
i.e. try/catch/finally or Result
 
Result for sure. Rust doesn't do it very well, but it's so much better than exceptions.
 
Monads are bad though, I'd suggest some kind of autounwrapping type
 
Nah, ? makes things pretty simple
It also makes it explicit where a function can error, which is something I really love about Rust
One thing I really don't love about Rust is the Err parameter
I really don't like it being able to be any type
 
So I watched a video on why monads bad just a few days ago so my opinions are not yet fully formed
I did agree though
 
Because Err can be anything (usually something with the Error trait, thankfully), you have to do some pretty ugly stuff to get it to work with ?
Like -> Result<..., Box<dyn Error + Send + Sync>>
IMO there should just be a struct called, idk, Try<type> that can either be successful, or be any error type, and you declare error types as like, their own thing
 
5:52 PM
The issue is that all your functions start looking like Result<Cancellable<Future<Box<T>>>>
 
So it'd basically just be a giant scoped global enum of error types, scoped in the sense that like, there'd be some organization
E.g., you could use some sort of keyword, let's say failtype, to add a custom error type. You could then access those in the same hierarchical way as structs and functions, like std::io::UnexpectedEof
So you would have the base Try::Sucess(type) case, and then ones like Try::std::io::UnexpectedEof. So you can pass a Try anywhere without needing to worry about what type of error it holds.
And when you used ? to pass on an error result, you could maybe specify some sort of wrapper around the actual error. For example, if the function calling you doesn't care whether it's a std::io::UnexpectedEof or a std::io::UnknownError, you could just wrap that in a mylibrary::foobar::UnexpectedInputError
The compiler would keep track of every possible error type a given Try could contain, so that wrapping would be useful (since if later on my function could also return a std::io::BrokenPipe, the function calling me would then have a missing match case if it tried to handle different error types)
 
0
A: The inverse Collatz Conjecture

schwenk Hasn't the inversion of the collatz rules to divergate to infinity? Like: Even: 2*n Odd: (n-1)/3 The result has to be the identity if you put the inversion in the orginal ruleset. And I think the inversion always divergate proovable to infinity.

^ Flags please
 
But the wrapper still contains the error being wrapped, so when debugging, you can see all the details
Since currently, I feel like actually handling an Err in Rust can be really annoying since it tends to be a bit vague what the actual possible errors are once you get into Box<dyn Error> territory
 
@Seggan Neither, use algebraic effects :)
Wait, misread question
 
Best way to handle errors is to panic
 
6:02 PM
If you use algebraic effects you'd get a try/catch-style thing
 
If anything ever goes slightly awry, it could indicate a cosmic ray has flipped a bit and is causing horrific damage as we speak
 
@RydwolfPrograms Not the best way to handle life, unfortunately
2
 
Best to just panic and let systemd restart you
 
Got a cut on your hand? It might be a zombie bite, best cut off your whole arm!
Don't wanna drag the conversation too off-course but algebraic effects are so cool
I just don't know of a way they could be efficiently implemented
I can't wait for mainstream languages to get them
I think OCaml already has a limited form (you can catch and resume stuff but there's no typechecking)
I think you need to store the entire call stack when you perform an effect?
I assume closures really complicate this, because there's a language called Effekt researching algebraic effects and it doesn't have first class functions (it has these things it calls "blocks", but you can't pass them around)
Or maybe it's just representing the type of a function with effects that's complicated, since OCaml doesn't have that restriction
Hmm, OCaml claims its implementation of effects is "very efficient" (source)
Okay, apparently you don't need the entire call stack, just enough for all the stuff inside your handled part?
I wonder why OCaml doesn't bother having effects in its type system too
Oh I see, it seems this is more of a preview feature so they want to wait until it's stabilized to have syntax and typing for it
 
6:21 PM
So basically these are just ways to ask questions to some function way below you in the call stack?
 
I guess, yeah
"Oh no, I can't get the head of this list, what default value should I get?"
 
Feels a bit like it's just a more elegant way to do dependency injection
At least, that's what I think it'd be most useful for in non-functional languages
 
idk, maybe
I still want it though :P
 
Still trying to wrap my head around what these would change
Logging would really benefit from this I think
 
I saw an example with parsers somewhere once
 
6:26 PM
Don't like this article's proposed syntax
Also what kinda name is "algebraic effects" that is literally the most indescriptive and misleading title for a feature in the history of the world
 
Do you expect FP people to name anything normally
Be thankful it isn't something like Cokleisli
It actually makes sense if you think about it
Algebraic because they're ADTs, effect because they're effects
 
TIL generics are called ADTs
 
@user umm... what?
 
@RydwolfPrograms Not generics, enum-like thingies and records
 
6:30 PM
Because they're called product types and sum types, so algebra
 
@RydwolfPrograms the equivalent in java is checked exceptions. they are hated bc of overuse and forcing you to rethrow as a runtime exception a lot of times
 
gtg, got an interview, hopefully I don't blow this one too o/
I love checked exceptions
I don't get why people hate them so much
I am prepared to sacrifice a little conciseness if I can be safer
 
its so annoying that IOException is checked
most of the time you cant do anything about the os not creating a file or permission denial
i hate doing catch (IOException e) { throw RuntimeException(e); }
@user gl
 
@mousetail god
 
6:54 PM
@user it looks really cool
and ive figured out a way
using callbacks and a global dictionary
hey, its not like anyone will read rol's generated code :P
@RydwolfPrograms i kinda like it
what other options you got :P
 
00:00 - 19:0019:00 - 00:00

« first day (4382 days earlier)      last day (447 days later) »