« first day (4392 days earlier)      last day (444 days later) » 

12:34 AM
@user also let rec ... and ... for mutual recursion
 
Whoa--holy starring spree, Batman =P
 
I'll just unstar those
 
eek I just discovered I've left the hob on minimum for 11 hours
 
1:05 AM
any feedback on this
 
isn't a hob one of those things you carry bricks in
 
@Bubbler Yeah, I guess that's more the main reason for rec. Languages that don't have the restriction of needing to use a variable/module/whatever below its definition probably don't need rec+and
 
@UnrelatedString It's a stovetop
What you put a pan on when cooking
 
1:30 AM
0
A: Sandbox for Proposed Challenges

YousernameMake a Custom Bayer Matrix code-golf matrix array A Bayer matrix is a threshold map used for ordered dithering that gives the illusion of having more shades of color than actually present by using a crosshatch-like pattern. Bayer matrices are square with a side length that is a power of 2. Here a...

 
aaaa help i forgot the keybind for format code
ah ctrl alt l thats what it was
 
1:48 AM
@Seggan TBH my gut says no. Unless you're reading ahead to ensure a is assigned before b is /ever/ called, one should ensure a is explicitly initialised "Just in case".
Never trust the programmer to write safe code.
5
 
And if it turns out it's absolutely necessary, you can make the programmer explicitly say "this variable may seem uninitialized but I guarantee you it is not. If it turns out to break, that's on me. I won't file a bug report yelling at you"
 
smth like lateinit
 
yeah i feel like it should just implicitly leave b likewise declared-but-undefined until a is defined
which gets more complicated if you want to, like, pass it as a callback alongside something else that could initialize it, but at that point, like
why
 
because my functions are really variables with a function type, and i really want mutual recursion
 
oh, in that case that approach would just leave them in a waiting-for-initialization deadlock :P
i guess the mechanism could also detect cycles
 
2:01 AM
That sounds kinda complicated
 
yeah smth like lateinit would be much simpler and useful
 
2:17 AM
title must be 15 characters is a dumb limit
 
0
Q: It's a dog! (Maybe)

JacobThe city defines a dog as any living entity with four legs and a tail. So raccoons, bears, mountain lions, mice, these are all just different sizes of dog. Given an ASCII-art image of an animal, determine if that animal is a dog. Rules An animal is a dog if it has four legs and a tail. The foot o...

 
LDQ: Which sigil looks better for indicating assignment to variable: :name or =name (assignment looks like <expression> <sigil>name)
so you might have "lyxal" :name or "lyxal" =name
 
can there be a space between the sigil and the name?
 
no
 
= for sure
 
2:29 AM
^
 
: is more familiar as an actual prefix kind of thing and if it can't be spaced out then... yeah
 
maybe even > or something to indicate that it's going into the variable. but yeah i'd say = is good
 
related LDQ: Would := look good as a sigil for augmented assignment in this scenario?
so like 3 +:=val would be val += 3
 
no it looks weird
i like 3 +>val better tbh
 
> is already "less than" though
 
2:39 AM
oh right
 
(well, it's actually "greater than")
 
well i think it's fine to use the same symbol to mean something different in certain cases but i guess it could get confusing there
 
problem is that you might want to have +> as a check if adding two numbers is bigger than a third
 
what
 
stack language
 
2:46 AM
oh got it
 
3:33 AM
Roblox... doors?
 
It's a new popular horror game
 
figures
 
3:45 AM
@ATaco In 99% of situations that just obscures the bug, no?
 
Probably best one doesn't define a function before its requirements anyway
 
Sure sometimes if a variable fails to be initialized, having it at a sensible default value that you're mandated to choose is fine and everything's good. But quite often there is no sensible default; you just don't know the value yet, and if it never gets assigned, using some sort of default would just mean your program's both broken, and perfectly fine from the compiler/interpreter/program's POV
 
You don't need to set it to a garbage default, just ensure the function cannot be defined before the value is assigned. I feel it'd be slightly nicer if it could instead just be caught at runtime instead of compile time.
(Or some other method to ensure it's setup before it's called)
 
So uh hasn't best of voting started?
(@cairdcoinheringaahing)
 
@ATaco Defined, or called?
 
3:52 AM
Called, aye
 
I think that makes sense, except that I could see it being reasonable to (well actually I can't since immutability ftw and functions should be pure, but playing devil's advocate) use a function to initialize global/higher scope variables
E.g., you might have a function updateName that takes the user's name and updates a record containing it. Perhaps you run that right at the start, but can also run it later. The name global starts off uninitialized but would be set before ever being accessed
Tho that's definitely an XY scenario since it should really be done with a getUpdatedName function, that leaves it to the caller to decide what to do with the new name
IMO Rust is far more functional than JS, even minus its closure/first-class-function support
Its emphasis on immutability and somewhat purer-than-JS functions, plus its much better iterator support, feel more functional in spirit, while JS just kinda gives you the tools for FP but focuses more on other stuff
 
and rust is consciously styled after functional languages versus js just supporting functional patterns
 
4:11 AM
> 5 8 times
40
> 10 { 2 mod 0 == } map
[ 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 ]
A snippet of output from that language I was ldqing about earlier
 
> 10 lambda 2 mod 0 eq end-lambda map
[ 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 ]
 
lambdon't
 
I can't get over how amazing it is to use full words in a stack language
 
For a sec I thought this was like, a readable-mode Vyxal
 
4:14 AM
it is
 
Well then that makes sense lol
It's just occured to me that Vyxal would make a great transpilation target for stack-based languages now that it's more stable
Y'all should hook into LLVM and make Vyxal a systems programming language
 
well you see the version this literate mode is for is decidedly not stable
 
Ooh so we can use the Aaronhacks in literate mode?
 
Aaronhacks?
 
Oh wait probably new-unstable not old-unstable
 
4:16 AM
this is v3 lol
 
I'm tired and almost got run over by a professional basketball team's tour bus leave me alone
Outside a mid steak restaurant
I wondered why there were a bunch of oddly tall men around me
 
@RydwolfPrograms I hear that's the college student's dream
 
Also TIL the owner of the local aquarium is currently in federal prison for buying an illegal shark
lol it's even the top google result
 
4:41 AM
lmao
 
LDQ: Which looks better for raw code in a literate mode? `...#} or #...#}
(everything in the ... is 1 character = 1 command stuff)
so 3 <whatever> 5 5 ×#} add would be like 3 5 5 times add
 
leading hash
symmetry and it's more visually obvious
 
5:15 AM
For regular code in literate mode, why not allow both? Why not let people use times or *?
(as long as they're spaced out)
 
@emanresuA because regular code doesn't recognise times as a single token
 
but you could make all regular tokens also valid literate tokens
(also maybe rename literate to verbose, since the first thing i think of hearing literate for a language is literate haskell which is... a different principle)
 
^^ is what I was trying to say
So allow both 2 + 3 *, 2 add 3 times, and even 2 add 3 *?
 
You can put those in the keywords in the documentation if you so desire
* and + are allowed in keywords
As is =, !, ? and more
 
@RydwolfPrograms also come to think of it isn't that kind of red's schtick
 
 
1 hour later…
6:47 AM
@cairdcoinheringaahing The Best of nominations should have ended right?
 
 
3 hours later…
10:17 AM
 
 
2 hours later…
12:12 PM
How is this "the best fitting community for the problem"
 
I can't even think of a sarcastic reply to that
 
1 question that doesn't really belong here moved to this seemed to be the most fitting room to move my message. My RO menus should work, I even reset them. But whenever I hit Ctrl and Space to give me RO options, the menu instantly disappears and is only visible for ~10 ms.
@Ginger does the above answer your question? :p
 
⦂|
 
@mousetail Yep, but for once, I actually went to sleep at a reasonable time last night. Voting will start momentarily
 
12:40 PM
 
the ?! in gxh1=K ?! is because the person recording the moves said "holy hell why didn't I think of that ?!"
 
I've been nice and given y'all an extra 12 minutes on top of the 2 weeks to vote :P
5
 
12:59 PM
@WheatWizard Your choice is a vacuous truth. Both "the elements of the empty list satisfy my two-neighbor property" and "the elements of the empty list don’t satisfy my two-neighbor property" are both true because the premise that the empty list has any element is false
 
1:20 PM
@cairdcoinheringaahing I won't forgor 💀 next year, mark my words
 
Next year, the process might change
Speaking of, now that the voting is open, think I'll get around to posting an answer to that meta discussion
 
@Fatalize Yes both are true at the same time, no choice has to be made.
The statement "there is an element which doesn't satisfy" is unequivocally false though since there are no elements.
 
@WheatWizard So if both are true why include it as truthy only?
 
Because the other one being true doesn't mean anything.
 
They both don’t mean anything, that’s the point of vacuous truth
 
1:27 PM
You are never checking if all elements don't satisfy.
Just that at least one doesn't satisfy.
 
I don’t get what you want to say by that, but since you already said "both are true" then we should be able to output truthy or falsy for it
 
Both of the following statements are also true "All elements in the empty list satisfy the property" "there are no green ducks in the empty list", but the second one is irrelevantly true.
 
For all is always true on the empty set, Any is always false
 
"irrelevantly" doesn’t mean anything
 
Doesn't even matter if the predicate itself is also vicarious or not
 
1:31 PM
Once again, both "the elements of the empty list satisfy my two-neighbor property" and "the elements of the empty list don’t satisfy my two-neighbor property" are true
so we should be able to output true or false to the challenge
 
No because the first one is what the challenge is about and the second one is a different statement.
 
No, you can only output false if there exists some element that does not satisfy the two-neighbor property
 
[2,2,3,1] is falsey even though not every element falsifies the property.
Because there exists an element (1) which fails the property. i.e. not all elements satisfy it.
 
I don’t see how that changes anything regarding my point
 
Because you are saying that "the elements of the empty list don’t satisfy my two-neighbor property" means it could go in the falsey category.
But "the elements of x don’t satisfy my two-neighbor property" is not what the falsey category is.
The falsey category is "an element of x doesn't satisfy my two-neighbor property".
Or it is ""the elements of x don't all satisfy my two-neighbor property", an equivalent statement.
 
1:36 PM
since there’s no element in the empty list it’s still a vacuous truth one way or the other
 
@Fatalize When you say one way or the other what are the two ways?
 
you made a choice much like how empty products are 1 for convenience, I was just saying it’s not convenient for all answers and it’s boring to deal with it
 
I haven't made any choice here.
I accept fully that both the statements "the elements of the empty list satisfy my two-neighbor property" and "the elements of the empty list don’t satisfy my two-neighbor property"
The second statement however, just isn't relevant to the challenge.
 
It is relevant because it is a sufficient (but not necessary) condition to return a falsy answer, and it is true for the empty list
 
 
2 hours later…
3:43 PM
> In my experience, if a language problem is hard to solve, most of the head-
scratching occurs in the lexer (well, with the exception of C++, which is hard
all over)
This is gold
(source: The Definitive ANTLR 4 Reference, chapter 12)
 
4:00 PM
...why is my A51 Gravatar different from my A51 Meta Gravatar
And I can't edit my A51 meta profile itself, it just redirects to edit my A51 profile
Which has the right Gravatar
 
LDQ: what do yall think of this lambda syntax: { (ReturnTypeOptional) arg1, arg2, arg3 -> body }
arg and arrow is optional if it a 0/1 param lambda
i.e. i can do { body } or { it.body }
or { (Int) 1 + 1 }
casting is as so no ambiguity there
 
Okay so my A51 hash is my email address
No clue what on earth my A51 meta hash is
 
@Seggan Can the body be more than than one statement?
 
^?
 
@mousetail ofc
 
4:10 PM
Is there implicit return?
 
{ x ->
   print("Hello")
   print(x)
}
@mousetail only for single expression lambdas
 
Not a huge fan of that syntax
 
i stole it from kotlin :P
 
Is there a reason the {} goes around the whole lambda? I thought Java-backwards-compatible langs just did that to prevent ambiguity of some sort
 
it makes custom syntax nicer
 
4:12 PM
I feel like it would be confusing to have no syntactic difference between single line expressions with implicit return and multi line ones without. You could remove one line but get entirely different behavior
 
@RydwolfPrograms kotlin is not java-backwards-compatible
 
It makes more sense to do (...) -> ... and (...) -> {...} for multi-line
@Seggan wait what, I thought that was its whole thing
 
no it just compiles to jvm
it tries to maintain binary compat with java
 
I do like something around the whole thing just so there is less order of operations conflict
When passing a lambda as anything except the first argument of a function
 
I swear I've heard multiple times that Kotlin's supposed to just be a drop-in replacement for Java
 
4:14 PM
yes because binary compatibility
 
They can use each-others libraries, but are totally different languages. So basically 2 different languages that share a ecosystem
 
theyre not totally different, but yes
 
Huh, I must be thinking of a different lang then
 
i like how kotlin can do something.map { it + 2 } or whatever
@RydwolfPrograms groovy?
 
@RydwolfPrograms No, I've heard the same
 
4:15 PM
Groovy is also significantly different
 
Or rather, it can be an easy replacement for Java, not that it is only just a replacement
 
@mousetail but its nearly backwards syntax compatible with java 8
 
anyway, this is my main motivation for choosing this syntax
i added the return type hint to the syntax, but i dont expect it to be used
also when(something) { whatever() } is a nice kotlin feature too. its actually a normal function, not some keyword
 
You should do that for if and while too
 
4:19 PM
cant do while, i need to eval the param multiple times
and if i do if, how do i implement else?
 
You could do something like while { } { } and it's actually a curried function
 
(also I was joking please don't do that :p)
 
@mousetail hurts my eyes :P
i need this language to be at least somewhat usable/familiar lol
 
Loops seem to work completely differently in every language
 
i disagree
while loop workings are pretty much universal
and the variations on for x in y is just syntax
 
4:27 PM
True, it's mostly for loops that are totally different
do while loops are a thing though
 
yeah but they are also the same across langs that have them
 
They varry in whether they need parenthesis and what they consider truthy
 
wdym "what they consider truthy"
 
if you can do while x or explicitly have to do while x!=null and if you do the first what it means. Is [] considered true or false?
 
mm
related LDQ: is do/while worth it?
 
4:36 PM
IMO yes, cuz the alternative is to do while (true) { ... if (!condition) break; } but if you try using continue in the middle it's very easy to introduce bugs
 
Do y'all know if that old story about the DVI hardware virus is real
 
idk, but i know there was a virus that destroyed the bios
iirc that was the only virus that actually harmed the hardware
CIH, also known as Chernobyl or Spacefiller, is a Microsoft Windows 9x computer virus that first emerged in 1998. Its payload is highly destructive to vulnerable systems, overwriting critical information on infected system drives and, in some cases, destroying the system BIOS. Chen Ing-hau (陳盈豪, pinyin: Chén Yíngháo), a student at Tatung University in Taiwan, created the virus. It was believed to have infected sixty million computers internationally, resulting in an estimated US$1 billion in commercial damages.Chen claimed to have written the virus as a challenge against bold claims of antiviral...
 
No it wasn't a virus that damaged hardware, it was a DVI port that supposedly warped other DVI cables, which warped other ports the same way, so it spread
 
ugh i just make an answer for two neighbor problem that was recently posted, just to realize theres a source restriction
 
Can mods see what my associated email is?
 
4:49 PM
@RydwolfPrograms ah
 
@RydwolfPrograms Oh okay so it's as awful as you'd think
SE hasn't supported Gravatar in a while apparently, but Area 51 still does. Area 51 Meta forces you to use Gravatar, like Area 51, but uses the updated code from the rest of Stack Exchange which uses a random/scrambled gravatar ID to prevent your email address from being brute forced
Meaning that there is no way to have a meaningful Area 51 Meta pfp
 
@RydwolfPrograms Yes
 
5:13 PM
@RydwolfPrograms Btw I made a much cleaner interface for that site: awesome-bardeen-0d23b7.netlify.app/…
Also the site often posts things with very questionable veracity, so I wouldn't count on it being true. The site basically just repeats user submissions and people submitting code often lie
 
5:54 PM
@Seggan "also known as chernobyl"
 
Lol, I'm the only one who's nominated stuff for four of the best of categories.
 
here's a Dysfunctional program that counts up forever: [0...] ,print map
 
@emanresuA I did want to nominate pajonk, but I couldn't find the SEDE query
also I was a bit lazy
 
6:15 PM
I wonder if Google Forms is TC
There's only finitely many places in the form you can be, but you could sorta create an infinite stack with the back button maybe?
I think it's an FSA without the back button, and if you use the back button you can probably make it semi-TC like CSS where it sorta is but it makes the human do a lot of the work
 
@RydwolfPrograms I'd say yes, cause powerpoint has finitely many slides but is TC
 
6:34 PM
Anyone have any ideas how I'd byte count a google form
I could make a Google Apps script that serializes all of the available data as JSON, but that feels kind of contrived. Google Drive doesn't let you download forms in any way, and it always shows their size as 1 KB.
Although I now wonder if it is possible to use a Google Form to store arbitrary amounts of data :p
 
oh no
 
Well I added a few hundred kilobytes of as to the description and it stopped syncing
Maybe I hit some sort of data limit, and I can gradually remove as to establish a baseline data usage, from which other forms' sizes can be calculated relative to this one
0
A: Implement a Truth-Machine

Rydwolf ProgramsGoogle Forms, 3 sections + 1 question Try it online! Google Forms has two features which I believe make it qualify as a (very limited) programming language: Multiple sections, which allow arbitrary rules for which sections redirect to which, allowing for uncontrolled infinite loops The ability t...

 
Dysfunctional truth machine: input int ,{[0...] ,{1 print} map} ,{print} if call
 
6:49 PM
I could do a bit-for-bit cat pretty easily
 
for that matter, here's a cat program: input print
 
@Ginger whats this
 
An exciting new language prototype
 
7:13 PM
Is it actually allowed to receive input via multiple-choice?
 
Standard I/O is dead
 
what
 
and we killed it
Standard I/O is dead, long live standard I/O!
 
@RydwolfPrograms Huh?
 
7:28 PM
All it does is arbitrarily restrict what can and can't be used as a language on the site. it's a giant outdated mess. I don't think anybody's paid attention to it for anything other than legitimizing loopholes in like half a decade.
Nobody goes around policing whether or not something uses an approved method because unless it's an egregious enough exploit that it's against the rules anyway, it doesn't matter
We can all pretend it's still something we care about or just...not, and why not go with the second
 
7:45 PM
Idk why I keep calling it standard I/O when it's default I/O
I guess my brain's merging it with STDIO
 
8:07 PM
so ive reworked externs in Rol
old:
extern fun print(s: dyn?) = """
    if s == nil then
        print("null")
    else
        print(s)
    end
"""
new:
fun print(x: dyn?) {
    extern (x) {
        if x == nil then
            print("null")
        else
            print(x)
        end
    }
}
what do you think?
 
Dysfunctional program that prints 2014 (in theory): "Happy New Year for all!" ,{charcode} map sum print
 
oh, and i havent explained: an extern in Rol is embedded Lua code, basically Rol's version of C's asm
 
8:26 PM
@Seggan Are you going to parse Lua?
 
8:38 PM
no
thats why theres the parentheses thing, to disable variable mangling
more clear example:
fun subs(s: String, starti: Number, endi: Number): String {
    return extern (s, starti, endi) { string.sub(s, starti + 1, endi) }!
}
 
@RydwolfPrograms There's literally been a new answer this week
A lot of rules are really relavent, for example that trailing whitespace is generally allowed while leading is not
 
Which is a dumb rule
 
It's not
a lot of challenges would be trivialized by allowing leading whitespace
 
I guarantee you there are langs out there that prepend leading whitespace no matter what
@mousetail That can be true with trailing too
 
True but it's invisible so not really a issue
for the record I'm against that too
 
8:46 PM
It's invisible in one specific context
Most languages nowadays aren't run in a shell
 
I think trailing spaces and a single trailing new line should be allowed
 
It's stupid to apply rules sensible for a shell to all languages
 
But that's why we have the IO rules
so I don't get to decide stuff on my own
@RydwolfPrograms Also isn't there already a rule that mandatory output generated by the interpreter is ignored?
 
 
2 hours later…
11:05 PM
LDQ: whats your opinion on union/intersection types?
 
11:19 PM
They're okay I guess. They can be a little annoying sometimes when you just want to use a function you know will return one of the types, but I get why they exist and are useful if there's decent pattern matching available
basically, it depends on the level of verbosity you're okay with
(you are talking about things like Either in Scala, right?)
 
no as in like Number | String or Human & User
 
To me it sounds more like Typescript ones
where you can narrow down union types by doing if (typeof x === something) and such
but it's... gross when you can do plain pattern matching on tagged unions / functional ADTs / Rust enums
 
@Ginger Dysfunctional?
 
@Bubbler yeah i plan to do that as well as the TS style
 
You don't need TS style union types when you do have one of those I mentioned
 
11:24 PM
erm whats a tagged union?
sounds like a more verbose version of what i described
 
yesterday, by mousetail
Dysfunctional would be a great name for a functional esoteric language
 
for e.g. Number | String you mentioned, the two cases become {tag: 1, content: Number} and {tag: 2, content: String} respectively
basically how Rust enum works under the hood
 
i dont see how thats different from union types
its just a way to implement them
(side note: i think rust enums are terribly named)
 
hey why are all the links blue?
 
@Seggan But a tagged union allows much cleaner match x.tag { 1 => ... | 2 => ... }
Plain TS unions require you to use typeof to sort out the cases, which is much more messy
 
11:30 PM
why not match x { is Number -> ... is String -> ... } arguably much clearer
 
@Bubbler which, with a syntax sugar becomes match x { Case1(num) => ... | Case2(str) => ... }
Also you can't express enum Foo { Case1(Number); Case2(Number) } in TS unions
 
those should be called smth other than enums
anyway, its a single type with multiple values, no?
not a composite type
 
@Seggan yes
 

« first day (4392 days earlier)      last day (444 days later) »