« first day (2875 days earlier)      last day (311 days later) » 

12:24 AM
A: Sandbox for Proposed Challenges

guest271314Who ordered chicken? Chicken is what poor people eat You are a chef in the luxury hospitality industry. You decide to serve chicken breast to your guests for lunch. When served the guests pick through their meal and the primary guest states to their company Who ordered chicken? Chicken is ...

12:43 AM
Q: Convert to Suzhou numerals

lastresortSuzhou numerals (蘇州碼子; also 花碼) are Chinese decimal numerals: 0 〇 1 〡 一 2 〢 二 3 〣 三 4 〤 5 〥 6 〦 7 〧 8 〨 9 〩 They pretty much work like Arabic numerals, except that when there are consecutive digits belonging to the set {1, 2, 3}, the digits alternate between vertical stroke notation {〡,〢,〣} an...

1:09 AM
after 50 billion iterations
there are people that got part 2 in 9 minutes?
@NewSandboxedPosts what is this challenge
@NewSandboxedPosts I did. It was delicious.
part 2 is surprisingly easy
with human assistance
also why is it that i always mess up
if not an off-by-one error it's an off-by-one-order-of-magnitude error
1:33 AM
just let me ask a dumb question
but will I be vulnerable if I enter my, say, password, into a page with some mixed image content that loaded as the background through css
Question: what is the windows C build process like? Does it also go Backend -> Object File -> Linker -> Executable?
Because I can't figure out what windows' linker executable is
1:49 AM
@Downgoat Depends on the compiler. Using GCC, everything is normal. Using MSVC, everything is done in one go from the user perspective, but usually it fails due to lack of full C99 support and basic C11 support.
@ShieruAsakoto just the image was over http?
or the CSS?
if the CSS was loaded over http, youre vulnerable because you can inject JS through that
the css is over https but that line of code is like url(http://.....)
i think you can embed JS in an SVG also?
so if that got sent as the image
or more specifically it was something like url(http://a.website.com/the_picture.jpg)
yeah so youd be vulnerable if that got MITM'd
it could replace the JPG with a malicious SVG
i think those can be loaded as css background images right
obviously they work in img tags
2:04 AM
@Mego Windows has GCC? O_o TIL
does it have ld or does GCC have its own things to do that on windows
right now VSL uses ld command to do linking because portability issues with clang
@Downgoat Through mingw, yeah
can anyone with windows who has ld tell me if there is a -arch flag available?
is it something like this?
<script type="text/javascript"><![CDATA[
within an svg
Q: Including JavaScript in SVG

mortalcI am trying to create an interactive SVG code with JavaScript, by embedding the JavaScript in the SVG. I don't know if this is the right way to do this: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/s...

yeah looks like it
but when I tested on localhost nothing happened
2:11 AM
I think you need the DTD
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> this?
@quartata JS in SVGs isn't run
@Downgoat hm?
oh there was no the first xml line lmao
are you sure? im seeing some stuff on security SE about this as an injection
2:13 AM
@quartata if they are loaded as an <img> or something they won't be run only if directly embedded
`<?xml version="1.0" encoding="utf-8" standalone="no" ?>`
`<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">`
`<svg version="1.1" xmlns="http://www.w3.org/2000/svg" onload="pwn()">`
`<script type="text/javascript">function pwn(){console.log("pwned");}</script>`
@quartata if that was true I can host an SVG to send me all your session keys and post it in TNB
my test pic is now this
@quartata this is pretty much only old IE though IIRC
@Downgoat how about an SVG loaded by CSS?
2:15 AM
@ShieruAsakoto yeah that still won't run JS
security issue with mixed content is mainly tracking and MITM/phishing
says it has to be loaded as an embed?
so i guess as an img tag its safe
> For this reason both, SVG image and SVG resource must be fetched with the same policies. The one with more restrictions preferred. Therefore, SVG resources have the same restrictions as SVG images.
this line?
>Scripts must not be executed
under the other thing
bc Google and Mozilla said that url(blahblahblah) within CSS is considered mixed active content
@Downgoat to be fair ive demonstrated that oneboxing is not particularly safe but youre right it requires active user interaction
2:20 AM
but they just don't block that as per W3C specs
> Requests whose initiator is the empty string, and whose destination is "image".
> Mixed content is optionally-blockable when the risk of allowing its usage as mixed content is outweighed by the risk of breaking significant portions of the web.
so anyway, I may only be vulnerable to being read the cookies but not my passwords entered after that page is loaded in this particular case?
the primary thing is knowing who loads a given page
since other UI images and connections are over HTTPS
https normally would hide what page someone is requesting
but if you know your resource is on a given page then you can track
since its another origin reading cookies is not the issue
Welp the page doesn't refresh even if the content is entered tho
because it used sth like XMLHttpRequest (ofc over HTTPS)
I think those image resources loaded from a secure CSS can't modify other elements not specified can they
2:58 AM
anyway thanks for the answers I was just nervous about possible code injection only
3:46 AM
Q: Find the size of string which is good and has the least importance

Mathejunior Define a good substring as a substring which begins with 'x', ends with 'z' and has a length divisible by 3. Define the importance of a string as the number of good substrings it intersects with (excluding itself, if it is itself good). Consider a string of length N (1≤N≤10^5) which is compose...

4:36 AM
@Dennis K. Then Martin's documentation is wrong.
The Unary Arithmetic guide has programs that don't work in 1.0
Yes, it says so at the top.
> Under construction... (...and out of date. This was written for Retina 0.8.2.)
Oh some additional information
The entry page is opened as an iframe after pressing an icon on the page
when the background is loaded the iframe does not exist yet
4:51 AM
The thing you're worried about goes in the iframe or in the background?
the password entry is in the iframe
and I have checked the css that the problematic lines are just background-image:url(http://blah.blah/blah.jpg)
and the browser shows the https:// with an info icon
If anything, the fact that it's in an iframe makes it more secure because you also have Same-Origin-Policy protections between the page and the iframe.
At least from the perspective of a stylesheet in the parent page.
Disclaimer: I don't do web-dev or front-end anything, so don't take my word on this
so as long as the iframe is opened with HTTPS without mixed content I'm safe with that?
But those css lines can't load something that alters that icon can they?
Yeah you'd be safe. You mean the browser this-is-secure icon?
> Yeah you'd be safe. You mean the browser this-is-secure icon?

*and the browser shows the https:// with an info icon*, so yes
and the pressing an icon to open iframe one is in the page content
5:00 AM
In theory, it could change the icon. However assuming you're using a current and sane browser it would be due to a bug in the browser (one that is unlikely to be present, and would be fixed post-haste if found). So not in practice.
lost chocolate chips in my printer again
At this point I'm surprise it doesn't ooze on hot days.
@feersum How does that happen once, much less multiple times?
Bag of chocolate chips sitting on the printer
Top-loading document feeder
They fall out of the bag and into the document feeder.
thanks, so as long as there is no method for loading and executing malicious code through a static JPG url()I'm still safe as long as not interacting with those elements right?
@feersum I see a near-effortless way to prevent this issue :P
5:06 AM
Masking tape?
Moving the bag away from the printer
CMC: given a list of pairs (in some appropriate format), output each first element of a pair followed by each of the second elements it pairs with (e.g. [[1,3],[2,5],[1,4]] could output [[1,[3,4]],[2,[5]]]
I just tried to solve this in Jelly for something offsite, it seems surprisingly difficult there, and yet it's pretty easy in most practical languages, which struck me as an unusual combination
(unfortunately, "easy" does not mean "terse")
@ShieruAsakoto yep.
Q: Find index of heaviest ball

Justin CaseMark has N balls, numbered 1 through N. No two balls weigh the same. You want to find the heaviest ball but you do not know which one it is and Mark does not want to just give it to you. Therefore, he decided to play a game with you. You may ask Mark at most Q=4+N/2 questions. In each question, ...

5:23 AM
I had a 74B JS answer for that only
5:58 AM
It turned out that the resource was automatically reloaded using HTTPS (with a status code of 301 in between). Solved
@Dennis Hmm, that's too bad. What about on meta, as "what features make golfing languages golfy" or a separate question "what features make golfing languages fun to golf in"?
@FrownyFrog hmm, that'd be, what, 8 bytes if you took input as a list of pairs rather than two lists in separate arguments?
don’t know this language
Jelly's probably the most popular golfing language on PPCG, which means that on questions it's suited for, it normally ends up winning
this CMC's a little tricky in Jelly because it's hard to get all the values into the right places
6:08 AM
I mean I’m not good at it
fair enough
how would you do it with a list of pairs?
with your approach, you could do something like using Z to transform it into a pair of lists, then use / to reduce your code over that pair
yeah that part I get
you'd also need a grouping character (I think it might be doable with one grouping character with a bit of rearrangement?) to make the / apply to the entirety of your code
6:17 AM
I mean the syntax
here's the obvious way: Try it online!
but that uses two extra characters
I can't see an obvious way to do it with one but suspect it's possible somehow
1 hour later…
7:36 AM
Finally Mozilla documentations have BigInt
wow, doorknob was first to both stars for day 13
wonder if we should do aoc for past years
@ASCII-only He was second for the first star
anonymous user #193354 was first
7:59 AM
Last updated by: coolaj86, Dec 12, 2018, 1:23:06 PM
about one day ago
8:21 AM
Any idea how to talk to a user with a chat suspension...? The Sandbox question is at 20 comments and counting
Which question?
@ShieruAsakoto here
> Who ordered chicken? Chicken is what poor people eat.
Sorry but that made me laugh
btw the discussion seems to be growing to some hate
8:47 AM
@ShieruAsakoto Yeah, that's probably why they got suspended from chat in the first place... They really likes either misinterpreting common phrases or insisting that the phrases are meaningless and don't apply to them.
9:04 AM
@JoKing and second on second star :P
so it cancels out?
random thought: I'd imagine you should be able to get sub-5 minutes for every single second star with a language that's good enough
oh yeah. i also cheated with Julia for most of the numbers so i'm now like 10th overall in code-golf.io
I kinda feel bad
"i also cheated with Julia" ( ͡° ͜ʖ ͡°)
i walked straight into that one didn't i
well, just completing all the holes will get you pretty high
*on the leaderboard
9:08 AM
not if you use java lisp
10 points per hole :P
@JoKing primo uses basically everything
i could do 2 more challenges in lisp and that would put me at the top
His profile page is insane
all those firsts
2 hours later…
10:46 AM
im trying to do today's aoc's part 2
my program works with the sample input
but not the actual input
11:14 AM
ok nvm solved it
@betseg are you by saying that implying that that's the first time that's happened to you? :p
11:40 AM
A: Sandbox for Proposed Challenges

l4m2Output a number \$n\$ such that: \$n\text{mod}10=5\$ \$n^2\text{mod}10^{10000}=n\$ Shortest code win. Sandbox mainly to check duplication

@dzaima well in AOC yes :p
but considering its my 13th aoc puzzle
the problem was that i was sorting by y,x not x,y
11:53 AM
@betseg lucky you :p
12:32 PM
@lirtosiast I don't think that would be on topic. Meta is for questions and discussions about PPCG, and a way to communicate with Stack Exchange.
1:12 PM
A: Sandbox for Proposed Challenges

QuintecNon-overlapping Matrix Sum Given k m by n matrices, output the maximum sum possible using one element from each matrix such that no two elements are from the same position. It is guaranteed that k<=mn. Ex. 1 2 1 2 3 4, 3 4 ->7(3+4, can’t choose the 2 fours in the same place) Is the challen...

1 hour later…
2:18 PM
@betseg ok I've made 7 solutions to AOC 7.2 that all work with the sample input and all fail for the actual input and I currently have a 10 minute throttle on that problem and I've decided to just give up
@ASCII-only that was my plan
In fact, i just finished: code-golf.io/scores/lisp
2:33 PM
@HyperNeutrino wanna join PPCG leaderboard
Also, nice #93 spot on global leaderboard
3:07 PM
@betseg sure :D
also lol ty
i stayed up til midnight twice to solve it early to get that :P
Does anyone have or knows where one could obtain a precompiled linux Perl 4 binary
It's more than 25 years old
Something compiled that long ago won't work with today's libraries
Well hopefully someone has tried compiling it on modern hardware (and succeeded)
1 hour later…
4:59 PM
@Pavel Whatever do you need it for??
@El'endiaStarman TIO, and I got one just now
Well, congrats! :P
Hmm, hat research is going relatively slowly this year
I think we knew more about secret hat triggers at this time last year
I know nothing and have 0 earned hats :P
Quintec says, wearing a hat
5:13 PM
sees fresh new hat
did someone say
@Quintec And one unearned hat
actually, Quintec has the two hats that you don't have to do anything to "earn" them... :P
5:33 PM
How do you see hats that others have earned?
Hats are great.
@AdmBorkBork click on profile picture on profile
if it doesn't work, they haven't earned anything
Derp, thanks.
6:13 PM
That hat required the fact that I signed up on random sites a few months ago, lol, I don’t consider it earned
the other is viewing stack overflow teams
A: Sandbox for Proposed Challenges

flawrStandardize the Samples code-golfmathstatisticsarray-manipulationarithmetic Challenge Given a list of floating point numbers, standardize it. Details A list \$x_1,x_2,\ldots,x_n\$ is standardized if the mean of all values is 0, and the standard deviation is 1. One way to compute this is by ...

1 hour later…
7:40 PM
Anyone know if there's a good way to optimize this statement, or is it optimal?
@moonheart08 Are you calling it a million times a second or something?
@lirtosiast more like 100000 times per second, but pretty much.
it's used by TPT for some important stuff in the core particle loop, so it runs once per particle.
s/once/a few times/
Well, i guess compilers are magic. Changing it to output a char like it should makes it's asm footprint smaller
7:59 PM
I'm not surprised
Also, what's with the return type declaration? unsigned Simulation::direction_to_map(float dx, float dy, int t)
Just unsigned by itself?
comparisons to zero, bitshifting and oring are some of the most basic operations so i dont expect it to be able to be more optimized
also is int t used in the function?
@DJMcMayhem it's old C code that was clumsily ported to C++. It's assuming implict int
@betseg It's not. Due for cleanup :P
TPT in general needs a lot of refactoring
8:41 PM
Factorio had a similar problem. They were moving millions of items each tick. They refactored it so groups of items are moved with a single operation. I don't know the internal workings of TPT, but some sort of dynamic grouping may help to make it faster
it makes your code more complicated, but if you're really going for efficiency, you are going to have complicated code
Factorio is a real testament to good optimization
@NathanMerrill A painful truth right there
@Skidsdev And really really good devs.
@DJMcMayhem agreed
No microtransactions, single price set in stone, tooooons of free updates to a fairly old game and a lot of transparency.
Not to mention the almost 300 weeks of FFF without missing a single one
8:44 PM
@DJMcMayhem Except for the one time they changed the price :P
@Mego Well yes :P
8:55 PM
A: Sandbox for Proposed Challenges

BMORotation invariant fingerprinting Tags: code-golf, array-manipulation, hashing, polyomino Related: Which tetromino is this? Imagine we have some polyomino and would like to uniquely identify them, however the polyominos can be rotated, so blindly hashing them won't give us the same fingerpri...

9:05 PM
The Friday Factorio Facts that discussed sales has a neat graph where basically massive price spike during the grace-period before the price-bump but before and after was relatively consistent
Friday Factorio Facts is just a good read in general. Many neato things
Plot Twist: They only upped the price because they knew announcing they were going to do so would cause a spike in sales
It looks at first glance as if there has been a spike in activity.
@Skidsdev Madre de dios...
@Veskah Spanish, right?
Am i? No. Is that, yes
9:11 PM
(I would never try to pin a language like Spanish on location, too widespread.)
I speak American
Darn right, pardner, and what a hootin'-tootin' language it is!
I speak New Canastralian
I speak english, but all of my colleagues speak canadian. Working would be so much easier if we all spoke the same language
9:21 PM
I heard that canadian is similar to english, because they are in the same royal dialect
> remarkable for its suspicion of poets. link
@AdmBorkBork That's. Uh. Fascinating.
I mean the combination of nationalities is correct at least with the exception of Britain.
> Left-Leaning College State
"Political Freedom: Some" is perfectly in-line with the UK, and probably Australia, but Canada's actually pretty good with political freedom, I'd put it under "good" or "strong" (Definitely not "Superb" though) for canada
2 hours later…
11:14 PM
Guys, I "earned" my first hat: earning a silver badge by posting "reeeeeeeeeeeeeeeeeeeeee" in chat
I downvote that
If you want that to work here, it better be a pretty sweet regex
Just wondering: is there an official terminology for what I've temporarily called corner-cells and side-cells (in this post) on a hexagon grid / spiral?
11:33 PM
@Arnauld "Order-1" and "Order-2" in respect to edges connected to the previous layer (subgraph?)
while versus do...while
user image
@LuisMendo Excellent :D
@Οurous That sounds good. It might introduce some kind of confusion with the number of neighbors at the time the cell is added (which is a different thing). But I think I'll go with that anyway. Thanks!
I'm evil... I have a friend that likes answering riddles, but isn't extremely mathematically or programming inclined. He always asks me for riddles (along the lines of Labrynth/knights and knaves, or Josephus problem). I just gave him The Goldbach Conjecture as a "riddle" 🤣
@DJMcMayhem Isn't that how one of the Millennium problems got solved?
Oh, idk.
11:41 PM
@Veskah only one Millennium problem has been solved (Poincare I think?)
Coming up next week: The Collatz Conjecture, followed closely by Fermat's last theorem.
@lirtosiast Correct
Maybe not one of them, but I know a one of the long lasting conjectures was accidentally solved as a homework assignment
It is some pop culture thing that a professor gives an unsolved problem and someone solves it
Idk if it's true or whether it was long lasting
Thought it was substantiated but let me reach into my bag of proof
Nope, only nil in there
@LuisMendo Did you mock it up yourself? (I can only find the original picture without the speech bubbles.)
11:44 PM
@DJMcMayhem The fun will not last much if they know how to google it :-)
@Arnauld I saw it on Twitter
@LuisMendo Googling math problems is a nontrivial skill
Ah ok. I guess I can just re-post it without any credits, then.
@lirtosiast If you can trust snopes, snopes.com/fact-check/the-unsolvable-math-problem
@Arnauld Like I did :-D Here is the link
11:48 PM
@lirtosiast Truth
@LuisMendo of course I described it to him, I didn't give him the name
Aw, that's evil!
@lirtosiast Good will hunting?
Or wait, I remember what you're talking about, it was some well known mathematician. But I don't remember who.
Click the snopes link, t'was George Dantzig
CMC: do AoC day 13 in Mornington Crescent
Yup, George B Dantzig. IIRC his story was part or all of the inspiration for Will Hunting doing the same sort of randomly-solved-unsolved-math-problem thing in the movie.
11:51 PM
GWH tweaked it by having problems on a blackboard outside of the class and Matt Damon solved 'em while doing his janitorial rounds
also congrats @Doorknob for being first for d13 on aoc

« first day (2875 days earlier)      last day (311 days later) »