« first day (2361 days earlier)      last day (2481 days later) » 

7:00 PM
for those who would be interested in answering a KOTH, would you all be okay with Python only?
 
Pyth, 7 bytes: q1l.{.+ (I think It's golfable)
 
@Mr.Xcoder hint: .+
 
@LeakyNun Consistent truthy/falsy?
With inconsistent values, Pyth, 5 bytes: l.{.+
 
@Mr.Xcoder preferred
 
What is the target length
?
 
7:03 PM
.+.+ gives me the deltas of the deltas
If those are all zero, then it's an arithmetic sequence
 
@LeakyNun What is the byte count I should aim?
 
@Mr.Xcoder Wait what counts as truthy and what counts as falsy here
 
@Mr.Xcoder I don't know, I didn't do it
 
@HyperNeutrino Why are you asking me?
 
how luck-based is jelly's chaining
 
7:05 PM
@musicman523 I would. (I'm assuming each bot would be a Python class?)
 
@totallyhuman 0
 
Because it seems to be giving 1 for truthy and not-1 for false, but IDK.
 
Generally the benefits of using a single language (execution speed) outweigh the disadvantages.
 
Also it's just a lot more effort for me to deal with language-agnostic I/O
 
7:06 PM
@PhiNotPi You could have each bot be a module with certain functions/globals too, but idk
 
@LeakyNun l.{.+, should I golf more?
 
@Mr.Xcoder never mind
 
l{.+ seems to work too maybe?
 
@LeakyNun Never mind?! Something ain't good
 
truthy,false is 1,not-1
 
7:07 PM
Am I in my comfort zone?
 
@LeakyNun Hint?
 
Consistent, 6 bytes: q1l{.+
 
@Mr.Xcoder no, I just think that you got the core of the challenge, and that we can move on
 
@LeakyNun Good, next
 
@musicman523 what construct cannot contain duplicates?
 
7:08 PM
@musicman523 HINT: {...}
 
@Mr.Xcoder product of a list
 
@LeakyNun [1,2,3] -> 6, right?
 
@Mr.Xcoder yes
For a second I thought you confused product with sum
 
Aha
 
Python, 35 bytes: spoiler
 
7:10 PM
lambda l:l==sorted({*l})
 
oh what
right I can combine the two statements
whoops
 
@musicman523 you can't sort a set
 
and {*l} is the same as set(l)
ah
 
@musicman523 No point insorting a set
 
true
 
7:11 PM
you also can't compare a set with a list
 
Then lambda l:l==sorted([*{*l}])
 
@musicman523 a set is already sorted by default
 
Just a hint
 
@Mr.Xcoder That just checks for duplicates, not to see if it's ascending
oh okay
 
Oh, I forgot about my challenge
 
7:13 PM
@musicman523 interesting.
your solution is optimal then.
 
@LeakyNun Hint
What was reduce
 
@Mr.Xcoder it's two bytes
 
@LeakyNun just a curiosity: What was reduce?
 
Is pyth.herokuapp.com working for you guys?
 
@Mr.Xcoder F
@HyperNeutrino gg someone borked it
 
7:15 PM
@HyperNeutrino it is
 
people, please don't exhaust the online compiler
 
it doesn't work for me
 
it isn't working for me
 
Now it doesn't: Application error
 
it isn't TIO
it doesn't have a 60 second timer
 
7:15 PM
I was using it!
 
I did u* and it seems to have stopped it from working... whoops... I thought that would work :I sorry
 
it will break
 
I cannot look through that nice search bar *facepalm*
 
Pyth, 2 bytes: spoiler
 
You can use repl.it if you want
 
7:16 PM
Or tio
 
@LeakyNun 3 bytes: *FQ. Of course, Q is implicit, so: *F
 
@HyperNeutrino this exhausts the memory
it expands to u*GGQ)
 
*facepalm* sorry guys
 
start with Q, multiply by itself repeatedly
 
7:18 PM
@LeakyNun Next?
 
@Mr.Xcoder good
 
@totallyhuman what does that do in Jelly?
 
@isaacg Unfortunately, I appear to have broken pyth.herokuapp.com by doing u* because I don't do Pyth very well. Sorry for the inconvenience. Could you reboot it?
 
@isaacg or rather, can you monitor the memory usage so that it doesn't break?
@musicman523 or 0
 
7:19 PM
@musicman523 practically nothing
well yes what leaky nun said :I
 
1 min ago, by Mr. Xcoder
@LeakyNun Next?
 
(not literally nothing, because it will make any falsy value become 0)
lol I deleted my answer about braids because it doesn't actually work, but it still gave me my silver code-golf tag badge lol
 
@Mr.Xcoder 5 -> [[[[[0]]]]]
 
Nested list with 0 in the middle?
 
7:21 PM
yes
 
Very creative
I now need that search bar :(
 
Jelly, 3 bytes: 0W¡
 
@LeakyNun Can the output be a string?
 
Or if it matters, 0W¡ŒṘ
 
wouldn't that work?
 
7:22 PM
no but then that's 5 -> [[[[[5]]]]]
 
If outputting like a String is allowed (I think it isn't, for obvious reasons): tio.run/##K6gsyfj/X1tbK1ApWslASyn2/39TAA. Please ignore this meassage if this is not the point.
@LeakyNun Hint?
 
@Mr.Xcoder please use the intended method
@Mr.Xcoder u
 
I hate the fact that I do not have that search bar :((
 
@HyperNeutrino oh i misunderstood
 
Python, 24 bytes: lambda i:'['*i+'0'+']'*i
If output really needs to be an array, throw an eval() around it for plus 6 bytes.
 
7:26 PM
9 mins ago, by Leaky Nun
https://raw.githubusercontent.com/isaacg1/pyth/master/rev-doc.txt
 
> u <l:GH> <seq/num> <any> Reduce B from left to right, with function A(_, _) and C as starting value. G, H -> N, T ->. A takes current value, next element of B as inputs. Note that A can ignore either input.
 
Longer solution: f=lambda t,l=0:f(t-1,[l])if t else l
 
@Phoenix Or just do it properly in the first place, still 24 bytes: f=lambda n:n and[f(n-1)]
 
oh nice
 
Nah, too intelligent
 
7:27 PM
@musicman523 Yeah it will
 
Also ^^
 
:38835357 it does though
 
my b
 
Oh huh
 
0
A: Sandbox for Proposed Challenges

Wheat WizardPristine Pristige A pristine program, as defined by Calvin'sHobbies, is a program that does not have any errors itself but will error if you modify it by removing any contiguous substring of N characters, where 0 < N < program length. Pristige is a language I designed in which all syntacti...

 
7:28 PM
This upholds my belief that dynamic typing is good for golf and nothing else.
Rapid prototyping, maybe.
 
It's an okay system
It lets you do a lot of neat things
 
Pyth, 3 bytes: spoiler
 
@LeakyNun IDK how to do it with u.
 
Personally I prefer Haskell's type classes system over anything else
 
But am working on it.
 
7:30 PM
> F <pf1> <any> <int> Apply repeatedly. A(A(A(A(... B ... )))), C times.
 
@HyperNeutrino you win
 
@HyperNeutrino I hate to use u
 
then use F
 
@LeakyNun Should I still struggle with u?
 
7:30 PM
@Mr.Xcoder yes :P
 
Target length @LeakyNun ?
4, 5 bytes?
 
5 bytes
 
tfw you're used to reading text shorthand so you keep reading the "u" as "you" :P
 
0
Q: Can you loop without crashing?

LordFarquaadMany of us are familiar with the game Tron. You control a "lightcycle" placed on a grid. The lightcycle always moves forward (though you control the direction) and leaves a permanent trail behind it. If you run into a trail, you crash! The goal here is to determine if a given path is a valid loo...

 
herokuapp is back!
 
7:32 PM
What's better for a parity built-in: 1 for even or for odd?
 
@BusinessCat 1 for odd, 0 for even
Like n%2
 
So it's just shorthand %2?
 
@BusinessCat yes
@LeakyNun u feels so pointless here that I cannot figure out how to do it.
 
I'll stick to using TIO so I don't break HerokuApp again :P
 
@Mr.Xcoder what does u do?
 
7:35 PM
@LeakyNun Please
 
@Mr.Xcoder should I just give you the answer?
 
> Reduce B from left to right, with function A(_, _) and C as starting value. G, H -> N, T ->. A takes current value, next element of B as inputs. Note that A can ignore either input.
@LeakyNun Ok, not yet
@LeakyNun I give up with u.
 
I am struggling to not look at it yet.
I can do it
I want to solve it with u.
But how?
@LeakyNun Mini-hint: Does your spoiler source contain the character ]? From the F solution earlier, I see it is [A]
It also must contain Z or 0, for the middle of the list. Am I right?
 
@Mr.Xcoder yes
@Mr.Xcoder yes
 
7:42 PM
Possible thing I should mess around with: G is the current value.
 
And it must create a list from the current value. The initial value is Z, so it ends in Z. I also must add a list in every iteration, it starts with u.
 
The Wi-Fi password at my in-laws' is 256256ffff. They claim it was chosen randomly so that it should be easy to remember. They have never heard of binary or hexadecimal and don't know what a bit it a byte is. Am I the only one who think this it's a very strange coincidence?
 
Of course it must contain Q too. I think I have it.
 
@StewieGriffin hunter2?
 
7:44 PM
Huh?
 
@LeakyNun Confirm it is valid before I look at the spoiler: u]GQZ.
 
@StewieGriffin it means, why are you revealing a password in public?
@Mr.Xcoder it is
 
@StewieGriffin Who actually set up the system?
@LeakyNun password is being used as someone's Wi-Fi password right now :P
 
@LeakyNun I now am proud of myself
@LeakyNun Next?
 
@Mr.Xcoder good
@Mr.Xcoder I don't have anything for the moment
 
7:46 PM
@LeakyNun Perfect, thanks!
I had a great time solving your challenges @LeakyNun. Thank you
We shall repeat that sometimes
 
Thanks
 
CMC: Import all modules in a directory in python
 
@LeakyNun I'm not afraid someone here will come and use their Wi-Fi :-)
 
@StewieGriffin at least it doesn't spell a real word
 

 Development of Cthulhu

Room for the development of Cthulhu (github.com/Mr-Xcoder/Cthulhu
Wanna join ^?
 
7:48 PM
@LegionMammal978 they say they did it together...
 
@StewieGriffin And they aren't very technical, I suppose?
 
maybe one person entered ther 256256 and the other person entered ffff
#truerandom
 
@totallyhuman Did it work? (first time doing this)
 
@LegionMammal978 not at all... as I said, they did it together, since it's too hard to do alone. :-)
 
7:52 PM
I granted you write and read access...
Can't you write a message right now?
@totallyhuman Ignore my last invite
 
I can't invite you
@totallyhuman Try now
@musicman523 I granted you write access
Made it free

 Development of Cthulhu

Room for the development of Cthulhu (github.com/Mr-Xcoder/Cthulhu
I have to go now.
 
Can I golf this 4 byte Pyth code: .MP_? It is meant to extract the primes from an array taken as input
Anyone?
Ping me if you find a shorter solution ^. Bye!
 
8:19 PM
This new user was mistakenly told his answer was invalid here by a more experienced user. Here is the relevant meta.
I have voted to undelete, as there is nothing wrong with the answer.
 
@WheatWizard I don't have a high enough rep to undelete. Should it be flagged?
 
Perhaps, I'm not really sure on what should be flagged.
 
i wonder how many posts saying "will golf later" or something like that have been left untouched
 
Fun fact: srand(0) has the exact same result as srand(1) on a glibc implementation
In stdlib/random_r.c:
  /* We must make sure the seed is not 0.  Take arbitrarily 1 in this case.  */
  if (seed == 0)
    seed = 1;
 
@WheatWizard huh? output isn't implicit in ruby. he would need to prefix the answer with puts or something
and that wouldn't work if it was doubled
 
8:29 PM
@Poke No He's using interactive mode, in which output is implicit
 
@Mr.Xcoder I don't see any point commenting a 79 bytes after I have commented a 76 bytes
 
@WheatWizard that's what a snippet is..
 
@Poke No its not
 
oh ok then
good talk
 
8:30 PM
@Mr.Xcoder that's actually golfier than I would have it
 
@WheatWizard that has a net of +1
i don't think that's widely accepted
 
huh? It has a net of +14?
 
oh you linked the other answer
 
Ah I see my bad
 
well i guess the language in the answer should be "Ruby REPL"?
 
8:33 PM
Yeah he should change the title of his answer
I think the official name is irb
 
ye
 
@LeakyNun I am on mobile, haven't seen you comment. Sorry
@LeakyNun I'm happy then
 
using a REPL as your language seems as "meh" to me as using a lambda
in this case it was done creatively
but in most cases it's a no-thought method to reduce bytecount
 
I'm not sure how I feel about it myself. It doesn't sit well with me but there is no reasonable way to disallow it.
 
@WheatWizard REPL languages?
 
8:40 PM
Yes
 
That kind of ruined by challenge
Indeed
 
I think they ruined your challenge in the same way that golflangs "ruin" challenges. There is a tool for every job and its no fun to do a job with the correct tool.
 
fair enough
@LeakyNun I spy a League of Legends character quote
 
@Poke that isn't where I got it from though
 
I believe it
his laugh happens to be my text message ringtone
 
8:46 PM
@LeakyNun Cheer curiosity: How would you have had it?
 
@Mr.Xcoder fP_TQ, the obvious way
 
@LeakyNun I see.
@LeakyNun Noob question: why cannot Q be ommited in this case?
 
@Mr.Xcoder read the docs of f
 
> First input where A(_) is truthy?
And that would be, of course, 2?
 
yes
 
8:53 PM
BTW, nice one +1
 
"Time flies like an arrow; fruit flies like a banana" is a humorous saying that is used in linguistics as an example of a garden path sentence or syntactic ambiguity, and in word play as an example of punning, double entendre, and antanaclasis. == Analysis of the basic ambiguities == "Time flies like an arrow" is an English phrase often used to illustrate syntactic ambiguity. In this connection the sentence is often seen as part of the elaboration: "Time flies like an arrow; fruit flies like a banana". Modern English speakers unambiguously understand the sentence to mean "As a generalisation, time...
 
0
A: Computers will never taste a refreshing cookie

totallyhumanBubblegum, 23353 bytes Yup. Most of it won't fit in an answer so... Both the code and the TIO link are in pastes. Code (a hexdump of the code) TIO link (the output exceeds TIO's limitations)

my eenie little chromebook almost crashed trying to do this o0
 
why does JS not have a simple sub in string
why string.includes(sub)?
 
@Riker because in means if it has a property
e.g. 'includes' in string === true
 
oh
that's actually really cool
 
9:05 PM
JS much prefers to use functions rather than syntax.
 
@Downgoat I wish that could be "has" or similar
i.e. string has 'includes'
 
@ATaco proof: latest ESDiscuss thread. one of the guys there had a big rant about it :P
 
@ATaco I've noticed that
 
@Riker :O cheddar has this. 100% definitive evidence you should use cheddar
cheddar> 'foobar' has 'foo'
true
wait oh :|
 
haha
@Downgoat "cheddar would have this, but, uh, cheddar is a horribly broken PoS that is currently on hold"
 
9:08 PM
@Riker :'(
I can switch from has -> in if you will use cheddar :D
 
i keep asking this but i feel like my library is lacking in functionality
what would you expect an oeis library to have
 
@totallyhuman 1) get OEIS descriptions, a list of sequence example, authors 2) parsed descriptions of related/linked OEIS sequences, sequence ID
 
@Downgoat lol
no it's cool I like has better
 
descriptions - check
first few terms - check
author - check
sequence ID - check
 
by parsed descriptions i mean the linked sequences from 'comment' field has extracted
obviously parsed links/refs would be a plus
 
9:13 PM
ah
 
oh and obvious one: ability to generate OEIS link. (I know it's trivial you can just do "oeis.org/A#{seqId}" but still...)
 
yes done
 
Might be a reach but would be really awesome: sometimes haskell/mathematica snippets are on OEIS, ability to spawn a haskell/mathematica process if detected on user's computer and get value from function would be amazing
 
Mm I really wanted to do something like that
I'm not sure how I'd go about making it work perfectly
Especially since I'm literally taking code from the internet and running it
 
9:18 PM
to be fair it's python so no matter what you do code is insecure
 
@Downgoat ok, I'm really stuck w/ digital ocean + github domains, can you give a step-by-step walkthrough of what I need to do >_> it shouldn't be this hard
 
My cQuents interpreter is written in Python, once I get it working finished it should be able to generate most OEIS sequences
 
I've got a file called "CNAME" containing "username.github.io" on the server, and the github repo is set to go to "domain.com"
and the google domains area has the nameservers (ns1|ns2|ns3).digitalocean.com
 
@Riker Quick question: why are you use a DO VPS if you are hosting a GitHub pages site?
 
Yes but oeis doesn't host cquents solutions for each sequence :P
 
9:20 PM
@Downgoat trying to get a custom domain name
 
your domain name provider should give you DNS options themselves
 
o really?
hm
 
@totallyhuman Is your library going to be online or offline?
 
Online
 
if u do it simplifies things quite a bit
 
9:21 PM
thanks :D
 
oh, I thought it was supposed to be offline, since I thought you'd be using it for PPCG, nvm
 
I do not want to deal with scraping the whole oeis
It's yuuuuuge
 
@totallyhuman you could have your thing spawn a docker on launch with like 0 perm and execute securely inside that container
 
@LeakyNun It seems fine to me currently - do you know how long it was down for?
 
9:30 PM
0
A: Sandbox for Proposed Challenges

Lawful LazySelf-Improvement Your Task You must create a self-mutable program that, when run, outputs a non-zero integer and also overwrite the file with a program that outputs double the number. For example, if I run the program self-improvement and it outputs 10, it must output 20 when I run it the seco...

 
Also I literally have no idea how to use docker
Also didn't it get renamed?
 
@totallyhuman still docker on its website and everywhere. they might have gotten acquired and all though.
 
Oh huh
 
9:48 PM
Question: what do you call the thing (context: app design pattern) that talks between model and controller/view
 
2
Q: Tips for golfing in x86/x64 machine code

Bruce ForteI noticed that there's no such question, so here it is: Do you have general tips for golfing in machine code? If the tip only applies to a certain environment or calling convention, please specify that in your answer. Please only one tip per answer (see here).

 
@NewMainPosts this one is one of those cases: "Don't."
 
What's the shortest way to get the element of an array in Jelly?
 
@Challenger5
 
9:57 PM
Ninja'd
 
Sorry, I meant last element.
 
 
Nope
 
But modifies the original list, and I'm using the original list
How would work as a monad?
 
9:59 PM
ṫL
 

« first day (2361 days earlier)      last day (2481 days later) »