« first day (2031 days earlier)      last day (2803 days later) » 

7:00 PM
Anyone here know how to use the python c api to turn a c struct into a python memoryview?
 
@Sherlock9 which?
 
Your second sequence (so that the sum is divisible by the length)
 
I'm like the only one on the PPCG minecraft server recently. Built an awsome base though...
 
this look ready to post?:
5
A: Sandbox for Proposed Challenges

DowngoatDividing Strings Division with numbers is great: 6 / 3 = 2, but have you ever wanted to divide strings? In this challenge you will, given two strings (s and t) divide s by t Challenge Given a string, s, find the substring in which t is repeated the most times (non-overlapping), return the amou...

 
@BaldBantha Oh dang. I should visit the server soon
 
7:07 PM
0
Q: Smallest positive number whose y-th power is divisible by x

Leaky NunTask Given positive integers x and y, find the smallest positive number whose y-th power is divisible by x. Example Given x=96 and y=2, the output should be 24 since 24 is the smallest positive n satisfying n^2 is divisible by 96. Testcases x y output 26 2 26 96 2 24 32 3 8 64 9 2 27 3 3 ...

 
That's fast
@Sherlock9 Could you do me a favour by writing my explanation? Your style is much better
 
Sure :D
On the triangle question, right?
 
Yes
@Sherlock9 Are you still writing? Because I golfed one byte
(by revolutionizing the approach)
Sorry for wasting your effort
 
Yeah, I'm still writing
Nah
I'm happy to work on the revised version
 
Thanks, submitted revised version
Thank you.
 
7:20 PM
You're welcome o7
 
7:30 PM
> powdiv.c:1:28: error: invalid operands to binary % (have ‘double’ and ‘int’)
i;f(x,y){i=0;while(pow(i,y)%x)i++;return i;}
~~~~~~~~^
wat
pow() returns double?!
 
double pow(double x, double y)
Not only does it return double, but also takes double
 
i can use man thx
 
> typeof NaN
< "number"
I thoguht NaN was specificaly not a number
2
 
c doesnt have this problem
 
I mean it explicitly says "Not a Number", in fact what else is it
 
7:36 PM
bcoz c doesnt have typeof xD
 
so much wat
@ReleasingHeliumNuclei sizeof(NaN) == sizeof(int)
 
@Downgoat no NaN neither
 
@Downgoat Look, all numbers are floats which occupy the same amount of spaces
 
@ReleasingHeliumNuclei #include <math.h>
 
and NaN is a number in the sense that it is stored in floating point
 
7:42 PM
i3 bindsyms dont work with numlock
vim borks without numlock
halp
 
@Downgoat NaNs are usually represented internally as a floating point number with a special byte sequence. But I agree, JavaScript shouldn't have its type as "number".
Hmm, well, Python has it as type float:
>>> type(float('nan'))
<class 'float'>
>>> import numpy
>>> numpy.nan
nan
>>> type(numpy.nan)
<class 'float'>
 
@LeakyNun What do you mean by the second one being wrong?
 
Yeah, it's just a special IEEE float. Same thing with positive and negative infinity
 
@Sherlock9 try 32 3
The fix would require one more byte
 
@El'endiaStarman JavaScript typeof is just generally messed up. typeof [1,2,3] is "object".
new String("foo") === "foo" === false
 
7:49 PM
@Downgoat JS only has three types, right? Integer, string, object.
 
by spec no, but by implementation yes. typeof only returns number, String or Object. JavaScript has no understanding of "type"
 
I was trying to recreate @Sp3000's trick of erroring out with ><> on Helka's printable ASCII challenge, and accidentally made an infinite "moo" printer (with a few side effects). :P
 
@LeakyNun If x = 1 is valid input it should probably be a test case
Ditto y = 1
 
@LeakyNun You post Approach 3 just as I finish typing up the explanations for Approaches 0 and 2
Excellent timing :D
Might as well get Approach 2 in there as well
 
I'm the master of timing.
 
> A homeless IT consultant
That's the weird part right?
 
Yeah, I had to read that twice...
 
Does anyone here know how I can open an image in python, and apply a function to every pixel? E.g. I want to apply the function convert(r,g,b): ... return (new_r,new_g,new_b) to every pixel of the image.
 
@Mego How exactly do the scopes of functions in Actually work? For n, the global stack is available; for , the global stack is hidden.
 
@GamrCorps Use PIL
Then you can just do Image.open(...).getdata() I think
That should give you a 2D array of the pixels
 
8:20 PM
Goodnight everyone
 
8
Q: Smallest positive number whose y-th power is divisible by x

Leaky NunTask Given integers x and y which are both at least 2, find the smallest positive number whose y-th power is divisible by x. Example Given x=96 and y=2, the output should be 24 since 24 is the smallest positive n satisfying n^2 is divisible by 96. Testcases x y output 26 2 26 96 2 24 32 3 4...

Saltvote?
 
</shameless self advertising>
(I didnt downvote)
+1
 
@LeakyNun Not my downvote, but the challenge is a bit unclear atm. You don't specify what values x and y can take (positive, non-negative, both, only integers greater than 1, etc.), and you don't provide a definition of divisibility (not really necessary if only positive integers have to be supported).
 
> Given integers x and y which are both at least 2
 
Oh, that was added after I read the spec...
 
8:34 PM
@Dennis It was "positive integer"
 
OK, but 1 was still a potential edge case. The downvote was cast before the edit.
 
That is true.
 
Somebody must have been disappointed that it's not an alphabet pattern.
 
@Downgoat I thought it was a great grand number
 
o_O we don't have an tag
imo id be useful
 
8:46 PM
@Downgoat I was actually just thinking about that earlier today. I think it suffers from the same issue as an tag though: it's a meta-tag, which are discouraged.
Most alphabet challenges can be done with any sequence of characters.
 
i dont think its really a meta-tag. the sequence doesn't have to do with OEIS at all but alphabet questions have to do with alphabet
@El'endiaStarman ok that is true but usually they are designed for 26 chars
 
Another thing to consider: we didn't need an tag for five years.
 
It also gives the impression that creating a ton of alphabet challenges is encouraged. I liked most of them, but the latest one is at +13/-6.
 
i dont see why alphabet chalenges are bad. we have a sequence challenge almost every day but that's not a problem :/
@El'endiaStarman are you saying we dont need any new tags .__.
 
@Downgoat It's probably that they're all variations on a theme. Sequences often require wildly different algorithms.
 
8:52 PM
@Downgoat they get boring, and are quite often very low effort
 
@Downgoat More like, we've surely had challenges that involved the alphabet in the past, no? We only thought of it because we recently had a lot of alphabet challenges.
 
@El'endiaStarman only thing the same with alphabet challenges is that the outputted chars about A-Z, hardly the same algorithm.
 
I don't have a problem with alphabet challenges, but I can't imagine anyone following the tag, since it doesn't tell you anything about the challenge
 
@Downgoat There's a constant amount of code you need to generate the alphabet, which can be non-trivial in some languages. Doing that once for every challenge gets repetetive.
 
Beyond , I don't see a use for listing which particular characters a challenge uses in a tag.
 
8:54 PM
In a sense, alphabet challenges are all slightly chameleon challenges - they're really layout challenges.
 
So far...
 
Oooh, maybe that could be a tag - or something like that.
 
Does cover it?
 
That would make a lot more sense than .
 
My last challenge was denounced as an alphabet challenge by some, but wasn't about layout but about probability
I think there can be a broader range of alphabet themed challenges, which makes a tag even less meaningful
 
8:56 PM
@trichoplax Sort of. ASCII art usually has a more complex shape and less related characters.
We definitely don't need a tag for themes, no.
 
@Dennis perhaps it could just use two tags, like
3
 
@trichoplax Yeah, that's true. Especially since letters can essentially be thought of as integers up to 26
 
A page of comments before I got a star. Tough crowd.
 
> Using this tag comes with free downvotes.
 
Oh hey, we have . What about adding ?
 
9:00 PM
> Adverbs aren't bad in small quantities, but consider revising your document if more than 5.5% of its words are adverbs.
Adverbs: 38 (8.17%)
;_;
 
I don't have any problem with alphabet challenges, but the sheer amount of them and the "HNQ-bait" are both kind of obnoxious.
2
 
lel
 
@Downgoat I see zero adverbs there
 
> A word should not be used to start more than one sentence in a single paragraph.
Reuses starting word 6 times in one paragraph ;_;
i am shit at writing ;_;
 
@Downgoat Who's giving you these strange rules? Are you illuminating manuscripts for a medieval monastery?
 
9:02 PM
@trichoplax slickwrite.com
 
While we're on the subject of alphabet challenges and tagging, do you think it's appropriate to have on challenges that don't have constant output?
 
grammar checking essay
@DJMcMayhem imo mostly no.
 
@DJMcMayhem Good point. Although that would narrow the tag even more, it would make it more accurate
 
@Downgoat I'm not sure I was ever explicitly taught this rule, but it's definitely one I've mostly followed for many years now. I think mostly because it seems weird somehow. Repetitive.
 
Why not? (Not that I disagree, I just want to hear thoughts)
 
9:03 PM
@DJMcMayhem if compression would be effective on the output then it's probably OK to be tagged kolorogooromomoremvov-complexity
otherwise no imo
 
Maybe we need a meta post leading to a rewrite of the tag wiki
 
@Downgoat I have seen the tag pop up for anything which has fairly large output which can follow a distinct pattern which can be exploited for golfing opportunity. That is why I added the tag to @DJMcMayhem IH fractal question. However if that does not seem t o be a reasonable use of the tag, than I apologize.
 
@Downgoat I wouldn't take a site that uses the phrase "stylistic mistakes" too seriously unless you're writing on contract for an organisation that has a specified style guide. Otherwise calling them "mistakes" seems to misunderstand the meaning of "style".
 
@trichoplax it was actually because I'm on essay mode but I'm practically writing fiction
 
@RohanJhunjhunwala I don't think that was a bad idea. I actually re added the tag after it was removed. I'm just wondering if we should revise the usage of the KC tag
 
9:07 PM
@RohanJhunjhunwala It's commonly used for challenges which take an input and give different output based on that. So you've followed the existing usage, it just seems that should be corrected
ninjad
 
Should I make a meta?
 
@DJMcMayhem sure
 
I'll upvote upgoat
 
If in doubt, make a meta
@RohanJhunjhunwala ---in chat---
 
9:08 PM
OK, I'm in mobile, so gimme a minute
 
Or ask on meta if you should ask on meta.
4
 
@Dennis that's 2meta4me
 
relevant xkcd

https://xkcd.com/1447/
 
@Dennis My brain doesn't have tail call elimination. This is going to be in my head for days
 
Maybe a sandbox for proposed discussions.
 
9:09 PM
for those that wish not to click through the link
 
@RohanJhunjhunwala kolmogorov complexity is for questions where you need to generate a string in shortest code. In this the challenge to the IH question there was no string that you really needed to generate. If you look at all the answers there is no string that needs to be generated.
 
@RohanJhunjhunwala I would have gone for this one:
 
@Dennis That's why we need meta.meta.stackexchange.com
 
@RohanJhunjhunwala If you just paste the link as a separate message it will onebox
 
9:10 PM
@Downgoat that is why I was hesitant to tag it and left a comment for the OP and the community as a whole to decide. The IH fractal pattern is (arguably) a string that gets printed to stdout
 
@DJMcMayhem I was going to post that one
But I think the first one also works
All of them are great xD
 
@DJMcMayhem Obligatory @NewMetaPosts.
Aug 3 at 22:50, by New Meta Posts
I'M SO META EVEN THIS ACRONYM
 
Teehee
 
9:15 PM
I would love to be a mod somewhere even if it was just purely for the ability to eleven the newposts bot.
 
@DJMcMayhem run for mod on vi/vim :D
 
@DJMcMayhem I can only imagine how long Randall spent making something so meta
 
@Downgoat When If they graduate I probably would (though I highly doubt I'd win since I have almost 0 meta participation)
 
@DJMcMayhem You can write that in your mod nomination post ;)
 
@trichoplax Elect me as your leader, and we can make @newmainposts great again!
 
9:18 PM
@DJMcMayhem solution: find problems with the site to gain more meta participation
start by sabatoging the SE servers to create bugs :P
 
Bugs go on meta.SE not per-site meta
 
i know but you can always make site-specific sabatoge
 
Per site meta rep only accumulates along the imaginary axis, which isn't shown in the rep
 
Anonymous
@LeakyNun It depends on the function. Some commands give functions their own stack (R, M, ), while other commands keep the current stack (n, ).
 
@Mego do you have them documented? What is the rationale behind?
 
Anonymous
9:27 PM
@LeakyNun The commands that give functions their own stack say so (at least, R and M do - I should add that to ). The ones that don't, don't.
 
"give functions their own stack" what does it mean?
 
Anonymous
It means the function is called with a fresh stack frame, rather than the current one
 
Anonymous
For example, R calls the function, using the iterable (2nd argument) as the stack for that function. So [1,2,3]`++`R calls `++`, with a separate stack initialized to [1, 2, 3].
 
Well.
@Mego I was asking you which functions get a fresh stack frame and what is the rationale behind.
And your answer was "those which get a fresh stack frame gets a fresh stack frame"
Whatever, it's 5:37AM now, I'll reply when I wake up.
 
Anonymous
@LeakyNun The docs state which commands cause functions to get a fresh stack frame. The rationale is, those commands have the functions operate over an iterable (or a single integer in the case of D6), rather than the entire stack.
 
9:39 PM
@LeakyNun Holy shit
I tend to stay up late but never that late
 
@LeakyNun o___o
 
I just sort of forget to sleep for the night sometimes.
 
@mınxomaτ i can confirm this i have seen many deers on the road late at night
 
1
Q: Staggered Starts

MegoIn races in which racers go around at least one turn of a curved track, the starting positions for each racer are staggered, so that each racer travels the same distance around the track (otherwise, the racer in the innermost lane would have a huge advantage). Given the lengths of the major and ...

 
@Downgoat stunning
 
9:42 PM
@Downgoat this may come as a shock to you, but I think there are a good chunk of users in here that do not identify as the animal they have on their profile pic
 
@DJMcMayhem :O WAT
 
Anonymous
@DJMcMayhem shhhh
 
Anonymous
Don't reveal my secret :(
 
A Vic20 satire is not an animal
 
@DJMcMayhem WAI WOULD DEY LIE
i thought its not good to impersonate other people/animals on SE
Jul 20 at 10:30, by Mego
I am male penguin
....
 
9:45 PM
@Downgoat I am male, uh-- Eggs?
0_0 that's bizarre
 
i think you mean male iron man
 
Anonymous
@DJMcMayhem Future penguin
 
@Downgoat Now that's just redundant
@Mego I hate to break it to you, but I don't think cooked eggs can become penguin. ;_;
 
Am I the only one bothered by yet another alphabet challenge
the triangle challenge?
 
TIL buying a game on Steam is hard
 
9:47 PM
I'm mildly bothered. But only mildly. It'll die down soon
 
I dont know what to do with them, normally they would be okm challenges but they are excessive
 
@TùxCräftîñg what did you get?
 
trying to buy Scribblenauts: 1st try, the browser crash. 2nd try, the browser crash. 3rd try, OMGYES it works. trying to install it: the internet connection fall to 33kbps
 
yeah that makes sense. It will die down, but It seems a bit silly. They are ok challenges we have just had way too many. I dont want to downvote but It seems like I am obliged to do so
 
New meta posts is being slow right now, so I'm just gonna go ahead and post it:
1
Q: Is Kolmogorov-Complexity only for constant output?

DJMcMayhemWe have lot's of challenges that are about producing constant output. For example: We're no strangers to code golf, you know the rules, and so do I Print a 10 by 10 grid of asterisks Every single one of the "alphabet challenges" we've been recently flooded with These are very clearly kolmogor...

 
Anonymous
9:50 PM
@DJMcMayhem :(
 
@Dennis Is there a way to have Sesos TIO take code in binary format instead of assembly? For this
 
Can't you argue that SESOS binary IS a language ina nd of itself
Just as jvm bytecode is a language SESOS binary is a language
no?
You'll need some tricks to use it, but still it should be valid
 
@DJMcMayhem s/being|right now// fbdwwdt,
 
^
> fbcWwdt
wat
 
is there a name for a type of program such that the program P solves problem X, but all sub-programs P' in P made by removing N characters from P error? Call this relation S(N,P,X). Suppose S(1,"asdf",X)--this means that all of the following programs error: sdf, adf, asf, asd
If not, I propose calling such programs N-fragile
 
9:59 PM
@TùxCräftîñg vim
 
WHY DO YOU ALL THINK KOLMOGOROV IS SO COMPLEX, I ALWAYS THOUGHT THEY WERE NICE
8
 
@NewMetaPosts u r slow
 
@Downgoat nvmd
 
Anonymous
@ConorO'Brien Radiation-softened? :P
 
10:03 PM
@DJMcMayhem what is d in nvmd?
 
nvmd = nevermind delete
 
@Mego first google result is this site >_< anyhow, that's a program P such that removing characters in the same fashion still solves X
 
Anonymous
@ConorO'Brien No, that's radiation-hardened
 
@TùxCräftîñg D:< im not gonna delete my message ;_;
 
@Downgoat fbdWw.. is one shorter
 
10:04 PM
> Make a proper quine where if you remove any character, it's still a quine
 
@DJMcMayhem :/
 
from the radiation softened quine challenge
 
gtg bai
 
0
Q: Enterprise Quality Code Prime SIeve

Rohan JhunjhunwalaEnterprise Quality Code! Summary of this challenge Print (to make it more fair when competing with another language changing the output method could be a trivial way to golf) the first N Prime numbers. Your score will be the sum of the byte counts of all entries which no one has been able to go...

 
@Downgoat bai
 
10:04 PM
@NinjaBearMonkey On TIO, not right now.
 
> SIeve
 
@ConorO'Brien no, you idiot. read the challenge. still not what you're looking for however.
 
@ConorO'Brien reminds me of hamming codes
user image
3
that's all we need to see here
 
what's a verb for "being mad because something wont work"
 
Anonymous
@Downgoat Frustrated?
 
10:09 PM
@Downgoat frustration?
 
gyhurjilvhlalu
 
redundant idignation
 
ninja'd
 
@ConorO'Brien yes thx
 
Anonymous
@Downgoat Republican?
 
10:09 PM
@Mego that's not really funny
 
Anonymous
Eh
 
Anonymous
Too accurate? :P
 
perhaps "too potentially offensive for concerned parties"
 
10:12 PM
gtg playing Scribblenauts
 
Anonymous
If you're offended by a joke about a major part of a political platform, then perhaps you should reevaluate some stuff.
 
The funny thing is, democrats are the ones that are steoreotypicaly easily offended.... but whatever. I thought it was funny, although I don't agree with it.
 
@Mego I'm not offended, I just think it's dumb to insert political jabs into something completely unrelated. I could have said "Democrat" and it wouldn't be any different
 
I am not offended, I just don't think it's the right place or time. If one identifies as a republican (which many do, currently), then said person might take offense.
 
@Mego still there was no need to make an unprovoked jab which some might find offensive.
 
Anonymous
10:15 PM
So 3 hours of dumb Trump talk is fine, but one measly joke about how a major political party looks down on unemployment, and now there's a problem. Makes sense.
 
I don't have the time or patience to respond.
 
gtg bai again
 
Anonymous
And let's not even get into the avocado nonsense
 
I fail to see how that's related
 
Anonymous
@DJMcMayhem People filled the chat up with utter nonsense for hours at a time with no backlash (until the introduction of the chatiquette), but one Republican joke was too far.
 
10:24 PM
@Mego I don't think it was too far. I don't even think it was offensive. I just don't see any reason to bring political jabs into a completely unrelated discussion.
2
 
Anonymous
@DJMcMayhem And I accept that you hold that opinion, even if I do not.
 
10:49 PM
Somehow archlinux as the WSL distro is way more stable and 20% the size of the bloated ubuntu image MS ships. Yet, there is no way to avoid the download of the 1.2GB+ ubuntu crap when activating WSL...
 
There's a hardcoded SHA256 somewhere in the downloader, but I can't find it (in order to patch).
And I don't think most AVs would be happy to see some script patching a system file..
 
0
Q: What exactly can be placed in an answer

Rohan JhunjhunwalaThere seems to be a lot of confusion over this cw post. My intention with posting it as an answer was to allow easier edit access to the scoreboard for competitors to place their scores onto a leaderboard. This makes it easier than having to manually maintain a leaderboard. Also having the leader...

 
1
A: Sandbox for Proposed Challenges

CopperVerify a solution to a generalized river-crossing puzzle code-golf Image credit Marek Bennet Introduction A river-crossing puzzle is a type of logic puzzle in which you have some number of animals, objects, etc. to move across a river, but you only have a boat big enough to hold you and one...

 
@mınxomaτ When are you planning on moving into the testing phase of the ppcgpd?
(Ppcg podcast)
 
10:58 PM
ppcgpd? Is that a golfed systemd clone? :D
Jokes aside, I'm waiting for Maltysen to send their data. Then I need to crunch the timetable to find a slot where the most people are available. Then I need to bother Alex to coordinate his schedule.
 
Yeah, we golf everything around here
 

« first day (2031 days earlier)      last day (2803 days later) »