« first day (636 days earlier)      last day (4314 days later) » 

11:00 PM
^ bin it
 
@DeadMG Coulda written something far worse, but I didn't.
 
Ell
who wants a hug party?
 
@refp I think he called my mother a whore once.
 
@FredOverflow ANIMATED GIF
 
@Ell You.
 
11:00 PM
I'll hug you to death.
 
Yeah, no animated gifs in the Lounge, plix
 
Ell
<3
 
@ScottW It was 'Resolved'. So it must have been a real question :)
 
Ell
@stackedcrooked <3
 
I just fixed some UX-related stuff in my text editor, but I forgot what I was going to do next.
 
11:01 PM
@Insilico Eh. I think it's worth knowing that that stuff isUB.
 
@DeadMG The only thing freshmen should know is to write code that doesn't take more than 0.5 seconds to know what it does. :-P (among other things)
 
@FredOverflow he probably didn't know the difference between the two.. if you are brought up by a mother who is also a whore, how are you supposed to know that not all mothers are whores? it's not like you walk around asking people "hey, is your mother a prostitute?" that would be rude.
 
Oh yeah, manual indentation.
 
eh.
calling your mother a whore is just a bad habit I picked up from some rather rude friends I once had
usually happens if I'm bored/sleepy/both
I say "flump" now instead.
 
@DeadMG that'd be us
@DeadMG fluggleshlubble
 
11:03 PM
kek
 
May 25 at 23:23, by DeadMG
@sehe I fucked your mother like a whore and at the end she said "woof woof"
May 21 at 10:21, by DeadMG
I'mma run your mother up my flagpole
Jan 8 at 22:36, by DeadMG
the parable of me sticking my dick up your mother's ass
 
@FredOverflow lol wtf?
 
Hm, apparently he didn't call my mother a whore. Oh well.
 
Should I make my Python editor work with code that has spaces and tabs mixed?
 
oh that
well, if you make me say "woof", I'mma make you pay for it
 
11:05 PM
@RadekSlupik Depends on how well you handle mixed tabs and spaces, whatever that means.
 
May 25 at 11:07, by DeadMG
@FredOverflow So's calling your mum a whore, but that doesn't make doing it less fun
Ah, there we go.
 
@Insilico Well, I mean mixing tabs and spaces for indentation, so you have space space tab space tab space or something (i.e. you're an idiot).
 
tabs followed by spaces is usually fine
 
Hmm I'm going to use GitHub Issues for my project as a todo list. :P
 
@RadekSlupik So make a text editor that screws up the indentation when you detect stupid usage of tabs and spaces. :-P
 
11:06 PM
:set expandtab, please
 
Tabs are highly unpythonic, though.
 
Is memegenerator down for you as well?
 
@RadekSlupik Perhaps convert tabs to spaces on the fly?
 
@FredOverflow quickmeme.com
@Insilico That is a possibility (and probably the best option).
 
make everyone use vim instead of writing your own editor, much bettah!
convert tabs to spaces on the fly -> :set expandtab (vim, if you didn't get the reference earlier)
 
11:08 PM
hmmm
to offer --begin and ++end functions?
potentially unsafe, but kinda helpful in some situations
 
@refp emacs*
 
@DeadMG I vote no
 
@DeadMG incrementing past the one-element-after-real-end?
 
@refp Useful for subranges. I guess.
 
@DeadMG is it?
 
11:09 PM
@DeadMG hmm.. could you come up with an example?
I can't see where it would be useful
 
well, the mainthing is that if you don't have them, you can only narrow the range of a range, you can't extend it.
necessitating some copies where they may not otherwise be necessary
 
but a subrange's end iterator isn't the real end of the host container, so there is no real ++end, just a ++it where it happens to be at the end of your sub range?
 
@refp Right. But the range doesn't know that.
 
@RadekSlupik Can I hotlink images? I only get a 1x1 pixel GIF if I try...
 
I might ask on SO
 
11:12 PM
@DeadMG no, but it doesn't need to.. and if it knows that it can extend the range, it also know that it's not the real and.. and therefore, well; no ++end, that's what I vote.
 
@FredOverflow there is a two/three pixel margin on the top that's not covered by the gif (at least in Safari)
 
I think you'd need a broader experience
 
@DeadMG please provide a proper example of when it's useful, because I still can't see it to be honest :-/
 
me neither
well
 
Ugh. This post just pissed me off.
1
A: How to find and replace line in a file in Unix?

DriseTry sed -i.backup -e 's/abcd=.*/abcd=9999/' filename.txt Example in filename.txt abcd=123 abcd=15652 Output as expected: abcd=9999 abcd=9999

 
Ell
11:13 PM
leave it out until you need it?
 
easier to add it in later than take out, huh
 
wait what? trollin' much?
 
@DeadMG I think programmers would fit better
 
@FredOverflow Also suppress the GIF with AdBlock. :)
 
Ell
the first version will never get everything right
 
11:14 PM
@Drise linux!=UNIX sed -i is GNU extension :)
 
@RadekSlupik I just looked at the page source, also worked :)
 
well
 
Stupid GNU software always with their extensions.
 
I guess it's because I conflated the ideas of "current" and "begin".
 
11:15 PM
You are interested in C?
 
@sehe OP was also using sed -i earlier
 
"begin" and "end" should not be mutable.
 
@sehe just what I was about to write, or well.. I thought they were FreeBSD extensions to be honest
 
the current should be mutable.
 
@MooingDuck oh splendid, then I don't know what's happening :)
 
11:15 PM
@sehe Oh shit. What's the proper solution then? It's still sed right?
 
lol pydoc server opens XKCD when I view the documentation of the antigravity module.
Pydoc y u execute modules.
 
@sehe OP edited an "answer" into the question earlier, which was almost identical to Drise's answer, except also had another flag. Now he's saying Drise's answer doesn't work
 
@Drise yeah, but not inplace. You could perl -i instead, I gues
 
@Drise simply make a note that your sed is the linux sed using a GNU extension, and not the UNIX sed.
 
so
incrementable ranges only have current and end.
 
11:17 PM
@MooingDuck 'the UNIX sed' being non-existant. It would be 'outside the POSIX requirements'
 
@RadekSlupik that might actually be what the doc is suppsosed to do...
 
forward ranges, begin, current, end.
 
@sehe I never knew there was a difference. Whatever, the kid found his solution, and has probably forgotten about the question anyway
 
@sehe I use windows
 
naw
 
11:18 PM
@Drise You'll find out reaaaaaaally quickly qwhen you do AIX, HP/UX, True64 for a day. That sucks. Oh, and Solaris
 
does anyone know what @DeadMG is talking about, really?
 
Most all of them have 'homebrew' type solutions for a GNU userland, though
 
Alrighty, see yall later.
 
@sehe throw in mac os x in that mix and it's settled.
 
Ell
@repf not really, but I pretend to
 
11:18 PM
@MooingDuck Well, congrats :)
 
@refp if you should be allowed to increment iterators ouside of a subrange.
 
I have some code that recursively scans a directory structure for image files (.jpg, .jpeg, etc.). It operates in a worker thread. It's uses callbacks to notify if a file was found. Using post-messages I can make them arrive in the GUI on the main thread. However, the callbacks are coming too fast and are flooding my message loop. -- A day in the life of a developer.
 
@refp Does it not use the GNU userland? Ah, BSD of course.
 
@StackedCrooked Sounds like the task is not really suitable for offloading?
 
@StackedCrooked make the message loop quickly add them to a queue, then process the queue at your own speed
 
11:19 PM
@StackedCrooked Throttle them... Queue them till say 50 or 100 in the thread, before posting a message
@DeadMG ? Sounds like the feedback is too finegrained
 
@sehe That's what I'm working on right now.
@DeadMG I don't really understand what you mean with offloading?
 
@MooingDuck maybe I'm confusing the terms, but a subrange is located inside a larger range.. and therefore the end isn't really the end, and if you are certain of his fact; you should be allowed to increment it further, beyond the subrange end but inside the containing range
 
moving the work to another thread
 
@sehe I'm gonna throttle with time intervals though.
 
@StackedCrooked The simplest solution is to throttle updates (let the 'observer' determince pace) but you sort-of implied that the sheer callback overload was dominating the runtime, no?
 
11:20 PM
@DeadMG I just don't want to freeze the gui.
 
@refp sure, you can execute that without breaking anything, but should you be allowed to? If I give a function a range, I want it to stay the frick in the range.
 
@StackedCrooked Sure, but concurrency has it's costs, too. There's no point offloading the work if it doesn't actually take very long.
 
@sehe The thing is that throttling 50 can still flood the stack but you don't know in advance.
 
@DeadMG doesn't make sense at all. It is perfect for offloading. Just make sure that the update protocol doesn't drag the performance down. It's a design issue
 
@DeadMG It's all about the seamless user experience man.
I want my app to ride like a rolls royce.
 
11:22 PM
@StackedCrooked As long as you can handle 50 quickly enough to avoid them queueing up...
 
what do you do with these files once you find them?
 
incrementing passed the end of a container iterator from the STL is **undefined behavior**, if the function cannot guarantee that there is more after the range.. isn't that enough to say that you shouldn't?

must everything that shouldn't be done actually be impossible to do?
 
@MooingDuck Right, but that's not really what I was thinking.
 
I shouldn't jump out my window (according to myself) since I'm a few floors up, but that doesn't make me lock the window.. nor remove it and replace it with a wall everytime I get close to it
 
@refp we're not talking about containers in the STL, The STL in general, or even C++.
 
11:23 PM
imagine, for example, that you are given a range, and you peek at the last element by decrementing the end and then de-referencing the result.
 
Ell
what is it to "flood"the message queue?
 
like quicksort can do something like this for some pivot selection algorithms, I think.
 
@MooingDuck oh, I assumed since this is Lounge<C++> that you were talking about iterators.. well then, if you are just discussing theory you shouldn't be allowed to go past the end, since there really shouldn't be anything there
 
@Ell fill it faster than it empties, until it explodes
 
and then you just want to go back#
so you know in advance that it's valid because you just decremented the end yourself.
 
11:24 PM
@refp he claims to know it's a subrange though
 
Ell
@mooingduck what actually happens? running out of ram seems unlikely
 
@StackedCrooked Can you not perform the necessary work on each filename in parallel?
 
@MooingDuck if I give you three numbers in sequential order ending with 5, and you know that I have 1-4 and 6-10 left in my hand.. that doesn't mean that you should/can access them
 
@Ell I speculate that Windows has a maximum depth on the message pump, and when a process isn't reading them fast enough, it will take some sort of action (crash the process?)
 
if I wanted you to access them I would have given 'em to you when you asked for a range
 
11:26 PM
@refp No, that's not what I mean.
 
then I'm all confused..
 
I mean, consider that you just decremented the end yourself to peek at the last element, say.
 
@Ell if there's no limit, then the program just becomes "laggy" until it either finishes or runs out of RAM
 
so you created the subrange in question from the original argument.
 
@MooingDuck what have windows message queues got to do with it? Does Qt use native message handlers?
 
11:26 PM
opsie btw, that example just didn't make sense in terms of numbers in my and his hand.. sorry @MooingDuck
 
@sehe No other way to get messages out of Windows.
 
@DeadMG of course you should be able to increment it back..
 
Ell
ahh I'm falling asleep
can't stay awake any longer. night
 
if you were allowed to be there before, then you should be allowed to go back to that spot
 
Ell
7Zzz
 
11:27 PM
right
 
@sehe I speculated on what the most common system might do. I have no idea what any system (including windows) might do.
 
@DeadMG Windows has semamphores just fine. And condition variables (MRE,SRE) and the whole shebang
 
but I can't verify whatsoever that thiswas the case.
 
the case in... ?
 
@sehe Don't think you can get mouse activity out of those.
@refp Anything.
any arbitrary piece of code XYZ.
 
11:28 PM
I'm not a big fan of massive discussions regarding nothing/anything, so I'll drop out of this conversation.. @DeadMG @MooingDuck
 
@DeadMG Huh. @StackedCrooked was talking about a worker thread that traverses directories and reports back files when found. That is not mouse movement.
If mouse movent floods the message stack, slow down the fucking mouse! (Or use a decent OS)
 
@sehe right
well, the obvious solution is to use an unbounded queue, I guess.
 
It's not mouse movent. It's any form of interaction with the window. Resizing etc..
 
@DeadMG That could work. Likely, he'll just want to update progress once in so-many files
@StackedCrooked I thought you implied the queue overload was being caused by the directory traversal worker
 
@sehe Yes I was.
So the other UI events don't get a chance to be processed.
 
11:31 PM
Ok, clear then
 
well, you need to have two separate queues then.
 
@StackedCrooked Another solution is to not reuse the same queue, or to use a priority queue. But I'm pretty sure that Qt doesn't like either of those ideas?
 
@sehe Hm.. I'm not sure how that would work.
 
create two queues. normal UI events go in one, directory results go in another, process first queue to completion, process up to N results from second, each frame.
tweak N to be some acceptable number
 
11:33 PM
@DeadMG Game programming much? Thinking in frames
 
@EtiennedeMartel faeces
@sehe All rendering stacks think in frames.
 
@DeadMG Nah, it's a sound me and my coworkers like to do some times.
Such as when I fire my flare gun at TF2.
 
It's basically like Picasa. It scans your hard drive and the images appear on the screen as they are found.
 
It's slightly higher pitched than "poop".
 
@EtiennedeMartel Slightly more sophisticated as well.
 
11:35 PM
Yeah.
 
@StackedCrooked Does that mean that you load each image that is found?
 
@DeadMG Yeah.
I don't load it. I'm currently only listing it as a string.
 
could you use the worker threads to do the work on each result, rather than pushing it back to the UI thread?
 
@DeadMG it's not a rendering stack, it's a GUI framework.
 
so what's taking so long? I mean listing it can't be an expensive operation.
 
11:37 PM
The UI isn't really doing any work. It's only monitoring the progress.
 
@sehe Which is a rendering stack that has events in it.
 
An other approach would be to ditch callbacks and use a pull-based system.
Just a timer that refreshes the GUI every 200 ms or so.
 
@StackedCrooked Basically equivalent to the "use-two-queues" approach.
 
@StackedCrooked That's sane anyway. Decouple presentation from the operations. Do the operations on a model, make the presentation jsut render the view
 
Yeah.
 
11:40 PM
In pure awesomeness:
I tried out Windows 8 today. http://i.imgur.com/u3Myz.png
 
@sehe nice!
 
The error screen looks much nicer now
Also, much more senior friendly choice of font
 
I've been busy editing...
http://stackoverflow.com/users/1076451/jim-norton?tab=reputation
 
@JimNorton Freak
 
@sehe lol
 
11:45 PM
1 hour ago, by sehe
@Drise Call me lazy, but answering questions seems more effective
I do love this project logo
 
Unicorn puking rainbows. So unoriginal.
 
Hadn't seen it before. But then again, I never meet unicorns either
 
That's because you don't believe hard enough.
 

« first day (636 days earlier)      last day (4314 days later) »