<< 14-07-2013 >>

00:01:43*DAddYE joined #nimrod
00:28:16*Trixar_za is now known as Trix[a]r_za
00:47:12*EXetoC quit (Quit: WeeChat 0.4.1)
01:15:30DAddYEnoob question is return size_t (in c) same of return int (in nimrod) ?
01:39:20reactormonkDAddYE, we don't really have a return, but they're usually the same size
01:39:41DAddYEyep I think is a uint
01:41:03*XAMPP_ quit (Ping timeout: 256 seconds)
02:06:21*q66 quit (Quit: Leaving)
02:24:25*DAddYE quit (Remote host closed the connection)
02:24:35*DAddYE joined #nimrod
02:24:39*DAddYE quit (Remote host closed the connection)
02:24:50*DAddYE joined #nimrod
02:24:54*DAddYE quit (Remote host closed the connection)
02:25:03*DAddYE joined #nimrod
02:25:09*DAddYE quit (Remote host closed the connection)
02:25:45*DAddYE joined #nimrod
02:29:50*DAddYE quit (Ping timeout: 240 seconds)
03:08:31*DAddYE joined #nimrod
03:08:35*DAddYE quit (Remote host closed the connection)
03:10:04*DAddYE_ joined #nimrod
03:10:33*fowl quit (Quit: EliteBNC free bnc service - http://elitebnc.org)
03:13:40*DAddYE_ quit (Remote host closed the connection)
03:14:08*DAddYE joined #nimrod
03:18:31*DAddYE quit (Ping timeout: 246 seconds)
03:38:02*fowl joined #nimrod
03:54:59*DAddYE joined #nimrod
03:55:03*DAddYE quit (Remote host closed the connection)
04:28:19*OrionPK quit (Quit: Leaving)
04:46:19*DAddYE joined #nimrod
05:22:36*DAddYE quit (Remote host closed the connection)
06:23:41*DAddYE joined #nimrod
06:30:45*DAddYE quit (Ping timeout: 264 seconds)
07:19:03*DAddYE joined #nimrod
07:19:44AraqDAddYE: wrapping size_t to int is the way to go
07:20:11DAddYEAraq: thanks man
07:37:01DAddYEAraq: what are your thoughts on this language design: https://github.com/luna/luna
07:37:05DAddYE?
07:41:44Araqthere is not much to have an opinion about on the site
07:43:07Araqthe most important parts are still not even implemented
07:43:08DAddYEthere are some interesting ideas like function chains
07:43:13DAddYEand https://github.com/luna/luna/blob/master/examples/fork.luna
07:43:45Araqyou can do the same with a prefix & operator in nimrod
07:44:31Araq"method chaining" looks exactly like nimrod's "method call syntax"
07:44:51DAddYEAraq: yea, I know that's why I like it I'm (trying to) code
07:45:22Araqalso ... tbh it looks amateurish
07:45:50DAddYEyea, vision media is a awesome Js coder
07:45:57DAddYEdon't know really about C
07:46:01Araqsince the todo list doesn't even mention "semantic checking" or "lookup rules" or ...
07:46:13Araqit's the old "all I need is a parser" mistake
07:46:34Araqmost of nimrod's compiler consists of semantic checking ...
07:47:15DAddYEI like a lot (except sensible case stuff that i killing me)
07:47:22DAddYENimrod syntax
07:47:24DAddYEATM
07:47:28DAddYEone of the best
07:48:01DAddYEthere are few edges to smooth but
07:48:46DAddYEI'm so a newbie that I don't want make suggestions unless I'm 9000 sure
07:48:57Araqgood ;-)
07:49:25DAddYEdid you look at llthread ?
07:49:59DAddYEcould be a simple thing to add cheap threads and some of the good go channels stuff
07:50:55Araqthese things require Gc interaction and are never "cheap" to add to Nimrod
07:51:16*DAddYE strangely got a uv.nim(836, 12) Error: redefinition of 'handle'
07:51:43DAddYEyep, other than actors do you have some things in mind for nimrod about multiproces/multithread ?
07:52:14Araqyeah, I have lots of things in mind
07:54:10Araqgetting the design right is not easy though
07:54:44DAddYEyep, I can't imagine but I can figure
07:56:01Araqhow many cpus do you have? how many has your smart phone?
07:56:44DAddYE16 and 4
07:56:57Araqcool
07:57:02DAddYE:D
07:57:18Araqnow do you think it makes sense to treat 16 cores like memory?
07:57:37AraqI don't :P
07:58:05Araqthis lightweight concurrency stuff is vastly overrated ...
07:59:49Araqespecially since concurrency is hard and you don't want to do it if you don't have to
07:59:50DAddYEdepends, sometimes you have tasks
08:00:12DAddYEexpensive, really expensive
08:00:25DAddYEyou can parallelize your code across cores
08:00:44DAddYEAraq: I like a lot but A LOT
08:00:48DAddYEclojure
08:01:03Araqwhy?
08:01:26Araqcommon lisp has been around for decades and doesn't use all of your RAM at startup ...
08:01:35DAddYEbecause I wasn't a fan of Lispy langs, honestly I hated it
08:02:02DAddYEbut honestly that's because no one showed me before the real power
08:02:10DAddYEaka, are more fun for academics
08:02:14DAddYEthan for real stuff
08:02:23DAddYE(I think Haskell now)
08:02:31DAddYEclojure totally different
08:02:41DAddYEis an horse born to work
08:02:42DAddYEhard
08:02:56DAddYEand the concurrency, STM and parallelism
08:03:02DAddYEis so simple that should be illegal
08:03:40DAddYEAraq: https://github.com/clojure/core.async/blob/master/examples/walkthrough.clj
08:04:46Araqif I want Lisp, I know where to find it
08:04:52DAddYEso why is different, because in few days a was able to, interface with ZeroMQ, interface with Kafka (log stream), process thousand of messages/s, generate aggregates
08:04:57DAddYErealtime
08:05:13DAddYEstore in a Postgres shit
08:05:20DAddYEand that's it
08:05:29DAddYEI don't know a language that could do that so simple
08:06:20DAddYE16 high reliable consumers working in parallel and at X point coordinating to merge data generate aggregates and so on
08:06:36DAddYEand ... I hate a lot java
08:07:08DAddYEso for me coding in clojure => lisp => javavm was like shooting my foots
08:07:08Araqif I were to target the JVM, I'd pick Scala over Clojure any day of the week
08:07:41DAddYEI would say that Clojure has much more to offer
08:07:49DAddYEI was in trouble too
08:08:05DAddYEbut you can learn clojure in few the language itself is pure art form
08:08:37DAddYEand again is an usable lisp not something to show to a friend to swag
08:09:18DAddYEbut really check how good parallel/concurrency processing in clojure
08:09:24DAddYEatomic operation, transactions
08:09:33DAddYEscala is a bit far IMHO in that point
08:09:34Araqwhat makes you think that I haven't?
08:09:56DAddYEI dont
08:12:56DAddYEAraq: what is your favorite lang (other than nimrod)?
08:14:05Araqdunno perhaps ML ;-)
08:14:33Araqbecause nobody knows it and yet it's Haskell done right (Haskell without the excessive and problematic laziness) :P
08:17:39DAddYEocaml?
08:18:27Araqocaml is bloated in comparison to ML
08:18:55DAddYEhaskell again look cool but ... I don't see it too much outside academia
08:19:08Araqmany people think all languages converge to Lisp
08:19:12AraqI disagree
08:19:21AraqI think they converge to ML ;-)
08:19:42Araqat least the static typing immutability stuff
08:20:09DAddYEand the nimrod syntax
08:20:09DAddYE:D
08:20:52DAddYElooks an hybrid (a good one) between ML and Python
08:21:08DAddYEfew more
08:21:28DAddYEmaybe pascal (but last time I code I was 12)
08:21:45Araqit's actually a mix of pascal, oberon, modula3 and python
08:22:18Araqthere is no ML influence because I didn't like ML when I started :P
08:22:54DAddYE:D
08:23:07DAddYEpascal IIRC case insensitive
08:23:15DAddYEthat's why
08:23:18DAddYE:D
08:32:52Araqyay we did it
08:32:58Araqbooting times for a phone
08:35:03DAddYEAraq: is c uint64_t in nimrod uint64 ?
08:35:14Araqyes
08:36:24DAddYEmmm
08:37:13AraqI'd use int64 though as I despise unsigned numbers ...
08:37:24Araq(beginning to see a pattern here?)
08:37:46DAddYEI hope no :D
08:38:06DAddYEI think there is something maybe with casting or FFI or ME
08:38:13DAddYEthat's is really strange
08:38:20DAddYEthis code https://gist.github.com/DAddYE/4292ff2622ce49832fb8
08:38:22DAddYEsuper simple
08:38:27*Associat0r joined #nimrod
08:38:27*Associat0r quit (Changing host)
08:38:27*Associat0r joined #nimrod
08:39:09DAddYEbasically is a timeout of 2s
08:39:26DAddYEbut the call create an interval of 2s
08:39:30DAddYEbasically it invert
08:39:40DAddYEhttps://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L5
08:39:51DAddYErepeat value with timeout value
08:40:09DAddYEand I'm sure: this code works in C, my lib is ok
08:40:27DAddYEsorry
08:40:41DAddYEi've a tipe uint64_t = uint64
08:49:01Araqsorry I have to go
08:49:03Araqbye
08:49:40DAddYEAraq: bye man and thanks!
09:20:44*DAddYE quit (Remote host closed the connection)
10:10:28*q66 joined #nimrod
10:26:13*DAddYE joined #nimrod
10:32:38*DAddYE quit (Ping timeout: 240 seconds)
10:48:06*EXetoC joined #nimrod
10:48:10EXetoCbeep
11:29:30*DAddYE joined #nimrod
11:36:58*DAddYE quit (Ping timeout: 276 seconds)
12:32:35*DAddYE joined #nimrod
12:39:31*DAddYE quit (Ping timeout: 256 seconds)
12:42:30EXetoCjoin, timeout, repeat
13:10:11EXetoCrange checks are great
13:17:55EXetoCI'm working on a GL 3+ engine if anyone is interested. it's only in 2D though, since I failed hard at writing 3D code a couple of months ago
13:18:14EXetoCnimgame should be good enough for most people though, but I don't know if it's up-to-date
13:18:20EXetoClater!
14:36:22*DAddYE joined #nimrod
14:43:03*DAddYE quit (Ping timeout: 256 seconds)
14:54:12*Mat2 joined #nimrod
14:54:17Mat2hello
14:54:44*OrionPK joined #nimrod
14:57:11EXetoChi
14:59:48Mat2hi, it seem to be a very basic question: how to define a castless pointer for storing the return address of alloc (size) ?
15:00:43EXetoC'pointer'?
15:01:18Mat2yes, I need an unmanaged pointer (because this memory is used for storing machine code)
15:02:08EXetoCalloc returns 'pointer' as you can see
15:03:19Mat2yes but it seems I can't define a variable of this type
15:04:13EXetoCI just tested it and it works
15:04:41Mat2can you show me your code (because I'm new to nimrod) ?
15:05:01EXetoCvar a: pointer
15:05:16EXetoCvar a = alloc.., var a: pointer = alloc..
15:05:49EXetoCeither of those three. you can use 'let' as well I think but then you have to initialize it
15:07:53Mat2var pTmp: pointer = alloc (100)
15:08:19Mat2Error: type mismatch: got (typedesc[uint16])
15:08:20Mat2but expected one of:
15:08:20Mat2system.alloc(size: int): pointer
15:08:50Mat2??
15:10:31EXetoCuint16, how?
15:10:44Mat2well, that's what puzzled me
15:10:46EXetoCvar a: pointer = alloc(0)
15:10:48EXetoCworks
15:12:04EXetoCso the error is not caused by something else?
15:12:56EXetoCbug maybe. who knows
15:13:24Mat2I'm testing, please wait a minute
15:14:33Mat2this error arrives only if I declare the pointer inside an object or structure
15:15:16fowlHuh
15:15:44fowlThe syntax is type foo = object
15:15:53fowl Myptr: pointer
15:16:14Mat2that's how I define it
15:16:43fowlPastebin plz
15:16:50Mat2I access the pointer variable inside a procedure this way:
15:17:35Mat2type
15:17:35Mat2 nbSize = uint16 # max. memory size (64 kB)
15:17:35Mat2 nbCell = uint8 # type of mcode array
15:17:35Mat2 nbPtr = pointer # pointer into this array
15:17:35Mat2 tNavmBackend = object of TObject
15:17:36Mat2 memSize: nbSize # allocated size for mcode
15:17:38Mat2 codeSize: nbSize # memory in use
15:17:40Mat2 pActAdr: nbPtr # pointer to first free byte
15:17:42Mat2 pMem: nbPtr # pointer into mcode array
15:17:44Mat2 vD: uint8 # virtual data-stack depth
15:17:46Mat2 vR: uint8 # virtual adress-stack depth
15:17:48Mat2 vT: navmUCell # virtual top-of-stack value
15:17:56OrionPKpasteBIN
15:17:57OrionPK:P
15:18:20Mat2proc navmBackendInit* (o: var tNavmBackend, size: nbSize) =
15:18:20Mat2 try:
15:18:20Mat2 o.pMem = alloc (nbSize) # allocate mcode array
15:18:20Mat2 o.memSize = nbSize # save array size
15:18:20Mat2 o.codeSize = 0 # initial code start at: 0
15:18:21Mat2 o.pActAdr = o.pMem # initial: pMem = pActAdr
15:18:43Mat2^o.pMem causes the error
15:19:48EXetoCyes, a type description
15:20:12fowlNbsize is uint16
15:20:13EXetoCand yes, pastebin if > 3 lines or so
15:20:26fowlAlloc(size)
15:21:05fowlU might need int(size)
15:22:17Mat2sadly no, the conversion is invalid
15:23:00EXetoCnbSize is a type, not a var, hence the typedesc
15:23:34Mat2outch, silly error, thanks
15:24:04Mat2that's because I'm programming too much in concatentative languages
15:24:25EXetoCit is accurate
15:28:01EXetoCnm, I misread
15:31:38Mat2in newer, stack languages accessing parameters is applied though a type description, not a symbolic reference
15:34:42Mat2su duplicating the first stack value for example would be something like:
15:35:25Mat2i64 * :multi (multiplicate TOS and convert to integer on-the-fly)
15:37:28Mat2-2.5e2 multi would multiplicate -2.5e2 with itself and round the result to an integer
15:39:29*DAddYE joined #nimrod
15:46:34*DAddYE quit (Ping timeout: 276 seconds)
15:48:12*gradha joined #nimrod
15:55:37Mat2ok, my conversion seems to work, thanks ExetoC and fowl
16:09:44Mat2ehm, exist there a procedure for returning to the os (like halt) ?
16:09:55gradhaquit()
16:09:59Mat2thanks
16:10:09gradhaoptionally pass a message and error code, docs in the system module
16:30:04EXetoCthere's no way to get the byte offset of fields, right? maybe I asked that before
16:30:55gradhawild guess, maybe something like addr(o.field) - addr(o)?
16:33:36EXetoCthat's better than nothing
16:34:46gradhamaybe you can nag Araq to add this feature at compile time, so you can query the byte offset passing a type without having to create an object first, and use the result as a const
16:38:54EXetoCdoesn't the syntax have to be extended? anyway, I'll open an issue some time
16:40:37gradhano idea, maybe addr could be made to work on types, so addr(T) would return zero, and addr(T.field) would return the offset
16:41:32gradhaheh, maybe it already works like this
16:42:45*DAddYE joined #nimrod
16:49:18*DAddYE quit (Ping timeout: 245 seconds)
17:41:20Araqthe proper way is to introduce an offsetof builtin; however the compiler doesn't compute offsets properly so it's left to the C compiler
17:41:46Araqit's a bug that has to be fixed for the compiletime FFI however
17:43:22Mat2Araq: Is pointer access possible though type casting like in C ?
17:44:08Araqsure
17:45:22Araqbtw I changed my plans and I'm now working on a register based VM; so computed gotos will soon be ready
17:45:53gradhacomputed gotos sound fascinating
17:45:53*DAddYE joined #nimrod
17:46:00gradhawhat are computed gotos?
17:46:09Mat2as long as I can use computed gotos that's fine *g*
17:46:20gradhahttps://en.wikipedia.org/wiki/Computed_goto#Computed_GOTO ?
17:46:47Araqgradha: yep
17:47:39Araqnimrod will support the feature in a completely different way though as "goto" would screw up my dataflow analysers ;-)
17:48:06gradhamaybe you should name them computed jumps to avoid confusion
17:48:22Mat2I think that would be a good idea
17:48:26gradhacomputed sidesteps sounds more dance like
17:48:52gradha"miss instruction, fancy a quick sidestep?"
17:49:55Mat2incrementing a pointer variable resulting in pointing to the next byte in memory or addressing the next word ?
17:50:08*DAddYE quit (Ping timeout: 245 seconds)
17:50:32AraqMat2: neither, it's not supported
17:52:04Araqyou need to do: template `+=`(x: pointer, bytes: int) = x = cast[pointer](cast[TAdress](x) + bytes)
17:52:23Araqfowl has a module for it though
17:52:29Mat2thanks
17:55:36AraqMat2: strangely a register based VM is easier to implement than a stack based one ... much harder to screw up the operand order
17:55:57Araqplus you get a max frame size limit for free
17:59:27Araqalso it enables fixed size instructions which make the mapping 'instruction -> debuginfo' trivial
17:59:27Mat2a register VM has some advantages if you prefer JIT compilation without SSA-based optimization. I just want to node that stack-based vm code is already in a special SSA form so the time-intense convertion to it can be avoided
18:02:03Mat2for interpretation I found no advantages. In case of dynamic compilation I know an register-based VM for a forth dialect which works well
18:02:57Mat2probably the best approach depends more on the language or application
18:03:18Araqwell forth is a special case since it's stack based :P
18:03:28Mat2yes
18:03:43Araqbut most languages prefer to name the locations
18:03:53Araqand then a register based VM wins
18:06:27comexMat2: are you sure about that?
18:07:11comexwell, i guess the kind of code that is generated for a stack based VM, as opposed to what a human might write
18:07:32Mat2comex: That stack based interpreters can be of advantage against register-absed ones ?
18:07:36comexbut if you want SSA, you might as well just use SSA in the first place
18:07:45comexthat they can be converted to SSA form more quickly
18:07:59Mat2^based
18:09:34AraqMat2: how do you store the debug info?
18:12:24Mat2my system interpreting the source dynamical at typing (of token by token from file) with implicite error checking. This affecting also optimization (like dynamic register-allocation because the source is alreads stack=SSA based)
18:12:33Mat2^or
18:13:29Mat2the vm is only an immediate-language layer for gluing machine-code (ether though threaded dispatching or native-code compilation)
18:13:47Mat2that's very typical for forth systems
18:14:26Mat2^glueing
18:14:34Mat2(or ever this word is written)
18:14:55Mat2so I have no need for storing debug infos
18:17:01Mat2it's an interpretative system inside an dynamic envirionment, not a static compiler
18:19:16Mat2(as programming in forth means extending the sytax with a specific language which implicite solves a set of related problems)
18:23:19Mat2very different fromt the nimrod compiler for sure
18:23:24Mat2^from
18:27:37Mat2comex: do you know LLVM ?
18:32:13AraqMat2: who doesn't? ;-)
18:34:05EXetoCnom nom
18:34:07EXetoCI don't!
18:34:21comexMat2: yep
18:46:12gradhaI heard children grow faster if they add LLVM to their cereals
18:47:02*DAddYE joined #nimrod
18:51:16*DAddYE quit (Ping timeout: 246 seconds)
19:00:34EXetoCbroken client
19:01:57Mat2*lol*
19:04:48EXetoCI'll use it some day if someone ever creates a wrapper for it. I can't be bothered with either C or C++ :>
19:07:28EXetoCor I could just compile to C
19:08:16EXetoCAraq: does the language originate all the way back to 2004?
19:10:07EXetoCand how many people know about the internals? 3?
19:10:24AraqEXetoC: I think so ... ;-) it's hard to tell as I have no records
19:10:45EXetoCdang
19:11:29gradhaand from those three only Araq keeps working every day, rainy or sunny
19:12:16EXetoCright
19:12:28Araqand about the internals ... 2-3 sounds about right
19:13:01Araqdunno why though, I don't use any fancy algorithms :P
19:15:04gradhainternals sounds scary, like something people dressed in white rip out of you if you go to a hospital
19:15:34Mat2gwet some sleep, ciao
19:15:46EXetoCgood luck
19:16:10*Mat2 quit (Quit: Verlassend)
19:17:08EXetoCit takes time I guess
19:17:35Araqwell that most of it has been translated from Pascal doesn't help I guess
19:18:13Araqthough I should have touched by hand every piece by now
19:18:56EXetoCthe impl?
19:19:20Araqthe compiler, yeah
19:19:52EXetoCand is that the language that has influenced Nimrod and Rust in some ways? where does the 'do' notation for example come from?
19:20:36Araqthe 'do' notation is zahary's work :-)
19:20:52Araqbtw I'm looking at old files now
19:20:55EXetoCok
19:21:10Araqand I thiink it's safe to say most of it started in 2008, not 2004
19:22:32Araqon the other hand first bootstrap was 2008-08-22 ...
19:22:54Araqand it took a while to get there ... so I don't know ...
19:27:10*Araq thinks only the lexer is from 2004
19:30:17*Araq thinks the lexer is an adaption from an old preprocessor Araq wrote in 2003
19:30:53*jbe_ joined #nimrod
19:34:05Araqwb jbe_
19:34:52jbe_hellu :)
19:37:54EXetoCoh
19:39:13jbe_thanks for a nice language
19:40:19AraqEXetoC: I am a fan of: http://www.joelonsoftware.com/articles/fog0000000069.html :-)
19:42:39gradhait's a nice argument to have in favor of using llvm rather than writing your own
19:43:39Araqgradha: are you referring to my JS codegen? :P
19:44:02gradhaof course not!
19:44:18gradhahaven't even used it, can't have problems with it
19:45:03EXetoCI know when my code really sucks though, but I try to get it right the first time now :>
19:45:10EXetoCand I don't suck as much anymore, which helps I guess
19:46:51Araqwell he refers to big projects obviously
19:47:50EXetoCyeah, I wouldn't bother. takes too long
19:49:45*DAddYE joined #nimrod
19:50:57EXetoCDAddYE: different host? maybe a less bad IRC client then too :>
19:53:50*DAddYE quit (Ping timeout: 240 seconds)
19:54:12EXetoCnope
20:01:03*DAddYE joined #nimrod
20:01:23EXetoCDAddYE: HEY
20:01:35DAddYEEXetoC: hey!
20:02:33EXetoCDAddYE: you time out after 5 min, and then you join after an hour. crappy client?
20:03:47DAddYEEXetoC: crappy comcast
20:08:15EXetoCand a very conservative reconnect setting. got it :>
20:11:25EXetoCit happens at a regular interval though
20:14:36*DAddYE quit (Read error: No route to host)
20:14:51*DAddYE joined #nimrod
20:33:00*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again)
20:45:09*EXetoC quit (Read error: Connection reset by peer)
20:47:41*EXetoC joined #nimrod
20:48:25AraqEXetoC: you reconnected. crappy client? :P
20:52:00EXetoCAraq: yeah, it doesn't deal with system crashes very well
20:52:46*Araq tries to guess EXetoC's OS from the description "crash" ... and fails.
20:53:19EXetoClunix
20:58:36Araqreal system crash? or "only" X11?
20:59:46EXetoCI had to reboot. otherwise, tmux would've kept the client alive
20:59:59Araqit nicley shows the advantages of microkernels; only X11 crashes and that's a relief for a desktop system because then all the other stuff keeps working
21:00:25Araqunfortunately I don't run any other stuff on the desktop ...
21:00:29AraqXD
21:15:52dom96Interesting, debian has a problem with switching to systemd because *bsd doesn't support '/proc/$PID/exe': people.debian.org/~stapelberg//2013/07/13/systemd-not-portable.html
21:16:41*Trix[a]r_za is now known as Trixar_za
21:22:10EXetoCyup. stupid DOS and Windows 3.1 :p
21:23:52AraqDOS never crashed though
21:24:51Araqit had to little EMX memory for to be able to crash
22:02:18*EXetoC quit (Quit: WeeChat 0.4.1)
22:31:59DAddYEAraq: hiiiii
22:32:18DAddYEAraq: did have Nimrod ffi some problems with uint64 ?
22:32:21DAddYEAraq: https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L5
22:32:36DAddYEAraq: and https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L12
22:33:01DAddYEnimrod seems to invert timeout with repeat
22:33:53Araqseems possible, I told you to use int64 instead
22:34:36DAddYEtried, but no luck
22:34:48Araqthen it's something else :P
22:35:18*Max00355 quit (Quit: WeeChat 0.3.8)
22:35:49DAddYEplease point me where, I'm struggling from 2 night to get it working
22:36:23Araqwhat OS are you on?
22:36:28DAddYEosx
22:37:33Araqhttps://github.com/joyent/libuv/pull/710
22:37:53Araqbut I guess that's not relevant
22:39:00Araqbtw https://groups.google.com/forum/#!topic/nodejs/eDYq0XBz3ZA lists the arguments as 'int64_t'
22:39:11DAddYEhttps://github.com/joyent/libuv/blob/v0.11.5/include/uv.h#L1269-L1272
22:39:15DAddYEis the call
22:40:11AraqTTimerCb MUST not be a closure
22:40:41Araqmark it as {.cdecl.} explicitly
22:41:23DAddYEso only this https://gist.github.com/DAddYE/4292ff2622ce49832fb8
22:42:32Araqagain
22:42:44AraqTTimerCb MUST not be a closure
22:43:06Araquv_timer_start/init has nothing to do with TTimerCb's declaration
22:43:36DAddYEhaaaaaaaaa
22:43:59DAddYEAraq: https://gist.github.com/DAddYE/4292ff2622ce49832fb8 ?
22:44:46DAddYEis this the correct way?
22:49:56Araqthat ... or you can add the cdecl to the TTimerCb definition
22:51:09DAddYEAraq: yep
22:51:19DAddYEcool
22:51:25DAddYEnow seems to "work"
22:52:10Araqdon't you do {.push callConv:cdecl.} in your wrapper?
22:54:35DAddYEno, I've it in all my Closures but for unknown reason was not on TTimerCB
22:54:40DAddYE-.-'
22:55:01Araqok then it's no bug
22:55:05Araq*no compiler bug
22:55:28Araqthough again it could be smarter ... it's unlikely you want .closure for a wrapper
22:56:04DAddYEAraq: yep thanks a looooooooot!
22:56:14DAddYEeverything now seems pretty well
22:56:42DAddYEI've only an minor annoying thing, when I call timer_start ..bla.., 1000, 1000
22:57:01DAddYEtimer.timout = 24681255
22:57:04Araqmake a feature request, it's 2 lines of code to add a warning
22:57:12DAddYEtimer.repeat => 1000
22:57:22DAddYEbut the timeout works after 1000
22:57:33DAddYEso 24681255 is a wrong casting
22:57:51DAddYEtried to add at top uint64 = int64
22:57:59DAddYEjust in case but is the same
22:58:11Araqdunno what you mean
22:59:45DAddYEAraq: here => https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L8
23:00:16DAddYEif I check my field TTimer.timeout I expect to be 2000
23:00:24DAddYEbut is a strange int value
23:00:33DAddYElike 24681255
23:00:52DAddYEBUT, it's fired exactly at 2s
23:00:56Araqso?
23:00:59DAddYEso is a problem of casting
23:01:03DAddYE(I guess)
23:01:05Araqno
23:01:15DAddYEwhat can be?
23:01:17Araqthe library translates it to "ticks" or whatever
23:01:35AraqI don't think you should mess with its internal datastructures
23:01:58Araqif it's fired at 2s it's all fine
23:02:02DAddYEAraq: ok
23:02:09DAddYEmakes senses
23:02:13DAddYEthanks a lot
23:02:40AraqI have to sleep now
23:02:43Araqgood night
23:04:05DAddYEAraq: check the email before !!! :D
23:04:38Araqwow
23:04:41Araqawesome, thanks
23:05:16Araqso now you're paying our server :-)
23:05:39DAddYEhahaha great
23:05:48DAddYEthanks a lot for your time
23:05:53DAddYEI really appreciate!
23:06:28Araqtbh it makes me proud to be able to debug your code without seeing most of it, nor running it
23:14:07*jbe_ quit (Quit: Leaving)