<< 31-07-2015 >>

00:00:15*gokr quit (Quit: Leaving.)
00:00:26dom96_so like an outer `continue`?
00:01:09renesackinda, but w/o leaving the current block
00:02:45dom96_that seems like something way too specialised to be given its own special syntax
00:04:40renesacwell, I don't know if I want a new syntax
00:04:55renesacI just want o call ".next" on a iterator
00:05:24renesacI will probably have to re-implement iterators myself for that
00:05:32Varriountrenesac: Well, if it's a closure iterator, then you just call it again and discard the result.
00:06:13renesacyeah, maybe the closure iterator may do what I want
00:10:26renesaccan I create closure iterators from normal iterators?
00:10:40renesacbecause it seems I basically need to copy and paste the code of a iterator
00:11:16Araqthere was some logic in the compiler for that ...
00:13:24renesacand can I expect GCC to inline a locally used closure iterator?
00:13:42Araqja klar ... XD
00:13:53renesacI don't speak german?
00:14:04Araqit means "no".
00:14:13renesac:(
00:14:59renesacthen the performance would be horrible for something like that split proc
00:18:37Araqperhaps, perhaps not
00:18:41Araqgood night
00:18:52renesacgood night
00:19:00dom96_maybe you could write a macro that does it
00:19:06dom96_i'm heading to bed too
00:19:08dom96_'night
00:19:13*dom96_ quit (Quit: Page closed)
00:29:37*xet7_ joined #nim
00:33:07*xet7 quit (Ping timeout: 244 seconds)
00:38:52*Quikli joined #nim
00:41:20*Demon_Fox quit (Quit: Leaving)
00:44:35*Demos_ joined #nim
00:47:35*Demos quit (Ping timeout: 244 seconds)
00:52:14VarriountAraq: If we want complete Windows API wrapper, Nim is going to need a way of handling bit fields
00:55:19*BitPuffin|osx joined #nim
00:58:54*elbow_jason joined #nim
01:03:17*elbow_jason quit (Remote host closed the connection)
01:06:17*Demos_ quit (Read error: Connection reset by peer)
01:18:49renesacthis can be done via a macro
01:27:55*brson joined #nim
01:32:11*Demos joined #nim
01:33:49Varriountrenesac: You have any experience with importing C procedures via header, instead of via DLL?
01:34:56renesacI didn't saw much difference for what I wanted, and DLL is the recommended way, so no
01:38:05VarriountI'm just wondering if importing via header would 'validate' my wrapper (for example, if I wrapped a parameter type wrong, the C compiler would complain)
01:41:14DemosI don't think it's worth it
01:41:26Demosit'll increase the compile time of your c
01:47:24*strcmp1 quit (Quit: Leaving)
02:06:51*saml_ joined #nim
02:34:32*brson quit (Quit: leaving)
02:51:52onionhammerVarriount whats up
02:55:07*def- quit (Ping timeout: 246 seconds)
03:02:27*darkf joined #nim
03:10:01*elbow joined #nim
03:10:26*Quikli quit (Quit: Page closed)
03:17:28*ChrisMAN quit (Ping timeout: 272 seconds)
03:45:04*saml_ quit (Ping timeout: 246 seconds)
03:57:37*Demos quit (Remote host closed the connection)
03:58:50Varriountonionhammer: Trying to generate a decent Windows API wrapper without going through millions of lines of code.
04:01:09*Demos joined #nim
04:02:06*def- joined #nim
04:09:49onionhammerjoy
04:17:16*def- quit (Quit: -)
04:18:06*def- joined #nim
04:26:35*Demos quit (Remote host closed the connection)
04:29:03*Demos joined #nim
04:31:41*Demos quit (Remote host closed the connection)
04:38:01*Demos joined #nim
04:42:58*Demos quit (Remote host closed the connection)
04:45:34*Demos joined #nim
04:47:57*Demos quit (Remote host closed the connection)
04:49:25*Demos joined #nim
05:12:42*BitPuffin|osx quit (Ping timeout: 260 seconds)
05:14:08*FedeOmoto quit (Quit: Leaving)
05:14:53*Demos quit (Remote host closed the connection)
05:33:44*Kingsquee joined #nim
05:48:42*jszymanski joined #nim
05:49:28*yglukhov joined #nim
05:52:11*elbow quit (Remote host closed the connection)
05:53:37*yglukhov quit (Ping timeout: 246 seconds)
05:58:06*vegai joined #nim
05:59:16*vegai left #nim (#nim)
06:11:28*kas joined #nim
06:30:08*skyfex quit (Ping timeout: 244 seconds)
06:33:51*kas quit (Remote host closed the connection)
06:36:48*vendethiel joined #nim
06:59:54*xet7_ quit (Ping timeout: 265 seconds)
07:00:14*xet7_ joined #nim
07:03:42*Kingsquee quit (Read error: Connection reset by peer)
07:03:58*Kingsquee joined #nim
07:28:22*yglukhov joined #nim
07:32:48*yglukhov quit (Ping timeout: 264 seconds)
07:37:22baabelfishhow will finalizers/destructors work for references in 1.0?
07:37:25*xet7_ quit (Ping timeout: 256 seconds)
07:38:28baabelfishwill it be called immediately when the refcount goes to 0 or when it's being collected?
07:38:56baabelfishI'm too used to smart pointers...
07:52:35*yglukhov joined #nim
07:52:36*yglukhov quit (Remote host closed the connection)
07:53:08*yglukhov joined #nim
07:58:34*dalarmmst quit (Ping timeout: 246 seconds)
07:58:46*coffeepot joined #nim
07:59:05*dalarmmst joined #nim
08:09:51*yglukhov quit (Remote host closed the connection)
08:28:00*gokr joined #nim
08:34:46*Trustable joined #nim
08:54:12*yglukhov joined #nim
08:56:41*Ven joined #nim
09:08:15*zezba9000 joined #nim
09:10:27*yglukhov quit (Remote host closed the connection)
09:13:48*yglukhov joined #nim
09:18:34*Ven quit (Ping timeout: 244 seconds)
09:23:12*xet7_ joined #nim
09:30:04*xcombelle joined #nim
09:32:03*yglukhov quit (Remote host closed the connection)
09:34:21*Ven joined #nim
09:36:12Araqbaabelfish: destructors are immediately called at scope exit, finalizers when the gc cleans up
09:36:19Araqjust as the names suggest
09:37:50baabelfishAraq: I only got destructors working with objects, not with refs
09:38:18Araqever got a destructor work with T* in C++?
09:38:51baabelfishAraq: heh, but I was thinking if they worked like unique/shared pointers
09:42:58*yglukhov joined #nim
09:43:13*yglukhov quit (Remote host closed the connection)
09:43:29*yglukhov joined #nim
09:48:37*yglukhov quit (Remote host closed the connection)
09:59:14*yglukhov joined #nim
10:02:14*Ven_ joined #nim
10:04:25*Ven quit (Ping timeout: 240 seconds)
10:23:45*Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:29:09*zezba9000 left #nim (#nim)
10:52:04*Raimondi quit (Ping timeout: 246 seconds)
11:08:13*vendethiel quit (Quit: q+)
11:24:39*polde quit (Ping timeout: 256 seconds)
11:24:56*Ven joined #nim
11:32:51*polde joined #nim
11:40:42*polde quit (Ping timeout: 258 seconds)
11:49:15*drewsrem joined #nim
11:49:34drewsremIs there a possibility we'll get object variants that can have the same field-name for different object kinds?
11:50:33baabelfishimporting terminal gives me: unsigned.cpp:(.text+0x77): undefined reference to `stackoverflow_19801()'
11:54:05def-drewsrem: in a restricted manner with "of Foo, Bar: x: int"
11:54:25def-baabelfish: tried cleaning nimcache?
11:55:04baabelfishdef-: that did the trick
11:55:21def-baabelfish: still a bug though, not sure if it's been reported already
11:55:56drewsremdef-, is there some impossibility to implement the wider case I'm describing?
11:59:27def-drewsrem: offsets and data types can be different and the kind discriminator would have to be checked to access the field. also the type couldn't be known at compile time
12:00:04*xet7_ quit (Ping timeout: 246 seconds)
12:00:09drewsremhmmmm... I see
12:03:20coffeepotIs anyone on latest devel to check if this still generates codegen issue? https://gist.github.com/coffeepots/2174e0167539f39a4bba
12:04:21def-coffeepot: have to be on windows for that?
12:04:24Araqcoffeepot: it should generate a compiler error instead. an array is not a pointer.
12:04:54coffeepotyeah i know i dun fucked up but i thought i'd mention it as should never be codegen issue :)
12:05:13coffeepotdef- yes good point
12:06:14coffeepotthink i meant to type this echo "ws bytes ", repr(cast[ptr array[0..255, byte]](ws))
12:06:16Araqdef-: actually you can use --os:windows and look at the generated C :P
12:07:11def-coffeepot: then it fails the C compilation: nimcache/x.c:309:118: error: lvalue required as unary ‘&’ operand
12:08:49*xcombelle quit (Remote host closed the connection)
12:13:02coffeepotyeah i guess it's this &(&ws_92003[(((NI) 0))- 0])
12:14:31coffeepotref of ref? No idea, been a while since I done any C
12:32:43*Kingsquee is now known as KingslavyTOS
12:32:54*KingslavyTOS is now known as Kingsquee
12:34:16*xet7_ joined #nim
12:48:02federico3can you guys see an use case where people might want to use nimble as a library?
12:48:38Araqfederico3: actually the compiler should use nimble as a library to resolve import statements
12:48:56Araqdom96 disagrees for reasons that escape me
12:49:19Araqhe told me to read his upcoming book to be enlightened :P
12:49:21federico3hm, I expected the compiler to be self sufficient
12:49:32federico3a book on Nim?
12:49:37Araqyeah
12:49:57federico3I want it on yesterday. Take my money!
12:51:22Araqactually we're both working on books about Nim but my is becoming a pamphlet about how Unix should have been Lisp instead
12:51:31Araq(nah, just kidding)
12:52:00Araq(but seriously ... Lisp should have killed Unix ...)
12:55:27*federico3 files the book under Humour
13:06:08*polde joined #nim
13:16:46*Raimondi joined #nim
13:34:36*Raimondi quit (Read error: Connection reset by peer)
13:36:37*FedeOmoto joined #nim
13:39:18*Raimondi joined #nim
13:40:36*Ven quit (Ping timeout: 264 seconds)
13:41:41r-kuError: pragmas are only allowed in the header of a proc
13:41:54r-kuis there any usual mistake that leads to this totally unhelpful error?
13:43:39Araqr-ku: you have a forward declaration and the compiler cannot bother to sync 2 pragma lists
13:43:51Araq*cannot be bothered
13:44:02Araqso instead it complains
13:44:24r-kuokay i could be doing something like this. also error could be more clear..
13:46:49Araqfix it
13:48:14Araqevery error message should have a little star that I can click onto to get a web page describing possible solutions ... oh wait ... there is no ansi escape sequence for "link here"
13:49:23*Raimondi quit (Read error: Connection reset by peer)
13:49:44Araqso sorry ... have to wait for 3 decades until the last unix beard figured out a technology from the 70ies might not be a suitable solution for good
13:50:51*xet7_ quit (Read error: Connection reset by peer)
13:50:58*xet7_ joined #nim
13:53:49r-kuAraq so what should i do here? found forward declaration that causes error. but for example removing pragmas at all doesnt make issue go away
13:53:58r-kunot sure what happens here and why it doesnt work
13:54:41Araqthe forward decl gets all the pragmas, the real decl none
13:57:20r-kuweird, thats how i had it to begin with
14:03:20*Demos joined #nim
14:05:34*Raimondi joined #nim
14:09:02*Demon_Fox joined #nim
14:11:28r-kucalling create(Coroutine) i got Error: type mismatch: got (typedesc[Coroutine])
14:11:32r-kunew regression?
14:22:22*Demos quit (Remote host closed the connection)
14:24:52Araqr-ku: well ... this should have never worked in the first place
14:25:03Araqwhat does your create look like?
14:25:10*Demos joined #nim
14:28:28r-kuvar x = create(Coroutine)
14:29:03Araqproc create( ? )
14:30:42*darkf quit (Quit: Leaving)
14:34:28*Raimondi quit (Read error: Connection reset by peer)
14:34:36r-kuAraq what i pasted is exactly code i had. it supposed to do sizeof of Coroutine struct and allocate it
14:35:03r-kusizeof should work on typedesc..
14:35:19r-ku(Coroutine is a type, sorry should have mentioned before)
14:35:42Araqhow does the signature / prototype / header of your create look like?
14:36:06Araqcause typedesc inference for generic T is now verboten, for good reasons
14:36:24Araqthat's a breaking change, but not a regression
14:36:41Araqproc cmp[T](a, b: T): int = discard
14:36:50Araqcmp(int, int) # wtf?
14:37:11Araq# T should still be a proper value at least
14:37:56*Demos quit (Remote host closed the connection)
14:39:36*Raimondi joined #nim
14:49:08*boopisaway is now known as boop
14:56:07*Demos joined #nim
14:58:09coffeepotjust reading above about the forward decl error and compiler explainations, if there is one error i would like to see an extra message on (I have no idea if this would be easy to do or not) it's type mismatch on proc signatures for var items. When, for example, you loop over items and modify them, or try to modify a non var param it would be amazin
14:58:09coffeepotg if it could tell that the only diff is var and display "Did you mean to pass <param> as var?"
14:59:19coffeepotThe thing is atm it doesn't always say that the difference is var, so it'll say "got proc(a: int, b: string) but expected proc(a: int, b: string)" and in some cases not mention the var, can get very confusing
15:00:30coffeepotI've learnt now when it complains the sigs are the same to check var params or seq.mitems, but when the param lists are long it's not obvious what the issue is
15:00:48coffeepoti do love *that* it complains though :)
15:02:09r-kuAraq that was not my create, that was system.create()
15:02:44r-kuand it calls system.sizeof()
15:03:46r-kuanyway i did it better way
15:03:55r-kualso PR you wanted https://github.com/nim-lang/Nim/pull/3160
15:05:51Araqr-ku: aha, ok, we need to fix system.create
15:06:21r-kunot sure why you also deleted system.free
15:06:42Araqnews.txt explains it
15:06:51r-kukk will read
15:07:19r-kuerr where is that?
15:07:46r-kunvm found
15:09:33coffeepotr-ku you mention you would like feedback on coro names - coroStart, would this be better as coroAdd if it's not starting the coroutine?
15:10:02Araqcoffeepot: actually this problem got worse with the "overloading by var-T" feature, the error message used to be better
15:10:13r-kucoffeepot probably so yes
15:10:30r-kunot even sure if prefixing all of them with "coro" was good idea
15:10:38r-kubut well.. good enough for early testing i guess
15:11:19Araqbbl
15:13:29coffeepotr-ku looking forward to your coroutines stuff :) btw can you add coro's in after start has been called?
15:14:40r-kusure, from within other coroutines too
15:14:50coffeepot:) nice
15:16:04coffeepothow does your coroutines stuff relate to async btw? Isn't async single threaded? Are the coro's single threaded or do they spawn separate threads according to load? Is this something that would be useful for something like jester do you think over async?
15:17:00r-kupoint of coroutines is to be single-threaded so you get multithreading-like abilities without complexities of multithreading
15:17:37r-kushould someone want several threads to run coroutines they would have to do it on their own. coroRun() per thread, and coroutines would run on thread they were started on
15:18:08r-kupassing data between such coroutines would be same as passing data between different threads now in nim
15:18:35coffeepotcool, sounds good tbh, so no locking when passing data between coros?
15:19:19coffeepoti suppose you wouldn't need to if they're running on same thread
15:19:19r-kuif they are on same thread then yes
15:20:01coffeepotso what's the main difference between this and async? Or is this a replacement for async?
15:20:30r-kuasync is made on top of iterators and you cant yield from within a subcall in iterator
15:20:39r-kuhere you can go as many levels deep as you want and still yield
15:20:50coffeepotthat sounds really awesome :)
15:21:25r-kuif basic api tapped more into OS we could do awesome things with this
15:21:36r-kufor example windows at least has non-blocking file reading
15:22:02r-kuso if there was means to check if such read call returned we could have read calls that do not block but let other coroutines execute
15:22:19r-kuwhile coroutine that called read() is actually waiting for os to return data
15:22:50*pregressive joined #nim
15:22:51coffeepotsweet
15:23:11coffeepotif you have time you should definitely mention that in your docu
15:23:30coffeepotpretty big deal really :)
15:24:09coffeepotright i'll let ya get on, thanks for the info :D
15:24:55r-kupretty sure its obvious for those who would be implementing that kind of functionality ;)
15:26:16coffeepotyeah i don't really know much about coroutines other than their existance, so it's nice to hear the intricacies to know what i might use them for
15:29:56coffeepotbtw i meant coroutines being a big deal, very useful functionality
15:33:35r-kuglad people like it. nim got them by accident tbh
15:33:49coffeepothow so?
15:33:59r-kui only planned on hack for my own needs but.. well Araq knows how to exploit people hehe
15:34:12coffeepothehe for the greater good lol
15:34:20r-kutotally :)
15:34:38coffeepotsame with my edit to times.nim, I wrote some funcs for my own use then suddenly PR...
15:34:53coffeepotcan't complain though
15:35:14coffeepotshame this odbc stuff is dragging on, hopefully once that's done people will find it useful
15:35:40coffeepotcertainly better than odbc in C/C++ o_O
15:36:20*ChrisMAN joined #nim
15:37:16r-kui dragged coroutines too
15:37:25r-kuesp now that i no longer need them heh
15:47:15*xet7_ quit (Read error: Connection reset by peer)
15:47:32*xet7_ joined #nim
15:54:24*yglukhov_ joined #nim
15:57:38*yglukhov quit (Ping timeout: 260 seconds)
15:57:59federico3anybody into DHTs?
15:58:30*yglukhov_ quit (Ping timeout: 250 seconds)
16:01:21DemosDistributed hash tables?
16:01:26federico3yep
16:01:46DemosI mean I've worked with them, I don't really like dealing with their implementations though
16:05:09federico3implementations in general?
16:07:06Demosum, we had to implement something like chord in class
16:17:20*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:19:22*Demos quit (Remote host closed the connection)
16:21:38Demon_FoxI've been researching DHT's this whole summer
16:21:52Demon_Foxdarn.
16:22:00Demon_FoxThe one question I could have helped with.
16:23:37federico3I'm still here
16:24:22Demon_FoxI mixed you up with demos
16:24:23federico3I've noticed there isn't any basic DHT library implemented in Nim
16:24:35Demon_FoxNim is still rather new.
16:24:45federico3yep
16:25:07Demon_FoxThis summer, my project was to make an application that used a DHT of its own
16:25:27federico3a custom protocol?
16:25:44Demon_FoxNot really custom
16:25:55Demon_FoxWell, I suppose so
16:26:16Demon_FoxThe only problem is the lack of documented cryptographic libraries in C.
16:26:52Demon_FoxTrying to make a wrapper for my use cases has turned into my project
16:27:03Demon_FoxAfter I'm doing, I'm switching over to python.
16:27:24federico3were you using C?
16:27:33Demon_FoxUnfortunately.
16:27:56Demon_FoxAfter I'm done, I need to write a python wrapper for it
16:28:15Demon_FoxOr use someone elses wrapper.
16:28:23Demon_FoxI'm quite fond of that idea.
16:28:46Demon_FoxJust abandoning my C code, because no one knows how to write proper documentation.
16:30:23Demon_Foxfederico3, Are you considering nim for a serious DHT application?
16:31:47federico3nope, just play
16:33:53Demon_FoxWell...
16:34:24Demon_FoxWhat exactly do you want to do with it federico3
16:34:50Demon_FoxIf you want to use it over the internet, you might want to consider a different programming language
16:35:04federico3why?
16:35:24Demon_Foxbecause you would want the use of several libraries in order to increase your connectivity behind firewalls
16:35:44Demon_FoxISPs, your router, your computer, and etc.
16:36:12federico3upnp, regular natting, hole punching, anything else?
16:36:40Demon_FoxSeveral other reasons.
16:36:44federico3do dhts do hole punching nowadays?
16:37:06Demon_FoxHave you used a modern torrent client?
16:37:42federico3deluge?
16:37:48federico3depending on the definition of modern :D
16:38:10*Demos joined #nim
16:38:20Demon_FoxHave you ever heard of an application called tribler?
16:38:38Demon_FoxThey talk about many techniques in their papers and links on solving the connectivity problem.
16:39:18Demon_FoxIn one of the good ones, they talk about how as a p2p application, you need to take every advantage you can.
16:40:16*k1i joined #nim
16:42:01*brson joined #nim
16:42:21federico3wasn't tribler ancient?
16:42:40Demon_FoxIt is still around
16:43:17Demon_FoxIt really feels more a like a research project, if you ask me.
16:45:54Demon_FoxWhen I was reading up on the docs, I really felt they wanted to make the project appealing to increase how big their real world tests could be.
16:46:50Demon_FoxJust given how they worded several things, that is what I thought.
16:49:16*xcombelle joined #nim
16:51:43Demon_Foxfederico3, Do you already know the common hash techniques to avoid potential address collision on the DHT?
16:54:36*yglukhov joined #nim
16:59:32*yglukhov quit (Ping timeout: 272 seconds)
17:00:48*Demos quit (Remote host closed the connection)
17:01:07*Demos joined #nim
17:05:48*xet7_ quit (Ping timeout: 264 seconds)
17:05:57*xet7_ joined #nim
17:15:10*yglukhov joined #nim
17:19:16*yglukhov quit (Ping timeout: 246 seconds)
17:22:37*elbow joined #nim
17:25:25flyxon the current devel branch, I get a segfault when compiling my code: https://gist.github.com/flyx/d44638440e2c1312e9f2
17:25:48flyxI can't really figure out which part of my code causes that error, because as soon as I start to insert echo statements, the error goes away
17:26:37flyxonly thing I know, it occurs while processing some macro
17:26:38Araqflyx: well you can always patch vmgen.fitsRegister to deal with 'nil'
17:27:06Araqand make it output an error containing the line number
17:27:23Araqwell I can do that for you of course
17:27:59flyxI guess I can do it myself. will try
17:28:00Araqbut after that I really like a testcase to protect against this regression
17:30:12*xet7_ is now known as xet7
17:31:04*brson quit (Ping timeout: 246 seconds)
17:32:59*brson joined #nim
17:40:52flyxseems like it crashes at lib/pure/terminal.nim(423,2)
17:40:57*flyx investigates further
17:41:29flyxwell that would kind of explain why it goes away when I insert echo lines
17:44:56Araqactually the 'echo' statements usually influence the VM's register allocator and it has nothing to do with terminal.nim that echos make the bug disappear
17:59:43*saml quit (Remote host closed the connection)
18:04:49*saml joined #nim
18:14:54flyxhm okay. I tracked it back to some string literal "content", but I can't find it in my code, and the line info gives "command line(0,0)"
18:22:00flyxokay, it's a constant, apparently with the value "content", and a typ of nil
18:38:21Araqflyx: did you just try devel or do you follow the development of devel?
18:39:07flyxAraq: I just checked out devel and used it.
18:39:32flyxI have now figured out that the error originates on a nil literal in my code
18:41:03flyxI think I don't have enough knowledge to figure out *why* this error occurs
18:41:40*Demos_ joined #nim
18:42:59flyxor how to fix it. if I modify fitsRegister to check for t == nil, the vm just fails later
18:45:10flyxit seems that c.constants.sons[rb].typ just shouldn't be nil, but it is
18:46:01Demos_:\users\charlie\source\nimrod\nimcache\stdlib_times.c(985): error C2065: 'tzname': undeclared identifier
18:48:20AraqDemo_ I wonder why nobody has fixed that tzname bullshit yet
18:48:36Demos_how long has it been broke
18:48:44Demos_I tried all the way back to 0.11.2
18:48:46Araqflyx: well I need some test program to fix it
18:49:13AraqDemo_ well people here usually think they can just hack anything that "works" in C and it's then "portable"
18:49:33AraqI usually don't use anything from C land if I can avoid it
18:49:38Demos_I'm compileing using the binary from the 0.11.2 installer package using MSVC 19.00.23026
18:50:03*elbow quit (Quit: Leaving)
18:50:13flyxAraq: I guess I'm unable to reduce my code to a minimal example, but you can of course check out my source from github, if that's feasible
18:50:37Araqsure, I didn't know it's open source
18:54:59flyxAraq: https://github.com/flyx/emerald branch v2, compile test/inheritance.nim, that should trigger the error.
18:55:36*elbow_jason joined #nim
18:56:45Demos_libraries in lib/pure should not be using {.header: ..., importc.} right/
18:57:23flyxum, branch is v0.2, not v2
19:11:56Demos_Araq, I fixed the build failure, apperently windows does not expose tzname any more in <times.h> which is pretty strange
19:12:10AraqI get "cannot convert 2147483648 to int"
19:12:42Araqbut with --cpu:amd64 I get your crash
19:15:06flyxah, there may be some issues with the 32bit build, I haven't started to test that yet
19:18:37*Jesin quit (Quit: Leaving)
19:19:39Araqoh ffs, does everybody use unittest.nim?
19:20:23flyxI didn't find anything else to use
19:20:41*Jesin joined #nim
19:20:47Araqwhen isMainModule: doAssert foo == bar
19:21:11renesacunittest is nicer and should work...
19:21:17Demos_but people want pretty colors
19:21:22Demos_:^)
19:21:47AraqI want a HTML based shell. but *shrug* it's widely known that I'm a crank
19:22:22*vendethiel joined #nim
19:22:49*gokr quit (Quit: Leaving.)
19:29:15*gokr joined #nim
19:30:32*pregressive quit (Remote host closed the connection)
19:33:17*yglukhov joined #nim
19:50:04*RobCWD joined #nim
19:50:27*RobCWD left #nim (#nim)
19:54:41Araqflyx: congrats on finding an interesting bug ;-)
19:54:53flyxthanks ^^
19:59:43Araqhrm case statements just dump whole ASTs into the "const" section in the VM
20:00:31*Demos_ quit (Read error: Connection reset by peer)
20:00:39*Demos quit (Remote host closed the connection)
20:01:03Araqthat's crazy
20:06:00*jszymanski quit (Quit: computer sleeps...)
20:10:45*Raimondii joined #nim
20:12:04*Raimondi quit (Ping timeout: 246 seconds)
20:12:57Araqflyx: are you sure this has ever worked?
20:14:06*Raimondi joined #nim
20:14:19flyxAraq: never on stable, but on an earlier version of devel, it worked
20:15:33*Raimondii quit (Ping timeout: 255 seconds)
20:16:59*yglukhov quit (Read error: Connection reset by peer)
20:20:18*yglukhov joined #nim
20:20:57*zahary1 joined #nim
20:22:50*zahary quit (Ping timeout: 250 seconds)
20:31:28*pregressive joined #nim
20:31:57*flyx is away now
20:47:57*xificurC quit (Read error: Connection reset by peer)
20:48:35*elbow joined #nim
20:53:52*yglukhov quit (Remote host closed the connection)
20:54:10*hannes__ joined #nim
20:55:20*Raimondi quit (Ping timeout: 250 seconds)
20:56:05hannes__thanks
21:00:05Araqhi hannes__
21:01:32*Demos joined #nim
21:03:53*xcombelle quit (Quit: Leaving)
21:05:58*Demos quit (Ping timeout: 246 seconds)
21:07:54hannes__Araq: hi - I actually was going to ask a question, but by asking I actually realized what the problem was. Hence, thanks
21:08:04*BitPuffin|osx joined #nim
21:10:03Araqflyx: your code makes my poor vm cry
21:10:32Araqgenerates thousands of instructions
21:12:12*Raimondi joined #nim
21:19:58*zahary1 quit (Ping timeout: 246 seconds)
21:23:06*Trustable quit (Remote host closed the connection)
21:24:27*FedeOmoto quit (Quit: Leaving)
21:26:38*Raimondi quit (Ping timeout: 260 seconds)
21:28:32*xificurC joined #nim
21:29:41*gokr quit (Quit: Leaving.)
21:32:20*Raimondi joined #nim
21:32:41*saml quit (Quit: Leaving)
21:33:08*pregressive quit (Remote host closed the connection)
21:34:09*pregressive joined #nim
21:35:45*pregressive quit (Remote host closed the connection)
21:39:16*filwit joined #nim
21:41:49filwithmm.. the sizeof {.pure inheritable.} types is '1'.. pretty sure that's a bug..
21:43:32Araqno, it is not
21:44:11filwitreally? why? the object even has a 'bool' property in it and if I remove the {.pure.} ist's '16'
21:44:27filwitsizeof 16 i mean
21:45:48filwitmaybe i'm not thinking about this right... duh..
21:45:49hannes__Where would be the best place to go to ask beginner level idiom/code review questions? The nim forums? reddit?
21:46:33filwitfor some reason I was thinking 16 was way too high a number for refc/typeinfo but obviously it's not i'm just being thick..
21:46:37filwitsorry
21:46:41Araqhannes__: forum or here i guess
21:47:00*gokr joined #nim
21:47:00filwitsorry
21:47:07filwitwhoops.. damn alt-tab
21:48:31Araqpretty sure flyx's code never worke or he got extremely lucky
21:52:30*brson quit (Remote host closed the connection)
21:53:24hannes__So, I've been trying to write quicksort in Nim. It works, but only for sequences and not for arrays. Is there a way to make it work for both? https://gist.github.com/hanst99/8f3868f2c2b1cb12d489
21:54:28hannes__also, I'm assuming that there's a `<` then operator defined for my `A`s. Is there a way to codify that in the type?
21:56:11*pregressive joined #nim
21:58:05Araqhannes__: openarray
21:59:06Araqyou can use concepts to encode that you assume '<' but you should really use 'cmp' instead and usually we don't care about encoding type requirements in generics
22:00:26hannes__Ah, I see, thanks
22:01:11Araqit's not like the error messages significanly improve or something
22:01:32flyxI guess I got extremely lucky.
22:01:56flyxI have some workarounds in my code for handling shortcomings of the vm working with refs
22:03:59*hannes__ quit (Quit: Lost terminal)
22:04:02Araqmeh I hate these things, I can fix it but later on you'll complain about slow compile times
22:04:42flyxwould that be the quick fix or the real fix?
22:05:14Araqdoes it matter? when it worked were compile times acceptable?
22:05:49flyxyes, and actually, fast compiling is not a primary goal for me
22:07:12flyxI'd rather have my code compile slowly than having the risk of running into a vm bug
22:07:53Araqyeah well ... kinda late for that :P
22:08:04Araqnow we have a speedy and buggy VM
22:09:22*gokr left #nim (#nim)
22:10:01flyxI admit that I started my project with the thought in mind „let's see how well these macro things work“
22:10:35flyxbut isn't a bug-free vm a long-term goal?
22:11:07Araqsure but that doesn't mean I like it
22:11:26AraqI have 3 fixes for your bug btw
22:11:35Araqbut not one that satifies me
22:13:44drewsrembtw. what does the VM actually do? / what it is for?
22:14:32Araqdrewsrem: runs Nim code at compile time
22:16:00drewsremAh I see
22:20:57flyxwell it's your decision if and how to fix it. I'd just say, if the Nim vm should one day be bug-free, the bugs need to be fixed *somewhen*, so why not now
22:26:34Araqyeah yeah yeah
22:28:38Araqdon't worry, it's always the same kind of bug in the vm anyway
22:29:38*flyx doesn't worry
22:30:04*flyx goes to sleep instead
23:05:47*yglukhov joined #nim
23:10:06*yglukhov quit (Ping timeout: 250 seconds)
23:15:41*boop is now known as boopisaway
23:25:27*MatrixBridge quit (Ping timeout: 256 seconds)
23:27:09*MatrixBridge joined #nim
23:31:35*filwit quit (Ping timeout: 244 seconds)
23:43:06*filwit joined #nim