« first day (2321 days earlier)      last day (2521 days later) » 

3:00 PM
Nah more like 20
I capped in 5 hours UTC and then posted 15 or 20 more quine answers
 
oh mah word
No wonder you got so many upvotes then
 
Some on this
Wait no that was a diff day
but it was the other day I would've gone way over the cap
Oh yeah this was one of them
This was like five days after I joined PPCG and I was in love :P
 
You have the steepest rep slope I have ever seen :P
 
That's what Dennis said :P
Initially all my rep was from this and everyone was like "oh, this guy just has one good answer that keeps giving, he got too much rep with too little effort, blah blah blah" but then I kept going xD
 
hmm
js seems to think my object is circular, but I'm convinced it's not
 
3:06 PM
@MDXF hah, nice
 
What the...
 
there's like an 0.5% white bar to the far right
that's not right
 
Maybe you've only asked well-received questions on 4.99 days
 
Oh that's probably it
I went on a question spree last weekend
posted like 3 in the space of 24 hours
hah 3 of them hit the HNQ :P
Oh and one of my questions has the best answer I've ever seen
 
3:10 PM
Holy cow
 
ah it was cos some of my variables were global
oops
 
Installing a graphics libarary at C requires reinstalling the software to code you're using (eg: VS, MinGW etc) ? [cc: @Mego]
 
3:21 PM
@MDXF On PPCG, the likeliness of a challenge to hit HNQ is inversly proportional to its quality.
Trivial challenge gets a lot of answers really fast, hits HNQ.
 
Is there a way to search tag descriptions?
 
May 15 at 6:18, by Kenny Lau
CMC: is n a perfect square? (input: non-negative integer n)
CMC: do the above challenge in SILOS (tio link, github link)
 
@Mego I've gotten quite a few people riled up. :)
 
Anonymous
@NathanMerrill If you're not making people mad, you're doing something wrong :)
 
cc @RohanJhunjhunwala
 
3:29 PM
@Riker I agree
 
@NathanMerrill What I've been doing is the same thing that lxrun does by default, it basically dumps a rootfs onto disk.
 
@Adám because some languages do not have the concept of "integer" or "2D array"
 
@Mego As an RO, isn't it your job to make sure people don't try to make each other angry?
3
 
@LeakyNun Ah, ok.
 
Anonymous
3:31 PM
@Phoenix Well, sure. I was mostly joking :)
 
So was I
 
Anonymous
People can be angry with each other all they want. Just don't vent that anger in here :)
 
anger decreases overall morale 0/10
 
oh hell yeah
arcplus interpreter officially works
 
Anonymous
@EriktheOutgolfer Beatings will continue until morale improves
2
 
3:38 PM
@Mego I don't think you can assume dynamic types, because C# doesn't do so unless you explicitly tell it to
I don't know C#, just quoting this:
@milk C# will never assume dynamic unless it's the natural consequence of the type inference, but you can indeed write almost anything in a lambda as long as you assign it to a lambda with the right number of (dynamic) parameters. C# also never guess pointer types (even if it could in theory know it's a pointer, it has no idea what type it points to). — VisualMelon Jan 12 at 22:32
 
@Mego I was referring to the anger feeling as well as public anger totally don't recommend do it privately folks
 
Does dynamic let you write C# duck-typed?
 
Anonymous
@Phoenix I don't think so. dynamic just means "this can be any type, figure it out at runtime, and allow multiple types" IIRC.
 
That's halfway there.
Function args and return types can be dynamic
I wish C# had a repl so I could test easily.
Oh cool, it does with Mono
Mono's repl doesn't let me make dynamic methods. ;-;
 
Anonymous
I've lost the will to continue arguing in circles
 
3:49 PM
I think I might not understand what duck typing actually is.
And apparantly the reason I failed at the C# repl was because methods must be in a class.
 
Anonymous
Duck typing is when the types don't matter - the methods exposed by the class/object do
 
Ok, so if in C# you make everything dynamic, you have duck typing. Wikipedia says so. That's neat.
 
So, I have a question about input values for challenges, specifically in T-SQL: Can I just declare a variable for the input value like DECLARE @a INT = 50000 before I start my code? If so, does that line count toward my byte total? Surely the characters in the "50000" wouldn't, right, because that changes?
Otherwise, I'll go with the "assume the value is already stored in a table" method
The FAQ says "no" to "assume the value is stored in a predefined variable, but I still see people doing it in other languages:
-26
A: Default for Code Golf: Input/Output methods

Nathan MerrillPrograms may take input by assuming it is stored in predefined variables.

 
@BradC Those people get downvoted and told off for doing so.
Sometimes people break the rules.
 
ok. So a named table is the "approved" method, then:
27
A: Default for Code Golf: Input/Output methods

jimmy23013SQLs may take input from a named table which is probably not good enough. But I don't know a better way.

thanks
 
4:21 PM
Anyone who knows SQL, would love to find more improvements for this one:
0
A: CSI: Minecraft Items

BradCT-SQL, 139 134 139 bytes Input is stored in column a of pre-existing table t. SELECT IIF(a=0,'0i',REPLACE(IIF(a<1728,'',STR(a/1728)+'c') +IIF(a%1728<64,'',STR(a%1728/64)+'s') +IIF(a%64=0,'',STR(a%64)+'i'),' ',''))FROM t Line breaks for rea...

 
Hey Phoenix I see you are typing. Is that true?
 
0
A: Sandbox for Proposed Challenges

MD XFTriangularize a string code-golf ascii-art While working on a new 2-D triangular programming language last night, I ran into a spot of trouble trying to print a string in the form of a triangle. After a few hours of scribbled mathematical functions and messy algorithms, I figured it out, very fl...

 
@NewSandboxedPosts I feel like this is a dupe
 
And Business cat is typing
 
@BusinessCat Me too but I couldn't find one
 
4:23 PM
CMC: Ask user for input (can be a word, line, char, whatever), and output it again, however if the user doesn't give input for more than 10 seconds, stop waiting and end execution.
 
@BusinessCat Is it actually a dupe or does it just seem like one?
 
I remember seeing something like it
But I'm not sure if I can find it
It may have been another sandbox post...
 
0
A: Sandbox for Proposed Challenges

ShaggyIt's Hip to be Square! Meta Looking for feedback on the idea, initially, before writing up the details & test cases. Challenge Given an array of non-unique integers greater than 0 output a truthy value if every integer in the array is a square and the sum of those integers is also a s...

 
@Phoenix I don't actually know how to do it... it would require two threads imho, one to receive the input, and one to wait for 10 seconds
 
I’d like to comment Luis Mendo’s answer to the code golf challenge “How high can you count?” but I cannot comment. Need 50 reputation to do so, I’m new...
Any suggestion?
 
4:28 PM
You could ping him in here, he comes in every now and then
 
@LeakyNun It's easy in Processing with a graphical approach
 
Can you even do it in Python?
Can you terminate the input() function?
 
I'm confident it is possible.
 
Assumption: the user will Ctrl + C after 10 seconds
:P
 
how? The input() just waits for the input, and any code after it...
 
4:30 PM
does Python have threads?
 
I have this sketchy idea: Create thread A. A asks for input, Main waits 10 seconds. A will write it's input to a global variable, which Main can do things with, however after it's done waiting Main kills A.
 
3 mins ago, by Leaky Nun
@Phoenix I don't actually know how to do it... it would require two threads imho, one to receive the input, and one to wait for 10 seconds
I never dealt with threads though
 
I'm sure python has threads
 
yes, but I never used them
 
I'm trying to achieve this in C#, actually.
 
Anonymous
4:31 PM
@KritixiLithos Yes, but if you're using CPython, they're not going to help
 
0
Q: Create a mutual quine with brainf*** and one other language

PyRulezYou will create two programs, one in BF, and one in a language of your choice. The BF program, given empty input, will output the source code of the other program. The other program, given empty input, will input the source code of the BF. Keep in mind that the rules for quine programs apply: no...

 
@Mego Why not?
(CPython is the bog standard one right)
 
Anonymous
@Phoenix Global interpreter lock. Only one thread can be executing Python code at a time. Threads will work if you use a lot of native code, but otherwise multiprocessing is your best bet.
 
That's disappointing.
 
@Phoenix bash sleep 10 &;(read a;echo $a);wait;exit (if youre ok with printing other things)
 
4:33 PM
How does it work?
 
@Phoenix May we throw an error if nothing is input?
 
I am thinking of doing a KotH but can't decide if I want to have a bracket filled randomly or to have a round-robin
 
@Adám Sure
 
@Phoenix APL, 8 bytes: ⍞⊣⎕RTL←3
 
0
A: Sandbox for Proposed Challenges

ShaggyIt's Hip to be Square! code-golfmath Meta Looking for feedback on the idea, initially, before writing up the details & test cases. Is this a dupe? Tag suggestions? Challenge Given an array of non-unique integers greater than 0 output a truthy value if every integer in the...

 
4:35 PM
@BusinessCat ok thank you
@LuisMendo I cannot comment your answer to the code golf challenge “How high can you count?” but how about 0~:0 at line 10 instead of `@QQQQQQQQQ@@< and `@QQQQQQQQQQQQQQQQQQQQQQ@@< at line 23?
 
Anonymous
@Phoenix If you use another Python implementation (like IronPython, Jython, etc. but not PyPy), there's no GIL, so threads work fine.
 
Sandbox speed check: 12:36 EST
 
from _thread import*
from time import*
def a():
 while clock()<600:0
 interrupt_main()

start_new_thread(a,())
print(input())
This didn't work; after 10 seconds it is still waiting for input
 
Anonymous
The usual way of doing that involves signals
 
@Mego can you tell me what is wrong with my code?
 
Anonymous
4:37 PM
Well first off you shouldn't be using _thread - that's low level threading stuff. Use threading
 
@Mego I don't understand how to use threading.
 
Anonymous
I'm writing up an example, one minute
 
thanks
 
@Christopher I trhink you need to update your "I am Typing"
 
4:42 PM
@Phoenix Why?
 
It was spazzing out.
You kept blinking.
 
Anyone, is this a dupe?
0
A: Sandbox for Proposed Challenges

MD XFTriangularize a string code-golf ascii-art string While working on a new 2-D triangular programming language last night, I ran into a spot of trouble trying to print a string in the form of a triangle. After a few hours of scribbled mathematical functions and messy algorithms, I figured it out, ...

 
@Phoenix there's no update afaict
 
@Mego why is your repository still called "Seriously"?
 
@Phoenix huh that is odde
Can i get a review of ^ it looks clear and almost ready
 
Anonymous
4:48 PM
@LeakyNun Because the language was originally called Seriously. When I rewrote large parts of it and introduced backwards-incompatible changes, I called that v2 and named it Actually. Since Actually is the version being actively developed, it's the main branch, and Seriously is on the v1 branch.
 
@Mego why didn't you just create another repository?
I swear I'm going to call it resipotory some day by getting confused
 
Question: is there a button/icon you associate with both logging out and logging in?
 
@BusinessCat Dammit
 
@Phoenix I really like it. Please post on Main.
 
4:49 PM
@Downgoat why not have a button change its icon once you login/logout
 
Anonymous
@LeakyNun Because it's still the same language.
 
Just change the arrow to face both directions @Downgoat
 
Anonymous
Please make that unonebox
 
@KritixiLithos idk requests are async and it's quite a pain as I'd have to do a loading thing and all sorts off stuff with callback etc.
 
Anonymous
Thanks
 
4:50 PM
@Mego sorry
 
@JDoe Hello! Thanks for the idea. Unfortunately 0~:0 produces 1 and 0 separated by a newline. It would require post-pending something like vVXz or hVXz(concatenate, convert to string, remove spaces), but both v and h are already taken
 
@Mego How does one toggle oneboxing?
 
@Adám [image](image)
in my case, it doesn't onebox before I add an exclamation point
 
@Adám not posting pure links works too :P
 
so I just had to remove the exclamation point
 
Anonymous
4:51 PM
That or put some other text in the field
 
Apparently there's this one island in the Gulf of Guinea that is emitting as much CO2 as the entire continent of Australia
 
sheepville?
because sheep are evil
 
probably
 
@Mego It's been 13 minutes...
 
I think it's Sao Tome but don't see any island on map
 
Anonymous
4:52 PM
@LeakyNun I got busy. Patience.
 
how fast do you expect a penguin to type with only flippers? :P
 
-1
A: Sandbox for Proposed Challenges

ChristopherWelcome to Win the Challenge KotH. You need to win, (duh) or your code loses a byte in the order you specify. Errors are ignored unless they cause the program to not finish or crash. This is my setup: from multiprocessing import Process programAScore = <yourBytes> programBScore = <OtherBytes>...

 
@LuisMendo I thought newline is allowed.
 
@KritixiLithos :| you think flappers are bad?
 
@JDoe Only leading or trailing; not between digits
Congrats @StewieGriffin for your great-question gold badge!!
 
Anonymous
 
^^ Actually it's two gold badges for that question!!
 
@Mego how does it work?
 
Anonymous
@LeakyNun POSIX signals. signal.signal(signal.SIGALRM, handler) registers the callback function for SIGALRM. signal.alarm(60) registers a SIGALRM to be raised in 60 seconds. If input is given in under 60 seconds, the signal.alarm(0) call is reached, which disables the alarm. If not, the process is interrupted and handler is called.
 
@Mego oh, nice
 
@Dennis so I think I found a possible bug but the problem is I can't test it without another users help. The big problem is it involves a mod. Basically I think I can re-feature posts with just editing privileges. Are you willing to help me double check? All I need is a question on the meta to get the featured tag and then the featured tag be removed.
 
Anonymous
5:03 PM
I'm pretty sure rolling back the edit won't work, if that's what you're thinking
 
Anonymous
But if you need one to test, the Best of PPCG 2016 post used to be featured
 
@LeakyNun I thought it would ask me for confirmation (as my computer normally does when i click buttons) but just forget about it
 
@cairdcoinheringaahing alright
 
@Mego Thanks
 
Anonymous
Alternatively so did the Community Promotion Ads 2017 post
 
5:06 PM
Ok so you can't rollback to that. But you may be able to remove it.
 
So NobodyNada has set up the FireAlarm bot to catch low quality PPCG questions, what is everyone's opinion on having it run in here? It doesn't have any commands that would clog up chat and so far there have been very infrequent reports, so I'm not worried about it causing noise.
cc @Dennis
Sample report:
in SEBotics, 11 hours ago, by FireAlarm
[ FireAlarm-Swift ] [tag:c#] Potentially bad question C# window form inspect view link download @NobodyNada @quartata @Mego
 
Ok so my ideas didn't work thankfully I just had a error in my original test. CC Dennis
 
(and the stackapps post: stackapps.com/questions/7183/…)
 
Anonymous
@quartata I'm neutral right now. It doesn't seem to be doing a great job of catching low quality questions. I've been pinged a lot for valid questions.
 
Probably should make it clear for everyone else that getting pinged is opt-in
Most of the "valid" questions I've seen are ones worthy of attention anyways, usually unclear or duplicates
 
5:12 PM
@LuisMendo I took this “leading and trailing spaces and newlines etc. are allowed” literally. Maybe it was implicit that newlines are not allowed between digits but when it does not state it is not allowed, I tend to think it is
 
Is [a,b]=[0,1] faster or a,b=0,1 faster in Python?
 
@LeakyNun The later
List unpacking is slow
 
thanks
is [a,b]=c faster or a,b=c[0],c[1]?
 
Probably the latter too, but that I'd have to benchmark
 
Anonymous
a,b=c would be faster, I think
 
Anonymous
5:14 PM
Assuming that c only has 2 elements
 
@Mego does it work?
it does :o
 
Anonymous
 
we both used [0,1] as testcase :o
 
Anonymous
It's almost like I did that on purpose :P
 
whaaaat
 
Anonymous
5:15 PM
a,b=c[:2] should be fast and safe, but a,b=c[0],c[1] might be faster
 
Anonymous
@quartata Crazy, right?
 
@Mego can you test which one is faster?
 
Can you?
 
I'm not familiar with time
 
5:18 PM
@quartata thanks
a,b=c[0],c[1] is consistently faster than a,b=c[:2]
however, a,b=c is also consistently faster than both
 
Anonymous
timeit is a better option
 
That's what I linked
 
@Mego I used timeit
 
Anonymous
Oh ok, I didn't look at the whole link
 
5:23 PM
time python -c 'for i in range(100000):c=[0,1];a,b=c'
 
@Shog9 haha
 
5:40 PM
1
Q: Golf an Anagram Quine

Wheat WizardIn this question I asked you to guess an anagram quine based on its output. However it looks like we don't have a question asking to golf an anagram quine yet. So your task will be to make the shortest anagram quine that you can. What is an anagram quine? An anagram quine is a non empty progr...

 
@Mego is █ nCr intended to be used with floating points?
 
Anonymous
@LeakyNun Probably not
 
@Mego alright
 
6:11 PM
@LuisMendo thanks :) Looks like people enjoyed /enjoys it :)
 
@Shog9 When Shog9 comes in to tell you off O_O
 
Is [x for x in a] identical with list(a)?
 
It's identical to a, given a is a list.
 
@Phoenix that isn't what I'm asking
 
Question: what is most fast algorithm to find 10 smallest item in unsorted array
(array is not sortable too)
 
6:24 PM
array guaranteed to have 10 smallest items?
array contains distinct items?
 
0
Q: Can an language invented before a challenge was posted be used to answer the challenge if it lacked an interpreter at the time?

GryphonSay I invent a language, post a list of commands and general structure on GitHub, and then begin working on the interpreter. After finishing the interpreter, could I use this language to answer challenges posted before the interpreter was completed?

 
You can just use 10 pointers and scan through the array, which should give you an O(n) algorithm
 
@LeakyNun Wouldn't that be O(n*10)? (maybe that's the same, I don't really know big O notation)
 
@LeakyNun Going through the array, finding the minimum, recording it, removing from original, and repeating 9 more times is still O(n).
 
O(10n) = O(n)
 
6:27 PM
@Phoenix somehow I feel like using 10 pointers is faster
 
O(x*...) = O(...)
 
That's kind of what I thought, but I wasn't sure...
 
@LeakyNun Well, not by much, Instead of updating 10 pointers one after another you're updating them together, but you're still performing N operations on 10 pointers.
 
@Phoenix you're right
 
CMC: output all metro stops in continental US in JSON or KML format
 
6:33 PM
OK, so since O(n) is obviously the optimal limit on a theoretical level, I'll look at it practically: keeping an array of the 10 smallest items in order would probably be fastest, since worst case is 10*N comparisons if the array is in reverse sorted order, but if an item is larger than the current max it'd only require one comparison
 
Something something Mathematica
 
idk if pointers would be faster than an array though
 
an array is just a list of pointers
 
@Downgoat At a given time?
 
would be best if you grab live data but you can also hard code
 
6:37 PM
@Downgoat Why specifically continental US? (Dyalog APL comes with Europe's built-in!)
 
:O that is even bettter
but O____O is Dyalog APL mathematica confirm???
 
In computer science, partial sorting is a relaxed variant of the sorting problem. Total sorting is the problem of returning a list of items such that its elements all appear in order, while partial sorting is returning a list of the k smallest (or k largest) elements in order. The other elements (above the k smallest ones) may also be stored, as in an in-place partial sort, or may be discarded, which is common in streaming partial sorts. A common practical example of partial sorting is computing the "Top 100" of some list. In terms of indices, in a partially sorted list, for every index i from...
 
@Downgoat Usually not, but you just happen to have chosen one data set it does come with.
 
.____.
 
Pls support my campaign
0
Q: Code Golf Redesign

MD XFAbout a year ago, Programming Puzzles and Code Golf Stack Exchange graduated. Now, from what I can tell, most graduated sites (e.g. Code Review, Photography, Unix & Linux, etc) have customized backgrounds and designs. However, PPCG does not. Some of the more devoted users have created a Userscr...

 
6:40 PM
> " and you'd be better suited with MinGW and an IDE like Code::Blocks or NetBeans."- @Mego the great
How to install that ?
 
@AlexKChen The correct IDE is Jetbrains Clion
 
@Phoenix Basically, what I can do on any computer on C, I can do it in that IDE ?
(For visualization, simultaion of physics)
 
> The userscript is good for now, but as an active PPCG user, I would much rather have a professional design from SE staff.
:(
 
:-(
 
@Phoenix ?
 
6:43 PM
I no longer understand the question.
 
@Downgoat Oh come on. Your usercript is awesome, but of course an SE design would be better.
Maybe elements could be similar
 
opls like SE userscript would have upgoat and downgoat voting icon
 
28 mins ago, by Leaky Nun
Is [x for x in a] identical with list(a)?
 
I mean I am an absolute newbie to coding, and I am learning C basically for visualizing and simulating physics stuff, and I am learning it from K&R. Like python IDLE, is running the code on the IDE sufficient to do all stuff ? @Phoenix
 
0
Q: Code Golf Redesign

MD XFAbout a year ago, Programming Puzzles and Code Golf Stack Exchange graduated. Now, from what I can tell, most graduated sites (e.g. Code Review, Photography, Unix & Linux, etc) have customized backgrounds and designs. However, PPCG does not. Some of the more devoted users have created a Userscr...

 
6:46 PM
@Phoenix ?
 
@AlexKChen The IDE just organizes your code files and adds a shiny "run" button.
It's not running your code in a different way from the command line.
 
@quartata Our question volume is pretty low. I'm not sure this adds anything over NewMainPosts; off-topic questions are closed almost instantly when it announces them in chat.
 
I actually don't have a clear idea what IDE is. Is it like python IDLE ? Or would I have to code somewhere else @Phoenix
 
@AlexKChen It's a magic program that gives things like syntax highliting, organizing your files, checking you code for syntax errors, etc.
@AlexKChen Python IDE
Look at the screenshots and such
 
So would I have to install a separate stuff for coding ? Or just typing in the IDE is sufficinet ?
 
6:50 PM
@AlexKChen Well, on Windows you would need to install a C compiler, probably MinGW
This is relatively complicated for someone just starting to code.
 
Yeah. Well, very much yeah.
 
Visual Studio comes with a C compiler, so it might be easier.
Despite what people might tell you about it, Visual Studio is very usable, and the community edition is free.
 
35 mins ago, by Leaky Nun
Is [x for x in a] identical with list(a)?
 
I have heard VS is oe'rkill, and too o'erkill for a beginner, and too too o'er kill for an ultra beginner.
 
@Dennis do you have any idea?
 
6:51 PM
i asked a SO admin, they say we'll get a design in 6 to 8 weeks
 
@Phoenix I have installed VS studio today. Does it have all the functionality of C ?
 
@AlexKChen The entire VS install is like 100 GB or so, so it comes as a ton of optional components. Try making a new project and see if "Visual C++" is one of the options.
 
@Mego why does "median" not sort before picking the middle element(s)?
 
@Phoenix Where to begin now (See the above picture) ?
 
6:54 PM
@AlexKChen Create new project...
 
@Phoenix 100? That doesn't sound right. My install was like 8 GB
 
@DJMcMayhem Because you didn't install every single optional component
I think mine is 50~ GB
@AlexKChen Any code written for C will work in C++, so you'll be creating a Visual C++ project, even if you only put C in it.
 
@LeakyNun I think so, but I'm not sure. Why do you ask?
 
@Dennis because I'm planning to replace, in some file, all occurrences of the first one with the second one
 
You seem smart, people ask you questions.
 
6:59 PM
because the second one is faster than the first one
 

« first day (2321 days earlier)      last day (2521 days later) »