« first day (1672 days earlier)   

12:02 AM
@orlp The [ on the left can be recomputed from the rest of the expression, so we can remove those.
 
@TheNumberOne how?
how do you distinguish [+[+]] from [++]
 
[+[+]] -> +[+]
[++] -> ++]
afk again
The ] on the right can also be recomputed from the middle, unless it matches one of the [ on the far left.
 
no, you're leaving something out here
do you do anything special for .[<+]. for example
it has no bracket on either the beginning or the end
does that mean you do base 8 everywhere?
 
.[<+]. doesn't change
 
well, that's not true
your explanation is flawed then
 
12:12 AM
How so?
 
because the [ doesn't get encoded
 
Why not? As I said, octal except the first digit
So [ is still a possibility after the first
 
well, that's not correct
give me one sec
wait now this is weird
 
[ is encoded using the octal digit 0
 
give me a couple thousand more seconds
 
oh wait
I think that's why it disappeared
leading 0s get nuked
 
^ First person to notice that.
Other than me.
 
ok I think I'm starting to understand your answer
 
That's why the translation can't start with a [. My encoding simply does not allow it.
 
any non-balanced brackets simply automatically get balanced
so you can have arbitrary balance in the middle
 
12:19 AM
Yes
The hard part is distinguishing [+[+]], [[+[+]]], and [[[+[+]]]] from each other.
They are encoded as +[+], +[+]], and +[+]]] respectively.
+[+] is encoded as +[+
 
@TheNumberOne I had a different idea
 
What is it?
 
encode into base-7, not counting [
when you encounter [, push onto a stack how many symbols you've processed so far
when you encounter ], encode a 6 in base-7 followed by a a base-N number containing stack.pop(), where N is the number of symbols processed so far
it should be trivial to see that this is a dense enumeration
 
That fails in the case where nothing follows the 6.
 
12:28 AM
@TheNumberOne there always follows something after the 6
 
Decode 34 (decimal)
 
34 % 7 == 6
number of symbols processed so far = 0
base-0 number containing 0 (trivial)
[]
 
Decode 42
 
42 % 7 == 0
+
42 // 7 = 6
number of symbols processed so far = 1
base 1 number follows
6 // 7 = 0
[+]
 
Decode 6
 
12:32 AM
[]
don't even need to think about it
remember I wasn't done with 34 yet
 
Oh :), finish then.
 
34 // 7 = 4
4 would be like ,
so [],
 
Do you decode the number left to right or right to left?
 
don't know
it's tricky to implement right
actually I think it needs one modification
[ [ ] ]
consider that
you could see it like this
[   ]
   [    ]
which is obviously not right
but the encoding right now could encode it like this, thus it's not dense
 
12:58 AM
ah cool, nobody noticed the easy byte that i thought of at dinner, so 116 now
c+=(c<0<6<v)-(d>0==v) -> c+=c<0<6<v;c-=d>0==v
like i said, i didn't look into how / why it works, i've just been focusing on making programs that are equivalent to the previous one
 
1:18 AM
@TheNumberOne not sure if you meant first person to notice that leading 0s get nuked, but if so, that's not quite true, and i don't think it's hard to notice. i mentioned a consequence of it here chat.stackexchange.com/transcript/message/23717192#23717192
"if we don't strip the initial '[' we would get the same d"
 
good point, you noticed it too.
I forgot about that. A lot of your optimizations were based on that.
@orlp Decode 19
@orlp 19 should uncover a problem with your decoding algorithm.
 
19 % 7 == 5
.
19 // 7 = 2
.-
weee
 
Hm... not what I intended.
 
:D
 
1:36 AM
@orlp Decode 97
 
97 % 7 == 6
base 0 number
[]
97 // 7 == 13
13 % 7 == 6
base 1 number
13 // 7 = 1
yes, 1 % 1 == 1
 
ok i have a better idea of how @TheNumberOne 's encoding system works, very cool
 
[[]]
(0 % 1 == 0 would form [][])
 
@orlp Wouldn't it be a base 2 number?
 
@TheNumberOne no, we only processed one symbol so far
remember, we ignored [ for 'symbols so far'
but it definitely has some off-by-one errors, and one flawed nesting
but I believe that can be solved
 
1:40 AM
@orlp Oh, I forgot that.
Would [+] be encoded as 6?
Never mind, above you decode 42 into [+]
 
6 encodes []
you already asked that :)
let me demonstrate the inverse
r = 0
[ ignore, push 0 on stack
 
How would you encode +[] vs [+]
 
+ -> 0
r = 7*0 + 0 = 0
hrm
yeah, here I have some issues
 
@orlp 8 would be 7, correct?
 
?
I mean, 0 digits are falling off
@TheNumberOne oops
 
1:46 AM
@orlp That was my biggest problem with figuring out an encoding.
One way to fix this could be to start with 1
 
@TheNumberOne empty string vs +
 
@orlp "" -> 1, "+" -> 7
 
@TheNumberOne what would 2 be?
 
No program would translate into a 2.
 
got another byte, d>0==v -> d>1>v
if d is nonzero at that point, it has to be at least 8
because of the previous d=d*8+v
 
1:52 AM
works, I didn't expect it to though.
ah, good explanation
 
thanks
 
2:18 AM
@orlp You need a program where leading 0's don't change your program.
 
 
1 hour later…
3:36 AM
@Doorknob Is this possible in Snowman? (Possible in a reasonable amount of code)
@Dennis Are you in here?
 
Nope. :P
 
Oh okay. Sorry, carry on.
 
Just kidding.
 
I know.
 
(Me, not the language.)
 
3:42 AM
/you kidding
Would you jam out a CJam solution in 5 minutes for this?
@Calvin'sHobbies Hi
 
Sure.
 
Sure as in yes you'd want to? (I'm not asking you to. :P)
@Calvin'sHobbies ?_?
Looking for feedback on the challenge because I'm bored and I just want to post it. :P
 
Done.
 
Done what?
 
:)
I think something happened to your link
 
) doesn't usually get URL encoded, but it messes up the Markdown.
 
Ah okay
Nice work!
 
Nice challenge. Brute force becomes rather slow for higher values of n.
 
Yeah, I noticed running that link.
Should I impose some kind of restriction?
I figured I'd let people do whatever.
 
3:53 AM
You might want to mention that n will be non-negative.
 
Good idea
Done
 
I also don't understand the without leading zeros remark.
 
So for example 013 is not distinct from 13.
You'd count that as one.
Is there a better way to say that?
 
Number of distinct primes should have you covered.
That also explains that multiplicities are not counted.
 
Better?
 
3:56 AM
Perfect.
 
:D
Is it interesting enough?
That's probably the most import question to ask.
 
I think it's entertaining.
It would be a lot more difficult with a time limit.
That's not necessarily a good thing.
 
I feel like in order to impose a restriction like that I would need to have a reference implementation so that I know of a way to do better than brute force. (Currently I don't)
 
I can't golf it any further
def N(s):
 r=p=0;a=[0]
 for c in s.strip(']'):
  j='[<>,.-+]'.find(c);r=r*8+j;p+=r<1
  if j%7<1:a+=[-~a[-1]-j%5]
 return-~r*8**min(a[p:])
@TheNumberOne
 
@AlexA. True. With and without the restriction, you have two entirely different challenges. I like it as it is.
 
4:01 AM
@AlexA. Sure. Now, if you want a reasonable amount of code and for it to complete before the heat-death of the universe then... ;)
 
@Dennis Thank you so much for your input, I really appreciate it!
@Doorknob Do you have any input on the challenge? Would it be fun to do in Snowman?
 
Well, then it depends on how you define "reasonable" I guess. I'm sure it'd be possible to be efficient and under, say, 1kb.
 
:P
 
It would definitely be a challenge!
 
@AlexA. No problem. This is your second challenge, right?
 
4:02 AM
Yep
First was World Big Dosa
 
@AlexA. I haven't had lots of free time recently, though if I get the chance I might give it a shot.
 
@Doorknob <3
 
I still have to write an explanation for that one. I kept thinking that I would find a shorter way without converting the entire code to unprintables, but eventually forgot about it altogether.
Blame cops and robbers.
 
Nice challenge, too! :)
 
What, mine? If so, thanks! :D
 
4:05 AM
Yep, sounds fun (especially in snowman :P)
 
Every time I try doing anything in Snowman I get so confused that I give up and use a different language. I have yet to have the patience to learn it well.
 
I have to go to sleep now though, because school. I might be able to try a Snowman solution on the weekend. Just be prepared to be whacked with a block of unintelligible gibberish. :P
 
I'm always prepared for that.
Goodnight!
Btw, has been posted.
 
0
Q: Fond Memories of Past Primes

Alex A.Consider a prime number p, written in base 10. The memory of p is defined as the number of distinct primes less than p that are contained as substrings of p. Challenge Given a non-negative integer n as input, find the smallest prime p such that p has memory n. That is, find the smallest prime w...

 
OK, I managed to achieve a significant speedup. 3.5s for the last test case.
 
4:09 AM
Ooh, nice!
Oh, should the title not be title case?
Fond Memories of Past Primes --> Fond memories of past primes ?
Looking at the current question list I guess the latter is more common
 
It's a title, so title case should be ok.
 
I remember at one point someone edited a challenge to remove the title case. Might have been Beta.
 
Doesn't really matter, both are fine
 
Find the first prime with memory p should be lowercase, but Fond Memories of Past Primes looks better like this imho.
 
Okay cool. Thanks :)
 
4:23 AM
I'm a knucklehead. I posted the older, slower, longer version.
 
It happens.
 
It's remarkable that the sequence is not increasing.
 
Right?
 
@Dennis It's kind of like "smallest number with exactly n divisors" - the exactly kinda screws things over :P
 
OK, maybe remarkable is a string word. It's counter-intuitive though.
 
4:30 AM
@Sp3000 Do you like my second challenge?
 
It's okay :) I wouldn't say "like" though because anything primes in Python is insta +20 bytes
:P
 
You could use something other than Python ;)
 
:/
 
Or not
 
Btw, this was my first code golf since August 24. The PLQ leaves time for nothing else...
 
4:32 AM
You don't say :P I've pretty much given up on PLQ though
 
Wow, seriously! That's an entire 3 days.
 
@AlexA. Yup. And my third since August 17.
@Sp3000 I try to get loose, but I can't. :P
 
Martin has created an addiction.
 
1. I'm browsing esolangs to crack answers. 2. I find a language I really like and post a new answer.
It's a vicious cycle.
 
Sounds fun though.
 
4:34 AM
Well, let's say Martin made it worse. :P
 
Haha
 
I see 3279 byte Wordys and I fling my arms up in the air and go "Nope."
 
@Dennis Yes, I was worried about you when I posted a CJam answer on a challenge before you. ;)
 
Haha.
Wordy was a fun one. I initially wanted to make a Malbolge/Wordy polyglot, but I'm not sure it would have stayed under 30k characters.
 
4:37 AM
No fun for the crackers though :P I never touched it
 
Well, when I wrote it, you had just cracked my Malbolge/Wordfuck polyglot, so I made it extra special. :P
Still, over 50% needle.
 
"needle"
 
As opposed to haystack?
 
That's one big haystack. — Sp3000 Aug 20 at 5:51
I guess that depends on the size of the needle. — Dennis Aug 20 at 5:53
 
Found the needle
 
4:51 AM
sigh 5 minutes to write an answer, 15 minutes to make it Foo(l)proof.
 
^ story of the PLQ
So it looks like our name probably won't be changing, at least not anytime soon.
22 for no change, 13 for highest voted replacement name
 
If those are the options, I prefer no change.
 
You mean those two? Because you posted an option yourself.
 
Those two, yes.
 
Not a fan of Code Sport, eh?
It's not my favorite.
 
4:56 AM
Nope. If it was Code Sports, I could get behind it.
 
HOORAY.
Somebody agrees with me.
The lack of the s bothers me quite a bit.
 
It's BE. But since this is a US site...
 
I guess in British English they say "sport," but in American English it's usually "sports." This makes it more amusing then that "Code Sport" was suggested by an American.
 
I just upvoted your suggestion. :P
 
@Dennis I originally though you were American because you use American English.
 
5:00 AM
OK, just posted a 17 byte PLQ answer. After the 0 and 3 byte answers, I think this is the shortest yet.
 
:D
 
@AlexA. AE is simply the lingua franca of the internet, which has taught me 90% of the English I know.
Browsing sites like this one, you find a lot more AE than BE.
 
I feel like there's a large presence of BE here though.
More than other places I've been on the Internet.
 
Presence? Sure. But AE still dominates.
 
Yeah, true.
 
5:10 AM
Btw, for a German, the complete lack of correlation between orthography and pronunciation is quite disturbing.
 
What do you mean?
 
There are no ghotis in German. Or Spanish. Or any other language I know.
 
Probably that you can't tell how something is pronounced from the spelling. Or vice versa.
 
Ghotis...?
 
Ghoti is a creative respelling of the word fish, used to illustrate irregularities in English spelling. == Explanation == The word is intended to be pronounced in the same way (/ˈfɪʃ/), using these sounds: gh, pronounced [f] as in tough [tʌf]; o, pronounced [ɪ] as in women [ˈwɪmɪn]; and ti, pronounced [ʃ] as in nation [ˈneɪʃən]. However, linguists have pointed out that the location of the letters in the constructed word is inconsistent with how those letters would be pronounced in those placements, and that the expected pronunciation in English would be "goaty". For instance, the letters ...
 
5:14 AM
Oh I see what you mean.
Yes.
 
Haha excellent and relevant!
 
For a German, there should be an I in team.
 
Why not "teem"?
Would that be acceptable in German? (I don't know what "i" sounds like in German.)
 
To be fair, German has its own set of difficulties. Like using 3 different articles for objects, where there's absolutely no logic behind which one is used for what. Why is a fork female, and a spoon male?
 
5:22 AM
Seems like it should be the other way around.
Just saying.
 
The letter I is pronounced ɪ in German and Spanish. ee would be a long e.
Yes, the articles are nuts.
 
And don't you capitalize all nouns?
 
So are the tenses. Simple past, in particular.
Yes, that's correct.
English capitalizes almost nothing. But it's I, not i. Never got that.
 
I'm glad I studied Japanese and French rather than German. While Japanese comes with the little circle of hell that is kanji (borrowed Chinese characters), it's otherwise pretty simple.
@Dennis Self-importance? :P
 
We had to choose between Latin and French in high school. I chose Latin.
 
5:29 AM
In high school I got to choose between French, Spanish, and Japanese. Then I took an intensive French course in college.
Why Latin?
 
Why is it an option or why did I choose it?
 
Why did you choose it?
With French at least you can communicate with living people...
 
I'm not particularly fond of the French language. I would have chosen pretty much any other option.
 
It's not fantastic. What about it don't you like?
I chose it in college because it was offered at a convenient time. Japanese or Persian would have interfered with my work schedule.
 
For starters, I don't seem to be able to pronounce it properly.
 
5:38 AM
Nobody pronounces French properly.
 
Don't tell the French.
 
I won't.
 
I really haven't used French since school.
Forgot almost all about it.
 
I think I forgot Latin in a year.
 
Haha. I've forgotten everything.
Languages, math, everything.
 
5:43 AM
I was pretty good at it, but nothing stuck.
I still know a little math. :P
 
I still sort of understand it when people around me talk French. But I wouldn't even try speaking it. I use English with the French people. Even though I learned French first.
 
@Dennis As a recent math PhD graduate I would hope you would.
@RetoKoradi Oh English isn't your first language?
 
No, my 3rd or 4th, depending on how you count.
 
:O
What was your first?
(and second, third, and fourth)
 
German. Or at least a variation of it. Then real German. Then French. Then English. We didn't start English until 9th grade.
 
5:47 AM
Swiss German?
 
German is neat. Travel 100 km in the wrong direction and you don't understand a word.
 
Haha
 
Seriously, the regional dialects are insane.
 
Right, Swiss German.
I heard that there are places in Austria where people from one valley don't understand people from the next valley.
 
That wouldn't surprise me.
Brb have to restart my computer
 
5:51 AM
It starts with telling the time. Not even 20 km from home, people say three quarters 10 instead of a quarter to 10.
Well, that's it for today. Good night y'all!
 
Good night.
 
Goodnight!
 
 
2 hours later…
7:49 AM
@Dennis it's only consistent ;)
 
8:08 AM
@Dennis apparently it's even worse in Belgium
 
 
1 hour later…
9:10 AM
I'm pretty sure my program does not output this..
 
What is your program @feersum?
 
@@AlexA. Did you ask about the ebook reading device?
 

« first day (1672 days earlier)