« first day (2654 days earlier)      last day (2182 days later) » 

12:36 AM
@DJMcMayhem Grats!
 
@Adám stolen from reddit?
@Lynn where in the world did this come from
 
one of xnor's answers
 
Did you know that 12 year olds aren't allowed to make accounts? I had no idea
 
yep
unless they have parental permission
COPPA iirc
@Lynn what is R(k) here?
 
you know what forget trying to make a well specified koth
 
12:51 AM
Yeah just made one, it was really hard
 
imma just turn sv_friction to 0 and sv_accelerate to 400
 
Want any help?
 
the problem isn't writing it, it's reverse engineering some physics from this game
I can see the appeal of an ice-skating FPS now that I think about it
@Riker next time you're playing a server with Sourcemod do sm_cvar sv_friction 0 (can't do it directly because it has FCVAR_DEVELOPMENTONLY in TF) and see how it goes
its quite fun actually
 
@quartata LOL
 
1:13 AM
ice-skating fps sounds amazing btw
use the mannpower powerups?
 
1:24 AM
:| i just realized how ungolfy the Whirl HW is
 
1:42 AM
note to self:
https://tio.run/##jVTBjtowED3jr3j1aluyIYFw6CHdbqVW/YMekVAEpus2sSPHkdivpzN2lg0siCIFz9hv3jyPx25f/LM1y8NBN611Hk4JYVt8hVzjDgUW@IISLRp8xDfMkEvRVP45AngpxQPmBHvEE01@QCYpXpO5CMBo2XZLYxFmoqW7kOWX6ynhxm4VM0q5EgXWoiTmNTG/feVofDjauUD4pSfoEtlZdBbR/H8x4jwXI6@hr2c9xo70lzfH/OJ@L@39fXz5XvcZV3nFftN7vu8re6Ya3qpd9t/Is4ib6GNtqUPEHfSnBn2nzW/qz1p5rxxa@mptVI7Gdh6VU/jTk9FRW9cKaQHrsF8K4VTX1z40mxA7mvT2L7Shvs@7ttZ@KlerLpUzcE8mpZhseudCD0@2ejC8e6GFid6Bu5jNVxR1PntG7X3wcm22aj@lHAnmcyx5MdLQjSBH1Z0ax4cbM2Jg/zpHuE1iovYb1XqmcZXuFL5XnfoZ5rQ1U/nDNk1ltrjvYKzHzvbkWMO@oxpK3IPJZ5CWqlhxkMSwN7BASE4kk4RKoGpfUeZp0JeBZSdEU
 
2:04 AM
@isaacg But you still can, just don't tell anyone about it.
@xnor I suppose then you mean "250 rep for explaining the proof to people", because (I guess?) the proof is well-known.
(reply to NBwnD (what is New Bounties with no Deadlines' abbreviation?) post)
 
2:36 AM
@user202729 yes, a writeup, see the bounty post
I haven't seen a citation for the claim yet, so I'd be surprised if it were that well known
the pages you link have the square lattice version though I imagine the methods are similar
 
@xnor In fact the formula is almost equivalent (just 4 -> 6 and 4 -> 3), I imagine the proof should be similar. (I didn't actually attempt...)
10
Q: The Gauss circle problem on a hexagonal lattice

user27203Take an infinite hexagonal lattice (or equivalently, an equilateral triangular lattice), with unit spacing between the closest lattice point pairs, and draw a disc of radius $r$ centered on a lattice point at $(0, 0)$. Let $N(r, hex)$ denote the number of hexagonal lattice points at coordinates ...

 
Does that page have the formula?
 
Probably no...
 
I agree it should be similar to the square, I definitely used some thinking from my sum of two squares counting challenge
both of them give pi as an infinite sum as you take n to infinity
huh, it looks like the poor math overflow poster from 2012 was looking for a closed form like this
 
2:53 AM
 
@Pavel It's your fault to overflow int, not Javascript's...
 
Anonymous
n|0 is a common trick to coerce n to a 32-bit signed int. It's ridiculous that it's even required, though - IEEE-754 doubles should not be the default numeric type
 
JavaScript doesn't have 32 bit integers. In theory, the | operation shouldn't be supported in the first place.
 
@Pavel Sometimes you do need integer arithmetic (to call system function that requires bitmask?)
 
I also know that's how asm.js works
 
Anonymous
2:58 AM
@Pavel In theory, JS should have made sane design decisions :P
 
@Pavel it's for compatibility/sanity reasons. and asm.js reasons.
@Pavel Yes. but JS is using the doubles as a pseudo-integer type too
@Lynn wait. theorem 2?
 
 
1 hour later…
4:17 AM
:|
there are memory slots in Whirl
how did i manage to get it so short without knowing about this
 
4:32 AM
ok memory slots tape isn't actually very useful here
 
5:20 AM
@Riker XKCD.
 
5:43 AM
-1
Q: Why the loop will not run?

Aryan SinghArrayList myList = new ArrayList(); for (int i = 0; i < myList.size(); i++) { myList.remove(i); }

 
5:54 AM
@Mego it does though :(
@user202729 js can't call system functions
 
There should be some function that requires or returns bitmask?
(for example TIO's getModifiers function (:/))
 
@user202729 wait what
@user202729 link pls
 
@user202729 that's not a bitmask at all... nor does it have anything to do with system calls...
 
It is a bitmask.
 
6:07 AM
@user202729 how exactly...
 
Am I using the wrong terminology? Should it be called bitfield?
 
@user202729 yeah, that's probably a better word. bitmask is a filter that only retains certain bits, hence "mask"
 
 
1 hour later…
7:21 AM
@ASCII-only technically node.js can
 
well, i guess. but still, it doesn't really have any interop
 
 
1 hour later…
8:51 AM
@xnor I have a pretty good black magic proof, but I doubt it's simpler than yours (I also factor over the Eisenstein primes etc.)
@xnor I wrote up enough of it to convince me, but I should add some definitions of Eisenstein integers and stuff to round it out. I can send you a draft if you'd like!
 
hi
 
9:10 AM
I hope no one minds my simple coding questions but.. in C++ what do the curly {} mean in bpaste.net/show/4f7ab3898554 ?
 
initialization
 
does it set g to be an array of 0s?
 
It’s setting the values to 0, I guess one zero actually sets everything to zero
 
or just the mth element to be 0?
 
the m is the length
 
9:13 AM
yes.. so do you end up with an array of 9 zeros do you think?
 
g[m] is an array of length m, not one element
 
i think it only sets the first element to 0?
 
oh!
I really thought g[m] was the mth element of the array g
I am really ignorant at c++
 
Same
 
oh it's explained here I think learncpp.com/cpp-tutorial/62-arrays-part-ii
"However, if there are less initializers in the list than the array can hold, the remaining elements are initialized to 0. "
 
9:17 AM
nice
so {0} is the same as {}
 
it seems so!
I am not clear if this is actually valid C++ as m is not a constant
apparently :)
 
it's not standard but most compilers work
 
thanks
 
Yeah, it's used pretty often
 
ngn
@Anush inside a function array length doesn't have to be a constant - the array is allocated on the stack
 
9:32 AM
@ngn aha! Thank you
 
9:55 AM
@Anush VLA is a GCC extension.
Generally you would not want to do that for a bit larger array to avoid Stack Overflow. If you need hyperspeed and you're sure that stack size is large you can do that.
 
thanks
 
BMO
11:02 AM
Noooo, I missed 6789 rep by 5 :( Now I have to get another 72116 rep...
 
11:14 AM
@BMO :| but that's a terrible number? you actually need 1398 more
@BMO or just downvote 5 answers
 
@BMO why not 5551 more? The required amount is even half ¾ beautiful
 
@dzaima :|
 
@ASCII-only huh you need 6666 more rep for a half pretty reputation number in base 3 :p
 
11:31 AM
my rep is beautiful, it is palindromic in base-109
 
@Cowsquack mine is in base 11340 :p
argh canvas doesn't support base 1
 
11:47 AM
j doesn’t either
 
@FrownyFrog canvas does now
 
it can do from base 1, not to
 
@FrownyFrog yeah, from worked before too because the algorithm doesn't change
 
oh right, can’t have a number 1
 
BMO
@dzaima That's much better yes
 
12:10 PM
CMC: slowly convert the input into its reverse (or vice versa), and return the steps/animation. world[world,worlw,worow,worow,wlrow,dlrow]
 
12:24 PM
Too bad that ¦ doesn't auto vectorize
 
12:38 PM
@user202729 sees character
clearly that's a separator
 
@dzaima Jelly, 7 bytes: oƤṚṭ@ɗṚ
 
it’s backwards but still input to reverse
 
Jelly, 6 bytes: ṄoƤṚUY
 
@dzaima Canvas, 7 bytes or 6 bytes without the 1st line
 
1:00 PM
@dzaima :O
@dzaima wait. it's reversed?
@dzaima does it have to return a list of strings
 
@ASCII-only I said steps for a reason. You could even output all in a single line if you really wanted. And this is a CMC, do whatever you want :p
 
@dzaima ah ok
 
BMO
"Ported" to Husk, 6 bytes: §MżKḣ↔
 
@dzaima Charcoal, 15 bytes: P×⁺⮌θ¶⊕LθG→↙Lθθ
it's terrible but that's probably a super bad way to do that
 
1:40 PM
@dzaima :|
 
That’s from b1
the reverse is more tricky
 
2:11 PM
@dzaima oh 5 bytes without the last line
 
2:35 PM
@Adám I knew I'd read it somewhere today, thought it was reddit tho
 
2:50 PM
@Riker :-) Btw, off-topic, I wanted to ask you what the connection is between unicorns and veganism.
 
.... I don't know?
 
0
A: Sandbox for Proposed Challenges

Erik the OutgolferIs it an exercise set? code-golf decision-problem An exercise part is a list of non-zero integers, where its second half consists of the integers of the first half negated and in the same order, and the signs of the integers on each half are equal. The sign of the first half of an exercise part ...

 
3:44 PM
1
A: Sandbox for Proposed Challenges

wastlIs this a consecutive-prime/constant-exponent number? code-golf number-theory Sandbox: Other tags? Better title/name for the properties? Anything unclear? A while ago, I had a look at the prime factorization of 27000: 27000 = 23 × 33 × 53 There are two special things a...

 
@dzaima Jelly, 5 bytes: ṖÐĿoṚ
 
ahh, I forgot the simplest of 'em all
 
4:02 PM
@Dennis how does it work
 
4:26 PM
oƤUU is nearly correct
 
the first line is the hard part in Jelly
 
4:57 PM
@FrownyFrog ṖÐĿ pops the input until the result no longer changes, constructing all prefixes of the input. oṚ performs vectorizing logical OR of each prefix and the reversed input. Since characters are truthy, this pads the prefixes with the corresponding characters of the reversed input to the length of the input.
 
5:15 PM
@Dennis so or is not commutative?
 
5:30 PM
>>> 'a' or 'c'
'a'
>>> 'c' or 'a'
'c'
>>>
@FrownyFrog The idea is it returns whichever one is true, going in order
 
the idea is hard to put in words
I see, thanks
 
well, at least in APL (which J is a variant of), there's no such behavior, that's why you may be confused
 
i get it, it kinda short-circuits
 
yes, that's the term for that behavior
 
ngn
@EriktheOutgolfer there is
 
5:36 PM
"this is already true, so I must do nothing"
 
@ngn AFAIK, 3∧5 doesn't result in 5
 
although in J, doing nothing returns the right one
3 +^:0 (5) is 5
 
ngn
@EriktheOutgolfer I don't know about ∧ but + in Dyalog is not always commutative due to some floating-point weirdness
and = is not transitive
 
@ngn ⎕CT has to do with that
 
ngn
@EriktheOutgolfer exactly (no pun intended)
 
why that space at the left, looks like it's unnecessary
 
after =.?
aesthetics
I don't count it
 
@FrownyFrog Aesthetics are secondary to !
 
that's the first time I used a nested rank
 
ngn
I wish I could just hover over the primitives and see the docs in a pop-up...
 
5:53 PM
@ngn I want to make that for Canvas but I'm just way too lazy to
 
By the way, do any of you happen to be dpkg nerds? I broke something.
 
ngn
@wizzwizz4 all I know is that if "dpkg --configure -a" doesn't fix things, it's easier to reinstall :)
 
@ngn What if all of the files and directories look to be there, but they're in /lost+found with no file names?
 
ngn
@dzaima any idea how to get the character under the mouse from an <input>?
@wizzwizz4 that sounds like something's broken on the filesystem level. Did you pull the plug while dpkg was running?
 
@ngn nnope. There's a reason why I haven't done it yet
 
6:04 PM
@ngn I don't think so. I pulled the plug while a full-screen buggy edutainment program was running.
It was a pretty good RPG, but crashed when it tried to invoke the education part.
 
ngn
@wizzwizz4 poor fellow... now you're uneducated, with a corrupted file system and a broken package manager. Got backups? You can still borrow some wisdom from Windows and reinstall :)
 
@ngn No backups, but it's a young system and afaict the image is available online. Oh well.
I think I'll install Inferno instead of pi-top Solaris.
pi-top Solaris is not fit for hacking.
 
ngn
@wizzwizz4 huh?! was that a solaris with dpkg?
 
@ngn It's not really Solaris.
It's based on Raspbian.
Sorry; pi-top Polaris.
@ngn I got mixed up.
 
7:07 PM
@dzaima 21 bytes
that's like the most horrible thing in J, amend
 
7:43 PM
Hmm. Why doesn't n*n<a work as upper bound — ASCII-only 6 hours ago
 
ngn
@dzaima k, 23 bytes: {x{(y#x),y_|x}/:|!1+#x}
 
@ngn ngn/k :P
but, eh, I guess that does count as an implementation of k
 
@ASCII-only It has to do with the sign flips. You can see that xnor's code computes something like term1 - (term2 - (term3 - (... - 1))), so it's important that the base case is reached after an even amount of flips, or else it will contribute -1 to the sum instead of 1
@ASCII-only If you try n*n<a you'll see you get a bunch of off-by-two errors!
 
ngn
@EriktheOutgolfer k varies a lot between versions, I'm trying to follow more or less a subset of the now-abandoned k5
 
@ASCII-only xnor's n*n<a/3 works perfectly because a/3 only changes every other call. (a goes: 1, 2, 4, 5, 7, 8, 10, 11... so a/3 goes: 0, 0, 1, 1, 2, 2, 3, 3...)
 
ngn
7:48 PM
@EriktheOutgolfer I think the above expression should be compatible, though. It doesn't use anything too fancy.
 
@ngn I'm going to Iverson College! Maybe I can pick up some K7 secrets from Arthur…
 
@Pavel my eyes.
my poor eyes
they just fell out and ran away in fright
 
@Adám ...which Google identifies as "Georgetown University"
 
ngn
@Adám congrats! it's a cool thing but rather exclusive. I wasn't approved this year.
 
@EriktheOutgolfer The plot thickens...
 
7:54 PM
@Adám hm, are you moving to the US?
 
@Lynn i look forward to your proof!
feel free to link me a draft, though i might not have time to look through it for a bit
 
@EriktheOutgolfer No, I'm staying with APL. But maybe Arthur's plan to take over the world using K7 involves Georgetown University.
 
@Adám then how are you "going to Iverson College"?
 
ngn
@EriktheOutgolfer not a literal college, iversoncollege.com
 
@EriktheOutgolfer It is being held just a couple of hours from where I live. ^
 
7:58 PM
@ngn is that name, like, intended to cause confusion?
 
@xnor here you go: foldr.moe/blackmagic.pdf
16
 
ah, if you included your full name it would've looked as close to an academic paper as possible, but otherwise very nice
 
age-old wisdom: if it's typeset in LaTeX, it must be true
it might be cute to port xnor's approach to Whitespace and post an answer with that + my proof, like I did that other time
31
A: How many Wazirs can be placed on an N×N Chessboard?

LynnWhitespace, 45 bytes Try it online! By the way, here is a proof that the ⌈n²/2⌉ formula is correct. We can always place at least ⌈n²/2⌉ wazirs: just lay them out in a checkerboard pattern! Assuming the top-left tile is white, there are ⌈n²/2⌉ wh...

 
@Lynn Nice to see Iverson's brackets in use.
 
8:15 PM
> Okay, I actually don’t know how to prove these facts, either; I’m no ring theorist. But I read them on Wikipedia so they must be true.
lol
(maybe search for a proof online?)
 
ngn
@Adám where?
 
@ngn Claim on page 4, and at the top of page 5.
 
ngn
@Adám that's just floor and ceil
 
@ngn Yeah, Iverson invented those brackets.
 
ngn
@Adám he did, but "iverson's bracket" is a statement in square brackets treated as 1 if true and 0 otherwise
 
8:21 PM
@ngn I know that there is something else called an Iverson bracket, which I why I wrote Iverson's brackets and not Iverson brackets.
 
8:32 PM
@FrownyFrog o is an arithmetic operation in Jelly and does not short-circuit.
 
ngn
8:44 PM
@Lynn all this typesetting effort for explaining a codegolfing solution? why?
 
xnor's charm
 
9:12 PM
@dzaima 14
I'm done, no more pings
 
10:17 PM
@ngn the typesetting was not where most of the effort went ^^
(also, because xnor offered a bounty)
(and I wanted to understand the magic!)
 
ngn
@Lynn I see. Indeed, good maths. This could have been a Project Euler problem.
 
They had one about a square lattice: problem 233 (which is the highest difficulty that I have solved)
 
10:35 PM
2
Q: Let's play Mölkky!

ArnauldMölkky Mölkky is a Finnish throwing game. The players use a wooden pin (also called "mölkky") to try to knock over wooden pins of almost similar dimensions with the throwing pin, marked with numbers from 1 to 12. The initial position of the pins is as follows: (07)(09)(08) (05)(11)(12)(06) ...

 
ngn
@H.PWiz that must be Legendre's sum of two squares theorem: 4(d_1 - d_3) mentioned in Lynn's pdf
 
Right, not really that hard.
 
ngn
@H.PWiz well, once you know the theorem... :)
@H.PWiz I remember being stuck for an extraordinary amount of time on problem 66 (Pell's equation) until I finally googled it
 
@ngn Yeah, I had seen a proof for leibniz' sum for pi using the sum of squares theorem shortly before
@ngn 66 is the forth one I haven't solved
 
ngn
10:59 PM
@H.PWiz I'm planning to re-solve the first 100 from scratch in ngn/k :)
@H.PWiz that one has an interesting history: an Indian mathematician solved it a long time ago, was forgotten, then it took Europeans centuries to reinvent his method
 
@ngn Will some of them not want big integers?
 
ngn
@H.PWiz PE problems are generally designed to be solvable with 64-bit ints, except for a few that require simple bigint operations - they can be implemented using vectors of digits
/ for instance this is my add operation and solutions to 13, 16, and 25:
add:{n:1+|/#:'(x;y);(-~*|r)_r:{(10!x)+0,-1_x>9}/(x,&n-#x)+y,&n-#y}
. 10#|,/$add/|:'.:''0:"p013.txt" / 13
+/1000{add[x;x]}/,1              / 16
#{1000>#*|x}{x,,add/-2#x}/2#,,1  / 25
 
11:55 PM
0
A: List of bounties with no deadline

DJMcMayhemN * 100 rep for beating me at "Quine Suite" (Max 500) The "Quine Suite" challenge is a challenge to write as many different quines as possible without sharing any characters between the quines. Currently, I have a record of 5, which just so happens to be the highest score on that thread (right n...

 

« first day (2654 days earlier)      last day (2182 days later) »