00:16:17  * abraxasjoined
00:16:52  * muelli_joined
00:18:29  * muelliquit (Ping timeout: 240 seconds)
00:20:41  * abraxasquit (Ping timeout: 255 seconds)
00:25:44  * Vbitzquit (Ping timeout: 240 seconds)
00:26:19  * Vbitzjoined
00:31:18  * paulfryzeljoined
00:35:32  * paulfryzelquit (Ping timeout: 255 seconds)
00:36:09  * xaq_quit (Remote host closed the connection)
00:36:30  * Vbitzquit (Quit: ZNC - http://znc.in)
00:36:49  * Vbitzjoined
00:50:25  * Vbitzquit (Ping timeout: 240 seconds)
00:50:51  * Guest39367quit (Ping timeout: 255 seconds)
00:56:57  * xaqjoined
01:09:46  * jdummyjoined
01:10:30  <jdummy>Total noob here... is it possible to convert an LPSTR to v8::String?
01:11:30  <Jarvix>you can convert unicode strings :) find a way to make LPSTR to UTF8 :)
01:11:53  <jdummy>Awww... I wish I knew what that means!!! :)
01:12:12  <jdummy>I tried _T(), which was said to convert to unicode... I've been digging for hours.
01:12:19  <Jarvix>UTF-8 char string
01:12:24  <Jarvix>Well, I dunno your language :P
01:12:46  <Jarvix>isn't LPSTR just a Long Pointer (64bit) to a String?
01:12:54  <jdummy>I'm attempting to write a node module that can call Window's EnumPrinters()
01:13:03  <jdummy>const char *
01:13:06  <jdummy>same thing?
01:15:00  <jdummy>v8::String::Cast() says "cannot convert parameter 1 from 'LPSTR' to 'v8::Value *'
01:15:12  <jdummy>Clearly, I'm in over my head :)
01:15:59  <jdummy>BUT... I've read many cries for printing support in node, hoping I can learn just enough to accomplish the task (then I'll go back to the frontend, never to be seen again... I promise)
01:16:20  <Jarvix>wait
01:16:53  <Jarvix>just do this
01:17:29  <Jarvix>Local<String> str = String::NewFromUtf8(isolate, (char *)lpstr)
01:22:19  * xaqquit (Remote host closed the connection)
01:23:52  <jdummy>Jarvix: hmm... 'NewFromUtf8' : is not a member of 'v8::String' :( http://bespin.cz/~ondras/html/classv8_1_1String.html#aa4b8c052f5108ca6350c45922602b9d4
01:24:07  <jdummy>I've gotta be doing something wrong... lemme tinker
01:24:12  <jdummy>Thanks for your help!
01:24:37  <Jarvix>be spin is 1000 years old
01:24:56  <Jarvix>what version of v8 are you using?
01:25:24  <jdummy>Only reference I can find :) ... and it mentions String::NewFromUtf8
01:25:25  <jdummy>not sure
01:25:53  <Jarvix>it is best to just go into the include directory, run 'doxygen -g && doxygen'
01:26:05  <Jarvix>so you have your own documentation in include/docs/html/index.html
01:26:15  <Jarvix>the api changes with every minor version
01:32:01  <jdummy>Yeah, I'm pretty clueless... don't even know where my "include" directory is... I started with some working winapi code compiled with Visual Studio 2010... not a big fan of MS products, but I needed winapi for this project
01:32:03  * paulfryzeljoined
01:32:20  <jdummy>I'm building it with node-gyp currently
01:32:34  <jdummy>#include <v8.h>, that's all I know
01:32:54  <jdummy>I'm going to upgrade Visual Studio and see if that helps.
01:33:10  <jdummy>Thanks again Jarvix, I appreciate it
01:35:34  <Jarvix>hehe ok
01:35:53  <Jarvix>You must know that this is not the easiest place to start. With such a complex project as V8
01:36:17  * paulfryzelquit (Ping timeout: 255 seconds)
01:36:59  <jdummy>oh, v8 came with node... duh. it's latest node... 0.10.26
01:37:14  <jdummy>Jarvix: oh yeah, that's why I said I'm in over my head :)
01:37:20  <jdummy>doesn't mean I won't keep at it
01:37:57  <jdummy>AND... I'm able to build and get data back to node, so that's even pretty exciting... baby steps
01:38:26  * abraxasjoined
01:38:44  <Jarvix>well you are in the internals of node. pretty complex
01:39:17  <jdummy>well... I can run this winapi code and get a list of printers back, I'm simply trying to create a node module of it... I'm actually pretty close... damned typecasting :)
01:47:01  <Jarvix>can also use reinterpret_cast<char*>()
01:48:25  * xaqjoined
01:50:38  * abraxasquit (Remote host closed the connection)
01:53:33  <jdummy>already tried that one, now I realize the problem is different than I originally understood... "cannot convert from 'char *' to 'v8::Handle<T>'... so reinterpret_cast works
01:55:33  <jdummy>Any chance you'd peek at my (terrible, smelly) code? http://ideone.com/T3m4BV
01:56:06  <jdummy>I simply want to return an array, the problem starts at that ugly block at line 69
01:57:03  <Jarvix>you never opened your scope
01:57:14  <Jarvix>HandleScope scope(v8::Isolate::GetCurrent())
01:57:37  <Jarvix>in the first method
01:58:15  <Jarvix>you can't reinterpret to char* and then use that as handle
01:58:25  <Jarvix>you need to cast to char* and then put that in a string
01:58:39  <jdummy>hmmm... this is what I started with, and it worked: http://ideone.com/ybpw6y
01:58:43  <Jarvix>String::New((char *)lpInfo[i].pPortName)
01:58:43  <jdummy>They didn't either
01:58:59  <Jarvix>oh ok :)
01:59:03  <Jarvix>maybe I am wrong then
01:59:15  <jdummy>I certainly don't know :)
01:59:50  <Jarvix>the V8 sample code put isolate in there ;)
01:59:53  <Jarvix>oh well if it works
02:00:15  <Jarvix>anyways, the thing I said about the strings, do that
02:00:39  <Jarvix>Tip: write a method for that
02:01:26  <Jarvix>Local<String> LpStrToV8(LPSTR str) { HandleScope scope; return scope.Close(String::New((char *)str)); }
02:01:42  <Jarvix>and then LpStrToV8(lpInfo[i].pPrinterName)
02:02:35  <Jarvix>also are you sure you don't want to create an Object instead of an array for each printer?
02:02:45  <jdummy>I'm sure of nothing :0
02:02:51  <Jarvix>try that ;)
02:03:03  <jdummy>I simply want a nice JSON result set of the machine's installed printers
02:03:14  <Jarvix>an object is in javascript {'printer':xxx,'port:10.'comments':'lala'}
02:03:18  <Jarvix>indeed
02:03:23  <jdummy>I can already print to one in another module if I explicity supply the printer name, so I'm halfway there
02:03:23  <Jarvix>lemme make some code
02:03:33  <jdummy>SRSLY??
02:03:41  * xaq_joined
02:03:46  <jdummy>Where can I send the beers to?
02:03:47  <Jarvix>untested, just changing yours
02:03:52  <Jarvix>Netherlands lol
02:03:59  <jdummy>hmm... digital beers?
02:04:06  <Jarvix>fine
02:04:36  <jdummy>I've got a few hundred bitcoin I found on mtgox
02:06:25  * xaqquit (Ping timeout: 240 seconds)
02:07:59  <Jarvix>https://gist.github.com/joskuijpers/9540937
02:11:06  <jdummy>Hmmm... only returns the first character of each LPSTR... that's what min was doing
02:11:26  <jdummy>BUT... object is much better... docs don't show ->Set() for objects
02:11:40  <jdummy>Thanks Jarvix!
02:11:53  <Jarvix>sure they do
02:12:08  <Jarvix>if i wasn't so lazy i would upload some docs myself
02:12:17  <jdummy>well... bespin, remember? :)
02:12:26  <jdummy>I'll figure out how to generate them
02:12:44  <Jarvix>ey, before you include any windows files
02:12:55  <jdummy>Windows sucks?
02:12:59  <jdummy>and is on it's way out?
02:13:01  <jdummy>:)
02:13:05  <Jarvix>put #ifdef _UNICODE
02:13:10  <Jarvix>#undef _UNICODE
02:13:11  <Jarvix>#endif
02:13:36  <Jarvix>and move that around a bit
02:14:20  <Jarvix>well, casting should just work anyways
02:14:37  <Jarvix>maybe static_cast<char*>(str) in the LpStrToV8 method
02:15:50  <Jarvix>It is just so very stupid of microsoft to even THINK of doing such a stupid thing as LPSTR and LPCSTR and LPCTSTR
02:15:58  <Jarvix>or HANDLE for that matter
02:16:08  <jdummy>v8str = static_cast<char*>(str); ?
02:16:13  <Jarvix>yeh
02:16:16  <jdummy>explosion
02:16:24  <Jarvix>lol, and reinterpret cast?
02:17:13  <jdummy>nope, full circle :) cannot convert from 'char *' to 'v8::String *'
02:18:02  <Jarvix>oh wait
02:18:05  <Jarvix>nonono
02:18:25  <Jarvix>v8str = v8::String::New(static_cast<char *>(str)) ofcourse
02:19:26  <jdummy>oops, that was my doing
02:20:40  <jdummy>still just getting the first character of each string
02:20:51  <Jarvix>can you send the code again?
02:21:21  <jdummy>http://ideone.com/d6pmWw
02:24:50  <Jarvix>maybe you can just print some stuff to the debug console so you are sure your pPrinterName is a full string
02:25:13  <Jarvix>https://gist.github.com/joskuijpers/9540937 Removed the v8:: namespace prefixes
02:25:49  <Jarvix>you need the using namespace as you see there
02:28:17  <jdummy>I learned that one, but somewhere read that it may cause conflicts
02:28:26  <jdummy>so I added them all back :)
02:29:18  <jdummy>hmmm... I have steered you wrong somewhere. lpInfo[i].pPrinterName already IS a char *
02:29:28  <jdummy>printer->Set(v8::String::New("printer"), v8::String::New(lpInfo[i].pPrinterName)); works
02:29:34  <jdummy>also only the first character though
02:30:41  <jdummy>I've run the same code in VC++ and get full strings using wprintf()
02:31:11  <jdummy>I'm certainly close though, I really appreciate your time and expertise... thanks
02:31:24  <jdummy>I'll try again tomorrow :)
02:37:51  <Jarvix>but that is wprintf()
02:37:53  <Jarvix>try printf()
02:39:01  <jdummy>but that would be to stdout... how would I return the object to JavaScript/Node?
02:39:15  <Jarvix>but does that work :P
02:39:21  <Jarvix>does it print a string or 1 letter
02:40:18  <jdummy>aha! it prints 1 letter
02:40:24  <jdummy>well... no aha
02:41:13  <jdummy>HMMM.... I must've broke something somewhere. I'll backtrack and find where I went wrong
02:41:36  <Jarvix>because wprintf() prints wide characters
02:41:43  <Jarvix>and printf() does not
02:41:57  <Jarvix>and it is because windows is horrible, that wide characters even exist
02:44:29  <jdummy>yep, sure enough... wprint(L"Printer: %s\n", lpInfo[i].pPrinterName); does the trick
02:45:58  <Jarvix>you need to find a way to convert the wide characters to not-wide characters and put that in LpStrToV8
02:47:40  <jdummy>Aha!!!!!
02:47:57  <jdummy>I was using EnumPrintersW(), based on a previous recommendation
02:48:02  <jdummy>EnumPrinters() FTW!!!!
02:50:25  <jdummy>Jarvix, you're my hero dude!!!
02:52:10  <Jarvix>lol
02:52:20  <Jarvix>Well, have fun :)
02:52:29  <Jarvix>I am going to bed. 4AM here ^^
02:53:17  <jdummy>Thanks again! Ouch! night-owl
02:53:21  <jdummy>See ya
03:02:41  * jdummyquit (Quit: Page closed)
03:18:59  * Vbitzjoined
03:25:02  * xaq_quit (Remote host closed the connection)
03:30:07  * ebrynquit (Quit: Connection closed for inactivity)
03:33:24  * paulfryzeljoined
03:36:06  <iceisfun>I am getting "Fatal error in heap object creation" process out of memory when creating a bunch of test threads. Process is using 182MB mem
03:38:19  * paulfryzelquit (Ping timeout: 264 seconds)
03:38:54  <Jarvix>I think you ran out of memory
03:39:23  * Jarvixquit (Quit: Jarvix)
03:48:14  <iceisfun>am i just dealing with the builtin heap size then?
04:34:13  * paulfryzeljoined
04:38:59  * paulfryzelquit (Ping timeout: 255 seconds)
05:35:04  * paulfryzeljoined
05:39:18  * ebrynjoined
05:39:45  * paulfryzelquit (Ping timeout: 255 seconds)
05:57:22  * jmar777quit (Remote host closed the connection)
06:35:48  * paulfryzeljoined
06:36:08  * Halcy0nquit (Ping timeout: 264 seconds)
06:37:41  * Halcy0njoined
06:40:29  * paulfryzelquit (Ping timeout: 255 seconds)
07:24:58  * jonaslundjoined
07:27:03  * jonaslund_quit (Ping timeout: 265 seconds)
07:36:28  * paulfryzeljoined
07:41:14  * paulfryzelquit (Ping timeout: 255 seconds)
08:02:55  * mostynbjoined
08:04:59  * rendarjoined
08:37:19  * paulfryzeljoined
08:41:59  * paulfryzelquit (Ping timeout: 255 seconds)
08:45:59  * Lethalmanjoined
09:05:36  * juanjosanchezjoined
09:38:08  * paulfryzeljoined
09:42:18  * paulfryzelquit (Ping timeout: 240 seconds)
10:02:53  * muellijoined
10:18:12  * Net147joined
12:47:02  * marja___quit (Read error: No route to host)
12:49:50  * iamdustanjoined
13:08:23  * marja___joined
13:13:33  * Net147quit (Quit: HydraIRC -> http://www.hydrairc.com <- The alternative IRC client)
13:56:23  * jmar777joined
14:19:59  * guybrushquit (Excess Flood)
14:20:23  * guybrushjoined
14:35:08  * muelliquit (Ping timeout: 240 seconds)
14:54:15  * Jarvixjoined
15:42:39  * paulfryzeljoined
15:46:58  * paulfryzelquit (Ping timeout: 240 seconds)
15:57:43  * spolu__joined
16:02:07  * muellijoined
16:10:40  * juanjosanchezquit (Quit: Ex-Chat)
16:14:22  * mostynbquit (Quit: Leaving)
16:18:50  * iamdustanquit (Ping timeout: 252 seconds)
16:35:47  * iamdustanjoined
16:43:39  * paulfryzeljoined
16:46:25  * iamdustanquit (Ping timeout: 240 seconds)
16:47:38  * paulfryzelquit (Ping timeout: 240 seconds)
16:51:54  * jmar777quit (Read error: Connection reset by peer)
16:52:20  * jmar777joined
16:52:40  * iamdustanjoined
17:32:20  * spolu__quit (Remote host closed the connection)
17:44:24  * paulfryzeljoined
17:48:38  * paulfryzelquit (Ping timeout: 240 seconds)
18:01:55  * Lethalmanquit (Remote host closed the connection)
18:02:59  * jmar777quit (Remote host closed the connection)
18:03:35  * jmar777joined
18:08:32  * Jarvix_quit (Ping timeout: 264 seconds)
18:36:08  * muelliquit (Ping timeout: 240 seconds)
18:37:01  * muelli_quit (Quit: Leaving)
18:45:05  * paulfryzeljoined
18:49:18  * paulfryzelquit (Ping timeout: 240 seconds)
19:16:48  * muellijoined
19:50:11  * exprjoined
19:50:46  <expr>messing around with the v8 shell. how would I go about reading a line and storing it in a variable? something like Python's raw_input
19:52:16  <expr>reading a line from standard input, of course
20:19:52  * petka_joined
20:32:25  * jmar777quit (Remote host closed the connection)
20:33:34  * iamdustanquit (Ping timeout: 252 seconds)
21:10:31  * Lethalmanjoined
21:21:05  * seventhjoined
21:30:01  * muelliquit (Ping timeout: 240 seconds)
21:55:21  * Vbitzquit (Ping timeout: 240 seconds)
21:57:54  * Vbitzjoined
22:06:25  * marja___quit (Ping timeout: 240 seconds)
22:06:49  * marja___joined
22:10:11  * Net147joined
22:18:26  * ebrynquit (Ping timeout: 240 seconds)
22:19:30  * petka_quit (Ping timeout: 240 seconds)
22:19:55  * petka_joined
22:20:25  * ebrynjoined
22:22:25  * marja___quit (Ping timeout: 240 seconds)
22:26:36  * marja___joined
22:34:53  * umaxjoined
22:59:18  * rendarquit
23:23:46  * muellijoined
23:35:00  * jonaslund_joined
23:36:55  * guybrush_joined
23:37:47  * petka__joined
23:44:33  * Halcyonjoined
23:44:34  * marja___quit (*.net *.split)
23:44:34  * petka_quit (*.net *.split)
23:44:36  * guybrushquit (*.net *.split)
23:44:36  * jonaslundquit (*.net *.split)
23:44:36  * Halcy0nquit (*.net *.split)
23:44:40  * petka__changed nick to petka_
23:54:37  * jmar777joined
23:55:55  * seventhquit (*.net *.split)