« first day (2276 days earlier)      last day (2567 days later) » 
00:00 - 16:0016:00 - 00:00

4:05 PM
> I'm still [on hold!] [on hold]
 
@Riker Unlike our usual rules, feel free to use a language (or language version) even if it's newer than this challenge. If anyone wants to abuse this by creating a language where the empty program performs a primality test, then congrats for paving the way for a very boring answer.Dennis ♦ 1 min ago
Wait, you're Wheat Wizard?
 
4:26 PM
People should at least give some clue when they change their name...
 
@Dennis Let's make an effort to keep something called "reading the rules of a challenge before commenting on others' answers" up.
 
@Dennis that's good. I am
 
Do you think this is a dupe: code-golf - given a string, copy the input to the clipboard?
 
Not that I know of, but closely related to this
83
Q: I copied my password to the clipboard! Can you delete it?

Luis MendoFollowing the best security practices, I keep a plain text file with my passwords on my hard drive. In fact, I just copied and pasted one of them to access my PPCG account. In a lucid moment, I decide that the password should better not remain in the clipboard after its use. Since this happens t...

 
A search for clipboard is:q closed:0 doesn't give any results that might be dupes.
 
4:33 PM
Great! Maybe I'll post it in the sandbox in about a week :))
 
Or post a rough outline in the sandbox now and look at the comments after a week...
 
However @LuisMendo it is too closely related... No it's not a good idea
 
I agree. Maybe add some variation to make if more different
 
@EriktheOutgolfer To be fair, overriding standard loopholes is quite rare.
 
@LuisMendo maybe something related to restricted source or sth else
 
4:36 PM
Or just paste from clipboard instead of copy into it
 
@CartManagerXD :(( I used to like that profile pic. That was pure Brain-Flak
 
That profile pic is still on GH AFAIK :))
 
@EriktheOutgolfer yeah, found it on Information Security
 
Is there any way to retract a delete vote?
 
I don't think so.
 
4:39 PM
I doubt so
Well, that's a good idea for a on meta.SE
 
@Dennis Well, I'm used to reading the challenge rules closely paying attention before voting to delete, commenting on, downvoting answers based on a false premise. Am I unique as a non-robo-*-voter?
 
Everyone makes mistakes, no matter how closely they pay attention. Errare humanum est.
 
Someone likes Latin @Dennis
 
@Dennis OFC, but what I meant is that I think I might have a different method of voting. Also, I think I'm less going-with-the-crowd than others (although I'm not bragging anything here).
 
@EriktheOutgolfer No, you're not the only one.
 
4:44 PM
Also, Latin quotes may make you sound more sophisticated than intended.
 
So are we disregarding that loophole for all answers? or just answers on that particular question.
 
That particular question, because the rules override it.
 
Is that because it is a catalog?
 
Usually catalogs override that particular loophole, although I'm not sure if it's the same for all catalogs.
I think there's no consensus on that, so if this is the case, then no, overriding must be explicit.
 
Man our loopholes really suck. They are all antiquated and a good deal of them are useless and some of them are even directly harmful.
 
4:53 PM
Well, if you believe that overriding a loophole in a specific case should be implied, make a meta post. Just be sure to be clear (I can't find a dupe). :)
 
5:03 PM
CMC: determine if N has exactly one prime factor. N will always be a positive integer
Truthy: 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19
 
Does anyone know how the review all time stats are ordered? I have been trying to figure it out for a while but it remains illusive.
 
Falsy: 1, 6, 10, 12, 14, 15, 18, 20
 
@DJMcMayhem Pyth, 2 bytes: P_.
!!SuperPrime, 0 bytes: .
@DJMcMayhem VTC: Dupe: Is this number a prime?
 
Its not a dupe
16 is not prime but its only prime factor is 2
 
5:07 PM
It has 4 prime factors: 2 2 2 2.
 
.... Are you just being overly pedantic for the fun of it? It has one unique prime factor
 
It should instead say if it has exactly one unique prime factor.
 
No it only has one prime factor
 
Well, prime factor can be defined as many things. Fixing CMC:
 
0
A: Sandbox for Proposed Challenges

SoyoucanreplytomeincommentsMay the 4th be with you! code-golfkolmogorov-complexityascii-art Note: This is a Star Wars Day challenge and, if posted, will only be posted on May 4th Happy Star Wars Day everyone! And because this is a code-golf site, we must tell the story of the incredible resistance of Martin Ender. The st...

 
5:09 PM
CMC: determine if N has exactly one unique prime factor. N will always be a positive integer
Jelly, 2 bytes: Æv.
 
I don't think the word unique adds anything
 
It's not recommended to answer your own challenges outright ;-)
 
It's not my own challenge, it's DJMcMayhem's challenge clarified.
 
@CartManagerXD 25 has the factor 5 present twice
 
but it only has one prime factor
 
5:12 PM
It has two. 5 and 5.
 
No you've counted 5 twice
 
So the challenge was unclear and I clarified it.
 
@JanDvorak In octave, factor(25) gives 5 5
 
I'm my opinion the challenge was perfectly clear to begin with
 
The fact that there's a dispute means that the challenge was unclear.
 
5:14 PM
Yeah - then you started refactoring it
 
the set of all prime factors of 25 has only one element thus it only has one prime factor
 
The challenge is clear. CartManager's proposed version is less clear.
@CartManagerXD it's a multiset, not a set.
 
That seems like a completely unjustified leap
 
It's not a leap. It's a possible interpretation of your proposed version of the challenge, and quite justified IMO.
 
We are all clear on what the challenge wants and this is turning into an argument. I'd rather not go on.
 
5:19 PM
@DJMcMayhem Octave, 36 bytes: @(x)x>1&length(unique(factor(x)))==1
 
@JanDvorak No, Erik did
 
@KritixiLithos Can save 1 byte by using <2 instead of ==1
 
5:39 PM
Is there a word that means negative of a prime? I know that negative integers aren't prime or composite by definition, but I'm curious if there's a negative equivalent for primality
Even better, is there a word that defines the set of all primes and their negatives? Like {2, -2, 3, -3, 5, ...}
 
Looks like a good question for ELU.SE.
 
You could try "prime integers".
more verbosely, "prime elements of the ring of integers"
 
Except that primes are positive integers by definition, so specifying integer doesn't help a lot
Maybe there just isn't a word
 
"positive or negative primes"?
in the end you'll probably have to explain
 
I don't think that helps either, there are no negative primes. Maybe you mean "primes or their negatives".
 
5:48 PM
Yeah
@EriktheOutgolfer That's exactly what I said
 
positive or negative prime integers. Clear and pedant-friendly
 
Numbers with an prime absolute value
 
too contrived
 
too ungolfed
 
we need more golfing challenges for English
 
5:50 PM
{n:|n|in P}
 
Is that a fork bomb or something?
 
No its set builder notation
It reads the set of all n such that n is an element of the set of all primes
 
Unfortunately that's not a word.
I think the shortest possible unambiguous phrase would be "primes' negatives".
 
I don't think that is very unambiguous
That seems to imply {-2,-3,-5,-7,-11,...}
 
Yeah, that's what it should imply, although a more unambiguous phrase would be "prime ns' negatives".
 
5:54 PM
Isn't the set we are trying to get {2, -2, 3, -3, 5, ...}?
 
That's the second set we're trying to get. We're trying to get both I think.
For the other one, "ns that have prime abs-es" is one.
 
too contrived, though
I mean, clumsy
 
Oh, I found another one (although even more contrived): "ns having prime abs-es".
 
flatMap(n->[-n,n])primes
 
What language is this in?
 
6:01 PM
That's not much different than what cart manager said
 
primes>>=n->[-n,n]
 
In what language a>>=b is a shortcut for flatMap(b)a?
 
I'm guessing Ruby
 
>>= is monadic composition, and lists are monads
 
@MartinEnder @Dennis I have a question in the sandbox that DJMcMayhem recommended that I check with you if it's ok. Can you check it out? Thanks.
 
6:04 PM
0
Q: 4 to 1 multiplexor on logic layer in logisim

user68456I want to substitute a 4 to 1 multiplexor in logisim which should consist only out of logic gates. I already have the substitution but something does not work with the connection. I got a single wire which comes from the controller and which is a 2-bit wide bus. But when I want to "re-split" it ...

 
^ That is not a question for SO and I don't know why people are VTCing it as such
 
I haven't. Of course it isn't for SO.
 
Most of the general programming questions aren't good for SO.
 
That is not a general programming question
 
true
but just adding objective winning criteria won't save it either
 
6:13 PM
I think with some explanation and an objective winning criterion it would be fine to be reopened
 
I think it's discouraged for non-OP to add a winning criterion.
 
However the OP is probably just looking for help and doesn't want to make a PPCG question
 
Indeed
 
6:25 PM
Question: can I golf something like: a >= 1 ? 1 : 0 with only min/max functions?
 
a is an integer?
 
yes
 
In that case max(0,min(a,1))
If a is a positive integer it is just min(1,a)
 
@CartManagerXD oh, yeah duh >_> I was using max, not sure what I was thinking
D: same byte counts
 
... unless you use a different language
 
6:32 PM
Yeah, in Jelly that is «1»0 as an indexed link or «1$0»$$ as an inline link.
 
@Downgoat Sign?
Unless it might be negative. :shrug:
 
If it's negative then it can be shortened to 0.
 
It's 0⌈1∘⌊ in Dyalog APL as a train (or a fork, I'm not sure what it's exactly called)
 
@DJMcMayhem presumably not necessarily an integer
 
10 mins ago, by Downgoat
yes
 
6:41 PM
CMC: Similar to @Downgoat 's question make a function only out of min, max and number literals that performs ` a >= 1 ? 1 : 0 ` for the reals.
 
@CartManagerXD Dyalog APL, 5 bytes: 0⌈1∘⌊
 
-3
Q: Hello... eh, who?

Mega ManIntroduction You started to write a "Hello, World!" program, but after you wrote the part to print the hello, you forgot what your program should actually print. So now, you somehow managed it to write a program which can check if the entered word is what you search. The task Your task is to w...

 
Dyadic is max while dyadic is min
 
@KritixiLithos Its not a
I also don't think this works
 
Why? It calculates min(1,right_arg) first, then does max(0,the_result)
 
6:45 PM
That won't work for .5
 
ah, real numbers
 
It is impossible
 
Again, using Jelly, an inline link would be <1$Ṇ$ while an indexed link would be <1Ṇ.
 
@CartManagerXD So no ==, subtraction, etc.?
 
7:02 PM
@Dennis Yeah that was the intention. However it is impossible
A possibly possible version permits adding real numbers to things. e.g. min(a,0)+1 is allowed but min(a,0)+max(a,6) or max(a,9)+a are still disallowed
^ +1 imaginary points to anyone that can solve or prove impossible the above challenge
 
Finally!
 
0
Q: adder in logisim on logic layer only with 2-input-nand gates

user68458I want to build an adder in logisim only with 2-input-NAND gates. The adder consists of 2 inputs (1 x constant 1 and 1 x arbitrary number) and an output. The first thing which came into my mind is a 8-bit full adder but maybe there is an easier solution for this (because of the constant 1). Has...

 
min(n), max(n), n+ are all non-expanding maps on reals using their usual metric. Composition of non-expanding maps is a non-expanding map. The desired function is an expanding map.
You can also replace "non-expanding" with "continuous"
QED, twice.
the continuity argument also applies if you use two-argument min, max and addition
even if you also allow subtraction, multiplication and all sorts of other continuous functions.
 
7:21 PM
+1 imaginary points
 
7:33 PM
Please help defend the new PCG logo on pixelcanvas.io/@-44,35
 
I've fixed the C
 
user165474
Yay I have a power of 5 reputation :D
 
what 10 second limit? this is amazing
 
user165474
Someone's interfering with the background :(
 
do we have a template for the P?
 
7:37 PM
Its in the top corner of your browser isn't it?
 
@Riker It gets smaller as you get closer to 0,0
@Riker Should be this:
 
?
 
user165474
P is corrected
 
ah I see
 
7:38 PM
Also apparently they don't block Tor IP's ;)
 
I've noticed
:D
 
user165474
It won't let me place white tiles where they belong, but I can place them in the wrong spots if I want >_>
 
Hey could I get some feedback/testcases for this challenge:
3
A: Sandbox for Proposed Challenges

CartManager XDThe Image of the Dragon I saw a cool gif of the dragon curve made from a square, and thought what if we started from another base image. So I wrote a program to do this.                                         It's so cool that I thought it would be fun to do it as a challenge. Task You wil...

 
@HyperNeutrino Try refreshing, it doesn't let you overwrite a tile with one of the same color
 
user165474
Oh okay. Yeah, it started working again after refreshing; I think I had an old version (as in it may not have been updating on time)
 
7:41 PM
that happens if you try to use both FF/chrome or similar
 
user165474
I see. I'm only using Chrome right now (well actually I left the page to go work on schoolwork like I should... xD)
 
I think at one time I had 12 instances of Tor Browser going, 4 per screen
 
user165474
>_>
 
user165474
I have 3 activities with 4 desktops each
 
user165474
I could make a lot more of each and get about 100 different thingythings
 
user165474
7:42 PM
Whatever they're called
 
user165474
Right, desktops.
 
7:56 PM
Ok I'm going to post my challenge now if no one has any objections
 
go for it
 
0
Q: Hexagonal Triangles!

Comrade SparklePonyYour task: make a hexagonal triangle with side length n, where n is a positive whole number or 0. First, let me define a hexagon: / \ | | \ / (Amazing ASCII art, right?) Hexagons can be linked together by sharing sides: / \ / \ | | | \ / \ / / \ | | / \ / | | \ / A...

 
Hey there!
 
o/
 
I just made a new sandbox post about Google autocomplete results.
0
A: Sandbox for Proposed Challenges

ckjbgamesGoogle Autocomplete Fun code-golfinternetstring Your task is to create a program which, given an input string, will output the first Google autocomplete result for that search. The format of input/output is up to you. Rules Your program must take 1 input, a string, and output the top Goog...

 
8:10 PM
looks good to me
 
._. why is libgit2 docs saying to link dylib for "static library instructions"
that is like oxymoron
 
lol
 
@Riker Anything I could improve?
 
still thinking
 
@Riker k
 
8:15 PM
I'd recommend requiring them to check with you regarding which URL to use
otherwise that seems prone to abuse
"my short url is better, it's shorter and thus better"
 
@Riker I did state that URL shorteners weren't allowed.
 
url shortener != shorter url
 
But, I will add the whole bit about explicitly using 1 URL.
@Riker yeah
@Riker Thanks for clarifying!
 
np
 
gosh darned autocorrect always getting in my way
 
8:22 PM
@ComradeSparklePony Hello
 
4
Q: The Image of the Dragon

CartManager XDI saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.                                         It's so cool that I thought it would be fun to do it as a challenge. Task You will take...

0
Q: Double Me A Quine

SoyoucanreplytomeincommentsYou are to make a program that will output its source code twice in a row with no delimiter. The only catch is that the output must also do the same thing and so on. For example, this problem is easily solved in HQ9+ with the following program: QQ QQ will output QQQQ which itself will output QQ...

 
oh no, xcode is trying to compile every file including stuff in .git folder >_>
oh no what have I done
 
8:39 PM
Does anyone else like spicy food?
 
yep
 
I am talking like Reaper hot
DO you ever feel like people just don't understand how great spicy foods are?
 
8:58 PM
@Christopher For me still a lot of things are too hot, but I do still enjoy spicier things than most people I know.
 
@flawr I have gone into the deep end. Flashbang hot sauce. Hottest in the world (afaik iirc). Nothing but hotsauce and a chip.
It was hot. And I didn't take milk or anything. 10/10 would do again
 
alias yolo='git commit -am "DEAL WITH IT" && git push -f origin master'
 
Yay, just finished running some graphics benchmarks, my computer didn't crash with VIDEO_SCHEDULER_INTERNAL_ERROR for the first time in like ~6 months! I can play games now!
 
Nice job!
 
9:12 PM
Thanks AMD for new drivers!
 
1
Q: Google Autocomplete Fun

ckjbgamesYour task is to create a program which, given an input string, will output the first Google autocomplete result for that search. The format of input/output is up to you. Rules Your program must take 1 input, a string, and output the top Google autocomplete/auto-fill suggestions result. The f...

 
9:44 PM
2
Q: Tips for golfing in SOGL

Jonathan AllanDo you have any code-golf tips for writing in SOGL, a golfing language created by dzaima? Your tips should be at least somewhat specific to SOGL. Please post one tip per answer.

 
@DJMcMayhem was your computer hacked O_o
 
What is unclear about this challenge? I would like to make it clear
9
Q: The Image of the Dragon

CartManager XDI saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.                                         It's so cool that I thought it would be fun to do it as a challenge. Task You will take...

 
@Downgoat XD nope definitely not, that's all intentional
 
@Pavel at least do -fu instead of -f
 
What does -u do?
 
9:57 PM
@Pavel sets default upstream
kk, apparently Xcode doesn't actually have entire C standard library ._.
Question: Clang doesn't seem to be have uint64_t, is there some flag I need to add?
 
Why are you using Clang and not GCC?
 
@Pavel build should work on all compilers or else something is wrong
 
Well, I looked it up on SO, the answer was to use GCC instead.
 
10:25 PM
0
A: Sandbox for Proposed Challenges

Comrade SparklePonyTest if a string can be made with substrings! Given a string and a list, say if the string can be made with items from the list. That is the golfed version of the question, here is the full: Given a string s and an array/list l, determine whether or not s can be made with parts from l. For ...

 
10:36 PM
@Downgoat uint64_t should be in stdint.h or inttypes.h. For C++ it's cstdint. If all else fails, try <sys/types.h>
 
@mınxomaτ actually it was that in the include/ dir there was a stdint.h already which wasn't exactly properly working so yeah :P
yay, now macros aren't working :/
though I'm not sure why it would be looking at include/stdint.h when it was #include <stdint.h> :/
 
10:53 PM
Question: if a header is not found, does/should Clang throw an error?
 
If the header isn't found, and clang doesn't error, how do you even know what header you are talking about?
 
I mean there is only one header in file
TIL Clang with C89 is not actually C89
 
11:19 PM
@Downgoat because headers are normally in /usr/bin/include maybe?
 
@ASCII-only no I mean in the user search path
:D only 11 errors now
#	define MIN(x,y) (((x) < (y) ? (x) : (y)))
Is there any reason to have to parens instead of just 1
 
73
Q: When do extra parentheses have an effect, other than on operator precedence?

TemplateRexParentheses in C++ are used in many places: e.g. in function calls and grouping expressions to override operator precedence. Apart from illegal extra parentheses (such as around function call argument lists), a general -but not absolute- rule of C++ is that extra parentheses never hurt: 5.1 Prim...

 
10/10 quality avatar
 
aww yiss, down to 7 errors
Question: does anyone know what: "Unsupported: typedef changes linkage of anonymous type, but linkage was already computed" means in english
 
11:34 PM
"I hate you"?
 
You know you're screwed when you google error messages and the mailing lists come up >_>
 
11:46 PM
:O I think this is compiler bug
 
Nice
 
@Downgoat does that mean I was right?
 
yes
 
1
Q: Google Autocomplete Fun

ckjbgamesYour task is to create a program which, given an input string, will output the first Google autocomplete result for that search. The format of input/output is up to you. Rules Your program must take 1 input, a string, and output the top Google autocomplete/auto-fill suggestions result. The f...

Hello
 
00:00 - 16:0016:00 - 00:00

« first day (2276 days earlier)      last day (2567 days later) »