« first day (2280 days earlier)      last day (2860 days later) » 

14:08
1
Q: Number Lockers!

Comrade SparklePonyGiven a positive integer < 100 (from 0 to 99, including 0 and 99), output that many lockers. A locker is defined as the following: +----+ | | | | | | | nn | +----+ where nn is the locker number, in base 10. If there is 1-digit number, it is expressed with a 0 in front of it. For exam...

14:21
@flawr
TBH that looks awful, too.
French fries? Really?
I would totally eat french fries on pizza.
looks delicious
french fries go well on everything
14:24
just like rice
Rice pizza? Not that tasty...
it's actually quite good
you need to make it with spanish rice though, not plain white rice
Eeehhhhh
I can sort of see it.....
14:26
@mınxomaτ what do you think of ranch on pizza?
ABSOLUTELY GODAWFUL IDEA
NEVER DO THAT
blocks you
I personally like my pizza with bbq sauce and ranch, mixed
bbq sauce +1
ranch -50
My pizza is mostly normal. Bacon, pepperoni, garlic
I like white sauce tho
lol
bacon, olives, that's about it
I don't really like vegetables on my pizza
....yeah, bacon, garlic, and white sauce aren't "normal" toppings
user165474
14:30
This reminds me of the extremely long argument about pineapple on pizza...
like, they are delicious
bacon and garlic are
but not normal
if you say "Make me a pizza", with no other instructions, do you expect bacon or garlic on it?
no, you have to specify that
I would have to specify any toping
but you could easily expect red sauce, pepperoni, and maybe sausage
user165474
14:31
(cheese is implied right)
oh, and cheese
thanks :)
@NathanMerrill probably green pepper over sausage but i agree
@Riker Bacon? Aren't you vegan?
pepperoni is the "default" pizza
really? I'd be really surprised to find green pepper
user165474
14:34
I thought cheese was default.
it depends on your price level
user165474
<shrug>
if you're going cheap pizza, then I could agree with that
@HyperNeutrino google.com/…
just a normal google search returns a lot of pepperoni
user165474
Oh I see.
14:35
hey, cheese takes 3rd place
green peppers 5th
and sausage 8th
(at least according to my google)
user165474
What's 2nd?
pepperoni
user165474
Wait what's 1st then
it takes 1st, 2nd, 4th, 6th, and 7th :P
user165474
Oh.
user165474
14:37
... :P
although, 4th doesn't really count because it's this weird thing:
since, you know, that's the image I was looking for when I was looking for a pizza picture
user165474
Yep :P
related
@NathanMerrill 5th for me.
14:40
@Fatalize vegetarian, but yeah. I just haven't had pizza in like 2 months
and I'm not as anti-meat consumption as other people, I just choose not to eat it anymore
I'm perfectly fine with people mentioning it/friends eating it in from of me
I see
user165474
s/om/ont
yeah that :P
can't eat, mobile makes it hard af
user165474
s/eat/edit? :P You appear to have mobile typing troubles :D
Hyper, you're missing the trailing slash on those replaces
14:44
vim supports regexes without trailing slashes
interesting
user165474
s/$/\//
user165474
:P
@HyperNeutrino i scowled and then grinned >.<
user165474
:D
14:46
@Riker it is great unless pizza is veggie pizza
veggies on pizza are an abomination
@HyperNeutrino >_>
user165474
wat
user165474
The regex fixing regex?
@Riker are you allowed to say this as mod of vegetarianism.SE :O
vegetarian != veggie lover
I basically eat carbs and rice
and tofu tamales are pretty epic
14:53
@Riker can corroborate, but root word is veggie
I don't know how anyone could say veggies in general don't belong on pizza.
@Downgoat eh, true, but my point still stands
Not even the basics like onions and bell peppers?
onions are fine
bell peppers don't taste good at all IMO
Carbs and rice? :P
14:55
rice = rice, it's its own food group :p
Tomatoes are worst thing you can you can pizza
No, that'd be fish
can't argue with that
I'll agree with that
I've never liked fish, but there's somethign quite disturbing about headless fish lying on your pizza
14:56
I like fish, but on pizza? Never.
Tuna pizza is pretty good actually. If you don't mind your breath becoming a biological weapon for a day.
@Geobits have not tried so can't confirm
Well, a goat might like it.
@Riker s/lying on your pizza// :P
good point
14:57
@Geobits goats are (tin can+herb)ivores
@Downgoat *tincanivores
Great. Now I'm hungry. Ordering...
@Riker sorry fixed :P
gas masks on, muffled voice biological weapons can't be transferred over chat right
We just ordered some shawarma and ate it
14:58
TIL what that is
@Riker That would be a stannumivore I guess
I had no idea it was spelled like that
because everybody I've talked to says it like "shwarma"
@Riker TIL they make gas mask for cat
15:00
I always pronounce the first "a"
Works for dogs, too.
Question: does git have command to remove orphaned commits
@Downgoat If they are really orphaned, garbage collection will do: git gc --prune=now --aggressive
@Downgoat The red star matches your avatar very well
15:06
Expiring the reflog is not needed right? Or will git reflog break if I don't
git takes care of orphans automatically over time, technically, there's nothing you have to do
Might be a good idea to inspect the graph so you now that what you think are orphans are actually not referenced anywhere. Above command isn't dangerous though, as it just runs GC at once, instead of later.
@ATaco In Puzzling chat, your team userscript is causing some usernames to be invisible
For example, my username is invisible, at least on my computer
it is on mine as well
But it reappears when I click on it
Yeah weird
15:14
Huh, it does. The star disappears momentarily though
@KritixiLithos team?
is it supposed to distinguish SE employees from normal mods?
Wait, it only shows the person's username the first time you click on it, successive clicks don't do anything
yesterday, by ATaco
Based on This Challenge I made a userscript that arbitrarily assigns users to teams in the chat. And colors it!
ah okay
The userscript is here
that sounds fun, I'll get it if it's fixed
15:23
2
Q: The mad chemist and the clever programmer

AntoineYou wake up dizzy in a chemistry laboratory, and you realize you have been kidnapped by a old mad chemist. Since he cannot see very well because of his great age, he wants you to work for him in order to escape the laboratory. He will give you the number of each elements that must be contained...

0
Q: Code golf: is an invalid but working solution acceptable?

YSCSuppose one answers a code-golf challenge for a language with a solution which is ill-formed according to the spec of the selected language. "But it works nonetheless with all major interpreters". Is the answer considered valid? Exemple: Challenge: print this text: Hello, World!. Solution...

Looks like he wanted to comment but doesn't have enough rep
15:43
@Mego how do I get the first element of a list in Seriously/Actually?
@ConorO'Brien seriously, it's actually very easy
you just need to do F
docs: pop [a]: push a[0]
Wow. TIL that in JS, if you sort an array while in the middle of doing .map, .filter, etc. then the function will start using the sorted order of the array. For example, if you do a=[3,0,2,1]; a.map(b=>{a.sort(); return b}), you'll get [3,1,2,3]
yup
I think sort does it in place, right?
15:49
It does, but... just... I... guess it vaguely makes sense
But why would you ever need that? (besides weird golfing scenarios, that is)
@ETHproductions it's not that you need it
it's that it's more efficient
Yeah, true...
I wonder how this affects the third parameter (the original array), if at all
they are just pointers to the same array
the pointer might be different
but the value of the pointer is the same
Um. Since when has JS not allowed duplicate argument names? (e.g. (_, _, b) => ...)
Maybe I've just never tried it
@LeakyNun Yes, that seems to be the case
Haha, a=[3,0,2,1]; a.map(b =>{a[2] = 5; return b}) returns [3,0,5,1]. I wonder if this could ever be useful in a code-golf challenge
>> a=[3,0,2,1];b=a;b[2]=5;a
<< Array [ 3, 0, 5, 1 ]
15:55
I know, but I didn't realize that the array you're operating on is the third parameter to these functions
Easy cumulative sum algorithm: a.map((b,i)=>(a[i+1]+=b,b))
well alright
@ETHproductions so you figured out a use
sighs yeah, I guess it's not so pointless after all...
Maybe I should do less ranting and more searching for explanations next time :P
Now what was that challenge where you had to fill in zeroes in an array with the previous non-zero?
running truth or smth like that
This is similar:
29
Q: Repair the ranges

DoorknobGiven an input of a list of positive integers with some replaced with 0, output the list with the missing numbers that were changed to 0 replaced. Characteristics of the input list: The list will always have a length of at least 2. Let us define the input list as a and the "original list" (tha...

Oh, found it:
33
Q: Cover up zeroes in a list

FryAmTheEggmanInspired by this SO question As input you will be given a non-empty list of integers, where the first value is guaranteed to be non-zero. To construct the output, walk from the start of the list, outputting each non-zero value along the way. When you encounter a zero, instead repeat the value yo...

16:18
0
Q: Create a list of 'words' allowed

simplest_mathematicsWhat I want In Scratch, all cloud data used as a chat room has to be processed through a 'censor', otherwise, a _whitelist This means that a list has to be made for all the words allowed. Can you create a program with an input, asking for a word. If your _whitelist contains the word, then you ar...

VTC ^
@Phoenix you needn't have called, it got voted closed by five people in three minutes
which is actually fairly impressive
It only had 2 votes when it was posted here.
NewMainPosts was fast
I'm also impressed that everyone managed to agree on the close reason
user165474
shorter = quicker
user165474
16:25
lol
I'd consider that challenge to be unclear, too broad, and offtopic
user165474
for(;;); versus while(false);
@ais523 Actually no, three said "unclear" and two (me included) said "lacks an objective winning criterion"
@HyperNeutrino in most languages for(;;) means while(true)
there are probably languages that screw this up, but it wouldn't be usual for a for condition to default to false
I think that's their point, for(;;); = run forever
user165474
16:27
That's what I mean.
> Post Closed as "unclear what you're asking" by Wheat Wizard, mbomb007, Luis Mendo, Phoenix, ETHproductions
@ETHproductions while(false) doesn't run forever
Wait, did they stop recording who voted what?
user165474
@ais523 My point is for(;;); runs forever and while(false); runs once.
@ETHproductions IIRC they record it for offtopic subreasons, but not for main close reasons
user165474
16:28
Just an example that shorter != faster
@ais523 ah, ok
@HyperNeutrino while(false) actually runs zero times; do … while(0) is the normal way to run once
user165474
Well I mean, the lexer and parser run over it and then I think the compiler runs over it once, skips the body of the loop, and terminates.
user165474
@ais523 Or you can just call the body directly. :P
nah, it lets you use break and continue and also makes it a single statement
user165474
16:29
Unless JS has constant conditional optimization.
it's very useful, especially in generated code
user165474
Oh I see.
interestingly, in Perl 5, { … } is defined as a loop with one iteration (allowing you to use loop control constructs on it if you want to)
user165474
Hm. Interesting.
@ais523 So, break?
16:31
if(bad) goto endOfLoop;
@Phoenix Perl spells it last for some reason, but yes
I guess it's golfier, but it seems needless
redo is also useful, especially when golfing (it restarts the current loop iteration)
That seems like quite a useful thing to have in a language (Perl's {...}, I mean)
Oh, redo, didn't know about that.
e.g. Java only has break and that's it
16:35
@Phoenix and continue, which is very often useful.
break LABEL is surprisingly very useful
In Java? I didn't know that.
I've uh, been using break LABEL instead
@KritixiLithos That's not a loop construct
that's just a block construct
I try to avoid break label as much as possible.
It makes me feel icky.
@Phoenix I was just saying
@Geobits There have been certain scenarios when I had no solution other than break label
Yeah, me too, but I always look to see if there are ways around it. Usually it's an inner-loop scenario.
16:38
those scenarios always happen inside loops
I mean nested loops. Like you need to break all the way out of the outer one, from the inner.
labelled break isn't even hacky, I don't think; it's easily the clearest way to break out of multiple loops
CMC: given an array of length n^2 (e.g. [a,b,c,d]), return e.g. [[a,b],[c,d]].
@ais523 I agree with that, but using them for just about anything else raises flags in my brain.
@LeakyNun what a rewe supposed to return if n = 3?
16:40
[[,,],[,,],[,,]]
@Geobits yes
Return a square array from a flat one :D
@Geobits is it even possible to use them for anything else? I didn't realise they were syntactically legal in other cases
Well, I mean, you can use them inside single loops, or like phoenix said, use them where you should have a continue instead.
0
A: Sandbox for Proposed Challenges

AntoineBackstory You wake up dizzy in a chemistry laboratory, and you realize you have been kidnapped by a old mad chemist. Since he cannot see very well because of his age, he wants you to work for him and only then, you can escape the laboratory. Task It is your task to return a structural formula ...

16:42
It's weird what people can come up with.
you can also do continue LABEL?
I've... never tried that.
@LeakyNun Brachylog, 7 bytes: l√ℕ:?ḍ₍
But I don't think so.
@KritixiLithos You put a named block that takes up the entire loop and then break the block
user165474
16:44
Python, 70 bytes: def f(x):k=int(len(x)**.5);return [[x[i:i+k]for i in range(0,k**2,k)]]
@Phoenix twitch
@Phoenix then what's the difference between break and continue?
@HyperNeutrino why don't you try jelly?
user165474
break exits the loop; continue skips the rest of the loop and goes back to the top
user165474
@LeakyNun Good idea.
16:45
continue skips to the end of the loop and restarts
The named block is inside the loop
user165474
I'm still working on the square root simplifier
@Fatalize why does give a negative number?
@LeakyNun 05AB1E 4 bytes: Dgtô
@Riley how does it work?
@LeakyNun √ is ~^ rather than the math definition really
16:47
@Fatalize please
to be fair if ḍ wasn't stupid and failed instead of crashing on negative numbers, you wouldn't need ℕ
@LeakyNun Duplicate, get length, sqrt, split in pieces of that length
@Riley I see
@LeakyNun what?
@Fatalize please make it positive
@Fatalize and where did a go to?
@Fatalize yeah it's now, can you show me how to use it?
16:53
@LeakyNun Making it non-buggy would be better
user165474
@LeakyNun Jelly, 5 bytes: sLƽ$
it also obviously work if the previous predicate is {...}
@Fatalize heh, I thought you need a colon
and it's like that for all metapreds (the superscripts)
@LeakyNun that was Brachylog 1
Brachylog 2 makes much lesser use of colons
Rod
Rod
16:55
@LeakyNun Python 41: lambda a:zip(*[iter(a)]*int(len(a)**.5)) - TIO
0
A: Sandbox for Proposed Challenges

Beta DecayElectron Configurations: Orbitals code-golf chemistry Challenge Given an elements atomic number as input, output its short electronic configuration. Explanation http://www.chemguide.co.uk/atoms/properties/elstructs.html To come Examples Sodium: 11 [Ne] 3s1 Helium: 2 1s2 or [He] ...

user165474
@LeakyNun See my Jelly answer; is it golfable?
@Fatalize can you do it declaratively?
@LeakyNun What do you mean?
your CMC?
yes
I'm having this (I know what I need to fix, but not how to fix it)
17:05
@LeakyNun this
Why would the default of ^ be 0?
^ by default is X^Y if Input = [X,Y]
₀ is often a special case
that default = 0 is because I'm dumb and I initially made chose that default = 0 for all predicates
but it's actually not true for most predicates
just for the first ones I did
and I'm lazy to fix it
17:09
Well that's actually clever
now there are two people beating me at Brachylog, great...
still longer than your imperative approach
you would need to have a "is_square_array" constraint ;)
the idea is to partition into equally sized partitions, where the number of partitions equals the size of each partition?
the imperative one is also faster
@Fatalize how can declarative be faster than imperative?
because I don't know how to write
17:11
you win
if \ asserted that the array was square
err, not square, rectangular
like I suggested a while back
~c.\l~l would probably work, unless I'm missing something
@ais523 nope: Z = [[1,2],[3,4,5,6,7,8,9]]
right, that's because \ is a bit more lenient than I'd like atm
2
Q: 579085261 is CRAZY, 725582 is GOLF, 10757494 is ...?

ArnauldYour task is to translate a 103-smooth number into an English word, using the method described below. How? Generate the list of prime factors (with repetition) of the input number. Sort the list: If 2 is not one of the prime factors, sort the list in ascending order. If 2 is one of the prime...

@ATaco wat
what is this red/blue team business
17:19
0
A: Sandbox for Proposed Challenges

carusocomputingASCII Hues Hello again PPCG, you all may or may not be familiar with a color scheme known as HSV... which stands for Hue Saturation and Value. Depicted above are the "angles" of hue from 0 to 360, and their respective colors. For this challenge you will be taking in a picture for your input,...

It's a usercript
Install TeamSpirit
Does it work already?
When did it not work
It still doesn't
Tampermonkey or Greasemonkey
17:22
Works fine for me in Tampermonkey (Firefox 52, Windows 7)
It's dependent on one of Taco's other scripts, I can't remember which one and I don't care to install it.
doesn't work for me on tampermonkey on chrome
I also have his other userscripts
and reloaded
He promised to fix it today
do i have a color
17:24
I'm on mobile, can't tell which color you are
@Poke you have an odd user number, thus you are blue.
So, I am red? Ragequit!
Red team best team
@MistahFiggins I am content with this.
17:28
can you please not put obtrusive oneboxes in chat?
that's just a big red rectangle that's hard to ignore
it appears quite small for me
vote remove
Oh, it's chat users (the colours of the stars)
it's also on the starboard
@MistahFiggins Wait, I thought this thing was supposed to be based on PPCG user numbers to go with the red/blue challenges on the site? Is it based on chat user numbers?
Then why did someone say I was red? My PPCG user is odd, but chat is even.
do I have red/blue mixed up again?
^^ same for me
@MistahFiggins I don't know, that's why I'm asking :P
> If it is odd, you are on the blue team.
> If it is even, you are on the red team.
I'm on red, poke is on blue
17:37
Phi has an odd user number on PPCG, but he's blue
So this is a lie?
18 hours ago, by ATaco
@Geobits You're Red.
you are blue @geobits
I think it's a lie
or mistake
I think it's the chat user ID, I'll find some proof
Odd is blue, even is red
If only the userscript worked, hint hint @ATaco
17:39
even chat users are red, the rest are blue
Boo, it should use the main site ids
I want to be blue, the star doesn't match with my avatar
ooo Geobits is blue too..? Can I switch?
I'm supposed to be blue, but the script is flawed imo
It doesn't match the teams on either red/blue challenge on main.
@KritixiLithos can it be disabled on the starboard?
it's kinda annoying there
17:43
disable what?
the team colored stars
thanks
yea @ATaco it breaks some names
do you know why it breaks some names?
nope
but it specifically breaks "Aurora0001", in a single msg (not part of a block) with "@Riker" at the beginning
and "Mithrandir" with a reply at the beginning
(aurora and mith are the usernames)
17:53
'
Maybe the star takes up too much space?
@Riker what are we talking about here?
a team spirit userscript
that puts colored stars before names
Oookkaayyy?
yea
it breaks some names though
looks like the star takes up too much space, making people's names show up as just a colored star
17:56
I've always wanted to be a star...
lol

« first day (2280 days earlier)      last day (2860 days later) »