« first day (2282 days earlier)      last day (2559 days later) » 

2:00 PM
@LeakyNun yes..?
 
A floating point number that is in binary
 
@orlp so the largest prime must be p
 
no
 
give me a counterexample
 
consider a big prime 2^a+1
 
2:00 PM
0
Q: Should Brain-Flak Birthday challenges be tagged Brain-Flak?

Wheat WizardAs you may or may not have noticed we are doing a series of Brain-Flak Birthday challenges to celebrate Brain-Flak's first birthday. Some questions in this series are only tangentially related to brain-flak by the balanced-string aspect (and thats fine they're still interesting challenges). The...

 
then if we have n = (2^a+1)*11
11 is the biggest prime factor
 
@KritixiLithos floating point numbers are binary. You could also say they need to print it as a string
 
heh?
 
but 11-1 = 10 has a prime factor 2, also found in n
 
I thought (2^a+1) is the biggest prime factor
 
2:01 PM
eh
sorry other way around
2^a+1 is the biggest prime factor
but 2^a + 1 - 1 only consists of twos
 
I mean, if n satisfies my condition, then its largest prime factor must be p
 
oh I messed up
my bad
my counterexample doesn't work but I'm still not convinced
 
@KritixiLithos the challenge is basically to use a function that implements this
 
the factorization of n is p^(k-1) (p-1)
the prime factors of n are p and the factors of p-1
 
or write your own if your language doesn't support floating point
 
2:03 PM
the factors of p-1 must be smaller than p
therefore p must be the largest prime factor
 
ah yes, ye
so to see if it's possible
we find the biggest factor of n
then check if n/(p-1) == p^k for some k
 
@NathanMerrill Hmmm, I will have a look into that
 
my criterion doesn't work if k=1 for obvious reasons
 
@LeakyNun yes it does
k=1 is implicitly excluded
 
I mean my criterion
 
2:07 PM
because no number has factorization p^(k-1)(p-1) for k=1
that number doesn't exist
 
e.g. when n=4
 
when n = 4 the biggest prime factor is 2
so p^k = 2^2
so k = 2
not 1
remember that k is not undefined, it's simply the multiplicity of p in n
 
e.g. when n=52.
 
oh you made a random -1
why didn't you just write n = p^k(p-1)?
 
@orlp heh
because that isn't what my CMC says
 
2:10 PM
ah right
no we do need to exclude k = 1
but that makes sense
k = 1 would only occur for prime n
right?
eh I feel I'm confused because we changed notation with +1 -1 like 5 times by now
 
consider e.g. when n=52.
 
but either way the algorithm works
2*2*13
so we need to check if 1*12 = 52
and it obviously doesn't
wait, 13 or 1?
(eg. 13^1 or 13^0)
no, 13^1
@LeakyNun sometimes I wish I was a bit more precise..
 
@orlp go on
 
@LeakyNun hrm?
I just mean I think kinda fast and loose and informal
 
consider p=53 and k=1
 
2:20 PM
>>> def f(n):
...     p, k = max(sympy.factorint(n).items())
...     return n == p**k * (p-1)
 
try f(52).
 
false
 
and verify that it should be true by considering p=53 and k=1.
 
oh like that
@LeakyNun yeah so if n = p - 1 that's the only exception
I believe
 
yes it is, but how can we deal with that while keeping the code length down?
 
2:23 PM
>>> def f(n):
...     p, k = max(sympy.factorint(n).items())
...     return n == p**k * (p-1) or sympy.isprime(n+1)
oh I didn't really care about code length
just an efficient algorithm
 
alright
 
although factoring n isn't really efficient
can we do it without factoring n?
@LeakyNun now that I have that function OEIS can help
_" COMMENTS
These numbers play a crucial role in inverting Euler's totient function."_
haha yes, yes they do
the link is interesting though arxiv.org/abs/math/0404116
 
@HyperNeutrino I just wanted to say, this isn't entirely true: isNaN converts to a number first, so isNaN("a") returns true
 
@ASCII-only I have submitted an issue regarding Charcoal on GH.
 
2:40 PM
@LeakyNun ok so we solved part of the problem
now we just need to add 'multiplicative combination' of numbers of the form p**k (p-1)
this would be easy if numbers of the form p-1 didn't exist (aka k = 0)
 
2:55 PM
@orlp how shall we proceed?
@DJMcMayhem challenge: GCD in brain-flak
 
@LeakyNun I don't really know
 
user165474
@ETHproductions Oh, hm. Interesting. I didn't know that. So isNan literally means "is not a number"?
 
user165474
And I was thinking from a Java perspective :P
 
i wrote my java program
was an android app
 
0
A: Sandbox for Proposed Challenges

SzymonGive counterexamples to thesis that prime numbers are finite. It is known since antiquity that there are infinite prime numbers, first proved by Euclid. An unorthodox yet brief formulation of this proof was recently posted on MathExchange: There are infinitely many primes, if not, multiply a...

 
3:13 PM
@betseg Noice, what did the app do?
 
@LeakyNun ok so I have a bit of an idea, not terribly efficient, but an idea
 
fire [insert word]
(what should the world be?)
 
@KritixiLithos nothing useful actually
 
if we want to know if n is reachable we factorize it and using the factorization get all divisors of n
for each divisor of n we check if d+1 is prime
 
Technically, firing up an empty project in Android Studio starts off as a working "Hello, World!" program
 
3:20 PM
if yes, then d is reachable
if not then d must be part of the p**k part of p**k(p-1)
 
@orlp what should the word be?
 
@LeakyNun I don't understand?
 
there's a phrase "fire x" which would fit that context
but I forgot what the word should be
oh, fire away
 
ah
 
Yay, my Area 51 proposal has two discussions already (and has 2 followers in total)
 
3:27 PM
@HyperNeutrino Yeah, though you have to be careful because e.g. isNaN("1e3") also returns false
It just tells you whether something looks like a non-NaN number or not
 
@LeakyNun I think we can greedily assign a big k
consider p**k (p-1)
but we have a number that contains this twice
so p**k (p-1) p**l (p-1)
since (p-1) is reachable by itself we can just split it like this
p**(k+l) (p-1) and (p-1) and we won't reject valid setups
 
Most traumatic April Fools' prank (2018?): give someone a box of donuts with that Nintendo bittering agent applied to them
 
I don't understand this at all. Can you give me an example? @orlp
 
well
we looked at the divisors
and found all p-1 that divide n
 
Can you give me a numerical example?
 
3:32 PM
eh... no
I'd have to find the right example
but I don't know it
or I could sort of
totient(235) = 184
so 184 is reachable
when we look at all the divisors of 184 we get 2, 4, 8, 23, 46, 92, 184
oh that's a bad example too :(
totient(280) = 96 so 96 is reachable
>>> sympy.divisors(96)
[1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 96]
>>> [d for d in _ if sympy.isprime(d+1)]
[1, 2, 4, 6, 12, 16, 96]
oh this is also a bad example because 96+1 is reachable and then you're done :(
@LeakyNun I'm sorry it's really hard to find a nice example without solving the problem itself already
 
@KritixiLithos but is it useful
 
@orlp heh, alright
 
I don't think a hello world program is useful
Unless for learning
 
I don't understand why every tutorial starts with hello world
is printing to console really that basic and useful?
 
how would you debug if you didn't know how to print to console
 
3:40 PM
Your first programs do not need to be that useful
 
@ArtOfCode omg it's you
long time no see
 
I tend to be me, yeah
 
Printing to the console gives you an idea on what string are and how they work, as well as boilerplate, if any, and how functions can be called
 
@KritixiLithos for example i dont understand what it means to pass variables by reference or value
i dont understand
 
3:43 PM
@betseg reference = pass the variable by telling the callee where in memory it is
value = give the callee the value and let it put it wherever it wants
I believe
 
Is Java by reference or by value?
 
oh like *var and var in c
 
yeah
pointer vs value
 
well lol, a friend told me that Java was pass-by-reference, but SO says it's by value
 
@KritixiLithos objects by reference
 
user165474
3:48 PM
It passes the object by the reference but the variable is by value of the referenced object if that makes sense
 
I believe that much of the confusion on this issue has to do with the fact that different people have different definitions of the term "reference". People coming from a C++ background assume that "reference" must mean what it meant in C++, people from a C background assume "reference" must be the same as "pointer" in their language, and so on. Whether it's correct to say that Java passes by reference really depends on what's meant by "reference". — Gravity Jul 30 '11 at 7:23
 
Does anyone care enough to write a Pyth answer for this easy challenge?
 
... I never said that
 
@LeakyNun ok so
if we get the divisors of n
 
3:50 PM
@KritixiLithos sorry
 
also:
 
and then filter only those divisors that have form p^k(p-1)
then if a subset of those divisors multiply to n, n is reachable
 
@betseg are you interested in Pyth?
 
@Riker i cant see them because wikipedia is now banned
 
is this when SE is supposed to be down?
 
3:52 PM
@LeakyNun dunno
 
@betseg wot
 
¯\_(ツ)_/¯
 
@betseg would you want to write an answer for the challenge I linked above?
 
@betseg you can't see the images?
 
imgur is banned too but i can see the images ;)
@LeakyNun meh
 
3:53 PM
lol nice
@betseg but wtf why is wikipedia banned
 
@betseg it's not really difficult
 
no idea
 
that's a ridiculously stupid idea
 
because dictatorship
 
heh, the popularity of Pyth declined rapidly
 
3:54 PM
@KritixiLithos I know, I'm desperate to revive it
 
user165474
@LeakyNun I'll try that in Jelly (there's probably an answer already; can you tell me if there is?)
 
@KritixiLithos when the jelly nation attacked
7
 
@HyperNeutrino yes there is
 
@betseg I assume you are in turkey? try to get out if you at all can
 
yep ill try
 
oh, so it's new?
:(
 
@Riker The age of stack-based languages is over
 
It's newer than I imagine
@KritixiLithos Pyth isn't stack-based
 
Oh, then what is it?
@betseg Do you use a VPN?
 
Pyth is a compression scheme for Python
 
3:58 PM
@KritixiLithos even dns is enough
 
so can you view Wikipedia?
 
@JanDvorak would you take up the role to revive Pyth by answering that question using Pyth?
 
Nope. I'd have to learn it first.
 
@KritixiLithos yup
 
4:02 PM
tr.wikipedia.org/wiki/… discussion about the ban :D
 
tl;dr;translation?
 
Google Translate, my friend
 
@JanDvorak I can teach you
 
(turkish language, didn't read)
 
i meant, the discussion is on wikipedia, which is banned
 
4:03 PM
How exactly do you use a DNS?
 
@mods unfrizzle room please: chat.stackexchange.com/rooms/38196/phigs
 
@KritixiLithos :
$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
 
@PhiNotPi link to github?
 
see starboard
 
@PhiNotPi do you get notifications for the form?
@PhiNotPi namesake?
 
4:05 PM
@betseg Then what would you do?
 
reboot, and if isp isnt forcing its on dns, you use those ips as dsn
 
How? For example, how do you use wikipedia?
 
0
A: Sandbox for Proposed Challenges

Stewie GriffinWhat would your reputation be without the rep cap? In this challenge, you will calculate what your reputation would be, if there weren't any reputation caps on PPCG. Everyone can access the rawdata for reputation changes on the adress: codegolf.stackexchange.com/reputation. The raw data follows...

 
@LeakyNun no, I mean I can check it when I'm working on stuff
 
@KritixiLithos just enter en.wikipedia.org, nothing is needed to use
 
4:09 PM
@PhiNotPi I see
 
Sorry for all the hassle about the /reputation site. The challenge is ready for review :)
 
Then how does a simple cat affect it? (sorry for the stupid questions)
 
The key is what you cat into
 
@KritixiLithos just wanted to show the file
 
def is_pk_p1(n):
    p, k = max(sympy.factorint(n).items())
    return n == p**k * (p-1) or sympy.isprime(n+1)

def is_in_totient_image(n):
    if sympy.isprime(n+1): return True
    D = [d for d in sympy.divisors(n) if d != 1]
    e = []
    e = {d for d in D if is_pk_p1(d)}
    generation = e
    while True:
        new_generation = {a * b for a, b in itertools.product(generation, e) if a * b <= n} | generation
        if n in new_generation: return True
        if new_generation == generation: return False
@LeakyNun done
 
4:11 PM
@LeakyNun also I haven't worked on this in a long time so I don't really remember what state everything is in. I might rewrite most stuff.
 
@PhiNotPi alright
 
@LeakyNun ugh, that sounds hard
 
@DJMcMayhem I agree
 
@betseg So how do you use that file?
Or do you not use it at all?
 
@orlp nice
 
4:14 PM
so we know for example that 1235982240 is indeed an output of the totient function
 
@KritixiLithos nameserver IP
in that file
 
what do you do with the IP then? (I don't really know much on how DNS works)
 
0
Q: Sort digits by their first occurence in PI

Roman GräfTask Given a non-negative number n sort n's digits by their first occurence in PI. Rules Submit a program or function that does the above task. Input can be taken via function or cli argument or STDIN. Output via return value exit status or STDOUT.

 
@Downgoat Thanks for following :) How much of an enthusiast are you?
 
Sorry but following what?>_<
 
4:20 PM
@KritixiLithos that it is the DNS's ip, you enter whatever IP you want (i use Google DNS, so i have 8.8.8.8 and 8.8.4.4)
 
@Downgoat Prehistoric Animals
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
That must be why it doesn't work
 
lol
twitter.com/BTKbasin/status/858356056229130240 they say wikipedia say turkey supports terrorists
 
Basically, the thing that's weird about Phigs, is its absolutely convoluted control flow.
It's like a stack-based and non-stack-based language merged together.
 
4:38 PM
@KritixiLithos oh. I'm not a paleontologist or anything, mostly just interested in evolution and all
 
I'm not a palaeontologist either, just interested in dinosaurs and other creatures, and slightly less interested in evolution (if mammal-like reptiles evolved into mammals, then is it possible for mammals to evolve back into reptiles?)
 
@KritixiLithos I given at the current rate of environment change I'd say no
 
Or we'd just extincitify that species before it even has a chance
sad reality of life
 
4:57 PM
@KritixiLithos back into "reptiles" won't/can't happen, but there's nothing really stopping some mammals from evolving into things moderately similar to reptiles.
Like how whales are mammals that were originally on land but went back to live in the water, etc.
 
5 upvotes in 1 minute, wow
 
on what?
 
WHAT
That's on-topic here now? I thought it wasn't
 
I'm struggling to decide if that's even on topic, but leaning toward no.
 
5:09 PM
I believe this is ready for re-opening
 
I think stuff like that has been asked before and been shut down.
 
I think so too
I think there's something on meta asking if it's on topic, but can't find it right now (mobile).
 
13
Q: An improved version of GolfScript

DoorknobI am planning to write an improved GolfScript for even shorter programs that can do more things. This is not a challenge; it is a request for feedback and tips on what I should do. (see tags) I'm not sure if this should be Community Wiki. If you think so, just flag for a moderator to convert it ...

 
Woot! 2K rep!
 
^^ Very similar, closed as too broad
 
5:12 PM
I can finally see deleted posts!
> As one of our most experienced users, ...
Whatever you say, site.
 
I wonder if it would be more on topic at software engineering? I'm not sure if it fits their scope, to be honest.
 
Well, the area 51 proposal for Language Design got closed as a dupe of an existing site.
And I'm reasonably certain it's software engineering
 
@Geobits I'm 99% sure it's not in their scope. I mean, how many of their common users would have had more than trivial experience with golfing languages? :P
 
It got closed now
 
I do think "tips for designing feature X in golfing languages" would be on-topic though
 
5:19 PM
8
Q: Tips for making a golfing language

programmer5000I am currently working on a golfing language. Do you have any suggestions for it? What in your language of choice is helpful for golfing? What feature do you wish you had? Do you suggest variables, stack(s), tapes, registers, etc? As usual, please post separate tips in separate answers.

 
That's what the comment also states ^^
 
@ETHproductions Maybe not golfing languages in particular, but language design maybe.
 
True.
 
Yeah. Maybe something more like what was asked in chat recently "Should stack based languages take string input in normal or reversed order?" or something.
 
@Geobits That might be much broader. Different languages are written with different goals/intentions.
 
5:21 PM
Sure, it's still really broad.
I think asking a specific question about a language feature might be fine on either site.
 
Another question related with ^^^^ "Should each numerical digit in 2D stack-based languages push a separate number?"
 
They're both still kinda poll-ish, but at least you can lay out your arguments and give examples in the answers.
Of course the answer to either is probably "it depends" :P
 
I'd say make it less of a yes/no question by asking "How would multi-digit numbers work best in 2D stack-based languages?" or similar
 
Yeah. I could see a good answer giving a few options with examples, and explaining the pros/cons to each method.
 
I'm still looking for a Pyth answer to this challenge. I really don't want to do it myself. It's just a few commands.
 
5:25 PM
Some of our users would probably be very good at writing something like that up.
 
I think a community-wiki would be best
Then other users can add other options that they think would be necessary
 
I'm not sure CW is the right way to do that.
 
Why not have each option in a separate answer?
You could still explain the pros/cons of each, and then they could be voted on individually.
 
Yeah, similar to a Tips for golfing in X question
 
Well, it may be easier to compare/contrast things in a single "essay" format written by one person. That's not to stop anyone else from offering their opinions, obviously.
There's no reason at all to limit it to one answer
And voting for the post rather than the individual options makes it less of a poll anyway.
 
5:28 PM
Ooh
@MartinEnder If tips for golfing in <all langauges> on-topic than why isn't this? — programmer5000 4 mins ago
 
Heh. I don't agree that it is, tbh.
 
I hope I don't need to use a bounty to get people answer that challenge in Pyth... It's not really hard.
 
But it actually might be narrower, since answers should pertain to the majority of languages, it leaves out all language-specific things, which are the majority of tips.
 
5:52 PM
2
Q: Tips for storage in a golfing language

programmer5000I am writing a golfing language. Do you suggest variables, stack(s), tapes, registers, etc for storage in a code-golf language? What about implicit imput?

 
6:02 PM
@EriktheOutgolfer The PPCG userscript doesn't recognise your Pyth answer as the shortest answer for some reason
 
@LeakyNun fq1iTQUQ
 
@orlp you posted?
 
the last Q can be ommited
no
 
why not?
 
@KritixiLithos It does, but it will not when the 05AB1E answer applies Adnan's golfing tip.
 
6:06 PM
@KritixiLithos you may need to refresh
@Adnan the outgolfer is here
 
hahaha
 
It just sounded like "Adnan the Outgolfed Outgolfer" is here lol. (interesting typo)
 
@EriktheOutgolfer that was intentional
because he is the outgolfer
 
6:08 PM
No it wasn't I really typed "Outgolfed" by mistake but I just striked over since it was a bit... interesting.
@LeakyNun I have outgolfed him in the past though.
 
@EriktheOutgolfer focus on the present
 
Yeah, even though my name is "the Outgolfer" I rarely outgolf... rarely anyone outgolfs either, except if their name is "Dennis".
 
heh
 
And they have a currently-1-year-old-diamond next to it.
 
@EriktheOutgolfer I swear I just need one breakthrough.
@Erik​theOutgolfed
 
6:17 PM
That pinged him
 
@KritixiLithos I used U+200B
 
But you used a d instead of an r
 
@KritixiLithos I used U+200B which treats everything after it as not a part of the ping
Erik[U+200B]theOutgolfed
is equivalent to Erik theOutgolfed
 
ah, I see
 
and only 3 initial matching letters are required
 
6:21 PM
@Lea​ningTowerofPisa
8
haha, that's cool
 
you win
 
hahahhaha
 
-,- not funny
 
Has anyone here programmed in Parenthesis hell?
 
dl.dropboxusercontent.com/u/15495351/cjam.pdf Nooooo, all my knowledge of CJam is gone :-(
 
6:30 PM
I noticed that something like a month ago when I decided to use CJam for a challenge. Gave up instantly
 
@ETHproductions no it isn't
@KritixiLithos no you don't have to
 
@LeakyNun Aw, sweet, I forgot about archive.org :-)
Quick poll: What are tape-based golfing languages (like BF, but way golfier) good at compared to e.g. stack-based langs? (if anything...)
Rather, what operations that come up sometimes in code golf would be easier on a tape than on a stack?
 
I don't really understand the difference
 
A trivial one: Implement a tape
but realistically speaking, any task that requires a deque is far easier on a tape
 
6:36 PM
@NathanMerrill 📼
 
@KritixiLithos On a tape, values are fixed in place, so if you have e.g. [1,2,3] you can move to the 2 and change it to 0 (so you have [1,0,3]), where as in a stack-based language you could just delete the second item and end up with [1,3]
 
Oh, now I understand the comparison with BF
 
I suppose tapes are fairly good at anything that requires taking data from arbitrary indices in the middle of the array
I'd like to see a tape-based golfing language
 
6:52 PM
@noɥʇʎԀʎzɐɹƆ out of scope?
 
Does anyone here use strawberrynet.com ?
Just a reminder not to use it, because it has great security issues...
 
as in it leaks your full name and address if an attacker has your email
 
^
@orlp you can do it in 5 bytes...
Never mind, I'll post it anyway
 

« first day (2282 days earlier)      last day (2559 days later) »