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

16:00
@Mr.Xcoder nice
Can >Q1 be >1?
To switch to implicit Q at the end?
@Mr.Xcoder see my comment
It actually becomes t.
@LeakyNun That means Pyth ties your Jelly solution :P
@Cowsquack Will you be updating: kritixilithos.github.io/Carrot and the wiki? (I haven't checked yet :P)
@EriktheOutgolfer Checking now, based on what we've said in the comments I think you're fine
16:06
@TheLethalCoder I will once I complete the rewrite. I've got the parser (AST and stuff) and the interpreter remaining now.
@musicman523 okay :)
@EriktheOutgolfer For an input of 1 your code returns 0, should be 3 with one-indexing
If you are talking about the lexer and the changes in syntax
@Cowsquack Righto, let me know if you want me to test anything.
:D Thanks
16:07
@LeakyNun Now I wish y worked for Strings :p
0
A: Sandbox for Proposed Challenges

racer290Title: Professor Propsters' Garden Fence Although I'm fairly new to PPCG, I had this nice idea for a cops-and-robbers game. Although it may take some time to read the suggestion, please take some time to improve the challenge as I have zero experience with this! Thank you. Description: Profess...

@musicman523 jeez I guess I need to append two zeroes
@EriktheOutgolfer that may not work for the inputs that don't have a second zero
@musicman523 no I have already handled that case I only take the 32 least significant bits
okay sounds good
16:12
@musicman523 added another 2 bytes
@EriktheOutgolfer 11 gives 4, should be 5
@musicman523 that's what you get for using bitwise not instead of mapped logical not...fixed at no cost
(darn)
oh yeah I forgot jelly doesn't have native twos complement *facepalm*
16:28
I'm creating a language where the arity of a command depends on the next value (as a number) but I can't think of a name. Does anyone have any suggestions?
Aritana
@cairdcoinheringaahing Desert
@cairdcoinheringaahing I'm not actually sure, but arity made me think of that - I thought it meant something related but a google search brings up nothing, I might have made it up
oh wait I know why, arid
pun on aridity, yeah
@cairdcoinheringaahing I chose "other": Arritybot
@cairdcoinheringaahing Dessert
That's a sweet idea
2 votes although there are 6 active users in the room :(
@cairdcoinheringaahing nullarity
16:37
Or Atrion
@CensoredUsername Tell that to C.
@Dennis Are you talking about rand()?
That only depends on the program's first run?
And its crappy implementations.
glibc uses a lagged Fibonacci generator. Very random...
So instead of helping me narrow down names, I now have 6 different names with votes on them. Great!
@WheatWizard I only saw half the rep from my Taxi answer, although I think that was a break from the norm of HNQ answers that get lots of rep (as in it took a lot of work and wasn't a FGITW)
16:40
1
Q: Triple-balanced numbers!

racer290Description We consider an integer with at least 3 digits triple-balanced if, when split in three parts, the digits in every part sum up to the same number. We split numbers as follows: abcdefghi - Standard case: the number of digits is divisable through 3: abc def ghi abcdefgh - Number % 3 ==...

Huh apparently it is commonly thought that Apple is the one that chooses emojis :P
@Downgoat Unlike Samsung, Apple has uncrappy emojis
They're both pretty awful
@BusinessCat <insert look of disapproval>
16:52
all emoji are awful
😂
@totallyhuman 11 days until the Emoji Movie comes out
chaos shall ensue
@cairdcoinheringaahing I will summon Cthulhu in Desert, then
@Mr.Xcoder NewSandboxPosts: #Summon Cthulhu
@StepHen I consider s the most off-topic things here on PPCG
16:55
@StepHen ... wtf 4 billion years of evolution and what we have to show for that is an Emoji Movie" 🐐🔫
@Mr.Xcoder popcon is the new code-trolling/underhanded
they said as they used emoji :P
@StepHen Unlike pop-cons, I like underhanded challenges (to my shame)
you know what would've made a great underhanded challenge?
rickroll the user
Popcons can be good. What's bad about popcons is people think it means "do X in the most creative way possible"
16:57
@totallyhuman I think that happened
not as an underhanded challenge
@totallyhuman try posting it. This was well received and is recent
well received? it's closed
youll get votes but it's guaranteed to be closed
@cairdcoinheringaahing 8 upvotes ≠ Well received
17:00
it has 7 downvotes
@totallyhuman because it's
New challenges of the type previously posted under this tag are not welcome.
exactly why i won't make one :P
i don't know why I'm defending underhanded; I hate them
2
Q: Is it a turtle prime?

LordFarquaadAs we all know, it's turtles all the way down. But is it primes all the way down too? A number is considered a "turtle-prime" if it satisfies the following conditions: 1) It is prime. 2) It is possible to remove a single digit leaving a prime number. 3) Step 2 can be repeated until left with a ...

17:05
@totallyhuman
> Can we take input as a list of digits?
Are you planning to solve it in Pyth?
no
i don't know pyth
ok
Just asking
I think someone will come up with a good math formula for this‌​, and then all are going to port it.
@BusinessCat they can be but the last (non-closed) popcon with code was over a year ago:
90
Q: Patch the Image

flawrIn a popular image editing software there is a feature, that patches (The term used in image processing is inpainting as @mınxomaτ pointed out.) a selected area of an image, based on the information outside of that patch. And it does a quite good job, considering it is just a program. As a human,...

17:10
@Mr.Xcoder there is another
70
Q: Write a Programming language of Unknown Completeness

Wheat WizardDetermining whether a Language is Turing Complete is very important when designing a language. It is a also a pretty difficult task for a lot of esoteric programming languages to begin with, but lets kick it up a notch. Lets make some programming languages that are so hard to prove Turing Compl...

Actually it's that one ^
3
A: Randomly select a character, plinko-style

Jonathan AllanJelly, 6 bytes Ḋṁ7;ḢX A monadic link taking a list of four characters and returning one with the probability distribution described. Try it online! How? Ḋṁ7;ḢX - Link: list of characters, s e.g. ABCD Ḋ - dequeue s BCD ṁ7 - mould like 7 (implicit range) ...

> your Jelly solution
Was playing Factorio with an enemy AI overlay enabled:
17:10
wait don't you have to just check of each digit is prime?
Oh, (with code), nevermind
@totallyhuman No
239, 9 ain't prime.
Ah, dang it, didn't screenshot properly
Wait, no, found it
17:12
@BusinessCat you missed the "with code" part of my sentence
For that you just need to design a programming language
yesterday, by Cows quack
give it time
emit it evig
Helkas pop-con violates our rules but he's a high rep user
@Cowsquack It updated today, at 17:00 UTC, >20 hours after I changed it
17:14
@LegionMammal978 now that's what I call spaghetti code
@JanDvorak More like spaghetti targeting :P
not ravioli code?
almost makes me hungry
17:21
SOGLs compressor:
262 bytes, original was 603 bytes. 43% of original length
More precisely, Infinity bytes
I was lazy and used javas Math.log(double) for the precisity :p
where the double is ~ 10^(outputLength*log(256))
-1
Q: Chess Championship

KhushalAssuming that the king starts on some square of an infinite chessboard. In the puzzle of chess, the king can move to any neighbouring square horizontally, vertically, or diagonally. In this puzzle, the king takes one move extra after n number of moves. You have to find that in how many different ...

17:39
> It outputs (-inf+nanj) if there isn't the second zero. I guess that makes some sense.
17:52
Yaay, found an alternative solution to my existing Pyth answer on Randomly selecy a character...: O+@Q1t*2
Maybe I can golf this one further
lovely number, isn't it
And it does make sense, since 2**-inf gives 0.
What's a nanj?
j is python's representation of $i$
17:59
Is $i$ Imaginary i?
@Dennis Shouldn't 2^(-inf) (in math) be 1/2^inf?
@Phoenix Yes
and nan is... not a number
@Phoenix nanj means the imaginary part is ill-defined.
not-a-number-imaginary-part...
@Mr.Xcoder Yes, and 1/inf is 0.
18:00
(-inf+nanj) is a terrible number.
Does anyone have more thoughts on this, or do you think it is ready for posting?
Would you agree "Is this string prime" be a dupe of the main Primality Checking challenge?
@Downgoat No
negative infinity plus not a number imaginary units
18:01
I mean unlike wrapper challenge it is exactly the same + boilerplate
@Phoenix why?
the thing is I just need to find the language built ins for .charcode and .every
you can't even golf beyond the primality part
Not every lanuage has a .every
You must convert all the characterts to their ASCII values. You must check if all are prime
@Phoenix so its an 'implement' .every challenge?
I didn't say it's a good challenge.
Just not a duplicate.
@Mr.Xcoder I'm 99% sure 0 answers will implement the conversion. though it would still be a dupe
18:02
cmc: output the ascii ordinal numbers of the input in brainfuck
dupe means you can trivially convert between the callenges
@Downgoat Trivially?
@totallyhuman 1 byte: .
@Downgoat I agree, but not enough to hammer it myself
@Mr.Xcoder you just wrap answer from primality checking challenge in .charCodes.every
18:03
@Downgoat the ordinal numbers :P
If I was posting JS answer that is exactly what I would do
@totallyhuman ok so this is stringify an integer challenge then?
@Downgoat The most trivial part is primality checking.
@Mr.Xcoder That's not true.
no it's the .charCodes.every(...) wrapper than you can apply to primality checking part
hello -> 104 101 108 108 111
18:04
Primality testing and checking if x applies to every character are equally trivial in golflangs, and in every other language, the primality testing is the less trivial part
@Downgoat You say most of the languages have those built-ins, but primality checking does not have a built-in in the languages .charCodes and .every exist??
Sorry, but I disagree. Please hammer-dupe it though, because I want to leave that challenge anyway.
wut
why though?
@totallyhuman I tried to delete it ever since the very first answer was posted, but unfortunately that got an upvote and I personally think it's unfair to the answerer.
again, why?
@totallyhuman Because it's poorly written
I don't like my challenge myself.
18:08
@Mr.Xcoder Then dupe-vote it yourself.
@DJMcMayhem Ok, please hammer it after I do so.
IIRC, OPs can hammer their own questions
@DJMcMayhem Ah, really?
Well, technically not exactly
But community hammers it right after you vote
@DJMcMayhem Done.
Please check if it is closed now.
18:11
@DJMcMayhem huh I thought too but apparently didn't work :|
there it goes.
I had to press a button This solved my problem!
Crappy button ^
@Mr.Xcoder For PPCG, yes. For SE in general, no
@DJMcMayhem For PPCG, of course
It makes no sense on Puzzling and other related sites too.
18:13
0
A: Sandbox for Proposed Challenges

S.G. HarmoniaWrite a code poem programming-puzzle It is said that Larry Wall, creator of Perl, wrote a poem titled "Black Perl" in said language, as shown here. The poem is fully functional (working syntax, no runtime errors, etc. [no errors in general]). The challenge: In any language (practical language...

Gtg, Bye
Here's an example of a very similar, yet IMO more interesting challenge: Given a positive integer N, determine if it's very prime. A number is very prime if it is prime and each digit of its decimal representation is also prime. For example, 17 is very-prime, but 19 is not.
@DJMcMayhem Cheddar: (n,f=Math.isPrime)->f(n)&&n.digits.all(f)
@DJMcMayhem is 1 prime?
Oh, crap.
Apparently I can't math
18:17
CMC: given an array of 0 and 1 (the empty array is in the domain), output whether it is (non-empty and contain only 0)
37 is one of such numbers
[] -> 0, [0] -> 1, [0,0] -> 1, [0,1] -> 0
Here's an example of a very similar, yet IMO more interesting challenge: Given a positive integer N, determine if it's very prime. A number is very prime if it is prime and each digit of its decimal representation is also prime. For example, 17 is very-prime, not very prime, but 19 is not and neither is 19.
but 23 is very prime
huh nobody answered this in bubblegum
18:19
@LeakyNun a=>a.All(i=>i<1)&List.Any()
C#
@DJMcMayhem Jelly, 5 bytes: ;DÆPẠ
my challenge is 2 byte in Jelly, if anyone is interested
@LeakyNun Swift: {$0.isEmpty&&!$0.contains{$0==1}}
@Phoenix C# does implicit bool->int casts? O_o
@LeakyNun ¬Ȧ?
@DJMcMayhem nice
@Downgoat What do you mean?
18:21
@Downgoat where do you see that?
Where am I casting a bool to an int?
you used bitwise & (or is that also boolean and in C#)?
given an array of 0 and 1
@totallyhuman probably cause it gets out-golfed by java...
C# does have logical and &&, but bitwise & has an override for booleans. This is also true in Java.
It's not used because it makes it less clear what your code is doing.
18:23
@LeakyNun Do you know why the product of an empty list in Jelly is 1?
@DJMcMayhem what does "why" mean?
@Downgoat {$0==[]&&!$0.contains{$0==1}} saves some bytes
I'm not sure. Half of it is is this intentional or a weird side effect and the other half is Is this useful? Why was it designed that way?
	'P': attrdict(
		arity = 1,
		call = lambda z: functools.reduce(lambda x, y: dyadic_link(atoms['×'], (x, y)), z, 1) if type(z) == list else z
@Mr.Xcoder huh TIL swift has == support for arrays
18:24
Because the starting value of the reduce is 1
@DJMcMayhem in maths an empty product is also 1
I think you meant {$0!=[]&&!$0.contains{$0==1}}, though
1 seems to be the only sane option
Ok, final Swift answer: {$0!=[]&&!$0.contains{$0>0}}
ooooh, so it's actually the same thing as reduce by multiplication?
@DJMcMayhem yes, which is why it vectorizes as well
18:25
@Downgoat You're welcome (joking)
@Downgoat have you tried &?
1×/ seems to be equivalent
@LeakyNun :O I change answer: {$0.reduce(*,1)}
@Downgoat Golfed: {$0==[]&&!$0.contains(1)}
@Downgoat What?
@Mr.Xcoder wait nvm
18:26
@Downgoat that's invalid
actually swap positions of 1 and *
[0,0] and [0,1] give the same output
brb checking
I'm actually starting to get Jelly. It's really nice
It doesn't work that way
18:27
hey why does userscript say 140.5 hex bytes when it's 140?
@DJMcMayhem nobody gets jelly, not even Dennis himself
That's why I said starting
in Jelly, Apr 1 '16 at 18:42, by Dennis
I don't understand my language. ._.
@LeakyNun Can I output nothing as a falsy value?
Credits to Erik
18:29
Well FWIW, nmjmcman101 just taught me something I didn't know about V today.
Final Swift: {$0!=[]&&!$0.contains(1)}
@BusinessCat consistent
:38833801 you forgot to test [0,0]
@LeakyNun ... That sounds hard
8 bytes is the jelly one i think
@totallyhuman shortest one anybody could find
@DJMcMayhem you just need to find the right tools
18:30
@Mr.Xcoder make the contains $0.reduce(+)<1?
@DJMcMayhem what was it?
ok so liek i'm thinking i need to combinations on the range(n)
@Phoenix The count operator stuffs the result into the ". register.
@Downgoat Equal In length
So you don't need to yank/delete it to save it
18:31
@LeakyNun (Fake) Mathematica: @~LargestSumOfNumbersThatAddToN#[a, b]
actually me solving that is way overdue so imma start working on it
@Mr.Xcoder this doesn't need the ! though so saves 1 byte
@LeakyNun I remember that one
@Downgoat sum($0)<1
Everyone, please, just let @DJMcMayhem do it.
18:32
@Downgoat what is that@sign
@LeakyNun We could just move to Jelly Hypertraining
@DJMcMayhem if you are do product of empty list for your answer how come doesn't break with the zeros? :|
@Phoenix idk it just seem like mathematica has a lot of random @s #s and ~s
LargestSumOfNumbersThayAddToN would be a full submission tho
18:33
@Downgoat I didn't use it, I was just screwing around
@Mr.Xcoder error: use of unresolved identifier 'sum'?
@Downgoat I was joking
oh :|
You should actually learn mathematica it's great.
@totallyhuman 8 bytes is way too much in Jelly. It's 8 bytes long in Pyth: efqQsT.:
18:36
it is what it is ¯\_(ツ)_/¯
And Jelly usually beats Pyth by 2 bytes
> is is
one typo away from disaster
*what it is
Alternative 13-byte (ungolfy because it uses a loop) Pyth: V_.:Q)IqsNQNB. The first one, efqQsT.: is obviously much, much better.
TeaScript is 8 bytes: .n·x.x<1 but it should be 5 byte idk why automatic . insertion is not working
@Mr.Xcoder for a fraction of a second I thought you finally stepped out of your comfort zone
18:44
@LeakyNun I did with the .u above
That wasn't comfortable at all
@Mr.Xcoder check if a list of numbers is ascending
I don't care how you deal with edge cases
If it is sorted?
@Mr.Xcoder you win
you're smarter than me now
@LeakyNun 3 bytes: qQS
@Mr.Xcoder you can do better
18:46
@LeakyNun Struggling
next challenge: check if a list of numbers is strictly ascending
Wait, wait, I must golf the above if I can do better, right?
@LeakyNun lambda l:l==sorted(l)
@musicman523 strictly.
18:50
ah
Hey guys!
@LeakyNun 2 bytes: qS
How do I ask a question as community wiki?
@Mr.Xcoder good
Can it be golfed now?
18:51
I'll also give you SI because you likely don't know
@Mr.Xcoder I don't think it can
Ok, next one
@LeakyNun [1,2,3,4]->True, [1,2,2,3]->False, am I correct?
@Mr.Xcoder yes
@BruceForte I don't think I can do it, don't think I have enough rep, you may be in the same boat
Oh, ok
Well I kinda want a "Tips for golfing in x86/x64 machine code" question, that would be nice and there's not yet
@LeakyNun 3 bytes: q{S, 3 bytes: q.{
Good enough?
18:55
good
Good, Next
@musicman523 If you're in that boat, I certainly am too ^^
whether a list is an arithmetic sequence @Mr.Xcoder
Jelly: IE
18:55
@LeakyNun How should I determine that in general?
@Mr.Xcoder the difference between consecutive terms is the same
@LeakyNun Ok
@musicman523 you can do better
how much better?
@LeakyNun That's going to be harder
18:57
@musicman523 19 bytes
that's a lot of bytes
@LeakyNun Hint for golfing?
@Mr.Xcoder .+
Thanks

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