« first day (2040 days earlier)      last day (2795 days later) » 

3:00 AM
CMC: Given a +int, if it is any of 123 234 345 456 567 678 789 output truthy, else falsy.
 
@LeakyNun test passed, but you had written c<a instead of c<b now the output matches the comments. Commiting now, and drafting some slipshod documentation
 
@HelkaHomba Jelly, 6 bytes: DI⁼1,1
 
What program can Jelly not do in 6 bytes -.-
 
Highlight the Bounding Box...
 
one that it does in 5 :P
 
3:04 AM
@RohanJhunjhunwala so it means it didn't pass?
 
@LeakyNun it did.
@LeakyNun your comment for output was wrong that's all
you had 3<3 = 12
 
@RohanJhunjhunwala well, 3<<2 should be 12 right
Oh, sorry
 
@LeakyNun you did 3<3
@LeakyNun its ok corrected and commited
 
nice
 
CJam, probably terrible, 13 bytes: q:i_:+\1=i3*=
 
3:06 AM
Java, definitely terrible, 63 bytes: boolean f(int a){return a<999&a>99&"123456789".contains(a+"");}
 
@HelkaHomba Simulate a Turing Machine, maybe? (Watch it have a builtin that does that...)
 
@LeakyNun whats | do?
 
@Dennis I may be mistaken but with just the 6 bytes everything gives 0
 
@RohanJhunjhunwala oops, I definitely confused myself
I meant :
 
Wait, 62: boolean f(int a){return"123456789".contains(a+"")&a<999&a>99;}
 
3:07 AM
@HelkaHomba Naïve first implementation, 12 bytes: VttY>=wdp*1=
Oh shoot, that's wrong
 
@HelkaHomba Huh. Are you putting the input in STDIN or CLAs?
 
@Geobits boolean f(int a){return(a-123)%111<1&(a-123)/111<7;}
 
CJam, golfed to 9 bytes: 9,:)sq#0>
 
@LeakyNun it still passes
 
@Dennis ..nevermind
 
3:10 AM
@LeakyNun I think you can cut the && to & also.
 
@Dennis @LeakyNun List of decimal digits in J: 10&#.inv. Is there a shorter way that I'm overlooking?
 
@ConorO'Brien no there isn't
 
oh well.
 
@LeakyNun boolean f(int a){return(a-=123)%111<1&a/111<7;}
 
@Geobits nice
and I still have no idea how to do it in Brachylog efficiently
 
3:12 AM
 
hey, you look like me :D
 
@HelkaHomba Pip, 8 bytes: $=$-*ENa
I am inordinately proud of that solution. :P
 
Anyone want me to make that a real challenge?
I kind like it, despite simplicity
 
That 123 thing? Sure.
 
I'll patiently wait to put my answer :P
 
3:14 AM
wait let me make a builtin first
:P
 
@LeakyNun alll right, thanks for your help. It is tested, and should be ready
@Dennis please pull SILOS if you get a chance
 
... Until I look at Geobits' Java and realize that it can be done in 6 bytes much less elegantly: $=a-12
 
@Geobits boolean f(int a){return(a-=12)%111<1&a/111<7&a>0;}
because a might be 12
@DLosc you remind me
 
@RohanJhunjhunwala Done.
 
@HelkaHomba Brachylog, 10 bytes: l3,?:12-#= (input has length 3 and input minus 12 has all equal digits)
 
3:16 AM
@LeakyNun No, vice versa--I saw yours and edited mine.
 
@LeakyNun Hmm. It seems like there should be a better way to check that :/
 
@DLosc thanks!
 
@DLosc I mean the #=
Guys, "has all equal digits" or "has all digits equal"?
 
@LeakyNun Ah, I see. I was referring to subtracting 12 instead of 123.
 
@LeakyNun I think either works
The first one is maybe a bit better
 
3:18 AM
@Geobits how?
 
@LeakyNun Both of them sound slightly stilted to me--I would probably say "and all digits of input minus 12 are equal."
 
@DLosc I would interpret it as (all digits of input) minus 12
@DLosc nope
 
@LeakyNun I don't know. I'm staring at it hoping that something comes to me, but I'm not so sure. I just hate when edge cases force a hastily-tacked on addition :(
 
@DLosc to me also
 
@LeakyNun Rgh, I was assuming input would be three digits. Fixing...
 
3:21 AM
@HelkaHomba Brachylog, 13 bytes: l3,?:12-#=d<8 (input has length 3, input minus 12 has all digits equal, which when deduplicated is less than 8)
 
@LeakyNun I think there is something borked with functions
 
@RohanJhunjhunwala that's very specific, thanks
open an issue there
 
@LeakyNun I will, I'm trying to reproduce
 
Is it falsy or falsey?
 
@HelkaHomba whatever you want
 
3:23 AM
@Leaky Is there a reason you're dividing by 111 instead of just a<778 or similar? I'm not seeing it off hand.
 
@Geobits because I'm stupid that's why
 
27
Q: Is it "falsy" or "falsey"?

太極者無極而生I have seen both versions of the word, falsy and falsey. It can mean "something that is equivalent to false" in computer science, such as "The only two falsy values in the Ruby Language are false and nil". What is the correct usage of this word?

 
in Brachylog, Aug 10 at 13:16, by Leaky Nun
I'm the stupidest person ever
 
@LeakyNun Haha, I was double checking myself with a bunch of dumb test cases to see if I could figure out where it would fail :P
 
@LeakyNun I think it's good, but an odd bug has been introduced in my older code for "Output fit numbers"
 
3:24 AM
@LeakyNun Even uglier, 11 bytes, but works for all positive ints: #a=3&$=a-12
 
@DLosc all positive ints except 900
 
@HelkaHomba Fixed, and golfed Vd1=tn2=*
 
@LeakyNun you have gotten almost 16K rep in 7 months. Not even most smart people can do that
 
@Downgoat that's because I got no life
 
@LeakyNun Well yeah, but neither do any of us. The only difference is that you're better at having no life than most of us. :P
 
3:26 AM
@LeakyNun Ahh, good corner case. So the "subtract 12 or 123" approach doesn't actually work.
 
@LeakyNun none of us do :P you're a very good golfer and for that you need to be smart.
 
@ConorO'Brien Any news on TI ELEGANT?
 
@quartata thanks for remembering :) none good. Z80 manual is arcane and largely unreadable, and school is not helping much :P
 
Maybe you'll have better luck compiling to C
 
3:28 AM
question: what's a word for like susceptible to brainwashing? It's stuck on the tip of my tounge
 
@quartata but then I can't very well compile that to the calculator can I?
 
@Downgoat gullible?
 
@Downgoat Gullible
 
yes that is it thx
 
Friggin ninjas everywhere
 
3:28 AM
Sure you can.
 
:O
WAT
 
?
 
@DJMcMayhem change two letters to g and you'll be flagged (that happened in my mind when I was reading it lol, stupid mind)
 
@DJMcMayhem Go post here and stop pinging me :P
0
Q: As Easy as One-Two-Three

Helka HombaWrite a program or function that takes in a positive integer. You can assume the input is valid and may take it as a string. If the number is any of 123 234 345 456 567 678 789 then output a truthy value. Otherwise, output a falsy value. For example, the inputs 1 2 3 12 122 124 132 321 457 77...

 
3:29 AM
how do I do this ._.
 
@HelkaHomba ... how can you make two challenges in two hours O_o surely you are machine
 
2 days ago, by ASCII-only
Typical Helka, posting a CMC attracting so many answers that it fills chat for two hours.
 
Using a compiler? gcc supports almost everything under the sun and I'm sure the z80 is no exception
 
@ConorO'Brien idk what you're talking about but if its compiling C to TI, processors.wiki.ti.com/index.php/TI_Compiler_Information
 
@LeakyNun Well yeah, but much shorter now to do #a=3&$=$-*ENa
 
3:30 AM
@Maltysen ._. wow
 
@Downgoat This one was cake to write
 
You'll need to use some assembly for screen output probably
 
@HelkaHomba i notice how you are not denying being a machine
 
^
 
@Downgoat And getting downvotes since it is admittedly bland
 
3:32 AM
@LeakyNun I feel really stupid asking this, but which letters would you change to G?
 
@DJMcMayhem certain two letters in ninja
 
ooooh, I thought you meant two letters in friggin
 
@Maltysen Well, I'm not anymore.
 
2
Q: As Easy as One-Two-Three

Helka HombaWrite a program or function that takes in a positive integer. You can assume the input is valid and may take it as a string. If the number is any of 123 234 345 456 567 678 789 then output a truthy value. Otherwise, output a falsy value. For example, the inputs 1 2 3 12 122 124 132 321 457 77...

 
@NewMainPosts *it's as easy... ftfy
 
3:39 AM
@HelkaHomba yeah. It's basically check if three digits long and increasing sequentially
 
@HelkaHomba You may want to add 900 and 1011 as test cases, since those (especially 900) bit me earlier.
 
What's the best lossless compression format for .RAW photos that works easily with mac?
 
@Downgoat Someday I'll challenge myself to make 24 challenges in a day, one per hour, someday...
 
trying to flood the HNQ list, eh?
 
3:46 AM
@DJMcMayhem is lossless RAW compression even a thing
 
@Sherlock9 I think you'll need to get used to golfing without me... at least for 8 months or so
 
I'd assume so
How efficient it is another matter
Wouldn't even .zip be able to compress them atleast somewhat?
 
@LeakyNun are you going somewhere?
 
2 days ago, by Leaky Nun
I'm going to take a long break from this site
 
@LeakyNun I know. I figured I'd ask while you're still here
 
3:47 AM
(@Maltysen read all subsequent messages)
 
@LeakyNun good luck on your exam, and also i give you 3 days before you break your self-imposed ban
 
@Maltysen Fatalize only gave me 1 day
 
I almost said that I should compile yet another list of my Actually starting Thursday, but I realized I could search actually user:47581 :D
I give him a grace period of a week of getting used to not going here daily. After that... 10 days :D
 
@primo :) did you write a new brute force? Because you sure found the extra solutions fast!
 
Wish the letters hadn't gotten so dark
 
3:57 AM
@HelkaHomba Now is your chance to write a challenge involving Deep Dream somehow.
 
@HelkaHomba Sometimes the pattern is pretty obvious, like in this case. :P
 
@El'endiaStarman Still purdy
 
Oh, no doubt.
 
@Sherlock9 Other than writing :11 as 4P, I am unable to come up with any golf advice
@Sherlock9 That means 17 days?
 
 
You can buy literally anything on eBay, it seems.
 
Hmm. Is the poll binding? As in, do you agree to break it based on the results? :P
 
@Geobits nope, it's just what you guys think of my willpower
 
Fair enough. My money's on 7-30 days.
 
Hmmmm. I'll go with 3-7 days.
 
4:12 AM
What exactly counts as breaking? Any activity on main/meta/chat? "Last Seen" on profile?
Also, just this site or SE as a whole?
 
@Geobits I'll logout from this site on all my devices
@Geobits some guys in chem.SE may actually help with my revision
 
K. So I'll ping you in a week or two to see how you're doing ;)
 
@Geobits and I'll reply to the ping next year
 
Cool. It'll be like a time capsule.
 
Why do you guys think so lowly of my willpower ;_;
 
4:15 AM
@LeakyNun no, 1-3 days is a compliment
:P
 
...
 
@LeakyNun Nuts. Thanks anyway
 
We don't think lowly of you, we think (and know) highly of the addictive properties of this site.
 
@LeakyNun Yep
 
@Sherlock9 do my poll
 
4:16 AM
1
A: As Easy as One-Two-Three

DJMcMayhemBrain-Flak, 98 + 3 == 101 bytes ([]<>)<>({}[({})]<>)<>({}[({})]<>)({}{}[()()])({}<({}[()()()])>)(({}{}<(())>)){{}{}(((<{}>)))}{}{} This code is 98 bytes long, plus three for the ASCII flag: -a. Do I get a badge for having the longest answer so far? :P You can Try it online! here, but this v...

 
@DJMcMayhem ninja'd by the upvote
 
That was fun. I love this new ASCII mode
I guess I can't really complain about that.
 
@DJMcMayhem I thought you should take in integer
 
@DJMcMayhem Stop taking my coveted longest-answer position.
 
@Geobits :D Maybe we just need to invent javaflak
 
4:18 AM
Good lord, that would be a mess
 
Would you guys mind if I paste the poll here every certain hours?
 
Depends on how often every certain hours is.
 
@quartata Hmm. What about vegetarian/vegan conducts?
 
@Lynn have you done my poll?
 
4:24 AM
@Lynn yes, thanks for thinking highly of my willpower (not high enough)
 
I voted!
 
hah cool
 
@El'endiaStarman woah wat
 
Now who the hell voted for t < 1 day?
 
4:33 AM
@El'endiaStarman is it cuz of changing refracting index?
 
@Maltysen Yup!
 
still have no clue how it actually works tho...
 
@DJMcMayhem Ha! I guessed the comment you linked to! :P
 
The funniest one
I had to login just to upvote that.
 
4:40 AM
@Maltysen Parabolic mirror focuses light into a single point. Said point is put at a razor's edge so only part of it gets into the camera. Refractive index changing means that light takes different paths than usual, so more or less of it goes into the camera. Ta-da, changing brightness!
@Maltysen Also, check out this:
Schlieren photography is a visual process that is used to photograph the flow of fluids of varying density. Invented by the German physicist August Toepler in 1864 to study supersonic motion, it is widely used in aeronautical engineering to photograph the flow of air around objects. == Classical optical system == The classical implementation of an optical schlieren system uses light from a single collimated source shining on, or from behind, a target object. Variations in refractive index caused by density gradients in the fluid distort the collimated light beam. This distortion creates a spatial...
 
--advertisement--

 Code Golfer's Corner

Discussion specific to golfing code. For general PPCG chatter ...
--advertisement--
--advertisement end--
 
@El'endiaStarman cool
so if it has a different refractive index, then it won't go through the same focal point?
 
still don't get how the knife edge manages to cut off only the beams with lower densities
how does it always work out to that?
 
Well, it doesn't exactly. The focal point shifts. Perhaps above, perhaps below the edge.
 
4:49 AM
@LeakyNun -1 for imbalanced --adevertisement--/--advertisment end-- pairs :P
 
@Downgoat alright
 
@DJMcMayhem halp how to hide ^Ms in vim
 
@El'endiaStarman oh yeah, the dark and light patches don't actually correlate to higher or lower densities
 
@Downgoat Hide or remove?
You can hide them, but I don't think you want to
 
@DJMcMayhem :/ they only show up when as root user :/
 
4:51 AM
o_O wat
 
wait nvm
 
Guys, who will write my farewell question ^.^
 
@LeakyNun I'll write 24 Alphabet challenges in a single day in honor of you.
:P
 
@DJMcMayhem what's your timezone?
in the case with the slightest probability that you are serious, you should start today
 
MST (which cause of stupid daylight savings is MDT right now)
And no, I was kidding.
 
5:06 AM
alright
 
I'll see if I can come up with a Kenny-themed challenge though.
 
thanks
 
@DJMcMayhem do this and I will consider you a rank above Helka Homba in terms of challenge writing.
@LeakyNun >_> I will try but idk if I can beat dr ham jam's alphabet proposal
 
@Downgoat Wait really? Quality irrelevant, just crank enough out fast enough?
 
@Downgoat ugh, he was joking, so you can beat a non-existing chalenge
@DJMcMayhem Coming up with 24 challenges in one day in which none gets closed is very quality relevant
 
5:08 AM
That's true, but nobody had mentioned staying open yet.
 
@DJMcMayhem obviously closed challenges do not count
 
You'd probably get question-banned before you hit 24 questions. :P
 
@Sp3000 I did. One more I over-looked initially:
--[[+<]>>+>++]<-.<[--->-.<]
 
I'm really really hoping to get socratic. I'm at 58% right now, but making progress very slowly...
It's a lot harder than it sounds
 
Kind of a special case.
 
5:14 AM
Nice :P I should probably reimplemented mine, Python's too slow for this
 
RPython ;)
 
... Ah :P
(On a side note, I now have a ~2MB file of random BF tapes which are fun to go through to see if they're useful for past challenges)
 
it's also a big advantage to mathematical approaches, you don't need to evaluate bf code
 
Like the recurrence one for HW, I'm guessing? :P
 
yeah ;)
you can crunch thousands/millions of times faster that way
 
5:25 AM
Based on the results so far, I get the feeling HW is still very golfable, but I'm fairly certain the optimal solution will be beyond comprehension
(e.g. I'm not sure if you saw, but I don't think I'd be able to come up with the Fibonacci tape myself)
 
HW?
 
e: ++++++.
yeah, i'd say that's golfable >.<
 
Hello, World! (in reference to primo's BF answer)
 
@DJMcMayhem But I thought maximum was 6/day
 
I don't think there is any maximum
 
5:29 AM
But I'm sure I read it somewhere
Maybe
 
@Sp3000 JIT bf interpreter: codepad.org/Ax9wTsEQ
compile:
python \path\to\rypthon\bin --opt=jit bf.py
 
Does it give that much of a speedup? (I'm guessing so, but I don't know how much by)
 
@primo can't you just use pypy?
 
5-6 times over pypy
 
o
 
5:33 AM
Nice :o
Also - I think I just found 24: ++[<++[++<]>>>+]<[-<-.>]
 
Brute forcing is fun.. what are we trying to make?
 
works!
 
I don't get it. Why would you want to print ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! ?
 
16
Q: Brainf*ck Loop Problem

Nick RodI have a problem for a cyber club that asks you to print: ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! Using Brainf**k in 29 bytes or less without using the ',' character. I have a working code: ++++++++++[>++++++>+++++++++<<-]>-->.<[>-.<-] However my loop is too long, sendi...

oops
 
@Sp3000 do you have the brute forcer source online?
 
5:40 AM
@Sp3000 I declare this solution optimal
 
I wonder if this problem was created by typing some random instructions in BF, and then asking to produce its output as a challenge
 
Not on me, no - it's at home atm (also not very optimised)
 
What language?
 
@primo I was about to say that, but I think I'll take one step back and say "I declare this solution optimal for this approach" :P
Python (hence not very optimised)
 
Hmm, would PyPy's memoization help at all?
 
5:43 AM
Probably would, might have to try RPython to compare. Either that or actually use C.
@feersum That's exactly what Martin thought as well, and tbh I think that's quite likely :P
 
If I were doing this I'd just write the machine code for the programs straight to memory.
Since there are so few instructions it wouldn't be much of a hassle.
 
No wrapping?
 
I was assuming 8-bit here (as was primo)
 
Wait, no whitespace allowed in output?
 
OP's program has a trailing space, so I was working under the same assumption
 
5:53 AM
I think it might be possible that the cyber club didn't realize they printed control characters (i.e. use esolangs' constants page to do this: +[->---[-<]>-]>-[-.])
 
So I was looking for another techy place to hang out online, and I'm a fan of LinusTechTips so I thought I'd try their forum. But then this was their most popular programming post:
 
@primo btw the reason I'm not so quick to call this optimal is because there's still the possibility of something like this: ++++[[+<]+[>]<+]<[<.] (however unlikely :P)
 
@HelkaHomba lel
 
Are we spoiled by code golf, or demented? Or just elitist :P
 
@HelkaHomba oh, wait that says 100 lines
not chars
 
6:01 AM
yes
 
Also can't you just remove all newlines
 
wth, even without PPCG, I doubt that that would be a challenge
 
> Hey guys, here's a python program that takes a base 10 number ( what we count in) and return it in any base you want. If it's between 2 and 36 it returns a number like 0xFF (255 in hex) and any thing over 36 it returns it as "[2, 45, 3] With a radix of 60" (9903 in base 60;
But python has a builtin for that
 
@ASCII-only no it doesn't
it has the inverse
 
Not the over 36 part
 
6:05 AM
Fair enough
 
and even below 36 it only does specific bases
like 2, 8, 16
 
Oh right, inverse, I see
 
Still you don't use 36 lines to convert 10-35 to A-Z
 
@ASCII-only no python actually doesn't have that builtin
it has int(string, base) but not the opposite
 
@Maltysen I know
But that guy declared a dictionary with one entry per line
to change 10-35 to A-Z
why ;_;
 
6:07 AM
Does it support base -909?
 
link plz
 
holy jesus
and each entry of the dict is on a different line
and its not like that's the most pythonic way to do it or anything
 
Horrible non-golfed recursive one-liner: f=lambda n,b,a=[]:n//b and f(n//b,b,[n%b]+a)or [n]+a
 
@ASCII-only Mini-challenge: Write a no-arg python function that returns the dict {0: '0', 1: '1', ..., 9: '9', 10: 'A', 11: 'B', ..., 35: 'Z'} that you wouldn't cringe to see as production code (not code golf).
 
6:19 AM
Just 0-9A-Z?
 
yes
0-35 mapped to those
 
Wait a sec
 
import string

def get_digits_dict():
    return dict(enumerate(string.digits + string.ascii_uppercase))
The "no args function" part makes me cringe slightly though :P
 
@Sp3000 Oh. That's way better than mine.
I wrote this:
def d():
    dict = {}
    for i in range(36):
        if i < 10:
            dict[i] = chr(48 + i) #ASCII value of '0'
        else:
            dict[i] = chr(65 + i - 10) #ASCCI value of 'A'
    return dict
 
6:26 AM
Alright, let's try that again:
d = lambda: dict(enumerate(map(chr, list(range(48, 58)) + list(range(65, 91)))))
Wow, that's a lot of parens
 
@DJMcMayhem 0/10 lambda in prod assigned to a variable
 
;_;
 
Lambda's fine in prod... just not like that :P
 
Why would you have not done a lambda there?
Cause IMO, lambdas are for when you need a function to be unnamed, or if the function is basically just a one liner.
 
But you want that to be named
In general if you want a name, use a def in production
 
6:28 AM
Yeah, but it's just a one liner
 
Personally I'd go with a def is the function is even somewhat nontrivial, especially if you want to docstring it
 
Although d is a terrible function name, I will admit
 
In most other languages it's not as trivial ;_;:
function getDigitsDictionary() {
  dictionary = {};
  for (var i = 0; i < 36; i++)
    dictionary[i] = i.toString(36).toUpperCase();
  return dictionary;
}
64
A: Which is more preferable to use in Python: lambda functions or nested functions ('def')?

noskloIf you need to assign the lambda to a name, use a def instead. defs are just syntactic sugar for an assignment, so the result is the same, and they are a lot more flexible and readable. lambdas can be used for use once, throw away functions which won't have a name. However, this use case is ver...

 
Fine.
 
@Sp3000 what did you mean?
 
6:32 AM
But it's really PPCG's fault! I've spent so long on here, that my brain has learned short == good and I can't get it out of it!
 
@LeakyNun In regards to...?
 
@Sp3000 my bf answer
 
Oh, you've basically done it (came up with basically the same 33 independently)
 
nice
@Sp3000 there's a way to make 32.
 
Hmm unless there's a way to ditch the [<]<[<]<[<]< train, I'm not seeing it
 
6:48 AM
Hello
 
0
Q: Climbing binomial tree to find the option value

Anastasiya-Romanova 秀Background: In finance, the binomial options pricing model (BOPM) is the simplest technique used for option pricing. The mathematics behind the model is relatively easy to understand and (at least in their basic form) it is not difficult to implement. This model was first proposed by Cox, Ross, ...

 
Ummm
Can anyone review my current code?
 
hello all
what language is your code in @DerpfacePython?
I have a question. When I edit an answer, I want to write how it worked, is the OP notified somehow or does it appear updated anywhere?
 
OP is not notified, but it goes to the top of the front page
 
@ConorO'Brien 7 XOR 5, see b. for the boolean/bitwise opearators, 22 b. is integer bitwise xor
 

« first day (2040 days earlier)      last day (2795 days later) »