« first day (2309 days earlier)      last day (2559 days later) » 

6:25 AM
I lost 40 rep yesterday because a user was removed
@KritixiLithos Almost everyone lost some
There was some serial voting stuff going around
oh I remember now
I, however, gained 28 rep :P
@NewMainPosts if only it was code-bowling *sigh*
@MDXF ... Did you even try golfing it
'course I did
It's pretty golfed :P
6:33 AM
@MDXF Then why do you have a full dictionary
I mean, I'm golfing it more, but still
Complete dictionary = not golfed at all
It's more/less the only way to do that sort of thing in C...
@MDXF Uh no?
Almost everyone uses a simple hash
tfw you realize you named a variable buf in a code-golf solution :tableflip:
@ASCII-only really? link?
6:37 AM
A: Tweetable hash function challenge

ASCII-onlyPython, 6390 6376 6359 H=lambda s:reduce(lambda a,x:a*178+ord(x),s,0)%(2**24-48) May be considered a trivial modification to Martin Büttner's answer.

Q: Opposite of code golf

gregsdennisIs there a version of code golf that requires the most convoluted solution instead of the tersest? I think it might be humorous (and informative) to see answers that exemplify the worst of some languages and architectures. Rules: largest code base wins scoring is the same as golf (byte count,...

Not exactly the same thing but just use the right size and index into an array
@MDXF btw at least steal the first char of input, reduces length by like 100
@ASCII-only What do you mean?
@fergusq Building the newest commit gives a build error
int main(){gets(b);puts(m[0].b);for(i=1;m[i].a;i++)if(!strncmp(m[i].a,b,strlen(b)-1))puts(m[i].b);}
Then remove the first char from both keys and values
6:48 AM
Whoa, thanks
Definitely gonna try that
@MDXF Also only compare the 2nd to 6th chars
Wait, why puts(m[0].b); at the start?
@MDXF Because the first letter of state and abbreviation are guaranteed to be the same
@ASCII-only No, I understand, but wouldn't it be putchar(b[0]);?
@MDXF oh whoops
@MDXF sorry wasn't thinking
6:52 AM
or printf(&b[0]); using C hacks
@MDXF doesn't &b work
also if it helps you can restrict to 2nd-7th letters
I'm back!
@Phoenix @Downgoat I was suspended for 30 days, not 7
@Phoenix I've been here the whole month
@Downgoat What did zyabin do?
@Dennis Please thaw this room:
7:08 AM
@ASCII-only thanks a bunch :D
Mego: Already posted python answer
Me: Still downloading PyPy
7:27 AM
;_; I really need PyPy to be able to find a valid solution
You sure? I did it with CPython just fine
I'm doing it differently
Q: Unsigned Int Greater Than Comparison Using Only Bit-wise Operators

Akshay KaloseWrite a C function with the header: unsigned int greater_than(unsigned int a, unsigned int b); Assumptions: Each 4 bits of the int is from 0x0 to 0x3. Example: input: a: 0x01230123 b: 0x32103210 output: 0x00110011 Conditions: Use only regular arithmetic and/or only bit-wise operators.

Code golf: the one place where making your own hash function is actually beneficial
It's always fun when you write a solution that's half the length of the current solutions
7:33 AM
It was when I submitted it, so that's what counts for me :P
Also my Actually solution is nearly half the C solution's current size, so my statement still stands
357*2 != 660
> nearly half
7:36 AM
But what counts as 'nearly'?
Apparently, >50 bytes over
Now it's 232, so well under half
Happy now?
Nice golf, though
I don't know why I didn't think of doing that in the first place
7:40 AM
Would this count as a valid solution to this challenge? Not really sure, so posting it in chat first
Does it do anything?
It's a function which returns basically nothing
But printed as a string, it is (null)
You could blow every other C solution out of the water
But it's not f that's doing the printing...
without the main implementation it would print nothing
idk if this works
Returning is a perfectly fine way to output.
7:43 AM
Now for my next trick: another 51 bytes off
Darn you, mego...
So, you think it's valid?
I guess so...
Have fun with +100 rep :P
See if Dennis calls you out on it
Gotta try I guess :P
@Okx I don't think so, not without the program harness. Nothing is actually returned - it's just a quirk of the compiler and runtime that (null) is printed for the return value function that does nothing.
7:44 AM
but would that still technically be the output of it?
No, the output of that function would be an int (by default return value rules), though it is undefined what gets returned (I guess 0?)
With %i, 0 is printed
So IMO it's more the printf implementation that's doing the work
@ASCII-only Your Python solution to the states challenge is very clever and a much better way of going about the problem than mine, nicely done
7:48 AM
@Mego haha thanks
@KritixiLithos I forgot a file from the commit. Fixed it.
I have like three different searches going on to find better solutions
But I like mine because it (ab)uses byte-strings :P
Wait I can do RLE compression on the whitespace
@Mego watch me golf 44 more
Dang yours is still way shorter though
Which one? Python or Actually?
@Cyoce My vote is solely based on Python syntax :P
Wait whoa
Is anyone else getting an error going to their profiles?
@Mego but doesn't Python support that too?
We apologize for any inconvenience, but an unexpected error occurred while you were browsing our site
7:56 AM
@Cyoce I don't think so. It might be a new-ish feature (in 3.6 or something) that I'm not familiar with
@MDXF Nope
Huh. Seems I never finished learning 3.5
8:13 AM
oh boy only 6 rep away from hitting 1k
@Mayube ok i will serial down vote no worries
@Okx 👍
8:31 AM
Q: What's going on with my account?

MD XFWhenever I try to go to my user profile I get redirected here. I can't view achievements or reputation changes (in the top nav bar), but I can view inbox messages. This has been happening for about an hour. I asked TNB if anyone else was experiencing this, no one was. What's going on?

predicts future @Mayube is about to hit 1k
Oh wow, lookit that! Mayube hit 1k!
@MDXF you were supposed to serial downvote
@Okx Welcome to PPCG Chat! Before chatting, please read The Chattiquette and how to Be Nice! Thanks, and I hope you enjoy your time here!
*mic drop*
@MDXF but i already chatted
8:46 AM
woo there it is 1k rep :D
@Mayube, with specific emphasis on the last example
I'm at 997 rep! Only one more vote needed to hit 1k! hint hint... = utter garbage, and add nothing to the site, the chatroom, or the community.
@MDXF Be Nice.
@Mayube Congratulations! :D
Grats, Mayube :)
9:03 AM
@MDXF That person has been here for months...
codegolf.stackexchange.com/q/122896/65532 this question is tagged with kolmogorov complexity, but is it actually? tag wiki: "kolmogorov-complexity is not about challenges that produce a string that varies depending on a parameter!"
The tag wiki is wrong
@numbermaniac I'd say it is because ultimately kolmogorov complexity is about string compressability, and that challenge is about string compressability too kinda
;_; blod socer was a fail
blodsocer must commit sepuku now probably
@DestructibleLemon you didn't build that in so it has to suffer for all eternity
9:23 AM
Wanna hear a nerdy joke?
"In Mathematics, 0!=1, in computer science, 0!=1." - source
you forgot the "What's up with that?"
@flawr That is correct. 0 factorial is equal to 1.
it would've been easier to read had he used inline code snippets
In mathematics 0! = 1, in computer science 0 != 1
9:30 AM
that would spoil the joke :)
9:44 AM
Q: Memory allocated for block of code

MaatouqI know it's off-topic but I googled it al lot and asked on many communities how do you find size of memory allocated for your whole program Or just block of it Do you calculate it manually or using a tool especially in languages . C,php ,python I'm sorry ,I'm newbie nd it's important ...

9:54 AM
@NewMainPosts If you know it's off-topic, why post the question?
@Mego Also, I posted an answer to your question (I outgolfed the other Clojure answer! :D)
10:08 AM
How do you guys calculate memory allocated for your program or just block of it ? Do you calculate it manually or using a tool especially those who use python , c , php
@Maatouq I can't imagine most of us have ever had to calculate allocated memory
@Maatouq Task Manager :P
@Maatouq What you probably want is a profiler for whichever language you're using
@Maatouq I haven't calculated allocated memory before for Python (only language of three languages given that I know how to program in), but a quick google search gave me this SO question, which has links to lots of tools.
10:29 AM
@Qwerp-Derp what I really mean when you guys write a solution for puzzle you writ as ex
@Maatouq ???
@Qwerp-Derp what I really mean when you guys write a solution for puzzle you writ as ex php 39 byte
Yeah, but your post was more like a general programming question, as opposed to a challenge.
What exactly are you trying to ask?
@Maatouq That's code length, not memory used btw
@ASCII-only you mean it's just size of text file
10:34 AM
@Maatouq pretty much, it's a better way of measuring code length than characters, because some languages use Unicode characters that are more than 1 byte
@Mayube thank you
Oh, that's what you mean
Whoops, sorry :P
@Qwerp-Derp never mind it's ok :))
10:53 AM
A: Sandbox for Proposed Challenges

ShaggySet The Shapes code-golfarray-manipulationmath Updated on 23/05/17 with new shapes & questions Challenge Let s be the sequence of polygonal numbers with S sides and t be the sequence of polygonal numbers with T sides. Take the set union of the first n elements of s and the first n element...

Need a few people to look over that for me and answer the questions, please :)
@TuxCopter 'Lo
11:17 AM
I did something to break something
And I don't know what either something is :D
sigh SO is kind of cancer, in the fact that people don't comment about why they downvote...
@totallyhuman it looks like you just took a snapshot and drew over it
Something's actually broken
reboot your device?
11:32 AM
what should I call my welcome to the dungeon koth?
@totallyhuman is it only in the SE app?
o i know
Dungeon of Botdom
because the original was Dungeon of Mandom
I'm not sure which items to use though
@DestructibleLemon What happened to your maze KoTH?
Or is this the same thing
Everything >_>
11:33 AM
it kinda just dissolved
it was too hard for me to make a bot, and I developed the darn thing
this is simpler
tfw Dennis gets stars just for a sigh
(no he got it for an intentional typo joke)
it was qutie amusing
but he has got stars for other sighs too right?
don't think so
also why does everyone call things cancer so often. seems kinda insensitive
he has even got stars for an emojp (not emoji) I think
11:44 AM
@DestructibleLemon Hmmm, it's just the internet, I think.
(you're one of those people)
(just in case you forgot)
A: Sandbox for Proposed Challenges

Destructible LemonDungeon of Botdom Bots will play a variant of this game: https://boardgamegeek.com/boardgame/150312/welcome-dungeon (Our version will be played by one bot versus another bot, and there will only be one character, which may or may not be in the actual game, and it will be repeated a bunch.) Es...

;-; I'm not that slow
too slow, sandy
I forgot you existed
hey, person who starred that message? instead can you comment on my sandbox post
i don't know, it'd just be nice
12:01 PM
Q: Generate many addresses from one address line

newguySame question posted on https://stackoverflow.com/questions/44199250/generate-many-addresses-from-one-address-line?noredirect=1#comment75413933_44199250 but I didn't find any solution so I am here. If you think this question is inappropriate for this community let me know I will delete it. So t...

Q: My [sub] strings are hiding!

Notts90Introduction A while ago a lost SO user posted a question here and its now been deleted but I think it would make a good challenge so here it goes... Challenge Write a full program or function that takes two strings and checks whether any permutation of the first string is a sub-string of the ...

12:17 PM
@EriktheOutgolfer they appear to still be here for me (using CaretReply). It seems to work (viewing using ChatPreview).
sent using EmojiButton
¯\_(ツ)_/¯ (using ChatCommands)
ooh suddenly they appeared again
ooo :D
12:35 PM
i like how my idea about starbait-trolling is still getting stars
12:48 PM
why is this place so quiet ;_;
@HyperNeutrino IDK
(btw that's everyone's cue to make this place un-quiet)
Yay, tacoscrips!
@HyperNeutrino No, taco scrips
12:51 PM
Shh, I'm on a phone
idea: make a tacoscript to star the -nth message using n stars
star -> asterisk
so like *** would star 'o.o'
(also ninja-proofing ofc)
1:02 PM
screams into the void
You can use ^^^*
That's a part of caret reply
ooo cool
can you also unstar with caretreply?
1:05 PM
I think it should work
Also, idea: make tacoscripts officially endorsed by the ROs
@ATaco pls no
Endorsed is not enforced.
@ATaco also idea: make tacoscripts offivially endorsed by SE
1:06 PM
except the emoji button 🙃
Emoji button was removed from the git
Anyway I'm going to sleep now
aw man i tried to abuse caret reply and star my own message
@totallyhuman because i can abuse that and reply to my own message
I shall be having a Fire Drill in about 5 minutes.
1:09 PM
So I may suddenly disappear for a bit.
i just had an evacuation drill
ooo for what
@HyperNeutrino not possible
1:10 PM
@totallyhuman uhm what was the syntax for that one again
/ s h r u g
if you have ChatCommand
this isn't discord :P
1:11 PM
eh what
Allow deletion using CaretReply (something like ^^^DEL)
or wait better
just negate the message
1:13 PM
not typable 0/10
the best would be carets + literal delete key
Fire drill will be very soon (hehe i don't like this song just felt like linking to it because why not :D)
don't have a delete key 0/10
@totallyhuman lol then don't use a mac
1:15 PM
nope try again
isn't alt-backspace == delete on mac?
or is that chromebook
@HyperNeutrino i wouldn't be able to use userscripts then :P
alt-backspace is the usual ctrl-backspace on Konsole
1:15 PM
@totallyhuman >_> i'm dumb
@HyperNeutrino ding ding ding
then use alt-backspace
extra keystroke 0/10
as code golfers...
~ requires two keystrokes too
1:16 PM
...fair point
the negate thingy requires even more
because I can't even type it normally
for me, only two
depends on layout
1:17 PM
intl US?
...it's a chromebook variation of it "US Extended"
ah ok
the fire drill was supposed to start 3 minutes ago...
there's also the international version
Ah. OK.
1:18 PM
ah ok -> Ah. OK. what happened
looks for how to make a KOTH challenge
@totallyhuman lol idk
is still confused
any suggestions on what to see before making my first KOTH?
the sandbox
1:34 PM
Jan 28 '11 at 4:35, by Feeds
Welcome to chat for: Code Golf
first message :P
If the husband of the prime minister of Luxembourg is the "First Gentleman" of Luxembourg then which gentlemen is the prime minister himself?
@betseg 0-indexing
The prime minister, I would presume. The husband of the prime minister cannot be the prime minister unless one can marry him/herself; then, it would not make a difference.
@totallyhuman what ideas do you have?
1:37 PM
@PhiNotPi then who is the zeroth lady of the US? :OOO
a checkers KOTH
1. check if there is an active KoTH right now. I don't think so but having two active KoTHs at the same time is usually not a good idea.
@betseg take a guess (lol)
@betseg the husband of the first husband acording to wikipedia
@totallyhuman I'm working on a KoTH right now if you post first then I'll wait until yours becomes less active and probably vice versa. Yours will be considerably easier than mine so if they're both posted then yours will probably get more answers but I'm fine with that :)
1:41 PM
no i'll wait
it'll probably take longer for me to get it right
no it's fine I probably won't finish my controller until like a week from now (because I don't want 50 bugs in it like last time :P)
and the rules of my game (chinese chess) are more confusing than checkers
@Mendeleev oh >_> idk if I should discuss, but in that context it just means to "leave TNB because of suspension"
I'm not sure why this was deleted 4 years later: codegolf.stackexchange.com/q/15668/45151. It had a ton of answers and I think would have been of more value as a signpost anyways
@ConorO'Brien @Riker @HyperNeutrino
@quartata It seems to make sense now so I'd actually undelete and reopen now (I think at the time I deleted it I misread something about it). One question that I have though is, how do you input a real number? You can only input rational numbers unless you require infinite input.
1:54 PM
If the language supports it, symbolically
but really that just means that it should in theory work on a real number.
Makes sense.
I do think it should stay closed in its current form but I also think it would have been trivial to edit it a little bit to make it better
In fact I might just do that
I agree. I've voted to undelete and reopen it because it makes sense and doesn't seem unclear to me but some edits might be nice as well. In fact it could be a considerable idea to repost it.
...since when do we need 4 delete/undelete votes?
I thought only 3 were needed. Weird.
1:57 PM
ohhh I remember now
See this is to prevent things like this from happening
oh :I
It scales based on the top answer's score
A: Should delete votes be limited like close votes?

Jarrod DixonWe had discussed this before, but deferred until there was a problem - it seems we now have a problem :) The new rules (also apply to undelete votes): 10k rep users get 5 deletion votes per day on questions they don't own - deletion rules on questions one does own are still in effect. Popular ...

Ah, makes sense.
1 more vote
Any reopen votes?
Good day
CMC: Take input until given a char not equal to the very first one given, then terminate. As input is infinite it must be from StdIn.
@HyperNeutrino whats happening!
A CMC, as you can see.
2:26 PM
Q: What color is this?

I like my dogYou are to golf a program that will take a filename as input and you must output what color the file is. The file will have any one of these extensions but your program only needs to support one. Please say which one in your answer. .jpg .png .svg .gif And now to the classic layout. Input ...

@Phoenix I will first answer ∧ and then come to your CMC
Chat mini challenge
@KritixiLithos I'm thinking of how to answer it myself, I've never used ImageMagik before tho so it's a bit of a pain.
2:29 PM
Java, too many bytes: class M{public static void main(String[]a)throws Exception{int i=System.in.read();while(System.in.read()==i);}}
I'm using Processing
when you do a CMC in Java ;)
@Phoenix 05AB1E, 5 bytes: [¹IÊ#
@Phoenix Braingolf v0.7, 10 bytes [{e?E:$_|]
@Riley Does 05ab1e not have a builtin for reading a single char without consuming the newline?
2:35 PM
@Phoenix I thought you meant until a line was not equal. Either way, I don't think you can read a byte at a time.
@Phoenix Solace, 9 bytes: k{$k=}{}U This would be shorter if I bothered to finish the language
Oh wait
I misread
k{$k=}{}W Should work instead
@HyperNeutrino Did he get banned?
suspension, nvm shouldn't discuss it
2:41 PM
y'know @HyperNeutrino I'm surprised you haven't made your own golfing language, you seem like the kind of person who would :P
Why do I seem like someone who would?
This is an esoteric language though it's not very golfy. It does operate in a fairly interesting manner though.
Oh I should upload my postfix language so I can actually use it.
2:45 PM
it's kinda horrible though because I made it before I knew how to code design properly ;_;
sorry my d key's broken :/
(again, I'd already beaten it once :P)
here, now I have to update my open-ended bounty
2:59 PM
Please star this:
Q: What are the PPCG specific abbreviations?

AdámNewcomers to PPCG are often compelled to ask what many of our abbreviations stand for. Let us list them here so this information always will be easily available.


« first day (2309 days earlier)      last day (2559 days later) »