« first day (1650 days earlier)      last day (3490 days later) » 
00:00 - 15:0015:00 - 00:00

15:00
@MartinBüttner I feel like some of the permutations ones might be useful occasionally, but that might be a bit niche (like 2e!)
Also maybe uppercase/lowercase letters?
@Dennis I've been trying to come up with something for [UU] but I only found 4 bytes for [UU]a. :/
When do you need [-2X]?
Too bad there's no builtin arrays of two elements :(, all I got was L`:!
@Dennis oh I didn't see the link to the relevant answer
well if you can push [-2X] earlier, you can use Sp's trick with _:!
15:18
@Lembik Does 31 sound better for n=5? :P
@Sp3000 If only ee auto-cast to arrays...
@aditsu ^
actually, that wouldn't help either
Actually, it appears 18 is the best I get with my method now
Yeah, I have a similar problem with -2mF :P
hm, I could use .t
.t's been hurting me actually, there's been two challenges so far where it'd have been good :P
(One being the new seesaw challenge)
15:27
^ that
hm 54... this seems highly suboptimal
you guys should comment on sourceforge.net/p/cjam/tickets/20
oh, that's a good point
(how are we supposed to see those comments? :P)
Well the problem is that our imaginary .t here acts a bit like f
So it's not quite the same
@Sp3000 rather, it treats t like a binary operator with side effect
actually, that's not true either
ternary operators are weird
... that's kind of true. It's like using map but screwing with the stack at the same time
15:30
it's not even map. it's foreach
I cringe every time, I need a literal 21 in a CJam program :(
this one needs two of them -.-
btw 55 here, spent 8 on ".t"
Also ditto on the 21s :P
Although... I wonder whether one of them could actually be just a 20, since there's a lot of valid solutions...
51
oh, that's true
maybe
will you ever need to put two digits at the two ends?
... I think the answer is no
is the pastebin in the comment exhaustive?
I checked earlier and I think the worst case is 20 different solutions for any case
Hm... that seems to contradict the pastebin. Hang on
15:36
8 5 7 seems to have only 3 solutions
but whenever you have two digits at the ends there's an alternative
... I get a lot more then 3 here o_O granted I check all positions so I'm at least double due to symmetry, but still...
@MartinBüttner Does this look right to you?
hm no clue
maybe the pastebin isn't complete
I wonder if I can leave the centre position in the list... I wonder if a correct solution will always be earlier in the order of the cartesian product
nope
@Vioz- yes!
Oh I think it's specifically 8 on the left and 5,7 on the right
... wait no that still doesn't work
So at least I'm in the ballpark :P No clue if I'm the maximum
I'm trying with n=15, going to take a while it seems..
15:44
I am rewriting the code here to test it :)
hopefully it will work soonish
any python whizzes know a neat way to convert a list of 1s and 0s into an int?
It creates a very nice pattern when the list is outputted :P But I'm very certain now there's a way to calculate the size of the largest set for each n
Like ['1','0'] -> [1,0]?
@Sp3000 46 ... my .t workaround was completely nuts :D
more like [1,0] -> 2
@Lembik If you mean [1, 0, 1, 1, 0] -> 22 then int("".join(map(str, L)), 2) is one way
@Sp3000 nice
thanks
15:48
@MartinBüttner I'll just leave it to you then :)
of course, you can just do .{t}
(or in my case .{\t} ... I previously did .\2/{~t}/ o.O)
... I swear I tried that but for some reason it wasn't working...
... it works :/
posted mine
I forgot = takes a block as well
Something else to add to the to-do list
@Sp3000 is there a neat way to revert that?
22 -> [1, 0, 1, 1, 0]
15:54
[int(x) for x in bin(n)[2:]]
list(map(int, bin(n)[2:])), drop the list if you're in Py2
hi fives Vioz
I am
thanks!
you guys rock :)
:D
@Sp3000 ah, finally found a neat way to combine the two filters that saves a byte
I was about to suggest that :P
16:01
(just putting them both inside {}= with & is the same bytes)
'_21*q~:QK,Am3m*{__Af-Q.*:+!*L|=}=.{\t}NAS*'^ ?
... close enough
@Vioz- this seems much harder to write than the first time I did it :)
@MartinBüttner Thanks, but that would require at least one more stack operation.
... wait Martin you saved two bytes
@Sp3000 the other is from :Q
16:08
... ah
@Lembik I'm definitely seeing a pattern emerging from the bruteforce method. I do think there's a closed-form way of calculating this.
interesting!
Just to clarify to make sure I'm not messing anything up, 00001 [0,0,1] and 00010 [0,1,1] would not match, correct?
I really want to design an elevator-based esolang. Your program would be a building with a given number of floors and elevators. Each elevator would act like two-ended queue (i.e. stack/queue hybrid) for integer values. Integers entering on the ground floor are read from STDIN and integers leaving on the ground floor are written to STDOUT. the other floors can be used as storage and for data transfer between multiple elevators.
Those arrays being the count of 1s in the n groups of n length
16:11
the idea would be to program each elevator separately, like the nodes in a TIS-100 program.
all I need to sort out is the language used by each elevator.
That sounds pretty cool
for convenience one could even make the I/O on the ground floor dependent on whether you enter/leave through the front or rear door (front would read/write a character with corresponding character code, rear would read/write a decimal integer)
@Vioz- they would not as 2*0 is 0 :)
Good :P
Incorporate Prelude so you can have some elevator music :D (don't ask me how that would work)
But yeah, the numbers seem way to nice to be a coincidence. 1 -> 2, 2 -> 4, 3 -> 8, 4 -> 12, 5 -> 18, 6 -> 24, 7 -> 32, 8 -> 40, 9 -> 50, 10 -> 60, 11 -> 72, 12 -> 84
oeis?
Floor(n^2/2), interesting...
Yep, A007590.
So yeah, Floor(n^2/2)
@Sp3000 that was fast!
are you sure they are optimal?
16:16
I'm not entirely sure how one would access multiple integers stored on the same floor... can you only store one? is it a stack? a queue? a RAM? ... maybe they could be read back in random order... so you get randomness for free if you need it, but you can always write a deterministic program by only storing one integer at a time.
I just OEIS faster :P
:)
you have a chat room bot that looks up all sequences on oeis automatically :)
I'm fairly sure n=1..3 are optimal
@MartinBüttner You could make it Hilbert's grand hotel and each guest gets a room on the floor :D - if you add a new person everyone has to move one room across... (so stack)
I wouldn't know how to prove n>3 cases are
16:18
@Sp3000 that would also avoid having to specify how many floors/elevators there are :P
"randomness for free" sounds hilarious though
Retina has no randomness :( ... maybe I should add some sort of random stage... maybe replace the string by a random match of the given regex...
It could be like the syntax for alternation, I guess. Pick one to do.
@Vioz- hmm... we need a clever exhaustive method that works for n = 5
for n = 4 you get 12, right?
Yeah
I could still be using incorrect rules though.. 11111 [3,3,3] and 01001 [1,1,1] don't match, correct?
16:32
that is correct
I feel that the binary strings and sliding windows don't really add much, and only the actual count arrays matter
But 01001 [1,1,1] and 01011 [1,2,1] would match, right?
@Sp3000 right but you can't make all possible count arrays
@Vioz- correct
Can you make all possible count arrays where successive elements differ by at most 2?
Then I do believe it's f(n) = floor((n+1)^2/2).
16:33
an interesting question!
Here's the set I generate for n=13 (98 strings): pastebin.com/iYTWBEqn
That should hopefully weed out anything I'm not doing correctly
@Sp3000 oh [int(x) for x in bin(n)[2:]] doesn't quite do it
I meant differ by at most 1 - but looks like the answer is no (e.g. 3 2 3)
Oh, right, I know
What did it output that was wrong?
16:38
it outputs lists of differing lengths
I would like L -> int -> L to work
that is to get L back
[int(x) for x in bin(n)[2:].zfill(x)] if you want to preserve leading 0s, where x is the biggest length of number
not a truncated version of it
You'd need an extra variable for the leading zeroes
thanks!
zfill.. who knew :)
Alternatively, [0]*(k-n.bit_length()) + [int(x) for x in bin(n)[2:]]
16:42
ok debugging time.. what do you get for n = 3?
my code gets 11
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 1], [1, 0, 0, 0, 0], [1, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 1, 1, 1], [1, 1, 1, 0, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]]
for example
we could go down to n = 2 is that helps :)
btw is it <= 2 times or < 2 times?
<=2
my code could well be buggy of course but what do you think of the list of strings above?
the count arrays are 000, 001, 100, 101, 011,100,123,321,333,131,313
What do people think about 3D animated of a kaleidocycle?
@MartinBüttner link does not compute
for n=3 I only get 8 :( ['00000', '00001', '00010', '00100', '01000', '10000', '10001', '11111']
16:49
@aditsu copy-paste fail
@Vioz- ok but mine seems valid, right?
@aditsu fixed
00111 gives [1,2,3], which matches anything with a 1 in the middle group
hmm, looks fake
@Vioz- which one are you saying it matchs?
matches
16:51
00111 should match, say, 01010 for example
123 doesn't match 131
as the last 3 doesn't match the last 1
it's 123 and 121 :)
nvm
oops :0
I can't count :)
but it would also match 01001, which is 111
At least if I'm understanding correctly
@aditsu it's not. I came up with this because I had one of those in my hands yesterday.
16:52
hang on... 123 doesn't match 121
do we agree on that?
yes
@MartinBüttner It'd be nice if you could give it a flexagon net as input or something, since the hexaflexagon one is just a strip
@MartinBüttner After looking at your answer once more, I don't think mine is sufficiently different.
ok so what two things from my list match?
@MartinBüttner q~21Ue]e!{_21,Afm.*:+\A=|!}=0'_erNAS*'^ (39 bytes)
16:53
2,5,11,24 is what I get from n = 1,2,3,4
@Dennis it is! all the fun parts are better :D ... post it :)
[0, 1, 0, 1, 0], [1, 0, 1, 0, 1].. shouldn't they match?
this looks like a bug
@Lembik What's the n=2 one?
16:54
@Sp3000 I had 5 for that but I think I found a bug
@MartinBüttner If you say so. I'll undelete it.
I have 4
[0, 1, 0, 1, 0], [1, 0, 1, 0, 1] should match, right?
121 and 212
oh no
they shouldn't :_
:)
@Sp3000 let me list them... [0, 0, 0], [0, 0, 1], [1, 0, 0], [0, 1, 1], [1, 1, 0]
so I haven't found a bug yet
You have [1 2] and [2 1]?
[[0, 0, 0], [0, 0, 1], [1, 0, 0], [1, 0, 1], [0, 1, 1], [1, 1, 0], [1, 2, 3], [3, 2, 1], [3, 3, 3], [1, 2, 1], [2, 1, 2]] is what their group counts are
Earlier you mentioned that 00001 [0,0,1] and 00011 [0,1,2] would match, therefore making them not viable for the set
16:58
@Sp3000 yes... but [1 2] and [2 1] don't match
[0,0,1] and [0,1,2] don't match
because 2*0 = 0
but the last column counts them out?
@Vioz- how do you mean?
can anyone find how I initially specified the rules for matching? :)
just to make sure I am not changing anything
3 hours ago, by Lembik
given two strings S1 and S2, we say they match if all the counts match
3 hours ago, by Lembik
two counts match if one is within a multiplicative factor of 2 of the other
... hence I assumed [1 2] and [2 1] matched
17:00
ok so I have changed the rule haven't I
ok.. that's my fault
I need to change my code
sorry
That's alright :)
I'll do that later :)
Out of curiosity, what is your result for n=5?
2, 4, 10 is what I get for the first three
What are yours for n=3?
17:14
^^ that's n = 1, 2, 3 there
17:28
like, the strings themselves :P
I only kept the counts: [(0, 0, 0), (0, 0, 1), (0, 1, 1), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1), (1, 2, 3), (3, 2, 1), (3, 3, 3)]
(1,2,3) and (1,1,1) technically match cause of the 2
Same withg (3,2,1)
The 1, 3 mismatch, no?
yes, but all groups must mismatch for them to be considered not matched
from what i understand
From what I understand, all groups need to match to be counted as matching, so any single mismatch means they don't match...
17:38
This one was painful to get right:
16
Q: Row of natural numbers

metalimDefinition There is infinite row of concatenated natural numbers (positive integers, starting with 1): 1234567891011121314151617181920212223... Challenge Write program in any language, that accepts position number as an input, and outputs digit from that position in the row defined above. Po...

42 bytes for input parsing, 48 to solve the actual task.
I wonder if there's a better way...
17:52
@Sp3000 that's right
Darn, ok :P
Now I need to figure out why I'm getting 13 instead of 10 for n=3..
How's my Pyth etiquette?
1
A: Exponentiation of natural numbers using only primitive integer operations

Beta DecayPyth, 27 bytes K1Vr0@Q1J0Vr0@Q0=J+JK)=KJ)K Works by adding numbers together whilst looping. Takes input in the form: x,y Try it here.

18:08
@Sp3000 I've tweaked mine, I'm getting 13 for n=3.
13 is pretty high
what was your tweak?
Well, because before I was doing it that all had to mismatch for it to count, now it only needs one
Found 13 strings.
00000 - [0, 0, 0]
00001 - [0, 0, 1]
00010 - [0, 1, 1]
00100 - [1, 1, 1]
00111 - [1, 2, 3]
01000 - [1, 1, 0]
01110 - [2, 3, 2]
01111 - [2, 3, 3]
10000 - [1, 0, 0]
10001 - [1, 0, 1]
11100 - [3, 2, 1]
11110 - [3, 3, 2]
11111 - [3, 3, 3]
I must be wrong, but I can't see where
aha
332 and 333 seems to match
don't they?
They have one mismatch at 2 and 3
is this still with a factor of 2?
3 is within a factor of 2 of 2
18:11
Oh, within
That would do it
yes... did you think it had to be exactly a factor of 2?
I think so
:(
I blame myself
So the difference between them must be > 2?
but I don't believe the n^2/2 solution either :)
the difference must be <=2
18:12
For a mismatch
multiplicative factor <=2 I mean
right.. > 2
So if I had [x,x,x,4], to mismatch on the 4 I would need a minimum of [x,x,x,x,9]?
success! I have 10 now :P
What are you guys discussing?
Lembik posed a question earlier, in essence, given a number n, find the size of the largest set of binary strings length 2n-1 such that none of the strings match based on certain criteria
Ahh I see. :D
18:28
@Vioz- hooray!
Now I just need to see what @Sp3000 is getting for n=4
 
1 hour later…
19:31
I am intrigued too
until I fix my code :)
if it turns out not to have a simple answers on oeis I'll post the question :)
From what I can see from my results, this sequence isn't on there. That depends on my program being correct for n>3 :P
good :)
I would hate to ruin my reputation by posing a solvable puzzle :)
At least you made sure it's all about 1s and 0s. That's how I knew it was really you, instead of an impersonator.
3
20:15
Is there a way, in Python, to split a string into a list that has each character as an item in the list?
I'm using .split(",") right now, splitting at commas.
Do you mean like list does, or something different? docs.python.org/2/library/functions.html#list
Ah, yes that works @Geobits
I don't know if that's the golfiest way to do it, if that's what you're looking for. Someone else will have to answer that.
20:44
Strings in python are treated as sequences, so in some contexts you wouldn't even need to convert
for c in "string": print(c)
`s`
`t`
`r`
`i`
`n`
`g`
20:56
@Geobits You know I think that secret code could be crackable :)
21:09
0
Q: Perfect shuffle for any size deck of cards

Todd LehmanChallenge In the shortest amount of code: Compute the length of the permutation cycle of a perfect shuffle on a deck of cards of any size n (where n ≥ 2 and n is even). Output a table of all cycle lengths for 2 ≤ n ≤ 1000 (n even). A single iteration step shall be defined as taking the deck ...

0
A: Sandbox for Proposed Challenges

dohaqatar7Counting Quipu code-golfnumberparsing Introduction Quipus are an ancient device used by the Inca in the precolumbian era to record numbers in a base ten through positional system of knots on a cord. The system is rather simple and not so different from our own. Each cluster of knots is a d...

22:02
@Lembik Doubt it. I is a smart cookie.
22:26
0
Q: ASCII Game of Pong

Eric VincentAscii Pong The challenge is to recreate the classic game "pong" in ASCII characters in the shortest code possible. Requirements/specifications The "screen" should be 45x25 characters. White space should actually be white space. The paddles should be 9 equals signs: "=========" and should be o...

 
1 hour later…
23:44
@Vioz- At least 16
0
A: Tips for golfing in CJam

DennisPushing concatenated character ranges The uppercase ASCII letters (A-Z) can be pushed as '[,65> which generates the string of all characters up to Z, then discards the first 65 (up to @). All ASCII letters (A-Za-z) can be pushed as '[,65>_el+ which works as above, then creates a copy, con...

@aditsu @RetoKoradi For your bijective bases. ^^
(Stupid race conditions.)
00:00 - 15:0015:00 - 00:00

« first day (1650 days earlier)      last day (3490 days later) »