« first day (2353 days earlier)      last day (2494 days later) » 
00:00 - 12:0012:00 - 00:00

12:12 PM
@totallyhuman 2P+1 must be odd, so it can't be divisible by 2; the smallest prime that could potentially divide 2P+1 would be 3, meaning that the largest possible proper divisor is (2P+1)/3, which is clearly smaller than P.
 
Ohh right
 
1
Q: Am I a Sophie Germain prime?

Mr. XcoderA Sophie Germain Prime is a prime number P such that 2P+1 is prime as well. Given a prime number as input, your task is to determine whether it is a Sophie Germain Prime. Standard Input/Output rules and Default Loopholes apply. This is a decision-problem, so standard rules for this tag apply (re...

 
Was wondering what you meant by your comment
 
12:26 PM
hi to you too @Lembik
 
now I don't even remember saying hi :)
 
7 hours ago, by Lembik
hi @SEJPM
 
well hi to you
oh right.. thanks for your factoring answer!
what are you going to do with your spare 53 bytes ? :)
 
@Lembik first I'm gonna get even more spare bytes
 
aha!
 
12:28 PM
by exploiting the spec more and implementing @flawr 's latest suggestion
 
I didn't make it up about being solvable in python by the way
which part of the spec will you exploit?
 
@Lembik the fact that I only need to return one integer now
 
@SEJPM #capitalism
 
which should save about 10 bytes or so
@flawr BTW we're golfing this A a) because we can and b) because we count the bytes :P
 
cool
@SEJPM about 15 seconds in pure python and 2 seconds with pypy
but many many many more bytes :)
 
12:30 PM
@Lembik using which algo?
 
BTW I'll offer at least a 100 bounty to anyone who implements a sub-exponential factorization method on that challenge
 
@SEJPM isn't yours subexponential?
 
@Lembik nope, I'm exponential
 
I thought pollard rho was 2^sqrt{n} or something like that
 
12:31 PM
sub-exponential means random square based, GNFS based or ECM based
 
what is n?
 
ah yes I see your point
 
the input number?
 
gnfs seems a bit much :)
 
@flawr normally the input number
pollard rho runs in n^(1/4) worst-case
 
12:32 PM
ok
 
sometimes it is also the "length" or the number of bytes
 
but n is 2^{length of the input}
 
@flawr yep, pollard rho is exponential in the length of the input integer
2^(n/4)
 
are ECM methods any simpler than the gnfs?
hmm.. what did primo do then? Because it's very fasts
 
@Lembik he did a variant of the quadratic sieve
 
12:33 PM
quadratic sieve is the answer
 
which is based on random-square factoring
 
what is the complexity of that?
 
@Lembik L_n[1/2,1/2]-ish IIRC
The quadratic sieve algorithm (QS) is an integer factorization algorithm and, in practice, the second fastest method known (after the general number field sieve). It is still the fastest for integers under 100 decimal digits or so, and is considerably simpler than the number field sieve. It is a general-purpose factorization algorithm, meaning that its running time depends solely on the size of the integer to be factored, and not on special structure or properties. It was invented by Carl Pomerance in 1981 as an improvement to Schroeppel's linear sieve. == Basic aim == The algorithm attempts to...
 
May I ask fro some feedback on this: codegolf.meta.stackexchange.com/a/13251/24877
I feel like I explain it way too complicated
 
@SEJPM so that would do for your bounty?
 
12:35 PM
@Lembik yep
in 140 chars tho ;)
 
cool :)
 
w/o built-ins
 
w/o which builtins?
clearly w/o the quadratic sieve builtin :)
 
@Lembik the ones included in your Q
 
but I assume there are lots of other useful ones
my question only excludes a factoring builtin
 
12:36 PM
@Lembik and I'm like 95% sure that you can't fit the 6-step QS into 140 chars ;)
 
:) I am amazed it is only 95%!
 
@Lembik a) I don't know those crazy golfing langs like MATL that well and b) I fear somebody could whip out sage skills and do it
 
but I suppose there is always... Jelly!
I look forward to seeing it!
maybe we should pose a "golf the quadratic sieve" question
I am a bad person to do that as I don't know any of the details
 
0
A: List of bounties with no deadline

SEJPM100 Rep for a sub-exponential time tweetable integer factorizer Let n denote the length of the input integer. Write a valid answer to that challenge that implements a factorization algorithm that runs in worst-case sub-exponential time in n. For example Pollard-Rho runs in exponential time with...

 
12:56 PM
72 bytes \o/
^ is this how TIO is used?
 
@SEJPM yes it is...
 
@LeakyNun thank you, I never used TIO before :)
@Lembik I can enter with multiple submissions? ;)
 
1:13 PM
@SEJPM great and please do!
 
@Lembik ok, I'll see if I can golf Brent's algorithm then
(it's a slight improvement over Pollard)
 
@SEJPM cool!
is that from the wiki page?
 
@Lembik I don't think so
 
ok
 
1:53 PM
:( turns out that for some reason my Haskell implementation of Brent's algorithm sucks and I don't see why (it's significantly slower than the Pollard one). Oh well, I guess I'm gonna leave it with my 72 bytes Pollard one then
 
2:14 PM
@DJMcMayhem Not shortest, but most elegant APL: 9 10 11-.○⊢ Shorter is |-9 11+.○⊢
 
wait for a language to be valid on ppcg it needs to be able to add and do a primality test right?
i'm afraid my language wasn't valid till today...
 
@totallyhuman and represent numbers if I remember correctly
 
@totallyhuman Yes, and represent lists, but making a language which can do just that, and almost nothing else is kind of abuse, e.g. bubblegum.
 
it has ints and floats
lists...
so it does have multiple stacks
 
@totallyhuman Well, some kind of collection of more than one number.
 
2:20 PM
the language's memory is a list of stacks
so i'm good i guess
 
2:37 PM
@musicman523 I'm not sure what you mean. An emulator?
 
Huh
Turns out that interpreting the FF executable as a raw sound file sounds like static
Not sure what I was expecting tbh
 
I guess a debug build would sound less noisy, because of lower entropy.
 
Well, there were some definite tone patterns, but mostly static
Probably compressed data
 
Even the static has clear patterns. This is the basis of visual reverse engineering (recommended watching: youtube.com/watch?v=4bM3Gut1hIk)
 
2:52 PM
hey
which primality test algorithm should i use
rather which is the most efficient overall
 
3:04 PM
@totallyhuman depends on what you want to do?
is a probabilistic answer enough?
do you need a definite answer?
do you have special classes of primes?
do you want to construct rather than verify primes?
do you want minimal run-time?
do you want minimal code-size?
 
3:20 PM
the standard choice in Crypto is Miller-Rabin
The fastest definitive general method is AKS
You can use Lucas-Lehmer for Mersenne Primes
You can use Maurer's algorithm to construct random provable primes
trial division or a built-in probably is the shortest solution
 
3:47 PM
@SEJPM Or Wilson's theorem
 
@totallyhuman for code-golf? use regex. for other application we need more detail to give good answer
 
How can I split a number into individual digits in Pyth? I came up with this: FNw aYsN;Y, but figured I can do much better using map, but I do not know how I should do it...
 
@Dennis thanks, I will try to break it down and understand it.
 
j is integer-to-base conversion, T is 10.
 
4:00 PM
Oh, that's very clever... Nice
@Dennis Althogh it is longer, I really want to use map in order to see how it can be used. Can you give me an example with map?
 
@Dennis omg pyth!!1!1111
 
Wow, thanks!
 
@totallyhuman, what is the purpose of spaces and newlines in ,,,?
 
4:15 PM
@Dennis Another question: How do you type Jelly characters? Do you copy-paste them from your codepage?
 
@Mr.Xcoder US International Keyboard.
 
"If you are able to write a brainfuck-like interpreter in a language, the language can be called turing-complete." How correct is the statement?
 
@officialaimm Depends on the definition of "brainfuck-like".
 
@Zacharý What, how ( I use Mac ). For example, how to I type the A with a dot underneath?
 
@Mr.Xcoder What is "A withb"?
 
4:21 PM
Or the superscript ²?
 
You copy them from the Jelly docs :P
 
I have problems with superscripts and subscripts too ...
 
Or change your keyboard layout.
 
Brainfuck-like ~ A turing machine essentially
 
or use a script to add keybindings to keys
 
4:23 PM
@CalculatorFeline even PC-ENglish international does not have jelly chars
 
@Mr.Xcoder altgr+.+A on mine.
Yeah, custom keyboard layout is probably the best bet.
 
What's altgr?
 
a keyboard key
 
4:24 PM
Right alt key (at least on my keyboard)
 
Makes sense.
≥A
 
Any mac equivalent?
 
Doesn't work for me :/
 
I have no clue about mac.
 
RIP MAC
 
4:25 PM
≥å
What are you using?
 
Now I am Golfing on iPad... I guess I am not mentalul healthy :/
 
Linux (English (international AltGr dead keys))
 
Golding on iPad? What's golding? :P
Mentalul?
 
@CalculatorFeline Do you have the ABC extended layout?
 
@CalculatorFeline come on, the iPad keyboard is awful... Arghhhh
 
4:28 PM
ABC extended layout? Huh?
 
There must be a way on the mac as well... Otherwise it would be a heck for spanish, German, and other people...
 
Probably.
 
@officialaimm all the german chars are typeable on the mac keyboard
 
Well, you can use alt or alt+shift to get these chars: ¡™£¢∞§¶•ªº–≠œ∑´®†¥¨ˆøπ“‘åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’»ÅÍÎÏ˝ÓÔ‌​ÒÚƸ˛Ç◊ı˜Â¯˘¿ Note that some are combining.
 
I knew about those, of course
But they don't help me a lot if I WANT to write jelly
 
4:31 PM
Custom keyboard layout.
 
I guess I will stick to copy paste then
 
:P
This is why I don't do Jelly.
 
Try option X.
 
Option X?
Isn't that dangerous?
 
Again, no clue about mac.
 
4:33 PM
Oh, option x. Like ≈?
Or ˛?
 
I'm not going to vote to close because I have a dupe hammer, but this seems like it's a dupe of Is it a prime?, since the only difference is that the input isn't the number you're testing. Adding the offset (2n + 1) is a pretty trivial modification. — DJMcMayhem 13 secs ago
Would you all agree?
 
What did you use to type ≥
 
Option-.
 
Option x then a. Try that. (If this doesn't work, no clue)
 
There's also Option-, for ≤, Option-= for ≠, and Option-Shift-= for ±.
≈a
Nope :P
 
4:37 PM
ṇo clue
 
@DJMcMayhem I wouldn't :P. I don't want to doubt your judgement though
 
@Mr.Xcoder Does this help? sites.psu.edu/symbolcodes/mac/codemacext
 
I was using that resource, didn't help him.
 
@Dennis Will try when I have my mac around... Won't be able to test for next couple of days
 
@Dennis Is it possible to a write a brainfuck interpreter in jelly? Have you(or anyone) already done it?
 
4:44 PM
@officialaimm Yes, it's possible. It's turing complete, thus is able to interpret BF.
 
@Zacharý Thanks. Have you written a BF-interpreter in jelly?
 
Definitely possible, although not very pleasant.
 
Jelly isn't JS/C/C++/D/Java where you can transpile, so it would be not very short
 
Actually, transpilation should be possible.
 
It ... just isn't as pleasant as a C-style language.
 
4:48 PM
@Dennis Have you tried making one? :)
 
No.
 
Wait... Jelly has an evaluate as Python code command.
 
Of course, the real challenge is to write a Jelly interpreter in brainfuck.
 
If anyone does that, they should earn all Dennis' reputation
 
If anyone does that, they need to get a life.
6
 
4:50 PM
That too.
 
Isn't exec more handy than evaluate? But I believe there is one for that as well.
 
Sorry, used to JS's terminology on eval/exec (just eval)
 
Yeah, if anyone answers this they have the wrong type of life.
2
 
I've heard people are working on it.
*were, it's kinda dead now
 
4:56 PM
0
A: Sandbox for Proposed Challenges

Bruce ForteGiven a Prüfer code generate its tree This is the dual of this challenge, now you're given a Prüfer code/Prüfer sequence and the task is to generate its corresponding tree. A Prüfer sequence of length n-2 is a unique encoding of a tree with n nodes, its origin lies in a proof of the fact that t...

 
@Zacharý they're no-ops
 
Will they remain no-ops?
@totallyhuman Will they remain no-ops forever, or will one/both of them eventually gain a purpose?
 
0
A: List of bounties with no deadline

SEJPM100 Rep for a sub-exponential time tweetable integer factorizer Let n denote the length of the input integer. Write a valid answer to that challenge that implements a factorization algorithm that runs in worst-case sub-exponential time in n. For example Pollard-Rho runs in exponential time with...

 
Oh, @totallyhuman, you forgot to insert into the code-page section of ,,,'s wiki, even thought it is present in the commands section.
 
5:25 PM
chirp
 
Oh my bad
Will fix
P.s. you could totally file issues on the GitHub and be super professional
 
(Again, don't want my github out there ... hence MY is on bitbucket)
 
what's wrong with having github 'out there'?
 
Some of the repositories that I don't want connected to PPCG are public
 
5:41 PM
@Zacharý Would a separate PPCG GitHub account help?
(I don't think there's any rule against that)
 
It would, but for some reason when I tried that a while ago it was deleted or something? Does it have to be created on a separate computer?
 
181
Q: Multiple github accounts on the same computer?

Kevin WhitakerTrying to work on my both my actual "work" repos, and my personal repos on git hub, from my computer. The work account was set up first, and everything works flawlessly. My personal account, however cannot seem to push to my personal repo, which is set up under a different account/email. I've ...

That doesn't seem to mention accounts being deleted though...
 
> A human must create your account; you must be 13 or over; you must provide a valid email address; and you may not have more than one free account.
 
Ah
Although that seems to conflict with:
> User accounts are intended for humans, but you can give one to a robot, such as a continuous integration bot, if necessary.
 
Giving an account to a robot != robot creating account.
 
5:49 PM
Unless robots can only have paid accounts...
Yes but it presumably counts as having more than one account (unless you create one for your robot but not one for yourself)
 
@Zacharý Robots over 13 years old? they must be rusty...
 
@Uriel ⍨
 
> It may be tempting to have more than one user account, such as for personal use and business use, but you only need one account.
That seems presumptuous...
I can understand not being allowed multiple free accounts, but just saying you have no need for further accounts sounds odd
 
Yeah ... now I'm stuck with Bitbucket!
chirp
 
6:06 PM
> Sometimes, there isn't anybody talking in chat. That's perfectly fine. Don't send messages just because the room is quiet.
 
I expected that.
 
It seemed kinder than a kick
But if you were expecting it, maybe I should have kicked...
One line doesn't seem bad, but if allowed it gets worse as others join in, so it's a chatiquette rule now
 
Do you guys have these messages on reserve, waiting to be posted? (That's an honest question, not just here to be here)
 
I don't. Others may. I just opened the chatiquette and copy pasted
 
Oh ... the chatiquette.
 
6:10 PM
(also means I double check I haven't misremembered what's in the chatiquette...)
Yes, hence the quote block :)
 
Messages on reserve?
 
Like in a text file or something.
 
@officialaimm Some people have a shortcut for standard wording for pasting frequently needed comments on main. So maybe some people have something similar for chat too. Personally it doesn't come up often enough for me to set that up so I just copy and paste from the chatiquette
 
Oh, Like those 'welcome to ppcg' comments?
 
Yep, like those.
 
6:41 PM
0
A: Sandbox for Proposed Challenges

OkxIs it a Chen prime? A number is a Chen prime if it satisfies two conditions: It is prime itself Itself plus two is either a prime or a semi-prime. A prime is a number where it has exactly two divisors and those divisors consist of itself and one. A semi-prime is a number which has exactly t...

 
@Dennis Yeah, just like the option to run MIPS on TIO as a language, with byte count and stuff
 
Are you aware of an emulator?
 
SPIM
(it's MIPS backwards)
AFAIK it runs only on Linux, but that's good enough for TIO
it's a gross command line utility but it'll do
 
0
A: Sandbox for Proposed Challenges

dzaimaLogical Order of Operations Task Given an input, evaluate it as a mathematical equation following the order of operations. But, instead of the using PEMDAS, we drop the parentheses and exponentiation and introduce spaces - SMDAS - spaces, then multiplication & division, then addition & subtrac...

 
6:59 PM
@musicman523 OK, I'll take a look.
 
@Dennis it's not really that hard. you just have to write a brainfuck that covers most of assembly instructions, then re-abstract by constructing it into a C interpreter and then python.
 
There are plenty of c to BF and BASIC to BF compilers.
 
@mınxomaτ really? I've never stumbled any
 
A few links for you: iwriteiam.nl/Ha_BF.html
 
then you can just translate jelly to c, and then feed the C to the compiler
 
7:06 PM
> No brainfuck party is fun without a stripper!
Latest commit message (11 years ago) on c2bf...
 
7:55 PM
what github is failing to sync SOGLOnline :/
 
8:29 PM
 
Oh yeah, Jelly->Python->C->BF.
 
So I just had this neat idea: Use a verification tool for code-golfing. That is a tool that will "output" by printing a counter-example trace of C program code. Would this be considered a valid golfing language / method?
(argument supplication would only work via -D flags though :/ )
 
8:52 PM
Is there a Jelly -> Python Transpiler/Compiler available right now?
 
Well, nvm, that isn't needed, and there IS a Python->C transpiler/compiler right? Or am I mistaken?
 
@Zacharý cython?
 
Does Cython convert Python->C code?
 
30
Q: Use Cython as Python to C Converter

user845459I have huge Python modules(+8000 lines) .They basically have tons of functions for interacting with a hardware platform via serial port by reading and writing to hardware registers. They are not numerical algorithms. So application is just reading/writing to hardware registers/memory. I use thes...

 
9:01 PM
So ... one could do a Jelly (minus a few impossible commands, like time)->BF compiler: Transpile all of sympy,, numpy, and Jelly to C. Then use a C->BF transpiler to complete the Frankenstein of coding.
 
9:33 PM
c'mon NMP you can do this
 
10:00 PM
1
A: Sandbox for Proposed Challenges

Carlos AlejoHouse of cards (version 2) See version 1. Thanks to FryAmTheEggman for the idea for this second version. Not-so-simple challenge: given a number of cards, build the tallest house you can with that number of cards. Examples: Input: 2 Output: /\ Input: 3 Output: /\ Input: 5 Output: -- /\/\...

 
not NSP, NMP
 
10:12 PM
Is it likely anyone interested in entering/viewing a KotH will be using IE<11?
 
@trichoplax on which platforms is <IE11 even a thing?
(like the best thing you can get)
(by default)
 
I don't use IE except for testing JS works across browsers, so I have no idea which versions people use
If someone has an old version of Windows, do they still get automatically updated to IE11?
 
OK, Win8.1, Win10 and Win7 got IE11
4 years ago
 
Thanks - that's enough for me. I'm happy not covering XP
 
@trichoplax or Vista :P
 
10:17 PM
Definitely :P
 
I intentionally don't support IE out of distaste for Microsoft
 
Edge doesn't seem to be causing much problem, but IE is an opaque mystery to me
It has just taught me that I shouldn't close <input> tags though, so IE has done one thing the other browsers didn't. A meaningful error message would have been even better though...
 
0
Q: Condition of our Fibonacci challenge

totallyhumanLet's face it: our Fibonacci challenge is not great. To quote a recent effort of mine to improve on the situation: ...the challenge is old and outdated; is severely under-specified; allows for two types of solutions; has answers that don't have easy ways to try online; and in general, is lac...

 
@totallyhuman After your impatience, it only took an hour and forty minutes after all... :P
 
10:32 PM
:P is there no way to fix it
Also any feedback on the post will be appreciated since I don't think I made my argument clear enough
 
@totallyhuman are you aware of the merge mechanic of SE?
it may be applicable here if done carefully
7
Q: What are merged questions?

gerritI've seen some posts about merged questions on Meta Stack Overflow. What are merged questions, who can merge questions and what is the policy around this? What happens to reputation on questions and answers for merged questions? Is this similar to closing? Can users vote to merge and unmerge or i...

 
@totallyhuman problem is though if we have two classes of solutions splitting them wouldn't be solved (with attribution kept)
 
10:48 PM
Questoin: is PNP transistor like NPN but invert?
 
No it's exvert
 
exvert is not a real word?
 
Probably not, I was joking
 
I am the best at being humble
 
11:04 PM
No I'm more humble than you are
 
@totallyhuman Oh yeah! I star my own messages to show how HUMBLE I am
(not being serious btw)
 
Caret Reply pretends you let you star your own messages with ^*
 
hello
35
Q: Reverse Polish notation

user11You must evaluate a string written in Reverse Polish notation and output the result. The program must accept an input and return the output. For programming languages that do not have functions to receive input/output, you can assume functions like readLine/print. You are not allowed to use any...

can sb help me understand
4 2 5 * + 1 3 2 * + /
?
what do mean having two operators nest to each other?
I am trying to figure out what this means and what is the order of operations
 
Ah, I can help with this.
In Reverse Polish Notation, instructions are considered "Post Fix", so the operator happens after the two variables.
The easiest way to think of this is like a stack.
In this particular example, the stack pushes on some variables, 4, 2, 5 then comes up to an operator, *.
 
OkI think I understood
 
11:18 PM
* multiples the last two values together, which makes the stack now look like 4, 10
Then, the + is encountered, which adds the last two values, so you get 14.
And so on.
If you want, you can use RProgN to play around with it.
 
so an operator has always two operands, right?
 
In this case, yes.
 
Wow only 14 views in 2 hours
Must've caught a horrible timing
 
Wikipedia article is a little bit lacky
doesn't dive much about two operators next to each other
tks @ATaco
 
11:35 PM
Just break it into post-fix brackets, like so;
 
Just process from left to right and you won't have to worry about operators next to each other
 
((4 (2 5 *) +) (1 (3 2 *) +) /)
which in Infix, looks like: ((4 + (2 * 5)) / (1 + (3 * 2)))
 
1 message moved to Trash
 
Ok sorry
 
11:46 PM
@totallyhuman I know you're excited to see how the post turns out, but meta is slower than main so it might take a while. Just give it time :)
 
@Christopher: you just apmmed
spammed*
the link is xkcd.com/645
 
00:00 - 12:0012:00 - 00:00

« first day (2353 days earlier)      last day (2494 days later) »