« first day (1858 days earlier)      last day (1940 days later) » 

10:01 PM
I'm all for no change.
 
Biggest problem with "no change" is that "programming puzzles" are pretty much never on-topic.
 
if you prefer any of the names listed there to our current one, then you should downvote "No change"
but if you really think that our current name is the best, then keep your upvote :)
 
@El'endiaStarman But PPCG is pretty catchy
 
@CᴏɴᴏʀO'Bʀɪᴇɴ We could shorten it to 2PCG
 
"shorten"
 
10:04 PM
@flawr Same length... ?
 
But the 2 is soo cooool!
 
oooh, Recrreational Programming works fairly well in initial form, the only competing RP is "roleplay"
 
@TimmyD Seriously, Golfscript, CJam or Pyth Stack Exchange
 
You could also use RPg as an acronym
 
I feel like a core issue on the naming post is "do we want to expand our scope"
 
10:10 PM
maybe we should have a tag to add things like the hello world question, that are good places to show your new language to new users
2
 
uh what?
who decides which posts get the wiki tag? seems pretty arbitrary.
 
idk
 
idc
 
but there should be a few simple challenges that represent what PPCG is about
i think we may need a better way to introduce new users
 
if I'm a first time visitor, I'm not going to think "let me check the wiki tag, see what's there"
 
10:14 PM
@Dennis How did you choose your y value here
 
in fact, I personally always go to the help center to make sure my question is on topic
 
How has my profile still not updated?
 
wait
help center?
 
Oh, lol, nvm.
 
top right on every site
 
10:16 PM
it seems that you should always choose y=root(x) or y=cuberoot(x)? Or am I missing something
 
Cuberoot gives much better performance.
There are ways to choose higher roots, but I haven't tried yet.
 
Okay , but then you have to sieve up to x^2/3?
whereas if you choose y=root(x) you should only have to sieve up to root(x)
?
 
That's correct, but computing Phi(x, pi(x^(1/2))) is a lot slower than computing Phi(x, pi(x^(1/3))).
 
Okay I see thanks
 
The sieve is pretty much the fastest part of my code.
 
10:20 PM
yeah I see you keep making improvements to your phi function
 
@VoteToClose ?
 
@MartinBüttner about the 'how we can fit in' post, couldn't new/existing tags and a custom search query to only show/exclude the tag(s) work well in the meantime?
 
why am I unable to find a Calvin challenge
ಠ_ಠ
11
 
what about a HelkaHomba challenge?
 
10:35 PM
ಠ_ಠ
11
I see....
 
@MartinBüttner You haven't memorized it already? :P
@AlexA. started it.
@ZachGates IKR?
@HelkaHomba ಠ_ಠ
 
I was wondering why the majority of my answers were on challenges written by a user I'd never heard of before..
ಠ_ಠ
12
 
Python question:
How do I assigned a reader to stdin so it reads from a string?
Programmatically?
 
"Reads from a string"?
 
Trying to use TextIOBase
Something like this, but I need it to work with sys.stdin.read(1)
 
10:39 PM
readline()?
 
Can I ask why you're using sys.stdin?
 
I have to set stdin to the string programmatically.
Any why? So I can read 1 byte at a time from the input.
 
@mbomb007 create a buffer and use this?
 
Yeah, idk how to make a buffer
That's what I'm trying to figure out...
 
@EasterlyIrk I didn't know that was a thing
@Upgoat they could, but the question is if people are up for that
 
10:44 PM
@mbomb007 file objects aren't working? i.e. f=open(path, 'r') then TextIOWrapper(f.read())?
 
Why does sys.stdin.read(1) not currently work?
 
apparently strings are buffers if i understand correctly
 
@ZachGates I'm using an online interpreter, so no files. And I want to input non-printable ASCII, so I need to use a string for stdin with the ability to call sys.stdin.read(1).
 
Which online interpreter?
 
ideone
You can't paste non-printable ascii into the input. It doesn't work.
I need to use a string.
 
10:47 PM
TextIOWrapper('randomstring') doesn't work?
 
'str' object has no attribute 'readable'
Same error as when I used a buffer
 
TextIOWrapper('randomstring'.encode('utf-8'))?
 
nope
 
also, why are three of the 5 starboard posts @ZachGates ' disapproval faces?
 
@Upgoat ಠ_ಠ
 
10:53 PM
wait why are there 3 ಠ_ಠ's by zach gates each with 3 stars?
 
@Cyoce Zach Gates is the Illuminati.
 
@Zgarb damnit, ninja'd
 
@Zgarb not anymore
 
I just released the ForceLang module I was working on
 
wait
@mbomb007 use StringIO(u'unicodestring')?
 
10:58 PM
@Upgoat Yeah, I had that idea, too. It doesn't work. '_io.StringIO' object has no attribute 'read1'
I tried io.TextIOWrapper(io.StringIO(u"string")).
 
@mbomb007 are you using readline()?
 
user image
2
 
@Upgoat nope
But that doesn't work either.
I'm using myWrapper.read(1).
 
read one char?
 
Yeah
 
11:00 PM
Huh: I discovered(?) a new trick I've never seen that's probably useful in a bunch of languages.
 
weird...
 
@Lynn which is...?
 
I also tried wrapping the StringIO in a BufferedReader. Nope.
Maybe I'll make a post on SO...
 
Instead of x>0 ? -1 : 0, if x is nonnegative, write x/~x
 
should just be foo=io.StringIO(file), then io.read(1)?
 
11:02 PM
@Lynn assuming x is an integer?
 
0
A: Robot on a ladder

LynnPython 2 and 3, 63 bytes f=lambda n,s,h=0:h^n and-~f(n,s[1:],h+[h/~h,1,-h][ord(s[0])%4]) For example, f(4, 'UDDUURUUUUUUUDDDD') is 10.

Right
 
But wait, that doesn't work
 
how do you clear a balancing group in regex? I thought (?<-a>(?=.))* should definitely work but it doesn't seem to (@MartinBüttner :)) (First I thought (?<-a>)* might be enough)
 
 
@Cyoce That's JS being JS
$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 10
>>> x/~x
-1
>>>
 
11:06 PM
oh
I have to do floor division
 
Works in Python integer division, but not x86 division.
 
@Cyoce Yeah.
$ irb
irb(main):001:0> x = 10
=> 10
irb(main):002:0> x/~x
=> -1
I didn't know JS defaulted to float division actually
 
JS has no distinction between floats and ints
It's all just Number
 
Right but still
I presumed numbers with no fractional part got int divided
 
@Cyoce -1/9?
 
11:08 PM
1/-9
 
well yeah
 
@Cyoce That's not entirely true in Nashorn
 
@SuperJedi224 nashorn?
 
@Cyoce That's the javascript engine Java has builtin
Apparently it's based in part on Rhino
 
-1
Q: Sum of numbers with given digits

user2373145Read from standard input a positive integer k<9 and a sequence of k distinct decimal digits. If there are 2 equal elements in the sequence, exit with an error. Assuming there was no error, print the sum of all natural numbers with given digits (without repetitions). Eg. for k=2 and digits 1 and ...

 
11:13 PM
@ZachGates ಠ_ಠ
4
 
@mbomb007 Isn't this essentially what you want? (Unless you want to explicitly use sys.stdin)
 
11:30 PM
0
Q: Displaying a short URL for a webpage

ArchonI am not clear on how to frame my question. I am making the website for my college fest, and although I know HTML, CSS, I don't know anything of PHP. I just want to display my URLs like this:- www.somesite.com/somepage (something like that) instead of :- www.somesite.com/somepage/index.html H...

 
I cannot believe that summing challenge has been on the site for twenty minutes and got 4 downvotes but no one even bothered to add the fastest algorithm tag. Don't just downvote, fix.
What an icy reception for a new user.
 
@AquaTart That doesn't work as a fastest algorithm challenge, consdering the answer wouldn't take more than a couple of nanoseconds to compute.
 
@feersum It does work for fastest algo, but not for fastest code. They're different.
 
@MyHamDJ No, it does not.
The input is fixed size, so any solution is O(1).
 
O doesn't matter here
ninja'd
 
11:39 PM
Welcome to PP&GG! — Nᴮᶻ 11 mins ago
Golf golf
4
 
I know, but no one even bothered to say anything until he asked
 
lol
 
Oh hi @AlexA.
 
Howdy, @flawr!
 
Fine, getting busy again=)
 
11:41 PM
Anyways.
 
How about you?
 
The input is fixed size? Read from standard input a positive integer k<9 and a sequence of k distinct decimal digits.
 
@AlexA. PS: I hope you saw this =)
 
@MyHamDJ the biggest input is 8 and [2..9]
 
But it still varies.
 
11:42 PM
but it prevents you from having any asymptotic behavior
so big-O doesn't apply at all
 
@flawr Is that good busy or just busy? I'm going alright, pretty usual.
@flawr I didn't see that! It's nice to see some of the people in your videos survive for once.
5
 
@Maltysen Oh, good point.
asymptotic time complexity. (definition) Definition: The limiting behavior of the execution time of an algorithm when the size of the problem goes to infinity. This is usually denoted in big-O notation. See also asymptotic space complexity.
It should have been little-o notation.
 
o(no)
 
The big O of my algorithms are always O(no way)
 
o(N*O(no))
 
11:45 PM
I seem to have missed something
O(no*u^didnt)
5
 
o(N*O(n*o(...)))
 
O(r*e^kt)
 
@AlexA. It's just the beginning of the new semester, so that is still a good kind of busy=)
 
O(mg)
 
O(k)
 
11:47 PM
@flawr Nice. :) What classes are you taking?
 
O(rly?)
 
O(course)
 
Input:
O(golf golf)

Output:
ERROR: Not defined, please choose right words.
 
O(O(O(O(yes))))
 
11:48 PM
some discrete (discreet?) math stuff on graphs, functional analysis, elliptic curves, then some c++ programming, and an astronomy lecture
I never know which is which.
 
Discreet is like stealthy, discrete is not continuous
That sounds like a fun semester!
 
Well then it is stealthy math of course.
 
I've always wanted to learn about functional analysis and elliptic curves.
@flawr Equations that must be solved in secret.
 
Not necessarily secret, but without anyone noticing
 
hahaha
 
11:50 PM
 
Confidant numbers are a major part of discreet math.
 
How about confident numbers? They seem to be not as discreet.
 
Yep, those belong to the subject of indiscreet math.
 
So an indiscretion is basically function that maps discreete numbers to discrete numbers.
 
@feersum aka conspicuous math
 
11:53 PM
Discleet math
 
Jonskeet math
Ok it really is way too late.
cu guys, good night=)
 
Good night!
 
gnight!
 
night
 
11:54 PM
but wait snakes don't have eyelids
 
WWWWHHHHYYYY does Chrome not allow me to press the Answer Question button????
 

« first day (1858 days earlier)      last day (1940 days later) »