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:30 | DAddYE | noob question is return size_t (in c) same of return int (in nimrod) ? |
01:39:20 | reactormonk | DAddYE, we don't really have a return, but they're usually the same size |
01:39:41 | DAddYE | yep 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:44 | Araq | DAddYE: wrapping size_t to int is the way to go |
07:20:11 | DAddYE | Araq: thanks man |
07:37:01 | DAddYE | Araq: what are your thoughts on this language design: https://github.com/luna/luna |
07:37:05 | DAddYE | ? |
07:41:44 | Araq | there is not much to have an opinion about on the site |
07:43:07 | Araq | the most important parts are still not even implemented |
07:43:08 | DAddYE | there are some interesting ideas like function chains |
07:43:13 | DAddYE | and https://github.com/luna/luna/blob/master/examples/fork.luna |
07:43:45 | Araq | you can do the same with a prefix & operator in nimrod |
07:44:31 | Araq | "method chaining" looks exactly like nimrod's "method call syntax" |
07:44:51 | DAddYE | Araq: yea, I know that's why I like it I'm (trying to) code |
07:45:22 | Araq | also ... tbh it looks amateurish |
07:45:50 | DAddYE | yea, vision media is a awesome Js coder |
07:45:57 | DAddYE | don't know really about C |
07:46:01 | Araq | since the todo list doesn't even mention "semantic checking" or "lookup rules" or ... |
07:46:13 | Araq | it's the old "all I need is a parser" mistake |
07:46:34 | Araq | most of nimrod's compiler consists of semantic checking ... |
07:47:15 | DAddYE | I like a lot (except sensible case stuff that i killing me) |
07:47:22 | DAddYE | Nimrod syntax |
07:47:24 | DAddYE | ATM |
07:47:28 | DAddYE | one of the best |
07:48:01 | DAddYE | there are few edges to smooth but |
07:48:46 | DAddYE | I'm so a newbie that I don't want make suggestions unless I'm 9000 sure |
07:48:57 | Araq | good ;-) |
07:49:25 | DAddYE | did you look at llthread ? |
07:49:59 | DAddYE | could be a simple thing to add cheap threads and some of the good go channels stuff |
07:50:55 | Araq | these 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:43 | DAddYE | yep, other than actors do you have some things in mind for nimrod about multiproces/multithread ? |
07:52:14 | Araq | yeah, I have lots of things in mind |
07:54:10 | Araq | getting the design right is not easy though |
07:54:44 | DAddYE | yep, I can't imagine but I can figure |
07:56:01 | Araq | how many cpus do you have? how many has your smart phone? |
07:56:44 | DAddYE | 16 and 4 |
07:56:57 | Araq | cool |
07:57:02 | DAddYE | :D |
07:57:18 | Araq | now do you think it makes sense to treat 16 cores like memory? |
07:57:37 | Araq | I don't :P |
07:58:05 | Araq | this lightweight concurrency stuff is vastly overrated ... |
07:59:49 | Araq | especially since concurrency is hard and you don't want to do it if you don't have to |
07:59:50 | DAddYE | depends, sometimes you have tasks |
08:00:12 | DAddYE | expensive, really expensive |
08:00:25 | DAddYE | you can parallelize your code across cores |
08:00:44 | DAddYE | Araq: I like a lot but A LOT |
08:00:48 | DAddYE | clojure |
08:01:03 | Araq | why? |
08:01:26 | Araq | common lisp has been around for decades and doesn't use all of your RAM at startup ... |
08:01:35 | DAddYE | because I wasn't a fan of Lispy langs, honestly I hated it |
08:02:02 | DAddYE | but honestly that's because no one showed me before the real power |
08:02:10 | DAddYE | aka, are more fun for academics |
08:02:14 | DAddYE | than for real stuff |
08:02:23 | DAddYE | (I think Haskell now) |
08:02:31 | DAddYE | clojure totally different |
08:02:41 | DAddYE | is an horse born to work |
08:02:42 | DAddYE | hard |
08:02:56 | DAddYE | and the concurrency, STM and parallelism |
08:03:02 | DAddYE | is so simple that should be illegal |
08:03:40 | DAddYE | Araq: https://github.com/clojure/core.async/blob/master/examples/walkthrough.clj |
08:04:46 | Araq | if I want Lisp, I know where to find it |
08:04:52 | DAddYE | so 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:57 | DAddYE | realtime |
08:05:13 | DAddYE | store in a Postgres shit |
08:05:20 | DAddYE | and that's it |
08:05:29 | DAddYE | I don't know a language that could do that so simple |
08:06:20 | DAddYE | 16 high reliable consumers working in parallel and at X point coordinating to merge data generate aggregates and so on |
08:06:36 | DAddYE | and ... I hate a lot java |
08:07:08 | DAddYE | so for me coding in clojure => lisp => javavm was like shooting my foots |
08:07:08 | Araq | if I were to target the JVM, I'd pick Scala over Clojure any day of the week |
08:07:41 | DAddYE | I would say that Clojure has much more to offer |
08:07:49 | DAddYE | I was in trouble too |
08:08:05 | DAddYE | but you can learn clojure in few the language itself is pure art form |
08:08:37 | DAddYE | and again is an usable lisp not something to show to a friend to swag |
08:09:18 | DAddYE | but really check how good parallel/concurrency processing in clojure |
08:09:24 | DAddYE | atomic operation, transactions |
08:09:33 | DAddYE | scala is a bit far IMHO in that point |
08:09:34 | Araq | what makes you think that I haven't? |
08:09:56 | DAddYE | I dont |
08:12:56 | DAddYE | Araq: what is your favorite lang (other than nimrod)? |
08:14:05 | Araq | dunno perhaps ML ;-) |
08:14:33 | Araq | because nobody knows it and yet it's Haskell done right (Haskell without the excessive and problematic laziness) :P |
08:17:39 | DAddYE | ocaml? |
08:18:27 | Araq | ocaml is bloated in comparison to ML |
08:18:55 | DAddYE | haskell again look cool but ... I don't see it too much outside academia |
08:19:08 | Araq | many people think all languages converge to Lisp |
08:19:12 | Araq | I disagree |
08:19:21 | Araq | I think they converge to ML ;-) |
08:19:42 | Araq | at least the static typing immutability stuff |
08:20:09 | DAddYE | and the nimrod syntax |
08:20:09 | DAddYE | :D |
08:20:52 | DAddYE | looks an hybrid (a good one) between ML and Python |
08:21:08 | DAddYE | few more |
08:21:28 | DAddYE | maybe pascal (but last time I code I was 12) |
08:21:45 | Araq | it's actually a mix of pascal, oberon, modula3 and python |
08:22:18 | Araq | there is no ML influence because I didn't like ML when I started :P |
08:22:54 | DAddYE | :D |
08:23:07 | DAddYE | pascal IIRC case insensitive |
08:23:15 | DAddYE | that's why |
08:23:18 | DAddYE | :D |
08:32:52 | Araq | yay we did it |
08:32:58 | Araq | booting times for a phone |
08:35:03 | DAddYE | Araq: is c uint64_t in nimrod uint64 ? |
08:35:14 | Araq | yes |
08:36:24 | DAddYE | mmm |
08:37:13 | Araq | I'd use int64 though as I despise unsigned numbers ... |
08:37:24 | Araq | (beginning to see a pattern here?) |
08:37:46 | DAddYE | I hope no :D |
08:38:06 | DAddYE | I think there is something maybe with casting or FFI or ME |
08:38:13 | DAddYE | that's is really strange |
08:38:20 | DAddYE | this code https://gist.github.com/DAddYE/4292ff2622ce49832fb8 |
08:38:22 | DAddYE | super simple |
08:38:27 | * | Associat0r joined #nimrod |
08:38:27 | * | Associat0r quit (Changing host) |
08:38:27 | * | Associat0r joined #nimrod |
08:39:09 | DAddYE | basically is a timeout of 2s |
08:39:26 | DAddYE | but the call create an interval of 2s |
08:39:30 | DAddYE | basically it invert |
08:39:40 | DAddYE | https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L5 |
08:39:51 | DAddYE | repeat value with timeout value |
08:40:09 | DAddYE | and I'm sure: this code works in C, my lib is ok |
08:40:27 | DAddYE | sorry |
08:40:41 | DAddYE | i've a tipe uint64_t = uint64 |
08:49:01 | Araq | sorry I have to go |
08:49:03 | Araq | bye |
08:49:40 | DAddYE | Araq: 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:10 | EXetoC | beep |
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:30 | EXetoC | join, timeout, repeat |
13:10:11 | EXetoC | range checks are great |
13:17:55 | EXetoC | I'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:14 | EXetoC | nimgame should be good enough for most people though, but I don't know if it's up-to-date |
13:18:20 | EXetoC | later! |
14:36:22 | * | DAddYE joined #nimrod |
14:43:03 | * | DAddYE quit (Ping timeout: 256 seconds) |
14:54:12 | * | Mat2 joined #nimrod |
14:54:17 | Mat2 | hello |
14:54:44 | * | OrionPK joined #nimrod |
14:57:11 | EXetoC | hi |
14:59:48 | Mat2 | hi, it seem to be a very basic question: how to define a castless pointer for storing the return address of alloc (size) ? |
15:00:43 | EXetoC | 'pointer'? |
15:01:18 | Mat2 | yes, I need an unmanaged pointer (because this memory is used for storing machine code) |
15:02:08 | EXetoC | alloc returns 'pointer' as you can see |
15:03:19 | Mat2 | yes but it seems I can't define a variable of this type |
15:04:13 | EXetoC | I just tested it and it works |
15:04:41 | Mat2 | can you show me your code (because I'm new to nimrod) ? |
15:05:01 | EXetoC | var a: pointer |
15:05:16 | EXetoC | var a = alloc.., var a: pointer = alloc.. |
15:05:49 | EXetoC | either of those three. you can use 'let' as well I think but then you have to initialize it |
15:07:53 | Mat2 | var pTmp: pointer = alloc (100) |
15:08:19 | Mat2 | Error: type mismatch: got (typedesc[uint16]) |
15:08:20 | Mat2 | but expected one of: |
15:08:20 | Mat2 | system.alloc(size: int): pointer |
15:08:50 | Mat2 | ?? |
15:10:31 | EXetoC | uint16, how? |
15:10:44 | Mat2 | well, that's what puzzled me |
15:10:46 | EXetoC | var a: pointer = alloc(0) |
15:10:48 | EXetoC | works |
15:12:04 | EXetoC | so the error is not caused by something else? |
15:12:56 | EXetoC | bug maybe. who knows |
15:13:24 | Mat2 | I'm testing, please wait a minute |
15:14:33 | Mat2 | this error arrives only if I declare the pointer inside an object or structure |
15:15:16 | fowl | Huh |
15:15:44 | fowl | The syntax is type foo = object |
15:15:53 | fowl | Myptr: pointer |
15:16:14 | Mat2 | that's how I define it |
15:16:43 | fowl | Pastebin plz |
15:16:50 | Mat2 | I access the pointer variable inside a procedure this way: |
15:17:35 | Mat2 | type |
15:17:35 | Mat2 | nbSize = uint16 # max. memory size (64 kB) |
15:17:35 | Mat2 | nbCell = uint8 # type of mcode array |
15:17:35 | Mat2 | nbPtr = pointer # pointer into this array |
15:17:35 | Mat2 | tNavmBackend = object of TObject |
15:17:36 | Mat2 | memSize: nbSize # allocated size for mcode |
15:17:38 | Mat2 | codeSize: nbSize # memory in use |
15:17:40 | Mat2 | pActAdr: nbPtr # pointer to first free byte |
15:17:42 | Mat2 | pMem: nbPtr # pointer into mcode array |
15:17:44 | Mat2 | vD: uint8 # virtual data-stack depth |
15:17:46 | Mat2 | vR: uint8 # virtual adress-stack depth |
15:17:48 | Mat2 | vT: navmUCell # virtual top-of-stack value |
15:17:56 | OrionPK | pasteBIN |
15:17:57 | OrionPK | :P |
15:18:20 | Mat2 | proc navmBackendInit* (o: var tNavmBackend, size: nbSize) = |
15:18:20 | Mat2 | try: |
15:18:20 | Mat2 | o.pMem = alloc (nbSize) # allocate mcode array |
15:18:20 | Mat2 | o.memSize = nbSize # save array size |
15:18:20 | Mat2 | o.codeSize = 0 # initial code start at: 0 |
15:18:21 | Mat2 | o.pActAdr = o.pMem # initial: pMem = pActAdr |
15:18:43 | Mat2 | ^o.pMem causes the error |
15:19:48 | EXetoC | yes, a type description |
15:20:12 | fowl | Nbsize is uint16 |
15:20:13 | EXetoC | and yes, pastebin if > 3 lines or so |
15:20:26 | fowl | Alloc(size) |
15:21:05 | fowl | U might need int(size) |
15:22:17 | Mat2 | sadly no, the conversion is invalid |
15:23:00 | EXetoC | nbSize is a type, not a var, hence the typedesc |
15:23:34 | Mat2 | outch, silly error, thanks |
15:24:04 | Mat2 | that's because I'm programming too much in concatentative languages |
15:24:25 | EXetoC | it is accurate |
15:28:01 | EXetoC | nm, I misread |
15:31:38 | Mat2 | in newer, stack languages accessing parameters is applied though a type description, not a symbolic reference |
15:34:42 | Mat2 | su duplicating the first stack value for example would be something like: |
15:35:25 | Mat2 | i64 * :multi (multiplicate TOS and convert to integer on-the-fly) |
15:37:28 | Mat2 | -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:37 | Mat2 | ok, my conversion seems to work, thanks ExetoC and fowl |
16:09:44 | Mat2 | ehm, exist there a procedure for returning to the os (like halt) ? |
16:09:55 | gradha | quit() |
16:09:59 | Mat2 | thanks |
16:10:09 | gradha | optionally pass a message and error code, docs in the system module |
16:30:04 | EXetoC | there's no way to get the byte offset of fields, right? maybe I asked that before |
16:30:55 | gradha | wild guess, maybe something like addr(o.field) - addr(o)? |
16:33:36 | EXetoC | that's better than nothing |
16:34:46 | gradha | maybe 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:54 | EXetoC | doesn't the syntax have to be extended? anyway, I'll open an issue some time |
16:40:37 | gradha | no 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:32 | gradha | heh, maybe it already works like this |
16:42:45 | * | DAddYE joined #nimrod |
16:49:18 | * | DAddYE quit (Ping timeout: 245 seconds) |
17:41:20 | Araq | the 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:46 | Araq | it's a bug that has to be fixed for the compiletime FFI however |
17:43:22 | Mat2 | Araq: Is pointer access possible though type casting like in C ? |
17:44:08 | Araq | sure |
17:45:22 | Araq | btw I changed my plans and I'm now working on a register based VM; so computed gotos will soon be ready |
17:45:53 | gradha | computed gotos sound fascinating |
17:45:53 | * | DAddYE joined #nimrod |
17:46:00 | gradha | what are computed gotos? |
17:46:09 | Mat2 | as long as I can use computed gotos that's fine *g* |
17:46:20 | gradha | https://en.wikipedia.org/wiki/Computed_goto#Computed_GOTO ? |
17:46:47 | Araq | gradha: yep |
17:47:39 | Araq | nimrod will support the feature in a completely different way though as "goto" would screw up my dataflow analysers ;-) |
17:48:06 | gradha | maybe you should name them computed jumps to avoid confusion |
17:48:22 | Mat2 | I think that would be a good idea |
17:48:26 | gradha | computed sidesteps sounds more dance like |
17:48:52 | gradha | "miss instruction, fancy a quick sidestep?" |
17:49:55 | Mat2 | incrementing 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:32 | Araq | Mat2: neither, it's not supported |
17:52:04 | Araq | you need to do: template `+=`(x: pointer, bytes: int) = x = cast[pointer](cast[TAdress](x) + bytes) |
17:52:23 | Araq | fowl has a module for it though |
17:52:29 | Mat2 | thanks |
17:55:36 | Araq | Mat2: strangely a register based VM is easier to implement than a stack based one ... much harder to screw up the operand order |
17:55:57 | Araq | plus you get a max frame size limit for free |
17:59:27 | Araq | also it enables fixed size instructions which make the mapping 'instruction -> debuginfo' trivial |
17:59:27 | Mat2 | a 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:03 | Mat2 | for 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:57 | Mat2 | probably the best approach depends more on the language or application |
18:03:18 | Araq | well forth is a special case since it's stack based :P |
18:03:28 | Mat2 | yes |
18:03:43 | Araq | but most languages prefer to name the locations |
18:03:53 | Araq | and then a register based VM wins |
18:06:27 | comex | Mat2: are you sure about that? |
18:07:11 | comex | well, i guess the kind of code that is generated for a stack based VM, as opposed to what a human might write |
18:07:32 | Mat2 | comex: That stack based interpreters can be of advantage against register-absed ones ? |
18:07:36 | comex | but if you want SSA, you might as well just use SSA in the first place |
18:07:45 | comex | that they can be converted to SSA form more quickly |
18:07:59 | Mat2 | ^based |
18:09:34 | Araq | Mat2: how do you store the debug info? |
18:12:24 | Mat2 | my 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:33 | Mat2 | ^or |
18:13:29 | Mat2 | the vm is only an immediate-language layer for gluing machine-code (ether though threaded dispatching or native-code compilation) |
18:13:47 | Mat2 | that's very typical for forth systems |
18:14:26 | Mat2 | ^glueing |
18:14:34 | Mat2 | (or ever this word is written) |
18:14:55 | Mat2 | so I have no need for storing debug infos |
18:17:01 | Mat2 | it's an interpretative system inside an dynamic envirionment, not a static compiler |
18:19:16 | Mat2 | (as programming in forth means extending the sytax with a specific language which implicite solves a set of related problems) |
18:23:19 | Mat2 | very different fromt the nimrod compiler for sure |
18:23:24 | Mat2 | ^from |
18:27:37 | Mat2 | comex: do you know LLVM ? |
18:32:13 | Araq | Mat2: who doesn't? ;-) |
18:34:05 | EXetoC | nom nom |
18:34:07 | EXetoC | I don't! |
18:34:21 | comex | Mat2: yep |
18:46:12 | gradha | I 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:34 | EXetoC | broken client |
19:01:57 | Mat2 | *lol* |
19:04:48 | EXetoC | I'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:28 | EXetoC | or I could just compile to C |
19:08:16 | EXetoC | Araq: does the language originate all the way back to 2004? |
19:10:07 | EXetoC | and how many people know about the internals? 3? |
19:10:24 | Araq | EXetoC: I think so ... ;-) it's hard to tell as I have no records |
19:10:45 | EXetoC | dang |
19:11:29 | gradha | and from those three only Araq keeps working every day, rainy or sunny |
19:12:16 | EXetoC | right |
19:12:28 | Araq | and about the internals ... 2-3 sounds about right |
19:13:01 | Araq | dunno why though, I don't use any fancy algorithms :P |
19:15:04 | gradha | internals sounds scary, like something people dressed in white rip out of you if you go to a hospital |
19:15:34 | Mat2 | gwet some sleep, ciao |
19:15:46 | EXetoC | good luck |
19:16:10 | * | Mat2 quit (Quit: Verlassend) |
19:17:08 | EXetoC | it takes time I guess |
19:17:35 | Araq | well that most of it has been translated from Pascal doesn't help I guess |
19:18:13 | Araq | though I should have touched by hand every piece by now |
19:18:56 | EXetoC | the impl? |
19:19:20 | Araq | the compiler, yeah |
19:19:52 | EXetoC | and is that the language that has influenced Nimrod and Rust in some ways? where does the 'do' notation for example come from? |
19:20:36 | Araq | the 'do' notation is zahary's work :-) |
19:20:52 | Araq | btw I'm looking at old files now |
19:20:55 | EXetoC | ok |
19:21:10 | Araq | and I thiink it's safe to say most of it started in 2008, not 2004 |
19:22:32 | Araq | on the other hand first bootstrap was 2008-08-22 ... |
19:22:54 | Araq | and 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:05 | Araq | wb jbe_ |
19:34:52 | jbe_ | hellu :) |
19:37:54 | EXetoC | oh |
19:39:13 | jbe_ | thanks for a nice language |
19:40:19 | Araq | EXetoC: I am a fan of: http://www.joelonsoftware.com/articles/fog0000000069.html :-) |
19:42:39 | gradha | it's a nice argument to have in favor of using llvm rather than writing your own |
19:43:39 | Araq | gradha: are you referring to my JS codegen? :P |
19:44:02 | gradha | of course not! |
19:44:18 | gradha | haven't even used it, can't have problems with it |
19:45:03 | EXetoC | I know when my code really sucks though, but I try to get it right the first time now :> |
19:45:10 | EXetoC | and I don't suck as much anymore, which helps I guess |
19:46:51 | Araq | well he refers to big projects obviously |
19:47:50 | EXetoC | yeah, I wouldn't bother. takes too long |
19:49:45 | * | DAddYE joined #nimrod |
19:50:57 | EXetoC | DAddYE: different host? maybe a less bad IRC client then too :> |
19:53:50 | * | DAddYE quit (Ping timeout: 240 seconds) |
19:54:12 | EXetoC | nope |
20:01:03 | * | DAddYE joined #nimrod |
20:01:23 | EXetoC | DAddYE: HEY |
20:01:35 | DAddYE | EXetoC: hey! |
20:02:33 | EXetoC | DAddYE: you time out after 5 min, and then you join after an hour. crappy client? |
20:03:47 | DAddYE | EXetoC: crappy comcast |
20:08:15 | EXetoC | and a very conservative reconnect setting. got it :> |
20:11:25 | EXetoC | it 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:25 | Araq | EXetoC: you reconnected. crappy client? :P |
20:52:00 | EXetoC | Araq: 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:19 | EXetoC | lunix |
20:58:36 | Araq | real system crash? or "only" X11? |
20:59:46 | EXetoC | I had to reboot. otherwise, tmux would've kept the client alive |
20:59:59 | Araq | it 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:25 | Araq | unfortunately I don't run any other stuff on the desktop ... |
21:00:29 | Araq | XD |
21:15:52 | dom96 | Interesting, 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:10 | EXetoC | yup. stupid DOS and Windows 3.1 :p |
21:23:52 | Araq | DOS never crashed though |
21:24:51 | Araq | it had to little EMX memory for to be able to crash |
22:02:18 | * | EXetoC quit (Quit: WeeChat 0.4.1) |
22:31:59 | DAddYE | Araq: hiiiii |
22:32:18 | DAddYE | Araq: did have Nimrod ffi some problems with uint64 ? |
22:32:21 | DAddYE | Araq: https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L5 |
22:32:36 | DAddYE | Araq: and https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L12 |
22:33:01 | DAddYE | nimrod seems to invert timeout with repeat |
22:33:53 | Araq | seems possible, I told you to use int64 instead |
22:34:36 | DAddYE | tried, but no luck |
22:34:48 | Araq | then it's something else :P |
22:35:18 | * | Max00355 quit (Quit: WeeChat 0.3.8) |
22:35:49 | DAddYE | please point me where, I'm struggling from 2 night to get it working |
22:36:23 | Araq | what OS are you on? |
22:36:28 | DAddYE | osx |
22:37:33 | Araq | https://github.com/joyent/libuv/pull/710 |
22:37:53 | Araq | but I guess that's not relevant |
22:39:00 | Araq | btw https://groups.google.com/forum/#!topic/nodejs/eDYq0XBz3ZA lists the arguments as 'int64_t' |
22:39:11 | DAddYE | https://github.com/joyent/libuv/blob/v0.11.5/include/uv.h#L1269-L1272 |
22:39:15 | DAddYE | is the call |
22:40:11 | Araq | TTimerCb MUST not be a closure |
22:40:41 | Araq | mark it as {.cdecl.} explicitly |
22:41:23 | DAddYE | so only this https://gist.github.com/DAddYE/4292ff2622ce49832fb8 |
22:42:32 | Araq | again |
22:42:44 | Araq | TTimerCb MUST not be a closure |
22:43:06 | Araq | uv_timer_start/init has nothing to do with TTimerCb's declaration |
22:43:36 | DAddYE | haaaaaaaaa |
22:43:59 | DAddYE | Araq: https://gist.github.com/DAddYE/4292ff2622ce49832fb8 ? |
22:44:46 | DAddYE | is this the correct way? |
22:49:56 | Araq | that ... or you can add the cdecl to the TTimerCb definition |
22:51:09 | DAddYE | Araq: yep |
22:51:19 | DAddYE | cool |
22:51:25 | DAddYE | now seems to "work" |
22:52:10 | Araq | don't you do {.push callConv:cdecl.} in your wrapper? |
22:54:35 | DAddYE | no, I've it in all my Closures but for unknown reason was not on TTimerCB |
22:54:40 | DAddYE | -.-' |
22:55:01 | Araq | ok then it's no bug |
22:55:05 | Araq | *no compiler bug |
22:55:28 | Araq | though again it could be smarter ... it's unlikely you want .closure for a wrapper |
22:56:04 | DAddYE | Araq: yep thanks a looooooooot! |
22:56:14 | DAddYE | everything now seems pretty well |
22:56:42 | DAddYE | I've only an minor annoying thing, when I call timer_start ..bla.., 1000, 1000 |
22:57:01 | DAddYE | timer.timout = 24681255 |
22:57:04 | Araq | make a feature request, it's 2 lines of code to add a warning |
22:57:12 | DAddYE | timer.repeat => 1000 |
22:57:22 | DAddYE | but the timeout works after 1000 |
22:57:33 | DAddYE | so 24681255 is a wrong casting |
22:57:51 | DAddYE | tried to add at top uint64 = int64 |
22:57:59 | DAddYE | just in case but is the same |
22:58:11 | Araq | dunno what you mean |
22:59:45 | DAddYE | Araq: here => https://gist.github.com/DAddYE/4292ff2622ce49832fb8#file-test-nim-L8 |
23:00:16 | DAddYE | if I check my field TTimer.timeout I expect to be 2000 |
23:00:24 | DAddYE | but is a strange int value |
23:00:33 | DAddYE | like 24681255 |
23:00:52 | DAddYE | BUT, it's fired exactly at 2s |
23:00:56 | Araq | so? |
23:00:59 | DAddYE | so is a problem of casting |
23:01:03 | DAddYE | (I guess) |
23:01:05 | Araq | no |
23:01:15 | DAddYE | what can be? |
23:01:17 | Araq | the library translates it to "ticks" or whatever |
23:01:35 | Araq | I don't think you should mess with its internal datastructures |
23:01:58 | Araq | if it's fired at 2s it's all fine |
23:02:02 | DAddYE | Araq: ok |
23:02:09 | DAddYE | makes senses |
23:02:13 | DAddYE | thanks a lot |
23:02:40 | Araq | I have to sleep now |
23:02:43 | Araq | good night |
23:04:05 | DAddYE | Araq: check the email before !!! :D |
23:04:38 | Araq | wow |
23:04:41 | Araq | awesome, thanks |
23:05:16 | Araq | so now you're paying our server :-) |
23:05:39 | DAddYE | hahaha great |
23:05:48 | DAddYE | thanks a lot for your time |
23:05:53 | DAddYE | I really appreciate! |
23:06:28 | Araq | tbh 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) |