« first day (4325 days earlier)      last day (505 days later) » 
00:00 - 21:0021:00 - 23:00

12:01 AM
0
Q: CGAC2022 Day 2: Self-trapping Elf

BubblerPart of Code Golf Advent Calendar 2022 event. See the linked meta post for details. An Elf is hopping on a chessboard which extends infinitely in all four directions. He moves like a generalized chess Knight: on each step, he moves X units horizontally and Y units vertically, or Y units horizont...

 
@DLosc I'd say that's why challenge-solving experience matters when writing a challenge
 
 
2 hours later…
1:37 AM
Idea: a language where the syntax is formal logic
so hello world would be the formal representation of "there exists a string x such that the content of x is hello world and x is sent to stdout" or something similar
I have absolutely no clue how you'd implement this language
 
Isn't that just prolog?
 
never used it so not sure
 
yes, that's pretty close to how prolog operates
 
yea it is :p
ah well
seemed like a cool idea
 
feel free to learn prolog :p
 
1:47 AM
 perfect(N) :-
     between(1, inf, N), U is N // 2,
     findall(D, (between(1,U,D), N mod D =:= 0), Ds),
     sumlist(Ds, N).
uhhhhhhhhhhh
ಠ_ಠ
@JoKing yea I'll get right on that
 
that snippet isn't really that hard to understand though
 
2:23 AM
what's cool about it is that it can be used to generate perfect numbers, as well as verify them
@cairdcoinheringaahing you should check if your system comes with it pre-installed before you start buying mod lootboxes
 
@JoKing I know,but it's just so fun to gamble. Did you see the holiday prize? We could potentially get the power to force a CM to just outright fulfil one :P
 
the drop rate is going to be like 0.1% though
i already have enough user skins
 
Fair enough. I'm still gunning for the Browncat skin, apparently they increased the rarity recently
A certain song just happened to appear in my random playlist, so: CMP: Have y'all heard All I Want For Christmas Is You yet this holiday season, and if so, how soon after Halloween was it? :P
 
2:44 AM
nope
 
3:35 AM
@cairdcoinheringaahing by choice or by force?
 
5th of november
Nov 5 at 4:15, by lyxal
I see your youtube link and raise you another
 
 
7 hours later…
10:15 AM
LDQ What should arithmetic operators on functions do? Like +, -. *, / etc.
Or when one side is a function but the other a number or array
 
@mousetail Compose them: (f+g)(x) = f(x)+g(x)
 
What about f + 3? This is for a golfing lang so I'd like every possible combination to do something useful
 
Let 3 act as a constant function. (f+3)(x) = f(x)+3
 
That makes a lot of sense thanks
 
Btw, this is what happens when doing tacit programming in APL and its derivatives.
 
10:36 AM
When composing with a array, should f + [a,b] return [f+a, f+b] or lambda:f(x)+[a,b])
 
10:52 AM
@mousetail The latter, because maybe f(x) returns a 2-element array too.
 
11:37 AM
@RadvylfPrograms are you aware of the connection to the Riemann Zeta function?
 
12:15 PM
of course there's a connection to the Riemann Zeta function, why wouldn't there be a connection to the Riemann Zeta function
 
LDQ When doing logic on arrays with different lengths, should the output I only apply to the shortest one, or just NOP the extra elements in the longest array
 
1:20 PM
wait no
 
YOOOOOOOOOOO
 
12 days until hats
 
Wasn't winter bash all of december before?
 
fun fact: the site code updates the counter twice per second despite it only having second resolution
 
Makes sense. Browser times frequently take just slightly longer than specified to run and the difference can add up
 
1:35 PM
also there exists code to reload the site once the timer hits zero
shame I can't find any secrets...
 
2:18 PM
@mousetail I'd go with the second
Easier to get to the first from the second than vice versa
Maybe instead of NOPing, fill the other list with some sensible default
For most things it would be a NOP, but for others you'd be able to make it a useful "overload"
 
Thanks
 
3:01 PM
@Ginger I usually do something like 10-40 times per second to make it as close to accurate as possible
1 message moved to ­Trash
Well someone's not getting the christmas spirit
(also did the bakery freeze?)
@cairdcoinheringaahing Can you unfreeze the bakery pls
@lyxal Looks like they're doing some sort of half-winter-half-summer thing this year which is cool
I guess they forgot Australia doesn't really exist
@cairdcoinheringaahing Yeah, Spotify randomly played the MCR cover of it a few days ago. A little earlier than I expected to hear it lol
 
3:19 PM
LDQ Would it be a major issue is input is available only as a lazy array?
 
3:30 PM
That got deleted super fast
 
yeah I was in the middle of destroying the account so it automatically got deleted
 
I've never seen this in a review task before
 
I see it all the time on SO, though 99% of the time it indicates a audit and the post is fine
 
Interesting, it let me review a deleted post:
 
"Looks ok"?
 
3:34 PM
can someone find me that website which let you use block-based coding to represent logical stements?
 
(if you're wondering about "looks ok", since it's deleted no other action was allowed)
 
it got mentioned a while ago but I've lost the link
@RadvylfPrograms ಠ_ಠ
what was that person's problem
 
32 mins ago, by Radvylf Programs
Well someone's not getting the christmas spirit
 
ah well
 
Good thing we have plenty of challenges coming about identifying naughty vs nice kids
 
3:36 PM
lmao
2 mins ago, by Ginger
can someone find me that website which let you use block-based coding to represent logical stements?
 
Pure data?
 
not it
it used blockly or smth
brb
 
3:48 PM
back
 
3:59 PM
@Ginger scratch?
 
nope
 
snap! ?
 
not it either
it was very specialised
and iirc it included challenges to represent some set of prepositions with blocks
 
4:20 PM
Blockly is a client-side library for the programming language JavaScript for creating block-based visual programming languages (VPLs) and editors. A project of Google, it is free and open-source software released under the Apache License 2.0. It typically runs in a web browser, and visually resembles the language Scratch. It is also being implemented for the mobile operating systems Android and iOS, though not all of its browser-based features will be available on those platforms. Blockly uses visual blocks that link together to make writing code easier, and can generate code in JavaScript, Lua...
applications section
 
None of those have to do with logic
 
yeah just giving ginger resources
> a long list of Java/Python/JavaScript/C++ wannabes: Ceylon, Clojure, Crystal, Elixir, Elm, Haxe, Julia, Kotlin, Nim, Pharo, Racket, Rust, etc.
imo rust and kotlin are above that now
that was 5 years ago
 
4:42 PM
@cairdcoinheringaahing November 28 :P
(though it's possible it was playing at a store a day or two before that and I just tuned it out)
@RadvylfPrograms They did that last year too--at least, I remember there were two versions of the artwork on the (Wint|Summ)er Bash homepage
 
@mousetail no, winter bash is usually half of December, plus the first week in Jan
 
 
1 hour later…
5:56 PM
am I hallucinating this website???
I swear it exists
HAHAAAAA I FOUND IT
 
6:17 PM
Presenting, (maybe) Hello World in this hypothetical logic language: ∃x∈S((x="Hello World")∧(x∈O)) where S is the set of all strings and O is the set of all lines of text written to standard output
very readable, isn't it
if I'm interpreting it correctly it basically says "there exists some element x in the set of all strings where x equals "Hello World" and x is in the set of all lines of text written to standard output"
and then the interpreter has to make that statement true
the idea is to make a program such that that the side-effects of the interpreter enforcing the rules of the program are the desired results
 
6:46 PM
mmm
 
@Ginger id star that but i dont wanna clutter the board
 
@Ginger wow
 
@UnrelatedString is that a good or bad noise
 
interested
 
cool
 
6:51 PM
are you gonna build it
 
the interpreter?
no clue
 
mind if i start on it
 
it would be, how shall I put this, less than trivial
@Seggan sure, good luck
I'll make some test programs for you
 
given everything else im workin on rn, i probably will do it verrrry slowly (i.e. when i feel like it)
if anything, just ask for collab on GH
 
@Ginger why can't you just write ("Hello World"∈O)?
 
7:00 PM
you could
 
Don't ever question esolangists.
 
but I didn't think of doing that :p
@mathcat no, they're right
 
yeah i was gonna ask why you said hello world was in the set of all strings if its a string
 
maybe get rid of string literals; have regex literals as predicates :P
 
oooh lol
the intersection of all strings and all strings matching this regex :P
ok wait thats just all strings matching this regex
 
7:03 PM
this program should count up forever if N is the set of all natural numbers: ∀x∈N(x∈O)
 
my set theory is bad, whats the upside down a?
 
"for all"
 
for all
 
ah
 
get ninja'd lol
 
7:04 PM
for all x in N print?
 
@Seggan yes, pretty much
<something>∈O literally means "<something> is in the set O" and since I'm using O to represent stdout it would just print <something> to stdout
(btw I'm learning these symbols as I go so feel free to correct any mistakes)
 
@Ginger yeak ik the e
dont tell anyone but all the set theory i know i picked up myself, i never took any course in that
and from algebra 2
 
lol
this one should print all even numbers in the set of natural numbers: ∀x∈{y∈N:y%2=0}(x∈O)
 
do rationals
 
hmm
that'd just be a change of N to R in theory
 
7:08 PM
@Ginger for all x in the set of (all y numbers such that y%2 = 0), x is a member of stdout?
 
@Seggan exactly!
 
who needs to take set theory when its this easy? :P
 
are we thinking prolog-esque semantics where things do execute in some known order with reliable side effects
 
that's an implementation detail; I'm just doing syntax right now
 
so this is basically set theory, executed?
 
7:11 PM
yes
and some formal logic as well
some things are different to make complex programs possible; an example is in progress
 
What about loops?
 
i think the upside down a does that
 
^
 
right
 
conditionals are the tricky bit and what I'm working on right now
 
7:13 PM
∀x∈{y∈N:y<10}(x∈O)
print 0..9
 
yup
 
or {y∈N:y<10}⊆O should do the same thing
(dont ask me i just looked up a symbol table)
 
the syntax really becomes iffy with programs like FizzBuzz, which should look something like: ∀x∈N((((x+5=0)⟹("Fizz"∈O))∧((x+3=0)⟹("Buzz"∈O)))∧("\n"∈O))
there are a lot of weird bits to this program; lemme explain
first: I'm using ∧ to join statements because this language will (probably) be eagerly evaluated
 
yep (to the eagerly evaled part) at least thats how i plan to do it
 
second: I'm using as an if statement, which introduces another weird syntax thing: the distinction between "statements" and "questions"
in short, questions are evaluated to check their return value, but statements are enforced to cause effects
(replace all the +s with %s btw)
 
7:21 PM
is there not a way to do it with set unions/intersections?
 
x%5=0 is being evaluated to check if x mod 5 equals zero, but "Fizz"∈O is enforced to make "Fizz" a member of set O
if "Fizz"∈O were on the other side, it would be evaluated to check if "Fizz" is a member of set O
and that is (the main reason) why I don't want to implement this
 
wait if O is a set, then you cant print multiple of the same thing to stdout?
 
fair point
O isn't technically a set
 
you could make it so strings aren't unique mathematical objects
 
it's a special object representing stdout, which can only be written to and accepts duplicate elements
 
7:24 PM
or maybe O's members are supposed to be tuples
 
strings are unique to allow things like "the set of all strings" to exist
 
"a" = "a" tho
 
@Seggan that's my point
those both represent a single string, a point in the space of all strings
so of course they're equal
 
@Ginger then wdym by this
nvm
i get it
 
things really become interesting when you consider the ramifications of things like set complements
 
7:27 PM
hmm to actually implement this sets will need to be ordered
 
@Seggan "sets" in this language will probably be similar to "lists" in python, but maybe w/o duplication
 
yeah
 
actually they'll be closer to a cross between generators and lists
 
So lazy lists
/iterators
 
@Ginger stringset^c = all strings not in stringset
 
7:29 PM
Y'all aren't going to be able to implement this like a normal imperative language, even with laziness
 
who's this "y'all", kemosabe?
I'm just the SYN_TAX guy
 
You and Seggan
Even as the syntax guy you've still got to think about implementation at least a little
Since implementation will change how that syntax works and what syntax is possible
 
@RadvylfPrograms and how do you suggest we do it?
i was thinking a depth first approach where the interpreter tries to make it true
 
E.g., you'd probably be able to explain the collatz conjecture to the interpreter in terms of set theory
 
@Seggan sounding a lot like prolog again :P
 
7:32 PM
At some point turning programs in this lang into nice imperative code is going to run into some halting problem stuff
 
it is
which is why this interpreter will need some stuff to make sure that no paradoxes arise
 
@UnrelatedString eh, its a fun take on prolog :P
 
what should we call it
Proset
 
high on math
 
7:34 PM
"Unimplementable" so someone else gets nerd sniped into writing it
 
ahah
yes
 
@RadvylfPrograms whats why you interpret it, not (trans)(comp)ile
maybe i should learn prolog for this
 
"Complement"
"Aristotle"
 
"I Got Nerd Sniped"
TIL the "highlights" button
 
I don't think there's any easy way for this language to take input
 
7:46 PM
"x is in input"
Then you can just use x like anything else
 
makes sense
 
@Ginger i was thinking of that lol
 
IeO (where e is the subset symbol) is even a somewhat un-rigorous cat program
I=O would actually work too wouldn't it
 
hmmmmmmmm
the second one should, the first one...
I have no idea what that'd do
you'd be saying that input is contained within output
 
7:50 PM
also print the input then
 
So it's UB
 
so I suspect it'd just print a representation of the input object and exit?
either that or error
 
@RadvylfPrograms the second one has UB if you add something to stdout
 
because input and output are both infinite "sets"
 
i.e. what is I=O(1eO) where e is element of
 
7:51 PM
Well they're not infinite are they? Just have the potential to be?
 
anyway, here's a program which would cause the interpreter to error with something along the lines of "unenforcable program": ~1=1
 
@RadvylfPrograms imo the first one should be the answer
 
remind me what "UB" means?
 
Which first one
@Ginger Undefined behavior
 
ah
 
7:52 PM
3 mins ago, by Radvylf Programs
IeO (where e is the subset symbol) is even a somewhat un-rigorous cat program
 
Yeah but that could also mean "print the input plus some other stuff"
I=O is the one that means "the output is the input"
 
technically it means "make the output equal the input"
 
3 mins ago, by Seggan
i.e. what is I=O(1eO) where e is element of
 
and the interpreter has to enforce that
 
@Ginger No, it means I is equal to O, right? It's only since the compiler is actively trying to make that true that it turns into a command like that
 
7:55 PM
^
therefore the program is O=I?
 
@RadvylfPrograms yes, I guess
 
wait this aint assignment
it means "I is the same as O"
 
here's a question: would the program min N (where N is all natural numbers) exit?
I think it should
 
@Seggan yeah
 
so since it cant change I, it will change O, no matter what order
 
7:57 PM
Yep
= is commutative
 
okie i get it
 
ideally, if the interpreter were given the program ∃x≠0(x=0) it would error instead of running forever
 
but okie isn't here right now
 
@RadvylfPrograms :|
 
(also, that's who I was confusing you with, not Niko)
 
8:00 PM
@RadvylfPrograms aww
@Ginger english please?
 
@Seggan "there exists a value x, which cannot be equal to 0, that equals 0"
 
Well you'd need some sort of constraint-based thing anyway
 
yeah thats an obvious contradiction
 
So infinite looping would be indicative of a very poor implementation
 
(btw I'm using mathsblocks.com/html/builder.html to make these programs, it's very useful)
interestingly, mathsblocks lets me make this block:
what exactly would that do?
 
8:03 PM
tuple decomposition?
 
maybe???
 
@Ginger "for all x, y is a subset of ...", right?
So you could use it to say that y is the intersection of everything in x, for example
 
but I can add any number of extra variables
 
theyre probably all equal
 
assuming you were good enough at set theory, you should theoretically be able to make a program in this language to generate (eventually) any series of numbers
 
8:09 PM
which im not
 
me neither :b
 
or just all of them are unrelated members of the set
i'm like 99% sure that's a common notational convenience
 
@Ginger Nice, your language has achieved like, the bare minimum for an esolang :p
 
yay
 
8:24 PM
should numbers and strings be one and the same?
or should we do like "x is in input and in the set of all numbers" to convert number to string
 
A string could be an ordered multiset of char code integers
 
which is a list
 
yep lol
 
Osabie makes strings and numbers behave identically. IME it doeesn't work very well
 
You could do numbers set theory style, and represent strings as a set of (char code, index) pairs
 
8:26 PM
@Ginger your input?
 
8:46 PM
trying to do primality, im lost
{p∈N:(p≠1)∧∀n∈N(((n>p)∨(n=1))∧(p%n=0))}⊆O i think?
 
sorry, was afk
@RadvylfPrograms I don't really like this
strings and numbers should be separate
@Seggan I dunno man :p
 
So you're saying this lang will have data types?
 
I see no reason why not
do you? I might've missed something q:
 
I guess not
 
cool
 
8:52 PM
Feels kind of weird to have strings, a collection type, as a data type in a language built around sets tho
 
yeah, that's fair
but how'd you represent strings then? remember, they're supposed to be a point in the space of all possible strings
 
You'll need some way to turn strings into a set representation anyway
For iteration purposes
So why not just store them that way all the time
 
fair enough
 
@Ginger something like {'a', {'b', {'c'}}}
Assuming your sets are unordered and non-multi
Which you probably want
 
@RadvylfPrograms only strings and numbers
 
8:54 PM
sets need to be ordered for infinite sets (like that of all natural numbers) to work
 
@Seggan and sets...
 
which reminds me: we already have an Array Programming Language, why not a SEt Programming Language?
 
@RadvylfPrograms and that :P
 
@Ginger How?
 
@RadvylfPrograms I'd assume that if you want to iterate over all natural numbers you don't want to get 1, 214894732189473219000000000000000000000000000000000, 377, 281432, etc
 
8:54 PM
I mean internally they'd need to be ordered, but set theory uses unordered infinite sets all the time
 
@RadvylfPrograms so the program wont print 34, 247689, 2345, 0, ..
ninja'd
 
@Ginger The order that things are iterated over internally doesn't matter
 
???
 
Give me an example of where it matters, where I/O is unordered
 
how the [$!$$] would unordered I/O work
 
8:56 PM
The same way unordered anything works
Raw input and output would be through sets, just like how raw BF input and output is integers
You'd just use some set-based representation of an ordered list if you needed one
Like {'a', {'b', {'c'}}} for strings
 
...
it makes sense but I really don't like it
 
Having ordered sets but only in one place is going to be really really weird and break a lot of stuff
 
@RadvylfPrograms like what, i can write World! before Hello, ?
 
And if everything uses ordered sets, it's not going to be very set theory-y of a language
 
true
 
8:58 PM
@Seggan There is no "before"
Everything happens at once, the language is just a statement/set of statements about the relationship between the input and output
 
I guess the entire program would kinda have to run all at once
 
Yeah, exactly
 
(also, this is nit-picking, but I already said that I/O objects aren't actually sets, they're special objects that have a few set-like features)
(you can't read from stdout for example)
 
That doesn't really make much sense does it?
 
how'd you implement iterating over stdout then?
 
00:00 - 21:0021:00 - 23:00

« first day (4325 days earlier)      last day (505 days later) »