« first day (3963 days earlier)      last day (863 days later) » 
00:00 - 16:0016:00 - 00:00

12:06 AM
Please don't forget to post AoCG2021 Day 5 @Razetime
 
They're not even online right now, you can post it
 
OK. I'll post it.
 
0
Q: AoCG Day 5: Balancing sleigh with lots of trunks

alephalphaPart of Advent of Code Golf 2021 event. See the linked meta post for details. The story continues from AoC2015 Day 24, Part 2. Here's why I'm posting instead of Bubbler To recap: Santa gives you the list of gift packages' weights. The packages must be split into multiple groups so that each grou...

 
12:30 AM
Ok, my solution to ^ is at least O(n! * 2^n * n log n), probably higher
 
Ooh, the best kind
 
It's unlikely to be able to run testcases
Well, the question's NP-complete anyway
 
Hopefully someday in the next decade or so we'll have quantum computation chips on PCI slots of something, so we can run test cases for golfed programs lol
 
Then let N = 1, and solve it in polynomial time
 
@RedwolfPrograms Even better, it doesn't really work
 
12:40 AM
Lol why'd I get invited to Google FooBar for searching "dependency injection"
 
Wdym FooBar?
 
isn't that google's "secret job interview" thing?
 
Yeah
Hmm, so I'll have to use either python or java
I guess that's why it waited so long to invite me
Because "dependency injection" shows an interest in Java or sth
 
1:18 AM
Yay, I managed to segfault Jelly!
 
Jelly isn't hard to segfault
You can do it in one byte
 
How?
 
Sorry, 2 bytes, I forgot Jelly has TCO: Try it online!
 
What does that do?
Oh does it run itself twice?
 
Forkbomb, it looks like
 
1:23 AM
Yeah, ß is just "recurse"
 
To someone who knows Jelly: How could I have a dyad that filters a list by whether the length is equal to the other argument?
(I've been messing around with L=Ƈ and various quicks and chains, but I can't get anything to work)
 
L=¥Ƈ
The ¥ binds the two atoms L= into a single dyadic link
 
Oh, thanks! I've never really understood those binding quicks.
 
Basically, $ (and the 3 and 4 link versions) takes ab$ where a and b are any links, and turns that into a single function f(x), which runs ab on x
¥ takes ab¥ and turns it into f(x, y) which runs ab with x on the left and y on the right
You can imagine that it's the same as putting ab on the line above and using Ç (or ç) instead of the whole "binding" thing
 
Thanks. Are you allowed to take one input as an argument to a monadic chain and the other as a command line argument?
 
1:33 AM
Yes, but that's a full program, and you'd need to use ³ (or so on) to reference the command line argument
It's also not a common way of taking input, so I might immediately offer a tip for removing it once you post :P
 
Is this an internal Jelly bug?
 
No. Remember that quicks use the link directly before them, so that's trying to filter on ³, which is a nilad, and doesn't make sense. It's like filter(lambda: 100, list) in Python
You can group the links together using Ɗ to filter on the entire thing: Try it online!
But, in this case, you don't need to start a new monadic chain with µ, so you can remove that and just take the arguments by the command line and it works as intended: Try it online!
 
Oops, I had a big brain
 
Ok, this is so weird. I'm watching a TV show, characters are visiting someone in a hospital and go to the cafe for a chat. Except, the place that they're filmed in as a "cafe" is the lobby of my uni's maths building. Which I walk through 3 times a week.
 
Great, Jelly doesn't have a flatten by depth 1.
 
1:43 AM
 
Oh.
(I was trying ;/)
 
@cairdcoinheringaahing Like. I've sat at the same table that these two characters are sat at while talking
 
@cairdcoinheringaahing That is weird.
Thanks for all the Jelly tips, now go to sleep.
 
@cairdcoinheringaahing Oh it gets weirder. They're now walking back to the hospital room, and are walking through the maths building, down a corridor that I walk down most days. They have stopped and are talking directly outside the room I was in yesterday for a lecture O.o
In fact, they're now having a chase scene through the building O.o
 
O.o indeed
 
1:49 AM
It does mean that when they cut between chase bits, I know that they've just chosen random bits of the building, cause this mfer ran up two flights of stairs to the first floor, then cut to him jumping into the lift on the ground floor :P
 
lyxal lyxal
 
ಠ_ಠ
 
@emanresuA lyxal lyxal lyxal lyxal?
ok so how to interpret BLC (Binary lambda calculus)
 
@alephalpha just woke up
thanks for posting
 
2:07 AM
I'm sure there's something obvious I missed, but here you go caird
 
I don't see anything obvious, but I'll take a proper look when it isn't 2am :P
 
23 mins ago, by emanresu A
Thanks for all the Jelly tips, now go to sleep.
 
@emanresuA lyxal?
 
who vyxal dad?
 
@cairdcoinheringaahing LOL, that's great ^_^
CMQ (repost to solicit more opinions): Which characters other than printable ASCII + newline are the most useful for a golfing language to support in its strings? I have four slots available.
 
Do you mean as in others are decompressed?
 
2:44 AM
@DLosc asterisk
Backslash
 
@emanresuA Not quite sure what you're asking. Because of reasons (which I can go into if you like), my default string type will be able to contain 100 different characters. Printable ASCII + newline makes 96.
> other than printable ASCII + newline
 
@DLosc high minus
 
@lyxal This one ? Unicode codepoint 8315?
 
@DLosc If it's feasible, an escape character that allows non-allowed characters to go into your strings.
 
@DLosc Same one apl uses
 
2:46 AM
@DLosc No, ¯
 
Ah, okay. That's a lower number.
@emanresuA Hmm, good point, but I think that won't work for what I'm planning. Although I may also add a different syntax for Unicode strings at some point.
 
@DLosc Add in C, G, C and C again :P
 
> other than printable ASCII + newline
 
@cairdcoinheringaahing Hmmm
 
@DLosc Interestingly, it appears that the building is more or less unchanged (one of the rooms had some medical props in it), except for a random 2 seat bench that got added for a single shot in the corridor, then wasn't in the next shot ಠ_ಠ
 
3:17 AM
Is it easier to film in a university than in a real cafe?
I would’ve thought a cafe would be much easier to book
 
I mean, it was supposed to be the cafe of a hospital, and I imagine real hospitals are difficult to book
 
Ah
Wonder how they got a college to look like a hospital
Do you have lots of people with broken arms and cadavers at your university? :p
 
They changed exactly 3 things: in one of the lecture halls, they brought in a bunch of medical equipment, as it was some injured guy's room. They added a random bench for one shot. They got rid of all the students :P
 
But aren’t hospitals white and sterile whereas normal buildings look morr…buildingy?
 
I mean. It kinda of has that "sterile" vibe in a few places, if you got rid of all the mathematicians
 
3:22 AM
@rues Truthfully, I don't see a lot of either of those things when I visit a hospital, either :P
 
It's not unconvincing as a hospital, if you didn't know, but it kinda shocked me going "Wait, I know that area, I recognise the stairs behind them"
What the hell autocorrect, "recognise" to "reckon use"?
 
@DLosc If you’re running around tge hospital chasing people, of course not :p
@cairdcoinheringaahing duck autocorrect
 
I ducking have autocucumber so mulch
4
 
Ducking duck ducker
 
3:26 AM
My previous employer let a film crew shoot a scene using our IT office once. I don't remember what kind of room it was supposed to be in the film, except "not an IT office". Never saw the finished product. It was something low-budget.
 
Odds on that being the actual Eric Wastl, aka guy who runs AoC?
 
Been here for 6 years, isn't that before AoC was a thing?
 
this user looks more likely
 
> I created the Vanilla JS site.
IT'S HIM
 
solved some amazing problems
@RedwolfPrograms wait where
 
3:28 AM
Eric Wastl
 
13
A: History of VanillaJS

Eric WastlI created the Vanilla JS site. I didn't coin the term "Vanilla JS" - it's like asking someone if they invented the term "Blue Chair". Blueness and Chairness have been things for thousands of years, and similarly, "Vanilla" in the software world usually means "plain" - Plain JS. I remember seei...

 
Hasn't been seen here for 4 years tho :(
 
ah there
 
Someone should tell him about AoCG :P
 
3:41 AM
5
Q: Tips for golfing in Chef

FmbalbuenaWhat general tips do you have for golfing in Chef? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Chef (e.g. "remove unnecessary whitespace" is not an answer). Please post one tip per answer.

^^^ Do you like to get 50 rep
@DLosc ⬖⬗⧰⧱
 
Cool-looking, but probably not useful
 
ok do you want other?
@DLosc ⅀⨕☺❆
 
I'm looking for characters that actually get used in code-golf challenges, though.
 
@DLosc ok so i'm finding
 
Definitely ¯ (U+af, macron diacritic)
That's used in a lot of "ASCII art"
° might also be worth having, idk
Literal tabs also
° probably isn't useful on second thought
But tab chars could be
@Fmbalbuena This isn't for a code page
This is for strings
 
3:53 AM
@RedwolfPrograms sry
 
Perhaps the symbols for and and not? (/\ and \/)
Arrows would be nice too
 
I haven't seen either of those used before lol
Box drawing would be useful if more than four spaces were available
 
Oh
 
@RedwolfPrograms I want to agree, but the challenge that I remember using an overline used character 8254. :P
 
That's not printing it though, so you don't need it
But yeah, true, there's a lot of overline characters
That challenge does also allow ~
 
4:02 AM
Most challenges these days allow ASCII substitutions, I think
(though it definitely ruins the aesthetic)
 
4:32 AM
 
 
1 hour later…
5:42 AM
^ @RedwolfPrograms is the atom / modifier list good enough?
cause now i will make the codepage (but first i will select glyphs for commands)
 
I think you need waaay more of both
This seems like a very bland GCD of a bunch of other languages
If you have so much focus on arrays of numbers, I really think you should specialize a bit more
I'd add a whole bunch of modifiers
 
@RedwolfPrograms like?
 
Count (where true), find, find index, find indices, zip, reduce variants (one with a starting value, one without), any, all
And that's just the bare minimum
Although I do love modifier-type commands, so you might not want as many as I'd add (which is like 40 or 60 :p)
 
@RedwolfPrograms wht is count where true?
 
[1, 2, 3, 4, 5, 6].count(x -> x % 2 == 1) would be 3, for example
Basically, filter then length
Actually, if 0 is falsy in your language, it doubles as any
So you can cheat and remove that one
 
5:51 AM
@RedwolfPrograms no i am inspired by JS and 0 is truthy :P
jk
 
But...0 is falsy in JS
 
@RedwolfPrograms but [] isnt
 
but [] isn't 0
except it also is
 
where's that trinity diagram when you need it
 
5:56 AM
@RedwolfPrograms so any is modifier (quick) or atom?
 
Those I listed were all modifiers
 
how is zip a modifier
what does zip do>
 
Take two arrays and a dyadic function
 
and?
map?
 
E.g., [1, 2, 3] zipped with [2, 4, 7] with the function + would be [3, 6, 10]
 
5:58 AM
thats just vectorising
 
So's map by that logic
 
you can make it explicit for various purposes
 
What I'm mostly saying is that you should think about what you want your language to be good at, and come up with some less common atoms/modifiers that would be useful for your language. Right now your atoms and modifiers look like a pretty typical but short list, without anything that'll give it an advantage or any "personality" if that makes sense
 
depends on how your vectorization works by default ig but " is not as rare in jelly as you'd think
that's ''s job
 
The best way to find what atoms and modifiers your language needs is to use it
Try solving a few dozen problems
 
6:01 AM
^
 
See what you find yourself repeating
Or what takes too many bytes, but feels somewhat common
 
and/or wishing you had, not using at all, etc.
pick a few challenges and write work in progress answers for them that you don't actually submit but just keep an eye on as you improve things
 
"Not using at all" is a good one, sacrificing less common operators is hard to do because of the "but what if I need it for this one scenario" feeling, but it's a risk vs. reward thing
Jelly's ° comes to mind
 
you can always just shove it on a digraph and then the one time it does come up it'll be like "holy shit i can't believe that's a builtin at all"
everyone wins
and yeah holy shit it's easy to forget jelly even has °
 
My starboard has no yellow for the first time in like a year lol
2
 
6:04 AM
@lyxal Emailed yoou + pxeger the vyxaldev passwoord
 
honorable mention to having a shit ton of prime builtins but the only one that isn't a digraph is just the primality test
well actually it also is a digraph because backwards compatible aliasing
 
I like what Husk does to save on operator counts, combining boolean-returning functiond with non-boolean-returning ones (e.g., "is prime" with "where is this in the prime numbers sequence")
If it's Husk that does that
I might be thinking of a different one lol
 
yeah husk does that
tries to make everything return a meaningful integer instead of just a plain boolean
 
That's clever
(Time to add that to Vyxal)
 
in jelly's case it's often nice to have plain 0/1 for stuff like x and ¡ but it's still sort of an opportunity cost
 
6:09 AM
@UnrelatedString I did that in Ash without even realizing
includes and some actually returned the count
 
ofc due to its syntax you also even get e not being usually redundant with i just because the arguments are in the opposite order
nice
 
Cursed built-in: x => x <= 2 * PI ? radians_to_degrees(x) : degrees_to_radians(x) // very unlikely x will be less than 2pi and still be in degrees
 
amazing
 
someone take away redwolf's coding privileges
4
 
oh yeah reminds me one of the 89 things making me not bother actually working on perhaps is that i can't rip jelly off too much because a lot of builtins are best used with some idiomatic patterns of arrays of truthy and falsy values and i'm not sure how much i want to just slap an iverson bracket operator on there and call it a day
 
6:18 AM
Interesting idea: Take a square grid of stacks of items. Take all items above a certain height, and rotate 90° then drop them down. Repeat.
Prompted by this
Okay I'm kinda glad Droopy Likes Your Face isn't in in the game lol
It does not fit with the rest of the sound track
 
Well, it's late here, so I'm going to go to sleep and dream up some cursed new built-in ideas o/
 
it's funny how you can both clearly tell that it has a lot of stylistic similarities to the other tracks and immediately judge that it's just not right even before the vocals kick in
 
6:37 AM
I did?
 
6:56 AM
@RedwolfPrograms maybe more useful: x => sum((x / pi).as_integer_ratio()) < 100 ? r2d(x) : d2r(x)
if it's a clean fractional multiple of pi, then it's probably in radians
 
 
1 hour later…
8:18 AM
@hyper-neutrino What language are you using for AoC?
 
They're using Python
 
yep, ^
 
8:56 AM
CMC (This needs linux). Count the number of subdirectories that don't have the execute bit set.
 
9:08 AM
my terrible answer is:
count=0; for d in */; do [[ -d $d && ! -x $d ]] && (( ++count )); done
printf %s\\n "$count"
 
@Anush find . -not -executable -type d|wc -l
@hyper-neutrino TIL you can prefix an image URL with ! to make it onebox
 
@pxeger i totally forget where i learned that from
 
I always just add #.jpg or something to the end
 
@Anush APL: +/('d'=⊣⌿m)∧'x'∨⌿⍤=m←10↑⍉↑⎕SH'ls -l'
 
9:19 AM
@pxeger or, if you want only in subdirectories and not nested, do find . -not -executable -type d -maxdepth 1
 
Anyone know a good way to unit test a CodeMirror parser?
 
@pxeger I really meant the execute bit for all not the current user
@Adám parsing ls is evil I am told :)
 
@Anush I'm pretty sure [[ -x ]] does the same type of check as find -executable
 
@pxeger cool. But that is checking for the current user,right?
 
both check for the current user
from man test (because [[ is a superset of test):
> -x FILE
> FILE exists and execute (or search) permission is granted
 
9:28 AM
@Anush OK, that'll be much simpler.
≢⍸'dx'⍷(↑⎕SH'ls -l')[;0 9] (using 0-based indexing)
@Anush No, quite straight-forward in APL, actually.
 
○/
 
9:45 AM
@Adám cool!
 
What am I missing here?
count=0; for (let i = 0; i < a.length; i++) if (a[i] > 3) count++
Ah, ++count
 
10:11 AM
@RedwolfPrograms just make it dtr for integers and rtd for floats
 
10:36 AM
TIL whats the meaning of TIL?
 
Today I Learnt
@emanresuA for PythonAnywhere, right?
 
TIL the meaning of TIL
 
also your email address name is great lol
 
11:15 AM
CMQ: Unicode character for Get truthy indicies?
 
 
⊤?
downtack?
 
 
1 hour later…
12:38 PM
CMC: Unrepeat a list, fractionally. Given a list, determine the highest value f such that if a sub list were repeated f times, it would result in the original list. [1,2,3,4,1,2]=>1.5, [1,1,1,1,1,1]=>6, [1,1,1,1,4]=>1
 
12:59 PM
CMQ: Unicode characters for max/min?
 
@PyGamer0 Depends what you already have used, and if they they take 2 arguments or a list.
 
they take a list
haven't used any arrows yet
 
And you've already used / and /?
@PyGamer0 /?
 
@Adám no
i think i would use ⌉/⌋
since ⌈/⌊ will be
ceil/floor
 
Alternatives: / or /
 
1:06 PM
hmm ⚻/⚺ looks good
 
up tack / down tack?
 
downtack is used for truthy indices
 
or double up tack / double down tack?
/
 
i think i will use ⚻/⚺
 
@PyGamer0 for falsy indices then?
 
1:13 PM
@Adám ooh nice
 
That was pretty obvious, tbh.
 
i hadnt thought of falsely indices
 
> Get truthy indicie se d
@PyGamer0 What is "Wrap"?
 
@Adám presumably wrap in list
 
^
[x]
 
1:19 PM
@PyGamer0 You have S for Sort, but how about dotting it for reverse sort?
 
of what?
your mom?
 
@Adám Surely Ṡ should be shuffle?
 
@lyxal x
the other argument
 
@pxeger Maybe but then with another diacritic.
 
@pxeger dot above is inverse in this reality
 
1:20 PM
@PyGamer0 I was pointing out that it's a documentation error
 
@PyGamer0 Modulo 2:
 
or more simply:
 
Sure.
Any reason there are no lowercase letters?
 
@Adám one of my favourite facts is that "base 10" provides basically no information
 
@Adám lowercase -> dyads
 
1:21 PM
Ah.
 
0
Q: Is there anyone who can look through my karaoke program code ( it is terminating early than it should be)

Sardor Madaminov#include <stdio.h> #include <sys/types.h> #include <fcntl.h> #include <time.h> #include <stdbool.h> #include <string.h> void menu() { printf("printei"); } int gtime(void) { clock_t ttime; return ttime; } int checkName(char name[], char usern[5][6]) { int i; for (i = 0; i < 6; i++) { if (strcmp(na...

 
@pxeger Not sure what you're trying to say. (That symbol is actually for multiplying by 10 to the power of.)
 
also fun screenshot out of context:
user image
3
 
@lyxal wat does thatmean?
 
1:23 PM
@PyGamer0 that it's based.
 
@lyxal oh base as in base 2?
 
@Adám no matter what base the "10" in "base 10" is interpreted in, it always means that base. So in decimal, 10 means ten, which is the base of decimal. But if 10 is interpreted in binary, it means two, which is also the base of binary, so "base 10" is ambiguous
 
Ah :-D
> Reverse every other element
That's oddly specific.
 
@NewPosts can I get a VTC?
 
1:26 PM
@Adám because its a common operation :)
or atleast thats what _____ says
 
@PyGamer0 ?
 
@pxeger wait letme find the person
 
oh the deleted user who made the golfing language corpora?
 
@PyGamer0 The non-vectorising comparisons can just be and no?
 
2x-1?
 
1:28 PM
> Apparently UÐe (reverse every other element) is a surprisingly common operation in golf.
- lynn
 
@pxeger there's a name I haven't seen for a while ;p
 
@pxeger ??
 
@PyGamer0 2x-1 is the username of the deleted user I was talking about
 
Ugh it's Monday rn
I do not like Mondays
Frick
 
Come to the UK; not Monday here.
 
1:30 PM
@lyxal Garfield? is that you?
 
15 hours ago, by caird coinheringaahing
lyxal is garfield confirmed
@Adám but by the time I get there it'll still be Monday
 
How about Hawaii?
 
Probably the same problem
 
Wait, where are you?
 
East Coast of Australia
 
1:32 PM
you can get to Hawaii in under 20.5 hours, surely?
 
@lyxal are you going to commit sleep?
 
@PyGamer0 probably, seeing as how it's 12:33am
@pxeger also, time to the airport, waiting time for flights, the whole fact our borders are probably still closed
So probably not
 
or even just to American Samoa?
 
Idk
I'm going now for sleep reasons
o/
 
○\
 
1:35 PM
\o
 
i/
 
Who are you, and what did you do to… oh.
 
1:50 PM
\×/
/+/ ,_,
^ ascii table flip
 
2:09 PM
'sussy baka'.replace('u', 'a') #:P
+-+
 
 
2 hours later…
thou art caird
 
@cairdcoinheringaahing :/ that's kinda sad
 
@cairdcoinheringaahing wdym?
 
@Fmbalbuena the tour page used to do something (i forget what) when you pressed up up down down left right left right b a (known as the konami code), but they removed it along with pretty much everything fun
 
There was a pseudo-Venn diagram or sth
 
3:54 PM
@hyper-neutrino what happens if you press up up down down left right left right b a? in old SE?
 
HN forgor 💀
 
ok so we use WBM?
 
00:00 - 16:0016:00 - 00:00

« first day (3963 days earlier)      last day (863 days later) »