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:

6:37 AM
3

Python, 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.

0

Is 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
np

@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?

### Open PPCG Minecraft Server

Rules & Info: goo.gl/GfE3C8 Relay: goo.gl/9NQvFo Status: goo.g...
Thanks

7:08 AM
@ASCII-only thanks a bunch :D

Anonymous
:)

7:27 AM
;_; I really need PyPy to be able to find a valid solution

Anonymous
You sure? I did it with CPython just fine

I'm doing it differently

0

Write 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.

Anonymous
Code golf: the one place where making your own hash function is actually beneficial

Anonymous
It's always fun when you write a solution that's half the length of the current solutions

7:33 AM

Anonymous
It was when I submitted it, so that's what counts for me :P

Anonymous
Also my Actually solution is nearly half the C solution's current size, so my statement still stands

357*2 != 660

Anonymous
> nearly half

:P

7:36 AM
But what counts as 'nearly'?

Apparently, >50 bytes over

Anonymous
Now it's 232, so well under half

Anonymous
Happy now?

-_-
Nice golf, though
+1

Anonymous
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)

OH WOW
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.

Anonymous
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

Anonymous
@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
hm
but would that still technically be the output of it?

Anonymous
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?)

Interesting.

Anonymous
With %i, 0 is printed

Anonymous
So IMO it's more the printf implementation that's doing the work

Anonymous
@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

Anonymous
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

Anonymous
Which one? Python or Actually?

Anonymous
@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

Anonymous
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

Anonymous
@MDXF Nope

So 3.5 I guess

Anonymous
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
0

Whenever 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*

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.
:P

Anonymous
@MDXF Be Nice.

Anonymous
@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.
:P

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
-1

I 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?
sigh

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 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
1

Set 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 :)

hello

@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...
3

@totallyhuman it looks like you just took a snapshot and drew over it

Nope
Something's actually broken

Tried

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

Nope

@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)
0

Dungeon 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
2

too slow, sandy
I forgot you existed
4
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
0

Same 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...

0

Introduction 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 ...

wait where did the tacoscripts go?

user165474
12:17 PM
@EriktheOutgolfer they appear to still be here for me (using CaretReply). It seems to work (viewing using ChatPreview).

user165474
😄

user165474
sent using EmojiButton

user165474
¯\_(ツ)_/¯ (using ChatCommands)

ooh suddenly they appeared again

user165474
ooo :D

user165474
12:35 PM
i like how my idea about starbait-trolling is still getting stars

user165474
12:48 PM
why is this place so quiet ;_;

@HyperNeutrino IDK

user165474
(btw that's everyone's cue to make this place un-quiet)

Yay, tacoscrips!

user165474
s/p/pt/

@HyperNeutrino No, taco scrips

12:51 PM
Shh, I'm on a phone

user165474
o.o

user165474
idea: make a tacoscript to star the -nth message using n stars

user165474
star -> asterisk

user165474
so like *** would star 'o.o'

user165474
(also ninja-proofing ofc)

1:02 PM
screams into the void

You can use ^^^*

user165474
:o

That's a part of caret reply

user165474
ooo cool

user165474
can you also unstar with caretreply?

1:05 PM
I think it should work

user165474
yay

Also, idea: make tacoscripts officially endorsed by the ROs

@ATaco pls no

Endorsed is not enforced.

user165474
@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
Gnight

aw man i tried to abuse caret reply and star my own message
byeee

user165474
o/

@totallyhuman because i can abuse that and reply to my own message

user165474
I shall be having a Fire Drill in about 5 minutes.

user165474
1:09 PM
So I may suddenly disappear for a bit.

i just had an evacuation drill

user165474
ooo for what

:shrug:

@HyperNeutrino not possible

user165474
:(

1:10 PM
@totallyhuman uhm what was the syntax for that one again

user165474
/ s h r u g

user165474
if you have ChatCommand

oh
yeah
¯\_(ツ)_/¯

user165474
this isn't discord :P

user165474
;)

1:11 PM
ლ(ಠ益ಠლ)
hehe

user165474
eh what

user165474
ಠ_ಠ

ಠ___ಠ

user165474
Allow deletion using CaretReply (something like ^^^DEL)

^^~
or wait better
^^¬
just negate the message

user165474
1:13 PM
not typable 0/10

the best would be carets + literal delete key

user165474
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

user165474
o.o

@totallyhuman lol then don't use a mac

1:15 PM
nope try again

user165474
phone?

user165474
isn't alt-backspace == delete on mac?

user165474
or is that chromebook

@HyperNeutrino i wouldn't be able to use userscripts then :P

user165474
alt-backspace is the usual ctrl-backspace on Konsole

user165474
1:15 PM
@totallyhuman >_> i'm dumb

@HyperNeutrino ding ding ding

user165474
ooo

user165474
then use alt-backspace

extra keystroke 0/10
as code golfers...

user165474
~ requires two keystrokes too

1:16 PM
...fair point

user165474
the negate thingy requires even more

user165474
because I can't even type it normally

for me, only two

user165474
ooo

depends on layout

user165474
1:17 PM
intl US?

...it's a chromebook variation of it "US Extended"

user165474
ah ok

user165474
the fire drill was supposed to start 3 minutes ago...

there's also the international version

user165474
Ah. OK.

1:18 PM
ah ok -> Ah. OK. what happened
lol
looks for how to make a KOTH challenge

user165474
@totallyhuman lol idk

is still confused
any suggestions on what to see before making my first KOTH?

user165474
the sandbox

user165474
:)

user165474
1:34 PM
Jan 28 '11 at 4:35, by Feeds
Welcome to chat for: Code Golf

user165474
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

user165474
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

user165474
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

user165474
@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

user165474
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)

user165474
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

user165474
@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.

user165474
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

user165474
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?

user165474
I thought only 3 were needed. Weird.

1:57 PM
ohhh I remember now
See this is to prevent things like this from happening

user165474
oh :I

It scales based on the top answer's score
42

We 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 ...

user165474
Ah, makes sense.

user165474
1 more vote

user165474

Good day

user165474
Hello.

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
1

You 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

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.

user165474
2:29 PM

I'm using Processing

user165474
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

GitHub?

@HyperNeutrino Did he get banned?

user165474
suspension, nvm shouldn't discuss it

2:41 PM
Yeah

o_o

y'know @HyperNeutrino I'm surprised you haven't made your own golfing language, you seem like the kind of person who would :P

user165474
Why do I seem like someone who would?

user165474
This is an esoteric language though it's not very golfy. It does operate in a fairly interesting manner though.

user165474
Oh I should upload my postfix language so I can actually use it.

user165474
2:45 PM
it's kinda horrible though because I made it before I knew how to code design properly ;_;

user165474

sorry my d key's broken :/

HOLY CRAP I BEAT THE SHORTEST C QUINE IN THE WORLD
(again, I'd already beaten it once :P)

where?

here, now I have to update my open-ended bounty

2:59 PM