« first day (2283 days earlier)      last day (2564 days later) » 

3:05 PM
Question: given a value between 0 and 1: for 0 output an RGB code for a blue color, for 1 output an RGB code for an orange color, all intermediate values output a color in between (all outputs should be evenly distributed)
 
and did you mean "CMC" instead of "Question"?
 
ono, too late to fix now :(
 
Write it again
By orange do you mean #ff7700?
 
yes
CMC: given a value between 0 and 1: for 0 output an RGB code for a blue color (#00F), for 1 output an RGB code for an orange color (#F70), all intermediate values output a color in between (all outputs should be evenly distributed)
 
now which averaging should be used?
 
3:11 PM
There is a builtin for that in Processing
oh wait, rgb code, then that's more verbose
 
Remember, you are free to do whatever you want, as long as the result is correct :)
But this is still unclear, as it doesn't say what averaging to use.
 
Output for calling the function with 0, 0.5, 1: -65536 -50176 -35072
I'm sure this is not what Downgoat means
 
@LeakyNun averaging? Whatever you want, but should all be the same because outputs should be linear
 
@Downgoat did you click my link?
 
can we set the background of a graphical window to that colour instead?
 
3:16 PM
@KritixiLithos I think you only have 1 input
 
@LeakyNun yes
@KritixiLithos uh, sure but it should be somewhere so I can copy for my own code
 
@LeakyNun I meant f(0), f(0.5), f(1)
 
@Downgoat What "your own code"?
 
rgb is not logarithmic color AFAIK
 
@Downgoat what do you mean by that?
 
3:17 PM
@KritixiLithos meaning I don't want to write function because lazy >_> so outsourcing in form of CMC
 
In Processing, lerpColor(#ff0000,#ff7700,g); gives the colour you want (returns a color) where g is the value between 0 and 1
you can surround that in background() to set the background of the sketch to that colour, but printing the colour will give weird results (as it always does)
If that's what you want
The full function is 52 bytes, int f(float g){return lerpColor(#ff0000,#ff7700,g);}
 
@Downgoat but you still need to take the root-mean-square average if you want to look good
 
> lerpColor
 
If you want, you can see the source for lerpColor here
 
Idk why but this name amuses me
 
3:26 PM
@KritixiLithos lerpColor doesn't use beautiful color averaging :(
 
@LeakyNun well, the results are beautiful
 
@KritixiLithos can you show me?
 
Question: what is good API to get image of given geolocation
 
@LeakyNun Here is a folder of pictures on GH. This is a part of my grapher project that is planned to be a library for Processing (and can be used for golf)
 
Not bad
 
3:33 PM
the auto_fit and heart pictures are created with equations from PPCG challenges
Tbh there is supposed to be more than two commits there, but something happened and all previous commits got erased
 
@betseg lol, I thought this was you:
and I was quite confused for a moment
 
wow
 
he's 12 rep above, as of 30 minutes ago
 
is it caching that martin seems higher to me
 
prolly?
imma remove for now actually, as it's not that far above
likely caching on one/both sides
martin appears as 952 for me, dennis as 962
 
3:41 PM
dennis at 944, martin at 992 for me
 
^ that's the same for me
 
damnit, I either misread or caching is seriously laggy for me
 
Poll: which one is more beautiful? The top one or the bottom one?
 
top one
 
@Downgoat you?
 
3:49 PM
Top one
 
The top one uses root-mean-square averaging, while the bottom one uses linear averaging
 
Oh huh
 
Anything w3schools says is irrelevant
 
@JanDvorak I just typed codes there
 
Wow thanks
 
3:51 PM
Jsfiddle won't do?
 
@JanDvorak I don't see how you can reject facts
@JanDvorak I haven't tried
 
Jsfiddle is far better than W3schools' tryit editor, even if we don't judge by the author
 
Alright, will use Jsfiddle next time
 
I'd suggest trying gamma-corrected linear
 
@LeakyNun top ofc
 
3:53 PM
just interpolating sRGB code points won't get something that's actually linear
 
@LeakyNun I kinda like the bottom one better, but the top one looks more realistic
 
@JanDvorak I'm not the expert on colors :p
 
Time to learn ;-)
 
whoops, my Processing function was wrong, it did red to orange instead of blue to orange
That's what lerpColor gives me ^
 
@KritixiLithos I saw the code. It's definitely linear.
       return ((PApplet.round(a1 + (a2-a1)*amt) << 24) |
              (PApplet.round(r1 + (r2-r1)*amt) << 16) |
              (PApplet.round(g1 + (g2-g1)*amt) << 8) |
(PApplet.round(b1 + (b2-b1)*amt)));
 
4:01 PM
In this challenge about colour gradients, I did not use sqrt for the gradient and got this result
 
I golfed an answer to 1336 bytes, missing 1337 by a byte
 
*linear in sRGB
 
You won't regret it, that's for sure.
 
not in intensity, though
 
@johnathanallen It is a context free grammar. I don't know if it is standard but it's the notation I learned in uni. — Wheat Wizard 2 hours ago
Lol why does Jonathan's name get typo'd all the time? I don't get it.
 
4:15 PM
because there are ridiculously many spellings of jonathan
 
or because wheat was on mobile
You don't get @ auto-completion
 
Huh, I usually do
 
I meant on the app
 
What
 
The SE app doesn't give you @ auto-completion
 
4:16 PM
Ah, makes sense.
 
You don't get @ completion on mobile site too
 
Ah, I'm probably thinking of auto-completion in chat
The chat in has auto-completion in all versions. The site doesn't, IIRC
 
@Riker people have typo'd my name several times, but there is only one way to spell my name :P
 
Lol
 
@Riker I have seen people typo'ing that name some 2-3 times in the past too though. Is his name really that difficult?
 
4:19 PM
@betseg As an example. Hi, I autocompleted your name from mobile
 
Yeah my brain borked for a second
 
the SE app always borks
 
@betseg I haven't heard (seen) "borked" for a long time
 
borked = fubar
 
I know what it means
 
4:22 PM
what's a fubar?
 
f***** up beyond all recognition
 
fxxxed up beyond all repair
 
Which one :D
 
Math pun: Please exercise caution when posting homework questions on SE. You may leave quadratic residue.
 
4:31 PM
Related CMC:
9 hours ago, by Leaky Nun
CMC: quadratic residues mod n
 
@Sherlock9 %?
 
Percent?
 
Where is Maltysen gone? Haven't seen him around
 
@Sherlock9 mod
It means Mod?, and what is implied here.
 
:D Ah yes, and if you leave quadratic residue everywhere, you may run into trouble with the mods.
And the "mod n" man
 
4:34 PM
@LeakyNun Maltysen's been inactive for a while now.
 
(read: modern)
What about minxomat?
 
@EriktheOutgolfer do you know why?
@Sherlock9 are you going to do my CMC?
 
@LeakyNun Nah I currently don't.
 
@Sherlock9 he's on a diff time zone than most of TNB, but I've seen him occasionally when I'm up late/early
mostly around 2-4 am my time
 
I'm in GMT+2 summer time and I've often seen him active.
 
4:37 PM
ah, okay
I'm like 7 hours behind you, and I don't see him that much
 
Python 3, 34 bytes: lambda n:[k*k%n for k in range(n)]
 
@Sherlock9 Huh?
 
@Sherlock9 There is an addendum which says that it must be sorted and uniquified.
Although I'm not sure if it applies here.
 
Huh. Alright
@mınxomaτ Good to see you :D
Wondering how the podcast is going
 
I'm mostly here between 8am and 3am+1d (my time)
 
4:39 PM
@mınxomaτ utc?
 
Which time zone are you in?
 
CEST or CET
 
UTC+1 then
0700 to 0200+1d UTC
 
@Sherlock9 I'm currently moving, so I don't really have any time for anything. I'll update yall mid-May
 
@Sherlock9 Here is the addendum for reference:
9 hours ago, by Leaky Nun
oh, and it should be unique and sorted
 
4:42 PM
@mınxomaτ Fair enough. Good luck and safe travels
@EriktheOutgolfer Thanks
 
@Sherlock9 you're busy?
 
Kind of
 
alright
 
Mostly I figured you'd already got a bunch of responses
 
not really
 
4:56 PM
Ruby, 35 bytes: ->n{(1..n).map{|k|k*k%n}.sort.uniq} tio.run/nexus/…
 
@Sherlock9 nice
 
@Riker It's April 30, not April 1.
 
Huh? What happened?
 
@Sherlock9 nice
 
5:04 PM
I have made a 6-byte version too though. And it's almost identical: Ḷ²%µQṢ.
 
0
A: Sandbox for Proposed Challenges

Comrade SparklePonyUseful Golfing-Language Commands I as well as others are working at making golfing languages. What are some useful commands that we could include? As usual, please post one tip per answer, except for the "generic commands"1 answer. If a command has an inverse, (like + is the inverse of -), plea...

 
@EriktheOutgolfer I think that is identical
 
@EriktheOutgolfer that wasn't what you came up with
 
Whoops I meant Ḷ²%⁸QṢ.
 
5:22 PM
@WheatWizard Personally, I think your formal grammar description of balanced strings is not very user friendly. I understand it, but I had to have it explicitly explained to me. I don't think the average user will have any clue what it means
 
lol
-11
Q: ip address hack

First LastI believe someone knows my IP through accessing public WiFi and accounts such as BT sport. Now I know I'm being monitored but not sure how. I believe this person is a hacker and that they know the latest activity on my phone and laptop. I'm taking the issue further and possibly have a good imag...

Best part is the OP's comments on the accepted answer
 
CMC: print 7625597484987 (3^27) without using any number
 
By number you just mean the ASCII digits?
 
@LeakyNun Brachylog, 10 bytes: ṪlL:L^:L↔^
 
@DJMcMayhem yes, sorry
@DJMcMayhem have you seen my comments on your answer?
@Fatalize could you use backticks?
 
5:30 PM
What do you mean?
 
@LeakyNun Yeah
I'm edit when I'm less busy
 
It's basically 3^(3^3) with Ṫl producing 3
not the most interesting of things
 
Dyalog APL, 11 bytes: (⊢*⊢*⊢)⍴⍬⍬⍬
 
@KritixiLithos what is the header for?
 
5:34 PM
Basically does what Fatalize said, with ⍴⍬⍬⍬ producing three
@LeakyNun it sets the precision of the output
remove it and see what happens
 
I see
 
And ⍴⍬⍬⍬ basically means the length of 3 empty sets
 
@ConorO'Brien 13
8
 
oh
I'm tired
 
5:40 PM
Jelly, 7 bytes: “¤‘µ**@
This is probably a little too long
Jelly, 6 bytes: “¤‘**@
I was right
 
@ConorO'Brien congratulations
 
@Sherlock9 how does it work?
 
My answer works like this:

“¤‘ is the number 3 from Jelly's special ord() function that maps characters to its code page.
* is the first exponentiation to get 27.
*@ is the second but flipped so we get 3**27 and not 27**3.
 
oo nice
 
There is a little magic involved because I'm not sure where is pulls the second and third 3s from. I assume Jelly automatically repeats old arguments, but I'm not certain.
 
@ConorO'Brien I saw an answer saying that C strings end in null bytes, so I just used that here
 
@StewieGriffin Ah, hello. I haven't had a chance to thank you for the bounty yet, so - Thank you for the bounty :D
 
@Sherlock9 the chain is niladic
so the first nilad is used as the argument to the remaining chain monadically
 
5:52 PM
Ah, thanks for the clarification
 
I'm heading to bed. Goodnight
 
@Sherlock9 You're welcome :) Both the answer and the challenge were very nice, so you deserved it :)
 
@Fatalize why does ṪlI^ not give 27?
@Fatalize 8 bytes: ṪlI:Ij^ˡ
Outgolfing a language creator :p
 
$ cat << EOF | gcc -x c - -o qwe 2>/dev/null && ./qwe
a='Q';main(){printf("%lld",a*a*a*a*a*a*a/('d'-'a'));}
EOF
598878821
doesnt print 7625597484987 wtf
 
6:01 PM
TFW you realize you lost the one-byte-shorter solution that you had worked on for an hour :-(
@betseg Um, is it casting to a 32-bit int?
 
@ETHproductions oh
 
@betseg (81^7)%(2^32) / 3 = 598878821
 
@LeakyNun C, 64 bytes (CC @ConorO'Brien)
 
i was just testing and failing this 63 byte program
@LeakyNun wait wat
 
6:07 PM
> trojan win 32 dynamasta
 
lol wut
 
@LeakyNun remove b, 53 bytes
 
I get trojan win32 but what's "dynamasta"
 
@betseg right
 
6:08 PM
is there an escape character in a
 
yes, it is U+0018
 
Anyone here got a post deleted due to "Offensive" flags?
 
@StewieGriffin o/
 
Anyone know how much negative rep you get? Spam is automatically -100, but I can't find information about Offensiveness.
 
6:10 PM
just a chat message, though
 
oh its smaller than i thought, fits in a long
 
offensive posts on main are -100 as well, any combination of six red flags works.
chat messages are 30 minutes per
 
@JanDvorak, OK :) Reason for asking. :)
 
@LeakyNun I know you posted that a while ago, but brain-flak, 50 bytes: (((((()()())){}){}()){}){({}<(({})({}){})>[()])}{}
 
6:18 PM
@DJMcMayhem nice
 
@DJMcMayhem what are you all golfing here?
 
51 mins ago, by Leaky Nun
CMC: print 7625597484987 (3^27) without using any number
Thankfully, constant exponentiation is very terse (relatively speaking) in brain-flak
 
6:34 PM
are linear-access hash tables really that bad?
 
@DJMcMayhem I can't golf that down lol
 
MATL, 7 bytes: It^I^I^
 
1
Q: What would your reputation be without the rep cap?

Stewie GriffinIn this challenge, you will calculate what your reputation would be, if the reputation cap didn't exist on PPCG. Everyone can access the rawdata for reputation changes on the adress: codegolf.stackexchange.com/reputation. The raw data follows a setup like this (these are the first few lines of m...

 
^^ A challenge where a regular language might win... :) Hope you like it :)
 
6:51 PM
@LeakyNun That's a high complement coming from you ;)
 
@NewMainPosts I feel like we've had that challenge before, or something similar
 
Anyone here know how to use bash to cut off all lines in a file after a certain column? Pretty sure sed or something could do that
 
@ConorO'Brien Really? I haven't found any similar ones. The search function isn't the best though, so there might be a similar one that I just haven't found.
 
it could've been on SEDE
 
@ConorO'Brien Reminds me most of this
 
6:57 PM
ah that was it
 
@DJMcMayhem I like it because it can't be argued with. Any intuitive explanation of what a balanced string is generally is rather vague or relies heavily on extrapolating from examples.
 
@LeakyNun unclear. What if my language doesn't have a code point specified?
*code page
 
7:17 PM
@LegionMammal978 if the length is in $col, then sed "s/^\(.\{1,$col\}\).*/\1/g" test.txt works
 
What does CMC mean?
 
@Adám Converted Mana Cost
 
@Adám chat mini challenge
@isaacg I had to check to make sure you weren't geobits
 
Chip microcontroller
 
cdon't munderstand cabbreviations
3
 
7:31 PM
14 hours ago, by Helka Homba
Geobits is cackling madly somewhere
 
I can cackle too
 
@LeakyNun I never think about using left fold
 
@Riker Thanks.
 
0
A: Sandbox for Proposed Challenges

J843136028Digit Words Question 1 on here. Test cases can be found here. Functions are allowed as well as programs. Make your code as short as possible.

0
A: Sandbox for Proposed Challenges

AdámInsist on an answer Keep prompting for input until the user inputs something, i.e. does not just press Enter or OK. code-golf

 
@NewSandboxedPosts seems good to me, could use a bit more clarification though
specifically, does the input have to be runtime? what if that's the default behavior of the interpreter?
and does a blank newline count as empty input?
cc @Adám, since chat messages are easier to respond to (imo) than comments
 
7:40 PM
CMC: greet someone
 
code-bowling?
lol
I can get a 1 byte solution though, e (english). pronounced "ey" or "eh"
 
not golf
lel
 
@betseg "salutations, my most golfiest of golfers, how be thy doings today?"
@Riker why did this get 7 stars
it's a stupid avatar joke lol
 
A very good day to you, fellow code-golfer, how are you feeling at this fine hour of the morning?
 
 
7:57 PM
If that car belongs to physical security, then it's in a private MS parking garage and the person who took this photo probably works at Microsoft.
 
8:50 PM
@Riker Well, at least you don't have to assemble it yourself...
 
And I finally got a Pyke interpreter up again but it's moved to http://dustbunny.catbus.co.uk:5000/. Is it possible to have two domains map to the same IP?
 
9:08 PM
Sure.
 
Anyone used dc for golfing?
Looks like a good challenge
Also, hello
 
i cant see your name ಠ_ಠ
 
You can't? Shows up fine for me. It's MicroTransactionsMatterToo
 
i can see it when i click your avatar but not here
 
Might be too long
 
9:15 PM
probably
 
Anyway, dc is a stack based calculator for Unix
 
ik
 
Seems like the kind of language one might use for golfing
Currently working on a list of languages to learn
 
@MicroTransactionsMatterToo Indeed.
14
Q: Tips for golfing in dc

AbbKazPowWhat general tips do you have for golfing in dc? dc is a calculator utility for UNIX/Linux that predates the C language. I am interested in how to make my dc programs (calculations?) shorter. I'm looking for ideas that can be applied to general code-golf that are at least a little bit specific ...

 
Yeah, just thought I might as well mention it :)
Anyway, what're you up to?
 
9:31 PM
 
Not sure what that is without context. As far as I can tell, you manage to run out of memory for NodeJS
Rather, you have too many nodejs processes running
 
found in reddit, check the highlighted line
> kill process or sacrifice child
 
I'm guessing it means child process. But yeah, it's a rather amusing phrasing
Well, going to start learning Common Lisp
Never been great at purely functional languages, although I enjoy using Prolog and APL
 
@MicroTransactionsMatterToo What have you done in APL?
 
Not a huge amount, I've done quite a bit of playing around in it, and used it to cull some datasets I had, but then gave up when I tried to work out outputting data to a file.
 
9:57 PM
@MicroTransactionsMatterToo That's pretty easy though. Especially in Dyalog APL 15.0: (⊂txt) ⎕NPUT 'writing.txt'
 
Yeah, but outputting formatted text isn't as simple
Needed to output JSON, and APL isn't amazing at that sort of thing, better at manipulating arrays and matrices
 
@MicroTransactionsMatterToo 7160⌶MyAplArray returns the JSON equivalent. In version 16.0 (beta this week) it will be 1 ⎕JSON MyAplArray.
 
@Riker I think it is neat to see the development at a glance. Obviously, in code-golf, the shortest line is the current entry, so the <s> is just annoying. However, I don't see the need to move the old solutions to a different section.
 
user image
13
Yes!
 
@Dennis Wow, congrats.
 
@Adám hm, okay
@Dennis I was too early :p
@Adám I also didn't like the codeblocks not being blocks
 
@Riker No, he's 2 ahead right now.
 
10:20 PM
no I was
 
@Riker oh, huh? I misread.
 
no, I posted that eralier
but I misread
 
@Riker rounding error?
 
lol, no, I just misread 6 for 9
 
@Riker They are the same; it's just a matter of perspective.
 
10:21 PM
lol
 
@Riker When my father taught me the alphabet, I argued that he was still my father whether his belly faced the window or away from it. Therefore, b and d are the same letter.
 
lol
 
you know, someone (or some people) designed the lower case letters and we will be using them for at least couple of thousand years
 
@betseg I don't think they were designed. They just naturally transformed by slight variation in transcription, eventually turning into what we have today. However, the general modern forms probably won't change much more, due to our effective storage media.
 
10:43 PM
@Dennis Nice!
 
@Phoenix Well, it was while it lasted.
 
Quick come up with an absolutely brilliant golf to something! :P
 
Rep cap.
 
Bounties.
 
you could always trick someone into giving a +500 bounty for the shortest submission to <task where jelly has 2-byte builtin>
 
10:57 PM
Preferably shortest program to print 0.
 
<b>0 in html :P
 
>_>
 
Or one of the number theory builtins.
 

« first day (2283 days earlier)      last day (2564 days later) »