« first day (577 days earlier)      last day (4372 days later) » 

sbi
6:00 PM
@CheersandhthAlf I have no idea what you're talking about. ("Baywatch"? Isn't that something on TV? I haven't lived with a TV since the end of the 80s.)
 
Damn, VS just froze in my face.
@sbi He's talking about Pamela Anderson.
 
sbi
@EtiennedeMartel Is it cold?
 
Har har har.
 
sbi
@EtiennedeMartel That's a name I have heard. She's a woman, that much I know. I have no idea what's her significance, though.
 
6:00 PM
@TonyTheLion anything is dynamic there, so it's easier to do dynamic stuff
 
Isn't it obvious lol
 
@Abyx right, so you would not have to create a polymorphic set of classes?
 
sbi
@CheersandhthAlf Ah. Just another blond girl with big tits. Yawn.
 
@TonyTheLion in a dynamic language basically everything is a templated virtual function
 
6:02 PM
@TonyTheLion you should define "class" first
some languages have only (hash)tables
 
well, you know, she started Andersen Consulting
or perhaps it was the Andersen accounting firm?
anyways
 
@CheersandhthAlf Really?
 
@SethCarnegie hmmm... so anything can be called from anything?
 
@EtiennedeMartel Of course! Unless it was a Norwegian.
 
var A = 5; A.blah(); would work, even if blah() was not specifically defined on A?
 
6:05 PM
@SethCarnegie what are you and tony discussin, which languages?
 
@CheersandhthAlf I'm pretty sure it's not the same person.
 
@johnathon just dynamic languages in general
 
@TonyTheLion no, that would fail
 
@SethCarnegie ah, and @TonyTheLion no that would fail miserably.
 
@TonyTheLion no, it means that f(a, b, c) will work no matter what types a, b, and c are
you only get an error when you try to use methods that don't exist on a, b, or c
their real type doesn't matter
there is no spoon
 
6:06 PM
:))
 
oh, but that means that f() does not need overloads for different types?
 
@TonyTheLion also languages like lua let you add and remove members to variables at will, and has no user defined types other than "object".
 
Arthur E. Andersen (May 30, 1885 – January 10, 1947) was a founder of the accounting firm Arthur Andersen LLP. Biography Arthur Edward Andersen was born in Plano, Illinois. John William and Mary Aabye Andersen, Arthur Andersen’s parents, had immigrated to the United States from Norway in 1881. Andersen was left on his own at the age of 16 after the death of his parents. In 1917, after attending courses at night while working full time, he graduated from the Kellogg School at Northwestern University with a bachelor's degree in business. He worked during the day as a mailboy and attended ...
hm, it was a Norwegian
anyway
 
Because function calls are basically just hash-table lookups
 
Was this all a pretext to show tits on this chat?
 
6:07 PM
yes
 
//in C++ like syntax/string
var mystring = stringfactory();
mystring.to_lower = function() {blah blah};
 //added a member function to this instance
mystring.to_lower();
 
I should have known.
Not that I mind, though.
 
@MooingDuck eww javascript'
 
later folks
have stuff i need to get done
 
@johnathon see you, and thanks for your help again
 
6:08 PM
@SethCarnegie hmmm, somehow I'm confused
 
@TonyTheLion when you do o.f(), it's basically o.methodtable["f"].call()
 
@SethCarnegie My intent was Lua ideas in C++ syntax, but I guess that's like Javascript
 
which permits redefinition on the fly
 
:This article is about the human breast. For other animals, see Udder and Mammary gland. :"Boobs" redirects here. For other uses, see Boob (disambiguation). :For other uses, see Breast (disambiguation) The breast is the upper ventral region of the torso of a primate, in left and right sides, which in a female contains the mammary gland that secretes milk used to feed infants. Both men and women develop breasts from the same embryological tissues. However, at puberty, female sex hormones, mainly estrogen, promote breast development, which does not occur in men, due to the higher amount o...
^ That's NOT Pamela Anderson
 
@SethCarnegie ah, but the methodtable needs to have f in it before it can call it?
 
sbi
6:09 PM
This is insane. A C++ metaprogram that parses Haskell at compile time and translates it into another C++ metaprogram. #cppnow
 
@TonyTheLion It also means there are no types. All objects are just "hashmap<string name, object* member>"
 
@sbi woah, sounds like funz :P
@MooingDuck hmmm, so it's all dynamic dispatch, really
 
and lisp basically had it before anything else as usual :)
 
6:16 PM
@TonyTheLion eh, kinda yes.
 
> We have way too many coders addicted to doing just one more line of code already.
lol
 
Hello there. I have a few, rather simple questions, to any one who has done network programming in C++
 
 
Too general to be asked
 
6:29 PM
^ it knows answers
@Soohjun OK, then don't ask
2
 
Uh? What's wrong with you?
Can I ask a simple question, yes or no?
 
nothing, I'm fine
thanks for worrying
@Soohjun you asked two already
 
Hm. This chat is pretty useless then.
5
 
6:33 PM
oh... (s)he quit
 
The chat's not here to be useful for you. It's here for chat.
 
food, please come back (@Soohjun)
 
yea, and you can checkout, but you can never leave
witness all the regulars here
 
For anyone who knows stuff about windows: I want to make a C# program to effectively "profile" the computer (possibly with a focus on whatever is using the most CPU), and attempt to determine what resources are chokepoints (cache miss, swapping, HD waiting, Networking?, Video, etc) Is this easy, and is this the right place to start?
 
should be fairly easy, if you use the Windows Instrumentation Management classes
@MooingDuck I guess perf counter is not a bad place to start
 
6:48 PM
@TonyTheLion I don't like the documentation for .Net concepts on MSDN, it seems very unintuitively laid out. Makes it hard to figure out how to use the classes. Thanks!
Those give me starting places, for when I finally start
 
I guess once you're used to it, you'll be fine
@MooingDuck lol
 
@TonyTheLion My first draft I got frustrated and simply made it measure bandwidth/ping.
 
oh
.NET is frustrating??
 
@TonyTheLion the documentation is
 
I thought that applied more to C++ than C#
@MooingDuck hmmm, I never really had a problem with it
 
6:51 PM
@TonyTheLion MSDN's C++ docs are actually nice
 
@MooingDuck well, they're very similar to the .NET one's no?
just .NET has OOP wankery
 
@TonyTheLion starting with the page you linked, how many links do you have to click to find a code sample of how to use it? By my count, about 4
 
@MooingDuck oh, I never looked
 
whereas if I google "msdn std vector" the first hit is a list of all of vector's members, each linking to detailed descriptions and samples.
 
I clicked two links
 
6:56 PM
@TonyTheLion "msdn .net list" comes up with equally useful stuff actually.
 
indeed, it's just a matter of knowing what you're looking for
and if you don't you have to find it
 
ah well, back to work
 
@SethCarnegie Hey man check it out pastebin.com/SQQYgAzZ
@SethCarnegie give that a try, and see how smooth it is :)
 
lol
WinAPI, smooth?
 
@MooingDuck it is not easy. e.g. Windows Task Manager doesn't manage to monitor resource usage correctly, in particular disk and CPU usage. you might start by considering code from SysInternals, but, perhaps not easily available since they were bought by Microsoft... Microsoft doesn't want anyone to do this. They have about it in EULAs (even for WMP), and they've lobotomized most tools that provide insight, such as netstat, openfiles, tasklist etc.
In other words, if you do it then you'll be fighting the OS vendor, who doesn't play on a level field...
On the bright side, by considering why they're fighting it, you can conclude that Windows sucks big time on resource usage, and that it will only get worse, i.e. no need to do a lot of work to find main conclusion.
 
7:11 PM
@TonyTheLion yea, double buffered gdi, depending on what your trying to draw with it, it's pretty smooth, but if the scene is extremely complex one might consider using Direct 2d.
 
@CheersandhthAlf I think the origional spark for the idea was my roomie got a brand new computer with a very flashy video card, and minecraft ran slowly. I could not convince him that it wasn't the video card's fault.
 
righteo then, time to do some work on glskel!
 
glskel ???
 
@TonyTheLion the awesome don't get in my way just give me a gl rendering context library that cat started
here is cat's main repo for it
I've got a fork where I am working on Linux support for it
 
@thecoshman oh right.
 
7:23 PM
hey! anyone here programs c(pp) on osx? i'm looking for the mac-equivalent of the dispatch message loop (i think that's what i'm looking for; i'm a java guy; feel quite bewildered in the native world)
 
@kritzikratzi osx which version?
 
10.6
does that make a difference?
 
@kritzikratzi yes, newer version of mac osx use their own in house windowing manager
@kritzikratzi and older versions used X11
 
oh, kk...
 
@johnathon x11 is not a window manager
 
7:25 PM
can i explain a bit what i'm trying to achieve? i feel really lost... to a degree that i wouldn't even be able to write a proper stackoverflow question.
 
shoot
 
@thecoshman im awair of this, but on the newer version of mac theay have their own _windowserver insted of using X11
 
@johnathon X11 is a system/protocol. window managers make up part of that system. are you saying that Macs don't use X11 or that they have their own window manager
 
@thecoshman both.
 
so there's the canon camera sdk (edsdk), it basically allows you to push all buttons you could push on the camera via usb. i've created a wrapper for java (windows) quite a while ago. sometimes the camera will send events, like "hey, there's a new picture ready can download over usb". to get these events i figured out i have to get the "windows message pump" going. i did it like this in java: github.com/kritzikratzi/edsdk4j/blob/master/src/edsdk/utils/…
 
7:28 PM
@johnathon I'm on linux atm, what did you fix
Besides adding the PostMessage for the WM_MOUSEMOVE thing
 
@SethCarnegie when the mouse moved over the child window repainting stopped, so , i made it look as if it was truly transparant by bouncing the wm_mousemove back to the parent in a non blocking manner
@SethCarnegie yup, when you get a chance try it out
 
[...] i'd now like to get this to work on the mac. what currently happens is that the events are sent by the camera, but i don't receive them. they're stored somewhere (i have no idea where), but i receive all old events when i stop and restart the app. (the previous will show up when i start the app again)
[...] so, i suspect i'll have to do something similar, tell os x to process the events. but i have no clue what message system this library uses. (and i don't even know how these things are "usually done" on a mac, cause i know so little about the overal architecture)
(that's the downside of being a java guy, i guess)
 
@johnathon so I guess the final verdict is "iterate all child windows from back to front"?
 
@SethCarnegie i dont understand what you mean by iterating , it's an event driven system
 
@johnathon SendMessage(child, WM_PAINT, 0, 0);
you have to do that for every child window
 
7:38 PM
@SethCarnegie how many child widnows are we talking about?
 
As many as you add
 
@SethCarnegie it's called reflection .. not iteration.. and let me ponder on this a bit because there is a way to set this up
 
@johnathon uh, C++ doesn't support reflection so I don't think that's what it is
reflection is where a program examines itself
 
@SethCarnegie not C++ reflection, windows message reflection
 
7:42 PM
@SethCarnegie when your doing win32 api you kinda have to think in terms of the system, not of the langauge your using.
C++ is just better suited for it, because you can easily encompass ideas into classes and such, and do RAII management on the resources you allocate from the system easier than you can do in straight C. But what your wanting is a mechanisim for the system to send the message out to all it's children. Let me spy++ this and see if the parent gets a nc_mousemove when the mouse is over the cild
 
@johnathon yeah, I had never heard of reflection applying to anything but languages so I thought you were talking about C++
 
@catplusplus when using fullscreen(unsigned bpp, unsigned width, unsigned height, unsigned refresh = 0) what do the 'bpp' and 'refresh' values mean? Bits-per-pixel?
 
@SethCarnegie WM_SETCURSOR << invalidate the parent window when the parent window recives that and it'll acheive the same result as the PostMessage i was doing in the child window's WM_MOUSEMOVE. Do not return from it, let it fall through.
@SethCarnegie if you return from that message , windows will fail to move the mouse cursor :))
 
lol
@johnathon so how does that help us when we're trying to get child windows to repaint in the middle of the parent's paint handler
 
@SethCarnegie and no, reflection, is when a child widnow sends a parent a notification message , or a command message, like WM_COMMAND when you cilck a button.
 
7:48 PM
Ah I see
 
@SethCarnegie the repaiting on wm_setcursor allows the repaiting of the main window while the mouse is over the child window. So it acutally looks as if the child window is truely transparant and not even there.
@SethCarnegie it just improves the overall visual effect.
 
@johnathon what if two child windows overlap, will they both be repainted?
 
@SethCarnegie are you talking about the zorder of the child windows?
 
brb, booting into windows
 
@RMartinhoFernandes oh, I didn't agree to the article. The title had a certain re-usable quality that seemed to fit this room on more than one occasion. "Oh god, not more php script kiddies". I didn't actually read the article before posting the link :)
 
7:54 PM
@sehe what article are you takling about
 
sbi
@Soohjun Of course this chat is useless! It's a waste of time, a place of fun, a procrastination device. It's is called "Lounge" for a reason. And that's why we like it here. If you have any serious questions, you should go elsewhere.
There's even a C++ room with the intention of discussing nothing but C++, but it's usually pretty empty.
 
@RMartinhoFernandes to be fair, I (obviously) advocate all people learning about programming in their youth. That's: learning about. Much in the way as learning about religion, music, dance, philosphy, painters, medieval history, flower arranging, graffiti, flatulence, sex offenders, other cultures, cryptography, literature, puzzles, economy etc. etc. is a good idea.
 
@sbi who want's to chat about C++
rhetorical / attempted humour
 
sbi
@thecoshman We do here — several times a day, usually.
 
That's not the same as everybody should become a member of a religion, do a choreography, publish poetry, be an archaeologist, become Bruce Schneier, etc. etc.
 
7:58 PM
@johnathon yeah
@johnathon the problem is that the child windows must redraw even if the parent window merely draws through them
not just if the mouse moves over them
 
@RMartinhoFernandes And finally, if I'm really honest, I think the parts where your link invokes "building a better mental model of how the world works" I think several other methods of teaching would be more applicable. It is down to the individual, but I'd rather send my kids to martial arts and local chess clubs than putting them behind the PC to learn javascript.
 

« first day (577 days earlier)      last day (4372 days later) »