« first day (1468 days earlier)      last day (3393 days later) » 

12:06 PM
Hey, I asked for this earlier, but it got washed away by the flow of chat. Does this spec look ready to post: meta.codegolf.stackexchange.com/questions/2140/…
 
hi.. anyone want to help check if codegolf.stackexchange.com/a/45309/9206 is correct?
(please :) )
 
@Lembik are you looking for accuracy or speed correctness?
 
@NathanMerrill simply if it is correct
 
@NathanMerrill His code outputs numbers.. are they correct ? :)
@NathanMerrill or are we talking at cross purposes?
 
12:16 PM
I think the best way to verify if the numbers are correct is to write your own code and compare
2
 
@NathanMerrill it could be but then you have the problem of verifying your own code :)
did you see my comment?
I basically don't believe it already
but I need to find a counter example
 
As we all know hell is other people's code...no one is going to try to verify by reading it
 
@feersum sure I just meant any of the smaller numbers
the reason I don't believe it is that it is exactly the same as a problem which doesn't worry about collisions during rotations
 
@Lembik True, but if two sets of code magically end up with the same set of numbers, you can be more sure that they are accurate. You can never be sure that they are actually accurate
 
@NathanMerrill true
but I think a more promising approach would be to find a position you can't reach because of a collision during a rotation
and then see if his code says you can reach it
well.. that is what I am trying to do
 
12:22 PM
You already have that example in your question, so what's the problem?
 
@feersum it's too big for me to check if his code could reach it so far
at least too big for me
 
even if you delete the superfluous edges?
 
@trichoplax are you about?
@feersum I am trying! :)
I was hoping someone might help me too :)
reading the linked american scientist article is quite inspiring
 
is there any reason to believe an unreachable shape with so few segments exists?
now I'm tempted to submit code that calculates that sequence instead ;)
 
@feersum the smallest size I can make so far has total length 25
@feersum so it is possible the answers don't diverge until then!
 
12:32 PM
@NathanMerrill I found it somewhat difficult to parse. Could you provide some explanation of/motivation for the difference between name and id?
 
Name is visible and random (but allows you some semblance of tracking). Id is invisible, and from 0-9 and is what is used to move people
 
Is which player's turn it is considered when deciding if a configuration was reached 3 times?
 
any
also, thank you for the feedback
 
It seems like a welcome change from rock-paper-scissors type challenges ;)
but are you sure it's not going to end in a tie most of the time?
 
no
all of my bots end in a tie every time
but they are fairly stupid
 
12:49 PM
@lembik ah. I see your point. The numbers should be smaller than the no-intersection sequence, above a certain n. I can try running it for longer.
 
@trichoplax also does it really need python 3?
When I run it with python 2 it fails currently
but it would be nice to be able to use pypy
which I think still needs python 2
 
@NathanMerrill If you want statistically relevant results then you need to run each matchup dozens of times, not twice. And there are a few typos which need fixing. Other than that, I think it's almost ready. What's missing is the strongly recommended link to the test framework.
 
Ok. I'll post the link to the controller
 
@trichoplax well pypy3 exists... it just doesn't have a nice easy way to install and run it on ubuntu 14.04 it seems
 
I don't see any reason that trichoplax's code wouldn't work in 2
 
12:56 PM
@feersum even one of the self tests fails
Failed example:
reachable((0,0,1), (0,0,0))
Expected:
False
Got:
True
I got pypy3 to work however
 
maybe the self-test syntax changed? lol
 
:)
 
oh there is a division in there
 
ah
thanks
silly division :)
 
@lembik thanks for reminding me about pypy. I'll run it to get some higher values of N when I'm back at a computer. Can I use pypy for the score too? I hadn't thought of that before.
 
1:02 PM
@trichoplax of course! You can also use cython and numba :)
 
Hopefully the higher values of N will give a way to tell if my sequence varies from the no-intersection sequence
 
I am a little worried you might have to get up to 25
which won't be possible to test with thsi code
 
I've never used cython before - I'll have a look
 
that article implies there are clever ways of doing the counting
@trichoplax it's basically a way to introduce elements of C while keeping your code looking a lot like python
 
It seems to be less than a 3x increase for each value of n
 
1:05 PM
@trichoplax even n = 15 is too slow with pypy
I am running it now
 
@PeterTaylor I now run each permutation of bots 5 times (so each bot will face the other 10 times)
Also, the code is posted
 
@trichoplax is it possible to give your code the example in my question as a starting position?
@trichoplax and see if it thinks there are any valid moves?
 
Yes of course - the code is there to be used
If you import the file you can call the individual functions rather than running the whole lot
Good idea :)
 
401629 for n = 15
 
If it's not clear which function to use I'll have a go myself this evening when I'm at a computer
 
1:09 PM
cool!
 
We might need to find an example that does have a valid move under the no intersection rule, but has no valid moves under your more restrictive rules.
I think the example in your question has no valid moves even if only using the looser rule that the end position must be non-intersecting
 
I suppose you could try the other example above
and see which moves it thinks are valid
 
@lembik yes that would be much easier than trying to find an example! :) That saves me some work...
 
good :)
 
0
A: Sandbox for Proposed Challenges

feersumConvert a Finite State Machine to a Regular Expression Anyone can make a finite state machine for matching a regular expression. But what about a regular expression that emulates a finite state machine? This inverse operation is much more confusing. Input A positive integer N, denoting the nu...

 
2:10 PM
Oh good. A compiler techniques challenge!
You could make twenty of those and they would all be unique
 
compiler techniques?
 
2:27 PM
(Not a link to a video. It's a link to a playlist I promise)
 
I don't get it, why would this task be useful in a compiler?
removed? is it actually useful somehow?
 
It must have some sort of application if so many are posting about it.
 
what specifically?
 
https://www.cs.duke.edu/csed/jflap/new/DOCS/gui.regular.ConvertPane.html
http://stackoverflow.com/q/8861454/3224483
 
Interesting, I didn't expect this task would have practical applications
 
2:36 PM
If you make it deterministic, this paper might come in handy: krchowdhary.com/toc/dfa-to-reg-exp.pdf
Even if you don't make it deterministic, that paper will come in handy
Since you can convert NFA to DFA
 
Nice links, thanks
This challenge was inspired by the silliest task...number divisibility regexes
 
I feel bad that this brand new user's challenge got downvoted so much. I understand the close votes, but I think the downvotes were maybe unnecessary.
 
I might feel somewhat worse about it if he wasn't still getting net positive rep for it...
 
2:56 PM
@Rainbolt I didn't downvote it, but those have got to be the least well thought out scoring criteria I've seen in a while.
 
Lol this deleted answer on Board and Card Games: "I got no idea what's going on here. :D"
 
3:10 PM
Lol we just hired two new Aarons in a single week. We now have a grand total of three. And all of them are in the testing department.
25% of the entire department is named Aaron.
 
Yea, we've got 4 Davids out of 9. It's just weird.
 
2 questions a day
damn
 
Can we make it three? Oh look I just did.
 
you know what i am talking about ?
 
Our Area 51 stats?
 
3:16 PM
that is 5
CH's rate
 
We have a high rate of Crack-Heads?
Have we reached the Critical Hour?
 
@Optimizer isn't this just [print_string][commentchar][randomstuff] in some languages?
i dont see how can that improved
 
what ?
 
Confoederatio Helvetica
 
@Geobits Only in Switzerland
 
3:19 PM
the new question
 
i did not see yet
:)
 
oh
 
Golfscript has that - comment char that can't be terminated
 
Yep, it was just answered that way.
 
Oh dear. Peter Taylor did the thing.
 
3:26 PM
Peter discourages questions like this
someone must have hacked his account
 
feersum did the thing.
"listen, everybody in here, has done that thing. You want in? You gotta do that thing. So go do that thing, nowowow"
 
Hopefully someone will find something a bit less trivial.
 
I wish someone in here were named Julie
 
I kinda doubt you're going to find something non-trivial that beats it.
@Rainbolt you could make that a reality ;)
 
of course there isn't anything non-trivial
 
3:30 PM
@Geobits I promised that I would never change my name again. People called me Rusher for ages.
 
I tried to do the thing, but the instructions were not clear and my thing got stuck in the ceiling fan
 
@aditsu Sounds like a bad case of C jam.
 
ouch :)
 
Should have used more Lube.
 
you know what would be awesome?
 
3:32 PM
@feersum Hmm. What if it asked for no output, instead of string? I may change it.
 
if random.nextInt existed AND random.previousInt
 
you've got to be kidding
 
Wouldn't that just be worse?
 
you take the current state of random and go the reverse direction :P
 
@Calvin Then all you need is a single comment character and junk, right? 95^15
 
3:35 PM
...right, not thinking.
 
probably there are various languages which will not output anything with 16 characters
 
System.out.print... Ah damn :P
 
@NathanMerrill What happens when you call previousInt() and there is no previous int?
 
throw new RandomOutOfBoundsException();
 
Alright
 
3:37 PM
@Calvin'sHobbies I recommend deleting the question and using the sandbox next time.
 
Bah. Sandbox is too much hassle. I'll leave it up, I can live with my failure.
 
Ugh, how I hate people who categorically downvote all answers to questions they don't like...
6
 
3:53 PM
public class RandomOutOfBoundsException extends Exception {}

public class MyRandom extends Random {

    private final long seed;
    private int count;

    public MyRandom(long seed) {
        this.seed = seed;
        this.setSeed(seed);
        count = 0;
    }
    public int nextInt() {
        count++;
        return super.nextInt();
    }
    public int previousInt() throws RandomOutOfBoundsException {
        if (count < 1)
            throw new RandomOutOfBoundsException();

        count--;
@NathanMerrill Works like a charm ^
It's pretty ugly. If you called nextInt() a million times in a row and then called previousInt(), then it would have to loop a million minus one times to give you what you want.
@MartinBüttner Linky?
 
that thing question
 
I see.
 
public int previousInt() {return 4;}
 
But that can't possibly throw a RandomOutOfBoundsException, which was really the entire reason I wanted to write it in the first place!
 
You could increase the speed at the expense of space by storing them all. You just need to figure out what to do once you max out the array size :P
 
3:59 PM
@Calvin'sHobbies Maybe we need a challenge to create code to automatically repost a sandbox answer as a question on main
 
@trichoplax Testing that would be hell ;)
 
@Rainbolt I was actually thinking that it would work just like next int
@Rainbolt This is pretty awesome, but count is unneeded IMO
 
I figured you wanted a "real" backwards int. I just felt like writing the dumb one.
@NathanMerrill Count is unneeded? I'm curious
 
you basically have a "random number line". Seeding the random places it on a random spot on that random number line
and you can move forward or backwards
so calling previousInt 3 times and then nextInt 3 times would be effectively equivalent to calling nextInt 3 times, then previousInt 3 times
 
As far as final position goes, yes. But you results you get back would be different
 
4:07 PM
correct
 
How about this? Use the seed as the position on the number line. nextInt() adds 1 to the seed and grabs the first number from the RNG, prevInt() decrements the seed, etc.
 
that would work
 
Wouldn't seed just be count then?
 
it is a way to do it
 
Basically, but you wouldn't need to run it a million times to get prevInt(), just reseed and get a single number.
 
4:09 PM
but random classes have to have state somehow
 
But you would need to run it a million times (in order to generate the "random line")
 
so, however you move forward your state, you would need to "unforward"
 
No... not what I mean..
Gimme a sec...
 
that would make the numbers a lot less random, wouldn't it?
 
Yes, it most likely would do that :P
 
4:10 PM
I'm going to make this a challenge
 
I don't know how well the first number pulled from different seeds is distributed.
 
When they are generated (on instantiation or per call) doesn't really make them more or less random.
Aha! I know how to go backwards. Take TWO random generators, and point one forwards and one backwards.
It doesn't solve the looping a million times problem, but it removes the need for RandomOutOfBoundsException
 
	public class MyRandom extends Random{
		long seed;

		public MyRandom(long seed){
			this.seed = seed;
		}

		public int nextInt(){
			super.setSeed(++seed);
			return super.nextInt();
		}

		public int prevInt(){
			super.setSeed(--seed);
			return super.nextInt();
		}
	}
 
facepalm why is that so simple
 
@NathanMerrill Why? There's nothing challenging about it if you're using an LCG.
 
4:15 PM
@PeterTaylor critique it in the sandbox
I think it'll be fairly interesting
 
note to self: don't use that class
 
@Lembik good news - I've added an extra test case that has start and finish arrangements non-intersecting but involves a single step that intersects during the move, and it's correctly rejecting it.
It's a length 10 snake but the two states are interchangeable just not in one step, so it's still possible the sequence may overlap with the no-intersections sequence you found, for the first few n
 
@Geobits That class seems to return numbers that are very close together
run:
---Going forwards---
-1190881475
-1191266224
-1190111977
-1190496726
-1106236717
-1106621466
---Going backwards---
-1106236717
-1190496726
-1190111977
-1191266224
-1190881475
-1188957731
BUILD SUCCESSFUL (total time: 0 seconds)
It looks like seeds that are very close together produce numbers that are also very close together
 
I had a feeling that would be the case (or at least not very well distributed). That's why I added that note to self ;)
I don't know if it only applies to the upper bits, though,. If the lower bits are evenly distributed, you might still be able to use a variation for small numbers.
 
The way to make that work is to feed through a hash function rather than the superclass.
 
4:20 PM
That sounds more reasonable :D
Man, I've got to find a better way to do a normal distribution. I'm well over 300 in Java with not too much else to golf :(
 
4:36 PM
0
A: Sandbox for Proposed Challenges

Nathan MerrillRandom.previousInt() Consider a number line where each spot has a random integer. You will implement this line with 3 functions: setSeed(), nextInt(), and previousInt(). Your goal is to implement the line such that: The randomness is deterministic. Calling setSeed(x) then nextInt() should al...

Ok, I posted it
does that seem interesting enough @PeterTaylor ?
 
0
A: Sandbox for Proposed Challenges

Nathan MerrillRandom.previousInt() Consider a number line where each spot has a random integer. You will implement this line with 3 functions: setSeed(), nextInt(), and previousInt(). Your goal is to implement the line such that: The randomness is deterministic. Calling setSeed(x) then nextInt() should al...

 
5:20 PM
@MartinBüttner mathematica doesn't need quotes to print string, but then the comment cannot be open ended :/
string(*.......... gives syntax error .
 
5:36 PM
@trichoplax cool
 
@Optimizer yes
(although string is technically not a string)
there are no line-comments though
 
Who wants to bet on whether Calvin's Hobbies will silently delete the only negatively voted challenge he has ever posted in a few months?
 
@Rainbolt I don't think he can, once he has positively voted answers, but I might be wrong
(there are some rules in place that prevent you from deleting questions... I'm not sure exactly what they are)
 
Well you should have taken my bet then.
 
5:58 PM
quick poll for CJam users: should I change it so both ""p and []p output [] ?
(currently they both output "")
 
no
 
n/a
 
hmm, quite divided :p I also have a "yes" from Dennis
 
what's your own opinion? :P
 
6:04 PM
I haven't found any need to change it, but I'm also not opposed to changing it... so kinda neutral
 
I think Dennis had a point
I don't think I ever wanted to print"" (in those cases I usually want to print literally nothing)... but some people do give you a hard time for printing arrays like "" instead of []
 
if I get one more "yes", it will probably convince me :)
 
I think user23013 hasn't been in chat for a while, so I can't ping him
I don't know any other CJam users
 
well. there are very less questions asking to print [] and then there are ever lesser people giving hard time when you print "", so I think it might reach the same number as questions requiring you to print ""
@user23013 ping
@MartinBüttner this works .. you know ? :P
 
@Optimizer only if he's been in chat in the past two weeks
 
6:07 PM
lets see
 
(or some other arbitrary time frame)
 
if you mean to say that the auto completion does not come. Sure
 
@aditsu I noticed you added a lot of tickets for the next release
 
but ping goes through
 
would you mind taking care of ticket #2 as well? I think it's the most urgent one ^^
@Optimizer yes, but the pings stop working as well at some point
 
6:08 PM
@MartinBüttner I'd like to fix it too; it's somewhat harder
I wanna go through the easy ones first :p
 
lol, fair enough
but you want to add new features which work similarly (like the vector operations), so I'm afraid if you do it this way round they'll probably have the same issue ;)
 
I don't think I will add any new operator before fixing ticket 2
 
This is what happens when one of the developers on the team doesn't get invited to the Sprint Planning Meeting: i.imgur.com/QFbYtMW.png
New work belongs in the backlog for the next Sprint :-/
 
6:44 PM
My random bot Codemon tournament has been progressing very slowly....
So far, the leader is [Psychic:Pain:Shield:Poison|Water:Watergun:Slow:Sleep|Grass:Vine:Shield:Weaken].
AKA 1x3x11x13X3x9x2x4X4x12x11x5.
But it's not statistically significant.
 
@MartinBüttner one potential issue with ticket 2 is that some operators don't have a fixed arity
 
when is that an issue?
(and why is it not already an issue?)
 
the colon does something different for unary and binary operators
and it's not an issue because I only implemented a limited set of operators so far
(not already ^)
hmm, maybe it is already an issue, in a way
since the comma is in there
oh well, let me code it first and worry later
 
7:01 PM
Oh hey, @Calvin'sHobbies has reached 10k reputation. Congrats!
5
 
@Doorknob two things... a) I take it you haven't heard any news regarding MathJax after the negative feedback Jon Ericson got? (just checking) b) When will tips be un-CW-ed? ;)
 
7:14 PM
@trichoplax I think you owe us some visualization now :)
your comment got 5 upvotes
 
@Lembik btw, if you do want to give him the bounty, you should do it manually, because if it's auto awarded he only gets half of it
 
"code first, worry later" - I think its gonna be my new slogan.
 
7:30 PM
@MartinBüttner thanks.. I think I should give it to him even though his code might not be correct
for effort if nothing else
done :)
 
:( ... when you accidentally create an infinite loop while requesting data from the SE API and your IP gets banned
meh, filters not working again
 
restart modem ?
 
7:46 PM
ah no, the IP ban is gone already
but the filters were not responding to my changes again... but now it seems to work
 
whachu working on ?
 
a leaderboard for Random Golf of the Day
 
I don't understand. The landslide question got a lot of upvotes and is still getting, but no-one's upvoting the answers.
 
couldn't be bothered to read the explanations... :(
 
@MartinBüttner omg I think I have a fix for ticket 2 now, it's working much better than I hoped
 
7:57 PM
nice :)
 
can do things like ::mp now
 

« first day (1468 days earlier)      last day (3393 days later) »