226 reputation
18
bio website looselyconnected.wordpress.co…
location
age
visits member for 1 year, 4 months
seen Jun 27 at 20:33

My life is just like the movie Point Break, except with Python instead of surfing.

I live, I burn with life, I love, I write code, and am content.


Jul
2
awarded  Curious
Apr
15
awarded  Teacher
Apr
14
answered Does a 15-puzzle always have a solution
Mar
21
awarded  Yearling
Sep
19
comment Is there an numeric arithmetic with a single operator?
I've finally gotten around to coding this. I found a funny consequence of this approach. I started to render expressions in Reverse Polish Notation, but they looked like this: $\circ \circ y x 0$ ... in other words, expressions using this operator boil down to a sequence of operands! $y x 0$ lol! Well, I thought that was funny. Thanks again -- I'm enjoying playing around with this.
Sep
14
comment How to efficiently generate a sequence of random integers that adds up to 1?
FYI the origin of this is that I was writing a silly little "plot generator" program, where each step in the plot was + for a step up for the protagonist, and - was a setback. +2 or -2 for a big plot turn! But of course, I wanted the hero to come out ahead in the end, so after 10 chapters (or pages or whatever), I wanted the total to add to 1. Win for our hero! Another example where a mechanism became more interesting than the original effort. Thank you!!!!
Sep
14
revised How to efficiently generate a sequence of random integers that adds up to 1?
deleted 432 characters in body
Sep
14
accepted How to efficiently generate a sequence of random integers that adds up to 1?
Sep
10
answered How to efficiently generate a sequence of random integers that adds up to 1?
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
deleted 531 characters in body
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
added 6 characters in body
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
"randomly generate" instead of "generate random"
Sep
10
comment How to efficiently generate a sequence of random integers that adds up to 1?
@Martin I still think I can short-circut the combinitorial process of generating all the sequences (or sets) and randomly drive down to a single one.
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
added 319 characters in body
Sep
10
comment How to efficiently generate a sequence of random integers that adds up to 1?
@Anthony_Carapetis I think you're on the right track... I'm thinking of how you'd generate the finite list of possible solutions, and how to add randomization. I'll ponder on that.
Sep
10
comment How to efficiently generate a sequence of random integers that adds up to 1?
@Jp McCarthy if I just picked one, then it would be arbitrary, not random! I'd settle for pseudo-random, though.
Sep
10
comment How to efficiently generate a sequence of random integers that adds up to 1?
I removed the "uniform" restriction from the members of the sequence, because @gammatester has a point... they aren't purely uniform because there's an additional constraint. Beyond that, it's not important if all possible sequences are represented fairly.
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
remove uniform restriction on the members of the sequence
Sep
10
revised How to efficiently generate a sequence of random integers that adds up to 1?
make it efficient
Sep
10
asked How to efficiently generate a sequence of random integers that adds up to 1?