« first day (3939 days earlier)      last day (905 days later) » 

9:15 AM
@pxeger I've found a bug with ATO on mobile
I enter characters, and it updates the character count but not the byte count
 
what language are you using?
can you send a screen recording?
 
(How would I go about getting Funky2 put on Attempt This Online?)
 
@pxeger python
 
(The format for your Language files scares me)
 
@pxeger give me an hour to do so
 
9:16 AM
ok
@ATaco all I really need is a link to the language and instructions on how to install and run it, and I can do the rest for you
 
The latter two links are from my wiki which I need to update the cert on.
 
@ATaco fear not, there are now two places where you have to put the same information!
 
Couldn't that be information be scrapped from the files..?
 
soon™ it will be removed from the runner files, and kept only in languages.go
 
It should work, I've tested building for Fedora before, but not other Distros.
 
9:21 AM
wikipedia is down?
dark age is upon us
 
@FrownyFrog fine for me
 
Works for me too
 
federation business then
 
9:33 AM
CMC: Most awkward file name to deal with in a UNIX-like environment.
Maybe something like \:>&;|/dev/nul
 
Anything with zalgo
 
@emanresuA Wouldn't that just be handled "as is"?
 
True
@Adám What about "\\`\:>&;|/dev/nul
(The double backslkash is meant to be single, but markdown)]
Anyway 'night
 
Isn't double backslash "better"?
 
True :P
 
9:36 AM
"\\`\:${HOME}>&;|/dev/nul''\
 
Huh, 100th bronze badge
 
@Adám you mean /dev/null? (two Ls)?
 
Actually o/ now
 
Yeah, always mix up with Windows.
 
@Adám add a newline and an unpaired UTF-8 surrogate
 
9:38 AM
Yum.
CMC: (serious this time) given a string escape it as it would need to be escaped in a UNIX-like shell environment.
 
@Adám does it have to work with the empty string?
 
Hm, is the empty string a valid file name according to POSIX?
 
no
 
Then no.
 
filenames can be any string, but can't contain null bytes, slashes, and can't be empty, ., nor ..
 
9:45 AM
I even forgot to mention that it is supposed to work as a file name. Maybe that was understood…
@pxeger Surely, file names can contain slashes if escaped?
 
@Adám I mean forward slashes - and no, you can't escape them, because they always have to act as a path separator
slashes are valid in file paths, but not file names
backslashes are fine, though
 
Huh. Didn't know.
 
@Adám Zsh, 26 bytes: >$1;QUOTING_STYLE=shell ls
 
@pxeger Whilst enforced by most reasonable Unix Systems, it's not enforced by the standard, and most Unix Systems can "read" these invalid names.
 
@pxeger Wonderful.
 
9:48 AM
It's possible to generate files with these horrible names.
 
@Adám alternatively, if you'll accept Zsh quoting (which is not always compatible with other shells) for some strings, <<<${(q)1}
 
m90
@Adám JavaScript, 35 bytes: s=>!'${s.replaceAll("'","'\\''")}'!, but with a backtick in place of each ! (I'm not sure how to write it properly)
 
s=>`'${s.replaceAll("'","'\\''")}'`?
 
@ATaco how? Filenames containing null bytes get truncated at the syscall layer because they're interpreted as a string terminator; slashes will always be taken as path separators as far as I can tell (giving either ENOENT or ENOTDIR); the empty string gives ENOENT; and . or .. give EISDIR
 
@m90 Doesn't that fail to escape backslashes?
 
9:52 AM
you don't need to escape backslashes inside single quotes
 
Oh.
 
single quotes accept any character except more single quotes (and probably not null bytes nor invalid unicode)
 
10:13 AM
@pxeger did you change anything on the site? Because I can't repro it
 
@lyxal nope - weird
if it happens again, let me know
 
I did get a screenshot though
I'll post it in the ATO room
 
10:37 AM
@Adám does that include bash and other shells where ! is the history character, or just regular sh?
 
@Neil I didn't know about that either. Whatever you want. Plain POSIX sh is fine.
 
ok, just checking that @pxeger's solution is valid (it doesn't work with ! in bash)
 
10:53 AM
hi all
today I am cross that there seems to be no open source linux mail clients that support exchange/oauth2
 
11:05 AM
@Anush what do you mean by exchange/oauth2?
 
@Neil my work email now uses microsoft exchange
thunderbird supports that//
but it is also insists on MFA which uses oauth2
you have to pay for an odd on to thunderbird to get that
 
Thank you yt ads
Very cool
 
@Anush did your work email disable imap, meaning that your only access is via the paid add on which uses other ways to access your account, or is there some other problem?
 
@Neil yes. I would swear at this point
of course they don't care because they all use outlook
 
@Anush yeah, they disabled imap, then you have a problem
 
11:14 AM
@Neil someone just told me mutt will work!
hello 1970s
 
maybe mutt uses ews and that's still enabled
 
what is ews?
 
but I'm just guessing here
 
google says mutt supports oauth2
 
ews is an XML-based protocol microsoft invented in the 2000s for third party clients to access exchange
 
11:16 AM
which seems to be the important part
got you
hmm.. now I am told evolution will work too. I don't want to use mutt or evolution but I guess I will have to
:(
 
what you might find is that you have to manually choose oauth2 in thunderbird account settings after creating the account
 
in thunderbird I had to choose to use Owl at one point
 
but that's really if it's an oauth2 problem and not an imap problem
 
which is the thing I linked above
 
please don't spread misinformation about thunderbird not supporting oauth2 if that's not the problem here
 
11:19 AM
@Neil do you mean it's the lack of support for ews?
not oauth2?
 
thunderbird doesn't support ews, no. I believe evolution does, which is why it would work for you
 
ah ok.. But now I see there is Outlook Web Access too
"About this Add-on
Allows you to use your Exchange and Office365 email account using Outlook Web Access (OWA) with Thunderbird."
which is the paid Owl add-on
it's too confusing!
 
right I think owl supports owa, ews and activesync, although it defaults to owa
 
I thought owa was a browser based web app
 
yeah but it's just json requests behind the scenes
 
11:23 AM
interesting, thanks
 
mind you back in exchange 2010 it was XHRs behind the scenes, they upgraded to JSON in exchange 2013
 
good to talk to an expert!
I wonder why thunderbird hasn't implemented ews
 
proprietary
 
but I mean if evolution has
and apparently mutt?
 
is the reason I heard
 
12:13 PM
@Anush why don't you just use Outlook Web?
 
0
A: Sandbox for Proposed Challenges

AndrewTheCodegolferLeave ABACABA on the tape Note that will be removed post sandboxing: This challenge is Brainfuck-specific, but I hope that its contents make the reason why sufficiently clear. Write a brainfuck program which leaves the following sequence on the tape: 0 1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 ...

 
1:04 PM
@pxeger you mean through the web page?
@pxeger it's a really painful way to do your email
 
 
1 hour later…
2:18 PM
CMC If we consider all arrays of non-negative integers of length 4 whose sum is s in lexicographic order, how can you jump directly to the ith array without iterating over all the arrays before that?
 
You do that by calculating how many arrays start with 0, 1, ... and skipping in big steps
You don't directly jump to ith at once
 
@Bubbler how long would that take?
 
Linear in s I think
 
ah interesting.. do you think it's impossible to do in polylog in s?
i.e. poly in the number of bits in s
 
@Bubbler why would it be?
 
2:27 PM
More precisely it is O(st) if arrays are of length t
 
I think you can do O(s+t)
but I would like to improve the s part
s could be 10^9
 
@Bubbler you should be able to do that in O(array length) with dynamic programming, no?
 
@dzaima I hope so!
I could ask a fastest-algorithm question if you don't want to give the secret away :)
the same question in reverse is interesting too. Given the array, output its rank
 
oh wait yeah it would be ≥O(s) because you have to store all s cases
 
:(
 
2:31 PM
To achieve log(s) time, you'd need a mathematical formula to compute "the number of arrays whose first element is at most x" in constant time
 
@Anush you can convert the original question to that and vice versa with a binary search
 
Then you can bisect through it
 
Always a good sign when my smooth brain can't even figure out the logic to generate testcases for a challenge idea :|
 
Oh wait, it is possible
Because if I change "most" to "least" then it is plain nCr thing
And it's time to sleep, so o/
 
\o
 
2:39 PM
o/
 
@RedwolfPrograms How goes the metallurgy research?
 
I still have no idea what type of iron smelting is most optimal for a bronze age society with modern knowledge :(
 
I think maybe you need to narrow the scope. It might help to know what your intention is with this information
 
for whatever reason, the number of lexicographic arrays with s=16 length=20, with the first element greater than n creates the progression 969 455 165 35 1 0 0 0…, the reverse of which appears here
oh, it's an actual sequence too
so, you figure out why that got in here, generalize it for all s values, and done
@dzaima (ofc the length doesn't matter, it just has to be greater (and/or equal idk) than s)
oh wait no the full question does need length
probably not too hard to go from s=length to them being different though
for s=17, it's 1140 560 220 56 4, which appears here without the 1140 wat
all of them; seems like it alternates between 4 sequences
actually no i've gotten myself very confused. all i've said so far is for length=4
length 3; more completely random oeis sequences for each of those
length 5 as well; but i gtg
 
3:22 PM
github.com/hyper-neutrino/deuterium @hyper-neutrino third golflang concept of the year?
 
not really a golfing language
more like a remake of proton that i've wanted to do for like a year now
 
useful for [...] code golf [...] 👀
 
i said that for proton too and also that quote's way too cherrypicked xD
some features will end up being good for code golf just cuz i like terseness and unnecessary amounts of shorthand / syntactic sugar lol
 
@hyper-neutrino cherrypicking good
 
"useful for code golf" != "golflang"
source: APL
 
3:31 PM
i am trolling hyper neutrino please let me do it in peace
 
I have to stick up for my fellow south-ontarians
3
 
Finally got around to writing a script to generate some test cases for this sandbox. Last call for feedback 'fore I post it
I find the pattern of how many min-length lists of squares there are that sum to n interesting
That might be an interesting challenge of its own.
I don't understand why my Rust answer is getting so many votes when it's just a trivial port of other answers :|
 
3:59 PM
because Rust is an unusual language on this site so people are happy to see it being used?
 
But my Rust factorial didn't get the same response :(
 
Because Factorial is an old challenge as therefore less likely to be being casually perused?
 
4:15 PM
Managed to beat SMB3 with just one power-up use
@Mayube No HNQ effect
 
@RedwolfPrograms I guess. I hadn't considered out-of-network votes
sometimes I forget that there's a whole world that exists outside of CGSE
 
Is there? Maybe we're just simulating it (tersely, of course)
 
CMegaC: Simulate the entire world outside of CGSE
 
@Mayube Zsh: 0 bytes. There is no world outside code golf
 
Why Zsh specifically then?
 
4:23 PM
@Mayube Pretty sure Mathematica has a builtin for that
 
@Mayube just the first language I thought of
 
@pxeger Proof that we're not in a simulation, cos otherwise your mental list of languages would be alphebatized and you'd've gone with APL
 
How do you know my list of languages isn't alphabetised, just in reverse?
I can't think of any languages that are lexicographically later than Zsh, but I can think of a few earlier than APL
 
Wow yeah, μ6 is the only language listed after Zsh in TIO
 
@Mayube f=n=>{try{eval(n.toString(2).match(/.{8}/g).map(x=>String.fromCharCode("0b"+x)))}catch(i){}};i=256n;while(1)f(i++)
Eventually it'll figure out code to run the (a?) universe, and some intelligent being within it will figure out a buffer overflow and stop the loop
 
4:29 PM
no, as soon as it finds a program that doesn't halt that'll stop working properly
 
Does that just map an integer to JS code and if it fails increments the integer and recurses?
 
@pxeger Everything halts eventually :p
 
you could try f=n=>{try{eval(n.toString(2).match(/.{8}/g).map(x=>String.fromCharCode("0b"+x)))}catch(i){}};i=256n;while(1)spawnNewThread(()=>f(i++))
@RedwolfPrograms ...?
 
@pxeger as dictated by entropy and the inevitable heat-death of the universe
 
@RedwolfPrograms including the simulation-finding program
 
4:31 PM
This is code golf, ignore the practical limitations /s
 
JS only supports 64bit floats
 
That's why I used a bigint
Oops I need a .join("")
Might as well use a replace I guess
 
wait when was bigint added to JS? Last I checked it was a 3rd party library.
 
f=n=>{try{eval(n.toString(2).replace(/.{8}/g,x=>String.fromCharCode("0b"+x)))}catch(i){}};i=256n;while(1)f(i++)
@Mayube It's been there since ES2020
256n is a bigint, that's what the n does
 
that explains it
"last I checked" was around 2019 IRIC
 
4:34 PM
Oh wait I need to use eval.bind(window) I think
Otherwise it'll overwrite i
 
could one of the generated programs not also find a buffer overflow before it manages to simulate the universe?
 
0
Q: Designing Solar Panels

MayubeI'm designing a new space station for generic super-villain purposes (something something megalaser), but I'm having trouble designing the solar panels. My genius team of scientists can calculate exactly how many square meters of paneling we need to power the station, but the problem is our solar...

 
@pxeger No, it'd find a program exactly the same as this one first, but with a slight modification that allows it to simulate something slightly closer to the universe before a buffer overflow would be found
The eventual simulated universe would be on a massive stack of random program generators and various other things (ignoring limitations of JS's stack size, since obviously this'd never run on any real hardware in the first place)
 
@RedwolfPrograms so you conjecture that no buffer overflow exists in any JS program which is lexicographically smaller than your simulator program?
 
Probably none that would be capable of overriding important behavior in the parent simulator, no
 
4:40 PM
not even just crash the interpreter?
 
> generic super-villain purposes
@Mayube Slow Thursday?
 
@pxeger Yeah yeah
This isn't ever going to actually work :p
Since it's not really possible to simulate a universe inside of itself
 
@pxeger actually, I think this wouldn't work with fair thread scheduling, because each program would slowly end up with asymptotically[?] less execution time as the number of threads increases
 
@RedwolfPrograms because to truly simulate the universe would use all of the energy in the universe, right?
 
How do you store the state of a universe within itself?
 
4:43 PM
I guess that means that if our universe really is a simulation, the universe our simulation is running in is more complex than ours
 
(I think it might only be logarithmic or a power law or something, not asymptotic, in which case it would work)
 
@RedwolfPrograms base64 compression
 
@Mayube or, both universes are infinitely complex
 
@Mayube >:|
 
@pxeger can an infinitely complex universe both store and simulate another infinitely complex universe within it?
 
4:44 PM
If we were able to fully simulate our own universe, that universe would be able to simulate our universe, and so on
 
is infinity a subset of infinity?
 
Vsauce music starts playing
 
@AaroneousMiller The bounty expire in 22 hours
 
@pxeger dispatch each thread to its own CPU
 
@Mayube then you'd need infinite CPUs
 
4:48 PM
Eventually you'd be able to simulate more though
 
@pxeger Well yes, but you're going to need infinite memory anyway
 
You'd only need a finite number of iterations to hit a point where it nests a level deeper
And makes another program that iterates through every other program (or some more efficient subset)
 
@RedwolfPrograms 'nests a level deeper' as in generates a program that is a slight modification of itself, that in turn begins generating and executing programs?
ninja'd
 
Eventually they might "evolve" to make ones that can generate valid programs faster
 
Eventually it generates a sentient program, realises how pointless it's own existence is, and halts.
 
4:50 PM
And we continue from some other thread doing something else
At a lower level we could probably detect most infinite loops, because of the halting problem some would slip past, but quite a few could probably be caught and terminated
 
eventually it'll generate a program that solves the halting problem, and monitors all other threads to prevent infinite loops
 
Ferb, I know what we're doing today
 
Ferb noises
 
@Mayube I mean, yes, countable and uncountable infinities
N is a subset of R
 
@cairdcoinheringaahing I assume what you were trying to say is aleph null is a subset of aleph one?
 
4:58 PM
@Fmbalbuena I'm currently refactoring the code to remove the depth-9 recursion limit on subroutines, as well as removing the faux-registers I was using. Once that's done, I just need to implement calling and returning from subroutines, and then do the compilation/execution. I think I can get it done in time.
 
@Mayube Yeah, but N and R are easier to type :P
 
@cairdcoinheringaahing well your message just says N is a subset of on my screen :P
 
5:15 PM
@RedwolfPrograms ?? the OP made that edit
 
oh
uh
frick
 
lmao
 
if 1 is not prime, does 1 have no prime factors?
 
@Mayube sadly no
 
@Anush does that make it the only positive integer with no prime factors?
 
5:21 PM
@Mayube yes
 
neat
 
you are at one with this fact :)
 
@xnor Thought you'd like to know that the history of Puzzling is now divided into eras one of which is the Age of Xnor.
 
@Mayube ಠ_ಠ Crappy internet didn't submit the edit to add the R
 
@cairdcoinheringaahing the R showed up for me
 
5:27 PM
maybe it's my crappy internet then
or at least my office's crappy internet
 
Wait, I just reloaded and it shows now
ಠ_ಠ
 
yeah I guess SE chat is just bad... whoever would have known!?
 
@Randal'Thor BXE and XE :P
3
 
5:39 PM
Why oh why isn't there a way to do nonlocal in a lambda!!!!!!
 
5:51 PM
I actually got to use ?? in a regex
 
@pxeger You need to do import tachyons :p
 
?
 
I just spent 20m on a golf that added four bytes :(
@pxeger Tachyons are particles that violate locality :p
 
oh lol
@RedwolfPrograms I've spent about 3 hours (introspects self: really?!) on a golf that is so bad I can't even post it
and if Python just had a fucking normal closure system it would be -7 bytes
 
Well, I've managed to get it down to the same length
 
5:56 PM
can somebody verify my last testcase on this question? My C# tester evidently was wrong, and my python one is too slow to solve 172593 in under 60 secs
 
I'll try it with my JS one
It's probably too slow to work though
Maximum call stack size exceeded
 
I'd like to also know how many solutions there are for it, so I can add the OR one of x other possible l-length solutions bit
My C# solver completely missed 3-length solutions for 1246, and only found half of the 3-length solutions for 12460
I don't think there's a 2-length solution for 172593, I just want to confirm that there are in fact 19 3-length solutions
 
Maybe you could count up from 1, and find all integer partitions of the number with length n, and find the first that is all perfect squares
That's probably way too slow, idk
 
right now both my C# and Python solvers are adapted from this combinational sum problem, which, given an array of allowed integers a, and a target sum n, finds all combinations of integers from a that sum to n, allowing for a given integer in a to be used multiple times.
I added some optimizations such as early-exit if the temp array is as long as the shortest found array, and iterating through a backwards
but it's a bruteforce recursive solution, so it gets slow pretty quick
 
6:12 PM
Yes!!!
Finally managed to golf a byte from my other (20m) solution
 
6:25 PM
Now I managed to use it to golf another 13 bytes!!!
Make that 14
 
@RedwolfPrograms and the Arnauld happened :P
 
I'm surprised I'm only 9 bytes behind
 
@RedwolfPrograms Math.sqrt(x)|0 -> x**.5|0 for -7 bytes
 
Ooh nice
And I've got another golf coming
I might actually tie Arnauld!
 
oooo
 
6:35 PM
*we
 
@Mayube I suggested the sane thing in comments :P
@RedwolfPrograms I know
 
@RedwolfPrograms He just golfed 2 bytes
 
:(
I might still have a chance though
More golfs
 
0
A: "Hello, World!"

GingerIndustriesKonamiCode, 12 bytes ^^vv<><>BALS If this seems cheaty to you, here's another one that actually does the work (168 bytes): v(^^^^^^^>^^)<<v(^>>^)<<v(^>>^^^^^^^^)<<v(^>>^^^^^^^^)<<v(^>^>^)<<v(^^^^>^^^^)<<v(^^^>^^)<<v(^>^>^^^^^^^^^)<<v(^>^>^)<<v(^>^>^^^^)<<v(^>>^^^^^^^^)<<v(^>>)<<v(^^^>^^^)<< And h...

 
6:39 PM
@RedwolfPrograms Idea: try checking if s[r.length] exists or vice versa
Or have I been ninjad yet again
 
Ooh smart!
 
Nope, looks like you're beating Arnauld today :)
 
I'm just waiting for wasif to fix their python2 answer :P
 
... and golfed the ?? away again...
 
6:40 PM
woah!
 
NICE!!!
 
That's a spicy golf italian hand gestures
 
Am I missing something or do you need s.length
 
Wait...I think I would?
Is r just always longer or sth
 
(Don't worry, you're still ahead of Arnauld)
 
6:42 PM
Dang
I need the .length
 
this is what CGSE is all about; Aggressive golfwars
 
Well, 73
 
still 6 ahead!
 
i>1&&r[... -> ~-i*r[... I think
o/ for now
 
Nope, I need the && for laziness
It'll infinite recurse otherwise :/
o/
Golfed!
Wait, by -1 bytes
 
6:57 PM
I'm switching back and forth between golfing code in CGSE and ungolfing code at work
 
ooh I don't need ,s in the arguments
 
7:09 PM
Arnauld suggested another golf which -2s, o/ for now
 
Huh, google changed it so googling "snek game" doesn't make snake pop up
 
When shortening Identification, should it be Id or ID?
actually in this case I guess it's a shortened for of Identifier
specifically numerical record identifiers in a database
 
7:27 PM
there was an SC identifier in this code so I replaced it with statusCode and now the code's broken cos there's a bunch of DEstatusCodes
 
One time I lowercased a 1k line parser
With no backups
Or version control
 
Ctrl+Z is your friend
or u in Vim normal mode
 
It wasn't ctrl+z-able
I don't remember what weird editor I was having to use
 
sounds like you need a better editor
 
It was a truly awful editor, I was only using it for some short task
I don't remember what it was though
Oh, it wasn't that I couldn't ctrl+z, it was that I had closed the editor before I noticed
 
7:32 PM
ah
yeah that's on you
lesson well learned though :P
I don't mind that we use hungarian notation in our database. I mind that we only use it 90% of the time
I don't mind that SQL identifiers are case-insensitive. I mind that we use that as an excuse for inconsistency
 

« first day (3939 days earlier)      last day (905 days later) »