« first day (1952 days earlier)      last day (2895 days later) » 

7:06 AM
0
Q: Simulate a 'battle' in the playing card game 'Oorlog'

Kevin CruijssenLet's build a simulation for an aspect in the card game, which I personally know by the Dutch name 'Oorlog' (translates to 'War'). How does 'Oorlog' work? Two decks of cards (each including two Jokers) are equally divided between the amount of players playing. Each player shuffles their own sto...

 
Does anyone know, is there some general procudure for s on meta.SE? (context)
 
Anonymous
@flawr It gets no updates from the mods for a long time, other than maybe "this seems like a good idea", and then if you're lucky, it gets implemented.
 
damnit python why no binary for percent fomat strings
 
@Mego I already suspected, thanks.
 
7:24 AM
0
A: Sandbox for Proposed Challenges

Eʀɪᴋ ᴛʜᴇ GᴏʟғᴇʀThe Book of Mozilla, 15:1 Vote for bold tags in the comments: code-golfstringrestricted-sourcekolmogorov-complexity Challenge Output this exact string to STDOUT (including newlines): The twins of Mammon quarrelled. Their warring plunged the world into a new darkness, and the beast abhorred th...

 
Guys, I think I just got the very last available 3-character .xyz domain.
It was $0.02 and I couldn't resist.
I bought qx3.xyz
Sometime in the next year I need to figure out how to sell it.
 
@PhiNotPi Very last?
 
based on this page: gen.xyz/premiums#standard
 
CCC.xyz: 1 of 46,656 available
 
7:37 AM
@PhiNotPi How are they so damn cheap? How can you buy it? I thought you do usually more like rent it?
 
Sedo hosts domain auctions.
 
@flawr The .xyz domain is turning 2 years old, it's a flash sale. $0.02 for the first year.
So that's why I'm selling it within a year, because it's only worth $0.02 to me personally.
 
And I'm sure that company "QX3" will get the last bid there.
 
@zʏᴀʙiɴ101 I'll look into this.
 
There's also char5.com, a full list of available 5-char .com domains.
 
7:44 AM
Looks like there's only four 4-letter .xyz still available. (emphasis on letter over character)
one of them is klan.xyz, which I will not be getting.
 
@PhiNotPi Buy every single $0.02 domain you can. Then we can golf you an auction page.
 
@wizzwizz4 ehh, I'm not really serious about this. I just want to see if I can actually sell it for like a couple dollars or something.
Then I'll be a legit domain trader.
 
        #.#    #.#                   Andrew the Shooter
        #.#    #.#                   High Elf
     ####.#    #.#                   Health: 19/19     ========================
     #....#    #.#                   Magic:  3/3       ========================
     #.####    #.#                   AC:  3            Str: 11
     #.#       #.#                   EV: 12            Int: 14
     #.#       #.#                   SH:  0            Dex: 15
     #.#       #.#                   XL:  2 Next: 24%  Place: Dungeon:2
 
@PhiNotPi Seriously, if you're willing to pay a dollar, that's 50 domains you can resell for a couple dollars each.
That's 80-100 dollars.
 
@wizzwizz4 that's actually convincing. I'll put a $1 cap on total investments.
 
Anonymous
7:51 AM
@wizzwizz4 That's assuming there's any resell value. If not, then this is another case of the Beanie Babies.
 
@Mego And @PhiNotPi's lost a dollar.
 
I only have to sell 1 domain for like $2 to get my money back.
 
@PhiNotPi What's the most money you'd be willing to throw away?
Would you mind if you lost $2? :-)
$2 -> $120 - $200
 
@Mego Ouch, I can only get a SHA1 in python down to ~850 bytes
 
_You finish putting on the +1 robe of Roeb {Dex+6}.
Heh.
 
7:56 AM
But it looks like one of the arithmetic ones, so it's not gonna be much longer in Java
 
Also, seriously, who is an adder?
 
@zʏᴀʙiɴ101 It's a snake
 
my heart just stopped, then started again
 
I should make a Python dialect and name it Adder.
 
Anonymous
7:58 AM
@MᴀʀsUʟᴛᴏʀ I have yet to attempt golfing SHA-256 :P
 
@Mego I used your example
 
I just had the sudden realization, what if I accidentally paid for 10 years? but I didn't
 
So it probably wouldn't be too different
 
@PhiNotPi Is it $0.20 for 10 years?
 
@wizzwizz4 Almost certainly not, it's 2 cents for the domain + 1 year
 
8:00 AM
@wizzwizz4 $0.02 was a 1-year intro offer
It's like $10 a year after that.
 
@PhiNotPi Ouch.
I suppose $90.02 is better than $100...
 
I just went and checked that the invoice was only a couple cents.
I don't need that kind of adrenaline at this time of day.
 
Also, I recently killed my DCSS character by a gnoll ;_;
 
So I paid $0.08 to get the last few in a couple of their other "regularly-priced premium" categories.
 
@PhiNotPi Which exactly?
 
8:07 AM
@PhiNotPi If you tie all the domains to the same IP, I've got a nifty little trick that will let you store the currently accessed domain in a PHP variable.
 
How do I search for a specific language that was used to answer a question? It's feasible to go through every page, but is there a faster way?
 
here's the list of all my .xyz domains
 
@wizzwizz4 I mean, I have a specified question, which has 5 pages of answers
 
@LeakyNun Use SEDE
It may not be faster, but it's reusable
 
8:10 AM
@MᴀʀsUʟᴛᴏʀ Sorry, what's SEDE?
 
@PhiNotPi Well, where's the list?
 
Stack Exchange Data Explorer (what @wizzwizz4 linked to)
 
phinotpi.xyz
qx3.xyz
jbij.xyz (probably garbage)
ulub.xyz (the VCVC format is nice)
xoix.xyz
independents.xyz (the last in their "common words" premium category)
total investment: $0.12
 
@PhiNotPi Woo! :-)
 
Congrats!
 
8:11 AM
@MᴀʀsUʟᴛᴏʀ I guess I'll just go through the 5 pages
 
@PhiNotPi Do you have a PHP server?
 
Now sell these domains (excluding phinotpi.xyz) on Sedo, after a year.
 
@wizzwizz4 I can get one set up with rhcloud.
 
@zʏᴀʙiɴ101 Or you could use eBay.
 
@wizzwizz4 0/10 not node
 
8:12 AM
@PhiNotPi Great. Does it have an IDE that supports multiple users?
 
@wizzwizz4 eBay sells domains? o_O
 
@wizzwizz4 I am honestly not experienced in it.
 
@MᴀʀsUʟᴛᴏʀ Node is not as good as PHP, because PHP has some lower-level-than-C functions.
 
@zʏᴀʙiɴ101 eBay sells things?
 
@zʏᴀʙiɴ101 eBay sells everything.
 
8:13 AM
@wizzwizz4 lower-level-than-C?
 
Honest question: anybody think any of those domains are worth anything?
 
@wizzwizz4 Any others?
 
@PhiNotPi Yes. I would buy phinotpi.xyz.
@MᴀʀsUʟᴛᴏʀ Yes, probably. I can't find them at the moment.
 
@Quill You missed my $0.12 investment in domain trading.
 
8:15 AM
dio is really low level so you shouldn't use it unless you know what you're doing
 
@MᴀʀsUʟᴛᴏʀ diodiodiodiodiodiodiodio...
 
@MᴀʀsUʟᴛᴏʀ I know what I'm doing; I am an experi- FATAL ERROR: HARD DRIVE FAILIURE
 
@wizzwizz4 calls 911
 
Old MacDonald had a farm,
D I D I O
 
@wizzwizz4 And on that farm he had a cow, D-I-D-I-O
 
8:18 AM
With a moo moo here
and a moo moo there,
 
D-I-D-I-O
c-c-combobreaker
 
"Old MacDonald Had a Farm" is a children's song and nursery rhyme about a farmer named MacDonald (or McDonald, Macdonald) and the various animals he keeps on his farm. Each verse of the song changes the name of the animal and its respective noise. In many versions, the song is cumulative, with the noises from all the earlier verses added to each subsequent verse. It has a Roud Folk Song Index number of 745. == Early versions == In the 1917 book Tommy's Tunes, a collection of World War I era songs by F. T. Nettleingham, the song "Ohio (Old Macdougal Had a Farm)" has quite similar lyrics—though with...
 
Hey @Bálint! Adventure in the Sandbox? :3
 

Sandbox

Where you can play with chat features (except flagging) and ch...
 
@zʏᴀʙiɴ101 Not yet, maybe when I'm at home, that will be in about 3-4 hours
 
8:25 AM
@Mego Here
 
Anonymous
@MᴀʀsUʟᴛᴏʀ That's a very poor golfed version. In the sandboxed challenge, it's stated that input and output can be done in any format. Binary strings would be much shorter.
 
I know
Just golfing it properly first
Not much shorter though, ~20 bytes in 800 bytes isn't too much
 
@MᴀʀsUʟᴛᴏʀ Can you see what I type there?
 
@LeakyNun Yeah
 
@PhiNotPi ooh what'd you buy?
 
@LeakyNun - Are you Kenny Lau?
 
@mIllIbyte Yes
 
8:48 AM
I wasn't sure.. What does Leaky Nun mean, by the way?
 
@mIllIbyte It's an anagram
Don't ask Upgoat what it means
 
Oh, right
 
Kenny Lau
Kenny  au L
K nny  au Le
K nny   u Lea
  nny   u Leak
  nn    u Leaky
   n    u Leaky N
   n      Leaky Nu
          Leaky Nun
 
@MᴀʀsUʟᴛᴏʀ Is that a code-golf?
 
8:56 AM
@LeakyNun Yes
 
Anonymous
@MᴀʀsUʟᴛᴏʀ collabedit is garbage - it keeps moving the insertion pointer over to the code
 
Anonymous
Cloud9 is super good and does all things
 
@MᴀʀsUʟᴛᴏʀ Still wrong output?
 
Anonymous
9:07 AM
 
@Mego Do we have the orig code?
 
Anonymous
You mean this?
 
Anonymous
Or sha256_ref.py?
 
@Mego Yes, thanks
btw how did you fix your code?
 
Anonymous
9:10 AM
I was measuring length in bytes, not bits
 
Anonymous
so len(s)*8 fixed it
 
Anonymous
Even the original golfed version from pastebin gives the wrong result
 
Anonymous
Might be worth it to just start over
 
Anonymous
46 mins ago, by Mᴀʀs Uʟᴛᴏʀ
@Mego Here
 
9:12 AM
Because the pastebin one uses normal encoding?
not binary string encoding?
 
Anonymous
Even with that
 
Anonymous
Oh wait, I was running the wrong file - the original pastebin code works
 
Anonymous
But not when doing the binary version
 
Anonymous
I substituted in the binary string input change in the pastebin code, and it gives an incorrect output
 
Anonymous
9:14 AM
Which means either that code is wrong or I'm giving it the wrong input string
 
the binary string isn't surrounded by quotes, right?
 
Anonymous
It is
 
guys, the fault is in the k
 
Anonymous
This should be right:
 
Anonymous
print `"".join("{:08b}".format(ord(x)) for x in "abc")`
 
9:15 AM
thought you guys would have noticed after I ran the code so many times
 
@Mego But the pastebin one uses python3
 
Anonymous
It still works in Python 2
 
oh whoops, fixed
 
fixed
 
Anonymous
Woohoo
 
Anonymous
9:17 AM
Silly Python 2 and its integer division
 
wait
integer division means // can be replaced with /, right?
 
Anonymous
711 bytes and it's working
 
Anonymous
Yeah
 
Anonymous
So 710
 
Anonymous
-2 bytes because Python's % takes the sign of the second operand
 
Anonymous
9:23 AM
So -2%3 == 1 and not -1
 
Compilation request: What are your personal favourite challenges?
 
Anonymous
@flawr Challenges I wrote or just challenges I liked?
 
Both, I want to provide some examples for someone new to code-golf=)
 
it's not code golf so it's a nice change
 
9:30 AM
@LeakyNun -1, not a challenge
 
Anonymous
@Fatalize That one is a really good, hard challenge. I spend weeks trying to come up with a solution that reached Dennis's bound.
 
Anonymous
I'm still convinced it can be done, but I'm not sure how.
 
Anonymous
 
9:33 AM
Thank you for your inputs.
I added those to my list, now I'm looking for a code-golf challenge that shows some nice golfing-language answers=)
 
Anonymous
 
Anonymous
125
Q: I'm not the language you're looking for!

muddyfishIsn't it annoying when you find a piece of code and you don't know what language it was written in? This challenge attempts to somewhat solve this. Challenge You will have to write a program that when run in two different languages, will output the string: This program wasn't written in <lang...

 
Great=)
 
Anonymous
@LeakyNun @MᴀʀsUʟᴛᴏʀ When I post the challenge to main, I'm also going to post the golfed Python code as community wiki, since all 3 of us have extensively contributed to the golfing effort. That ok with you two?
 
@Mego Okay (don't post yet)
 
9:42 AM
@Mego That's okay with me
 
still golfing
 
Anonymous
I'm not gonna post it yet :P
 
what challenge?
 
Anonymous
I'd still like more eyes on the sandboxed post first
 
Anonymous
0
A: Sandbox for Proposed Challenges

MegoImplement SHA-256 code-golf hashing Given a sequence of bytes, output the SHA-256 hash value of the sequence. The SHA-256 Algorithm The following pseudocode is taken from the Wikipedia page for SHA-2. Note 1: All variables are 32 bit unsigned integers and addition is calculated modulo 232 Not...

 
9:43 AM
looks complicated
 
@Fatalize It is, the Python solution is ~700 bytes
 
Anonymous
For a big milestone challenge (maybe #30 for inquisitive, or #100 for socratic), I think I'll do "run Alpha BASIC code"
 
10:04 AM
@Mego the source code of the sha-2 algorithm that hashlib.py uses:
/* SHA256 by Tom St Denis */

/* Various logical functions */
#define ROR(x, y)\
( ((((unsigned long)(x)&0xFFFFFFFFUL)>>(unsigned long)((y)&31)) | \
((unsigned long)(x)<<(unsigned long)(32-((y)&31)))) & 0xFFFFFFFFUL)
#define Ch(x,y,z)       (z ^ (x & (y ^ z)))
#define Maj(x,y,z)      (((x | y) & z) | (x & y))
#define S(x, n)         ROR((x),(n))
#define R(x, n)         (((x)&0xFFFFFFFFUL)>>(n))
#define Sigma0(x)       (S(x, 2) ^ S(x, 13) ^ S(x, 22))
#define Sigma1(x)       (S(x, 6) ^ S(x, 11) ^ S(x, 25))
optimized for speed
 
@Fatalize You should add that in the list of languages created by users.
 
@LeakyNun Doesn't that also apply to PyPy's?
 
@MᴀʀsUʟᴛᴏʀ PyPy doesn't use hashlib?
 
@LeakyNun It does, but all of its libraries are in RPython
 
@MᴀʀsUʟᴛᴏʀ Looks like it's a direct translation of the hashlib
 
10:13 AM
Yeah
 
I see
 
0
A: Sandbox for Proposed Challenges

MegoDetermine the winner of a game of War The card game War is interesting in that the final outcome is entirely determined by the initial arrangement of the deck, so long as certain rules are followed for the order in which cards are picked up from the playing field and moved to decks. In this chal...

 
Is it possible to search for own answers, that got accepted?
 
@flawr Should be. See codegolf.stackexchange.com/…, naturally changing 48538 to your User No.
As I see, I didn't get any of my answers accepted.
Whilst I'm waiting for Errbot to install...
 
10:31 AM
@zʏᴀʙiɴ101 thanks
 
Where did ArtOfCode go?
ohai @EᴀsᴛᴇʀʟʏIʀᴋ
 
10:48 AM
n=range
f=2**32
q=512
r=lambda v,b:v%f>>b|(v<<32-b)%f
t=int
g=lambda e:[t(x**e%1*f)for x in n(2,312)if 383**~-x%x==1]
h=g(.5)
k=g(1/3.)
m=map(t,input())
l=len(m)
m+=[1]+[0]*((447-l)%q)+map(t,'{:064b}'.format(l))
for i in n(l/q+1):
 c,w=m[q*i:][:q],[]
 for j in n(16):w+=[t(`c[j*32:][:32]`[1::3],2)]
 for j in n(48):a,o=w[j+1],w[j+14];w+=[(w[j]+(r(a,7)^r(a,18)^(a>>3))+w[j+9]+(r(o,17)^r(o,19)^(o>>10)))%f]
 x=h[:8]
 for j in n(64):a,o=x[::4];d=x[7]+(r(o,6)^r(o,11)^r(o,25))+(o&x[5]^~o&x[6])+k[j]+w[j];e=(r(a,2)^r(a,13)^r(a,22))+(x[1]&a|x[2]&a|x[1]&x[2]);x=[d+e]+x[:7];x[4]+=d
@Mego @MᴀʀsUʟᴛᴏʀ 641 bytes :D
 
I dealt with my first site flag! :-)
 
@wizzwizz4 Show it! :-)
(Not the flag data, but the offending post.)
 
@zʏᴀʙiɴ101 Ok.
@zʏᴀʙiɴ101 It's a deleted comment, by the way.
 
@wizzwizz4 I see.
 
@zʏᴀʙiɴ101 It wasn't that bad, just very unconstructive.
 
11:05 AM
1
Q: Avoid arithmetic progressions

orlpAn arithmetic progression is a sequence in which every element differs from the last by a constant value. Examples are 1, 3, 5, 7 or 8, 8, 8 or 19, 12, 5. Write a program or function that given a positive integer n outputs f(1), f(2), ..., f(n) such that: f(1) = 1 f(2) = 1 f(i) is the smallest...

 
11:18 AM
è_é Chat ees ded
 
Android with "OK Google" enabled? Checkout all the voice recordings Google Now has of you at history.google.com/history/audio?utm_source=sidenav
 
 
1 hour later…
12:30 PM
2 hours later...
Welp, time shenanigans aren't triggered by edits.
Good for me. =)
 
12:57 PM
Enter @PhiNotPi
Exeunt
 
@zʏᴀʙiɴ101 0/10 People are still here
 
@MᴀʀsUʟᴛᴏʀ That's the joke :P
 
1:13 PM
@Quill Sorry I didn't reply earlier, but the .xyz domain had a $0.02-for-the-first-year flash sale, so I took some of the last remaining 3-character, 4-letter domains, and a common word. These included qx3.xyz, ulub.xyz, xoix.xyz, jbij.xyz, and independents.xyz. Most of those aren't really anything special, but they are probably worth at least a couple dollars (at least the 3-character one). So my plan is to put everything on auction sometime within the next year.
 
@PhiNotPi By the way, internet.bs has a blog where they have a search engine for short .xyz and .com collisions. Would've probably been easier.
 
Should I write a challenge to golf /// codes?
 
@mınxomaτ I just found that, probably would've.
I honestly don't know what short .xyz domains are even worth.
 
Not much.
 
combined value of over $0.25?
because that's all I'm really hoping for
 
1:42 PM
@MᴀʀsUʟᴛᴏʀ Should I do a proper exeunt? :-)
 
@everyone theoretically, if everyone is running the same local web server, localhost links should work, right?
 
@MᴀʀsUʟᴛᴏʀ Yes... They should work.
They would be a little pointless; if everyone's running the same local web server, shouldn't you just have a public web server?
 
But definitely not a good idea, so probably better as a last resort
@wizzwizz4 What if you have no internet?
 
@MᴀʀsUʟᴛᴏʀ ...
2 mins ago, by Mᴀʀs Uʟᴛᴏʀ
@everyone theoretically, if everyone is running the same local web server, localhost links should work, right?
 
@wizzwizz4 ...
@MᴀʀsUʟᴛᴏʀ There's always internet.
 
1:47 PM
@MᴀʀsUʟᴛᴏʀ If you have no internet, you can't access the links!
 
lo?
@wizzwizz4 There's always the so called loopback network device.
:P
 
@zʏᴀʙiɴ101 If the links are on that, then they're probably on the localhost server anyway.
This is a pointless discussion...
☞ That's better!
 
Ah-hahaha, these are great.
 
Why is my answer from from the sandbox not removed immediatly after I pressed "delete"?
 
@levanth "delete" just removes an answer from public view
it is still stored in the database
 
1:59 PM
@levanth No post is ever removed. You can still see it and choose to vote to undelete, as can mods and people with the moderator tools privilege or the trusted user privilege.
 
Ah I see
 
It's only hidden from the eyes of people that aren't you, with less than 2k or 4k rep.
 
I have a dilemma...
 
@Katenkyo Which is?
 
I've finished my work for the week, there's still 1h15 left to work, but I only have the choice between doing a task that would take me 10 mins max, or one that would need me to work some overtime hours...
 
2:04 PM
Well, darn.
 
Can't decide if I go for the 10 mins then procrastinate, or if I push myself into working
 
@Katenkyo Work first, then you'll have more time for constructive procrastination.
 
@wizzwizz4 "constructive procrastination", I like that, it doesn't ring the guilty bell in my head :)
 
@Katenkyo Ok, fun procrastination.
Because procrastination isn't as good as mucking around w/o work.
 
If I need to do 2 hours of overtime if I want to be without any work left, I won't do
 
2:11 PM
@Katenkyo Do 10 mins of overtime. It's not much, but 12 days later you'll have no work left.
Unless your boss starts giving you more work, in which case you can get cross.
 
@wizzwizz4 There's always work left, first time it happens that I've done all my week's work!
 
@Katenkyo You've done all your week's work! :-)
 
@wizzwizz4 (except that one task ^^)
 
I made a C9 workspace where I can try awesome things :3
 
@Katenkyo Is it a programming job? If so, is it anything private? If not, does it need golfing? If so, why don't you post it as a question?
 
2:18 PM
There is a focus system:
user image
2
The focus is in the bottom left square, which is marked with a cross with circle.
 
Every programming job could use a little golfing. Remember kids, small code is good code.
7
/me coughs
 
@wizzwizz4 I'm a sysadmin/web-developper/C# application developper, and yes, mostly private ^^'
Also, I would not like to golf the config files of my apache2 server...
 
Got to go, flags have appeared.
 
@Poke mon
 
@zʏᴀʙiɴ101 mon
i went to tab complete and realized you switch to smallcaps
 
2:21 PM
@Pokémon
 
Above the bottom left square is a square divided into two parts. Perfect for a shell and immediate.
 
@wizzwizz4 don't know how to do that :[
 
@wizzwizz4 Good luck with the flags!
 
@Katenkyo It was only a bunch of chat offensive flags. They were, surprisingly, actually offensive! But they've been sorted now.
 
The right side rectangles are for up to three side jobs.
 
2:24 PM
We need to save the old challenges:
14
Q: Burninate [code-golf]

admdrewI noticed this question come up today, with a really good comment that the code-golf tag description itself states that code golf questions are no longer on-topic for SO: DO NOT USE - Code Golf is no longer on-topic for Stack Overflow given the existence of Code Golf. This seems like it mig...

@mbomb007 no, they weren't migrated because old questions aren't migrated. No, I can't do anything to them except flag because they were deleted by a mod. And I can only find and flag the ones I remember well enough to find traces of on Google, since deleted questions don't show up in search, even to people who can view them. — hobbs Jan 3 '15 at 0:41
 
monring
@Upgoat Did you finish the infinite/for/while/whatever loop?
For Cheddar
 
2:41 PM
@zʏᴀʙiɴ101 almost
@wizzwizz4 ;_;
 
@wizzwizz4 no we don't. Check the answer.
It basically says "No, they stay".
Check the answer before you freak out.
 
@EᴀsᴛᴇʀʟʏIʀᴋ Some of them were deleted. I want to recover the deleted ones.
 
2:54 PM
Because the focus system is hard to set up in C9, I decided to switch to the conventional one panel.
 
@zʏᴀʙiɴ101 hard to set up?
What language is it in?
 
@MᴀʀsUʟᴛᴏʀ When a panel loses its tab, it immediately closes.
 
@zʏᴀʙiɴ101 *all its tabs
@zʏᴀʙiɴ101 It's not hard to set up
just have at least one tab per panel
 
@MᴀʀsUʟᴛᴏʀ But hard to manage.
@MᴀʀsUʟᴛᴏʀ Ah, thanks.
 
@zʏᴀʙiɴ101 Just use an empty file or something
 

« first day (1952 days earlier)      last day (2895 days later) »