« first day (748 days earlier)      last day (4216 days later) » 

3:00 PM
6 hours sealed is nothing
 
@Ell is the bacon expensive?
 
Ell
Nah not expensive
 
@Ell then, just throw it away. health is important
 
user142019
FUCK YEAH
 
I think people tend to forget refrigerators didn't always exist.
 
user142019
3:02 PM
We’re eating pizza today.
 
Can I call subprocess.call and have it be non blocking?
 
user142019
@Ell it’s worth it.
 
user142019
You won’t die.
 
I don't want it to wait for my process to finish
 
user142019
0
Q: python subprocess non-blocking and returning output

Romeo M.I know this has been asked a lot of times but I've yet to find a proper way of doing this. If I want to run a local command the docs say I have to use subprocess as it's replacing all other methods such as os.system/peopen etc. If I call subprocess.Popen(command, shell=True, stdout=subprocess.PI...

 
user142019
3:03 PM
But Tony.
 
user142019
> Do not use stdout=PIPE or stderr=PIPE with this function. As the pipes are not being read in the current process, the child process may block if it generates enough output to a pipe to fill up the OS pipe buffer.
 
user142019
So nevermind. Let me find something else.
 
6
Q: In python, how can I do a non-blocking system call?

Ross RogersIn Python, is it possible to do a non-blocking system call without forking off a thread? i.e., can I avoid: import thread thread.start_new_thread(os.system,('cmd',))

there's this
but I don't know what that answer means
 
user142019
@TonyTheLion you use subprocess.call and set stdout and stderr to /dev/null. Give me a second.
 
Ell
wttfff why do I get 404!?
 
3:06 PM
@Ell Because the page was not found!!!
 
user142019
with open('/dev/null', 'w') as f:
    subprocess.call(['echo', 'foo', 'bar'], stdout=f, stderr=f)
 
Ell
but it's found perfectly well in the browser :/
 
@Zoidberg'-- I'm on windows
 
user142019
@TonyTheLion ^that should work. I don’t know what the equivalent of /dev/null is on Windows, though.
 
I heard Python sucks with threads.
 
3:08 PM
no /dev/null/
 
user142019
Try NUL instead of /dev/null
 
@Zoidberg'-- depends on the abstraction level, but generally just nul
 
that doesn't seem to work
 
@EtiennedeMartel I heard python sucks
you heard it here first :p
 
user142019
@TonyTheLion subprocess.Popen(['sleep', '10']) works.
 
3:11 PM
problem is, I need to open the process, and just before or after I copy something to the clipboard, I need access to whatever was copied to the clipboard WHILE that process is running. Unfortunately, it only gives me access after the process has terminated
 
user142019
It doesn’t block.
 
There's an entire question on programmers.se dedicated to the cons of python
 
user142019
@TonyTheLion beware of race conditions.
 
119
Q: What are the drawbacks of Python?

RookPython seems all the rage these days, and not undeservingly - for it is truly a language with which one almost enjoys being given a new problem to solve. But, as a wise man once said (calling him a wise man only because I've no idea as to who actually said it; not sure whether he was that wise at...

 
user142019
@TonyTheLion It was os.popen that was deprecated, not subprocess.Popen. I’m sorry. /cc @Abyx
 
3:13 PM
with subprocess.popen it works
it doesn't block on that call
:)
 
user142019
Note that stdout and stderr are inherited.
 
meaning?
 
user142019
So if the child process outputs anything, it will show up in the parent process’ output.
 
user142019
This may not be what you want since the output could get mixed.
 
@melak47 Well, @Cat likes Python, so it obviously has some weird quirks that require lots of time to get used to.
 
user142019
3:15 PM
@TonyTheLion You may get output like “hellwoo rld”.
 
@Zoidberg'-- doesn't matter. The child process is something not relevant to my script. I just need it to start it and forget about it
 
user142019
Oh okay.
 
user142019
Then use subprocess.Popen.
 
it's just cause I'm too lazy to go and open that process myself every time
 
I just like the fact it has such a large library. Don't think I would care otherwise, I mean yeah it's pretty but it isn't a deciding factor for me to like a language.
 
user142019
3:16 PM
I’m not sure what happens when the parent process dies.
 
so I get the script to do it
@Zoidberg'-- child continues running
from what I see here
 
user142019
Okay. Cool.
 
@EtiennedeMartel it does. and also in other ways. google created go (?) to replace python for their web stuff
but very nice language for just Doing Stuff(TM)
 
user142019
Python is made by a Dutch person so you must be Dutch to be able to use it.
 
? I thought that was fixed in 2.5
 
3:17 PM
Go is a compiled, garbage-collected, concurrent programming language developed by Google Inc. The initial design of Go was started in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. Go was officially announced in November 2009. In May 2010, Rob Pike publicly stated that Go was being used "for real stuff" at Google. Go's "gc" compiler targets the Linux, Mac OS X, FreeBSD, OpenBSD, Plan 9, and Microsoft Windows operating systems and the i386, amd64, and ARM processor architectures. Goals Go aims to provide the efficiency of a statically typed compiled language with the e...
 
argh
 
Guido works for Google.
 
why didn't I commit properly :(
 
user142019
If you import this in Python, it tells (among other things):
 
@Zoidberg'-- Do you also need to understand Dutch? Because that language is ridiculous.
 
3:17 PM
@DeadMG did you ever take up committing?
 
user142019
There should be one—and preferably only one—obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
 
@sehe Yep. But I made a commit that was too large.
 
user142019
@EtiennedeMartel You have never seen French.
 
well, I just plain fucked it up
committed code that didn't build
 
@Zoidberg'-- well yes there's also the xkcd reference
 
3:18 PM
probably because I was moving location and needed to commit
 
user142019
@Cheersandhth.-Alf import antigravity.
 
@Zoidberg'-- That's ironic.
 
user142019
import antigravity in Python opens the xkcd comic in your web browser.
 
@Zoidberg'-- Really?
 
user142019
French is the most terrible non-programming language I’ve ever seen/heard.
 
3:19 PM
but fortunately I can just merge in the changes I wanted to keep
 
user142019
I can’t understand why people think it’s beautiful.
 
Dec 26 '11 at 23:38, by DeadMG
and then my code goes and commits suicide anyway
Dec 21 '11 at 11:06, by DeadMG
I committed, then I pushed, then I came home and pulled, and I was like, WTF is this
2
 
@Zoidberg'-- It is, but the main problem is that most people who speak it live in France, which means they're assholes.
3
 
lol
 
user142019
@EtiennedeMartel Ik noem ze paupers.
 
3:20 PM
French is ugly.
 
@Zoidberg'-- But he won't understand
 
(Fun fact: you stop being an asshole once you leave France)
3
 
user142019
(Fun fact: you still don’t learn English once you leave France.)
 
My experience with numerous French colleagues and friends says otherwise.
 
user142019
Flanders would be the best country to live in if it were a country.
 
user142019
3:22 PM
Stupid Wallonia. Paupers.
 
@Zoidberg'-- The only issue is the Taxes you pay are insanely high
one of the reasons I left
 
user142019
I want to live in Amedica.
 
I don't know such a place
 
user142019
 
@Zoidberg'-- where are you now?
 
user142019
3:25 PM
@Triumphant The country of the wooden shoes, weed tulips and mills.
 
Ell
I want to go to holland
 
@Zoidberg'-- sounds wonderful place
 
user142019
I have been in many countries and The Netherlands was the only one where flowers in flower shops didn’t look sad.
 
user142019
You’re allowed to have five weed plants per person, as long as you’re 18 or older and you don’t use a lamp to increase their growing speed.
 
Ell
do you smoke weed?
 
user142019
3:29 PM
No.
 
Ell
grrr stupid thing! why does it work in irb but not real ruby!?
 
user142019
@Ell Sounds like PayPal. The sandbox is different from the real API, and neither the sandbox nor the real API conforms to the documentation.
 
ah, it's 11:30 pm, i have to go to bed. It's Staturday tomorrow. I love Staturday. haa.... Bye, guys!
 
Ell
how can the server possible tell the difference between irb and ruby!?
 
user142019
@Ell ?
 
user142019
3:32 PM
There is probably something like is_irb anyway.
 
Ell
but I mean, irb is acting like a client requesting web pages
 
user142019
User-Agent header?
 
@TonyTheLion Amedica is where all the personal injury lawyers come from, a bit like Aloania, where the PPI lawyers are born and raised.
 
Ell
I can get the web page via browser, and can get it via irb, but not when running in a ruby script.
and I've tried user agent, doesn't change anything :/
 
user142019
Check what the server returns.
 
Ell
3:34 PM
I'm installing wireshark now :3
 
hmmm
half of my units appear to have declined to exist.
this I find problematic
oh, I spawned them beneath the map
whoops
 
@DeadMG o.O What game let's you spawn units beneath the map?
 
the one I coded
 
what a strange feature
 
not really
it spawns units where I tell it to spawn units :P
@Mysticial: you here?
 
3:51 PM
@DeadMG kinda. Playing TF2 but I can still see the chat window
 
ok
I'll catch you sometime later then
 
@Mysticial fancy seeing you here.
Btw, I'm getting close. You're next :P
 
@LuchianGrigore ?
 
3:54 PM
@DeadMG If it's short, I can probably answer while I'm waiting to spawn.
Oh god...
 
was just thinking about doing some more SSE optimization
 
...why?
 
and I have _mm_load1_ps(&float)
 
@LuchianGrigore Like seriously... how in the world am I supposed to stay ahead of you? You have freaking 1k this month and have been averaging 800+ in the last few months.
 
I figure it wouldn't be any faster to extract the float into a 16byte value first (cached: i.e., free), and then do a normal load?
 
3:55 PM
@LuchianGrigore Hm, I only have 127 answers in that tag.
 
@Mysticial repwhoremore
 
I'd need to hit a +500 every single month and maintain enough residuals to repcap every single day...
 
user142019
Locked Up Abroad is awesome.
 
user142019
Seeing criminals getting pwnt.
 
Just saw Looper.
 
4:00 PM
Hey, it's youuuuuu.
 
Why yes it's me.
In the meantime I found an answer to my question about explicit interfaces.
Also hi.
 
user142019
@KonradRudolph rolln
 
user142019
pitchn
 
quaternions are better.
 
4:07 PM
So many puns.
 
I can't bear this anymore.
 
http://ideone.com/Dx3xlS
I'm starting to like this boost::phoenix & template combination :)
 
Pascal case, oh my.
 
Haters gonna hate
 
@Borgleader I hope this is done using iterators and that this Where function does not clone the whole thing.
 
4:10 PM
@EtiennedeMartel Where returns a new container with only the items for which the boolean predicate returns true.
Just like in C# (afaik)
I'm trying to model C# LINQ
(From clones the whole thing however)
 
@Borgleader Most of LINQ is lazy-evaluated. Where does not return a container, it returns an iterator.
 
Ell
ugh android is weird
 
@EtiennedeMartel Wouldn't that cause problems though? Like... var a = odd.Where(x => x > 3); /* Change odd */ /* Doing something with a */
Anyway, I'm off class is over.
 
@Borgleader Why would it? The sequence is evaluated only when you call GetEnumerator() (which means foreach or one of LINQ's function that doesn't return an IEnumerable<T>).
 
4:14 PM
@VinayakGarg oh, I have no doubt it's a bug, I only just got it to compile
 
LINQ stores sequences of operations to execute, not the result of those operations.
 
@Borgleader It can cause curious problems.
for example, if your operations throw, the exception will be delayed until evaluation
 
The advantages are far greater than the drawbacks, though.
But, yes, it means you have to be aware it's lazy before you can use them properly.
 
4:30 PM
fuck
I implemented a nice cache of a bunch of SSE operations, but it doesn't seem to have done jack shit
 
@DeadMG overhead == savings?
 
not sure where overhead would come from, I just took some operations and cached their results
 
@DeadMG Did you profile your stuff before deciding that this was the issue?
 
@EtiennedeMartel Yeah, I know that this function is the hot path.
 
Hot path? Is that a path featuring me?
(Damn, that sucked)
 
4:34 PM
lol
why yes, it did :P
 
how can I open a file (.txt) with Python and read each line into a list with a lambda?
 
sec
 
@TonyTheLion what do you mean with a lambda?
 
open(filename, "r").read().split("\n") gives file as a list of lines.
 
lol, there's readlines
 
4:39 PM
@DeadMG you should use the with statement
 
nah I just didn't close any of the filehandles :P
 
@VinayakGarg wait, the input AA is a valid input that evaluates to the number 0, but All your arrays are 1-based? That's evil and confusing :< Oh well. I should have read the instructions more carefully
 
hmm
I have a sneaking suspicion that I may need a concurrently mutable octree.
the VS profiler gives very different performance results to AMD's CodeAnalyst and suggests a completely different performance culprit
 
@Cicada ...
At least it has an appropriate title.
 
4:52 PM
I blame it on the German.
 
You just can't trust them.
 
5:06 PM
hmm
thank you so much VS profiler
run the profiler -> "No data collected."
 
Xeo
So @DeadMG, how did that question come up?
 
just thinking is all
I think that it's a defect
I think that an implementation should be free to choose some other allocator
 
Xeo
Why? The default global operator new can just delegate to some other allocator.
 
no it can't
because ::operator new(size) loses static type and size information
 
Xeo
Ah, I see.
 
5:13 PM
for example, I might decide that I need to call a different allocator because I know that T holds SSE types which need extra alignment
 
And T::operator new(size) ?
 
what?
 
You can overload new for each type, right?
 
@EtiennedeMartel There seems to be lazy evaluation built into phoenix. I might be able to use that to delay evaluation. I was thinking of keeping only the begin & end iterators of the input container instead of copying everything right away. I'll see though, this is an exercise in learning not me trying to make the best shit ever.
 
@Cicada yes
 
user142019
5:20 PM
Pain receptors y u exist.
 
cause natural selekshun
 
@Cicada Yep.
 
user142019
@Cicada Nope.
 
Ell
anyone here do android?
 
@DeadMG Then why can't you do that? Or am I misunderstanding something
 
user142019
5:22 PM
You cannot overload new for void.
 
it's not about what I can do
 
user142019
So not for each type.
 
it's about what the implementation can do
 
user142019
@Ell you.
 
@Zoidberg'-- Read: "you can overload new for your very own sse optimized types"
 
user142019
5:24 PM
 
the Standard provides a means to replace ::operator new and ::operator delete globally, right?
 
@Zoidberg'-- I wasn't sure you were nitpicking on purpose of trolling or technical accuracy. Noted.
 
Uh... I read something about that but I always confuse the new operator and operator new -.-;
 
@DeadMG Yes, AFAIK
 
does GCC come with a pool allocator of some sort?
or, libstdC++ or whatever
I don't even know what my library is
or how to check :/
 
5:31 PM
 
@casperOne: I had no problem understanding the question (see my answer). It is a simple, concrete question with very concrete answer. Please in the future don't close questions that you don't understand, especially when the question that you're considering already has been reasonably answered. — Cheers and hth. - Alf 21 secs ago
oh gosh, i got the "arrays" badge. stackoverflow.com/badges/300/arrays?userid=464581
 
@Cheersandhth.-Alf huh, my 4th biggest tag is "arrays". Interesting
 
hm, now he removed his closing of the question, and converted my answer to a comment
0
Q: win32 API open a jpg in a picture control c++

Lorenzoi want to know if there's a way to print a jpg onto a picture control rectangle (that i build with ResEdit) the action that should print the image is case IDC_BUTTON1: and the target i want to view the image is in a picture control with the id: IDC_STATIC BOOL CALLBACK AppDlgProc(HWND hDlg, UIN...

a bit heavy handed i think
 
I ate my weight in sandwiches. I feel bloated.
 
5:50 PM
@MooingDuck why don't you transfer all the codepostings you have in your profile to bitbucket/github?
 
today scanf("%d %d %d",&l,&r,&c) is returning 2 when I give it "9 2 10"
@bamboon Why would I, and I don't have accounts for either
 
@MooingDuck because it makes sharing and working on them way easier? you have an account in like 2 mins
 
@bamboon I don't see how its easier to share than ideone.com/awrmK, I don't see how it could be easier than clicking an edit button, and I don't see the need to have yet another account, or learn yet another system.
@bamboon besides, ideone executes my code, which is important for tests
heh, I'm still proud of my fibonacci code. I don't known why. Probably because it's hard to read
 

« first day (748 days earlier)      last day (4216 days later) »