<< 13-06-2015 >>

00:00:34onionhammerditto
00:00:48onionhammeromg is araq using a potato for a microphone?
00:01:44*gokr quit (Quit: Leaving.)
00:07:48reactormonkonionhammer, nah, skype
00:08:13reactormonkeven 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:54reactormonk... 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:24dsadsadreactormonk: http://fsharpforfunandprofit.com/posts/units-of-measure/
01:49:40dsadsadthats looks like a good way to handle units of measure!
01:50:48dsadsadhandles even stuff like |||| (km/s) * s = s
02:09:56reactormonkdsadsad, seems to be a bit buggy, but I'll check
02:10:07dsadsadhow buggy?
02:28:17dsadsadoops -> (km/s) * s = k
02:28:31dsadsadkm*
02:32:46reactormonkdsadsad, from the text below...
02:33:26dsadsadfrom the link?
02:33:31reactormonkyup
02:33:42dsadsadwhat is buggy?
02:34:05reactormonkgotta read the full text maybe
02:34:06dsadsadto me it all seemed good
02:34:27dsadsadnot exactly sure how to replicate it in nim tho
02:35:20reactormonkwe'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:15avsejreactormonk, 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:38avsejI'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:58avsejhttps://gist.github.com/avsej/848a690d815bf818f882
07:03:34*pregressive quit (Remote host closed the connection)
07:05:56*sepisoad joined #nim
07:16:49ozraonionhammer: 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:29avsejozra, do you know if posix.getpid() portable?
07:20:45avseji mean does it work everywhere including windows?
07:20:55ozraavsej: Honestly no idea!
07:20:58avsejok
07:21:25ozraavsej: 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:43ozradom96: 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:04avsejdom96, 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:52ozraonionhammer: 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:59Xehow come the stdlib redis client doesn't expose the sendCommand function?
07:56:24Xeon 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:41avseji'm curious how it came to the state when redis client is a part of stdlib
07:58:56avsejit was implemented before nimble?
07:59:07*Xe shurgs
07:59:11Xeshrugs*
08:10:42*Ven joined #nim
08:24:01*banister joined #nim
08:24:07*banister quit (Max SendQ exceeded)
08:33:15Araqavsej: yup
08:34:04Araqavsej: also yeah, the posix module doesn't work on windows. big surprise, hum?
08:36:00avsejgetpid() is available on windows, so I thought it could be exposed too
08:36:44avsejAraq, 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:14wuehlmausAraq: 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:17TEttingerNimrod sold its hot rod to buy a jet engine
10:13:39TEttingernow 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:30strcmp1lol
11:35:47avsejAraq, fixed
11:36:27*gokr joined #nim
11:36:37Araqnah
11:39:24*gokr_ quit (Ping timeout: 245 seconds)
11:41:57avsejnow i doing appending to result directly in the end. okay?
11:42:10Araqyeah
11:44:16avsejAraq, do you have thoughts about issue with 64bit literals on 32bit host? https://github.com/nim-lang/Nim/issues/2909
11:45:07avseji'm ready with logging update
11:45:54*rgv151_ joined #nim
11:46:57Araqugh ... nobody lets me indulge my procrastination
11:47:17Araqthat's a regression, right?
11:48:35Araqer ... why did I pull this? it's wrong
11:50:08Araqavsej: https://github.com/nim-lang/Nim/pull/2896/files shows why it's wrong
11:50:21Araqthe codegen doesn't generate addInt64 etc anymore
11:50:28Araqbut it needs to do that
11:52:14rgv151_Hi Araq
11:52:35rgv151_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:59Miko_The Javascript backend generates invalid java for me
12:00:21Miko_it uses "null" as a variable name, but that is reseved in javascript
12:00:59Miko_The Code is like this:
12:01:00Miko_http://pastebin.ca/3026858
12:01:20r-kubah Araq why did you merge my PR if it was wrong /facepalm
12:06:01AraqMiko_: proper bug report please
12:06:10Araqr-ku: I'm merge happy :-(
12:06:13*gokr joined #nim
12:06:26Miko_I can't come up with a minimal example
12:06:34r-kuhaha..
12:07:41*Arrrr joined #nim
12:08:34*gokr quit (Read error: Connection reset by peer)
12:09:18Araqhttps://www.youtube.com/watch?v=PZpjKJqGV1o
12:09:33Araq<-- my brain when reading PRs
12:10:21Araqbbl
12:10:57*gokr joined #nim
12:11:16*gokr quit (Remote host closed the connection)
12:14:19r-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:29Miko_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:16matkukiHi guys. A quick question. Is it the convention in Nim to create a new type for a type pointer: PMyType = ptr MyType ?
12:52:17matkukiMy 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:01matkukidef-: Help?
12:58:11*Kingsquee quit (Quit: Konversation terminated!)
12:59:28dom96matkuki: That's fine.
12:59:48dom96Well, it depends how often that type is used.
13:00:02dom96But you shouldn't name it PMyType, you should name it MyTypePtr
13:01:37matkukidom96: 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:25dom96matkuki: Is a non-ptr PyObject used anywhere?
13:02:33matkukidom96: no
13:02:46dom96then you should just name it PyObject
13:04:58*Demos quit (Read error: Connection reset by peer)
13:05:33matkukiOk, 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:01drewsremWhat kind of overhead do I have to pay when I use an object instead of a tuple?
13:33:13avsejAraq, so reverting 2896 is not an option?
13:39:19taotetekanyone know off hand how I would turn a string in a variable into a stream to use w/ the xml parser?
13:39:36taoteteknewStringStream looks like woot
13:40:06drewsremCan I define implicit conversions to my own types?
13:44:27*Ven_ joined #nim
13:45:08EastBytedrewsrem: maybe looking for http://nim-lang.org/docs/manual.html#converters ?
13:46:07*enquora joined #nim
13:46:22taotetektrying to figure out how I can parse an xml file within a macro - https://gist.github.com/taotetek/173cc40c372c8b43217b
13:47:03taotetekI 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:37drewsremHow 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:42drewsremEastByte, thanks I'll look into that
13:52:42*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:54:54drewsremI guess tuples in nim are primarily used for passing multiple-values around and not as a replacement for c-structs
13:55:55drewsremah okay, c2nim actually converts c-structs to objects, guess I'm just going to use objects then...
14:01:32drewsremIs there yet some central place on the web for community-published comfort macros/templates?
14:01:55taotetekAraq: 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:52dom96taotetek: Try $filename or filename.str
14:24:58dom96Not sure why it thinks you're passing a NimNode
14:27:26taotetekdom96: that seems to be doing the trick - we'll see!
14:28:15taotetekah - 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:07yglukhovHello everyone
14:42:42yglukhovAraq, 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:41drewsremhttp://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:36taotetekdom96: 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:03dom96taotetek: I think that may be by design.
14:55:28dom96taotetek: 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:31dom96I think that makes sense
14:56:17dom96drewsrem: Why are you importing it like that? You don't need 'lib/pure/math', 'math' is enough.
14:56:45taotetekdom96: hmm - let me make another gist in the hope that you can spot something with your experience that I'm missing
14:56:58drewsremdom96, so I thought, I did to make sure that cos never refers to math.cos, but it makes no difference
14:57:13dom96drewsrem: Report this on Github please.
14:59:20taotetekdom96: https://gist.github.com/taotetek/c16f441066363f38e262
14:59:45taotetekdom96: gist of it (pun intended) is I'm trying to create some constants from values I'm reading from an xml document
15:00:22dom96Take a look at what node you're getting: echo(treeRepr(myName))
15:00:59dom96Then you'll know how to extract the value from it
15:01:58dom96I think what you're doing wrong is that you're not actually reading the xml at compile-time
15:02:13dom96A file stream won't work at compile-time
15:02:30taotetekdom96: aha
15:02:37dom96all that code needs to be inside the macro
15:02:49taotetekdom96: 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:57dom96you can change your current macro into a compile-time proc
15:03:06dom96to separate your code
15:03:14dom96using the {.compileTime.} pragma
15:03:27taotetekdom96: wasn't aware there were compile time procs - this is exactly the sort of info I was looking for
15:06:32taotetekdom96: https://gist.github.com/taotetek/45ef889ce71f4e8924b0
15:06:55taotetekdom96: 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:38dom96taotetek: it seems that lexbase (which is what parsexml uses) does casting which the VM does not support.
15:11:32taotetekdom96: 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:36taotetekdom96: or would I run into the same issue?
15:12:15dom96best thing probably is to get lexbase working at compile-time
15:12:22taotetekdom96: if not - I could perhaps convert the xml models I'm working with into json if the json parser would be valid
15:12:26dom96take a look at the code and see why it uses a cast
15:12:29dom96maybe it's not needed
15:13:38taotetekdom96: will take a look
15:14:22drewsremdom96, https://github.com/nim-lang/Nim/issues/2913
15:14:35Xeyglukhov: there's a lua target?
15:14:46dom96drewsrem: thanks
15:14:56dom96oh, when did the Nim repo move to the nim-lang org
15:15:23vikatondom96, 2 days ago ...
15:15:31taotetekdom96: https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L149
15:15:35taotetekdom96: here's the offending line
15:16:31taotetekhttps://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L31
15:16:36taotetekand here's the BaseLexer definition
15:16:52yglukhovXe, well there is some code which refers to lua, but i don't know how good it works
15:17:33dom96taotetek: Try changing that to newString(bufLen)
15:17:51Xeyglukhov: link?
15:18:37taotetekgiving it a shot.
15:18:52dom96yglukhov: 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:57dom96But later he wrote his own VM
15:19:11dom96It's likely abandoned, but I don't know what his future plans are.
15:19:15yglukhovXe, https://github.com/nim-lang/Nim/blob/devel/compiler/jsgen.nim
15:19:58Xeah
15:19:59taotetekdom96: I -think- this might have gotten me around it - give me a few to add the ast construction back into the macro
15:20:03yglukhovdom96, that makes sense.
15:20:24taotetekdom96: if this works, I'll send a PR back to nim
15:20:36taotetekdom96: whether it does or it doesn't, thanks for the info :)
15:22:13dom96taotetek: 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:26taotetekdom96: noted!
15:31:05taotetekhmmm
15:31:17taotetekdom96: hitting an importc error at compile time now, doh :)
15:32:07taotetekhttps://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L83
15:32:15taotetekwondering if I should convert the xml to an intermediary format
15:33:55dom96perhaps
15:33:58*Matthias247 joined #nim
15:34:11dom96You can still convert that into an ordinary string operation
15:34:16dom96but it's a bit more complex I guess
15:34:30dom96It seems to just move a part of the string buffer
15:34:34*johnsoft quit (Ping timeout: 256 seconds)
15:36:07ayeee.
15:36:29taotetekdom96: so - a patch to the previous spot we found, and a patch there to change that operation if running in the vm?
15:36:38dom96yeah
15:39:14taotetekso it's basically just doing a slice manipulation
15:39:25taoteteksorry - much more familiar with C and Go, just started w/ nim two days ago
15:39:58taotetekare there string ops in nim that allow accessing a string as an array, rather than using moveMem?
15:40:48taotetekmy 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:34taotetekdefined(vm) for the define by the way, I think
15:45:36taotetekrebuilding now
15:46:48Xedoes nim have a splat operator?
15:47:13XeIE 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:44ArrrrXe do you mean varargs?
16:05:28Arrrrhttp://nim-lang.org/docs/manual.html#types-varargs
16:06:41*kumul quit (Quit: Leaving)
16:08:04XeArrrr: i mean passing a sequence and having it be expanded as if the contents of the sequence were the arguments
16:08:28Xevarargs the other way around
16:09:11Arrrrlike a foreach ?
16:13:19Xeno
16:13:30Xelike literally having the sequence be the varargs
16:14:25Arrrryou can do that with varargs
16:17:07*HaCk3D joined #nim
16:20:15*kumul joined #nim
16:20:17Araqyglukhov: Lua target never was finished, remove it or keep it, do what keeps you productive
16:20:42HaCk3DHi, 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:01AraqHaCk3D: map is in system, the rest in sequtils
16:21:16HaCk3DThnx a lot
16:23:51ayeeeI like the async/asyncnet, what would be the easiest way to make it use multiple CPU cores?
16:24:04yglukhovok, 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:02reactormonkavsej, 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:16Araqayeee: I started on that in the more_concurrency branch
17:27:48Araqbuilt a shared hash table which the dispatcher needs to use to get a set of sockets to work on
17:28:51Araqthe 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:59Araqyglukhov: every t.sons[0] access needs to be wrapped with skipTypes, just like the code used to do it
17:36:18yglukhovAraq, 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:26Araqyglukhov: argh. you're right. sorry.
18:29:13yglukhovAhh, what a relief =)
18:29:29Araqso I guess I can merge it.
18:29:48Araqr-ku: want to fix your mAddI64 mess yourself? ;-)
18:35:52taotetekhi 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:15Araqtaotetek: yummy. very cool!
18:36:37*wb joined #nim
18:36:48taotetekdom96 helped me debug some earlier and I think there's only 3 spots that need an alternative code path
18:37:08taotetektwo 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:29Araqquite possible, I ran a lexer generator at compile-time
18:37:57Araqhundreds of lines of code ... just worked. so the VM is not that bad.
18:38:42taotetekit'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:57taotetekand the vm doesn't like this moveMem - https://github.com/nim-lang/Nim/blob/devel/lib/pure/lexbase.nim#L83
18:40:03taotetekmy 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:14yglukhovOh, 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:52taotetekyglukhov: oh fun - I'm not anywhere close to feeling like rewriting the whole xmlparser - but that sounds promising.
18:42:26yglukhovwell, i haven't looked at xml perser at all. don't like xml, you know ;)
18:43:15yglukhovwe should definitely come up with some new nml, which is a markup language as a nim dsl ;)
18:44:20taotetek:d
18:44:23taoteteker, :D
18:49:37*gokr quit (Ping timeout: 240 seconds)
18:50:06Arrrri got this when koching: pure\times.nim(445, 17) Error: number 116444736000000000'i64 out of valid range FAILURE
18:51:48AraqArrrr: already reported
18:52:11Araqdevel is quite unstable these days cause new people are playing with everything
18:52:32ArrrrKids these days ... ok
18:52:38Araqand we have stable releases so that devel can be more of a playground
18:52:59Araqnot 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:19yglukhovAraq, 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:22yglukhovI 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:34yglukhovAnd 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:43fowlHey yglukhov
20:31:00yglukhovhi fowl, how r u!
20:31:20fowlThe benefit methods have is since they aren't bound in a vtable, you can add new methods at any time
20:32:23fowlI'm good just figured out a weird problem
20:34:00yglukhovkinda... 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:34yglukhovand collecting methods to vtable would take just as much
20:34:41yglukhovor am i wrong here?
20:38:01fowlAh well it can perform better with tables definitely
20:42:05yglukhovyeah, 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:07yglukhovand JS backend could generate js-native methods, and that presumably should make js code even more performant =)
20:45:10Araqyglukhov: method dispatch is fast enough for now. I'd rather have you look into the remaining lambda lifting bugs
20:45:49Araqthere is an extensive test suite for LL, and the code is centralized too and the bugs are tagged.
20:46:26yglukhovAraq, i tried lambda lifting, but haven't managed to comprehend it yet (
20:46:38Araqthat said, LL is the most complex algorithm in the whole compiler, more complex than the disjoint check for 'parallel'
20:47:03fowlyglukhov: I have a thing to turn a concept type into a vtable
20:48:12yglukhovAraq, if dispatch is fast enough, why Streams are implemented using callbacks, huh? ;))
20:48:20*flaviu joined #nim
20:48:53Araqthey predate methods and I dislike this constant rewriting of everything that works just to make it slightly less ugly
20:49:26fowlyglukhov: methods aren't able to call super methods until we got proc call
20:49:32Araqalso
20:49:44Araqthe streams implementation does *not* use vtables
20:50:03Araqinstead the proc pointer is directly embedded saving 1 level of indirection
20:51:12fowlAraq: is it possible to generate new rtti at runtime
20:51:41Araqthe data structures are not hostile to that
20:51:55Araqso ... shouldn't be too hard for a guy like you
20:53:36Araqyglukhov: 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:24yglukhovi would welcome it. no promises though.
20:56:04Araqmeh let me gist it, so I don't have to repeat it for others ;-)
20:56:11fowlAraq: writing my own reset() that sets ref types to nil
20:57:02Araqfowl: meh, reset should be optimized to not even use RTTI :P
20:59:15*Kingsquee joined #nim
21:00:18fowlDoesn't it have to?
21:00:36Araqnah
21:00:53Araqwe could generate a specialized proc instead
21:01:02fowlHow does the compiler assume rtti exists
21:01:17Araqit's in hti.nim in system/
21:01:24fowlHaving reset called in this block of memory on the heap caused strange GC errors
21:02:18Araqyou should really learn how the GC works.
21:03:38fowlmeh
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:01HaCk3DHi, guys
21:23:06reactormonkHaCk3D, o/
21:23:12HaCk3Ddo u need some help with nim compiler?
21:23:29HaCk3Dmb some issues need fixes?
21:24:25HaCk3Di just want to contribute, coz nim is awesome
21:24:43HaCk3Dbut i dont know what needed to be fixed/implemented
21:26:27ozraHaCk3D: Ask Araq :)
21:26:36reactormonkHaCk3D, https://github.com/nim-lang/Nim/issues?q=is%3Aopen+is%3Aissue+label%3AEasy pick one
21:29:27*Mat4 joined #nim
21:51:01AraqHaCk3D: yeah what reactormonk said. Also I'm writing a document about LL (lambda lifting)
21:51:12Araqwhich is where the hard bugs hide
21:51:22reactormonkAraq, sounds interesting
21:52:56ozraAraq: 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:03Araqwhy? it's self explanatory ...
22:02:08ozraOh, and preferebly the language should _only_ support registers ;)
22:09:01taotetekAraq: this look sensible? if you don't mind spot-checking me -https://github.com/taotetek/Nim/commit/ac3ba252f0fe6b31f43890147c98bb196182d840
22:09:21taotetekoh oops
22:10:07taotetekAraq: https://github.com/taotetek/Nim/commit/ac3ba252f0fe6b31f43890147c98bb196182d840
22:10:42taotetekstill 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:35fowlAraq, 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:49avsejis there printf-like formatting in nim?
22:29:40Jehan`avsej: Try the strfmt package, I'd suggest.
22:30:42avsejJehan`, so nothing built-in?
22:30:59Jehan`avsej: I mostly use subexes myself.
22:31:14Jehan`http://nim-lang.org/docs/subexes.html
22:31:22Jehan`But that's a different approach.
22:32:31Jehan`Well, subexes combined with formatting operators.
22:32:40avsejis it possible to set width? like %20s
22:32:55Jehan`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:45Jehan`avsej: There's strutils.align
22:35:50*Jesin quit (Quit: Leaving)
22:37:13Jehan`But that may be a bit unwieldy.
22:38:21avsejstrfmt is good and convenient, thanks
22:38:45avseji wonder why it is not part of stdlib, when redis client is
22:40:56*vendethiel quit (Quit: q+)
22:41:32Jehan`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:12Jehan`Once you include something in the stdlib, you are essentially committed to support it and its interface indefinitely.
22:47:40Jehan`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:32Araqredis was written before nimble and apparently dom96 has not yet made it a nimble package.
22:54:30Araqstring 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:03Araqtaotetek: realloc does more than newString, you need to copy over the old contents
23:32:12AraqHaCk3D: 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:42Araqor perhaps some of those.
23:36:15*pregressive joined #nim
23:42:05*rgv151 joined #nim
23:57:39AraqHaCk3D: https://gist.github.com/Araq/7f1eaacb68a5c49f73bc