« first day (2372 days earlier)      last day (2766 days later) » 

11:00
@EriktheOutgolfer Can we return the numbers separated by a newline instead of formatting them as a list
yeah that's a reasonable format
Noo, I've been ninja'd by Rod :((
heh mine is even shorter but let's say I won't post it...
@EriktheOutgolfer Does yours use [A::B] syntax?
let me rewrite it one moment
@Mr.Xcoder nope
btw mine is 52 bytes
11:07
I think I have something even shorter
Not done yet
@Mr.Xcoder well if it works then post it...
> Not done yet
yeah...but python may surprise you on that
that is, I often think I can outgolf somebody and think of a clever method and then oops it came out too long without me realizing it
Hopefully Python's still today :)
A 59 one has appeared
Which challenge
11:12
The new one
Also what are the three most important (?) list methods? map, reduce and all right?
reduce is from functools, so i'd say no
all,any,map and zip
Because you have to import functools
nvm I thought you were talking about something else
btw you don't have to import functools in python 2 ;)
@EriktheOutgolfer 49 bytes
if it works post it
11:19
I now think I mad a mistake :)
@EriktheOutgolfer Posted
@Mr.Xcoder all other languages have it builtin though, it's just guido is weird
@Mr.Xcoder *46
@ASCII-only Thanks
Why is my answer ignored?
@Mr.Xcoder and now down to 41
@EriktheOutgolfer You golfed it down to 41?!
it's a bit different than the python answers already in
11:23
Including mine?
@Mr.Xcoder yeah printing newline-separated
@Mr.Xcoder yes
@ASCII-only May I borrow that?
<joke>
heh rod did it in 36
11:31
but that's python 3
@EriktheOutgolfer it's a polyglot
ohh boy here comes an excel answer o0
@EriktheOutgolfer Not much of a difference
@ASCII-only ikr
CMC: Do it in Charcoal :P the shortest way will probably be repeated calls to input
11:36
I got mine down to 41 :)
@Mr.Xcoder full program right?
@EriktheOutgolfer Yep
oh my...that's byte-by-byte my approach
@EriktheOutgolfer This one:
l=input()
while l:print l[0];l=l[l[0]+1:]
even the l is the same
11:37
@EriktheOutgolfer I read minds :-)
@Mr.Xcoder yep
Hmm any idea for operator chars for all/any/zip in charcoal?
Or overloads where they'd make sense
zip is of course a zip
there's gotta be a character that looks like a zip
@ASCII-only not overloads
Anonymous
The pains of trying to use PPCG to practice a new language: 1) See a new, interesting challenge. 2) Write a solution to said challenge, after spending 15 minutes looking up stuff. 3) Look at challenge again, and see an answer in that language posted 14 minutes ago that drastically outgolfs your solution.
Anonymous
11:41
@totallyhuman ¥ kinda does
@Mego you mean 14 hours ago?
Anonymous
@EriktheOutgolfer I don't know how someone would post an answer before the challenge is written.
well, for me new challenges are posted some >10 hours ago
because I need sleep too
oh great somebody upvoted my brainfuck answer to 49 votes
just... there at 49
Anonymous
I should do PE instead so that I don't have to see how badly I get ninja'd/outgolfed
11:43
@totallyhuman Believe me, you feel much worse at 89.
@Mego what's pe?
@Mego Good luck PE is like 100x more complex than PPCG
Anonymous
Project Euler
you don't even need to write the program at all there just use google
unless you want to challenge yourself
11:45
@EriktheOutgolfer The best part of PE is to not use Google :(
Anonymous
@Mego that's not really you is it?
I'm not even Level 1
Anonymous
@EriktheOutgolfer It is
11:47
@EriktheOutgolfer Of course it's him
Anonymous
I haven't done PE in a long time (I think since the newest was in the 300s)
@ASCII-only jeez
@totallyhuman Well not really that surprising since he does puzzles over at Puzzling a lot and is really good at Code Jam as well
Oh my god @Sp3000, you're a PE god
@ASCII-only Code Jam?
11:52
Hm? Oh hey
hasn't been here in a while though
@Sp3000 Wait what do you always lurk here
I'm just next door most of the time, but yes I do lurk here too nowadays
11:54
@Sp3000 Why did you kind-of stopped posting on PPCG?
(next door being Puzzling)
Also I forgot to try and stalk you like two weeks ago when I was on holiday (damnit I really should have)
A combination of full time work and too many things I've been wanting to do
(mostly the former)
Oh, I see. We want you back :)
@totallyhuman i got ninja'd by lag
12:01
@Mr.Xcoder no, that's in the comment of the fast inverse square root
whose code I borrowed
Oh, ok
I was wrong :(
Fast inverse square root, sometimes referred to as Fast InvSqrt() or by the hexadecimal constant 0x5f3759df, is an algorithm that estimates 1/√x, the reciprocal (or multiplicative inverse) of the square root of a 32-bit floating-point number x in IEEE 754 floating-point format. This operation is used in digital signal processing to normalize a vector, i.e., scale it to length 1. For example, computer graphics programs use inverse square roots to compute angles of incidence and reflection for lighting and shading. The algorithm is best known for its implementation in 1999 in the source code of Quake...
Could you imagine assembly winning anything?
it won this one
Anonymous
12:07
I finally got around to getting the Pi achievement on PE
12:23
Can anyone here read x64 assembly? Trying to understand some objdump -d output
hi
@LegionMammal978 me
0000000000000870 <compiledFunction1>:
 870:	48 8b 02             	mov    (%rdx),%rax
 873:	66 0f ef c0          	pxor   %xmm0,%xmm0
 877:	f2 48 0f 2a 05 d0 07 	cvtsi2sdq 0x2007d0(%rip),%xmm0        # 201050 <I0_0>
 87e:	20 00
 880:	f2 0f 58 00          	addsd  (%rax),%xmm0
 884:	31 c0                	xor    %eax,%eax
 886:	f2 0f 11 01          	movsd  %xmm0,(%rcx)
 88a:	c3                   	retq
Pretty sure it does something with floating point
iirc it's supposed to add 1 to something
Just not sure what these instructions do
what is rdx?
idk, probably set before calling
what's it set to
12:25
lemme look
Hmm, couldn't find an outside reference, here's the full command and output
Maybe it's just called externally, due to it being a .so?
I'm not sure
you should decompile with something like
@NoahCristino Couldn't find anything for that costing less than $560 or something
IDA
nvm that's expensive
I got a free one
OllyDbg
you can run line by line and see how the registry changes
12:30
@NoahCristino Doesn't seem like it would work with ELF
it does
just try it
But yeah, you know what pxor, cvtsi2sdq(?), addsd, movsd do individually?
try google
...
this doesn't make much sense
one sec I'm busy
Anonymous
12:40
@LegionMammal978 cvtsi2sdq converts an int to a double
Anonymous
pxor is bitwise XOR, addsd and movsd are add and move for scalar double-precision values (fancy SIMD way of saying "do this on the float in the lowest bits and not all the floats in parallel")
Anonymous
So the assembly reads (line-by-line) as: 1) move the value pointed to by %rdx to %rax. 2) XOR %xmm0 with itself (effectively zeroing it). 3) convert the value stored at mem[%rip]+0x2007d0 from an int to a double and store it in %xmm0. 4) I have no idea? 5) Add the value pointed to by %rax to %xmm0. 6) Zero %eax. 7) Move the double from %xmm0 to the location in %rcx. 8) Return.
Anonymous
So it looks like it takes input as a double* in %rdx, stores it in %rax, adds the int value at some memory location, moves the result to a value pointed at by %rcx, and returns.
Anonymous
If that memory location has a 1 in it, then yes, it adds one to a double (using pointers).
I now have +7 on a Jelly FGITW answer and +1 on a PHP answer I actually put some amount of effort into. Why does voting have to be like this -_-
12:56
🤷‍♂️ "omg lolz this is so short is this real codez xD +1"
Probably HNQ effect
THe one I answered with Jelly was 7 times as many answers
2
A: Float 754 to Hamming

ThePirateBayC (gcc), 63 bytes f(double d){long s=0,n=*(long*)&d;for(;n;n*=2)s+=n<0;return s;} This solution is based on @LeakyNun's answer, but because he doesn't want to improve his own answer, I'm posting here more golfed version. Try it online

> This solution is based on @LeakyNun's answer, but because he doesn't want to improve his own answer, I'm posting here more golfed version.
Did anyone see that comment?
1
Q: How Cloudy Is It?

Beta DecayChallenge Given an image of the sky, you must output the cloud cover in oktas. The image supplied will be an image file (the type is up to you) and the output should be to STDOUT. Oktas In meteorology, an okta is a unit of measurement used to describe the amount of cloud cover at any given loc...

@LeakyNun The PPCG mods might be able to tell you if the comment was posted and deleted for some reason.
@Dennis please help me :p
also, it's actually not that hard to do the challenge without using bithacks
Anonymous
13:05
@LeakyNun This is an English-only chatroom. Please refrain from using non-English languages.
@LeakyNun You can see the comments that person has posted - a quick glance at the recent ones seems to rule out them accidentally posting the comment on the wrong answer, so deletion is the only other explanation I can think of. Unless they say comment but actually mean suggested edit - which could have been rejected by others before you even saw it. (Their rep makes this a possibility)
@trichoplax thanks
@Mego so he's lying...
@Mego Thanks - I was just trying to work out how to find that page...
13:09
or the comment somehow didn't get sent out
This is a thrilling mystery.
Anonymous
@LeakyNun Or the comment existed but was deleted. Only a PPCG mod would know for sure, and I don't think they'd give out that information without permission from the user.
@LeakyNun Perfectly plausible that a comment would have been lost along the way. Not so plausible that they saw something indicating you rejected it
@Mego right, I forgot that possibility
but as trichoplax says, he wouldn't have seen me rejecting the comment
Since posting a golfed version of someone else's code isn't against any rule, there doesn't seem to be anything against site policy here, just the impression of deception. I'm going to assume there's an innocuous explanation I can't think of for now.
Anonymous
13:12
They could have interpreted not implementing the suggestion in X amount of time as rejecting the suggestion.
Anonymous
I think that's probably what happened - impatience got the better of them.
@trichoplax I didn't say there's a problem with him posting a golfed version of my code
trying to learn a little hexagony
I'm just curious because he said that I rejected his comment, which is impossible to being with
not sure what's going on here
13:17
@Mego so you're suggesting that he deleted his own comment?
the last ^ should move to the left neighbor
because -4 is at the MP
@Poke what's the intended output?
I was trying to do a simple 3%4
so the output should be 3
Hey I just wanted to share my meta answer, because I'm interested in discussing its contents with the community. I get the feeling it has only ben viewed a few times and I just wanted to make sure we have a full discussion.
think i'm still missing a piece of the control flow or something
13:18
@Poke you can use a backtick to debug
@LeakyNun Of course - I wasn't disagreeing with anything you said, just pointing out that the apparent poor behaviour isn't rule breaking
@LeakyNun that hasn't worked for me on tio
Anonymous
@LeakyNun Or it was deleted by a mod (possibly via flags)
@Poke after three ^ you should have got to a place you haven't visited
because ^ should have cycle 6
@Poke but the memory should have 3, 1, and -4 after all the parentheses...
@LeakyNun As far as I can tell there are infinite memory edges. ^ is supposed to move to the right neighbor if the current value is positive and to the left neighbor if the current value is 0 or negative
so when the current value is -4 i would expect to move back to the 1
i guess i can test if i'm thinking about this correctly with curly braces
13:22
@Poke no it wouldn't
user image
6
1 is where you start at
right turn takes you to 2
another right turn takes you to 3
Is this Hexagony?
yes
then a left turn takes you to 4
oh...
that makes more sense
and is way more confusing in general
haha
and i should have done the picture with two hexagons
if you can see it
13:25
yeah i see what you mean
@LeakyNun +1 for the high quality professional graphics design
wow it's pretty tricky to get back to the edge you want
@LeakyNun +1 for precious art
@MartinEnder I have renewed appreciation for anything you write in this language
@EriktheOutgolfer do the float challenge in Pyth?
13:27
so if i go to my right neighbor 6 times, i should get back to where i started?
@Poke yes
excellent
You mean +★
@betseg lol
13:33
did someone say Hexagony?
@MartinEnder please investigate the incident earlier lol
35 mins ago, by Leaky Nun
Did anyone see that comment?
@MartinEnder Yes.
10 mins ago, by Leaky Nun
user image
No, nobody can say that name without confusing themselves
wait hexagony is a property of geometrical shapes or something? :p (did I spell that right?)
Is the name Hexagony a play on Hex-agony?
13:36
@EriktheOutgolfer I don't understand the question and yes, respectively.
@LeakyNun Just re-read the docs. I need the -d flag for backtick annotations
@Poke it's easier if you use the unconditional MP-movement commands :P
What is geometry?? What is a hexagon??? /s
@officialaimm Hexagon and agony, probably.
@Poke I think that doesn't work on TIO though because the way I implemented the flags is stupid
13:37
@MartinEnder yeah just trying to teach myself how it all works. not sure why i started with ^
@MartinEnder Easier =/= golfier
@wizzwizz4 I mean, well, I thought hexagony is the property that defines if a shape is a hexagon or something?
same byte count usually
@EriktheOutgolfer That's this.n==6.
@officialaimm yes
13:44
stupid PowerShell
2 days ago, by AdmBorkBork
PowerShell is great and does all things.
They're not mutually exlucsive
Finally got silver code golf :)
13:52
After such a long time, I am here....
Are you really
Or is it all an illusion
I wonder whether anyone thought I was dead. :P
But maybe I was not popular enough to be the subject of someone's concern. :P
Nor will I ever be.
@LeakyNun hmm...was reading about ieee 754...couldn't cope with it
that is, well, I have stuff to do with my life
Gtg, bye
@EriktheOutgolfer I'm not sure what you mean by base encoded?
14:04
@MartinEnder it seems your 8-byte alice answer is using base-10 string input (e.g. "12345" instead of [1, 2, 3, 4, 5])
no it uses code points
12345 is [49, 50, 51, 52, 53]
it can represent any integers that correspond to valid unicode code points
oh so it would be "\x01\x02\x03\x04\x05" or something?
(so most integers up to 1114111)
@EriktheOutgolfer yes
not sure if that would be valid...what is alice's natural integer upper limit?
alice uses arbitrary precision integers
14:07
hmm...default consensus seems to be that you have to support more than 1114111 then...
fair enough. an upper bound on the input values in the challenge would make sense though (2^31-1 or something)
I don't think an upper bound like 2^31-1 would be fair to all languages
also there's the no abusing datatype bounds loophole
btw 1114111 would still be too small if I put an upper bound
14:40
1
Q: Compute the Matrix-Vector

AdmBorkBorkGiven an integer array of at least two elements, output the Matrix-Vector (defined below) of the array. To compute the Matrix-Vector, first rotate through the size-n input array to create a matrix of size n x n, with the first element of the array following the main diagonal. This forms the matr...

@LeakyNun There was a comment, but only for six minutes.
Hey is there a use case in golfing where somebody would need to cast an int to a float?
How do you search for forward slash / in chat? (when combined with text)
@totallyhuman In CJam, / does integer division if both arguments are ints, so sometimes you have to cast one to double
ie /text in search currently searches for text, as far as I can tell
14:52
@BusinessCat separate command for integer division so doesn't apply for intrnt
Then probably not
Usually the language would know e.g. 5 == 5.0
@BusinessCat that depends though, if floating point isn't exact some langs don't equate that
!google Python custom class splat operator
Wait wrong chat room
Jeez, @EriktheOutgolfer, save some languages for others. ;-p
@AdmBorkBork sorry wrong person
:p
 
1 hour later…
16:35
387 messages moved to Cryptic hunt
2
That's certainly a record.
Lol :D
I probably moved a few wrong ones in there, but there were so many I didn't want to bother to pick through them
@DJMcMayhem It's okay :)
@DJMcMayhem They can always be moved back later.
@programmer5000 Totally love your cops and robbers challenge. I'm looking forward to the reverse challenge as well: find the input that hangs the program. Suggested title "Just hangin'"
16:55
Holy crap! I wrote up a solution, and then scrolled down to post it, but it turns out we wrote the exact same solution byte-for-byte! Even minor details like ({}[()]<{}>) vs ({}<{}>[()]) were the same! What a coincidence! — DJMcMayhem 29 secs ago
That was weird haha
17:08
haha
CMC: unary (in number of zeros) to nullary
hey i feel like i missed something in this challenge. can anybody find anything glaringly bad?
@totallyhuman Answer my CMC and I will read it
:P
i don't do unary or any bf derivatives like that
Ellipsis
17:37
intput = lambda s:int(input(s))
@totallyhuman wat is that
also why is it spelled intput
that's the devil called Python
@Christopher it gets an int input...
@StepHen dumb
me
Dang it
@StepHen answer my CMC plez
@totallyhuman why are you passing s to input()?
@Christopher I dunno BF
17:39
@StepHen don't need to
The argument to input is the prompt given to the user
it has instructions on the URL of how to do it @StepHen
@BusinessCat oh duh I forgot since we're always golfing
Yes, sometimes it's beneficial for the user to understand the program
although i should make it default to an empty string...
17:41
Except I put golfed code into my interpreter anyway
intput = lambda prompt = '': int(input(prompt))
Like p=lambda s:[s[:1]+t for t in p(s[1:])]+p(s[1:])if s else [s]
I'll give a cookie if someone figures out what that does without running it
I just had a chocolate chip cookie with Nutella and bacon on top, and I think I can feel my arteries clogging ...
9
@AdmBorkBork O_O that sounds amazing
did you make it?
that sounds scary tbh
>>> intput = lambda prompt = '': int(input(prompt))
>>> intput('halo enter number plz: ')
halo enter number plz: 42
42
>>>
17:44
@Christopher No, from a food truck outside.
and yes, it was amazing
but oh so not good for ya
@AdmBorkBork THEY HAVE FOOD TRUCKS WITH THOSE
I NEED TO MOVE
Sure. The Twin Cities has a very rich food truck scene.
"twin cities has" sounds so weird
Yeah, it took me a while to get used to referring to the Twin Cities as a singular noun.
Huh. I may actually be visiting there
I WILL FIND THAT CART
17:51
truck
Two php answers for challenges in a couple hours. Feeling good
php is not the work of man
:P
Yesterday I used PHP for an answer solely because I needed PCRE
And Perl looks like BF
I have so much fun explaining php to new programmers
"What do you mean everything is a string"
17:53
PHP has the best worst features
"What do you mean you can use a variable without initializing it"
I love that you can do $c = b; $$c = 5; echo $b; and it outputs 5
@Xanderhall That's one of the things that keeps PowerShell competitive when it comes to golfing
Because that just makes perfect sense and is a totally useful feature
"What do you mean $f = 'doSomething'; $f($input) works"
17:55
also PowerShell, but not used very often for golfing
not storing a function in the variable. Storing the name of the function, and then using that variable to call it
@AdmBorkBork You are a beautiful person
Also $s = "test";echo ++$s; outputs tesu, 10/10 useful feature
thanks
@BusinessCat OK, that's just weird
17:56
@BusinessCat That feature is used for incrementing through string values. Think Excel
When would PHP interface with Excel?
for($foo = 'a'; $foo <= 'z'; $foo++)
Not saying it would, just saying it's kinda like Excel going through rows.
I did have to output a CSV file through PHP once, tho.
I once used PHP to open a .xlsx as a zip folder and read the contents
Because why not ¯\_(ツ)_/¯

« first day (2372 days earlier)      last day (2766 days later) »