« first day (1494 days earlier)   

12:12 AM
I just did a JS trick that makes me a JS ninja for the next minutes :)
now I need to document it..
 
@NathanOsman Penguins don't live up North.. (besides you, obviously ;)
 
@Seth wait a second O.o
isn't there where the snow is?
 
@hbdgaf cool, I'll take a look.
@Lucio Penguins only live in the South's snow... Odd right?
Just like Polar Bears aren't found in Antarctica.
 
you know too much about geoetc
 
12:18 AM
:)
 
I have a chicken to eat
it is not the North but I think chicken is everywhere
 
@NathanOsman So, if you have a minute, why should I learn Qt over Gtk?
 
ciao!
and nice weekend
 
OMG RAIN
 
@Lucio Have fun!
@Whaaaaaat You just got rain? o_O
 
12:22 AM
@Seth Sure!
First off, let me say that GTK is still a great windowing toolkit.
I used it for the first few versions of StackApplet and it got the job done.
However, Qt brings in the signal/slot paradigm.
And once you get the hang of this, it becomes tremendously powerful. gobject (GTK is built on gobject) has something like this but far less powerful.
Say you have two controls on a page. A numerical input box (a text entry box that only accepts numbers) and a slider (the widget with the handle that you drag back and forth).
 
@Seth california
 
You can connect the change signal on the slider to the slot on the number entry box that changes the value.
 
so now I can go install OpenELEC
 
Then whenever you drag the slider, the number entry box changes.
You can do the opposite as well, and have the slider jump to a value when the user changes the entry box.
 
hmm, yes, I saw that in a demonstration of Qt designer.
you'd think that would be easy no matter the framework/toolkit, but I guess it isn't?
 
12:26 AM
Qt does a lot of introspection. So it knows a lot about the classes that you are writing.
So if you use the Qt webview component (for displaying HTML), you can expose classes to JavaScript and do really neat things.
(That's how FlackBot worked.)
 
Nice.
 
GTK is technically cross-platform, but it's often difficult to set up on Windows.
Getting projects cross-compiled is nearly impossible.
So if you want to support Windows, Qt is the clear winner.
I almost forgot... the real magic happens when you use signals and slots across threads.
This lets you do things in parallel without worrying about memory leaks and race conditions.
(Well... if you are using CPython, threading may be a problem, simply because of the GIL.)
Another reason - the Qt documentation is spectacular and the GTK documentation is - well, it's good, but not perfect or thorough.
Qt will explain every class in detail with examples. You are almost never guessing.
Hopefully that helps. Let me know if you have any questions.
 
Yes that helps, thank you :)
 
Great :)
Are you thinking of learning Qt in C++ or in Python with PyQt?
 
I didn't understand all of it (my skill level just isn't high enough sadly), but it was still helpful.
@NathanOsman Starting with Python.
 
12:33 AM
Definitely go with PyQt 5 in Python 3 then.
 
I'm hoping to do some C++ eventually, but that isn't terribly high on my list at this instant.
 
Python 2.x is end-of-life and Qt 5 is stable and has been around for a while.
 
Which was one of the pros of Qt, it scales real well.
 
One very minor word of warning - you won't be able to sell a PyQt app without purchasing a license from Riverside (the authors). Open source apps are free to distribute though.
Qt itself is released under the LGPL 3.
 
@NathanOsman Yes, I definitely plan on using Python 3. I was hoping to use Qt 5 but there doesn't seem to be much book/tutorial wise yet (although the API docs seem to be there).
 
12:35 AM
@Seth There aren't a lot of changes. So the majority of the tutorials will still apply. And the documentation should answer your questions.
 
@NathanOsman That is good to know. I definitely don't plan on selling anything right now, that is for sure :)
@NathanOsman Awesome! I'm not adverse to digging into the API docs but I'd rather not have to learn everything from them. Real code examples are so helpful.
 
I can start you off with a super simple example right off the bat. One sec.
It's a single file - it displays the amount of entropy in /proc/sys/kernel/random/poolsize.
 
Awesome, thanks!
 
 
2 hours later…
2:12 AM
0
Q: Strange leading whitespace in OPTARG when using getopts

GJ.I spent quite a while researching the problem I encountered but none of the getopts tutorial say anything about the leading whitespace in OPTARG when using getopts. In bash(on Ubuntu and OSX), executing below commands: OPTIND=1 && getopts ":n:" opt "-n 1" && echo "OPTARG: '$OPTARG'" and it ec...

 
 
2 hours later…
4:18 AM
Guyz, I have a MacBook pro (yikes) and I cannot get nvidia drivers to work on it.
 
 
3 hours later…
8:02 AM
Hi
Can I upload a photo/photos to imgur.com via command-line and get their direct link as result??
 

« first day (1494 days earlier)