« first day (1623 days earlier)      last day (3069 days later) » 

1:33 AM
^ FizzBuzz in the esolang I'm working on.
1:51 AM
I was trying to make it intentionally verbose but the cat program ended up being 9 characters anyway >_<
1 hour later…
3:03 AM
Q: How can I use Open API in OCX in Python?

kyungI'm having trouble calling an API that stock company have given. They have launched open api in OCX extension. And so, I'm willing to use it in Python and tried to use it with win32com module for Python. The open api file name is "KHOpenAPI.ocx". I tried -----------------Python code-----------...

3:24 AM
@Doorknob Ostrich?
Should I do a double based stack or a object based stack for the language I'm working on? Doing an object based one allows for better string manipulation, but a double based stack could be better for character manipulation.
It's somewhat sad that our posts-that-belong-in-Stack-Overflow-per-day is significant compared to our posts-per-day.
2 hours later…
5:35 AM
(dr.nick voice) Hi, everybody!
I wrote a new answer.
A: Emulate an Intel 8086 CPU

luser droogC - 319 lines This is a more or less direct translation of my Postscript program to C. Of course the stack usage is replaced with explicit variables. An instruction's fields are broken up into the variables o - instruction opcode byte, d - direction field, w - width field. If it's a "mod-reg-r/m...

That's right. 1/10 - 1/20 the size of everybody else's. Too bad it's not a codegolf contest. :)
5:47 AM
Q: Antiferromagnetic ordering

Phase Antiferromagnetism is what IBM researchers used to jump from a 1 terabyte disk to a 100 terabyte disk in the same amount of atoms. In materials that exhibit antiferromagnetism, the magnetic moments of atoms or molecules, usually related to the spins of electrons, align in a regular pattern wit...

1 hour later…
7:14 AM
Q: Roll my D&D character's ability scores

isaacgIn Dungeons and Dragons, some of the most important atributes of a character are the ability scores. There are 6 ability scores, for the six abilities. The abilities are Strength, Dexterity, Constitution, Intelligence, Wisdom and Charisma. When determining the scores for a character, I use the f...

3 hours later…
10:40 AM
hi all
10:56 AM
Hi Lembik
are we waiting for a star on his "hi all" before continuing the discussion ?
I think chat's just in its usual quiet hour
yes! :)
11:25 AM
A: Sandbox for Proposed Challenges

xnorBackhanded^H^H^H^H^H^Hspaces On some terminals, pressing backspace generates the control code ^H, or ASCII code 8, to delete the previous character. This gives rises to a snarky idiom where backspaces are feigned for comedic effect: Be nice to this fool^H^H^H^Hgentleman, he's visiting from c...

@xnor post it. Its a pretty straight forward one .
does anyone know of any discrete optimization tools I can use from python?
I want to maximise a function on matrices (the determinant of coure)
(very similar to Golfscript, but with a REPL and a few missing features/functions (floating point, regex, etc))
11:56 AM
@Optimizer patience :)
(how long in CJam?)
I am not saying because I have an answer this time.
The question actually is straight forward
I don't have one, but I can guess that it would be around 12-15 bytes
Pretty accurate guess :P
you already have one ?
there is no harm leaving things in sandbox for a day (other than your nerves maybe)
Retina is pretty handy for it :) (7 bytes)
Yeah - I was trying to see if a certain approach worked in Python (it didn't), thought of another, then realised it was a lot more suited for CJam
12:12 PM
my koth sits in the sandbox for more than a month but I won't be here long enough to run it for quite some time...
@Sp3000 congrats on the Deadfish answer, might be the first competitive one on the site
Let's find out...
I'm sure I've put a deadfish answer for some stupid challenge before
I searched for it, this is the closest I found
A: Evolution of OEIS

NinjaBearMonkeyDeadfish, 4 bytes, depth 2, A005563 from A001477 isdo This sequence is defined as (n+1)^2-1, which is exactly what this program does. Since Deadfish has no input, it assumes the accumulator is at the desired input number. The next answer should start with the terms: 0, 3

I saw that but I'm not sure about the input part :/
(it's half the reason why I use 3var sometimes, since that does have input)
yeah, I wouldn't consider this either, hence I used "closest"
hmm, haven't known of 3var before
12:28 PM
I remember there was some challenge that said 'stdin or closest alternative' so I felt free to use 'closest alternative'
I like that python is currently faster than C for codegolf.stackexchange.com/questions/52851/… :)
although I don't suppose that will last
hi @feersum
1:07 PM
@Min_25 do you think my probability question is easier if A isn't repeated but instead the A[i] just carry on being sampled independently ?
@feersum actually.. I should have asked you that as well
what ?
@feersum in codegolf.stackexchange.com/a/51707/9206 the first part of the solution removes the restriction that A[1] = A[n+1]
and looks simpler
I was wondering if it kept on being simpler for higher values of j
sure, the question would be easy without A[1] = A[n+1]
that's very interesting to me
I don't see what you mean about higher values of j...if you remove this rule then there is no meaning of j, is there?
1:14 PM
do you think it can be solved for larger j under those conditions?
what I mean is that A \in {-1,1}^(2n) say and we want to know the probability that the first j inner products are 0
so it's the same question except A[n+1], A[n+2] etc are sampled independently now
instead of being copies of A[1], A[2] etc.
do you see what I mean?
Of course it would be somewhat easier. Not sure if it would be really simple or just a bit easier.
ok.. I may have to leave it a bit so people don't get too annoyed about having similar questions posed :)
2 hours later…
3:09 PM
3:41 PM
2 more to go until I explain the Octopus joke.
Woo, within 2x of CJam and Pyth pumps fist
@Sp3000 On my first computer, code page 850 was rendered like this:
What's this for?
Single-byte arrow characters.
I was almost tempted to ask about i with a caret on top, but I didn't want to push the rules :P
3:55 PM
Meh, that still doesn't beat APL.
I think I'll post an answer, even if just to show how old I am. :P
Right language for the job, I guess
btw for your LCS question, I thought you meant 20 length 1000 strings in an hour initially. That would have been amusing (and annoying) to golf :P
Is that even possible?
For random strings, I mean.
With the right algorithm, possibly. You have a constant alphabet, but I'm not sure if that helps
Would have to read a few papers for algorithm ideas :P
Maybe for a fastest code challenge. Highest n for n strings of length 1000. :P
And that's why I thought it was a Lembik challenge :P
4:01 PM
He would probably have some O(f(n)) requirement instead of runtime. I don't use those because I don't grok them.
Runtime leads to far less discussions.
Oh, you've posted the code I was going to use as an alternative approach. Hm, just changing the arrows to other arrows probably doesn't warrant a second answer...
Sorry - was pretty desperate to beat Pyth (until Jakube knocked an extra one off)
@aditsu My unimprovement takes roughly 5 minutes on my machine.
With it and a few more changes, 49 bytes is possible.
@Dennis and how much ram?
@aditsu Haven't checked. Disregard the comment about 49 bytes for now. I've made a horrible mistake.
Is there any easy way to measure peak RAM usage?
Other than staring at top, I mean, which is what I'm using now.
4:18 PM
not sure
@Dennis seems that gnu time has an option for that
@aditsu: Yes, I found %M and %K. Not sure what they will output.
99 Bottles of Beer
If I get my computer to output beer, I'll never get anything done. :P
Now you know why I have been slow lately..
@Dennis Isn't that what the tab key is for?
4:26 PM
/usr/bin/time -v is giving a lot of info
@Sp3000 No beer, sadly.
@aditsu I'll try it.
@aditsu Correction: My 49 byte code does work. Just had messed up the input format. :P
I also have "time" as a shell command (in fact I've just installed gnu time now), but it doesn't have that option
and btw, I have 56 tabs at the moment, they're eating quite a lot of memory :p
hmm, "time" output might not be so great
it said my program used 5GB when it was more like 1.3
Well, how did you measure those 1.3?
4:35 PM
kde's "system activity", but also looking at "top" now
actually, 1.2; top seems to agree
Oh, a fellow KDE user.
time and top seem to be consistent.
Time says 5,204,096 KiB.
are you looking at "resident size" in both?
the OP changed scoring from bytes to chars after 15 answers
I rolled it back
I hope I'm not being too heavy-handed
wut, 100TB?! do want!!
it should be enough for a few months
@aditsu: Hadn't even noticed that. I looked at %MEM and multiplied by 16. :P
4:46 PM
hmm, lemme check that
Man, if ⇅ is allowed that changes everything
I still stand by "ambiguous arrow definition is ambiguous" though
%MEM went up to 16, and I have 8GB total
but time -v says: Maximum resident set size (kbytes): 5165152
5:12 PM
@aditsu I blame multi-threading. Not sure though.
@Sp3000 Not sure if it helps. ri"⇅⇵⇅"f*N* is actually longer than your code.
35 mins ago, by Sp3000
Man, if ⇅ is allowed that changes everything
Not going to do it though, I've given up on the question :/
(feel free to post it - it's actually a byte less)
5:29 PM
Hello, I never posted here before but I like to read all the puzzles on a daily basis. I have an idea for a KOTH game, is there any post with guidelines and tips to develop the controller for the contest?
You can take a look on meta, but I can't seem to find an actual list of guidelines/tips
(there's tidbits scattered here and there, as you can see from the search)
@Dennis {6a4*:mr$1>:+3+} -> {6a4*:mr$T3t:+} ?
@Sp3000 Oh, I thought your answer was 16 bytes long. Not sure why.
That's clever. Thanks!
thanks @Sp3000 ;)
@Zukki Actually the tag wiki's got some
5:51 PM
@Zukki It might help to download some of the other controllers and see how they did things. I had one get tripped up by a dumb io flushing error that might have been caught if I'd looked at (read:copied/ported) someone else's.
1 hour later…
7:01 PM
So, I'm gonna get jumped on and eaten and spit out for this because this is the first time I've been here, but whatever: I know there's no "Golf questions must be posted in XYZ language" but shouldn't there be some restriction on languages designed specifically for code golfing (read: CJam etc...)?
It's pretty disheartening going into a "shortest code wins" knowing that "unless I code this in CJam or Pyth, I will not win this ever"
There are more than 2 languages. But honestly, the comparison is the same.
if these languages were not there, it would have been a competetion between the mainstream ones, now its between golfing ones.
Also, winner does not always take the most votes
if that you are interested in
In shortest code challenges the winner is 90% CJam if it's posted...
^^ Ditto, if CJam/Pyth/APL/J/etc. didn't exist we'd just all be banning Perl
I am not sure where you are collecting the numbers from
7:04 PM
anyway, I'm not here to get into a crazy argument, just something to maybe think about. Makes it pretty uninteresting posting an answer knowing I'll never win because I don't use one of those
@Brandon I golf in Java. My world won't fall apart if CJam beats me (as it always does). I just try to make it the shortest Java I can.
But Perl is a production language that you use in the wild to accomplish something
No I don't use perl in the wild :P
@Geobits I understand. I golf in C#.
7:04 PM
But perl comes close to all of the golfing ones very easily
....But Perl came out in 1987
@Brandon since stack snippets were implemented, a few people started making leaderboards by language
So we would all just use APL then, right? It's older and used in production code :)
The point wasn't about what's used in mainstream, it's just there's always going to be a best language that ends up winning most of the time
In my perfect world it'd be languages that people use for things other than golf.
7:06 PM
It's unfortunate that only one answer can be accepted, but it's best to think of it per language as others have said, like anarchy golf and other sites
Anyway, like I said: I knew I'd get destroyed for it but I wanted to throw it out there anyway
Because even if I could think of a golf question, I'd probably never post it because I know that some CJam-ninja would come in and kill it with one character
If the concentration was purely on best overall, we'd see much less diversity IMO. Personally I'm really damn glad that not every answer here is in CJam or pyth.
@Brandon I think at least 90% of my answers are written in C. I do not win. Luckily, though, winning means virtually nothing on this site. It's all about the cleverness.
@Brandon and APL in 1960s
J in 90s
similarly, K, Q, D etc are all old and super compact
Welp, like I said... Equal and opposite reaction.

Have a good day, fine sirs.
7:10 PM
@Brandon don't lose heart, we love all answers :)
:D Nah, stick around! I think most of us have had that thought at one point or another...
at least if they are valid and show some effort
Some of us still do (not speaking for myself though)
but I understand the feeling.. I got kinda frustrated by golfscript winning, so created CJam (guilty) :p
I'd be surprised if there's a majority here that hasn't at some (however brief) point thought "f*ing CJam" or similar ;)
7:12 PM
I have a feeling that if we were as CJam/Pyth-centric as many newcomers' first impressions describe, this site would die an unfortunate and immediate death.
Yea, choose your language to insert in that utterance :D
I think negative people will get discouraged, but positive peoples will try to learn these golfier languages.
Geobits will simply downvote everything and go away (if he had been a new user to the site)
I don't have a desire to learn golfy languages tbh, but I just stopped caring about them. At first I admit I didn't play the code-golf game because of it.
7:15 PM
Not all positive peoples will learn these golfier languages :P I like to think I'm fairly positive around here.
Then some question sucked me in.
sucked you down*
I like to think of myself as fairly positive too. Don't let my voting record or image tell you otherwise :D
it is
@BrainSteel Not a majority yet by a long shot, but CJam has a bunch of answers considering it hasn't been around that long.
7:18 PM
@Geobits yes, you positively downvote everything :)
I'm kinda surprised to see ruby that high on the list. Must have been used a lot more before I joined.
our top 5 languages include too
We have a community of excellent CJam/Pyth/J/Q golfers that compete with each other and a community of excellent C(++)/Java/Python/Ruby golfers that compete with each other (with obvious overlap). It's just unfortunate we can only crown one answer as the victor.
Personally, I just like to beat Javascript with Python. It's usually a close race (and sometimes completely biased towards one side)
And occasionally C sneaks in :D
7:24 PM
Unexpectedly often, I find :P
@Sp3000 its never a close race. Python has shit load of more inbuilts
but what the hell is a space doing at fifth position ?
Well, to be fair, everything has more builtins than C, and it is still competitive sometimes.
C has speed built-in
That's true, we've got down pretty well :)
JS function notation and ternaries are a lot shorter and you don't need to import
7:30 PM
@Sp3000 like there is much to import anyways.
from random import*;random()
If all you need is a 0..1 random, even Java's got that beat: Math.random() :P
Importing Random is a nightmare for anything more complicated than that, though.
:P there should be a discussion about what each language is worst at
Just for... educational reasons
Java's pretty terrible about Strings and BigIntegers, and output (System.out.print? ugh), even for Java.
C is even worse at BigIntegers. And arguably Strings. And random number generators...
7:36 PM
I'd imagine that C would also be bad at big ints?
You have to implement them yourself :(
Sorry missed a bunch of replies, went to eat an avocado.
How does C do random numbers? Read junk and take modulo? :P
@Brandon Welcome back, sorry about earlier
Hey man, I don't care... I'm just saying.
There's srand() and rand() in "stdlib.h", but it's a quite poor quality RNG.
7:38 PM
Sucks because anyone that I've shown PPCG to doesn't want to take part because of those golf languages. They're just out immediately
If it's good enough for Doom, it's good enough for me :P
Hmm PPCG does unfortunately have a bit of a learning curve... especially if you don't visit meta :/ That's a shame
@Brandon Try to hook them into the community with other things. Fastest code, king of the hill, etc. Once they hang around it might change. That's why I'm here. I avoided PPCG for some time because I thought it was all golf.
@Geobits It would be awesome if it was all golf lol
(I can't remember why I joined tbh. For some reason my first answer's in FRACTRAN)
7:41 PM
@Brandon I wouldn't be here, so not so awesome to me ;)
I think, as you said, the majority being golf kind of scares away some potential newcomers.
I wonder how many people joined because they got linked to a cool popcon. I'd imagine quite a few
Unfortunately, other challenges are much harder to write, usually.
I bet I was one of them.
I guess to each their own in that case... I don't even touch the KOTH (mostly because the rules don't make a lot of sense to me) and fastest-code.
@Sp3000 My first was Images with all colors, from HNQ.
And I still prefer other challenge types to golf, but there aren't enough of those to fill the day.
7:45 PM
I really like the general type.
I think I started by golfing GCJ solutions on stackoverflow
then later I found out about PPCG
Ah Java, of course
wow, this is my next wallpaper now.
wow that loader is taking its time
Did you find that on PPCG?
I'm using a green, non-dithered version of my "forest" right now.
7:58 PM
I'm using a color drawing of Simon's cat :)
Friday afternoon, 4:04. Motivation not found.
8:18 PM
@BrainSteel in the all the colors challange
My wallpaper is some oil on the surface of a puddle that seems to have spontaneously grown branches
Wait. Like tree branches? Or branch-like patterns? If tree branches, that's fairly odd.
In 2d - just branch-like
For my background I've cropped out the product placement, but the full image shows up the extent of the branching better:
What does W stand for ?
I never thought to wonder, but I wondered a lot about how the branches formed
8:38 PM
@Brandon I use GolfScript for things other than golf. Not for production code, but I have used it for quick-and-dirty data analysis.
@BrainSteel The thing I tend to switch to C for is 128-bit floats.
dirty data analysis ?
@PeterTaylor huh? are you talking about a library?
oh, or apparently there's something called __float128
A: Maclaurin series of Black Box Function

Peter TaylorGCC, 549 chars #define f __float128 #define D long double #define L(v)for(v=0;v<n;v++) void G(f a[],int n,double d){f m[n][n],s;int i,j,k;L(i)L(j)m[i][j]=j?m[i][j-1]*d*(i-n/2):1;L(i){s=m[i][i];L(j)m[i][j]/=s;a[i]/=s;L(j)if(j^i){s=m[j][i];L(k)m[j][k]-=s*m[i][k];a[j]-=s*a[i];}}} #define F(a)L(i)a[...

8:45 PM
yeah, hadn't heard of __float128 before
8:58 PM
it can easily delete ?^H until none remain
9:24 PM
I bet Pyth can still do shorter, no ?
9:39 PM
i guess it's an easy challenge, might as well let them have their fun
9:50 PM
Q: Backhanded^H^H^H^H^H^Hspaces

xnorOn some terminals, pressing backspace generates the control code ^H to delete the previous character. This gives rises to a snarky idiom where edits are feigned for comedic effect: Be nice to this fool^H^H^H^Hgentleman, he's visiting from corporate HQ. Given a string with one or more ^H's...

@Dennis still there? check out my latest version :)
A: Sandbox for Proposed Challenges

Nick B.Blackjack How to Play Blackjack is for any number of people, but there will be only one in this case. The goal is to get as close to 21 as possible without going over. Aces will be 1 for this program. All other face cards are worth 10. To start, the player is dealt two cards. They can then ch...

10:12 PM
@aditsu 40 bytes? Wow.
and efficient too :)
sadly Pyth is still ahead
39 if you change the input format so q~ works.
@aditsu That's crazy fast. It works on my phone.
10:27 PM
Hah, As always, Pyth has the exact same algorithm as Cjam :P
does it? I thought it was still removing one character at a time
(I can't read Pyth, even when explained)
such disappointment that Retina is only tied with Cjam on this one
@Optimizer oh wait, I guess you're talking about another challenge
well, TTS. Hope that @Dennis will come up with a shorter one.
10:46 PM
Q: Create an interface that fits the XKCD Types

Tim colors.rgb("blue") yields "#0000FF". colors.rgb("yellowish blue") yields NaN. colors.sort() yields "rainbow" Using the rules set out in the image, and the title of time image (quoted here) create a program that accepts all the given input and displays the appropriate output. Input can be...

rats, no \x08 :p
@Optimizer btw, will you update codegolf.stackexchange.com/a/52832/7416 ?
@Optimizer I was about to post a (much) longer answer when I saw your 14 byte solution, so don't count on me.
count on Jimmy :)
Just found the time to test your code on my desktop. 2.46 s for all test cases. Amazing!
although it doesn't beat C ^_^
11:00 PM
Beating C with CJam for speed is like beating CJam with C for size. :P
hehe, depends on the algorithm, but yeah
Since yours is already much shorter, here's what I had:
someone should answer my leap second comment on that time question
@Dennis ah, nice
I like the m>1a.> part, I was looking for something like that before
I was surprised it only takes 6 minutes. I thought getting rid of the brackets in {}{}? would be more expensive.
11:15 PM
seems like some folks here would do well in that
@Dennis hmm that solution will probably break in some cases, because you're using L after j (and it's global)
@aditsu Only the length of L, which doesn't change.
oh, it keeps the same length? nevermind then :)
The L I actually care about is pushed before j and rotated on top.
Yes, it's the number of strings.
in my code it was changing sometimes

« first day (1623 days earlier)      last day (3069 days later) »