« first day (272 days earlier)      last day (4683 days later) » 

12:00 AM
google for xcode hotkey
or objective c hotkey
or cocoa hotkey
also key press event
 
Either write a thread that blocks and waits for that event, or prefereably if the API allows you to do it implement a 'callback'
That's pretty much it.
 
next subject!!!
 
haha, right
 
Okay you lost me
 
12:01 AM
Thanks for the help, I'll make a post asking for help later
bye
 
jebus
I feel like i can't help him. we tried
 
I didn't think he would follow what I said. He sounds like he is pretty young - I hope I didn't discourage him.
 
ya i agree
whatever tough love
 
heh
SO is addictive.
The rep system is like leveling
 
haha I agree
much better system than experts exchange
 
12:03 AM
This guy asked a question earlier today, and he had several errors in the code he posted that implied he was pretty in the dark. The main point was, his problems went well beyond the question he asked
So, I read his code, and wrote a thorough response and explained why stuff wasn't working right, and then finally at the end answered his original question.
Some dude posted like 10 min after me, generically answering a class of questions.
He gave him the answer
I was like "WTF MATE"
 
so was this a story of why the point system is good? lol
 
I politely asked him why, after I has spent all the time giving him a real answer and taking the time to grok his code why he did that
And I'll be damned, he changed the answer to me.
I can't beleive I cared so much
Never in a million years on experts exchange :)
 
My point is SO is like crack
 
ee points were like bleeding away at money with no income
insert starcraft resource joke here
 
12:08 AM
I could be playing Company of Heroes or finishing a project for work, but I'm here answering qeustions like how do I set a variable from a usb button :)
 
LOLLLL
ffs
 
haha
This was the question if for some reason you are curious, btw
 
i don't care
but I'll rate up ur answer
 
pfft
thanks, I think :)
 
im doing sockets in iphone <-> Auto Hot Key
it's a effing mess
can I swear on this chatroom?
 
12:10 AM
idk
What is Auto Hot Key?
 
language for windows that lets you move mouse, click buttons, focus windows, search for pixels on the screen
type characters
like macro language
 
ok
so, like a GUI scripting langauge?
 
it's useful for lil hacks like, closing "naggware" windows that pop up
yes
 
Is it built in?
 
you need to have it installed to run scripts, but there is a complier to make exe files
 
12:12 AM
neat
I don't know if you have heard of it before, but you might be interested in 0mq
I probably would elect to do that over sockets every time
 
ncie
nice
ahk + sockets is a MESSS
you do like dll calls all over the place
but I need to connect to the iphone for my app
 
i know this is not a css room but can i ask a css ques?
 
probably the most complicated thing ever done with ahk
 
I recently had to write an event collection service in windows, with a client that could send queries. The client communicates with the server using 0mq. I can't tell you how much time it probably saved.
 
i probably belive you
 
12:15 AM
@lovesh I don't mind, although I only know enough CSS to make things work
 
how is width and height of a relatively positioned elemennt determined?
like u specify height:50%
 
I'm not aware that positioning affects dimensions...
 
then this is 50% of wat?
 
Ah - I see what you are asking
I don't know.
Probably the parent container - but that's a guess.
 
well the w3c says that that for absolutely positioned elements its the parent container
but doesnt say anything aout relatively positioned
 
12:17 AM
does this help: w3.org/TR/CSS2/box.html ?
 
already checked this
 
> Specifies a percentage height. The percentage is calculated with respect to the height of the generated box's containing block. If the height of the containing block is not specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the value computes to 'auto'. A percentage height on the root element is relative to the initial containing block.
 
Well there you have it.
 
@MartinhoFernandes Answered my next question.
 
12:19 AM
what does auto mean here 0px i m sure not
 
Dammit, that link seems broken.
But if I copy paste it, it works.
 
No - I just went there
link works for me
 
Browser bug!
 
WHAT? Never!
Haha, just kidding, that's from probably somewhere near 1 man month of suffering making a web gui look right in IE7
 
wats auto here
 
12:22 AM
@lovesh That seems complicated. There's prose a little below the link I posted.
 
0px?
 
Section 10.6 explains it.
 
yai saw it
 
do SO accounts carry over to Server Fault?
 
it mentions absolutely positioned elements
 
12:23 AM
Reputation doesn't carry over.
But you can associate the accounts.
> 10.6.6 Complicated cases
lol
 
lame
their chats are dead anyways
I want to talk about XenServer!!!
 
Well, reputation sort of carries...
 
@MartinhoFernandes ya u can c there in sec 10.6 there is nothing abt relatively positioned elements
 
I got +100 rep in server fault when I hit 200 here
@portforwardpodcast Do you have the starch press book?
"The Book of Xen" ?
 
no that's cool tho @Josh
 
12:26 AM
Ah. I recommend it - it's well written.
 
I will check that out
 
I'll sell you my copy :)
 
nice you can do that?
 
Uh
I don't knowhow
 
12:27 AM
@lovesh No idea. The text in there is nigh incomprehensible to me. Subsections 10.6.1 to 10.6.3 don't cover your case?
 
what's the coolest smoke you've let out?
 
I'd have to ship it and set an account up somewhere, probably not worth the ten bucks it might still be worth
 
one time I blew a cap and it flamed up. part got me in the face and the other part got my keyboard
 
@MartinhoFernandes dis is making me crazy?
 
I have a DUMB story recently
ouch!
 
12:28 AM
:D lets hear it
 
@lovesh Sorry, can't really help much more. I don't know CSS.
 
i hav a mysql question too can u help
 
i asked on SO but didnt got a good answer
 
I bought the TrackIR for my pc, and I got the IR headset you can wear. Well, the headset is powered by USB - dumb, because now I have another wire coming from my head to the PC. Well, it's just 3 IR LED's in serial....so I figured I would just wire up a 5v supply to it.
 
12:29 AM
its more of a schema ques
 
i didn't got any answers either
hahaah
this is gonna be a good story..
 
Bounties can help attracting better answers.
 
Well, energizer makes these little energi to go 5v supplies. So, I took it apart, and I was in the middle of desoldering headers when it started sparking and smoked. I then realized that you can very well put a conductive solder iron tip across Vcc connecters when the battery is connected, even when it's 'Off'. So, there was $15 down the drain
Not that great of a story, but it was a facepalm moment
 
I ended up with two great answers to a couple old unanswered questions I had by setting a bounty.
 
haha
ya sometimes I forget to turn things off, and solder on them with a grounded tip
awesome
 
12:32 AM
@MartinhoFernandes k i ll do that
 
@lovesh I like Jaydee's answer, personally
Anytime you can, you should not be polling+mutating tables to account for timespan
You should just set up a schema design such that at any point int time, you can deterministically choose the correct answer based off the state then.
I don't know if I worded that well ... :(
 
@lovesh I answered your Q
vote me up damnit!
 
@portforwardpodcast Actually, that's it right there
Calculate the answer when you need it based off current state
 
i m looking at the answer
 
I voted you up :)
 
12:38 AM
savage
I gotta go soon
but if you like technology, security, and some hardware, you should check out my podcast
www.portforwardpodcast.com
@josh I think you will like it
 
k
lol bitcoin
 
i voted it up
 
thanks :)
we have a more indepth bitcoin recorded but not posted
 
u deserved it
 
will that work for u?
 
12:41 AM
Interesting - I was a guest speaker at a live broadcast show called Command Prompt a couple times - looks like a very similiar format
 
ill take my time i m too tired for making comparisons at this time its 6 in the morning
i shoud crash now
 
night!
cool @Josh
if you like the show we are currently acceping listener callins
 
@portforwardpodcast cool
Like, a PSTN number, SIP address, ... or?
 
well Skype
we would hafta plan it
if listeners are interested in comming on the show, we ask they prepare a short (30 min) tutorial or demonstration or explanation of a cool technology. Then we ask you questions and then say goodbye
 
@Martinho just read the chat transcript you had with that guy over the validity of dereferencing a null pointer
You stayed longer than I would have. What an idiot.
 
12:52 AM
@josh where is that? link? sounds funny
 
I'm a patient person.
 
@portforwardpodcast null pointer link?
 
My profile probably.
 
Recent rooms or something.
Hmm, there's not such thing as "recent rooms" in the profile page.
 
12:54 AM
thanks
@Josh is patient too
with that j shoe guy
 
ha yeah
Well, this is really offtopic - but then, jsut about 80% of what we have been talking about has been off topic - anyone have any experience with haskell?
 
You like?
 
Haskell seems to be dear around here.
I like it.
 
It seems like everything written in it is an ivory tower of semantic excellence
 
12:59 AM
That's an interesting way to put it.
 
I know a bit of the basic syntax, and am currently learning Erlang, but I probably couldn't do much more than hello world in haskell
 
it went a little bit like this:
JShoe: Hey all, how would you have an external button (as in from radio shaclk
) interact with a program?

Josh: @JShoe You could probably buy a cheap USB numeric keypad, strip out the circuitry, and wire up a switch to the contact pad. Put the whole thing in a little project box, call it a day.

ME: @JShoe have you ever taken a keyboard apart before?

JShoe: @Josh All I want is to make x = 1. Do I really need to strip a keypad, rewire it, and test it? I just want to change a sibngle value. How would I do that?
 
@Josh Is Erlang strictly pure like Haskell?
 
No.
 
How do the two worlds mix?
 
1:01 AM
You can introduce side effects all over if you want - HOWEVER - it is easy to keep it pure
 
I never used a non-pure functional language.
 
hmm
I don't know if I know how to answer that question
Currently, Erlang is the only functional language I would attempt to say I "know"
so
I don't know if I have enough point of reference to answer that, e.g. I'm not familiar with other functional languages.
 
It's okay.
 
python is a functional language correct?
 
Since you can easily mix in side-effects, I guess monads aren't as ubiquitous in Erlang, right?
 
1:04 AM
The main causes of side effects are the IO you are probably workign with, seeing as how Erlang is an excellent language for servers, and databases.
Well
I have heard of Monads, but I don't understand them yet.
Afaict Erlang has no analog.
 
@portforwardpodcast Well, yeah you can do functional programming. But I wouldn't put it in the same box as Haskell, Erlang, OCaml, or F#.
 
@MartinhoFernandes Yeah, any language where you can reassign variables and their are for loops everywhere pretty much states its not functional
*there
Actually, let me ask you a question about monads
 
Sure, go ahead.
 
From what I can tell, it's kind of like a function has hidden state that is only available on request
Is that close?
 
That's one kind of monad.
It's called the reader monad, or the environment monad.
 
1:07 AM
Please bear in mind I've been an imperative language programmer for about 20 years, and I picked up Erlang about a month ago, so be gentle :)
Ok.
So, what is the root concept then?
 
it's beer 30 around here in california!
peace out!
 
@portforwardpodcast Later! Maybe we'll cross paths again!
 
I hope so @Josh !
peace
 
Basically, a monad (per the Haskell definition) is just a triple of: a type constructor, a function that wraps values in the monad, and a function to apply monadic functions to monadic values.
 
I've recently learned about how ugly side effects really are to the meaning and execution of your code - so a language like haskell that goes out of it's way to sperate them from the functionality (no pun intended) is very itneresting to me
 
1:09 AM
That doesn't sound very impressive, does it?
 
hmm
yeah
I don't know about impressive - but I don't think I get it, since the definition sounds recursive and I don't know what monads are :)
 
Yeah, that happens a lot. Lemme get some links.
 
ok
 
I'm not that good at explaining this.
There's this video here, that seems to be popular (I have yet to watch it, though).
 
Well, I skimmed though some stuff earlier, but it became apparent to me that my lack of knowledge of haskell was going to make this a bit tougher than learning a new type of tree or something
k
 
1:12 AM
And there's this blog post which gives what I think is the best introduction to monads on the web.
 
ok
well, the video's an hout long, so I'll see you around I guess
Thanks for the links!
 
What I like about "You Could Have Invented Monads" is that when it reveals what a monad is, it doesn't try to hide behind metaphors. It just tells you it's a special triple.
And by that time, it already makes sense to you.
 
cool
I'm reading it now
 
 
1 hour later…
2:31 AM
whew
I feel like the understanding is slowly creeping in
 
2:54 AM
It's an amazing concept, to be able to create transformations that are generically combinable
it kind of makes you think you have been taught the wrong thing simply because the hardware in the beginning was so limited
it's sort of like long term proof the premature optimization is evil
I looked up category theory after watching the tutorial
pretty wicked
 
Well, you don't really need much category theory knowledge to understand monads enough to use them in programming.
 
 
1 hour later…
sbi
4:20 AM
@jalf "Sometimes, compilers are so much more sensible than human beings." Scott Meyers
 
 
3 hours later…
7:28 AM
0
A: C++ float precision question

FredOverflowI think you can do better than sorting the numbers before you accumulate them, because during the process of accumulation, the accumulator gets bigger and bigger. If you have a large amount of similar numbers, you will start to lose precision quickly. Here is what I would suggest instead: while ...

opinions?
 
 
1 hour later…
8:46 AM
Use multiple precission floating point library if you care that much about precission?
 
9:01 AM
Morning
 
Morning
 
9:16 AM
Morning... anyone cares to give a bump to this answer?
1
A: Unresolved overloaded function type when using a template friend function

Ise WisteriaIn my understanding, if a friend function is defined in a class without other corresponding declarations, the friend name can be looked-up only through ADL. §7.3.1.2/3 says: The name of the friend is not found by simple name lookup until a matching declaration is provided in that namespace ...

I believe the guy deserves much more than a single upvote (mine) for an answer to a non-trivial problem (I know I spent quite a while yesterday trying to figure out what the problem was)
 
10:01 AM
Done.
 
oh hai
 
10:18 AM
@ÓlafurWaage: thanks... it is a pity that many times really good answers fall under the radar. Somehow it seems that simple question with simple answers end up with greater recompenses than the interesting important one :)
 
tl;dr
 
10:42 AM
I think a large part of the problem is that people don't see great answers for what they are really worth.
 
the problem is that great questions don't necessary appeal to the largest audience
 
That as well.
 
Might be a side effect of the Parkinson's law of triviality... en.wikipedia.org/wiki/Parkinson's_Law_of_Triviality (also known as bikeshedding)
 
11:10 AM
Morning all.
 
3
A: can we assign a integer value to a reference varible?

dascandyThe reason it doesn't work is because 10 is of the type "const int". You can turn that into a reference, but you can't make it non-const without violating some logic at the least. const int &a = 10; that'll work. int &b = const_cast<int &>(10); will also compile, but you ...

Wrong answer got picked.
 
11:28 AM
I think I'm going to bite the bullet and do poor man's reflection with a template<const char* Name, typename T> struct field;
 
the problem with reflection was never that you couldn't implement it
 
Can you use strings for templates parameters?
 
it's that you'd have to fill out all the data manually
 
@MartinhoFernandes No, that's the horrible thing.
field<"name", std::string> would be extremely convenient
 
So, how can you make it work?
 
11:32 AM
you can do
 
auto const name = "name"; field<name, std::string> f;
How silly is that.
 
struct pointless {
    static const char* ptr;
};
const char* pointless::ptr = "name";
field<pointless::ptr, std::string>
 
I thought about it and since I won't need to put that in headers, why the hell not.
 
Oh, so, it's just string literals that you can't use.
 
Yeah.
 
11:33 AM
You can have const char * parameters.
Weird.
 
you can have pointers or references to any type as a parameter
 
And if I do const char name[] = "name" then it's still fine, I get 'decay'.
 
but there are rules about the linkage of the target
 
The rules are lifted for C++0x. Just not the rules about string literals.
It's mad.
 
Can you use floats in C++0x?
 
11:34 AM
> a constant expression (5.19) that designates the address of an object with static storage duration and external or internal linkage
Well not lifted, relaxed. Sorry.
Before it was only external linkage.
@MartinhoFernandes No.
 
But you can use a pointer to a float?
 
Yep.
 
That sounds retarded somehow.
 
It'll be interesting if the rules are ever relaxed to literal types.
@MartinhoFernandes There's a world of difference between a value and an object (in the C meaning of the word).
i.e. yeah you can have your pointer to float but you can't dereference it in a constant expression.
 
omg
I got my results and THEY DON'T SUCK
wtf is wrong
 
11:40 AM
@DeadMG you're reading them upside down?
 
haha
 
Medical or academical?
 
academic
my Programming Languages module
I got a 2:1
and
I passed Team Projects, so there's still a possibility that I can even resit in the summer
 
I felt the same way in my programming languages course. For some reason, in my exam I got one grade above my friends, including the guy I'd constantly been leeching answers from throughout the course ;)
 
lol
 
11:45 AM
@DeadMG No idea what the numbers mean, but go you.
 
@LucDanton What about in constexpr?
No?
@DeadMG What's 2:1 mean?
 
@MartinhoFernandes Yeah, those contexts.
i.e. float f = ...; constexpr float* p = &f; a_template<p>::blah::quux<int>::stuff
 
2:1 basically means "Good result"
if you're an employer, then there's people with degrees, and people who got 2:1 in their degree or higher
 
Ok. Weird grading notation.
 
p is fine there but you can't use e.g. *p. So allowing float* as non-type parameter is quite a long way away from allowing float.
 
11:48 AM
like, if you want to be a lawyer in the UK, you have to not only have a law degree that's been OKed by the association, but you also have to have a 2:1 result
I don't know where it comes from
pass 40%, 2:2 50%, 2:1 60%, first 70%
 
We just have a number from 0 to 20. 0 is horrible, 20 is awesome.
Anything above 13 is already great.
 
@DeadMG ah, so it just means 60%?
 
13/20 would be about 65%
yeah
well, maybe if you're on a hard course, then they change the values
but those are the values for my course
 
that puzzled me when I looked at UK jobs a year or two back
 
@LucDanton Dammit. I thought I could rewrite some old templates that use a clunky ratio system.
I heard there's something similar in boost.
 
11:52 AM
@MartinhoFernandes we have the craziest grading systems. Used to be 0-13, but missing a bunch of grades in between (so it was basically 0, 3, 5, 6, 7, 8, 9, 10, 11, 13), and 11 was literally defined as "flawless", which made 13 kinda tricky to get
 
Appropriately named Boost.Ratio.
 
@jalf What the heck? Is Portugal the only country with a (relatively) "sane" grading system?
 
now, to make it more logical, they replaced it with a range of [-3,12], but again missing a handful of grades
 
@jalf That's hilarious.
 
You're kidding us, right?
 
11:54 AM
@MartinhoFernandes I wish
 
@MartinhoFernandes France grades on 20 too, although quite a lot of teachers work under a similar assumption that 20 is unreachable under normal conditions (i.e. you'd have to be the teacher's teacher).
 
That happens here sometimes. But it's rarer.
 
Heh.
 
And 0 is usually reserved for work that wasn't done.
 
Most teachers now assume 20 is just something like "could teach this class".
 
11:55 AM
e.g. turn a blank sheet in.
 
We have 1 through 5, 1 is the best. Universities have either 1 through 3, 4 is did not pass grade. And recently also A..F grades.
 
the stupidest thing about the new system is that it was intended to make it easier to compare against international standards, because each grade is now supposed to map to one of the usual [A-F] ones... Except that each grade is still defined differently. So if you get a 12, it is "translated" into an A internationally, but the requriements for getting it are different
 
hmmm
I'd have to average 75% in my resits to get a 2:1 this year
 
If I manage to get at least one 14 next September, I'll have a final average of 14 :)
 
lol
 

« first day (272 days earlier)      last day (4683 days later) »