« first day (1158 days earlier)      last day (3981 days later) » 

00:06
 
2 hours later…
01:53
8
Q: Let's make an ad for our site! (And now vote for our newly posted ads!)

DoorknobUPDATE: Ads have been posted! Vote for us! There was a tie, with two answers at 10 votes, so I just decided to post them both. Ads have been posted on Programmers (1, 2), Mathematica (1, 2), and Game Development (1, 2)! Vote for our ads there so they start showing up on the sites! So I noticed ...

Vote for our ads, everyone!
 
1 hour later…
02:56
Awesome! My toy apl is available as a webpage. groups.google.com/d/msg/comp.lang.apl/R0TDnox6o2U/3x7cqR8iLwoJ
Not sure which version it is. I've been making lots of updates. But simple stuff works. Tip calculator, divide 500 dollars among employees with specified hours for the week: a.(500.100)%+/a<15 17 19 22 35 37 42 (result is in cents).
. is multiply, % is divide, < is variable assignment.
 
2 hours later…
04:38
I've got a (crazy) idea. Pop-contest: Create a simulated palimpsest generator. Write a program which accepts two paragraphs of text and produces an image which displays one text when viewed normally, but reveals the second text when rotated 90 degrees and a digital filter is applied.
The first text need not be completely suppressed by the filter, just enough to allow the second one to be readable.
Pop-contest+code-challenge, that is.
Ultimately the details of the filter should be up to the answerer, but perhaps I need to define the framework.
First ideas: use alternate rich and pure cmyk blacks. use the painter's equivalent neutral colors: orange+purple, red+green, yellow+... dammit stupid memory!
Yellow+purple, orange+blue. ha!
Applying a threshold.
Hmm. What if you actually have to turn your monitor to its side and cover the screen with red cellophane! :)
05:36
^This is my first post not using the sandbox, please comment suggestions before many people answer.
It was actually quite difficult to write. But it was much easier than I thought it would be
06:49
Did anybody see my answer here? stackoverflow.com/a/22745618/… I know it's my pet trick and I've milked it in other answers, but it solves the problem where two other answers could not!
0
A: Find an array element position in compile time

luser droogThe nearest equivalent to templates in C (that I know of) is X-Macros. I think you can achieve this result, but it will require introducing another identifier for each struct (actually it doesn't -- scroll down to the "Edit"!) which we can sync with the array by declaring these identifiers in an ...

@luserdroog If you want it to be remotely like a real pamplisest, yes, because otherwise the easiest approach will be a total cheat. (My digital filter is to bit-reverse the RGB value of each pixel...)
Bit-reverse? Wow, yeah. That would certainly screw the pooch.
 
1 hour later…
 
2 hours later…
 
1 hour later…
11:07
Woohoo! Nobody did an APL one yet.
0
A: Smallest code to return sum of all characters in an array of strings

luser droogAPL 5 +/1+⍴¨a where a←"abc" "bdef" "cee" "deee" yields +/1+⍴¨a 18 Read as "Sum over 1 plus size of each element in a"

 
3 hours later…
 
1 hour later…
15:34
@ProgrammerDan I rejected your edit because it didn't change the syntax highlighting. You had to use lang-javascript instead of just javascript. Or even better: to give all code blocks JavaScript highlighting, put <!-- language-all: lang-javascript --> at the top of the post.
15:55
Wow, python's IO's even slower than I thought...
from itertools import*
a=product(['*','','/','+','-'],repeat=8)
b="".join([str(i) for i in range(1,10)])
c=zip(repeat(b),a)
for d in c:
lst=[]
for e in zip(*d):
for f in e:
lst.append(f)
g="".join(lst)+"9"
if eval(g)==100: print g+"=100"

Runs in what, 10 seconds?
But if you add a single print c in there, it crashes and burns and takes like 10 minutes :S
(and crashes both idle and pyscripter in the process)
@ProgramFOX No, thanks! I've been increasingly frustrated with finding which language-labels apply, so I guessed. Rejected the edit was totally the right thing to do. I initially tried to use <!-- language-all ... --> but trying to find a list of what the language tags are is next-to-impossible now (four links deep, and then no list)
@Synthetica I just found this benchmark comparing Java and Python. I am having trouble interpreting the results though benchmarksgame.alioth.debian.org/u64q/…
@Rusher It says "python is way slower"
Yea, and generally requires less code
@ProgrammerDan I think I found a list here: google-code-prettify.googlecode.com/svn/trunk/README.html
> The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends, Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles, and Rust. It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl and Ruby, but, because of commenting conventions, but doesn't work on Smalltalk. Other languages are supported via extensions:
16:04
@Synthetica I found what I wanted. The median is that Java is 15 times faster than Python.
Crap no that is memory usage
Where on that page does it say how many times faster Java is than Python?
@ProgramFOX that's actually my case-in-point. There is no list on that page that actually shows the proper tags to use. I suppose you can read the code to find "the list" ... but no true, authoritative table that lists the tags. :-./
@ProgrammerDan By "tags", do you mean the languages that you can use in code blocks?
@ProgramFOX I suppose. <!-- language: java --> works, for instance, but <!-- language: javascript --> doesn't, you have to write it as <!-- language: lang-javascript --> That seems arbitrary and confusing. There should be a canonical list.
@ProgramFOX looking through prettify.js, I think code.google.com/p/google-code-prettify/source/browse/trunk/src/… here might be the start of the "list" I desire.
@ProgrammerDan I think you can only use <!-- language: java --> on Stack Overflow, but not on Code Golf, where you have to use lang-java
@Rusher I should learn C ;)
16:09
@Synthetica What for?
@Rusher Speed, this was a not so subtle reminder that even the "oh so slow java" is about 10* faster than my beloved python
@ProgramFOX My point stands, it's definitely not at all clear to a new user which language class to use (of which I consider myself)
I see. There is no explanation about syntax highlighting on Code Golf, only on SO.
Not exactly. There is no explanation in either place, with a list of languages.
Both have the same explanation in the general edit-box help: codegolf.stackexchange.com/editing-help#syntax-highlighting
That's really hard to find. There is no list of languages, but there is a link to the Google Prettify Readme, which contains a list of languages.
16:17
Right -- and actually I need to amend my understanding -- I was prematurely clicking the Google Prettify link in the second/third chain out from the edit-box help. There is a list there, at the bottom of the accepted answer: meta.stackoverflow.com/a/184109
Perhaps it would be best for the general edit help to include a direct link to that answer?
That would be a good idea.
@ProgrammerDan This is the motivation for my comment on meta.codegolf.stackexchange.com/questions/1355/…
@PeterTaylor Good call, upvoted.
The FAQ here on Code Golf says something that only applies to SO:
> or you can specify a tag, and the syntax highlighting language associated with this tag will be used
16:54
Also, the code I posted earlier, was for a challenge, that suddenly disappeared. Does anyone know where it went?
Also:
12*3*4*5-6+7*89=1337
123*4+56+789=1337
1234+56+7*8-9=1337
1+2*3*4*56-7+8-9=1337
1-2-3+4*5*67-8+9=1337
I've starred it for you, @Synthetica
Oh, thanks :)
Anyone check out the unicoins yet?
Yeah
All hail the almighty mouse macros ;)
Nothing special, really
The payment options are amusing
Also just wasted a bunch of time finding pokemon on google maos
*maps
 
1 hour later…
18:44
Anyone here play MTG?
@PeterTaylor I figured out that your icon was RGB and CMY mixed together, and I'm proud of myself :)
At first I was thinking, "That's not a proper rainbow..."
I remember reading that Peter generated that image with his program for the Newton Fractal challenge on this site.
Unicoins! Nice april fools since it actually does something. I bought the 99 coin thing and I get dancing unicorns for every time I vote!
@ProgrammerDan How did you find this pokemon searching thing?
@Rusher Not much. I used to play a bit, but when I moved I didn't find a group of non-Spikes to play with. Some friends starting playing a while back, and I went to the Born of the Gods pre-release with them, but one of them's stopped because it was taking over their life. So I have a few dozen decks, but I don't really play.
@Quincunx A bunch of news outlets posted about it. Here's a good example: kotaku.com/how-to-find-pokemon-on-google-maps-1555465846
19:16
@luserdroog Correct.
I made my image with a program for generating Venn diagrams for an SO question.
Unfortunately, for n>3, they are not actually Venn diagrams any more.
Wow python, just wow.
def f(element=1,count=1024*1024):
t=time.time()
for i in itertools.repeat(element,count): print i
print time.time()-t
f()

Prints a loads of ones, and then after a minute, prints 73.60... Why is python's terminal throughput only 0.1 MB/s?
@Synthetica Have you compared output to terminal, to file, and to /dev/null ?
@ProgrammerDan Can't find how to do it :-(
@PeterTaylor Currently on a windows machine, so no. I'll boot up a VM
19:23
@Quincunx Do you have Google Maps on your smartphone (android or iphone)? Open it up, and go to London or Paris. Zoom in. Catch 'em all!
@ProgrammerDan Don't have a phone :-( Can't I do it online?
It appears not .
It seems you need the app.
Yeah, sorry, @Quincunx, I believe the app is necessary.
@PeterTaylor Huh, Ubuntu only takes 9 seconds, in a VM (I'll try /dev/null now)
That basically instantly finishes
I'll try PyPy, see if that changes anything
It's actually slower: 12 seconds :O
On a second run 9.24
About as fast as the normal python, on the whole
These unicoins are bad; I'm voting / unvoting just to see the unicorns.
I know right ;(
19:32
@PeterTaylor Makes sense. It's an expensive hobby. I paid $100 to enter all four BotG events (two single, two double headed), and left with $200 on tab (my store allows credit at a rate of $4 per pack won). But I know some stores force winners to cash out with prizes.
@Rusher I won four boosters, which I was pleased about.
Good evening!
@PeterTaylor Congrats. And good afternoon TimWolla!
 
1 hour later…
 
1 hour later…

« first day (1158 days earlier)      last day (3981 days later) »