00:19:42  * phuujoined
00:26:22  * mmaleckichanged nick to mmalecki[zzz]
00:41:08  * phuuquit (Quit: phuu)
01:42:02  * alejandromgjoined
03:36:31  * bradleymeckjoined
04:22:51  * bradleymeckquit (Ping timeout: 276 seconds)
04:39:07  * bradleymeckjoined
04:54:30  * bradleymeckquit (Quit: Leaving)
05:35:37  * alejandromgquit (Quit: leaving)
05:56:12  <indutny_sleeping>creationix: heya
05:56:14  <indutny_sleeping>creationix: https://github.com/indutny/candor/blob/master/test/test-api.cc
05:56:16  <indutny_sleeping>it works now :)
05:56:24  <indutny_sleeping>next step - objects api
05:56:29  <creationix>wohoo
05:57:40  <creationix>wait, that's a native function
05:57:43  <indutny_sleeping>yes :D
05:57:45  * piscisaureus__quit (Quit: ~ Trillian Astra - www.trillian.im ~)
05:57:52  <indutny_sleeping>you can reenter candor from C++
05:57:53  <creationix>nice
05:58:10  <indutny_sleeping>it's a little bit verbose now (especially stuff with a Handle)
05:58:23  <indutny_sleeping>I'll figure out how to simplify API later
05:58:28  <creationix>what's "Arguments& argv" mean
05:58:33  <creationix>my C++ is pretty weak
05:58:51  * piscisaureus_quit (Quit: ~ Trillian Astra - www.trillian.im ~)
05:58:59  <indutny_sleeping>creationix: that means that argv was passed as pointer, but should be used dereferenced
05:59:08  <creationix>does C have that?
05:59:13  <creationix>or just C++?
05:59:20  <indutny_sleeping>i.e. instead of (*argv)[0] you can do argv[0]
05:59:26  <creationix>PHP has that strangly
05:59:27  <indutny_sleeping>C have it, but C have no classes
05:59:45  <indutny_sleeping>well, at least C API is still possible
05:59:59  <creationix>totally
06:01:04  <creationix>why is the "__$gc()" in there
06:01:12  <creationix>just testing the gc?
06:02:38  <indutny_sleeping>yes
06:02:58  <indutny_sleeping>stack is wierd when C++ called candor that called C++ that called candor
06:02:59  <indutny_sleeping>:
06:03:00  <indutny_sleeping>:D
06:03:13  <indutny_sleeping>though, that's just sanity test
06:03:19  <indutny_sleeping>at least it isn't crashing
06:05:26  * indutny_sleepingchanged nick to indutny
06:10:41  <indutny>creationix: ok, objects are working
06:10:42  <indutny>pushing update
06:11:02  <indutny>creationix: refresh https://github.com/indutny/candor/blob/master/test/test-api.cc
06:12:18  <indutny>creationix: please "wrap" in Handle all stuff that you don't want to GCed
06:16:29  <creationix>cool, I'll test it out
06:16:42  <creationix>just implemented enough luvmonkey to have a tcp echo server
06:16:48  <creationix>now to see if I can get there in candor
06:16:54  <creationix>or maybe just the timer example
06:16:55  <creationix>it's easier
06:17:19  <indutny>heh
06:17:20  <creationix>https://github.com/creationix/luvmonkey/blob/master/test-tcp.js
06:17:26  <creationix>not sure what API I'll use
06:17:30  <creationix>maybe just expose the uv api
06:17:32  <creationix>it's C
06:17:35  <creationix>candor is C-like
06:18:11  <indutny>heh
06:18:54  <indutny>API should be much faster than v8's one
06:19:08  <indutny>less stuff is happening here
06:19:17  <creationix>and if you think your API is verbose, try SpiderMonkey
06:19:17  <creationix>https://github.com/creationix/luvmonkey/blob/master/src/luv_stream.c
06:19:38  <creationix>and that's with select macros to ease the pain
06:19:53  <indutny>omg
06:20:09  <indutny>ok, I take my words back then :D
06:21:49  <creationix>ok, time to go down the candor.io rabbit hole
06:21:56  <creationix>we'll see how far I get before conling out
06:22:14  <indutny>ok :)
06:22:51  <creationix>I think there is something off in your makefile
06:23:03  <creationix>I forgot to do a "make clean" before rebuilding
06:23:07  <indutny>aah
06:23:11  <creationix>and "make test" segfaulted"
06:23:11  <indutny>make -B ARCH=x64
06:23:18  <indutny>I'll move to gyp soon
06:23:28  <indutny>so for now, please do -B
06:23:33  <indutny>it'll rebuild everything from scratch
06:23:50  <indutny>"I'm developing the Candor language" <- is that correct
06:23:51  <indutny>?
06:23:55  <indutny>I mean grammar
06:24:12  <creationix>it's a noun
06:24:16  <creationix>replace it with "ruby"
06:24:20  <creationix>does it sound right
06:24:24  <indutny>yeah
06:24:48  <indutny>no "the/a/an" in Russian, so it's always a problem to me
06:25:04  <indutny>going to attract some people by creating a card on geekli.st
06:25:20  <indutny>ok, I'll remove `the`
06:25:23  <creationix>you english seems pretty good to me
06:25:33  <indutny>thank you
06:25:45  <creationix>luvit has a very active russian contributor
06:25:51  <creationix>and sometimes I can't make sense of his bug reports
06:26:18  <creationix>of course, I'm sure his english is better than my russian
06:26:38  <creationix>though to be fair, I am fluent in spanish
06:26:46  <creationix>(or used to be atleast)
06:27:19  <indutny>:)
06:27:23  <indutny>http://geekli.st/indutny/im-developing-candor-language
06:27:41  <creationix>hmm deps/candor/include/candor.h:4:27: fatal error: utils.h: No such file or directory
06:27:58  <indutny>ooops
06:28:03  <indutny>not good
06:30:07  <indutny>fixed
06:31:19  <creationix>alright, got compile errors, but I think it's just an api you changed
06:31:22  <creationix>the include seems good now
06:31:30  <indutny>cool!
06:33:21  <creationix>I see Function::New doesn't need the Isolate* anymore
06:34:24  <creationix>hmm, still have a parser bug
06:34:25  <indutny>creationix: nothing needs it now
06:34:36  <creationix>but it's getting better
06:34:38  <indutny>creationix: huh, can you post source?
06:34:54  <creationix>"return nil\n// nill is default\n"
06:35:10  <indutny>hm...
06:35:14  <indutny>ok, let me check
06:35:15  <creationix>note the trailing newline
06:36:00  <indutny>yeaah, I see
06:37:57  <indutny>fixed
06:40:24  <creationix>perfect
06:40:28  <creationix>now to implement print()
06:40:34  <creationix>basic I/O ftw
06:40:50  <creationix>and I can write a colored data dumper in candor
06:40:54  <creationix>maked debugging much easier
06:40:57  <creationix>*makes
06:41:40  <indutny>haha
06:43:17  <indutny>is there anything that blocks you now?
06:44:07  <creationix>not that I know
06:44:17  * hij1nxjoined
06:44:43  <creationix>so on returns
06:44:53  <creationix>use HandleScope for Functions and Objects
06:44:57  <creationix>and always return something
06:45:02  <creationix>even a Nil instance
06:45:02  <creationix>?
06:46:43  <indutny>yeah
06:46:55  <creationix>when should I use Handle?
06:47:10  <indutny>for every value that should not be GCed in that scope
06:47:24  <creationix>ok, so most values then
06:47:28  <indutny>but if you ain't calling any candor function - you can just omit it
06:47:37  <indutny>GC may happen only in candor-land
06:47:52  <indutny>so no need to worry about it in C++ if you're not going to reenter candor from this function
06:48:11  <creationix>so to create a global context, I would do:
06:48:11  <creationix>Handle<Object> global(Object::New());
06:48:12  <creationix>?
06:48:37  <creationix>and then use that when doing script->Call()
06:48:50  <creationix>(where `script` is the compiled file)
06:49:39  <creationix>hmm, is the context of a function considered in the GC tree, or does it need to be a handle
06:50:22  <creationix>and properties I put on that object don't need to be Handle's themselves assuming the main object is safe?
06:52:33  <indutny>yeah
06:52:58  <indutny>better it to be handle
06:53:12  <indutny>if object is safe - properties are safe too
06:53:25  <indutny>script->Call(*global, ...) for your case
06:54:19  <creationix>right, just figured that out
06:54:40  <creationix>one sugar that would be real nice is overload ->Get and ->Set to use const char* for keys
06:54:52  <creationix>in C++ code they are usually strings
06:55:13  <creationix>s/use/accept/
06:55:42  <indutny>yes, I know
06:55:51  <indutny>it's just easier to do it this way now
06:56:03  <creationix>no problem
06:56:09  <creationix>do keys need to be handles?
06:56:19  <creationix>or can I just use a String*
06:57:15  <creationix>assuming global is safe (it's a handle)
06:57:17  <creationix>can I do
06:57:17  <creationix>global->Set(String::New("print", 5), Function::New(Print));
06:59:45  <indutny>hm...
06:59:50  <indutny>yes, you can
07:01:26  <creationix>hmm, something isn't working
07:01:38  <creationix>when I call my native function from candor, the script just returns with nil
07:01:46  <creationix>the C function is never called
07:02:03  <indutny>have you added scope?
07:02:07  <indutny>`scope print`
07:02:28  <indutny>haven't tested global replacement, to be honest :(
07:04:08  <creationix>when I call my native function from candor, the script just returns with nil
07:04:12  <creationix>ahh, sorry
07:04:22  <indutny>no runtime errors :D
07:04:39  <indutny>so if you do `a()` and a is not function, just nill will be returned
07:04:54  <creationix>I see
07:04:56  <creationix>yeah, print is nil
07:05:07  <creationix>even with "scope print\nreturn print"
07:05:11  <indutny>hm...
07:05:24  <indutny>one second, I'll test it
07:09:14  <creationix>hmm, ->Set only accepts strings
07:09:18  <creationix>as the key
07:10:40  <indutny>yes
07:10:42  <indutny>for now
07:10:46  <creationix>itoa it is
07:10:56  <creationix>I'm adding args to the environment
07:10:59  <indutny>ah, i see what happened
07:11:14  <indutny>root register is borked
07:12:27  <indutny>or even worse
07:15:12  <indutny>one second
07:15:50  <indutny>ok, fixed it
07:16:10  <indutny>rolling out update
07:17:03  <indutny>creationix: fixed https://github.com/indutny/candor/commit/52602215d2a76635f3d0f762848da5cebcfa3c9b
07:19:57  <creationix>why is it wrapped in return () {}
07:20:02  <creationix>is that required?
07:21:19  <indutny>creationix: for testing, yes
07:21:55  <indutny>creationix: code is running in some sort of "emulated" function
07:22:13  <indutny>and FUN_TEST is running code in default global context (empty)
07:23:09  <creationix>ok, it's working now
07:23:15  <creationix>I just had trouble pulling the latest code
07:23:21  <creationix>my makefile was reverting the submodule or something
07:23:33  <creationix>ok, I now have a print function
07:23:37  <creationix>hello world in candor.io!
07:23:39  <indutny>cool! :)
07:23:44  <indutny>can I build it?
07:24:33  <creationix>ok, just pushed
07:24:57  <creationix>so scope is always required
07:25:01  <creationix>even for context globals
07:25:10  <indutny>yes
07:25:16  <creationix>well, that makes linting easier
07:26:30  <creationix>now I need type coercion
07:26:40  <indutny>it is here
07:26:42  <creationix>print(1) dies because print() expects a string
07:26:53  <indutny>ah in C++ land
07:27:00  <creationix>canio: src/api.cc:113: T* candor::Value::As() [with T = candor::String]: Assertion `Is<T>()' failed.
07:27:57  <indutny>/usr/bin/ranlib: file: uv.a(ares_strdup.o) has no symbols
07:27:57  <indutny>/usr/bin/ranlib: file: uv.a(ares_writev.o) has no symbols
07:27:58  <indutny>/usr/bin/ranlib: file: uv.a(inet_ntop.o) has no symbols
07:27:59  <indutny>crap
07:28:03  <indutny>can't build candor.io
07:28:10  <indutny>is make ARCH=x64 correct way to do it?
07:28:52  <indutny>aah, that's oc
07:28:53  <indutny>s/oc/ok
07:29:00  <creationix>I just leave ARCH out
07:29:10  <creationix>my machine is x86_64 nativly
07:29:56  <indutny>ok, so you have few errors
07:29:59  <indutny>like %lld
07:30:05  <indutny>and char < 0x80
07:30:10  <indutny>char type is signed
07:30:46  <creationix>I see
07:32:08  <indutny>what is -lrt?
07:32:35  <indutny>I think OSX doesn't have posix runtime extensions
07:33:04  <indutny>hahahha
07:33:06  <indutny>it works!
07:33:06  <indutny>omg
07:33:10  <indutny>can't beleive it
07:33:36  <indutny>well, almost works :D
07:33:46  <creationix>:)
07:33:51  <creationix>so you're on a mac?
07:34:23  <indutny>yes
07:34:45  <creationix>it looks like sizeof, typeof, and keysof aren't implemented yet
07:34:53  <indutny>yes
07:34:55  <creationix>also we need a C++ API for getting the keys of an object
07:35:01  <creationix>that should be easy I imagine
07:35:17  <indutny>yes
07:35:24  <indutny>also it crashes in JIT code
07:35:25  <indutny>not good :D
07:35:34  <creationix>yeah, jit is hard
07:36:24  <indutny>ok, I think I fixed it
07:37:16  <indutny>creationix: can you update to upstream?
07:37:22  <indutny>ah, nvm
07:37:26  <indutny>I can do it locally
07:37:49  <creationix>right
07:37:57  <creationix>just watch out, it's tricky
07:38:10  <creationix>"git checkout master" in the submodule before pulling
07:38:20  <indutny>I'm not pulling
07:38:22  <indutny>git fetch
07:38:27  <indutny>git ff origin/master
07:38:32  <creationix>and "git add deps" from the root
07:38:35  <indutny>ok, I haven't fixed it
07:38:56  <creationix>sometimes the makefile reverts my checkout to an older tag
07:39:16  <indutny>aah
07:39:30  <indutny>yes
07:40:40  <indutny>ok, no segfaults now
07:40:45  <indutny>only assertion fail
07:41:30  <indutny>time for type coercing
07:42:49  <creationix>I can segfault it
07:42:51  <creationix>"scope print\nprint("" + 1)"
07:43:19  <creationix>but if I do 'scope print\na = "" + 1\nprint(a)' it's fine
07:43:49  <indutny>yeah
07:43:53  <indutny>ok, added ToString
07:43:59  <indutny>will fix that segfault later
07:43:59  <indutny>gtg
07:44:13  <creationix>thanks
07:44:16  <creationix>we'll see how far I get
07:44:24  <creationix>also it's almost 2am here
07:44:30  <creationix>I should sleep soon
08:53:21  <indutny>creationix: sleep ight man
08:53:25  <indutny>s/ight/tight
08:57:07  * hij1nxquit (Quit: hij1nx)
09:02:07  * phuujoined
09:08:59  <indutny>creationix: fixed that segfault
09:09:44  * indutnychanged nick to indutny_away
09:12:49  <phuu>hey - if I want to get involved in this project, what's the best way to get started?
09:13:06  <indutny_away>phuu: take a look at TODO
09:13:38  <indutny_away>phuu: you can try making functions - objects, it's very important and should be simple enough to get started with
09:13:43  <indutny_away>phuu: but I gtg now
09:13:47  <indutny_away>sorry
09:13:59  <phuu>np, thanks
09:52:16  * phuuquit (Read error: Connection reset by peer)
11:25:16  <indutny_away>back
11:25:18  * indutny_awaychanged nick to indutny
12:57:02  * mmalecki[zzz]changed nick to mmalecki
13:16:41  * piscisaureus_joined
14:50:03  * hij1nxjoined
14:51:17  * hij1nxquit (Client Quit)
14:51:41  * hij1nxjoined
15:21:51  <indutny>whoa
15:21:54  <indutny>anyone around?
15:22:26  <indutny>gc is using two spaces now
15:22:30  <indutny>should be much faster than it was
15:48:35  <creationix>morning
16:06:09  <indutny>morning
16:06:51  <creationix>is there a way to wrap objects
16:06:58  <creationix>or do we not need that
16:07:05  <creationix>by objects I mean c structs
16:07:10  <creationix>and C++ class instances
16:07:37  <indutny>no
16:07:47  <indutny>probably we need this
16:07:52  <creationix>also, when you get a change, a C++ API for getting the keys of an object would be great
16:08:02  <creationix>I'm trying to implement libuv timers
16:08:10  <indutny>cool!
16:08:26  <indutny>I'm in the middle of refactoring
16:08:34  <indutny>moving stubs out of fullgen into code-space.cc
16:09:39  <creationix>ok
16:09:41  <indutny>then I'll switch on keys and wrapping
16:10:23  <indutny>I think I'll add new heap type
16:10:26  <indutny>for wrapped objects
16:10:31  <indutny>Like cptr
16:10:34  <creationix>in lua they are called cdata
16:10:38  <indutny>oh, great
16:10:41  <creationix>I think sm calls them the same thing
16:10:42  <creationix>not sure
16:10:55  <indutny>not sure how that will be removed on GC
16:11:19  <indutny>ah, I know
16:11:27  <indutny>they may be embedded into heap values
16:11:31  <indutny>whole structure
16:11:46  <indutny>btw, there're simple hack to get your thing work :)
16:11:53  <creationix>what's that?
16:11:55  <indutny>create a string with contents of object
16:12:10  <creationix>hah, void* in a string
16:12:12  <indutny>and just reinterpret_cast string's value
16:12:13  <indutny>yes
16:12:19  <indutny>or in int
16:12:21  <creationix>ugly, but yes, works for now
16:12:23  <indutny>you can use numbers
16:12:32  <indutny>better string
16:12:43  <indutny>because GC will remove them
16:12:45  <creationix>how stable is the number representation
16:12:52  <indutny>no no, don't use numbers
16:13:14  <creationix>ok, so no pointers, but actual values in strings
16:13:18  <indutny>yes
16:13:29  <indutny>how much is that a hack?
16:13:37  <creationix>ok, that works. just dangrous
16:13:42  <indutny>why?
16:13:45  <creationix>since there is zero type saftey
16:13:54  <indutny>values in heap are immutable
16:13:58  <indutny>with exception to objects
16:14:09  <indutny>so you can't change your string's contents
16:14:11  <indutny>from candor
16:14:14  <creationix>you can't
16:14:26  <indutny>so no real danger
16:14:37  <indutny>but that's a little bit hacky, yeah
16:14:57  <creationix>but one string could be a uv_timer_t and another could be a uv_tcp_t
16:15:07  <indutny>creationix: yeah
16:15:10  <creationix>and if they pass in a uv_tcp_t when I typecast it to a uv_timer_t
16:15:14  <creationix>then bad things happen
16:15:23  <indutny>creationix: that's not good
16:15:56  <creationix>maybe cdata can be just like string, except has an immutable type tag
16:16:04  <creationix>that's a short string or number
16:16:14  <creationix>probably number since it's only used from C++
16:16:24  <indutny>yes
16:16:28  <indutny>that's a good news
16:16:39  <indutny>I'll need to extend switches in few places
16:16:42  <indutny>and implement API
16:19:35  <creationix>the api for cdata in lua is really nice
16:19:58  <creationix>you tell lua to allocate X bytes and give it an optional metatype
16:20:19  <creationix>lua mallocs it for you and gives you both the value and the char*
16:20:38  <creationix>lucikly libuv allows you to do your own malloc
16:20:43  <creationix>not all c libs to though
16:20:53  <creationix>so we also need a way to embed pointers
16:21:08  <creationix>and need a gc hook so we can manually free and cleanup what the pointer is pointing to
16:21:20  <creationix>in lua these are called light userdata
16:21:25  <indutny>you can use C++ classes
16:21:27  <creationix>cdata is called userdata
16:21:30  <indutny>ah no
16:22:12  <creationix>I'll use the string hack till you have something safer
16:22:26  <creationix>but eventually we'll also need a way to store pointers and have gc hooks for cleanup
16:23:45  <indutny>yes
16:23:47  <creationix>in v8 and sm you have to create a full class and implement some cleanup or gc interface on the class
16:24:04  <creationix>that's way too much effort for many cases where I just want a callback
16:24:05  <indutny>I think I figured out how to do that
16:24:35  <creationix>:)
16:25:15  <creationix>quick question
16:25:16  <indutny>I'll need to introduce Weak references
16:25:36  <creationix>yeah, I think that's how the lua C api does it
16:25:48  <creationix>I don't use the pointer api in lua since libuv doesn't need it
16:26:06  <creationix>ok, so I'm creating an object in a function
16:26:55  <creationix>do I need to use a Handle on the object and return that handle?
16:27:05  <creationix>or is there something like ScopeClose
16:27:11  <indutny>no
16:27:12  <creationix>or whatever it was called i nv8
16:27:17  <indutny>just return it :)
16:27:24  <indutny>it should work fine
16:27:34  <creationix>:)
16:27:49  <creationix>alright, I'll return an object with "cdata" and "type" properties
16:27:55  <indutny>hehe
16:28:00  <indutny>sounds like a plan
16:28:01  <creationix>it's safe as long as people don't replace the string manually from candor
16:28:10  <indutny>yeah
16:28:20  <creationix>then replace it with safer cdata values when you have those
16:28:46  <creationix>I guess the nice thing about using a string as the type is it could make introspection easier
16:28:55  <creationix>typeof can return that string
16:29:34  <indutny>yeah
16:29:40  <creationix>just a simple const char*
16:29:44  <indutny>probably that is a good way to do that
16:29:44  <creationix>shouldn't be much overhead
16:29:49  <creationix>and length I guess
16:29:57  <indutny>yes
16:30:06  <creationix>cool, that would be great
16:30:06  <indutny>8 byte tag + 8 byte length + data
16:30:11  <indutny>oh, and hash
16:30:12  <indutny>8 bytes
16:30:33  <creationix>so a string is data + length
16:31:19  <indutny>data + hash + length
16:31:24  <indutny>and tag
16:35:02  <creationix>maybe tag can stay a number
16:35:10  <creationix>but provide a C++ way to register new tag ids
16:35:13  <creationix>and associate them with strings
16:35:20  <creationix>then you don't need the actual string in the cdata instance
16:36:49  <indutny>yes, but that won't work with classes
16:36:59  <indutny>destructor won't be called
16:37:12  <indutny>you don't need it for uv bindings though
16:37:34  <creationix>yeah, I think they are two different use cases
16:37:42  <creationix>one where the vm manages the memory
16:37:48  <creationix>and one where the C++ binding author does
16:38:23  <creationix>one interesting thing about libuv
16:38:30  <creationix>structs "inherit"
16:38:39  <creationix>actually they are just massive unions
16:38:53  <creationix>but it's safe to use a uv_stream_t as a uv_handle_t for example
16:39:05  <creationix>since uv_handle_t is a "parent" to uv_stream_t
16:39:39  <creationix>in luvit you're given a hidden prototype object to attach to cdata instances
16:39:55  <creationix>and I have {isHandle:true,isStream:true,isTcp:true} for tcp instances
16:40:05  <creationix>and when I get the value, I check for is* for the type I'm expecting
16:40:20  <creationix>we don't want to do prototypes so that won't work
16:41:20  <indutny>yes, I know
16:41:37  <indutny>that's cool thing about uv
16:42:16  <creationix>hmm, how do I malloc a string of variable size?
16:42:28  <creationix>(char*)malloc(size) ?
16:42:39  <creationix>will candor free that properly when the string get's GCed
16:46:53  <creationix>does this look sane? https://gist.github.com/a0dd83511d7d75005a80
16:47:03  <creationix>(creating a uv_timer_t instance for candor)
16:51:12  <indutny>huh
16:51:45  <indutny>aah, well
16:51:50  <indutny>much simplier here
16:51:59  <indutny>you're responsible for your app's memory
16:52:08  <indutny>candor will copy value passed to String::New into heap
16:52:15  <indutny>so just reinterpret_cast your uv_timer_t
16:52:27  <indutny>like
16:52:32  <indutny>uv_timer_t t;
16:52:42  <indutny>String::New(reinterpret_cast<char*>(&t), sizeof(t))
16:56:17  <creationix>hmm, so there are two instances of my struct in ram
16:56:21  <creationix>one local and one on the heap
16:57:08  <indutny>oooh
16:57:10  <indutny>righto
16:57:24  <indutny>that's not good
16:57:39  <indutny>you should do that only after you initialized t
16:57:42  <creationix>I want candor to allocate it on the heap for me and give me the pointer
16:57:48  <indutny>and do not use 't' after that
16:57:49  <creationix>I guess we can do that for the cdata api
16:57:53  <creationix>right
16:58:01  <creationix>I'll make sure to use the heap version
16:58:09  <indutny>everything with cleanup then
17:09:19  <creationix>indutny, something isn't working in my function
17:09:27  <creationix>I think I'm getting nil when I return *timer
17:09:32  <creationix>(timer is Handle<Object>)
17:10:13  <creationix>can you confirm returning objects from native functions works? or am I doing something wrong?
17:11:12  <creationix>updated the gist https://gist.github.com/a0dd83511d7d75005a80
17:13:26  <indutny>hm...
17:14:20  <indutny>that looks good
17:14:25  <indutny>I'll check it later
17:15:06  <indutny>yeah, finished refactor
17:20:13  <creationix>:)
17:23:10  <indutny>ok, there's a bug
17:26:59  <indutny>or not
17:27:01  <indutny>it works
17:27:12  <indutny>you're probably doing something wrong on candor side
17:29:31  <creationix>ok
17:29:42  <creationix>I need to run some errands, you'll probably be asleep when I get back
17:29:51  <creationix>see you tomorrow
17:30:28  <indutny>yeah
17:30:29  <indutny>see you
17:37:48  <creationix>hmm, doesn't seem to build on my atom netbook
17:37:51  <creationix>32-bit cpu
17:38:02  <creationix>actually, it builds, but segfaults instantly on start
17:39:02  <indutny>how it builds?
17:39:05  <indutny>it shouldn't
17:39:10  <indutny>no ia32 support so far
17:39:29  <indutny>it can't :D
17:39:43  <indutny>creationix: can you run it through GDB?
17:39:58  <indutny>probably there're some illegal instruction
17:40:21  <indutny>gdb candor.io
17:40:24  <indutny>run test.can
17:40:57  <creationix>lol
17:41:02  <creationix>that stack trace is worthless
17:41:13  <creationix>6 steps with random addresses in ?? ()
17:41:23  <indutny>heh
17:41:27  <indutny>ok what' the last address?
17:41:33  <indutny>what's*
17:41:44  <indutny>(I'll add gdbjit support soon)
17:42:42  <creationix>https://gist.github.com/099c39c1abe3288e67b1
17:43:17  <indutny>disas 0x00403000 0x00403100
17:43:19  <indutny>please
17:43:27  <indutny>or disas 0x00403000,+0x100
17:43:36  <indutny>that depends on your gdb version
17:48:26  <creationix>updated gist
17:48:33  <creationix>I think I got it all
17:48:38  <creationix>it was paginated across several pages
17:48:45  <indutny>omg
17:49:26  <indutny>that code doesn't look like candor
17:49:41  <indutny>aah
17:49:42  <indutny>no
17:49:43  <indutny>it is
17:49:50  <indutny>haha
17:50:02  <indutny>it's x64 code
17:50:16  <indutny>disassembled with i386 assembler
17:50:21  <indutny>so nothing to catch there
17:50:33  <creationix>ahh
17:50:39  <creationix>oh well
17:50:55  <creationix>you'll have to add i386 and arm later I guess
17:51:19  <creationix>or do you have a non-jit mode that's portable?
17:53:04  <indutny>no
17:53:05  <indutny>only jit
17:53:16  <indutny>I'll implement i386 later
17:53:21  <indutny>btw, important thing now
17:53:26  <indutny>if you understand gyp
17:53:35  <indutny>would be cool to move from Makefile to it
17:56:27  <indutny>piscisaureus_: yt?
17:59:15  <indutny>piscisaureus_: can you please help me with gyp?
17:59:22  <indutny>piscisaureus_: I'm really not so deep into it
18:02:06  <creationix>I sortof know gyp
18:02:08  <creationix>not well though
18:20:36  <indutny>creationix: great!
18:20:47  <indutny>creationix: can you try porting it to gyp why you'll get some time?
18:21:01  <creationix>I don't like using gyp for tiny vms
18:21:08  <creationix>it adds a python dependency
18:21:13  <creationix>but I guess there are worse problems
18:21:27  <creationix>luvit has both gyp and standard makefile
18:21:33  <creationix>keeping both build systems in sync is a pain
18:21:46  <creationix>but it's nice when I'm building on some box without python to just use make
18:21:58  <creationix>mostly arm devices
18:22:39  <creationix>I wish there was somethine like gyp that generated portable makefiles
18:22:57  <creationix>so you could generate on a linux desktop with python and use the generated makefile on an arm tablet
18:26:44  <creationix>ahh, found the problem in my timer function
18:27:00  <creationix>uv->Set(String::New("newTimer", 3), Function::New(NewTimer));
18:27:05  <creationix>I don't think 3 is the right length
18:27:24  <creationix>and since calling a nil function just returns nil
18:27:31  <creationix>it looked like the function was getting run, but returning nil
18:28:19  <indutny>heh
18:28:39  <indutny>creationix: I think gyp would solve many problems of make
18:28:44  <indutny>like partial rebuilds
18:28:46  <indutny>they do not work now
18:28:49  <creationix>right
18:29:05  <creationix>well, I guess I'm ok with using gyp
18:29:12  <creationix>especially since we don't have an arm port anyway
18:29:13  <indutny>so if you'll have minute, would be great to have a gyp for it
18:29:16  <indutny>yeah
18:29:23  <creationix>anything with a 64bit cpu can probably handle having python installed
18:29:29  <indutny>hehe ;)
18:29:39  <indutny>that's right
18:30:09  <creationix>I barely know gyp
18:30:12  <creationix>maybe I can try tonight
18:30:32  <indutny>cool! :)
18:30:38  <indutny>going to watch film with my wife
18:30:40  <indutny>ttyl, man
18:30:41  <indutny>thank you
18:30:44  * indutnychanged nick to indutny_away
19:03:20  <creationix>It seems that you can't scope in arguments
19:05:08  <creationix>this call never happens https://github.com/creationix/candor.io/blob/master/test.can#L10
19:05:17  <creationix>but the line after it executes if I put a print there
19:06:46  <creationix>and if I manually copy the argument to a local var, then it segfaults when calling the callback https://gist.github.com/a81b1423b715563a590e
19:07:01  <creationix>anyway, I'm off to work on other stuff
19:08:36  <creationix>btw, this whole nothing is an error is hard to debug
19:08:48  <creationix>I can't wait till we add static analysis of undefined variable access
19:08:53  <creationix>that would catch 90% of my mistakes
19:09:32  <creationix>and then better syntax error reporting
20:40:39  <indutny_away>scoping arguments
20:40:41  <indutny_away>interesting
20:43:33  <indutny_away>ok, that's definitely not it
20:43:42  <indutny_away>ah wai
20:43:44  <indutny_away>wait*
20:45:30  <indutny_away>no, it works
20:48:39  <creationix>did I do something wrong?
20:51:25  <creationix>hmm, I can't call callback in the function that get's it directly
21:00:49  <creationix>mystery function
21:01:20  <creationix>Is<Function>(), Is<Object>() and Is<Nil>() are all false
21:01:31  <creationix>but when I call ToString() on it, it returns an empty string
21:02:30  <creationix>Is<String> is false too
21:04:45  <creationix>nevermind
21:04:47  <creationix>but in my C code
21:04:54  <creationix>callback is nil
21:05:20  <creationix>though I'm not sure how
21:05:29  <creationix>it's the first arg and I'm passing in a function literal
21:12:06  <creationix>yep definitely a bug passing functions as arguments
21:12:43  <creationix>if I pass any function (script generated or C generated) as an argument (at any position), it's suddenly nil in the function body
21:15:57  <indutny_away>ok
21:16:01  <indutny_away>I'll test it tomorrow
21:16:05  <indutny_away>ttyl
21:16:09  * indutny_awaychanged nick to indutny_sleeping
21:16:10  <indutny_sleeping>sorry
21:16:12  <indutny_sleeping>going to sleep now
21:23:03  <creationix>good night
22:29:39  * hij1nxquit (Quit: hij1nx)
23:36:06  * hij1nxjoined