00:00:34  * piscisaureus_joined
00:01:12  * piscisaureus_quit (Read error: Connection reset by peer)
00:24:20  * alejandromgjoined
00:34:54  <indutny_sleeping>creationix: cool!
01:30:07  * mmaleckichanged nick to mmalecki[zzz]
01:49:03  * karterkjoined
01:55:01  * karterkquit (Remote host closed the connection)
03:17:44  <creationix>indutny_sleeping: when you get a chance, I need a Object::New(Object *) clone API (or Value::New(Value*) if that's easier)
04:05:05  <creationix>indutny_sleeping: also an API for deleting from objects
04:21:59  <creationix>I think a Bool::New(bool) constructor would be handy so I don't have to do uv_is_writable(handle) ? Boolean::True() : Boolean::False();
04:46:20  * karterkjoined
05:00:49  <creationix>I'll file issues so it's easier to track
05:48:26  * karterkquit (Ping timeout: 245 seconds)
06:09:39  * karterkjoined
06:52:02  * alejandromgquit (Quit: leaving)
07:11:41  * karterk_joined
07:12:07  * karterk_quit (Read error: Connection reset by peer)
07:12:21  * karterk_joined
07:12:41  * karterkquit (Read error: Connection reset by peer)
07:50:45  * karterkjoined
07:50:57  * karterkquit (Remote host closed the connection)
07:53:28  * karterk_quit (Ping timeout: 246 seconds)
08:08:04  * karterkjoined
10:47:06  * piscisaureus_joined
11:01:36  <indutny_sleeping>creationix:hi
11:01:38  * indutny_sleepingchanged nick to indutny
12:04:27  * karterkquit (Remote host closed the connection)
12:30:08  * karterkjoined
13:16:26  <creationix>indutny: morning
13:17:41  <indutny>creationix: morning
13:17:53  <indutny>creationix: I need more info about that Set issue
13:18:27  <creationix>ok
13:18:27  <creationix>I did notice that setting the property via script works fine
13:18:33  <creationix>but when I set it via the API it doesn't work
13:18:39  <indutny>hm...
13:18:51  <creationix>the object has been cloned several times too
13:18:51  <indutny>what keysof reports?
13:19:50  <creationix>let me check
13:19:50  <creationix>I was using the C++ API to introspect it
13:19:50  <creationix>candor.io has a nice pretty printer
13:20:08  <indutny>yeah, I seen it
13:20:11  <indutny>good job
13:20:43  <creationix>keysof seems to return the same thing as Object::Keys
13:20:51  <creationix>[ "getpeername", "isReadable", "onConnection", "write", "cdata", "keepalive", "close", "accept", "isWritable", "getsockname", "listen", "nodelay", "readStop", "readStart", "shutdown", "bind" ]
13:21:18  <indutny>so "onConnection" is present, but nil
13:21:42  <creationix>yep
13:21:51  <indutny>creationix: what if you'll do obj.onConnection in candor-land?
13:22:00  <creationix>and if I set onConnection2 to true, then there is a new key nil with value nil
13:22:07  <creationix>if I set onConnection in candor-land, it's fine
13:22:15  <indutny>I mean getting
13:22:20  <indutny>after setting in C++
13:22:52  <creationix>getting it in candor gives nil
13:23:04  <indutny>great
13:23:12  <indutny>can you create some sort of regression test?
13:23:24  <creationix>I can try
13:24:07  <creationix>but it involves native C++ functions
13:24:20  <indutny>yes
13:24:23  <indutny>use test-api.cc for that
13:24:32  <indutny>I just can't reproduce it
13:25:04  <creationix>btw, does it repeat for you?
13:25:11  <creationix>I think what I have in master will do it
13:25:19  <creationix>build candor.io and run test-tcp.can
13:25:32  <indutny>ok, I'll try
13:25:41  <indutny>is it still reproducible with a latest candor?
13:26:25  <indutny>ooh
13:26:27  <indutny>even better
13:26:31  <indutny>onConnection=0 for me
13:30:36  <indutny>oooh
13:30:47  <indutny>keys are somehow 0 in object
13:30:49  <indutny>not nil
13:33:56  <indutny>ok,gtg
13:34:00  <indutny>will take a look at your stuff later
13:39:21  <indutny>ok, onConnection is not 0 anymore :)
13:39:27  <indutny>it's nil now
13:42:19  <indutny>lol :D
13:44:58  <indutny>creationix: aaah
13:44:59  <indutny>man
13:45:03  <indutny>creationix: that's your mistake
13:45:20  <indutny>static Object* prototype should be a static Handle<Object> prototype
13:45:30  <indutny>Object just was relocated
13:45:39  <indutny>and you was trying to update non-existing location
13:45:40  <indutny>creationix: ^^
13:46:19  * karterk_joined
13:49:16  <indutny>creationix: oh, API doesn't support that now
13:49:28  * karterkquit (Ping timeout: 260 seconds)
13:51:03  <indutny>mmalecki[zzz]: ping
13:54:48  <indutny>creationix: or probably not
13:54:51  <indutny>but better use handles
14:08:01  <indutny>creationix: aaah
14:08:02  <indutny>got it
14:09:38  <indutny>creationix: yes, it works
14:09:54  <indutny>creationix: fixed
14:10:06  <indutny>creationix: btw, can I send you a pull requseet?
14:10:08  <indutny>request*
14:12:39  <indutny>creationix: https://github.com/creationix/candor.io/pull/1/files
14:13:30  * karterk_quit (Remote host closed the connection)
14:34:41  <indutny>creationix: and btw you should store handle, not Object within uv handle
14:35:34  * mmalecki[zzz]changed nick to mmalecki
14:35:37  <mmalecki>indutny: pong
14:35:42  <indutny>mmalecki: heya
14:35:49  <mmalecki>indutny: yo :)
14:35:53  <indutny>mmalecki: can you please remind me
14:36:01  <indutny>mmalecki: will travis support x64?
14:36:13  <indutny>mmalecki: and is there any expected date of that?
14:40:32  <mmalecki>indutny: yeah, it guess it'll one day, but I have no eta
14:40:46  <mmalecki>there's gonna be like a big refactor needed to make it happen
14:46:28  * mmaleckichanged nick to mmalecki[away]
14:46:46  <mmalecki[away]>gotta go, Fedor. I'll be back soon.
14:47:17  <creationix>indutny, thanks
14:49:09  <creationix>heh, broke the linux build though
14:49:13  <indutny>-lrt?
14:49:18  <creationix>-lrt is required there
14:49:24  <creationix>I'll add in os hacks to the makefile
14:49:47  <creationix>what that all that was needed for osx?
14:49:55  <creationix>I don't test there very often
14:50:53  <indutny>yes
14:52:54  <creationix>hmm, testing the echo server with `nc localhost 8080 < /dev/urandom > /dev/null` segfaults
14:53:03  <creationix>probably my bug though
14:53:44  <creationix>yeah, in a luv_write call
14:54:25  <creationix>I'm probably doing something unsafe in there with the char* and it only breaks in high load
14:54:33  <indutny>haha
14:54:41  <indutny>you're storing Object* in .data
14:54:44  <indutny>that's incorrect
14:54:57  <creationix>needs to change that to Handle<Object> too
14:55:02  <indutny>yes
14:56:12  <creationix>so what do Handle::SetWeakCallback and Handle::ClearWeak do
14:56:33  <indutny>creationix: lets start from the beggining :)
14:56:45  <indutny>Value* is a pointer to a value
14:56:53  <creationix>and it's not GC safe by default
14:56:56  <indutny>yes
14:57:01  <indutny>because GC may move objects
14:57:11  <creationix>oh, so the value of them can change too
14:57:14  <creationix>good to know
14:57:16  <indutny>yes
14:57:22  <indutny>Handle will track those changes
14:57:24  <creationix>that explains a lot of breakage
14:57:28  <indutny>and change internal pointer
14:57:58  <creationix>I thought Handle was only for when I wanted to root something to prevent it from getting collected
14:58:30  <indutny>and for that too, yes
14:58:32  <creationix>ok, so any value I'm accessing from C++ needs to use a Handle
14:58:41  <indutny>not really
14:58:43  <creationix>except for local stuff that I won't use outside the current function
14:58:53  <indutny>just Values that you may use in later C++ interruptions
14:58:56  <indutny>yes
14:59:01  <creationix>ok
14:59:05  <indutny>or something that you'll return and 'forget'
14:59:09  <creationix>now about being persistent
14:59:12  <indutny>like return Object::NewEmpty()
14:59:30  <creationix>are values in handles always persistent?
14:59:34  <indutny>yes
14:59:44  <creationix>so how do I make a handle weak
14:59:58  <creationix>I want to track something, but not prevent it from being collected
15:00:22  <indutny>creationix: create a temporary handle
15:00:38  <creationix>does SetWeakCallback do that as well or just notify me when it's about to be GCed
15:00:40  <indutny>call SetWeakCallback
15:00:42  <indutny>no
15:01:00  <indutny>it just adds that pointer to a weak list
15:01:05  <indutny>which is checked on every GC
15:01:08  <indutny>before finalization
15:01:20  <indutny>and if pointer was GCed - your callback will be called
15:01:26  <creationix>got it
15:01:35  <creationix>I just don't understand how a temporary handle makes it weak
15:01:47  <creationix>what is "temporary" handle
15:01:57  <indutny>the idea is that temporary handle lives only in a current C++ scope
15:02:06  <indutny>and will remove persistent flag once destroyed
15:02:12  <creationix>ahh, the Handle's destructor
15:02:13  <indutny>while WeakCallback will stay in weak list
15:02:30  <indutny>hm...
15:02:39  <indutny>looks like it's not straight-forward
15:02:50  <creationix>so how do I create a permanent handle other than static handles at the file level?
15:03:06  <indutny>you can embed handle inside some static object
15:03:14  <indutny>or class
15:03:28  <indutny>it should remain live
15:03:31  <creationix>like a malloced uv_handle_t's data property?
15:03:38  <indutny>something like that
15:03:43  <indutny>but constructor should be called
15:03:49  <indutny>and destructor not
15:04:08  <creationix>handle->data = new Handle<Object>(myObj)
15:04:43  <creationix>and delete handle->data when I want it to be not persistent?
15:04:52  <indutny>yes
15:05:31  <indutny>what do you think about Value::SetWeakCallback
15:05:40  <creationix>that would be handy
15:05:46  <indutny>I think that too
15:06:04  <creationix>I'd really like Value::Ref() and Value::Unref()
15:06:12  <creationix>but I guess that doesn't make sense
15:06:20  <creationix>I need the handle to keep track of the Value
15:06:34  <indutny>that doesn't make sense
15:06:38  <indutny>you're right
15:06:43  <creationix>maybe Handle::Ref and Handle::Unref?
15:07:03  <creationix>hmm
15:07:18  <indutny>no
15:07:21  <creationix>I can't do what CWrapper does without creating a new structure
15:07:25  <creationix>I'd like to avoid that if possible
15:07:33  <creationix>but I can't think of a clean way to do it
15:08:30  <creationix>I guess I just won't make my objects weak till close is called
15:08:46  <creationix>or rather in onClose
15:08:51  <creationix>but that's the last callback to ever fire
15:08:56  <indutny>nono
15:08:58  <creationix>so I don't need a C++ persistent handle anymore
15:08:58  <indutny>that's not good
15:09:08  <indutny>you should set weak callback
15:09:21  <creationix>can you prevent it from cleaning in the weak callback
15:09:35  <indutny>and do Handle.Wrap in any action that need value to persist for some time
15:09:53  <indutny>brb
15:10:29  <creationix>I guess I don't understand what Wrap does
15:12:11  <indutny>you can create an "empty" handle
15:12:15  <indutny>without a pointer inside it
15:12:20  <indutny>and Wrap some pointer later
15:12:30  <creationix>so it's the same thing as what the constructor does then?
15:12:33  <indutny>that'll make that pointer persist (while handle itself is live)
15:12:39  <indutny>Wrap()? yes
15:12:57  <indutny>moved SetWeakCallback to Value class
15:12:59  <indutny>gtg
15:13:02  * indutnychanged nick to indutny_away
15:13:20  * indutny_awayshould be back in 30-40 minutes
15:15:40  * karterkjoined
15:15:49  <creationix>should I document the api in the header file or in a markdown file
15:16:06  <creationix>I'm thinking markdown
15:22:48  * karterk_joined
15:26:08  * karterkquit (Ping timeout: 255 seconds)
15:44:13  * karterkjoined
15:47:56  * karterk_quit (Ping timeout: 244 seconds)
15:48:04  <indutny_away>back
15:48:19  <indutny_away>creationix: may be both? :)
15:48:32  <indutny_away>one brief (header) and second full (markdown)
15:48:41  <creationix>perhaps
15:48:46  <creationix>examples in the markdown
15:48:58  <creationix>btw, is Value::tag meant to be used as public?
15:49:12  <creationix>I'm trying to switch on it instead of chaining if else using Is<T>
15:49:46  <creationix>I see it's a static on the class
15:49:51  <creationix>not a property on the instance
15:50:51  <indutny_away>creationix: tag won't work
15:51:03  <indutny_away>I may introduce Type() if you need that
15:51:47  <creationix>I just want a fast way to switch on type
15:53:16  <indutny_away>ok
15:53:20  <indutny_away>adding it atm
15:54:18  <indutny_away>creationix: done
15:54:29  <indutny_away>creationix: https://github.com/indutny/candor/commit/83e4073f403bd5d7df7c27c1d7b27d813d098bf7
15:55:07  <creationix>cool
15:55:21  * indutny_awaychanged nick to indutny
15:55:41  <creationix>kString
15:55:45  <creationix>src/cio.cc:25:9: error: �kString� was not declared in this scope
15:56:00  <indutny>creationix: ooops
15:56:03  <indutny>aah
15:56:05  <indutny>Value::kString
15:56:12  <creationix>ok
15:57:40  <creationix>cool, now I just have a lot of
15:57:40  <creationix>src/cio.cc:30:16: error: jump to case label [-fpermissive]
15:57:40  <creationix>src/cio.cc:26:13: error: crosses initialization of �candor::String* string�
15:57:51  <creationix>I guess that's dangerous somehow
15:58:01  <creationix>it didn't complain when it was chained it else
15:58:05  <creationix>*else if
15:58:09  <indutny>hehe
15:58:15  <indutny>wrap case bodies with "{" "}"
15:58:26  <creationix>ahh, right
16:13:22  <indutny>http://en.wikipedia.org/w/index.php?title=Candor_(programming_language)&action=edit&redlink=1
16:13:25  <indutny>:D
16:24:36  <indutny>http://en.wikipedia.org/wiki/Candor_(programming_language)
16:24:44  <indutny>creationix: ^ ;)
16:30:59  <creationix>:)
16:52:31  * indutnyquit (Ping timeout: 265 seconds)
16:56:44  * indutnyjoined
17:19:29  * mmalecki[away]changed nick to mmalecki
17:29:27  * indutnypart
17:41:05  * piscisaureus_quit (Ping timeout: 248 seconds)
17:44:07  * indutnyjoined
17:44:27  <indutny>kk
17:44:29  <indutny>ooops
17:44:34  <indutny>have I missed anything?
17:51:51  <creationix>I'm writing API docs
17:52:16  <creationix>https://gist.github.com/2150205
18:03:25  <indutny>creationix: cool!
18:04:41  <indutny>creationix: wooow, it looks awesome!
18:05:14  <creationix>indutny, you'll want to check it for inaccuracies, but I think I understand the API now
18:05:26  * karterkquit (Remote host closed the connection)
18:05:36  <creationix>I'm writing the Handle section now, not sure if I'll get to CWrapper today
18:05:46  <indutny>k
18:05:52  <creationix>since I don't use CWrapper anymore, I'm not sure the best way to use it
18:05:54  <indutny>I'm thinking about Function::New("asd")
18:05:59  <creationix>without length
18:06:02  <creationix>that's fine
18:06:02  <indutny>yes
18:06:38  <creationix>btw, Arguments is nothing like Array under the hood right?
18:06:51  <creationix>Arguments is an actual dense Value* array
18:07:22  <indutny>yes
18:07:35  <indutny>arguments are reversed on stack
18:07:49  <indutny>it's just to rewrite access to do negative lookups
18:07:54  <indutny>i.e [1] -> [-1]
18:08:48  <indutny>and
18:08:58  <indutny>function has an empty object as context by default
18:10:49  <indutny>"[email protected]!" … probably, better R0cks
18:10:57  <indutny>but that's not important
18:11:21  <indutny>arrays can hold only positive integer keys
18:11:34  <indutny>(going to add this restriction as a part of implementing dense arrays)
18:13:07  <indutny>man, that's gorgeous
18:13:11  <indutny>creationix++
18:13:15  <creationix>:)
18:13:16  <indutny>creationix: ++
18:13:17  <kohai>creationix has 3 cherry juices
18:13:17  <kohai>creationix has 4 cherry juices
18:13:53  <indutny>I think better put Handle part right after the Value definition
18:14:07  <creationix>Handle::IsEmpty(), could we reverse the logic?
18:14:09  <indutny>otherwise everyone will met GC issues
18:14:21  <creationix>usually I'm checking if there is a value, not if there isn't a value
18:14:31  <indutny>how should it be called then?
18:14:32  <creationix>unless you can think of other common use cases
18:14:40  <indutny>it's ok
18:14:45  <creationix>good point
18:14:48  <indutny>just give me a hint on naming
18:15:19  <creationix>I just ordered the sections like in the header
18:15:28  <creationix>but we can reorder based on order they need to be learned
18:15:35  <creationix>handles should go up top somewhere
18:15:48  <creationix>CWrapper goes after CData
18:16:07  <creationix>IsEmpty is fine, I can't think of a good name for reversed logic
18:16:22  <indutny>yeah
18:16:23  <indutny>me too
18:29:10  <creationix>indutny, ok, reordered the sections and wrote about handles
18:29:15  <creationix>now just have CWrapper left
18:29:38  <indutny>cool!
18:29:42  <indutny>s/rooted/root
18:30:53  <indutny>otherwise lgtm!
18:31:00  <indutny>really nice
18:37:50  <creationix>s/rooted/root/?
18:37:52  <creationix>where
18:38:06  <creationix>how about "Also handles mark a value as being GC in the root. This prevents them from being collected. This is required if your value isn't accessable from some already rooted value and you intend for it to stick around."
18:38:18  <creationix>hmm
18:38:40  <creationix>I've always heard the phrase "GC rooted" but maybe I'm wrong
18:45:18  <indutny>GC has roots
18:45:33  <indutny>some values that are definitely should remain after GC
18:45:39  <creationix>ok, so it adds it as a new GC root
18:45:43  <indutny>yes
18:45:48  <indutny>or adds value to the GC roots
18:45:58  <indutny>better latter one
18:46:15  <creationix>"Also handles mark a value as being a new GC root"
18:46:41  <indutny>sounds good
18:48:22  <creationix>ok, so on CWrapper, remind me how that's meant to be used
18:48:31  <creationix>class MyObject : public CWrapper
18:49:00  <creationix>Implement WeakCallback if I want to be notified?
18:49:05  <creationix>or implement the destructor
18:49:22  <indutny>nono
18:49:28  <indutny>implement destructor
18:49:30  <indutny>sorry
18:49:30  <indutny>gtg
18:49:31  <indutny>ttyl
18:49:47  <creationix>ok
19:03:43  <creationix>indutny, pushed to API.md
19:03:44  <creationix>:)
19:04:10  <creationix>https://github.com/indutny/candor/blob/master/API.md
19:19:43  <indutny>creationix: cool!
19:19:44  <indutny>thank you
19:20:17  <creationix>now back to cleaning up candor.io and getting that http server running
19:20:19  <creationix>it's getting close
19:27:45  <creationix>btw, the wikipedia article isn't good enough for them yet http://en.wikipedia.org/wiki/Candor_(programming_language)
19:27:58  <creationix>"It is proposed that this article be deleted because of the following concern: No evidence of notability"
19:30:30  <indutny>heh
19:30:44  <indutny>well, may be better fill it later
19:31:45  <creationix>yeah, it's a little early for candor
19:31:52  <creationix>I'm not even sure I can put luvit on there
19:31:58  <creationix>and rackspace is using it in production
19:32:19  * kohaiquit (Remote host closed the connection)
19:33:55  * kohaijoined
19:47:34  <indutny>yes
19:47:56  <indutny>agreed, that was hasty
19:48:00  <indutny>going to sleep
19:48:01  <indutny>ttyl
22:23:35  * piscisaureus_joined
23:16:56  * mmaleckichanged nick to mmalecki[zzz]