« first day (1594 days earlier)      last day (3232 days later) » 
00:00 - 16:0016:00 - 00:00

12:19 AM
0
A: Sandbox for Proposed Challenges

WallyWestBalancing Brackets code-golf A quick and dirty challenge... I'm actually surprised this hasn't been done previously... Given a string consisting entirely of the characters ()[]{}, determine if it is "balanced". That is, every opening bracket must have a closing bracket of the same type followin...

 
12:30 AM
ooh I found another interpreter: files.nyu.edu/cb125/public/Lambda/ski.html but it keeps using combinators when reducing
maybe I can implement that too
 
0
A: Sandbox for Proposed Challenges

RyanA covering array is an N by k array in which each element is one of {0, 1, ..., v-1} (so v symbols in total), and for any t columns chosen (so an N x t array) contains all possible v^t tuples. Input: N, k, t, v (all 4 are positive integers), and then N x k integers, each of which comes from {0,...

 
12:56 AM
0
A: Sandbox for Proposed Challenges

WallyWestThe Quick and Dirty Guide to CSV Parsing code-golf The input to this problem consists of a string of n comma-separated values, each value being an integer or a string. The required output is n consecutive lines, where line i contains the ith value of the input. NOTICE – string may contain comm...

 
So ... which filter option should I use when dealing with API so there aren't closed/on-hold/etc questions in the resulting JSON?
 
1:19 AM
0
Q: Golf Your Favorite Minecraft Tool

Calvin's HobbiesIn Minecraft, the default item textures are all reasonably simple 16×16 pixel images, which makes them seem ideal for golfing. Below are simplified textures of the five "core" diamond tools in Minecraft: pickaxe, shovel, axe, sword, and hoe. The images shown are enlarged to show their detail. C...

 
 
2 hours later…
3:03 AM
how do I convert a string like "\x02\x03\x05\x07\x0b\r\x11\x13\x17" into its actual characters to use in a Python program?
(Python 2)
or is that not possible since the characters are no printable?
 
open('thing.py','wab').write(s) ?
although you don't really want to convert \r I suppose
 
thanks!
 
3:48 AM
I got xkcd numbering in O(log n) in 20 bytes!
 
 
1 hour later…
4:53 AM
@isaacg Yes, sadly. :P
 
@feersum Quantifier-freeness.
@MartinBüttner Once I break the numbers down by symmetry group, it turns out that most of the resulting sequences are already in OEIS. So it's mainly a case of putting together the pieces.
 
@VisualMelon there is some concern that it may be too mathematically difficult to actually solve, although that's lessened now that someone has come up with an answer for math.stackexchange.com/questions/1316839/…
 
 
2 hours later…
6:34 AM
@Sparr ok, I'm certainly not making much progress, but I'm having a lot of fun trying (I believe I have a solution for the probability of a given tree shape (looks a bit like the thing in that post, but I can't quite get my head around what he's saying, so that's probably a good sign), and have proved that there are at most 2 nodes of any tree which are the most probable roots)
 
Hello
 
(I also define nand m, (corresponding to his # and g, I think), but I'm not clear what his maths says, looks like something out of combinatorics I'm meant to know)
 
How much time should I wait to post a challenge in the main site after posting it in the sandbox?
 
I usually wait until it's got a few upvotes and I'm happy with it, if no one seems to have noticed it, feel free to post it in here so that people look over it, I don't think it makes sense to wait any particular amount of time - if people give it upvotes, then they think it's ready to post, and if there are no outstanding comments/issues, then go for
 
ok. Currently has 3 upvotes and has been reviewed by some users. Guess I'll post it... Thanks for the info :-)
 
6:48 AM
(ah, the maths.SE question doesn't say we are picking apart a fully connected graph, that (k-1)! stuff makes sense now)
 
7:02 AM
0
Q: Generate boxes!

Cool GuyYour task is to generate boxes using any one ASCII character with respect to the inputs given. Test Cases 1 1 --> ===== = = ===== 1 2 --> ========= = = = ========= 2 1 --> ===== = = ===== = = =====...

 
7:16 AM
(on re-reading things, his g is not my m, it's a different problem entirely)
(on re-re-reading things, I'm not good at combinatorics, I think they are the same, I'm going to stop trying now)
 
8:00 AM
@Sp3000 i need ur wizardry to turn ascii dec representation from 92 -> 47 -> 120 -> 32
in C
 
What do you mean by ASCII number from? (also which question are you doing?)
 
clear now ?
martin's one
i thought of subtracting 32
then 15 , +15*3 , +13
not efficient thu
 
Er... are you trying to turn 92 into 47, 47 into 120 and 120 into 32, or...?
 
no
 
maybe?
 
8:06 AM
92 and 47 to 120
32 to both 92 and 47
is there some tricky wicky way ?
 
hi all
 
32 to both 92 and 47? How do you decide when it goes where?
(hey Lembik)
 
@Lembik hi
 
a variable 1 or 2 or wtv
i decided to be 1,4
1*15+32
and 4*15+32
what do u think
 
hi @MitchSchwartz
 
8:11 AM
That doesn't seem too bad, I guess...
 
hey @Lembik
 
bad ?
hard ?
what abour dividing 92/2 then add 1 ?
 
(to conclude my rambling, I the Maths.SE problem is definitely not the same one I am solving, hopefully I've just not woken up yet)
 
@MitchSchwartz you are up to 106! :)
 
I don't really know C so it makes me wonder why you're working in code points
 
8:13 AM
i= 0 ; 92/1+ 0 ,

i= 1 ; 92/2+ 1
what do think of that
 
In Python I'd probably try to select a char from "\/" (for 92/47) then get its code point from that
Hm... so 92/-~i+i?
 
yes python ease it too much , unforunately i dont know it
 
@MitchSchwartz that's an impressive speed up
 
oh, thank you
i haven't played with the pruning idea yet
 
yes better than setting a new e=15
but there s last problem (120)
 
8:17 AM
2
Q: Is My Graph Planar?

isaacgYour task is to determine whether a graph is planar. A graph is planar if it can embedded in the plane, or in other words if it can be drawn without any crossing edges. Input: You will be given an undirected graph in your choice of the following formats: Edge list, e.g. [(0, 1), (1, 2), (3, 4...

 
any C++ people know how I can compile codegolf.stackexchange.com/a/51551/9206 using gcc?
@isaacg I like your question :_)
 
@Lembik Thanks.
 
maybe you can tell me how to compile this C++ program in return :)
 
It looks like it wants Boost installed, which I don't have, so I can't.
Also I've never touched C++
C, Java, Python, Prolog, Pyth, but no C++
 
I have boost installed.. I assume there is some command line set of options
there must be someone here who can compile a C++ program :)
I mean.. it is PPCG after all :)
 
8:48 AM
@Lembik i dont think its that hard
 
if it's in the expected directory, isn't everything handled by the #include s ?
(that was in reference to boost, which maybe you didn't have a question about to begin with)
 
@MitchSchwartz not for me.. I got as far as g++ kirbyfan64sos.cpp -lboost_chrono
now I only get g++ kirbyfan64sos.cpp -lboost_chrono
/usr/bin/ld: /tmp/ccVtpyrG.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
//usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0: error adding symbols: DSO missing from command line
which is progress :)
@Agawa001 any tips much appreciated
 
9:04 AM
i don't have experience, but you could try adding -lboost_system and see if anything changes (that is pure guesswork on my part)
i'm not able to see how people determine which libraries you need to link to, based on the headers
(@Lembik)
 
@MitchSchwartz thanks.. that doesn't work but it's possible I should try all different ordering too :(
hopefully kirbyfan64sos will tell us soon
 
9:51 AM
@Lembik are u working on linux environment
 
@Agawa001 , The program is C++, not C
 
ah i didnt read rest
 
@Agawa001 yes... ubuntu
 
10:07 AM
@Lembik v u used -Wall and -c switchs ?
 
0
Q: A Chrestomathy of Obscurity

Kieran HuntYou should complete four tasks in a language which: must return no results when searched for on this (codegolf.se) website, for example ToffeeScript; must have a page listed at Esolang and/or Rosetta Code and/or Wikipedia; be a distinct language, rather than a distinct version (e.g. python 2.1 ...

 
@Agawa001 "v u" == have you?
I think I will wait until someone says they have managed to compile it now :)
I spent too long failing
 
yes have you those switchs
^ you -tried- those
 
@Lembik I compiled it: g++ prob.cpp -o prob -lboost_system -lboost_timer -lboost_chrono -lrt -lgmp
 
@aditsu well done you! :)
I really feel it shouldn't be so hard :)
is it really impossible for g++ to tell you what command line is needed?
 
10:22 AM
probably
unless it could somehow scan through all the libraries
 
but couldn't it understand it's own error messages?
I just feel that the people who write the error messages that g++ outputs must know what the typical solution is
better than I do
(sorry.. just annoyed.. :) )
 
it surely understands, it just doesn't know what to link
the typical solution is to link the library that provides the missing symbol
 
but all I do is read the error messages and try to find which boost library it is referring to
couldn't it do that for me?
 
gcc knows nothing about boost
 
right but boost does.... I feel the system could be designed to be more helpful :)
in any case.. thank you!
@aditsu do you want to paste the command line in a comment?
or should I?
 
10:26 AM
go ahead
 
done
2
A: Calculate a probability exactly and quickly

kirbyfan64sosC++ Just a port of the (excellent) Python answer by Mitch Schwartz. The primary difference is that I used 2 to represent -1 for the a variable and did something similar for b, which allowed me to use an array. Using Intel C++ with -O3, I got N=141! My first version got N=140. This uses Boost. I...

it is certainly very fast
 
i love fastest code challenges
i ll give it a try after multiplication with sticks
 
@Lembik i emailed Min_25 and a couple others about the problem and also mentioned joy of X, so if they are interested they will reply
 
@MitchSchwartz thanks!!
@Agawa001 great :)
@Agawa001 I love them too
are you interested in the low level coding or the algorithms side?
 
runtime complexity
its my deepest interest
yea low-level (asm)
 
10:41 AM
that's great.. you might enjoy my challenges in that case
 
lemme finish my geometric equation about martin's challenge before
 
of course
 
as long as i have enough time
 
do you do euler challenges and similar?
 
yes iv done some (factorials , primes , etc)
 
10:56 AM
cool
 
11:10 AM
@MitchSchwartz The C++ version of your code gives 151!
of course we now need a nim and rust port too :)
volunteers?
 
@Lembik cool, i was curious what score it would get on your computer
 
I feel a polygon triangulation challenge coming on :)
if anyone is potentially interested
 
11:27 AM
delaunay and related?
different problem nvm
 
Is it possible to use the re module without using import re? (python3)
 
Not in any other shorter way, no
Unless you happen to be importing other modules too, then it depends
 
@MitchSchwartz Min_25 has arrived!
but he wants LaTeX :)
is there a neat way to render LaTeX and put it in an answer?
 
Help the SE dev team fix their MathJax bug
 
11:38 AM
@Sp3000 right but before that :) I vaguely remember someone spelling out a route that wasn't too painful
mathjax works in other SE sites right?
like math.se
 
oh wow, great
 
I find it a little hard to believe at the moment :)
first we need to render the latex
 
that is what Min_25 does :)
 
so it seems :)
I looked forward to his opinion on the job of X while I try to understand this :)
 
he just uploaded an image instead
 
11:43 AM
oh he got there first :)
is there any point asking him how he got the formula?
 
i considered combinatorial approach but had no idea how to proceed
 
I mean.. does he like to be secretive :)
@MitchSchwartz I don't think it was easy at all!
 
he probably had a way of looking at it that led to derivation that is simple for him, but maybe he will just let it be mysterious, idk
anyway it's amazing either way
 
let's test it first to see if it is right :)
 
there isn't really a need, but ok :)
 
11:47 AM
ok that's quite disturbing :)
seems to be 100% consistent with your answer
 
why disturbing?
 
because I really don't think it is easy to come up with the formula
 
he will sometimes submit for problems that were not solved for years on spoj, correct on first submission, his accuracy is very high
 
now I have to work out how to get him to look at the joy of X
is he anonymous?
 
in what sense?
 
11:49 AM
does anyone know who he is?
or she
 
his email account seems associated with his name, but he seems to go by Min_25 everywhere
 
is he a university person for example?
or an NSA employee? :)
 
i don't know
 
well.. this has been an extraordinary experience so far.. thank you :)
 
technically, his code prints one more value than it should, although it's a triviality
since he checks the time after printing
 
11:59 AM
@MitchSchwartz :) 945 (944) is his score
 
which isn't too bad
or her score!
who knows
now we just need Min_25 to join chat :)
 
Christopher Lee died :(
 
:(
 
-2
Q: Can someone explain this code?

David28893main(c){for(;~(c=getchar());putchar(c>96?20-c/122+5*c/16:c));} Found this line of code used in the following link. Need to know the reason for 20, 122, 5 and 16 in the above code Letters in phone numbers

 
12:20 PM
hi @Min_25 :)
 
hi @Mitch and @Lembik :)
 
everyone dies (god bless)
 
hi @Min_25 !
@Min_25 thanks for coming to the chat
@Min_25 I am very impressed you solved the problem exactly I have to admit. Can you give any hints for how you did that?
@Min_25 And.. can I tempt you with codegolf.stackexchange.com/questions/49218/… ? :)
 
As for the exact formula for p(n), I got it empirically. So, I don't not a proof now ...
 
@NewMainPosts i dont think this s offtopic since , my respect after all , codereviewers arent more expert in golfed codes than people in this place
 
12:30 PM
@Min_25 that's very impressive in itself!
 
@Agawa001 I know that it's the only place for that, but comment are the usual way to ask that (Q are for contests ^^'>. But he could have asked for a , no?
 
@Min_25 one question I was wondering about is what happens if you extend the question.. that is make A length n+2 for example with A[2] = A[n+2] and ask about the prob of getting two zero inner products
oh and thanks for the upvote
 
@Katenkyo sadly he doesnt have high enough heels to get uphere and propose his problem
yes , is wise way to obviate offtopic context
 
@Agawa001 Maybe a big issue of this site so. As if you want to participate, you have to know the "how", and to know the "how" you have to participate
@Agawa001 That would sitill be offtopic I think :/
That's why people are asked to explain their code
Codegolf is so obfuscated that even the author won't know what his code do after some time
 
About the Matrix problem, I will try it. :)
 
12:38 PM
@Katenkyo lol yes
 
By the way, that's the reason I don't actually codegolf, I wouldn't be able to do something great.
Someday i'll launch myself, but I don't think I'll play around with CJam or Golfscirpt
 
no one would mess with C-jumble (unless u are chinese) :D
 
As for the generalized (dot-product) problem, I don't know if they have the exact formula or not. But, I guess that they also have a simple formula. :)
 
@Min_25 well... if they do I would love to know what they are!
:)
I suspect the joy of X question is even harder, although I would love to be proved wrong
 
@Katenkyo i always have one of these states
the topmost is more current :D
 
12:45 PM
@Agawa001 I usually always know why it works when I do it... But I can forget during the night, and then, it's scary...
 
doesn't code work because you managed to find a way to make all the bugs cancel each other out for once ? :)
3
 
@Lembik Well said !
 
when you bug the actual bug thinking u debug it , then ur code works and u have no idea why
 
The worst is when you think your code is wrong, but it is actually nice.... It's the lib you use that is wrong...
Sometimes spent my 5h trying to patch before discovering that I wasn't wrong...
(my code quality was god-tier after that x))
 
i'll sometimes try little tweaks that seem to have a chance of working even though i didn't work it out properly, but i don't understand the mindset of writing code without knowing what you are doing
 
12:49 PM
the problem is that if you then fix only of the bugs, it all breaks :)
 
@MitchSchwartz That's why you should concept before coding (doing the algorythm, your object relationship or whatever)
 
huh?
i am saying that when i write code, i know what it is doing
and i don't understand how people can do otherwise
the joke in the image -- it is a foreign mindset to me
 
some random shots can fix the bug after many reprises (im sure im not the only who does this)
@MitchSchwartz "bragging"
 
Most of the time when I end up with "and I have no idea why", it's not because I had the concept wrong, but I just made a small mistake in the code. That's often harder to find to me than a conceptual problem.
 
@Geobits something lik -(-a) = a
 
12:56 PM
Something trivial anyway. Double/not incrementing in a loop by accident, forgetting to update/refresh some variable, etc.
 
i still make plenty of mistakes, idk how it is bragging to say that you endeavor to understand what you are doing
 
@Geobits Yeah, foolish basic errors are hard to detect.
 
but that only applies to the bottom part, "my code doesn't work and i have no idea why"
 
One of the case I had a hard time with is when i wrote a for(i;i<matrix.length;i++){for(j;j<matrix[i].length;i++) {...}}
 
@MitchSchwartz have you ever tried to code some dozen of pages , then wake up next morning and wonder (what the heck was i doing yesterday)
 
12:58 PM
It didn't even come to my mind that my OOB was because of that i++... didn't even saw it because I didn't think I could do that error
 
i think that implies this
 
Yea. The top part "it works" is much more rare. Normally that's because there was some underlying condition that sorted itself out invisibly (race conditions, data errors, etc). When I worked on planes, we called it PFM.
 
@Agawa001 Not only next morning, it can be 15 days later, because you were working on something else
 
hmm, but even if i don't remember all the details, i'll still have a general idea of why it works
 
@MitchSchwartz Yeah, but you won't totally remember how to modify it to add a functionnality without breaking it
 
1:01 PM
Oh, I'm talking more of the "it was broke, but now is working and I didn't do anything to it but add some debug logic (if that)" situation.
 
ok, i can relate to it more now
 
@Geobits memory access situation , isnt it
 
@Geobits One of my code was working only because of a printf added to see what was wrong... When it was here, it was working, without it, it crashed
 
@Agawa001 More likely it's just PFM, like I said before ;)
 
I love comments like //You don't know of it works, but you do know it works. Copy paste it and don't ask yourself any further
 
1:07 PM
could add a hedge word to make it more accurate i guess, "when i write code, i know (generally) what it is doing"
anyway, thanks for explaining the mindset / context
 
I went away and came back to see the topic unchanged :)
 
1:23 PM
@Geobits what does PFM stand for?
 
Pure Fuckin' Magic
2
 
@Geobits It's a good name !
 
reminds me of proof by TAMH
then a miracle happened
 
We also used it as a slightly less rude way to say "operator error" to pilots.
Because pilots are never wrong >_>
 
1:31 PM
I had a nice experience with PHP one morning (00:00 -> 01:00) on the day of an exam where adding meaningless spaces to SQL queries fixed a call to preg_replace in a different file
 
@Min_25 are you same @felipa :D
u wud be surprised how many low-reputation members are just (clones) of same person
 
:)
@Agawa001 how do you know?
 
I'm pretty sure he knows at least one person with multiple accounts :P
4
 
s/he would be worth the prize of the world wide mathematic formula of the year
@Geobits its not a crime :p
 
1:43 PM
Nonograms hurt my head, so skipped most of it :(
 
is there a public league table one can see with Min_25 at or near the top?
maybe a question for @MitchSchwartz
 
@Agawa001 That depends on why you have them. If you use one to circumvent bans, vote fraud, or similar, it's definitely wrong. But no, there's nothing wrong with just having multiple accounts.
 
i hate when i deal with math equations using incovenient environment like C ,
 
@Geobits It's not really that bad; it's just "given a list of lengths, does the resulting string match the list of lengths"
 
@Agawa001 That's like saying I hate when I eat oranges. Solution: Don't.
3
 
1:46 PM
@Agawa001 everyone who writes code in C should ask themselves regularly....why? :)
 
Swap C for "any language" and you've got yourself some good advice.
 
@Geobits what about if you like to answer your own questions? :)
 
he is 3rd at the moment here projecteuler.net/eulerians you need to be logged in to see it
 
@Geobits what do u think of gettin banned in a completely independant SE section of the place where you were playing arround
 
@Geobits yes but I pick on C because of the number of people who use it. I can't believe they are all writing device drivers etc.
 
1:47 PM
he has been 1st, i haven't kept track of how often and all that
 
@MitchSchwartz thanks .. who is first??
 
I recall some folks working on the engine for Camelot Unchained wrote some C code for low level optimizations. Apparently thousands of people fighting each other in the same world causes heavy load.
 
ok logged in...
 
people use C because of legacy and speed
 
1:49 PM
apia.. in python!
 
@Agawa001 If you really want to know... I think it's bullshit that if you get banned from participating in one stack, you just hop into another username and continue using the service. Much less using it to complain about the ban. I honestly don't know why the alt account wouldn't be banned as well, but that's not my call.
 
@randomra I just don't believe that most of them need the speed
 
@Lembik yes , i get barely one matlab code of mine upvoted
 
they should use nim :)
Samoa!
sorry... I suppose it is fake
 
@Geobits good , its good to not be such a pimp who spend most of times begging in meta against other members
 
1:51 PM
Much better to complain in a completely unrelated chat room, amirite?
 
^ this post is impplies one of the most curent users who isnt actually here
 
he is 16th here, but notice how he has a lot fewer solved problems than surrounding ones, that's because he focused on the hard problems that are worth more points spoj.com/ranks/users
 
@Agawa001 You have been warned about discussing off-topic subjects multiple times before. Please avoid this behavior—continuing to do so will result in a 7-day chat ban.
 
@Geobits complaining about what , not getting any matlab upvote ?
 
When I complain about list questions, I get stars. You should observe how I complain and try to complain like me.
4
One day you guys are gonna log on and they'll all be gone. I'll be sick that day.
I'll be building houses on Calvin's Minecraft server that day.
 
1:57 PM
When I complain about stars I get stars. Stars are weird.
16
 
If you get a star for that before I do I'll be mad.
>:-(
 
That's some sweet self-fulfilling prophecy action right there.
 
(See? I control this room subconsciously.)
 
Oh damn, Christopher Lee died
 
ctrl+t christopher lee enter ctrl+w
^ The characters it took me to figure out I don't know who that is
 
2:00 PM
@Rainbolt You had to press ctrl+w to figure out you didn't know who that is?
 
You sure you don't know him?
 
He's Saruman ;)
 
Oh!
Dang removed can't undo
 
Dracula, LOTR, Star Wars, The Hobbit, MWTGG, Charlie and the Chocolate Factory
 
:O No wonder I saw this strange resemblance between him and Count Dooku...
 
2:01 PM
and that's just the more popular stuff
 
there s nothing to be more sure of , than "not knowing someone"
 
It sucks that he died, but hell, 93 is better than 73.
Man had a good long run.
 
@Agawa001 Is that sarcasm? You are rarely sarcastic so it's funnier when you are.
 
He's been around for a loooong time. His IMDB tag is one of the lowest one's I've seen
 
but when u say the count , evrything changes
 
2:03 PM
I don't remember what Count Dooku even looks like
 
 
Like Saruman ;)
 
Count duckula is better
 
Chocula > Duckula
 
i m still amazed of the way taken to come out with this , i know this expression can be mathematically (golfed) more using pascal triangle
thats the only thing i like more than capuccino-coffee
 
2:15 PM
Well that's just nuts
 
2:28 PM
@Lembik although the dp solution can't compete with Min_25's formula, pruning actually gives a big speedup
 
2:45 PM
@Lembik updated my answer with pruning
N_MAX can be adjusted manually. the program could be written to do binary search to find a good N_MAX for target machine, but it seems like an unnecessary code bloat?
 
3:18 PM
@MitchSchwartz cool!
@MitchSchwartz binary search is never code bloat :)
 
3:29 PM
I don't really understand Max_N.. what difference does it make what you set it to?
does the code ever give the wrong answer?
oh it certainly needs clever tuning
with N_Max set to 150 it finishes with 3 seconds left
but with it set to 250 it never gets to 150
got to 165 in any case which is very impressive
hi @Jakube
 
00:00 - 16:0016:00 - 00:00

« first day (1594 days earlier)      last day (3232 days later) »