« first day (1785 days earlier)      last day (3057 days later) » 

12:08 AM
And it's a new day! More rep!
 
typeof /regex/ -> "string"
typeof [1,2] -> "object"
typeof null -> "object"
Love JavaScript sometimes
 
Just objects and strings get boring sometimes.
 
If I want proper results, I have to do this
var type = x => Object.prototype.toString.call(x).slice(8,-1).toLowerCase()
 
That is sad.
 
12:24 AM
Just encapsulate it into a function and you won't have to worry about it
 
That is a function
 
Oh
3
The type of a function is "var"? What's the point of a type declaration then?
 
@isaacg no var is what you (don't) have to put before every variable decleration
functions are first order objects is js
 
That's declaring a variable "type" and making it contain an anonymous function
 
So it's not a type declaration at all.
It's a variable declaration
Got it.
I'm thinking of it in c/java terms, which is a bad analogy
 
12:34 AM
I first wrote it as a suggestion to @Maltysen, then retracted and posted it as my own answer when @isaacg pointed out the answer was wrong; then @FryAmTheEggman suggested pretty much the same thing, which Maltysen implemented.
 
It's fine either way, imo
 
I've given up on trying to wrangle Perl's CP437 decoding/encoding stuff
I have no idea why it isn't working and I don't care
So I'm just going to do it by the byte values
At this point I just wanna get this done :P
 
Correction:
typeof /regex/ -> object
Even better
 
12:53 AM
And here's a cooler way to do it:
function type (x){
    var t = Object.prototype.toString.call(x).slice(8,-1);
    if (window.hasOwnProperty (t)) return window[t];
    return x;
}
 
does anyone here like Voronoi diagrams? I made some pretty gifs for Computer Graphics SE: computergraphics.stackexchange.com/a/1816/16 (shameless plug, but CG.SE could definitely use some publicity :))
 
@MartinBüttner How are you a mod there with only 640 rep?
Or is it a smaller site?
 
it was created in September or October
and it's still very quiet
and I've been more active on meta than main, I think
 
I think I might be able to claim @TimmyD's 250 points.
 
what for?
 
1:08 AM
15
Q: Novel Prime Factors of Repunits

TimmyDThe Background Folks were talking prime factorization in chat and we found ourselves talking about repunits. Repunits are a subset of the numbers known as repdigits, which are numbers consisting of only repeating digits, like 222 or 4444444444444444, but repunits consist only of 1. The first co...

> I propose a hypothesis that every n has a distinct result for this algorithm -- that is, no n exists such that Rn has no novel factors. I'll offer a 250-point bounty if someone proves or disproves that in their answer.
 
Oh. I thought for a second you were the person posting the bounty.
 
I have an idea for a challenge, and I'm not sure if it's been asked already.
 
I was at a math camp two years ago, and these people (who are much better at math then me) mentioned that someone used Zsigmondy's theorem in a certain problem.
I just remembered it, and I think the proof is pretty easy using it.
 
hey
im going to fix my hat...
 
There's no hope for my hat
 
1:12 AM
What is that? a new hope?
 
yeah
 
none of the hats fit on me
 
I had it for like 4 seconds
 
They're all facing forwards but my platypus is facing sideways :(
 
1:13 AM
You can click "show controls" to turn it
 
^
 
yeah
But it has 2 eyeholes
 
@ev3commander Yes, but that doesn't rotate the hat in the z axis
 
And there's only one eye visible on my platypus
Also I have a challenge idea and I want to know if it's been asked (I'd search but I'm lazy)
 
1:15 AM
@MartinBüttner D3.js basically has Voronoi as a built-in.
var voronoi = d3.geom.voronoi()
    .clipExtent([[0, 0], [width, height]]);
 
@El'endiaStarman so does Mathematica ;)
 
D3 is free and browser-based. :P
 
there's a really nice stand-alone Voronoi implementation in JS though which I've used in the past
(i.e. without any graphics)
 
huh, cool
 
1:17 AM
Very cool.
 
(quietly) excuse me
(raises hand, staring expectantly with wide, innocent, curious eyes)
 
There isn't really any such thing as "taking turns" in chat.
 
XD
 
Just ask whatever question you have.
 
1:19 AM
I have a question idea
Given a regex r and a number n, output the n-th string that matches r.
Has it been asked?
 
In what ordering?
 
tbd
I was thinking a, aa, ..,
 
exactly
 
wait that won't work
wrong order
 
you'd have to order them first by length
 
1:20 AM
there has been something like "generate all strings of given length"
 
[a-z][A-Z][0-9]
 
I don't think that's sufficiently different
 
like a, b, c, ..., y, z, aa, ab, ..., az, ba, ...
 
no but it's to match a regex, so you have to generate the n-th string that matches the regex, regardless of length
 
@MartinBüttner to generate the nth string that matches a regex?
 
1:21 AM
@Cyoce That sounds like it could be really easily brute-forced.
 
oh, Doorknob asked it actually
12
Q: Regex in reverse - decompose regular expressions

Doorknob 冰The Problem I have a bunch of regular expressions that I need to use in some code, but I'm using a programming language that doesn't support regex! Luckily, I know that the test string will have a maximum length and will be composed of printable ASCII only. The Challenge You must input a regex...

 
Just generate all the strings and match them to the regex
@MartinBüttner Oh hey
 
@NathanMerrill yes, just generate enough of them, sort them, and pick the nth
 
it would be slightly harder
 
misunderstood. thought you were describing a problem of "ouput all possible strings"
 
1:23 AM
/a+/
 
with no regex involved
 
Some regexes (regeces?) wouldn't have an n-th match, making brute-force a little more difficult
 
@Cyoce why not?
 
What actually is be the plural form of regex?
 
Regices or regexen or regexps or regexes or regi.
 
1:26 AM
Some people say regexen but I think that should be a punishable offence
 
@Cyoce post it as a fastest-code problem, and it be interesting
 
good idea
 
Martin internet-slapped me for saying "regexen" once :D
 
@Doorknob冰 !
 
That should (in theory) limit brute-force algorithms
 
1:27 AM
@RikerW It seems like regices or regexes. (Same as with apex)
 
@Pietu1998 I like regexen or regi. ducks internet slap from @MartinBüttner
 
Regeci?
 
regexi?
 
regen
like oxen
 
1:29 AM
regen
like regeneration
 
@Cyoce I like that one.
Regexen FTW!
 
The plural of "vertex" is "vertices".
The rationale for "regex" => "regices".
 
that's what made me think regices
 
Yeah, and when you said it, it sounded very natural to me.
 
The plural of "mouse" is "mice." The plural of "louse" is "lice." The plural of "house" is...
 
1:31 AM
heese!
 
It seems like most -ex words change to -ices or -exes.
 
regexes
 
we have the opportunity to make something great:
why not regenites
 
Oh, another one: "index" => "indices".
 
regeknights
2
 
1:33 AM
regekings
 
regedays
 
regimes
 
regxiz
 
regi
 
Golfing it a bit => rgz
 
1:34 AM
rxp
 
rci
rxi
 
Hey, I was wondering something: How many people in the chat have used Pyth?
 
rx
 
rx -> rxz
 
1:34 AM
rg
r
 
@isaacg me! Only once or twice, though
 
rgz
@isaacg I think maybe once.
 
/reg(ic|enit|ex|ec)es?/
 
Wow.
4-1.
 
1:36 AM
@isaacg I tried once, but golfing langs don't really appeal to me as much. I think they are cool, but don't use them often.
 
I'm all alone :(
 
Cool, thanks for the info.
Keep the responses coming
 
@Cyoce I havent posted an answer though.
 
here was my only pyth program => pyth.herokuapp.com/?code=%259001+4&debug=0
 
Somehow I've always found Pyth nicer to use than the stack-based things. Gotta see how my new language ends up.
 
1:38 AM
oh wow apparently platypar beats pyth for truthmachine by 1 byte
 
@Cyoce Hey!
...
That makes me sad.
 
wA
 
Pyth has some of these builtins not found in other (non-golfing) languages. I sometimes find myself using Pyth for stuff not related to code-golf, just because it automates some tasks.
 
:P
 
Because pl does it in 2 and I wanted some attention when I posted it
 
1:39 AM
.
 
(it's actually really clever too)
 
what is really clever?
 
@ev3commander That's no Pyth program ...
 
It's a Pyth program. Nobody said it was valid
 
1:42 AM
yeah it was my second try at a pyth program
 
Traceback (most recent call last):
File "pyth.py", line 664, in <module>
py_code_line = general_parse(pyth_code)
File "pyth.py", line 39, in general_parse
parsed, code = parse(code)
File "pyth.py", line 209, in parse
return function_parse(active_char, rest_code)
File "pyth.py", line 298, in function_parse
parsed, rest_code = parse(rest_code)
File "pyth.py", line 209, in parse
return function_parse(active_char, rest_code)
File "pyth.py", line 298, in function_parse
parsed, rest_code = parse(rest_code)
 
@Cyoce The two-byte pl solution for Truth machine
 
pl?
 
except I actually want to implement a lot of things in the interpreter before I release it so you probably won't see it for a while
@Cyoce My golfing language
 
oh ok
 
1:43 AM
It should beat Pyth at a lot of things (hopefully).
 
same for mine
 
How does it work?
 
what is the two-byte solution for truth machine in pl?
 
One second searching transcript for monologue
@Cyoce ╗¶
 
oh
 
1:44 AM
Oh, so high ASCII?
 
it's a non-ascii language
 
Dec 15 at 20:09, by quartata
Catalan Numbers in pl: ☼ç▲÷
 
I see
 
@Pietu1998 CP437 ye
But it only uses a small portion of it due to barewords strings
Anyways, click on the message to see my monologue
 
mine got 2 bytes with only printable typable ascii characters :P
 
1:45 AM
wait, since any regex can be combined into a single regex, we should call plural regex regex
 
@Cyoce I actually could do it with just ASCII but it would look strange.
 
There's literally exactly enough keys on my keyboard to fit all the operations in the language
 
Dec 14 at 22:34, by quartata
So something like k┴ calls the function on k
Read about it here
 
more strange than ╗¶? damn
 
Yes.
 
1:47 AM
did you post the pl ansewer
 
It would be forced to stray into unprintable range, since I actually use all of printable ASCII chars for bareword strings...
@ev3commander No the interpreter doesn't exist...
 
I had that stage
 
@Cyoce ?
 
When I didnt have an interpreter
but I still made answers
 
1:48 AM
@Cyoce Er..
You aren't allowed to do that...
 
I didnt post
I kept a text document with all the answers to questions that I thought should work given the behaviors I had defined for the language
 
Oh.
Well of course I do that :P
 
My idea with Gol is that every program can be written using the high ASCII characters as commands, but also with only printable characters.
 
well good luck with the language
and good luck not getting arthritis from typing all the alt-codes
 
what's the minimum signature needed for a legal document?
like, could I put a single dot on the signature line?
 
1:50 AM
@Cyoce ...
I just use a hex editor..
 
or what if my signature is a blank line?
 
@Cyoce I use Notepad++'s character panel
 
even worse
 
I get that what I'm doing is an unpopular standpoint...
 
@NathanMerrill It needs to be unfakable
I use a hex editor
 
1:51 AM
Should be.
 
Please don't rub it in my face at all times.
 
Hello
 
rub what?
 
@quartata I use bless, which do you use?
 
@isaacg hexedit
I don't like it very much but I couldn't get bless working on my computer
 
1:51 AM
@isaacg that's not true, nearly everybody's signature can be faked
 
So it suffices
 
and they are still accepted on legal documents
 
I use HxD on Windows if I need a hex editor
 
MS Word just crashed on me again.
 
@SuperJedi224 Stop using Word
 
1:52 AM
Yeah, but a period is really easy to fake
 
Hey! "suffix" => "suffices"!
 
@isaacg not if done right...
 
@El'endiaStarman !
 
(Ignoring that I went from a noun to a verb.)
 
no
suffix + suffix= suffices
latin
 
1:53 AM
quartata used "suffices" as a verb earlier.
That's really what I was riffing on.
 
courts will consider whether you made the "signature," intended to make the signature, and whether you intended the signature to signify your agreement to the contract
so, it could be a dot
 
It could be, but you have to consider the possibility that others might like to fake your signature for nefarious purposes.
 
@El'endiaStarman that doesn't stop the people from using Xs
or the long line
or the squiggle
 
The main thing is you should be able to make the same squiggle every time and rather quickly
 
1:58 AM
ermahgerd my code finally works
Now I just need to implement all the built-ins
 
I am perhaps a bit too happy at this... :P
Incidentally, that game is very nearly complete. I only have ship-ship collisions left to implement.
 
Goodbye for now.
 
bye
 
Okay, I'm back.
 
0
A: Novel Prime Factors of Repunits

Thomas KwaProof that every repunit has a novel prime factor Using Zsigmondy's Theorem, the proof is simple. From Wikipedia: In number theory, Zsigmondy's theorem, named after Karl Zsigmondy, states that if a > b > 0 are coprime integers, then for any integer n ≥ 1, there is a prime number p (calle...

\o/
Now the question is if there is a repeated novel factor.
 
2:14 AM
Also, I'm at almost 5 pages of numbers and I've just reached avogadro's number
 
@SuperJedi224 what are you doing? It sounds fun.
 
I'm making a list of numbers, eventually building up to some downright massive ones.
 
what kinds of numbers?
 
Strictly nonnegative, and primarily integers
Although most of the first page is reals between 0 and 1.
 
Significant integers/numbers.
 
2:18 AM
are you ordering them by size?
 
2:30 AM
How do I check if I'm still able to get a badge?
I'm not sure if I still have continuous days for the Fanatic badge. ;c
 
check if it says 0/100 yet
 
It automatically goes back to 0?
Okay, good.
I'm at 76. \o/
Still no answers...
10
Q: Symbolic Integration of Polynomials

FlagAsSpamApply an indefinite integral to a given string. The only rules you will be using are defined as such: ∫cx^(n)dx = (c/(n+1))x^(n+1) + C, n ≠ -1 c, C, and n are all constants. Specifications: You must be able to integrate polynomials with any of the possible features: A coefficient, possibly...

 
It's not easy.
 
Should I make a reference implementation?
 
2:35 AM
I'll throw in +50 if you want it
 
For the record, this question of mine was posted Oct 4 and still has no answers.
 
Alright. There's a pretty easy way to do it with try/catch/eval.
 
@FlagAsSpam Your question or @El'endiaStarman's?
 
@El'endiaStarman This was one of the first (if not the first) challenge I saw.
@ThomasKwa Mine. :P
 
@FlagAsSpam Haha, cool. :P
 
2:39 AM
Been playing a bit with the new intrinsic AVX2 optimizations in RyuJIT and it's actually pretty nifty. Not the usual Microsoft snake oil.
 
I understood 2 words in that sentence.
 
@FlagAsSpam I'm talking about the new JITter in .NET 4.6.1: github.com/Microsoft/dotnet/blob/master/releases/net461/…
 
why is that special?
 
It's the 11th mersenne prime
 
2:43 AM
ah
 
@SuperJedi224 One of the first things I asked my friend to do to learn AppleScript was make a Mersenne prime generator.
It was surprisingly good, since AppleScript has a BigInt equivalent and a really good system for counting.
 
what is public opinion on an app that overlays a small bubble level on the camera app so you can take perfectly level photos?
 
recursion
 
@orlp More like a while 1 loop.
 
for(;;)
 
2:51 AM
@Maltysen Hm.
 
@Maltysen Those don't already exist?
 
@El'endiaStarman They do. Open Camera does it.
 
I think it might for iphone, but I couldn't find one for android
 
Open Camera does everything :O.
 
Interesting.
 
2:52 AM
there were separate apps, but I'm thinking of overlaying it on the actual camera app
 
That would be cool.
How would you do that?
I don't know much about the Android API
 
like how facebook messenger chat heads does it
 
But I don't know how you would hook into the other app
 
i wouldn't
 
?
Oh.
So more like a pop-up of some sort?
Interesting.
 
2:54 AM
I would check if the camera is running, and then make a new view
@quartata basically
 
@mınxomaτ Vitsy, 1 byte:<
 
Befunge-93 0 bytes
 
@quartata ¯\_(ツ)_/¯
Minkolang does the same thing.
As well as ><>.
 
Actually ><> throws an error
 

« first day (1785 days earlier)      last day (3057 days later) »