« first day (2189 days earlier)      last day (2949 days later) » 

06:00
I reckon. Nobody's complained yet, and it's nice to have the discussion out where it can get publicity, but it probably warrants its own room at this point.
The thing I like with Clojure is its ->> thing, which chains together a bunch of functions together, so there's not an overload of parens at the end of a function.
I thought paren overload was the whole point of LISP
(defn random [x]
  (->> x
    (* x)
    (map digits)
    (reduce +)))
Explanation plz?
So x gets placed as the last argument of (* x), which turns it into its square
It then puts the square as the last argument of (map digits), which splits the square into digits
And finally it puts the list of digits onto the end of (reduce +), which sums the digits together
06:04
Ahh. That's neat.
->> looks ok in Fira Code
I bet we could write a macro for that in tinylisp.
And there's -> in Clojure as well, which places the last eval'd thing as the next function's first argument
It's neat right?
@DLosc Oh yeah true
06:08
@Riker :D
How far are you BTW?
still farming temmie
and @quartata: nerfnow.com/comic/1735
@DJMcMayhem :( asgore is a pita
I know how to kill him, I just can't
I keep deding
I gtg to bed now, see ya
@Riker Psh. Asgore is nothing, just wait until you fight genocide undyne
i feel sad now
bc I think he's really hard
so undyne v2 must be int overflow hard
idk if I'll even do genocide I don't wanna kill sans
06:10
Undyne v2 is IMO the hardest. Everybody hypes the sans fight, and it's true that he's hard, but I had a harder time with undyne
@DJMcMayhem also related though I haven't done this.. yet: nerfnow.com/comic/1740
Which makes sense in universe. Sans isn't really a fighter
true
night now though it's 10 pm for me and I have extra work tomrrow
@Riker Hahahaha, too true
Good night! o/
night! o/
@WheatWizard Uh, I see two programs, not one.
@WheatWizard I think you misunderstood the challenge a bit, you should have written one program, which when run in brainfuck generates a brain-flak quine, and which when run in brain-flak generates a brainfuck quine.
@DJMcMayhem btw I saw TWTM in your steam games list, was it any good?
That portal2 mod
... This acronym isn't ringing any bells
Thinking With Time Machine
Is a great game
Yes sorry iPad is hard to type on
06:37
Oooh, yeah. It's good, much harder than regular portal
Rly? Cool
Perhaps less humorous and plot-dependent, but the puzzles are significantly harder.
@Riker I've got a free game that you absolutely have to try
I like time travel games <shrug>
Also, a lot more has to do with timing and the actual execution rather than pure mental skills.
06:38
@DJMcMayhem the long name one? Saw your review haven't checked it out much
It's called Dr Langeskov, The Tiger, and The Terribly Cursed Emerald: A Whirlwind Heist
What is it tho
Oh yeah, that one haha
It's got one of the creators of "The Stanley parable", Justin Roiland (Voice of rick and morty) and pretzels.
What else could you possible need to know?
whats it about?
Haha
Not being able to access Steam, rn, I'm actually really curious
06:39
Never played Stanley parable
@Pavel mobileapp4life
@Riker Go play stanleyparable
And come back when you've played a few hours
What is it tho
That would be spoilers
06:40
Other than the game that has the achievement for not playing it
Play the free demo
Looks like point and click undertake to me
undertale
@Riker It's a meta-game about games and game-narrative and the choices you make in games. It's a little goofy, and fairly short, but it's really good and original. I highly recommend it
...
no
kek we have 3 mobile chapters
chaaters
chatters
@DJMcMayhem so undertake with less morals and more rick and morty
06:42
You, and who else?
Dj
Perpetually mobile
@Pavel Since you can't access steam, I've copied the description into a gist because the description is hilarious
@Riker There's no real explicit storyline.
@DJMcMayhem Thanks
@DJMcMayhem wat
Meta confirmed
@Riker Justin Roiland is in DRTTaTTCEaWH, not The stanely parable
06:43
@Pavel ah ok
@DJMcMayhem aw
Rick Sanchez4life
@Riker Basically the entire game is easter eggs.
Lol
That's probably the best way to describe it
@DJMcMayhem wildlife preparation???
@DJMcMayhem shouldn't you be asleep it's almost midnight for you
Silly dj
06:45
Here's a quote: "Stanley entered the room, and saw two doors. Stanley took the door on the left." *Takes right door* "That was not the correct way, and Stanley knew it perfectly well"
@DJMcMayhem "short" - Have you TRIED to beat The hardest boss? It took a while
Lol
0
A: Sandbox for Proposed Challenges

JungHwan MinNo Title Yet answer-chaining Create an interpreter for the previous submissions! The interpreter could take a string, an array of characters, etc. The first answer must print the integers from 1 to 10. What? What if the previous answer is in Mathematica? You only need to implement the functi...

@MistahFiggins everything sans does takes a while
@Riker I really don't want to say anything more about DRTTaTTCEaWH because spoilers, but I will tell you it's about an epic cursed jewel heist in Europe, and this genius doctor trying to stop it, and there's a tiger in several points and ... OK, I'm done. This is stupid, I'm calling OSHA, I can't work under these conditions! Get someone else to describe the game for you
06:46
@MistahFiggins One of the endings it literally pushing a button for a few days in a row
Oh Undertale or SP?
I'm on strike
Including stacking 30 hot dogs on your head
@DJMcMayhem osha?
Lol
I spent so long typing that that I've failed to respond to like three things
Lol
@Riker Usually mobile, not right now
06:48
That name tho
@Riker You apparently don't know me
Good point
You have weird hours yes
@DJMcMayhem What does DRTTaTTCEaWH stand for? On a similar note, I can see why people use the acronym frequently
11 mins ago, by DJMcMayhem
It's called Dr Langeskov, The Tiger, and The Terribly Cursed Emerald: A Whirlwind Heist
@Riker You may very well be the only one here who has so-called normal hours.
06:49
@DJMcMayhem also you called sans + papyrus the skellingtons when I first got UT, is that their real names?
@Riker Not that bad. I usually go to bed sometime between 12:00-3:00
@Pavel I'm in chat for 14? hours a day without leaving mostly
@DJMcMayhem ah ok
As opposed to Mego, who lurks 24
@Riker Probably not, haha
And the knob-who-shall-not-be-named
06:51
I have a friend who pronounces "Skeleton" as "Skellington", which is why I said that
He is always watching
If you are a font fanatic, they are called "hell"
Just like the dark night </imgur>
@DJMcMayhem ah
@DJMcMayhem "A skele-ton!" - Sans, who else
> someone who sincerely likes bad jokes has integrity
06:53
Wait. Weren't you Easterly Irk not long ago?
Ye
Riker is my name irl so I changed it for a lark
What changed? - I noticed it too
gotcha
@Riker I can't remember what you would know before beating Asgore. Do you know about Sans's pun friend?
Slash, who they are?
I made ->> in tinylisp!!!
@DJMcMayhem ye
And no
he did judge me tho
06:55
Kinda what he does
Ah, OK. Remind me to send you a fanart once you know who it is
"they have been judged and found wanting to be chill "
... I don't wanna know
sans 5:27
@DJMcMayhem is that revealed?
after the final final boss fight?
bc I'm certain as gore isn't the last boss
Potentially
06:57
no clue who is tho
prolly napstablook /s
Yea he da big baddy all along /s
Ikr
So passive argessive /s
Which character is most fourth wall aware? (That's the only thing I'm gonna say. Now go beat Asgore!)
No friend? All must burn
@dj oh shit that makes sense
i figured it out now
from where they put the dead first human
06:59
Wait is Undertale still relevant?
Sorry if I ruined it, but in hindsight you should have realized a long time ago. :P
this makes much sense
No offense, it's a good game
ye it is to both
@DJMcMayhem That's debatable. I would argue that the real final boss is the most aware
06:59
and I sorta thought about it but that cinched it
Flower is creepy tho
@Qwerp-Derp We can take it too a different room if you like
Sorry for dominating the conversation
Nah it's fine
he knows you saved
There's nothing else going on anyway so let's just chat here
No, please don't do that.
07:00
I've never actually played Undertale before, but I have seen my classmates playing it
@mınxomaτ :(
noooooooo
The spoilers
but ye moving to undertake room
07:19
(If a mod or RO is reading this, feel free to migrate the conversation)
07:33
@DJMcMayhem I found a solution to your gvim mouse touch screen, but I haven't tested it with gvim, only with vim
Woah, really? Cool, I honestly didn't think there would be a solution
I tried draggin in my vim window, and now it scrolls instead of selecting
(if that's what you are looking for)
Yep, that's exactly what I'm looking for.
@KritixiLithos I'm going to bed now, but if you post an answer, I'll check it out tomorrow
 
2 hours later…
09:51
what are some interesting numbers we know exist but haven't found yet?
hi all
@orlp that's a nice question!
the number of counter examples to Goldbach's conjecture :)
@Lembik eh even if we go strictly by my requirements (I know you're joking), we don't know if that exists
true :)
if the number of counter examples is infinite, then "the number of counter examples to goldbach's conjecture" doesn't exist
well the number could be 0 if there are 0 and 1 if there are > 0 :)
but I am of course joking
09:55
@Lembik but it could also be infinity, which is not a number
@orlp infinity is not a number but the statement "The number of counter examples is greater than 0" is well defined
in the same sense that "The number of integers is greater than 0" is well defined
@Lembik right, but even there we found both outcomes
0 and 1
we don't know which of the two
right.. so it is one of them. We just don't know which
technically "found" is underspecified
it's a number that is interesting that we haven't found yet :)
09:57
clearly specifying any arbitrary range is not enough
"it's one of the integers"
but a finite range is infinitely better
"at most 10^1000"
well we can pin it down to a single integer too
I in fact have posed challenges of exactly this form
I normally write them as fastest-code challenges
@Lembik if a problem has some input parameter n it becomes less interesting for this question IMO
I mean I know that the prime factorization of 2^(2^10000-1234)-1 exists
@orlp my problem is really about finding the optimal ratio....this has no input parameter n
but you have to be aware of the rules of ppcg
they don't like fastest code questions without inputs
@Lembik by the way
so although my motivation is yours I have rewritten my questions to fit into what ppcg likes
10:03
don't you think it's a bit disingenuous to write this
> A few weeks ago Lembik asked the following question:
considering that it is yourself
where is that?
2
A: Compute the maximum number of runs possible for a given length string

bebboA generational algorithm to find all solutions The Idea In every string the last character can only contribute to a limited number of runs. A last 0 can only add a run to 10 + 0 => 100 since in 00 + 0 => 000 it's only a repetition. Anf if it adds that minimal run, the next possible minim...

eh
I linked to an answer
but I meant the question
got you... my life is more complicated than that. I didn't write that line :)
but you can think of me as a collective if that helps :)
as in, multiple people (as in physical bodies) use the account Lembik, or multiple personas?
neither.. the SO account doesn't have my name you will notice but a different person uses the same computer and we sometimes do things together
10:06
ah ok
so different physical bodies I suppose
thanks for clarifying
np
I am still thinking about the most elegant way to do the vectorization we discussed
there are gcc vector extensions
which look slightly nicer potentially
if you reach for vectorization
I think you're beyond the 'slightly nicer' territory
I do think it's an interesting programming challenge but I fear the ppcg community may not care too much
10:12
what exactly is the challenge
fast matrix multiplication with complex elements?
the problem with this challenge was that it is all integer based. This meant a few problems a) It became a big int challenge, b) it allowed optimizations which were only relevant to the specific sort of input I specified c) this meant that the interesting part of the parallelization didn't occur
what I should have asked was the same challenge with complex numbers because
the complex numbers in this case stay within the unit circle, right?
a) you now have to worry about vectorizing complex number arithmetic b) you have to think about using Gray codes to speed things up c) using Gray codes makes it more interesting to parallelize
@orlp yes.. well in fact you would choose a "random unitary matrix" as the input. I would provide the code to do that
this means the absolute value of the permanent is less than 1
@orlp the code you are optimizing is bpaste.net/show/11a7e8f91b19
so it's not too complicated
where the while loop is doing a mysterious Gray code loop I can explain :)
10:18
@Lembik that's not full code
I skipped the initialisation
Let me add that
what language is that
hmm.. I am converting it from cython.. I have left in a couple of type declarations which you should skip for python of course
it looks like python with numpy
but it has int declarations
ah cython
cython supports numpy?
didn't know that
yes cython is great
10:21
I've used cython in the past
just didn't know it supported numpy
@Lembik btw in Python we don't use parenthesis in if and while statements
while (j < n-1): is a lot uglier than while j < n-1:
here is the real cython code bpaste.net/show/8f1fe38f031f
oh I prefer the brackets otherwise my silly brain worries if it is (while j)
@Lembik huh
while and if always look all the way until the colon :
sure.. but when I look at the code the brackets make it quicker for me to parse
@orlp what do you think?
@Lembik one thing
by dividing by 2**(n-1) at the end
you're losing precision
yes I suppose so
10:30
@Lembik you can get that precision without loss of performance
I know there is an academic discipline to analyze the numerical accuracy of code. But I don't know how to do it
@Lembik initialize s = 1/2**(n-1)
and remove the final division
why is that more accurate?
because floating points have more precision around 0
oh that's a very interesting point!
10:31
and get less and less precision as the numbers get bigger
thanks
dividing is the same as multiplying by the inverse
it would be worth trying both and seeing what difference it makes
since you're already multiplying every time
you can just sneak that in there
nice idea.. I will try it out
n will typically be around 32 I should say
so the main parts to optimize are for i in range(n):
v[i] -= d[j]*M[j, i]
and for i in range(n):
prod *= v[i]
which is what we discussed before
the f array is actually computing tzcntl (if you are into assembly) so we can just replace it by that
10:34
well
j is the ruler sequence
right?
as in for j in xrange(2**(n-1)): f = tzcntl(j)
@orlp oh what is the ruler sequence? all it is doing is counting the number of 0's to the right of the rightmost 1 in the integers 1...2**(n-1)
@Lembik that is
the ruler sequence :)
cool!
:)
it's
so the next question is how to parallelize the code nicely
10:37
0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, 4, 0, 1, 0,
looks good
ruler = lambda n: 0 if n % 2 else ruler(n//2)
in theory you just start the ruler sequence from different points in the range 1...2**(n-1) but I don't know how to do that in code
so there you go.. that's the coding challenge ;)
@Lembik what do you mean
to parallelize the while loop we could just run it from difference points in the range 1...2**(n-1) and then sum the answers, right?
for j in 1..100 for j in 101..200 etc.
10:39
eh
you have state
between iterations
the variable p is being summed with p += s*prod
@Lembik d[j] = -d[j]
one thing I have noticed though
half of the time j is 0
maybe you can do that separately
half the time j is 0 you are right
but we can work out if d[j] should be + or - 1 from the starting value of j
or we can split the loop so it is always 1 for example at the start
also v[i] is state
it's like an incremental sum
hmm.. good point.. so parallelizing is getting more interestnig :)
10:41
if you change the order of the incremental sum
the product of those partial sums won't stay the same
no I think that's ok too
v[i] -= d[j]*M[j, i]
@Lembik so there's always 2^n - 1 iterations
we don't need to know v[i] to work out what should be added together in the end
@orlp yes
what if we always do iterations in pairs except the first one
and check from there
to deal with the j = 0 case?
10:44
basically you can copy the function body
once outside
(loop body, not function body)
and twice inside
what do we gain from that?
if you do that
you get this
which is significantly longer code
but notice that we now know the value of j in some parts (j = 0)
so we can eliminate some stuff
sounds v. interesting
@Lembik for example
s now swaps signs twice per iteration
AKA we can just hardcode s
@Lembik after doing that I got this gist.github.com/orlp/876cfe2adffa0018b2cd4be343e79e38
now we can do more rearranging
note that j is not used at all in the last loopbody (I hardcoded 0)
so we can combine these two:
        f[0] = 0
        f[j] = f[j+1]
        f[j+1] = j+1
        j = f[0]
        f[0] = 0
        f[0] = f[0+1]
        f[0+1] = 0+1
        j = f[0]
and simplify
I am not sure your code returns the right answer currently
10:56
@Lembik it doesn't for n < 3 probably
oh no wait doesn't
I just tested it.. it definitely gives the wrong answer
the boundary statement is incorrect
or is it
your code gives -0.82290496662661161 where it should be 0.47684404520775503

« first day (2189 days earlier)      last day (2949 days later) »