« first day (3946 days earlier)      last day (1193 days later) » 
00:00 - 18:0018:00 - 00:00

18:01
@pxeger that doesn't flatten it
ok, a.flatMap(x=>a.map(y=>[x,y]))
TIL js has flatMap
afaik list comprehension is the only 1-line way to flatten a list in python
@Mayube map is shorter than a for loop though
Array compositions are just a longer map
@Mayube sum(list_of_lists,[])
@RedwolfPrograms not in python :P
18:04
Uh oh I just made a networking-related infinite loop lol
I SSHed to my server and opened a screen session which displayed the total number of packets sent over SSH. So it'd count up, then send another packet to show that it'd counted up, and so on, making a loop :p
lol
List comprehension is much shorter in python, partly because of the overhead of typing lambda for every lambda :P
try plugging a switch into itself with an ethernet cable, that's a much more old-fashioned networking infinite loop
AFAIK most decent new switches these days will detect that loop
@RedwolfPrograms It's actually a pretty good way to test latency lol
18:07
> old-fashioned
and by "AFAIK" I mean "according to my networking undergrad housemate" :P
If networking was a small field, in order to get to know people, would you need to network? :p
networking's an IT field, good luck getting them to talk to anyone :P
18:32
@Mayube I feel personally attacked :p
@NewBountiesWithNoDeadlines asm2bf go brr
@cairdcoinheringaahing Yep.
@emanresuA œṣF works
You might need œṣF¥ if you need it as a single link
18:53
@Mayube Cartesian product?
19:06
I guess
19:37
@pxeger yeah but it could do filtering and mapping at the same time, which was neat. I think some of my answers used it
@lyxal can you change the code to fixed code of @AaroneousMiller
still 70 - 1 bytes
20:03
@pxeger in regard to your comments on my Zsh answer, I have a few things to point out. 1st, the ! operator has a higher precedence than %, so you need not enclose !n%i in parens. 2nd, my solution works perfectly for many test cases, while the very last one you gave does not even run
@Seggan are you definitely putting the input in the command line arguments and not stdin? because I changed that
@Seggan also I think I misunderstood the !n%i part, and I was wrong that it didn't work, so sorry
Ok, I've worked out it's the (($#e+$#f<$#1&&e*f==$1)) part that broke it
@pxeger What is your origin of your name?
I'm not really sure why, but everything else still works
@pxeger (this is why I thought yours didn't work, actually - I forgot to change the input method!)
Here's a fully working golfed one: ato.pxeger.com/…
0
A: Sandbox for Proposed Challenges

Alan BagelEscape the maze code-golf Here is a random maze: ##### #M.#E #.##. #.##. #.... ##### Here M is the starting point and E is the endpoint. # is a maze wall and . is a path. Now we can get out of this maze by following the sequence sssdddwww. (s is dow, d is right, w is up, a is left.) Your challen...

20:18
@pxeger thanks for the tips :) ill make sure to use them next time. i was litterally coding in bash with some zsh shortcuts ;)
@DLosc close to what?
Tying the best score
oh, to beating 05ab1e?
@DLosc yes
@Seggan :)
why did those messages get combined? Am I going insane?
no, theyre separate
@Seggan after I edited to fix it, yes...
20:21
hmm, you solution fails the test case of 40, its not digit small, but your version says it is
@Seggan ah, this time I'm definitely right: yours gives the same output for 40
mine gives 2 0s, yous gives nothing
never mind, i was using the wrong version. sorry for the mixup
haha no problem
it's not like I would ever make a mixup using the wrong version... ;-)
20:33
as somebody who uses Zsh as my goto shell when I'm on linux, I should probably learn Zsh scripting
@Mayube I'm happy to help with anything!
I want more regular Zsh users!
wait, you bountied, zsh, right?
yep
20:46
@Mayube i am in India
currently north india
news: the train has been delayed by 5 hours in total
that doesn't sound very fun
SOCK² is only working for a few minutes at a time, which is really odd.
SOCK² is something you made, right? How does it work?
Is it what it sounds like - a SOCKS proxy nested inside a SOCKS proxy?
socks5 over a websocket, with some fancy stuff on top
It's kinda jankily patched together, so I wouldn't be surprised if I should be buffering something somewhere or something
I'd guess the problem is the network dropping the connection after a few minutes?
20:57
No clue
I'm going to do some testing at home, to see if it's sock² itself or the school wifi doing something odd
21:35
How do I downvote a comment
Ooh, my AoC id has four consecutive identical digits
#988880
CMQ: Should all non-zero numbers be truthy in my language, or just positive numbers?
I'm actually considering making 0 truthy in an upcoming language
And only ..-1 is falsy
@Mayube All numbers that do not contain a zero are truthy.
5
function isTruthy(n) { return !(n==0||n.toString().split("").map(c=>isTruthy(parseInt(c))).reduce((a,b)=>a&&b));}
21:45
x=>[...x+""].every(z=>z)
numbers are truthy only if divisible by pi
@Mayube Why .map(...).reduce((a,b)=>a&&b)? That's a really long way to say .every(...) :p
And .toString().split("") is so ungolfy I wouldn't even use it in production code :p
@RedwolfPrograms (Note this should be +z not z)
@RedwolfPrograms wtf that's existed since 2011!?!?
Oh wow, didn't know it was pre-ES6
Or, preS6 lol
> every was added to the ECMA-262 standard in the 5th edition
21:48
@RedwolfPrograms Golfy™
Look man, I'm a C# programmer by day, and used to be a PHP programmer by day. The most exposure I've had to "modern" JS is TS :P
I guess that explains the worrying lack of type system abuse in that code lol
Although I'm kinda confused as to why you used recursion there
cos recursion is fun
f=x=>x%10&&(x>9?f(x/10|0):1)
git gud :p
f=x=>+x&&[...x+""].every(f) is shorter actually, and uses your method
(why am i doing this)
CMQ: What's the name of an operation that would take any number of arrays, and return every way to choose one item from each? E.g., [1, 2], [0, 4], [1, 2, 8] to [1, 0, 1], [1, 0, 2], [1, 0, 8], [1, 4, 1], [1, 4, 2] and so on
@RedwolfPrograms doesn't work very well though, base case is a bit wonky
21:58
@RedwolfPrograms All the way up to [2, 4, 8]
Also f=x=>!/0/.test(x+"") is shorter
@Mayube Wdym? It's just if x is 0, return 0
@RedwolfPrograms and what happens if x is 2?
It's truthy, so it returns [...x+""].every(f)
it calls ["2"].every(f), which calls ["2"].every(f)...
21:59
@RedwolfPrograms ...oh
Wait, doesn't your original do that too?
probably lol
I was just golfing your approach :p
well regex is shorter anyway
22:18
@lyxal edit the explanations of how bucal code work?
Hey @RedwolfPrograms there seems to be a problem with your SOCK²
It's just sitting there doing nothing
@Fmbalbuena maybe later. I'd need time to see exactly what's changed
22:55
@Mayube You know .test casts to string right, you don't need the +""
But yeah, regex wins, and even more so with that :/
23:22
Can we get a couple more VTDs on this?
23:47
woah I just managed to keyboard interrupt python on a comment
>>> Traceback (most recent call last):
  File "...Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "...Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "...vyxal\vyxal\vyxal.py", line 48, in <module>
    # Vyxal REPL ftw
KeyboardInterrupt
last time I checked, you're not really supposed to be able to KeyboardInterrupt on something that's supposed to be ignored
0
A: Sandbox for Proposed Challenges

BubblerSolve the halting problem for Minyrinth code-golf decision-problem interpreter halting-problem Introduction Minyrinth is the stripped-down version of Labyrinth. It has the same routing semantics as Labyrinth but only four non-wall commands, and only one register (that can hold unbounded signed in...

00:00 - 18:0018:00 - 00:00

« first day (3946 days earlier)      last day (1193 days later) »