« first day (1539 days earlier)      last day (3309 days later) » 

12:00 AM
I always say be unique. (I'm not sure I always stick to that though :P) Like I agree that this is kinda bland because we've had a ton of palindrome challenges and finding n-digit nums that mult into palindromes seems like a convoluted math requirement tacked on to an older challenge.
 
At least based on all your challenges that I've seen, I'd say you definitely do stick to that!
I have a hard time being unique. u_u
 
Something palindromy and maybe more unique could be to sum the "rotations" of a palindromic number. Like 1234321 is 1234321 + 3124213 + 2314132. You'd need to worry about how to handle zeros.
 
By "rotations," do you mean like digit permutations that are still palindromes?
Or does the word have an actual meaning in this context that I don't know?
 
I mean take the two center digits and put them at the ends. Repeat lengthOfNum/2 times (so the number ends up where it started)
Rotations doesn't mean anything special, just seems like the best word to describe
 
12:16 AM
Oh, okay, I get it. Neat idea!
 
So 121 is just 121 but 628826 is 628826 + 862268 + 286682
It could be done with math or strings, giving a variety of answers
Feel free to make a question about it, no attribution needed
 
It would feel wrong posting that as my own work given that you came up with the whole thing. :P
 
But you would write it all, that's the real grunt work
 
I don't mind writing things. Like I said, it's the ideas that I have a hard time with.
To me writing seems like the trivial piece.
Then again, I'm not one of the foremost question askers on PPCG. :D
 
I'm one of the foremost chat users on PPCG. :)
 
12:30 AM
@PhiNotPi And you're one of the foremost awesome users on PPCG!
You should write a challenge that requires people to use ϕ where they would otherwise have to use π. :P
 
Unrelated: I was going through some code golf questions to find some to answer in Element, and I was disappointed to find that row-column-diagonal-block is actually literally impossible to solve in Element. :/
There's probably quite a few languages in which it is impossible, actually.
 
@PhiNotPi Why? Are newlines ignored?
 
Yeah, what about Element makes it impossible?
 
The problem is with the row vs. block.
If the first row is a valid program which outputs "row", then that will be executed before the rest of the program when it's a block. So, any "block" program will output "row" first.
 
12:46 AM
Yeah, I had that same problem with R and Julia.
 
There there, Pyth is practically impossible for most source layouts :P
 
1:08 AM
@PhiNotPi Well it looks like 3 years later, your syllable counting idea has been done for you
 
1:20 AM
New idea: output all unique impossible squares.
 _______
| _____/|
||\___ ||
|||   |||
|||   |||
|||___|||
|||___|||
\|_____|/
I might want to adjust some of the proportions.
 _____________
|            /|
|  _________/ |
| |\        | |
| | \_____  | |
| | |     | | |
| | |     | | |
| | |     | | |
| | |_____| | |
| | |     | | |
| | |_____| | |
\ |         | /
 \|_________|/
 
  +-----+
 /|    /|
+-|---+ |
| |   | |
| +---|-+
|/    |/
+-----+
 
1:39 AM
Here's a massive post. It shows an example of an impossible square, followed by four other squares which show the possible corners that an impossible square can have.
 
square? It's more of a torus
 
 _____________
|            /|
|  _________/ |
| |\        | |
| | \_____  | |
| | |     | | |
| | |     | | |
| | |     | | |
| | |_____| | |
| | |     | | |
| | |_____| | |
\ |         | /
 \|_________|/



 _____________
|             |
|  _________  |
| |\       /| |
| | \_____/ | |
| | |     | | |
| | |     | | |
| | |     | | |
| | |_____| | |
| | /     \ | |
| |/_______\| |
|             |
|_____________|

 _____________
|\           /|
| \_________/ |
| |         | |
| |  _____  | |
| | |     | | |
Yeah, I guess it's like a torus.
It's based on this thing: en.wikipedia.org/wiki/Penrose_triangle
Do you think a challenge based on outputting all impossible square torus things would be interesting?
The key parts would be making sure that the square really is "impossible"
Here is an example of a "possible square"
  ____________
 /           /|
/___________/ |
|           | |
|  _______  | |
| | |     | | |
| | |     | | |
| | |     | | |
| | |_____| | |
| | /     | | |
| |/______| | |
|           | /
|___________|/
Thus one of these should not appear in the output.
How can you tell if a square is possible or not? Count the number of visible surfaces of the square (excluding the inner square of empty space).
A possible square has 5 visible surfaces, an impossible square only has 4.
 
@PhiNotPi To me, the 2nd one looks very much possible
 
1:54 AM
The 2nd one is possible.
 
Oh
 
The first square in the list is "impossible," the next four (which are all "possible") show the options as to corner types.
 
Okay, I don't understand it and don't plan on trying to.
Do you know how to take a .VOB file and crop it? Or get Windows Movie Maker to actually edit it? Or perhaps there is a safe file converter I can download (I hate viruses)
 
I don't even know what a .VOB is, sorry.
 
It's a video file
First learned about it today
 
2:30 AM
Tips for golfing in Element, anybody? If feedback is positive, I'll post it in the morning.
 
3:16 AM
@PhiNotPi: I have no tips to add, but I'd be interested to read the post.
 
 
2 hours later…
5:45 AM
@MartinBüttner It's not inconsistent, 3 is an integer but char is a different type. Also see multiplication :) Anyway, the main point is usefulness.
 
 
2 hours later…
7:48 AM
hello oh wise people
 
8:12 AM
hai
 
8:26 AM
I'm thinking about improving CJam's read operators; right now they have different behavior in java and online
the main question is what should happen at EOF
should q keep returning ""? also I think it would be nice if l and r didn't throw an exception the first time they hit EOF...
 
8:48 AM
current plan is to return a special value on "nothing left to read" and throw an exception on a subsequent read attempt - for all 3 operators
the special value being "" for q and r, and N (newline) for l
 
9:24 AM
@aditsu yes, q should keep returning "", and yes it would be great if l and r didn't error.
@aditsu I'm not sure that makes sense for l, because l never contains the newline otherwise.
 
@MartinBüttner so you think qqqqq should work and just get more empty strings? what's the point?
 
source layout
but more importantly, what's the point of having it throw an error?
 
for l, that's exactly why it makes sense (the newline is a special value)
 
errors have no place in a golfing language.
@aditsu then r should also give a newline or a space.
 
r never returns empty string normally
 
9:30 AM
hm k
 
and it's easier to check as a boolean
 
:/ Hodor has surpassed my Wall Paint answer in votes...
 
so we basically agree on r and l, let me think a bit more about q
well, I see no harm in q returning "", and it's already doing that in the js interpreter
 
having a variable to have all alphabets is not that hard, is it ?
 
I don't plan to change any variable before version 0.7
 
9:36 AM
any reason ?
 
mainly compatibility
 
because I don't see any plans for 0.7 and you are adding more and more operators in 0.6.* itself
 
@MartinBüttner and if you had just answered in JS you wouldn't have more than 10 votes :P
 
I do have big plans for 0.7
 
I am pretty sure that one of the 5 empty string variables are rarely used
@Calvin'sHobbies oh, he would have. for sure
 
9:38 AM
@Calvin'sHobbies probably. honestly, I'm actually quite happy with the wall paint score, seeing that the question never made HNQ (or only for an hour or so)
 
but I guess I haven't shared them (at least not in detail)
I want to focus on getting 0.6.5 out today
@Optimizer anyway, I'm not sure how useful is an a-z string; I think I have more requests for things like 100 or 256
 
@aditsu the smallest way to get a-z is 6 characters
and its usage is as frequent as those big numbers liek 100 or 256
but both 100 and 256 can be done in 3 bytes
 
+1 for 100 and 256
unless you do more char to int coercion :P
 
^ now all hopes of a-z variable are gone
 
@Optimizer what if you can get it in 2 characters? :)
 
9:43 AM
how ?
 
I mean later
 
for later, I still don't see a reason why it cannot go in a variable
but I can't be bothered to argue for long if you are not getting it.
 
anyway, I'll consider it
 
Optimizer clearly has no faith in the public's ability to be unbiased ;)
 
@Calvin'sHobbies Looking at the amount of Autobiographer badges dealt out since yesterday, it looks like we got PPCG a handful of new users :D
 
9:50 AM
.oO( if 6 chars are too long, try doing it in java :p )
 
@Calvin'sHobbies I have raised a ticket, put my point forward. Now since I myself am not contributing, I don't want to force my views on him.
 
You just seemed so certain of Martin's success, in the JS and the cjam updates. That's what I mean.
 
@Calvin'sHobbies I think those two are two different things. But Martin's JS success, I am pretty sure 10 votes would have come.
 
I dunno. Python's not doing so great
 
its the Martin effect ;)
 
10:06 AM
Mr Bat Nutrient effect
 
that's a new one ;)
(although it only works because you didn't transliterate the ü correctly ;))
 
Nütrient*
 
There you go :)
 
10:10 AM
@aditsu q reads the entire input, doesn't it? Is there currently a use case for using it more than once? If not, it might be more useful to buffer the entire input and return it every time q is called.
 
@aditsu did I already send you a feature request to spend one of the remaining single-character operators on oNo? I need that so often. (actually, seeing how often it pops up, even a two-character operator would probably be worth the single byte saving)
 
@MartinBüttner I don't think so. I was one of them: it was the first recommendation of the new profile page.
 
@PeterTaylor the main use case of calling it multiple times (and relying on it giving an empty string) is source layout challenges where you just arrange a single repeated block into some pattern.
 
@PeterTaylor interesting idea.. not sure what's more useful (Martin mentioned source layout)
 
@PeterTaylor ah, that also makes sense.
but yeah, q always returning the entire input would probably be even better
 
10:12 AM
@aditsu its similar to what I wished for . Have Q preinitialized with q~
 
@MartinBüttner I think you mentioned it in chat
 
so you can use it multiple times
 
well, there's a potential issue if you read something with l and r first and then use q
I'd rather just have it return "" after the first time
 
J strikes again.
 
Where?
 
10:26 AM
CH's quilting challenge
 
hi @MartinBüttner
 
morning(ish)
 
Hi
 
hi @Optimizer
I hope this isn't a rude question.. but how do people who are here a lot spare the time?
I am genuinely curious
 
we are all jobless
(or eventually get fired and be jobless, due ot spending so much time here)
 
10:34 AM
@Optimizer is that really true? I mean is the room filled with jobless coding geniuses?
it seems an odd combination
normally coding geniuses can find a job easily
 
@Lembik I'm still a full-time student. That helps.
 
@MartinBüttner aha! That is one very useful data point :)
 
I know a lot of people here are senior developers in some companies.
 
@MartinBüttner what's your subject?
 
theoretical physics
 
10:36 AM
of course :)
physicists make the best computer scientists
it's a well known fact
 
do they? :D
 
@MartinBüttner yes!
 
I am also a full time student, I rely on PPCG quite heavily to keep me sane, I usually get drawn into things while I'm waiting for food to heat up or something, and then end up spending more time that I should scrutinizing C#
 
(I did do a B.Sc. in software engineering before)
 
The way I see it.. mathematicians can solve CS problems but they don't see the point
physicists can solve them and also care :)
CS people don't have the training to do CS :)
 
10:37 AM
the undergrad physicists I know don't care enough about programming to be PPCG users, I think.
 
@VisualMelon thanks.. maybe the room is full of students which would make sense
 
@Lembik I studied CS.
2
 
@PeterTaylor but at Cambridge :) That doesn't count
 
(I'm also studying CS)
 
@Lembik that's too much rudeness in a single day. and I am not counting the Hi :P
 
10:39 AM
@Optimizer would it help if I explained that I studied CS :)
so it's self loathing :)
 
Still, you cannot generalize
 
@Lembik Actually one of our top two challenge authors is a maths researcher.
(Zgarb)
 
@Optimizer oh sure.. I didn't make a scientific statement.. If I were to say something accurate it would be that I know a small number of really great CS researchers who did physics as their training
but it's less amusing than what I did say :)
@MartinBüttner interesting!
I think it is fair to say that do be a great CS researcher you need a really deep math background these days
by whatever method you can get it
at least in the parts of CS that I regard as "real CS" :)
 
I have a job (kind of), so not too much time
 
and many CS undergraduate degrees don't give you that background
 
10:42 AM
@Lembik Coming back to the question about finding time: I am currently unemployed, but I used to write GolfScript on scraps of paper on the bus to work and the walk home, and dip into chat in five-minute breaks to maintain my sanity in the face of some of the requirements I had to work to.
 
@PeterTaylor nice! :)
@PeterTaylor if you had gone to oxford, you would have regarded writing them on a scrap of paper as all the implementation they needed ;)
 
you at Imperial or something, Lembik? :P
 
@VisualMelon no :)
 
@Lembik I think you always did. When I read stuff from the 70s it's obvious that most of the people in CS had come from "mathematical laboratory"-type backgrounds.
 
@PeterTaylor I take your point
turing certainly did :)
 
10:45 AM
@VisualMelon And thus, the UK university feuds found their way into The Nineteenth Byte.
 
@MartinBüttner does the UK have university feuds?
 
well London has, at least
 
interesting
what are the feuds about?
 
Well, everyone knows there are only 2 universities
 
although I'm only really aware of UCL vs KCL.
@Lembik nothing, usually.
 
10:46 AM
isn't UCL just better than KCL ? ;)
@VisualMelon Oxford and the other one?
 
@Lembik obviously.
 
:)
 
Cambridge, aye ;)
 
@VisualMelon are you a cambridge person too?
 
no, Oxford rejected me, and Imperial wanted 4 As and an A* in Further Maths
 
10:47 AM
greedy lot!
 
I'm somewhat down the pecking order
 
soon to rise up and take them all down :)
 
not a hope!
 
@Lembik I don't know about that. I think he did most of his best work before they really existed.
@VisualMelon Cambridge, and Trinity College, Cambridge?
 
@PeterTaylor sorry, not sure I understand - I know someone who did Maths at Trinity, however
 
10:50 AM
@VisualMelon even within Cambridge, Trinity College is somehow regarded as separate and better (by them)
 
ah, yes, now I get it ;)
 
they have distinct admission criteria quite often, for example
 
The joke used to be that there were two universities in Cambridge. It doesn't work as well now that Anglia Poly has become Anglia Ruskin.
 
:)
 
should challenges about Fractran get a) a tag, b) a tag, c) both?
 
10:56 AM
a)
 
sounds good to me
okay, I think the project is done.
I would like to create a tag for partitions. now, there are at least two related but different concepts with that name in combinatorics: integer partitions and list/set/sequence partitions. should these get separate tags or a single tag? (or should I take this to meta?)
 
Having seen the confusion having one tag creates on math.stackexchange, I would strongly suggest having separate ones.
 
that's a solid argument. do you have a suggestion what to name the list/set partition one to be general enough to cover all sorts of collections? or should it be even separate [list-partition] and [set-partition] tags? (but I think that takes it a bit too far.
 
This one is not about a challenge, but how would one go about finding the index of a string in a list, if the string might not be in the list (in which case the algorithm returns the index of the element the string should be before).
I tried some kind of binary search but it's currently not really working.
 
is the list sorted?
 
11:08 AM
yep
 
then what doesn't work with binary search?
 
The part that it's not in the list.
 
well, when the search terminates, then the index is either the current position (if the element there is greater, lexicographically) or the next position (if the element at the current position is less, lexicographically)
 
Right now I have this Python code.
So what you're saying is that I should increment the index if the given search string is lexicographically greater than the one in the result index?
 
11:13 AM
All right, it works, thanks :D
 
11:23 AM
@MartinBüttner How about calling it [set-partition] and mentioning in the tag excerpt that it can also be used for multisets (including lists)?
 
Well the difference isn't multiplicity but whether partitions have to respect the order of the elements.
 
hmm..I need to think a new challenge that is easier maybe.. I am not very good at easy challenges :) Unless someone wants to write code to alphabetically sort a .bib file :)
the problem is that when I love the answers is when I couldn't have found the answer myself...
 
11:59 AM
13 hours until Code Jam Round 1A.
 
dumb questions.. how many ways are there of splitting 7 items into 4 sets?
 
oh wait
 
I though that at first but I am not sure that is right
right :)
 
you want splitting .
 
yes.. I want to end up with 4 sets
 
12:01 PM
6C4
maybe I am confusing between C and P
but logic is this : you have 6 places to put your partition and you have to put the partition 4 times.
but then there is a component of permutations of the 7 elements for the 6 partition spaces.
which might lead to duplicate sets , so 6C4 * 7! is not really the answer
 
right
I suppose we could split 3 items into 2 sets for a sanity check :)
I get 5 possibilities for that case
but I could be wrong :)
 
so 1, 2 3 and 1, 3 2 are same, right ?
 
yes
a set's a set :)
 
then only 3
1, 2 3 . 1 2, 3. 2, 1 3
 
yes my mistake
sorry
 
12:10 PM
In mathematics, particularly in combinatorics, a Stirling number of the second kind (or Stirling partition number) is the number of ways to partition a set of n objects into k non-empty subsets and is denoted by or . Stirling numbers of the second kind occur in the field of mathematics called combinatorics and the study of partitions. Stirling numbers of the second kind are one of two kinds of Stirling numbers, the other kind being called Stirling numbers of the first kind (or Stirling cycle numbers). Mutually inverse (finite or infinite) triangular matrices can be formed from the Stirling numbers...
 
@Optimizer I don't think I understand that. The last case missed out 2?
 
so 350 for (7,4)
 
thanks!
 
@Lembik he means {{1}, {2,3}}, {{2}, {1,3}}, {{3}, {1,2}}
 
ok got you
thanks
@MartinBüttner actually that's not quite right as I allow empty sets
 
12:13 PM
oh
 
oh
 
then there's 4
 
HODOR Hodor!
 
yes
 
@Lembik I think you just sum the Stirling numbers then (for all k from 1 to the number of subsets you want)
 
12:15 PM
ok that makes sense
 
so 1 + 63 + 301 + 350 for (7,4) which is 715, I think
 
thanks
 
what does a status of "later" on sourceforge even mean
 
"never"
"0.7" "the big release"
but who knows.. I don't think someone here actually uses sf.net other than aditsu :P
 
@aditsu you know, that big diff I posted implements a lot of the features you're implementing now, right? :p
although, to be fair, it looks like I didn't add as much error handling to my code
and it looks like we have different definitions of "pad"
 
12:26 PM
@Sp3000 your answer had a very short life
 
I do that a lot. I should really check more before I post...
You were asleep when I posted produce-different-behaviours :P I deleted/undeleted about 4 times in 2 hours
or something
 

« first day (1539 days earlier)      last day (3309 days later) »