00:00:34 | onionhammer | ditto |
00:00:48 | onionhammer | omg is araq using a potato for a microphone? |
00:01:44 | * | gokr quit (Quit: Leaving.) |
00:07:48 | reactormonk | onionhammer, nah, skype |
00:08:13 | reactormonk | even a fucking twitch stream would have been better :-P |
00:08:21 | * | pregressive joined #nim |
00:08:47 | * | boop is now known as boopisaway |
00:08:54 | reactormonk | ... apropos http://www.watchpeoplecode.com/ |
00:10:53 | * | pregressive quit (Remote host closed the connection) |
00:15:09 | * | askatasuna joined #nim |
01:12:40 | * | jaco60 quit (Ping timeout: 256 seconds) |
01:12:50 | * | zama quit (Write error: Broken pipe) |
01:19:15 | * | Etheco quit (Quit: Leaving) |
01:20:02 | * | Jesin quit (Quit: Leaving) |
01:32:21 | * | zama joined #nim |
01:41:23 | * | Jesin joined #nim |
01:45:01 | * | dsadsad joined #nim |
01:49:03 | * | Etheco joined #nim |
01:49:24 | dsadsad | reactormonk: http://fsharpforfunandprofit.com/posts/units-of-measure/ |
01:49:40 | dsadsad | thats looks like a good way to handle units of measure! |
01:50:48 | dsadsad | handles even stuff like |||| (km/s) * s = s |
02:09:56 | reactormonk | dsadsad, seems to be a bit buggy, but I'll check |
02:10:07 | dsadsad | how buggy? |
02:28:17 | dsadsad | oops -> (km/s) * s = k |
02:28:31 | dsadsad | km* |
02:32:46 | reactormonk | dsadsad, from the text below... |
02:33:26 | dsadsad | from the link? |
02:33:31 | reactormonk | yup |
02:33:42 | dsadsad | what is buggy? |
02:34:05 | reactormonk | gotta read the full text maybe |
02:34:06 | dsadsad | to me it all seemed good |
02:34:27 | dsadsad | not exactly sure how to replicate it in nim tho |
02:35:20 | reactormonk | we'll see |
02:38:27 | * | wb quit (Ping timeout: 250 seconds) |
03:04:02 | * | JinShil quit (Quit: Konversation terminated!) |
03:10:00 | * | enquora quit (Quit: enquora) |
03:22:34 | * | TEttinger joined #nim |
03:51:04 | * | ddl_smurf quit (Quit: ddl_smurf) |
03:58:04 | * | dddddd quit (Ping timeout: 244 seconds) |
04:00:03 | * | darkf joined #nim |
04:28:22 | * | TheSquirrelogist is now known as dtscode |
04:45:51 | * | pregressive joined #nim |
05:00:57 | * | kumul quit (Ping timeout: 240 seconds) |
05:06:12 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:09:43 | * | strcmp1 joined #nim |
05:11:15 | avsej | reactormonk, do you have commit rights on repository? without this patch https://github.com/nim-lang/Nim/pull/2910 installer is broken |
05:20:43 | * | kimio joined #nim |
05:21:23 | * | kimio quit (Client Quit) |
05:35:53 | * | bjz joined #nim |
06:13:58 | * | jszymanski joined #nim |
06:44:22 | * | kas joined #nim |
06:53:01 | * | Miko_ joined #nim |
07:00:38 | avsej | I'm writing wrapper for proc which accepts varargs. In my wrapper I want to prepend a value for varargs. how can I do it? |
07:01:58 | avsej | https://gist.github.com/avsej/848a690d815bf818f882 |
07:03:34 | * | pregressive quit (Remote host closed the connection) |
07:05:56 | * | sepisoad joined #nim |
07:16:49 | ozra | onionhammer: Highlighting - my bad. I've been fixing bugs, and apparantly introduced new. I'll go over it again, looking at more code through it. |
07:17:39 | * | kas quit (Read error: Connection reset by peer) |
07:20:29 | avsej | ozra, do you know if posix.getpid() portable? |
07:20:45 | avsej | i mean does it work everywhere including windows? |
07:20:55 | ozra | avsej: Honestly no idea! |
07:20:58 | avsej | ok |
07:21:25 | ozra | avsej: My guess is, under posix == not windows compat.. But I dunno |
07:23:19 | * | sepisoad_ joined #nim |
07:26:11 | * | sepisoad quit (Ping timeout: 250 seconds) |
07:26:59 | * | filcuc joined #nim |
07:27:43 | ozra | dom96: In case you're around: Does nimble have an undoced 'upgrade' command to update version of all packages installed (preferebly keeping older too)? |
07:36:32 | * | xcombelle joined #nim |
07:44:26 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:45:11 | * | bjz joined #nim |
07:46:04 | avsej | dom96, logging was broken in #2830. here is the fix https://github.com/nim-lang/Nim/pull/2911 |
07:46:39 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:52:52 | ozra | onionhammer: Nevermind that, my fixes are not pulled yet - that is the before fix look, makes more sense. Will have an extra look in any event while it's not pulled. |
07:53:17 | * | xcombelle quit (Quit: Leaving) |
07:55:59 | Xe | how come the stdlib redis client doesn't expose the sendCommand function? |
07:56:24 | Xe | on a redis host I am connecting to it has a few command administratively remapped for security reasons |
07:57:31 | * | sepisoad_ quit (Quit: Leaving) |
07:58:10 | * | dtscode is now known as PaulMaudib |
07:58:41 | avsej | i'm curious how it came to the state when redis client is a part of stdlib |
07:58:56 | avsej | it was implemented before nimble? |
07:59:07 | * | Xe shurgs |
07:59:11 | Xe | shrugs* |
08:10:42 | * | Ven joined #nim |
08:24:01 | * | banister joined #nim |
08:24:07 | * | banister quit (Max SendQ exceeded) |
08:33:15 | Araq | avsej: yup |
08:34:04 | Araq | avsej: also yeah, the posix module doesn't work on windows. big surprise, hum? |
08:36:00 | avsej | getpid() is available on windows, so I thought it could be exposed too |
08:36:44 | avsej | Araq, could you check my patches? https://github.com/nim-lang/Nim/pulls/avsej they are pretty simple |
08:46:21 | * | wb joined #nim |
09:00:04 | * | Trustable joined #nim |
09:15:52 | * | JinShil joined #nim |
09:21:46 | * | banister joined #nim |
09:21:50 | * | banister quit (Max SendQ exceeded) |
09:22:12 | * | banister joined #nim |
09:38:14 | wuehlmaus | Araq: the story about the nim name should be in the FAQ, i think. And it's a nice story so that people get the joke. |
10:06:45 | * | jaco60 joined #nim |
10:13:17 | TEttinger | Nimrod sold its hot rod to buy a jet engine |
10:13:39 | TEttinger | now it's even faster |
10:26:50 | * | rgv151 joined #nim |
10:29:01 | * | TEttinger quit (Read error: Connection reset by peer) |
10:29:25 | * | TEttinger joined #nim |
10:30:00 | * | TEttinger quit (Read error: Connection reset by peer) |
10:30:17 | * | TEttinger joined #nim |
11:18:15 | * | gokr_ joined #nim |
11:27:30 | strcmp1 | lol |
11:35:47 | avsej | Araq, fixed |
11:36:27 | * | gokr joined #nim |
11:36:37 | Araq | nah |
11:39:24 | * | gokr_ quit (Ping timeout: 245 seconds) |
11:41:57 | avsej | now i doing appending to result directly in the end. okay? |
11:42:10 | Araq | yeah |
11:44:16 | avsej | Araq, do you have thoughts about issue with 64bit literals on 32bit host? https://github.com/nim-lang/Nim/issues/2909 |
11:45:07 | avsej | i'm ready with logging update |
11:45:54 | * | rgv151_ joined #nim |
11:46:57 | Araq | ugh ... nobody lets me indulge my procrastination |
11:47:17 | Araq | that's a regression, right? |
11:48:35 | Araq | er ... why did I pull this? it's wrong |
11:50:08 | Araq | avsej: https://github.com/nim-lang/Nim/pull/2896/files shows why it's wrong |
11:50:21 | Araq | the codegen doesn't generate addInt64 etc anymore |
11:50:28 | Araq | but it needs to do that |
11:52:14 | rgv151_ | Hi Araq |
11:52:35 | rgv151_ | Is thereca way to modify ast outside of macro? |
11:52:53 | * | wb quit (Ping timeout: 244 seconds) |
11:55:15 | * | gokr quit (Read error: Connection reset by peer) |
11:58:14 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:59:51 | * | ayeee joined #nim |
11:59:59 | Miko_ | The Javascript backend generates invalid java for me |
12:00:21 | Miko_ | it uses "null" as a variable name, but that is reseved in javascript |
12:00:59 | Miko_ | The Code is like this: |
12:01:00 | Miko_ | http://pastebin.ca/3026858 |
12:01:20 | r-ku | bah Araq why did you merge my PR if it was wrong /facepalm |
12:06:01 | Araq | Miko_: proper bug report please |
12:06:10 | Araq | r-ku: I'm merge happy :-( |
12:06:13 | * | gokr joined #nim |
12:06:26 | Miko_ | I can't come up with a minimal example |
12:06:34 | r-ku | haha.. |
12:07:41 | * | Arrrr joined #nim |
12:08:34 | * | gokr quit (Read error: Connection reset by peer) |
12:09:18 | Araq | https://www.youtube.com/watch?v=PZpjKJqGV1o |
12:09:33 | Araq | <-- my brain when reading PRs |
12:10:21 | Araq | bbl |
12:10:57 | * | gokr joined #nim |
12:11:16 | * | gokr quit (Remote host closed the connection) |
12:14:19 | r-ku | .. :))) sorry though, i was hoping w/ PR people will care enough to make sure its not messing things up |
12:14:28 | * | woadwarrior joined #nim |
12:15:07 | * | Ven joined #nim |
12:15:07 | * | gokr joined #nim |
12:15:44 | * | boopisaway is now known as boop |
12:19:25 | * | gokr quit (Read error: Connection reset by peer) |
12:20:54 | * | ddl_smurf joined #nim |
12:26:13 | * | rgv151_ quit (Read error: No route to host) |
12:28:29 | Miko_ | I hope this bug report is ok:https://github.com/nim-lang/Nim/issues/2912 |
12:42:29 | * | jszymanski quit (Ping timeout: 244 seconds) |
12:42:40 | * | dalarmmst quit (Ping timeout: 252 seconds) |
12:43:29 | * | jszymanski joined #nim |
12:47:05 | * | matkuki joined #nim |
12:52:16 | matkuki | Hi guys. A quick question. Is it the convention in Nim to create a new type for a type pointer: PMyType = ptr MyType ? |
12:52:17 | matkuki | My intuition tells me to just include the pointer in the declaration e.g.: myFunc(arg: ptr MyType). Is that not acceptable? |
12:53:14 | * | Ven is now known as Guest81620 |
12:54:03 | * | Guest81620 is now known as Ven_ |
12:54:44 | * | wb joined #nim |
12:55:32 | * | dalarmmst joined #nim |
12:56:19 | * | filcuc quit (Remote host closed the connection) |
12:58:01 | matkuki | def-: Help? |
12:58:11 | * | Kingsquee quit (Quit: Konversation terminated!) |
12:59:28 | dom96 | matkuki: That's fine. |
12:59:48 | dom96 | Well, it depends how often that type is used. |
13:00:02 | dom96 | But you shouldn't name it PMyType, you should name it MyTypePtr |
13:01:37 | matkuki | dom96: In the python library there is a PyObject* in C and it's used almost everywhere. Then it should be a new type PyObjectPtr, right? |
13:02:25 | dom96 | matkuki: Is a non-ptr PyObject used anywhere? |
13:02:33 | matkuki | dom96: no |
13:02:46 | dom96 | then you should just name it PyObject |
13:04:58 | * | Demos quit (Read error: Connection reset by peer) |
13:05:33 | matkuki | Ok, thanks. Will keep this in mind. |
13:05:54 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:10:43 | * | banister joined #nim |
13:10:43 | * | banister quit (Client Quit) |
13:17:41 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:20:12 | * | dddddd joined #nim |
13:21:17 | * | banister joined #nim |
13:21:58 | * | drewsrem joined #nim |
13:23:01 | drewsrem | What kind of overhead do I have to pay when I use an object instead of a tuple? |
13:33:13 | avsej | Araq, so reverting 2896 is not an option? |
13:39:19 | taotetek | anyone know off hand how I would turn a string in a variable into a stream to use w/ the xml parser? |
13:39:36 | taotetek | newStringStream looks like woot |
13:40:06 | drewsrem | Can I define implicit conversions to my own types? |
13:44:27 | * | Ven_ joined #nim |
13:45:08 | EastByte | drewsrem: maybe looking for http://nim-lang.org/docs/manual.html#converters ? |
13:46:07 | * | enquora joined #nim |
13:46:22 | taotetek | trying to figure out how I can parse an xml file within a macro - https://gist.github.com/taotetek/173cc40c372c8b43217b |
13:47:03 | taotetek | I don't know nim well (at all) yet - if anyone is here who could look at that and spot what I'm doing wrong easily, thank you |
13:50:37 | drewsrem | How do I solve this problem arising with custom tuple-types and missing implicit-conversion: http://ix.io/j4Z ? - Do I have to explicitly convert the params on every proc-call? |
13:50:42 | drewsrem | EastByte, thanks I'll look into that |
13:52:42 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:54:54 | drewsrem | I guess tuples in nim are primarily used for passing multiple-values around and not as a replacement for c-structs |
13:55:55 | drewsrem | ah okay, c2nim actually converts c-structs to objects, guess I'm just going to use objects then... |
14:01:32 | drewsrem | Is there yet some central place on the web for community-published comfort macros/templates? |
14:01:55 | taotetek | Araq: should it be possible to call parsexml's "open" within the context of a macro, if I'm passing it a stream creating by a string? |
14:19:55 | * | woadwarrior quit (Ping timeout: 256 seconds) |
14:24:52 | dom96 | taotetek: Try $filename or filename.str |
14:24:58 | dom96 | Not sure why it thinks you're passing a NimNode |
14:27:26 | taotetek | dom96: that seems to be doing the trick - we'll see! |
14:28:15 | taotetek | ah - that gets me to the next error I'm now trying to get around a different way |
14:31:27 | * | skyfex____ joined #nim |
14:32:16 | * | skyfex___ quit (Read error: Connection reset by peer) |
14:35:04 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]) |
14:37:38 | * | Miko___ joined #nim |
14:38:09 | * | kumul joined #nim |
14:40:59 | * | Miko_ quit (Ping timeout: 246 seconds) |
14:41:58 | * | yglukhov joined #nim |
14:42:07 | yglukhov | Hello everyone |
14:42:42 | yglukhov | Araq, is lua target supported? I mean do I have to care for not breaking it in JS backend? |
14:44:03 | * | aziz joined #nim |
14:49:41 | drewsrem | http://ix.io/j53 - this seems very much like a bug? - using local variables cos/sin in a proc doesn't work when you import lib/pure/math |
14:49:48 | * | TEttinger quit (Ping timeout: 272 seconds) |
14:54:36 | taotetek | dom96: yeah - something odd is going on - every value I try to use in a macro in this, nim thinks it is a nimNode instead of whatever type the var is :/ |
14:55:03 | dom96 | taotetek: I think that may be by design. |
14:55:28 | dom96 | taotetek: The type you specify simply tells the overload resolution what type to expect, but you still get the AST node that is passed in |
14:55:31 | dom96 | I think that makes sense |
14:56:17 | dom96 | drewsrem: Why are you importing it like that? You don't need 'lib/pure/math', 'math' is enough. |
14:56:45 | taotetek | dom96: hmm - let me make another gist in the hope that you can spot something with your experience that I'm missing |
14:56:58 | drewsrem | dom96, so I thought, I did to make sure that cos never refers to math.cos, but it makes no difference |
14:57:13 | dom96 | drewsrem: Report this on Github please. |
14:59:20 | taotetek | dom96: https://gist.github.com/taotetek/c16f441066363f38e262 |
14:59:45 | taotetek | dom96: gist of it (pun intended) is I'm trying to create some constants from values I'm reading from an xml document |
15:00:22 | dom96 | Take a look at what node you're getting: echo(treeRepr(myName)) |
15:00:59 | dom96 | Then you'll know how to extract the value from it |
15:01:58 | dom96 | I think what you're doing wrong is that you're not actually reading the xml at compile-time |
15:02:13 | dom96 | A file stream won't work at compile-time |
15:02:30 | taotetek | dom96: aha |
15:02:37 | dom96 | all that code needs to be inside the macro |
15:02:49 | taotetek | dom96: so - I tried it the previous way I was trying, and after I got past the error you helped me with I ran into a vm error, let me replicate it again |
15:02:57 | dom96 | you can change your current macro into a compile-time proc |
15:03:06 | dom96 | to separate your code |
15:03:14 | dom96 | using the {.compileTime.} pragma |
15:03:27 | taotetek | dom96: wasn't aware there were compile time procs - this is exactly the sort of info I was looking for |
15:06:32 | taotetek | dom96: https://gist.github.com/taotetek/45ef889ce71f4e8924b0 |
15:06:55 | taotetek | dom96: with the previous attempt - I got around the first error with your suggestion, but then appear to be doing something I probably shouldn't be doing in a macro. |
15:08:38 | dom96 | taotetek: it seems that lexbase (which is what parsexml uses) does casting which the VM does not support. |
15:11:32 | taotetek | dom96: would you happen to know if there might be a way around this - one of my other attempts where I parse and then call macros, but put into a compile time proc? |
15:11:36 | taotetek | dom96: or would I run into the same issue? |
15:12:15 | dom96 | best thing probably is to get lexbase working at compile-time |
15:12:22 | taotetek | dom96: if not - I could perhaps convert the xml models I'm working with into json if the json parser would be valid |
15:12:26 | dom96 | take a look at the code and see why it uses a cast |
15:12:29 | dom96 | maybe it's not needed |
15:13:38 | taotetek | dom96: will take a look |
15:14:22 | drewsrem | dom96, https://github.com/nim-lang/Nim/issues/2913 |
15:14:35 | Xe | yglukhov: there's a lua target? |
15:14:46 | dom96 | drewsrem: thanks |
15:14:56 | dom96 | oh, when did the Nim repo move to the nim-lang org |
15:15:23 | vikaton | dom96, 2 days ago ... |
15:15:31 | taotetek | dom96: https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L149 |
15:15:35 | taotetek | dom96: here's the offending line |
15:16:31 | taotetek | https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L31 |
15:16:36 | taotetek | and here's the BaseLexer definition |
15:16:52 | yglukhov | Xe, well there is some code which refers to lua, but i don't know how good it works |
15:17:33 | dom96 | taotetek: Try changing that to newString(bufLen) |
15:17:51 | Xe | yglukhov: link? |
15:18:37 | taotetek | giving it a shot. |
15:18:52 | dom96 | yglukhov: Back when macros still relied on a simple AST interpreter to execute Nim code at compile-time, Araq was considering emitting Lua code and feeding it to LuaJIT for compile-time evaluation. |
15:18:57 | dom96 | But later he wrote his own VM |
15:19:11 | dom96 | It's likely abandoned, but I don't know what his future plans are. |
15:19:15 | yglukhov | Xe, https://github.com/nim-lang/Nim/blob/devel/compiler/jsgen.nim |
15:19:58 | Xe | ah |
15:19:59 | taotetek | dom96: I -think- this might have gotten me around it - give me a few to add the ast construction back into the macro |
15:20:03 | yglukhov | dom96, that makes sense. |
15:20:24 | taotetek | dom96: if this works, I'll send a PR back to nim |
15:20:36 | taotetek | dom96: whether it does or it doesn't, thanks for the info :) |
15:22:13 | dom96 | taotetek: It's possible that the alloc is an optimisation so it might be a good idea to put your change in a `when defined(nimvm):` (I think it's "nimvm", may want to double check that)> |
15:25:26 | taotetek | dom96: noted! |
15:31:05 | taotetek | hmmm |
15:31:17 | taotetek | dom96: hitting an importc error at compile time now, doh :) |
15:32:07 | taotetek | https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L83 |
15:32:15 | taotetek | wondering if I should convert the xml to an intermediary format |
15:33:55 | dom96 | perhaps |
15:33:58 | * | Matthias247 joined #nim |
15:34:11 | dom96 | You can still convert that into an ordinary string operation |
15:34:16 | dom96 | but it's a bit more complex I guess |
15:34:30 | dom96 | It seems to just move a part of the string buffer |
15:34:34 | * | johnsoft quit (Ping timeout: 256 seconds) |
15:36:07 | ayeee | . |
15:36:29 | taotetek | dom96: so - a patch to the previous spot we found, and a patch there to change that operation if running in the vm? |
15:36:38 | dom96 | yeah |
15:39:14 | taotetek | so it's basically just doing a slice manipulation |
15:39:25 | taotetek | sorry - much more familiar with C and Go, just started w/ nim two days ago |
15:39:58 | taotetek | are there string ops in nim that allow accessing a string as an array, rather than using moveMem? |
15:40:48 | taotetek | my preference would be fixing it so xmlparse can be used within macros rather than using a different format, if it's achievable |
15:44:32 | * | rkj-b joined #nim |
15:45:34 | taotetek | defined(vm) for the define by the way, I think |
15:45:36 | taotetek | rebuilding now |
15:46:48 | Xe | does nim have a splat operator? |
15:47:13 | Xe | IE python's x = [4,5,6]; foo(x*) == foo(4,5,6) |
15:48:51 | * | dalarmmst quit (Ping timeout: 250 seconds) |
15:50:21 | * | rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 38.0.5/20150525141253]) |
15:57:11 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:03:44 | Arrrr | Xe do you mean varargs? |
16:05:28 | Arrrr | http://nim-lang.org/docs/manual.html#types-varargs |
16:06:41 | * | kumul quit (Quit: Leaving) |
16:08:04 | Xe | Arrrr: i mean passing a sequence and having it be expanded as if the contents of the sequence were the arguments |
16:08:28 | Xe | varargs the other way around |
16:09:11 | Arrrr | like a foreach ? |
16:13:19 | Xe | no |
16:13:30 | Xe | like literally having the sequence be the varargs |
16:14:25 | Arrrr | you can do that with varargs |
16:17:07 | * | HaCk3D joined #nim |
16:20:15 | * | kumul joined #nim |
16:20:17 | Araq | yglukhov: Lua target never was finished, remove it or keep it, do what keeps you productive |
16:20:42 | HaCk3D | Hi, guys, grear work Araq, i wonder if there is some functional procs builtin such as map, reduce, filter or any library provides it? |
16:21:01 | Araq | HaCk3D: map is in system, the rest in sequtils |
16:21:16 | HaCk3D | Thnx a lot |
16:23:51 | ayeee | I like the async/asyncnet, what would be the easiest way to make it use multiple CPU cores? |
16:24:04 | yglukhov | ok, thank you, Araq. could you please also help me with the #2903? I'm stuck with understanding your point about doing skipTypes twice :( |
16:33:52 | * | HaCk3D quit (Ping timeout: 246 seconds) |
16:41:02 | reactormonk | avsej, I see it's been solved :-) |
16:51:11 | * | banister joined #nim |
16:54:44 | * | jszymanski quit (Quit: computer sleeps...) |
16:58:36 | * | darkf quit (Quit: Leaving) |
17:11:30 | * | ddl_smurf quit (Read error: Connection reset by peer) |
17:13:39 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:16:06 | * | Demon_Fox joined #nim |
17:16:49 | * | cyraxjoe_ joined #nim |
17:16:55 | * | cyraxjoe quit (Ping timeout: 255 seconds) |
17:21:33 | * | gokr joined #nim |
17:24:48 | * | elbow_json joined #nim |
17:27:16 | Araq | ayeee: I started on that in the more_concurrency branch |
17:27:48 | Araq | built a shared hash table which the dispatcher needs to use to get a set of sockets to work on |
17:28:51 | Araq | the idea is that we don't do any task migrations but instead have N threads each with its own async dispatcher which gets its work from a global shared dispatcher |
17:31:24 | * | zero_coder left #nim ("Leaving") |
17:32:59 | Araq | yglukhov: every t.sons[0] access needs to be wrapped with skipTypes, just like the code used to do it |
17:36:18 | yglukhov | Araq, but I'm not accessing sons of types, but rather sons of nodes, no? |
17:38:41 | * | xcombelle joined #nim |
17:54:33 | * | dalarmmst joined #nim |
17:57:58 | * | elbow_jason quit (Quit: Leaving) |
18:02:25 | * | woadwarrior joined #nim |
18:12:59 | * | elbow_json quit (Quit: Leaving) |
18:21:16 | * | jszymanski joined #nim |
18:22:20 | * | wb quit (Ping timeout: 276 seconds) |
18:28:26 | Araq | yglukhov: argh. you're right. sorry. |
18:29:13 | yglukhov | Ahh, what a relief =) |
18:29:29 | Araq | so I guess I can merge it. |
18:29:48 | Araq | r-ku: want to fix your mAddI64 mess yourself? ;-) |
18:35:52 | taotetek | hi Araq ! I'm hacking on a test patch that would allow the xmlparser module to be used in macros, by not doing the couple of casts and the mem copy it does if it's running as a macro (would still use current code paths otherwise) - sound ok? |
18:36:07 | * | rgv151 quit (Remote host closed the connection) |
18:36:15 | Araq | taotetek: yummy. very cool! |
18:36:37 | * | wb joined #nim |
18:36:48 | taotetek | dom96 helped me debug some earlier and I think there's only 3 spots that need an alternative code path |
18:37:08 | taotetek | two of them I have working, the third I need a day or two to understand nim a little better but should be doable |
18:37:29 | Araq | quite possible, I ran a lexer generator at compile-time |
18:37:57 | Araq | hundreds of lines of code ... just worked. so the VM is not that bad. |
18:38:42 | taotetek | it's just these cast calls - https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L106 (replaced with newString if in vm) |
18:38:57 | taotetek | and the vm doesn't like this moveMem - https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L83 |
18:40:03 | taotetek | my thought was the moveMem could be handled by (when under vm) just making another cstring and then accessing it by index to copy the correct chunk of it |
18:40:14 | yglukhov | Oh, since you're talking about a more "portable" api, I would suggest to reconsider streams API. The point is to deprecate everything that uses pointers in favour of byte arrays. That would make it friendlier to JS and i guess to VM too. |
18:40:52 | taotetek | yglukhov: oh fun - I'm not anywhere close to feeling like rewriting the whole xmlparser - but that sounds promising. |
18:42:26 | yglukhov | well, i haven't looked at xml perser at all. don't like xml, you know ;) |
18:43:15 | yglukhov | we should definitely come up with some new nml, which is a markup language as a nim dsl ;) |
18:44:20 | taotetek | :d |
18:44:23 | taotetek | er, :D |
18:49:37 | * | gokr quit (Ping timeout: 240 seconds) |
18:50:06 | Arrrr | i got this when koching: pure\times.nim(445, 17) Error: number 116444736000000000'i64 out of valid range FAILURE |
18:51:48 | Araq | Arrrr: already reported |
18:52:11 | Araq | devel is quite unstable these days cause new people are playing with everything |
18:52:32 | Arrrr | Kids these days ... ok |
18:52:38 | Araq | and we have stable releases so that devel can be more of a playground |
18:52:59 | Araq | not sure that's the wisest thing to do, but ... we'll see |
18:53:39 | * | ayeee quit (Quit: Page closed) |
18:54:24 | * | cyraxjoe_ quit (Read error: Connection reset by peer) |
18:56:31 | * | cyraxjoe joined #nim |
19:10:18 | * | fowl joined #nim |
19:14:49 | * | silven quit (Ping timeout: 255 seconds) |
19:15:18 | * | silven joined #nim |
19:27:02 | * | Arrrr quit (Ping timeout: 244 seconds) |
19:28:56 | * | Arrrr joined #nim |
19:32:08 | * | dsadsad quit (Quit: Page closed) |
19:39:43 | * | woadwarrior quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
19:57:22 | * | Arrrr quit (Quit: WeeChat 1.2) |
19:57:25 | * | pregressive joined #nim |
20:02:12 | * | pregressive quit (Remote host closed the connection) |
20:03:55 | * | pregressive joined #nim |
20:12:19 | yglukhov | Araq, have you considered using vtables for methods where there's only one polymorphic type? I think it might have a performance benefit, and it's a rather common usecase. |
20:13:14 | * | PaulMaudib is now known as dtscode |
20:13:22 | yglukhov | I mean, semantically it would stay the same, just an internal optmization. |
20:14:29 | * | skyfex____ quit (Quit: (null)) |
20:15:05 | * | skyfex____ joined #nim |
20:15:34 | yglukhov | And there would be no need to do Streams as they are currently done ;) |
20:18:37 | * | pregressive quit (Remote host closed the connection) |
20:18:53 | * | pregressive joined #nim |
20:19:42 | * | skyfex____ quit (Ping timeout: 265 seconds) |
20:21:15 | * | brson joined #nim |
20:30:43 | fowl | Hey yglukhov |
20:31:00 | yglukhov | hi fowl, how r u! |
20:31:20 | fowl | The benefit methods have is since they aren't bound in a vtable, you can add new methods at any time |
20:32:23 | fowl | I'm good just figured out a weird problem |
20:34:00 | yglukhov | kinda... yeah... but... this is not the case currently. as far as I understood, you have to collect all existing methods across all compilation units to generate a dispatch tree. |
20:34:34 | yglukhov | and collecting methods to vtable would take just as much |
20:34:41 | yglukhov | or am i wrong here? |
20:38:01 | fowl | Ah well it can perform better with tables definitely |
20:42:05 | yglukhov | yeah, but what I'm hinting is that this optimisation is seemingly easy with current state of affairs. and it allows to easily write oop stuff without fear of long dispatches. |
20:42:45 | * | xcombelle quit (Remote host closed the connection) |
20:45:07 | yglukhov | and JS backend could generate js-native methods, and that presumably should make js code even more performant =) |
20:45:10 | Araq | yglukhov: method dispatch is fast enough for now. I'd rather have you look into the remaining lambda lifting bugs |
20:45:49 | Araq | there is an extensive test suite for LL, and the code is centralized too and the bugs are tagged. |
20:46:26 | yglukhov | Araq, i tried lambda lifting, but haven't managed to comprehend it yet ( |
20:46:38 | Araq | that said, LL is the most complex algorithm in the whole compiler, more complex than the disjoint check for 'parallel' |
20:47:03 | fowl | yglukhov: I have a thing to turn a concept type into a vtable |
20:48:12 | yglukhov | Araq, if dispatch is fast enough, why Streams are implemented using callbacks, huh? ;)) |
20:48:20 | * | flaviu joined #nim |
20:48:53 | Araq | they predate methods and I dislike this constant rewriting of everything that works just to make it slightly less ugly |
20:49:26 | fowl | yglukhov: methods aren't able to call super methods until we got proc call |
20:49:32 | Araq | also |
20:49:44 | Araq | the streams implementation does *not* use vtables |
20:50:03 | Araq | instead the proc pointer is directly embedded saving 1 level of indirection |
20:51:12 | fowl | Araq: is it possible to generate new rtti at runtime |
20:51:41 | Araq | the data structures are not hostile to that |
20:51:55 | Araq | so ... shouldn't be too hard for a guy like you |
20:53:36 | Araq | yglukhov: I can give you a tutorial into LL, still saves me lots of time in the long run if somebody else could work on that. it's a time killer. |
20:54:24 | yglukhov | i would welcome it. no promises though. |
20:56:04 | Araq | meh let me gist it, so I don't have to repeat it for others ;-) |
20:56:11 | fowl | Araq: writing my own reset() that sets ref types to nil |
20:57:02 | Araq | fowl: meh, reset should be optimized to not even use RTTI :P |
20:59:15 | * | Kingsquee joined #nim |
21:00:18 | fowl | Doesn't it have to? |
21:00:36 | Araq | nah |
21:00:53 | Araq | we could generate a specialized proc instead |
21:01:02 | fowl | How does the compiler assume rtti exists |
21:01:17 | Araq | it's in hti.nim in system/ |
21:01:24 | fowl | Having reset called in this block of memory on the heap caused strange GC errors |
21:02:18 | Araq | you should really learn how the GC works. |
21:03:38 | fowl | meh |
21:12:16 | * | jszymanski quit (Quit: computer sleeps...) |
21:13:17 | * | aziz quit (Remote host closed the connection) |
21:22:24 | * | HaCk3D joined #nim |
21:23:01 | HaCk3D | Hi, guys |
21:23:06 | reactormonk | HaCk3D, o/ |
21:23:12 | HaCk3D | do u need some help with nim compiler? |
21:23:29 | HaCk3D | mb some issues need fixes? |
21:24:25 | HaCk3D | i just want to contribute, coz nim is awesome |
21:24:43 | HaCk3D | but i dont know what needed to be fixed/implemented |
21:26:27 | ozra | HaCk3D: Ask Araq :) |
21:26:36 | reactormonk | HaCk3D, https://github.com/nim-lang/Nim/issues?q=is%3Aopen+is%3Aissue+label%3AEasy pick one |
21:29:27 | * | Mat4 joined #nim |
21:51:01 | Araq | HaCk3D: yeah what reactormonk said. Also I'm writing a document about LL (lambda lifting) |
21:51:12 | Araq | which is where the hard bugs hide |
21:51:22 | reactormonk | Araq, sounds interesting |
21:52:56 | ozra | Araq: More such 'guides to the internals' would be great - makes it much easier for many of us to grab more than the easiest stuff when time permits.. :) |
21:54:59 | * | skyfex____ joined #nim |
21:57:03 | Araq | why? it's self explanatory ... |
22:02:08 | ozra | Oh, and preferebly the language should _only_ support registers ;) |
22:09:01 | taotetek | Araq: this look sensible? if you don't mind spot-checking me -https://github.com/taotetek/Nim/commit/ac3ba252f0fe6b31f43890147c98bb196182d840 |
22:09:21 | taotetek | oh oops |
22:10:07 | taotetek | Araq: https://github.com/taotetek/Nim/commit/ac3ba252f0fe6b31f43890147c98bb196182d840 |
22:10:42 | taotetek | still need to figure out how to get around the moveMem call also failing in macros but that seems like it should work for the casts that it can't run. |
22:11:35 | fowl | Araq, found my issue, a stray GCunref >_> |
22:14:46 | * | flaviu quit (Remote host closed the connection) |
22:19:19 | * | Miko___ quit (Ping timeout: 256 seconds) |
22:26:24 | * | drewsrem quit (Quit: Leaving) |
22:26:45 | * | Trustable quit (Remote host closed the connection) |
22:27:59 | * | Jehan` joined #nim |
22:28:49 | avsej | is there printf-like formatting in nim? |
22:29:40 | Jehan` | avsej: Try the strfmt package, I'd suggest. |
22:30:42 | avsej | Jehan`, so nothing built-in? |
22:30:59 | Jehan` | avsej: I mostly use subexes myself. |
22:31:14 | Jehan` | http://nim-lang.org/docs/subexes.html |
22:31:22 | Jehan` | But that's a different approach. |
22:32:31 | Jehan` | Well, subexes combined with formatting operators. |
22:32:40 | avsej | is it possible to set width? like %20s |
22:32:55 | Jehan` | What I don't like about the printf approach is that all the formatting is being hardcoded, while I want it to be extensible. |
22:35:45 | Jehan` | avsej: There's strutils.align |
22:35:50 | * | Jesin quit (Quit: Leaving) |
22:37:13 | Jehan` | But that may be a bit unwieldy. |
22:38:21 | avsej | strfmt is good and convenient, thanks |
22:38:45 | avsej | i wonder why it is not part of stdlib, when redis client is |
22:40:56 | * | vendethiel quit (Quit: q+) |
22:41:32 | Jehan` | avsej: Dunno. I know that string formatting is one of the things that everyone (including Araq) wants in the stdlib, it may be just that there's no consensus on how to do it best. |
22:47:12 | Jehan` | Once you include something in the stdlib, you are essentially committed to support it and its interface indefinitely. |
22:47:40 | Jehan` | And I don't know why redis is in there, either. :) |
22:49:26 | * | yglukhov quit (Quit: Be back later ...) |
22:50:24 | * | Mat4 quit (Quit: Verlassend) |
22:53:32 | Araq | redis was written before nimble and apparently dom96 has not yet made it a nimble package. |
22:54:30 | Araq | string formating has to be in the stdlib since too many people request it, but personally I don't need it. |
23:00:53 | * | Ven joined #nim |
23:02:44 | * | Ven quit (Client Quit) |
23:04:35 | * | Jesin joined #nim |
23:11:28 | * | pregressive quit (Remote host closed the connection) |
23:14:53 | * | vendethiel joined #nim |
23:21:28 | * | ob_ joined #nim |
23:29:06 | * | reactormonk_ joined #nim |
23:29:54 | * | reactormonk quit (Ping timeout: 264 seconds) |
23:31:03 | Araq | taotetek: realloc does more than newString, you need to copy over the old contents |
23:32:12 | Araq | HaCk3D: also every bug marked with "path handling" shouldn't be too hard to tackle. And everyone of those should actually be considered a showstopper for 1.0. |
23:32:42 | Araq | or perhaps some of those. |
23:36:15 | * | pregressive joined #nim |
23:42:05 | * | rgv151 joined #nim |
23:57:39 | Araq | HaCk3D: https://gist.github.com/Araq/7f1eaacb68a5c49f73bc |