« first day (3937 days earlier)      last day (897 days later) » 
00:00 - 06:0006:00 - 00:00

6:00 AM
Anyway, it's kinda late here so p/
 
e/
(haha that spells pee that's so funny amiright?)
 
Not as bad as it could've been I guess
 
i think there was this one AOC that I solved by writing a custom python class, using a regex to replace the input a bit, and then eval the whole thing
the one about messing with op precedence? idr
 
i think i remember that
yeah
you definitely mentioned doing that on that one
 
6:03 AM
Well, a lot of pain later, (((b(a(((b((a|b)(bb|ab))|a((ab)b|(aa|(a|b)b)a))a|((a(b(a|b)|ab)|b(aa|bb))b|((aa|bb)a|(ab|aa)b)a)b)b|(b(b(a(ab|ba))|a(a(ab|aa)|b(ab|ba)))|a(a((bb)a)|b(a(aa|(a|b)b)|b((a|b)a|ab))))a)|b(a((b(((a|b)a|ab)b|(aa|bb)a)|a(a(ab)|b(aa|ba)))a|((b(b(a|b)|ab)|a(aa|ba))b|(a(bb|ab)|b(aa|(a|b)b))a)b)|b(b(b((ab|aa)a|((a|b)a|bb)b)|a((bb|ab)b|(bb)a))|a(((ab|aa)a)a|(a(ab|aa)|b(bb|ab))b))))|a(a(a((((aa|bb)(a|b))b|(b(ab|aa)|a(aa|ba))a)b|(a((ab|ba)a|((a|b)a|bb)b)|b(b(bb)|a(aa|bb)))a)|b(((a(bb|ab)|b(b(a|b)|ab))b|(((a|b)a|bb)b|(bb)a)a)b|(a((bb|ab)a|(b(a|b)|ab)b)|b(b(b(a|b)|ab)|a(ab|aa)))a)
 
@hyper-neutrino day 18
 
CMC: Golf ^^
 
@hyper-neutrino what a nerd. I just parsed it like an esolang and eval'd it
 
well i think i did that for part 1
and then for part 2 realized i could do a little trolling
and then realized I could've saved a lot of time on part 1 doing that
 
6:05 AM
Is the answer to adventofcode.com/2020/day/19 404?
 
No, unfortunately the answer wasn't found
 
everyone's input is different
 
part 1 is easy if you use APL - just s/*/× reverse tokens and eval
 
IIRC that giant regex thingy can be spoiler
 
@emanresuA my part 1 was 250
 
6:06 AM
Hm. My regex bad then
Oh wait I forgot to anchor it
I got 205 after anchoring
 
@emanresuA be happy you never had to implement intcode
 
oh god
i hated that so much
 
> Intcode is an esoteric programming language created purely to annoy programmers competing in the Advent of Code 2019
some of my best writing right there
 
Intcode has so mixed reactions, really
Disclaimer: I haven't done 2019 at all
 
i didn't save my intcode computer from day 2
so i had to rewrite it on day 5
 
6:19 AM
CMQ: What's the python set operator ^ called?
e.g. {1, 2, 3, 4} ^ {2, 4}
 
symmetric difference

outersection

Jun 11 at 20:33, 1 hour 23 minutes total – 39 messages, 5 users, 0 stars

Bookmarked 5 secs ago by hyper-neutrino

 
"Elements in a or b but not in a and b"
 
@cairdcoinheringaahing yeah but I can't use that as a python function name now can I?
 
elements_in_a_or_b_but_not_in_a_and_b
 
huh, turns out it does fit inside 80 chars
even when it's indented it still fits
 
6:30 AM
Who keeps 80-char line width anyway :P
 
Vyxal does
from the style guide
 
Oh wow, it has a style guide
 
@lyxal set xor
 
6:47 AM
more precisely set.__xor__
 
7:13 AM
0
A: Sandbox for Proposed Challenges

BubblerClimbing up slippery stairs code-golf math combinatorics Challenge You're standing in front of a stairway with \$n\$ stairs in total. (If you label each staircase \$1,\cdots,n\$, the starting point counts as the 0th staircase.) You can climb up \$1,2,\cdots,k\$ stairs at a time. But some stairs a...

 
8:11 AM
0
A: Sandbox for Proposed Challenges

BubblerVerb arities in J trains code-golf Background J has trains similar to APL's. Given a sequence of verbs (functions), three rightmost verbs are grouped to form a derived verb (a fork) recursively, until one or two verbs remain. If the sequence has odd length, the entire train is a chain of forks. O...

 
Whenever I say something about the lack of challenge ideas, I magically get some
 
8:24 AM
@Bubbler I have an infinite number :) The problem is pacing myself
and also working out which tag would be happy for it
and then waiting for days while no one comments on the sandbox version :(
 
Holy guacamole, Firefox somehow survived a gigabyte-long string.
 
We're well aware that sandbox feedback doesn't come often, so we recommend to leave there for at least one week and ask in chat multiple times
 
9:00 AM
CMC: Write a competitive submission to a KoTH... In Brainfuck.
Competitive as in top 50%
 
That's surely a CMegaC, unless Wheat Wizard's one (RPS with 3 bits) goes live
 
¯\_(ツ)_/¯ Depends on the KoTH
@Bubbler How many abandoned sandbox proposals do you have?
 
@emanresuA 8, as in "not touched for at least a month". Most of them are pretty complex or niche
If it gives 9, I just deleted a generic theorem proving one (which is meaningless now)
 
10:11 AM
this challenge is being posed at 00:00:00 tomorrow UTC codegolf.meta.stackexchange.com/a/24013/98590
please comment!
(or as soon as possible after I wake up :) )
 
 
1 hour later…
11:16 AM
@alephalpha Hi!
@alephalpha how closely related do you think it is ?
 
occasionally I'll find a site that has code golf challenges that isn't here/codidact (think code.golf style of site) and I get reminded how lucky I am that this site allows SBCSs
e.g. I find this challenge, and I see that there is already a vyxal answer there and that it's 17 bytes. I say to myself "ha I'mma game on some nerds and win", create a 12 byte solution, go to submit it only to see that it's counting it as like 20 something bytes and realise that it scores everything in UTF-8
for reference the 17 byte answer is actually 11 bytes under SBCS meaning I was the nerd that got gamed on
 
11:37 AM
> noob at vyxal definitely the worst solution
 
@Anush I think it is really closely related. Just let a=l, b=m+1, and take the s'th item in the output of that question.
 
@lyxal there's also a 10 byte SBCS solution in the explanation
 
@alephalpha intriguing... let me see if I can get one of my example answers from it
 
> I was the nerd that got gamed on
 
Anyone know if/how I can limit a search to only posts by users other than me?
 
11:39 AM
@MannyQueen although by the looks of things, it should actually be 11
actually no it should be 12
 
@Anush I modified the top Octave answer from that question: Try it online!
 
@lyxal because I can only assume they tested it on the online interpreter which interprets something like 10,110 as [10, 110] instead of "10,110", hence the lack of splitting on commas and casting to int
so I'm not the nerd that got gamed on after all
 
given that it passed the automatic testing, i assume that's how their offline interpreter is set up too
 
@alephalpha wow. Could you kindly modify tio.run/##K6gsycjPM/qfZhvzPycxNyklUSFRJ8mqKDWlNDlVI680t6BSLzk/… please. I find that easier to read
 
@MannyQueen lol it is
⌐⌊∑:bṅ‛is$WṄ fails even though it works when explicitly given a string
I can only imagine that'd screw up some submissions lol
 
11:53 AM
 
:59561780 wow again. Thanks so much even though you killed my question. I never would have guessed they were solving the same problem
 
ah yes thank you sympy for being too precise
sympy.Rational(-72.81818181818181)
one would think it'd return -801/11
but instead it returns -1281031001961565/17592186044416
(alternatively, 7281818181818181/100000000000000)
 
@alephalpha can you explain why they are the same problem?
@lyxal sympy needs thousands of hours of work to make it any good
 
@Anush or I could just use sympy.nsimplify
 
@lyxal yes but it should really try to be helpful
 
12:29 PM
@Anush A b-sided die takes value in the range 1,2,...,b. That question says rolling it a times and summing the results. It asks for a frequency distribution, but that is basically asking how many ways we can get a sum.
 
12:40 PM
@Bubbler you are due for execution some time this week. you will not be warned on which day the execution will happen; it will come as a complete surprise.
 
@Neil hey I remember watching a video on that once
the idea is that no matter how much you try to think logically, it'll still come as a surprise
 
@alephalpha I love how many votes and answers it got
@alephalpha I have an alternative question in mind to start iterating from the X'th step
 
@lyxal right, the point is that you shouldn't assume the correctness of the examiner
certainly whenever I solve puzzles I never assume anything about the actual number of solutions, even though it nearly always turns out to be 1 in the end
 
1:15 PM
Who decided that cos(3.14 degrees) ≈ -cos(3.14 radians)
2
this has been confusing me for at least 2 minutes
 
@pxeger Try 3.1974 instead of 3.14
 
@Adám the joy...
 
 
1 hour later…
2:26 PM
Morning!
What do y'all think about going ahead and doing the merge thing? It's been a few days, and there isn't a single vote supporting not doing it
 
I don't see any reason not to, personally
 
@mods can we haz 11
 
3:10 PM
14
Q: Write a Whitespace Interpreter

Kevin CruijssenChallenge: Your challenge is to write an interpreter for Whitespace. Given a string consisting of spaces, tabs, newlines, and potential other characters, as well as possible inputs for the Whitespace program itself, output the result of the given Whitespace program. Here an overview of the Whites...

Try this, None of new answers are written.
to get 50 rep
 
hi @AaroneousMiller
 
yo @Anush
 
how things?
 
pretty good, how bout you?
 
3:26 PM
sad.. my sandbox question which I thought was great turns out to have been answered by a question that looks completely different
 
I have a new version in mind.. the problem is fitting it into one of our tags
 
3:59 PM
That moment when a problem was probably caused by x or y but couldn't possibly have been caused by z so you debug it and find that the problem was caused by z.
4
*surprised pikachu*
 
@lyxal Yes (but it's not super capable yet)
 
4:20 PM
I finished SMB3!
Ooh HBL looks cool
 
@RedwolfPrograms Thanks! I've had the core idea of a half-byte Lisp for a while, but playing with Risky gave me some specific inspiration to implement it.
 
4:45 PM
@RedwolfPrograms just ping me lol
so just to confirm, we are synonymizing array-manipulation → array and merging?
also there's literally a button to reverse the direction of a synonym lol
 
@hyper-neutrino Yep
Yay, it looks like it worked
 
done; it'll take a bit for everything to finish updating but all questions are retagged
 
We are featured in this video
6
 
is stringifying the function considered an improper quine (specifically, this JS answer)
 
5:00 PM
I think it obviously is, but the precedent seems to be no (because "quines only prohibit reading the source file" - whatever that logic is???)
In case you can't tell, this pisses me off (because I use a language where you can't stringify a function)
 
well, I don't make the rules ¯\_(ツ)_/¯ in case I've never mentioned it before handling "invalid answer" flags is my second least favorite thing as a mod, only overtaken by handling "non-competitive answer" flags
 
I'm gonna make a meta post
oh, actually:
15
Q: Is a quine that reads a function's source a cheating quine?

StephenSo, in the last couple months, I have seen several (especially JavaScript) quines told that they are cheating because they stringify a function. Accordingly, I thought that was the standard - it's reading its source, of course it's cheating. Wikipedia's section on cheating quines includes the fo...

 
@LuisMendo there's even somebody in the comments confused about Jelly's custom code page, in true CGCC fashion
 
@pxeger conveniently contradictory votes on the answers: Yes @ +23/-5; Yes @ +23/-10; No @ +28/-15
 
5:27 PM
i like this comment:
> IMHO we should allow or disallow evaluating a function/string/etc. as code, rather than simply disallowing reading a function's source.
are there any cases where "evaluating a string as code" is ambiguous?
 
@thejonymyster Fungoid quines, where the trick is often to make a string of all of the code, then execute that same code to print everything. It could be argued both ways with regards whether or not that is evaluating a string as code.
 
how do you make a string of your code?
oh, wait i see
 
well i cant read that but i imagine the logic is "start quote, go through section A, end quote, go through section A"
 
pretty much
 
5:34 PM
i gtg and i know you said it could be argued both ways but id reason that its not cheating since fungoid languages are about how the code overlaps so like... if you were to rewrite the code as 1d, itd never try to refer to the code in an illegal way
like this is the same block of code acting as both a string and a function, not having it be a string and then executing it as a function
wait now i disagree with myself since you could say any strings count as stringifying code, i see
ok byee
 
@Mayube Haha, yes, I saw
 
6:24 PM
@hyper-neutrino Rules are that it is an improper quine here
15
Q: Is a quine that reads a function's source a cheating quine?

StephenSo, in the last couple months, I have seen several (especially JavaScript) quines told that they are cheating because they stringify a function. Accordingly, I thought that was the standard - it's reading its source, of course it's cheating. Wikipedia's section on cheating quines includes the fo...

Oh I see I've been ninja'd lol
 
aight, thanks
 
6:36 PM
I love how caird's autocorrect (presumably) turned "advent calendar" into "advantage calendar" lol
@Bubbler Ideally, I would like it to be a daily event, similar to advantage calendars. That said, this is much more of a "should we have a a Christmas event?" post, so any suggestion is ok — caird coinheringaahing 11 hours ago
 
7:05 PM
@lyxal Hey, Is your name inspired by Vyxal?
 
should.... should I tell him?
 
Lyxal made Vyxal, it's named after him :p
 
7:07 PM
lol
 
lyxal but the first char is encoded by ROT-10
 
7:47 PM
how about a new definition? A quine can't use the same byte as both code and data
this would conveniently also rule out all of those pesky eval-based quines too
 
Seems kind of unobservable though
 
Yeah, and what's the difference between evaluation and manual running?
s=code, eval(s) vs s=code, code
 
also what about languages that don't distinguish between code and data?
How do you make that distinction in a brainfuck quine, for example?
 
^
o/
 
8:13 PM
@Mayube That also rules out the Fungoid quines I was mentioning earlier.
 
If I'm using {* ... *} for block comments, should I use {** ... **} for non-parsing block comments, or something else?
(non-parsing block comments will be ones that ignore string literals, single line comments, nested block comments, etc., while normal block comments will parse those for nesting purposes)
Or should I reverse it and make the parsing/nesting block comments use the ** notation
Or maybe pick a better single character instead of a double *
I wish {- wasn't ambiguous
 
8:34 PM
CMQ: Opinions on ++ and --? Are they worth keeping in a higher level practical language?
Same with bitwise operators. I'm planning on just having them as importable functions.
 
@RedwolfPrograms only as statements
@RedwolfPrograms binary bitwise operators, yes. Invert, nope
 
@pxeger Idk, that takes half the point away from them
 
or, at least, keep only the postfix ones then?
 
That might be a good idea
 
I've changed my mind
delete them entirely
 
8:39 PM
I guess there'll always be the option of array[i += 1], which is about as good
Or, in my language, array[i+: 1]
 
really? : for assignment?
I understand it's unmathematical because of reassignment, but it's just too wrong for existing programmers
 
It's mostly going to be a language for personal use, and I'm a fan of :
= is too yellow
 
you're too yellow
Redwolf
 
The fact that "red" is yellow is quite annoying, yeah
I've just written what might be the least cursed parser (or at least, part of a parser) I've ever written
I still need to do the actual parsing part, but so far everything is clean, organized, and extensible, which is shocking given that I'm the one who made it
Ash's parser was so hard to debug and add features to that it was a big part of why I stopped development on it lol
 
@RedwolfPrograms The month leading up to Christmas is all about getting the upper hand
 
8:49 PM
:p
 
@RedwolfPrograms Python does fine without them
 
yeah, but it's fun to abuse ++ and -- in really weird ways
There're a lot fewer of those without pointer manipulation though I guess
 
@RedwolfPrograms Both of them are useless. Negating twice does nothing ;-)
 
lol
 
9:31 PM
Hmm, currently ( ... ) and { ... } are identical in my language
Since blocks evaluate to the result of their last statement
Should I give one of those two a distinct meaning?
 
Is s is a list, what is {}.fromkeys(s) ?
 
Oh, I've just realized { ... } will be ambiguous since objects/dictionaries would use the same syntax
 
I am trying to understand sorted({}.fromkeys(s),key=s.count,reverse=1)
 
@Anush fromkeys(s) creates a dictionary with a key for each item in s
it's a static class member of dict, but in python you can call static members from an instance, and {} is an empty dict and shorter than dict
So for example {}.fromkeys(['a', 'b', 'c']) will produce {'a': None, 'b': None, 'c': None}
 
Ok. Then when you sort a dict you only get the keys it seems
That’s not very obvious to me
 
9:46 PM
Okay, I'm trying to figure out how to reduce the ambiguity between code blocks and dictionary literals in my language
They both use { ... } at the moment
I guess I could just have a small number of places where it's assumed to be a code block, like most languages do, but that creates annoying issues like the x => ({y: x}) in JS if you're mapping to an object
I suppose I'm just going to have get rid of one of those two purposes for it entirely :/
Not sure if I'd rather keep code blocks or object literals
 
@alephalpha hi.
 
I've started working on my Whitespace interpreter in Vim. So far I have a few of the simpler commands implemented, though there's no parsing yet. Hopefully I can finish before the bounty is done. I think it's fun having a time limit like that to work on it. :)
 
10:19 PM
@Fmbalbuena redwolf is right. I was that uncreative that I just named the esolang a tiny bit differently to my own username which I got from keyboard mashing.
 
10:38 PM
@RedwolfPrograms Yes. It's a minor thing, but it always bothers me to have to write x += 1 in Python.
@RedwolfPrograms Yesss ^_^ Now tell me you're also using = for equality checking instead of ==
 
10:52 PM
@RedwolfPrograms imagine using ascii for variable assignment
funnyNumber ← 69 would be cooler
 
@RedwolfPrograms if code blocks already work as expressions, you could support (stmt; stmt; stmt;) instead of {stmt; stmt; stmt;}
also yes that looks weird
 
0
Q: How would I ignore an input not in my list?

Nick BaconHave this program that allows the user to remove and add classes into a courselist until there are only 5 classes, but I'm having problems with a specific situation. I want to make it so that when the courselist has the classes "English", "Math", and "Science", if I type "englis", "Math", and "Sc...

 
even better, just don't support expression nesting, and make (key: value, key1: value1) the object/dict syntax
 
11:11 PM
@lyxal I do prefer in theory, but for a practical language IMO it's always best to stick to printable ASCII + newlines. Sometimes you need to write code in Notepad using a standard English keyboard layout.
 
I like : a lot
 
11:34 PM
@DLosc Pip is a major inspiration for the language's assignment operator variants, like ::
I won't be using = for equality, mostly because == is very clearly equality, whereas = could be confusing for people used to using it for assignment (aka me :p)
 
Laughs in J
dyadic = is equality, =. and =: are local and global assignments
and monadic = has some other different meaning that is deprecated in latest version
 
11:53 PM
In QBasic, = is assignment if it's in a statement by itself like x = 5, and it's comparison if it's in an expression like WHILE x = 5. This system is almost perfect IMO, but the one drawback is that you can't do multiple assignments like x = y = 5 (instead of y <- 5, x <- 5 it's interpreted as x <- (y == 5)).
Oh hey, LYAL is an hour earlier this week. (Spot the US resident.)
Are we doing /// this time?
 
00:00 - 06:0006:00 - 00:00

« first day (3937 days earlier)      last day (897 days later) »