<< 06-06-2016 >>

00:00:06*yglukhov quit (Ping timeout: 276 seconds)
00:31:14*yglukhov joined #nim
00:35:21*yglukhov quit (Ping timeout: 244 seconds)
00:55:40*yglukhov joined #nim
01:00:04*yglukhov quit (Ping timeout: 252 seconds)
01:04:43*chemist69_ joined #nim
01:07:40*chemist69 quit (Ping timeout: 260 seconds)
01:31:58*yglukhov joined #nim
01:36:22*yglukhov quit (Ping timeout: 260 seconds)
02:07:59*yglukhov joined #nim
02:12:09*yglukhov quit (Ping timeout: 244 seconds)
02:25:59*girvo joined #nim
02:26:59girvoHey all :)
02:29:55girvoI've been playing around with variant objects, specifically to see if I can implement the Either monad (or a subset of) in Nim -- one of the features I'm attempting to achieve is being able to use the "case" statement on it to check the "kind" for Left or Right
02:30:34girvoI'm sure I came across something last night that said to use "when" in the case statement but I can't for the life of me find that document again
02:31:23kierit is possible to use 'when' in an object definition, but that doesn't do what it looks like you're looking for here
02:31:44kierwhat you probably want is just a normal-looking case block inside your object
02:32:26*yglukhov joined #nim
02:34:35*xet7 quit (Ping timeout: 260 seconds)
02:35:00kiergirvo: something like this https://gist.github.com/kierdavis/ab680f2914593efed13486e7bb1e3924
02:36:56*yglukhov quit (Ping timeout: 244 seconds)
02:39:50kierfor reference, the section of the manual that's relevant to this is http://nim-lang.org/docs/manual.html#types-object-variants
02:40:24mccgirvo, have you checked out the implementation of Option in the standard library? (I've been meaning to look at that and see how it did it.)
02:42:36girvokier: yeah that's what I'm working with at the moment :) cheers
02:43:04girvomcc: I've taken a look at the nimble library optional_t -- it's quite well done, but gets to cheat as None[T] has the same generic type as Some[T] ;)
02:43:30girvoBecause Left[L] and Right[R] can have completely different types, I gave myself a headache heh
02:43:36mccyikes
02:44:09girvohehe. its not as crazy as it sounds, and I know there's a way to crack it, I got pretty close last night but I needed to get some sleep instead
02:44:45girvoBetween Option and Either, you've basically got nicely composable error and nullable handling
02:46:10kierhmm, you've got me thinking maybe I should play around with monadic parser combinators in Nim
02:47:23girvokier: Thats basically the long-term goal; I'm doing it slightly backwards here, because i've got a practical need for Option and Either, but long-term I want to take that further!
02:47:53girvoCombine it with concepts and I think you could achieve some seriously clean code ;)
02:49:08kiergirvo: have you seen the 'monad' library in nimble?
02:49:10kierhttps://github.com/superfunc/monad
02:50:14kierit doesn't appear to be particularly active, but it could be useful to take a glance at if you're poking around with this sort of stuff
02:50:16girvoI have indeed kier but it's only got some of the simpler ones in there so far :) good base to keep working on the idea tho
02:50:21girvoyep, agreed
02:51:39girvoThe >>= operator is a nice base for building out more of these I think, it's the one thing that optional_t is missing
02:52:22tautologicoEither is usually parametrized with both types
02:53:13girvotautologico: yeah, that's what I've been implementing
02:53:34girvoor trying to, anyway heh
02:55:25girvoI've basically been attempting to implement the fantasy-land spec in Nim, wtih reference to the Purescript implementations of these ideas, as those are the two I've used "in anger"
02:55:55tautologicowhen higher-kinded types are missing we can resort to syntactic hacking or metaprogramming... I think the latter is quite possible as a library in nim
02:56:17girvotautologico: I hadn't even reached for metaprogramming yet, but that's actually quite a good idea
02:56:35girvosometimes I forget that Nim's metaprogramming is quite good
02:56:48tautologicoF# does monads as syntactic conventions, but it requires special support by the compiler
02:58:11*yglukhov joined #nim
02:58:18girvoHere's one of a few ways it can be tackled in Ocaml: http://blog.0branch.com/posts/2012-03-26-01-implementing-functor-ocaml.html
03:01:01girvotautologico: Are there any dramas using generics with metaprogramming? I remember there were edge cases, but that was back in the v0.10 days
03:01:53tautologicoI think there is drama, if by drama you mean some SIGSEGV's :)
03:02:01girvothats exactly what I meant hehe
03:02:42tautologicoI tried to create a generic template recently and got them
03:03:24*yglukhov quit (Ping timeout: 276 seconds)
03:03:45girvoyeah, damn. well i'll give Either[L, R] a shot again, but maybe use templates for the bits I got stuck on -- hopefully I can avoid SIGSEGVs but worst case I'll see whether those bugs are difficult to fix
03:04:47girvoI wonder if concepts are the better way to go for these sorts of types. I've not tried to play with them as of yet
03:22:35*yglukhov joined #nim
03:26:59*Jesin quit (Quit: Leaving)
03:27:12*yglukhov quit (Ping timeout: 260 seconds)
03:27:24*desophos joined #nim
03:28:23girvoYou know I wonder if Result<T, E> from Rust will be easier to implement
03:28:24girvohttps://doc.rust-lang.org/std/result/
03:29:01tautologicoif I remember correctly Result is just Either... the error type is not fixed
03:29:57girvoI'm taking a look now, it seems like a (backwards, they use Left for Ok lol) Either, yeah. Guess Rust's type-system is slightly more powerful than Nim's?
03:30:11girvoI know that Rust doesn't truly support higher-kinded types at the moment
03:30:28tautologicotraits are well defined and used everywhere, I think that's the main difference
03:30:49girvoThat'd probably be it, yeah. Reminds me to take another look at Rust sometime
03:31:35tautologicoI like rust, it's just that sometimes you have to fight the compiler :)
03:31:52girvoThat was my experience with it last time I tried it, about 12 months ago now :)
03:32:06girvoBut hey, compiler saying "No!" is better than a segfault ;)
03:32:15girvo(for certain definitions of better)
03:32:19tautologicothe borrow checker means code which uses lots of references can be tricky
03:32:50girvoyeah, I've not used it in anger yet, and I'd expect that could be annoying. Nim makes that nice over here!
03:32:54tautologicographs for example... for an automata implementation I basically defined a new type of references in term of state IDs...
03:33:05tautologicothat seems to be the recommended way to implement graphs
03:33:07girvoWhich has proven rather useful for my TAR impl. recently
03:33:19girvoah yeah, makes sense
03:34:01tautologicowhile state IDs as references can't result in segfaults, some of the issues with pointers/references will be there, like invalid/dangling pointers
03:34:19tautologicoit's possible to pass an ID that does not correspond to any state/node in the graph
03:34:43girvooh really? in rust, you mean?
03:35:11tautologicoyeah, when you define your own reference-like system to avoid angering the borrow checker :)
03:35:50girvoHah! Oh man, that reminds me of some of the crazier stuff I've had to do in C++ over the years
03:36:02tautologicoand sometimes you have to resort to unsafe code... for instance I don't think it's possible to define doubly-linked lists without unsafe code
03:36:32girvoThat I've heard, yeah. But IMO using unsafe is better than using C at least
03:36:48tautologicoyes, especially if you keep the unsafe code well contained
03:37:27girvoOne thing I'd like to see in Nim is more clearly demarcated "unsafe" marker for the code that leaks over into C-land more; the low-level SDL wrappers can get quite painful if you're not careful in my experience
03:37:37tautologicothe parts which are unsafe are clearly marked, so that's better... the important thing is the % of the code that has to be unsafe in bigger projects... if it's small, then I think it's worth it
03:37:45girvoagreed
03:38:56tautologicoI think D has gained some ways to mark code as safe/unsafe as a reaction to rust
03:39:20girvoYeah. Now that's a language I haven't looked at in... I honestly don't know
03:39:43girvoI remember looking it, because I used Digital Mars' C/C++ compiler back in my Windows 2000 days!
03:39:51girvoVery different language now, I've heard
03:39:56tautologicoyeah
03:40:37tautologicothat's the thing, it started as a slightly better C++, now it's kind of a "more better C++" but it's still too much C++ for me :)
03:41:35*Jesin joined #nim
03:41:44girvoTotally fair hehe. C++ was the reason I picked up Nim originally. Pretty sick and tired of that language, and I'm glad I don't have to use it at work anymore
03:41:59tautologicoand actually C++ would be almost a good language for me if they deprecated everything before C++11
03:42:05girvoTruth!!!
03:43:13girvoC++17 looks even better... but the bulk of the code written will still be '03 or worse :'(
03:43:31tautologico98
03:44:08tautologicoand the language is so big that no two places seem to use the same subset
03:44:19tautologicothat's getting worse with each new standard
03:46:06girvoyeah
03:48:11*mcc has very quickly gone from wishing C++ was not so underpowered, to wishing it would stop adding features
03:57:43*akaisora_ quit (Ping timeout: 252 seconds)
03:58:48*yglukhov joined #nim
04:03:13*yglukhov quit (Ping timeout: 244 seconds)
04:23:10*yglukhov joined #nim
04:27:52*yglukhov quit (Ping timeout: 260 seconds)
04:34:28girvoFailing something like Either, what's the idiomatic way of Error handling in Nim?
04:34:41girvotry except?
04:35:03girvoThat's what I've been doing for the most part, but was curious if there was a better way
04:42:26girvoFrom the looks of it, I should probably be leveraging {.effects.} for those methods that "raise"?
04:43:38*endragorr joined #nim
04:59:19*yglukhov joined #nim
05:03:59*JStoker quit (Ping timeout: 250 seconds)
05:04:02*yglukhov quit (Ping timeout: 260 seconds)
05:06:34*JStoker joined #nim
05:19:39*endragor joined #nim
05:22:44*s4 joined #nim
05:25:57*yglukhov joined #nim
05:30:57*yglukhov quit (Ping timeout: 276 seconds)
05:50:14*yglukhov joined #nim
05:54:47*yglukhov quit (Ping timeout: 260 seconds)
06:18:13*endragor_ joined #nim
06:21:28*endragor quit (Ping timeout: 272 seconds)
06:32:01*endragor_ quit (Remote host closed the connection)
06:32:30*endragor joined #nim
06:32:43*zodiak quit (Ping timeout: 260 seconds)
06:33:47*Arrrr joined #nim
06:33:47*Arrrr quit (Changing host)
06:33:47*Arrrr joined #nim
06:34:28*mtj_ quit (Ping timeout: 252 seconds)
06:37:54*mtj_ joined #nim
06:51:33*zodiak joined #nim
06:54:25*Trustable joined #nim
06:58:03*endragorr quit (Ping timeout: 240 seconds)
07:02:02*yglukhov joined #nim
07:03:57*girvo quit (Ping timeout: 258 seconds)
07:04:13*girvo joined #nim
07:08:33*girvo quit (Ping timeout: 240 seconds)
07:15:52*rusua joined #nim
07:35:18*filcuc joined #nim
07:41:27*bjz joined #nim
07:42:45yglukhovhey everyone. so i'm hitting some problems with memory leaks, and i'm not sure of a good way to debug them. can anyone share any?
07:44:29yglukhovAraq: i've been thinking of some flag on an object, which basically says "im expecting this object to be collected soon, because i think it should not have any remaining references, so dear gc please tell me if you can't finalize it, and show me the grpah of what still holds references to it"
07:45:00yglukhovcan i do it somehow?
07:45:56*bjz quit (Client Quit)
07:50:46*girvo joined #nim
07:51:18Araqyglukhov: did the new GC improve the situation or did it have no effect?
07:52:26Araqthere is a heap dump for gc:v2 that I can backport to v1
07:52:35Araqand a tool for evaluating the graphs
07:52:37*rusua quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:53:41cheatfateAraq, heap dump with type names?
07:54:13cheatfateor something like memory address, memory size
07:55:17*bjz joined #nim
07:55:25*girvo quit (Ping timeout: 260 seconds)
07:55:43Araqcolors, refcounts and an object children
07:55:59Araqwe don't know the type names cause RTTI doesn't contain them :-)
07:57:35cheatfatelook like we can make stack trace? or something? or at least line in debug mode?
08:00:33*fastrom joined #nim
08:00:56yglukhovAraq: i don't think gc is guilty here. We've got a pretty unobvious graph a closure chains, timers, which live by themselves, and probably hold the big object graph that has to be freed instead. so i'm just asking if there's a good way to debug such things.
08:01:58Araqwell a heap dumb is a heap dumb.
08:02:59AraqI never found them to be useful.
08:03:54Araqyou can insert 'echo' into your finalizers
08:04:06Araqbut then doesn't tell why it's *not* called.
08:04:29yglukhovyep
08:05:20Araqso yeah, I can help you.
08:05:26yglukhovreally?
08:06:54Araqsure, just give me a couple of minutes
08:07:08yglukhovok cool
08:08:00cheatfateAraq, i think it will be good if you make destroyers not experimental :) so i can use them with '--gc:none` :)
08:08:47Araqcheatfate: use --gc:stack and finalizers instead
08:08:58Araqway superior Nim experience.
08:13:22yglukhovmeanwhile, i've got another question, which is mostly philosophical. We've mostly switched to emscripten because the fps is a whole lot better. But there are some things that are better be done by "native" browser js, like for example loading images to textures, loading mp3s to audio buffers, because otherwise we use a lot more asmjs heap then we should and more asmjs code should be compiled and executed instead of native browser code
08:15:16yglukhovso i've been thinking of a way to mix nim code that partly compiles to c, and partly to js, and then magically merged by EM_ASM. EM_ASM is smth like nim's emit pragma that allows inserting js direclty to the output file
08:23:25*chemist69_ quit (Ping timeout: 260 seconds)
08:26:52cheatfateAraq, but it looks i need to rewrite whole asyncdispatch to use gc:stack :(
08:28:09cheatfateand if somebody wants to use my staff it also needs to use gc:stack :(
08:28:19Araqcheatfate: neither gc:stack nor gc:none is a solution for asyncdispatch in general
08:29:10cheatfateAraq, i'm already in step of modification of asyncdispatch, any ideas you want to implement?
08:31:24Araqhow about a stable asyncdispatch we all can actually use and enjoy?
08:31:59Araqwhy does protect/dispose fail to make it multi-threaded ready?
08:32:27Araqyglukhov: why is emscripten faster?
08:32:44yglukhovbecause its asm.js? =)
08:32:47cheatfateAraq, i think current implementation of asyncdispatch is stable
08:33:08*girvo joined #nim
08:33:17Araqcheatfate: then where's your PR? :-)
08:33:27yglukhovasm.js is kinda comparable to native code, because it's kinda translated to asm by browser
08:34:11*endragor quit (Remote host closed the connection)
08:34:46cheatfateAraq, you dont like this protect/dispose usage
08:34:48cheatfate?
08:35:15AraqI wrote protect/dipose for this usage!
08:35:25Araqso it needs to work, tell me it works.
08:35:30cheatfateit works
08:35:36Araqyummy
08:36:32*mcc quit (Quit: Connection closed for inactivity)
08:36:34Araqyglukhov: is asm.js supported by every browser already? and would it help if we annotated the types in our JS codegen?
08:36:52cheatfatethere is a problem, i want mine ioselectors.nim to be multithreading ready, so it can be used without asyncdispatch
08:37:09cheatfateso i need to make it to use shared memory not `gc` memory like selectors.nim
08:37:37*girvo quit (Ping timeout: 250 seconds)
08:37:37cheatfatebut to use asyncdispatch in `lwan` way ioselectors.nim don't need to be multithreaded
08:38:33yglukhovAraq: every browser - pretty much. Annotations - i haven't heard of any browser taking advantage of js type annotations.
08:38:38cheatfatebecause `lwan` way is to use line N*2 asyncdispatch pools where N is number of cores
08:40:25*chemist69_ joined #nim
08:45:08cheatfateAraq, and i think its possible to write `lwan` like web server on current version of asyncdispatch
08:45:42cheatfatebecause there no interaction between `worker` threads
08:49:09cheatfateAraq, and i was removed my PR just because it not passed simple tests...
08:49:58Araqyglukhov: http://asmjs.org/spec/latest/ asm.js pretty much relies on type annotations to get its speed
08:50:02cheatfatei keep forgetting to run tests localy
08:50:23Araqby type annotations I mean the x|0 stuff
08:50:30*girvo joined #nim
08:50:34*desophos quit (Read error: Connection reset by peer)
08:55:16*girvo quit (Ping timeout: 252 seconds)
08:59:31cheatfateAraq, is it easy to make something like "-DUSE_SLL" for Nim? so i can get it with something like `compileOption`?
09:01:36def-cheatfate: there actually is -d:ssl in httpclient: http://nim-lang.org/docs/httpclient.html#ssl-tls-support
09:03:11*endragor joined #nim
09:04:13yglukhovAraq: asm.js code has almost nothing in common with conventional js, except its a subset. e.g. you can't use js objects in asm.js. only ints and floats.
09:05:28yglukhovthe heap in asm.js is an array of bytes.
09:06:03yglukhovnim reference in asm.js would be an int = index in the heap
09:06:30cheatfatedef-, thanks a lot
09:06:53yglukhovso i don't think current js codegen can be easily changed to produce asm.js code
09:08:01yglukhovbut asm.js allows calling "external" functions which can be "conventional" js. e.g. you can't work with dom in asm.js, but you can do it with external functions
09:10:11cheatfateyglukhov, and i think call to this "external" functions is expensive?
09:10:43*Demon_Fox quit (Quit: Leaving)
09:15:09cheatfatelike switching user-mode and kernel-mode i think
09:21:03*bjz_ joined #nim
09:22:00*bjz quit (Ping timeout: 244 seconds)
09:24:32yglukhovcheatfate, yeah, most likely
09:25:13yglukhovso its ok to call them lets say on user events, but not in the render loop
09:32:28Araqyglukhov: asm.js doesn't work with Nim's GC.
09:32:36yglukhovwhy not?
09:32:55yglukhovseems to be working for me
09:33:03Araqcause you cannot track stack roots imprecisely in asm.js
09:34:02Araqthere have been workarounds but I don't know how they work
09:34:09yglukhovbut thats ok if disable gc, and fullCollect in the runloop, close to the beginning of the stack?
09:34:35yglukhovbecause that's what im doing and it looks pretty stable
09:35:01Araqthat can work.
09:36:04yglukhovyou're right that gc can free used objects when called deep in stack, i've hit that problem, but now its all good
09:37:29yglukhovthe game always runs full 60fps with this setup. in js it could occasionaly drop to 14fps.
09:37:57*xet7 joined #nim
09:39:18*nsf quit (Quit: WeeChat 1.4)
09:50:41*girvo joined #nim
09:50:55*aziz_ joined #nim
09:52:57Araqyglukhov: backporting the heap dump to v1 is too much work, sorry, but gc:v2 should do for you.
09:53:11*fastrom quit (Quit: Leaving.)
09:55:18*girvo quit (Ping timeout: 258 seconds)
09:55:56*aziz_ is now known as aziz
09:57:08*aziz quit (Quit: Ex-Chat)
10:02:40yglukhovAraq: ok, any tutorial on how to use it? =)
10:08:38Araqbbs
10:44:13cheatfateyglukhov, what is the game you are working on?
10:45:02yglukhovslot machines
10:45:41cheatfatereal one or online? :)
10:46:07yglukhovonline =)
10:46:11yglukhovand mobile
10:46:31cheatfateand you using nim's random number generator ? :D
10:47:39yglukhovhmmm.... judging from your question... i'm not allowed to discuss it with you? :D
10:48:16yglukhovjust kidding. yep. we're using nims random. why?
10:50:41*girvo joined #nim
10:51:01yglukhovcheatfate: ok now i get nervous =)
10:51:58cheatfateit because it predictable :)
10:53:34cheatfatei think you need to use real random number generator, but i think all owners of `slot machines` cheating :)
10:53:59cheatfatebut at least you need cryptographic random number generator
10:55:01*girvo quit (Ping timeout: 240 seconds)
10:56:10yglukhovcheatfate, well its not a real-money slot machine, so its not that critical, but thanks for the input
10:57:19yglukhovbtw, how can it be predictable if a single seed is used for all users, and you never know how many requests are processed between yours?
11:01:26cheatfateyglukhov, its harder, but at least it increases my chances because i know that all sequence numbers from the past are not appears in the near future... calculating of number of runs played is not so hard as you think
11:02:31cheatfatei can play one round (obtain `number` from random sequence) and then play one more round (obtain another `number` from random sequence), so i can calculate range between first one and second one
11:03:05cheatfateand use this range to predict 3rd number
11:03:28yglukhovbut the range is itself naturally random all the time
11:04:51yglukhovanyway i guess youre right that someone could cheat by trying to predict, but it looks really hard, and he will not get real money for it =)
11:06:12cheatfatei dont think range random... range depends on time of day and on behavior of constant visitors (how much it takes for them to play one round)... So if you want to cheat your site, i just need to collect some data, like playing whole day with minimal bets...
11:07:16cheatfateif i have more money i can make `week run`
11:07:48*girvo joined #nim
11:08:39cheatfate^^^^ use CPRNG, or CRNG or better buy 40$ device, which you can poll for really random data
11:12:28*girvo quit (Ping timeout: 264 seconds)
11:13:47Araqyglukhov: output the hex address of the ref object that has a finalizer attached to it
11:14:36Araq- call proc GC_dumpHeap*(file: File) at a strategic place
11:15:04Araq- 'nim c tools/heapdumprepl thefile'
11:15:15federico3cheatfate: userspace SPRNG have been the source of many vulnerabilities, that's why in-kernel SPRNG are recommended
11:16:25Araq- ask the repl of why and how the object is still alive
11:18:36cheatfatefederico3, i never talked about SPRNG... CPRNG != SPRNG
11:18:46dom96federico3: looks like andrea wants what you created http://forum.nim-lang.org/t/2300
11:20:35federico3cheatfate, i'll reprhase: s/SPRNG/CSPRNG/
11:23:25federico3oh, thanks dom96
11:33:43*elrood joined #nim
11:34:39*akaisora joined #nim
11:39:57chemist69_Hi Araq, you mentioned a few days ago, that you wrote a wrapper for libui and wanted to upload it to nimble. Did you already have the time to do that, because I would love to try it?
11:40:35Araqsure, let me upload it
11:41:02Araqwas a piece of cake and I like it so much it might become the official UI library for Nim.
11:41:14chemist69_That sounds great!
11:41:18Araqonly tested of osx though :-)
11:41:22Araq*on
11:41:33chemist69_I would try it on Linux
11:41:44chemist69_already succesfully tested the Python wrapper.
11:42:12*nsf joined #nim
11:45:52Araqhttps://github.com/nim-lang/ui
11:46:38chemist69_Thanks a lot!
11:47:46Arrrrmmm
11:50:32Araqfederico3: ping.
11:50:40federico3pong Araq
11:50:42*girvo joined #nim
11:50:59Araqhow do we integrate this thing into our travis build?
11:51:15AraqI really enjoy these "you broke tests" emails
11:52:02federico3afaik travis does not allow fetching arbitrary files during the build (we need to install Nim, Nimble, and all the packages)
11:52:24Araqbuilding nimble is part of the autorunner
11:52:42federico3plus, CircleCI hosts the build artifacts, which is the key feature here :)
11:53:42federico3I'm pretty sure CircleCI itself can send emails - who is going to receive the emails tho? E.g. do you want to receive an email if a package fails to install?
11:54:46Araqif "install" means "build", yes
11:55:03*girvo quit (Ping timeout: 240 seconds)
11:55:21federico3it's a full Nimble install
11:56:03federico3Araq: an email to a list of addresses for *any* Nimble package failing to build?
11:56:23Araqeither you select a set of important packages
11:56:33Araqor you give a diff (now newly failing)
11:56:42federico3we can also do a diff from the previous build
11:57:06Araqreally? I thought that's some super duper high in sky future technology that'll never arrive
11:57:17federico3??
11:57:25Araqlast time the people in #nim told me that :P
11:58:09federico3don't trust those guys!
11:59:00Araqso yeah, just do something reasonable
11:59:20Araqand tell me where to subscribe
11:59:21federico3of course that means an email every time an important package get broken by the author
12:00:24federico3alternatively, you can already set up a scraper for the install report
12:00:38federico3would an RSS feed be better than emailing?
12:00:45chemist69_...and I can confirm confirm that the libui controlgallery example works great on Linux (Ubuntu 16.04).
12:01:00chemist69_so much confirmation...
12:03:25Araqfederico3: emails!
12:03:43dom96federico3: It would be nice if you integrated it to NimBot also and got it to announce a new build in #nimbuild
12:03:56dom96I think emails for an important list of packages would be great
12:04:06dom96This includes packages tagged "official"
12:04:09federico3is there a #nimbuild ?
12:04:12dom96yeah
12:05:39Araqlooking at https://circle-artifacts.com/gh/FedericoCeratto/packages/27/artifacts/0/home/ubuntu/packages/nimble_install_test_output/nimble_install_report.html lots of things fail
12:05:57Araqbut I cannot see why and more importantly we need the same report for 0.13.0
12:07:00dom96Araq: click the 'FAIL'
12:07:03dom96it's a link
12:07:33Araqah!
12:07:49dom96Seems a lot of them can't find `nimscriptapi.nim` weird
12:08:14dom96in fact, all of them?
12:08:54Araqhttps://circle-artifacts.com/gh/FedericoCeratto/packages/27/artifacts/0/home/ubuntu/packages/nimble_install_test_output/anybar.html
12:09:02Araqthat seems to a real regression
12:09:28dom96cool
12:09:44Araqawk has a borken .nimble file
12:09:47Araq*broken
12:10:32dom96it's not
12:10:43dom96Nimscript is broken in the tester for some reason
12:11:14Araqah yes
12:11:36dom96federico3: any ideas what the problem could be?
12:12:10federico3maybe the Nimble version being used?
12:12:54dom96perhaps
12:12:59dom96can you update it to #head?
12:13:40federico3maybe we should run all the test against the latest Nim release / devel and the latest Nimble release / devel
12:13:44federico3so 4x
12:13:56dom96sure, why not? :)
12:14:32Araqno, just 2x release vs devel
12:14:34federico3the full run takes 20m as it is
12:14:54federico3Araq: release Nim+Nimble and devel Nim+Nimble ?
12:15:02Araqexactly
12:15:11federico3unfortunately Nim and Nimble do not release together -_-
12:16:13Araqyeah that's a bit silly. right, dom96?!
12:17:42dom96It's a bit tough to coordinate a same-time release.
12:18:19dom96But I will try to do that for this release :)
12:18:54dom96That said, it's fair to assume that the latest release of Nimble works with the latest release of Nim.
12:19:24Araqit's fair to assume 'nimble master' is always what people should use.
12:19:41dom96Last time was a bit of a problem because of the nimscript integration
12:19:52dom96And this integration is still giving us trouble...
12:20:17dom96I spent yesterday testing/fixing devel's installation to ensure it can compile Nimble.
12:20:28dom96So it should be fine
12:20:53Araqnimscript integration was a success though giving how many packages fail because of it
12:20:58Araq*given
12:22:25dom96Not sure if you're being sarcastic or implying that it was a success because not many packages fail due to it.
12:23:22Araqmany already use it
12:23:28Araqno sarcasm here.
12:23:37dom96hehe ok
12:23:58dom96I'm happy how well the ini vs. nimscript detection works.
12:25:04dom96We fixed 259 issues so far since 0.13.0, think we can do better? https://github.com/nim-lang/Nim/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A%222016-01-19+..+2016-06-06%22+ :P
12:29:00*Arrrr quit (Quit: WeeChat 1.4)
12:43:24federico3dom96: tough? You can just tag a commit on Nimble to be the official version that goes with Nim x.y.z
12:45:16federico3e.g. the Nim 0.13.0 zip package for windows contains a copy of Nimble - could you tag the Nimble version that was included at that time?
12:50:50*girvo joined #nim
12:55:27*girvo quit (Ping timeout: 250 seconds)
12:57:42*akaisora quit (Ping timeout: 260 seconds)
12:58:50*akaisora_ joined #nim
12:58:52*BitPuffin joined #nim
13:50:42*girvo joined #nim
13:55:20*girvo quit (Ping timeout: 244 seconds)
14:01:02*fredrik92 joined #nim
14:05:34*s4 quit (Quit: Konversation terminated!)
14:05:36*saml joined #nim
14:23:35*nsf quit (Quit: WeeChat 1.4)
14:29:18cheatfateAraq, i think we can write our own UI library...
14:31:47cheatfateWe can divide parts of work between 3 developers (or maybe 4 if we have QT fan)
14:34:00Araqwhy bother though? libui is small enough and wraps all the important widgets plus gives you a canvas so extra widgets can be written
14:34:31Araqand I know how to give it a Nim interface that's not alien
14:34:36*yglukhov quit (Ping timeout: 244 seconds)
14:35:38cheatfatemaybe because its not very hard work?
14:36:40Araqdividing the work between 3 devs is already hard work :P
14:37:51cheatfateAraq, we can base on libui api and just start adoptment of 3 operation systems (toolkits)
14:38:02flyxthe only thing I don't like about libui is that it provides its own, rather undocumented draw interface rather than including support for cairo
14:39:17cheatfateflyx, ouch cairo is so slow
14:39:52flyxdepends on what you mean by slow. I did some pretty real-time rendering with it in my diploma thesis
14:40:14flyxbut if you need fast graphics, I hear an OpenGL surface widget is in the making
14:41:30cheatfateflyx, windows using int as coords, x11 uses int as coords, why using floats like cairo do?
14:41:59Araqmore importantly cairo would be another dependency
14:43:50*pregressive joined #nim
14:44:37flyxcheatfate: well it applies transformations to the coordinates you put in, so you might lose less precision when using floats. but I do not know enough about its internals to argue for or against it
14:48:15cheatfateflyx, until somebody rendering fonts for you you dont need floats for UI...
14:49:06cheatfatebecause most of UI is rectangles and lines
14:49:49flyxcheatfate: you seem to have a very specific use-case in mind. I for one do not want to apply rotations to int values
14:50:29cheatfateflyx, we are talking about UI library, or we are talking about graphic rendering?
14:50:42*girvo joined #nim
14:51:05flyxI am talking about the drawing functionality in libui.
14:54:01flyxmy use-case for that would be to have some data visualization on top of which I want to provide context-specific UI
14:55:04*girvo quit (Ping timeout: 258 seconds)
14:56:04tautologicoAraq: #3993 is not completely fixed
15:00:40kieram I right in thinking that deepCopy copies the contents of its second argument into its first (variable) argument?
15:00:43kierhttp://nim-lang.org/docs/system.html#deepCopy,T,T
15:14:48kieractually, is deepCopy even what I should be using to copy a ref object?
15:16:56*Mat4 joined #nim
15:17:18Mat4hello, is the new version released ?
15:18:19tautologicocheck nim-lang.org
15:23:27*PMunch joined #nim
15:25:22Araqtautologico: why not?
15:26:01tautologico@[] is ok but @[v] is still rejected as "can't prove @[v] is not nil"
15:27:44Araqthat's a different bug then
15:27:47arnetheduckunder http://nim-lang.org/docs/manual.html#lexical-analysis-identifier-equality, - is suggested as a potential identifier letter, but a few lines above, under rules for identifiers it's not..?
15:28:21AraqMat4: we changed lots of details of the installation process so that requires some extra testing, hence the delay
15:28:25*yglukhov joined #nim
15:28:47tautologicoyes, different bug
15:29:05tautologicobut @[v] was reported as #3993
15:29:19tautologicoI commented there about @[] thinking it could be the same problem
15:31:34tautologicoI was looking into it yesterday and I think impliesNotNil in guards.nim is doing something weird, but I'm not sure because I don't know what's the intended behavior
15:34:05*endragor quit (Ping timeout: 264 seconds)
15:36:28Araqtautologico: I just annotated the @ in system.nim to result in 'seq[T] not nil' and the bug disappears :P
15:38:35tautologicolol
15:39:44Araqalso you need a PhD to be able to mess with guards.nim :P
15:40:27*xet7 quit (Ping timeout: 260 seconds)
15:40:50*Araq has no PhD ...
15:41:44elroodyou probably need a good lawyer if you mess with guards and get caught doing it, too ;P
15:43:37*filcuc quit (Read error: Connection reset by peer)
15:43:53*endragorr joined #nim
15:43:57*arnetheduck quit (Ping timeout: 260 seconds)
15:44:30elroodany estimates when 0.14 will be released? do you expect the extra testing to be done today, or is this likely going to take longer?
15:48:04*nsf joined #nim
15:50:43*girvo joined #nim
15:51:53Mat4Araq: that's no problem: 1.) Select a non established academic discipline which is not teached (like PhD of Mercy or Paleogymnastic), 2.) Certify your own certificate 3.) Use only a short form with your Name and enjoy (PhD Mc. , PhD Pg for example)
15:54:55*ics quit (Quit: Connection closed for inactivity)
15:55:28*girvo quit (Ping timeout: 252 seconds)
15:56:39cheatfateAraq, i have found `hasSharedHeap` in threads.nim, what it mean?
15:57:57tautologicothere are no "notnil" tests testing seqs
16:00:51*pregressive quit (Remote host closed the connection)
16:01:28*pregressive joined #nim
16:04:38*endragor_ joined #nim
16:05:14*endragorr quit (Read error: Connection reset by peer)
16:06:00*pregressive quit (Ping timeout: 260 seconds)
16:06:11*endragorr joined #nim
16:06:21*endragorr quit (Client Quit)
16:06:39*akaisora_ quit (Ping timeout: 276 seconds)
16:09:07*desophos joined #nim
16:09:09*endragor_ quit (Ping timeout: 246 seconds)
16:14:58dom96elrood: Should be tonight.
16:36:54*xet7 joined #nim
16:39:35*girvo joined #nim
16:44:21*girvo quit (Ping timeout: 276 seconds)
16:46:00*pregressive joined #nim
16:48:17*Mat4 quit (Quit: Leaving.)
16:57:35*brson joined #nim
17:23:47*irrequietus joined #nim
17:23:54*irrequietus quit (Changing host)
17:23:54*irrequietus joined #nim
17:34:44*akaisora joined #nim
17:40:25*girvo joined #nim
17:41:00*zodiak quit (Read error: Connection reset by peer)
17:41:08*zodiak_ joined #nim
17:45:04*girvo quit (Ping timeout: 244 seconds)
17:51:07*brson quit (Ping timeout: 260 seconds)
17:52:53*brson joined #nim
17:59:47*BitPuffin quit (Read error: Connection reset by peer)
18:02:39*uJcd joined #nim
18:02:40*uJcd left #nim (#nim)
18:12:16*chemist69_ quit (Quit: WeeChat 1.5)
18:17:34*Arrrr joined #nim
18:17:35*Arrrr quit (Changing host)
18:17:35*Arrrr joined #nim
18:19:44*TheLemonMan joined #nim
18:19:54*irrequietus quit (Ping timeout: 276 seconds)
18:22:14*irrequietus joined #nim
18:24:04*xet7 quit (Quit: Leaving)
18:29:52*chemist69 joined #nim
18:41:18*girvo joined #nim
18:45:57*girvo quit (Ping timeout: 260 seconds)
19:02:08*xet7 joined #nim
19:17:27*Arrrr quit (Quit: WeeChat 1.4)
19:20:39*gokr joined #nim
19:37:45dom96federico3: You want me to tag the Nimble commit with v0.13.0 that was included in the v0.13.0 Nim release?
19:37:53dom96That would break Nimble's versioning.
19:38:28Araqtag it with nimv0.13.0 then ?
19:38:41dom96but why?
19:38:44Araqshipped-with-nimv0.13.0
19:38:54Araqcause tags are important.
19:40:03dom96for what purpose?
19:41:17Araqwhen somebody needs to re-create Nim v0.13.0 as it's in the Windows distribution
19:41:23Araqwhich includes a nimble.exe
19:42:09*girvo joined #nim
19:43:23dom96So why is it my repo's responsibility to save that info?
19:43:27dom96Can't you write this info down somewhere?
19:45:24Araqnimble.exe --version could write the commit hash
19:45:31Araqmaybe it already does?
19:45:39dom96That already gives you the version
19:45:41dom96Which is tagged
19:46:04AraqI don't use tagged versions though ...
19:46:14AraqI bundle what 'git master' gives me
19:46:21dom96...
19:46:25dom96Well then that's wrong
19:46:30dom96You should bundle the latest release.
19:46:35dom96not master
19:46:48*girvo quit (Ping timeout: 250 seconds)
19:46:49Araqok, but then I need to keep updating my koch.nim
19:47:00*zahary quit (Ping timeout: 276 seconds)
19:47:01Araqto contain the latest nimble version.
19:48:14dom96True. You could get koch to grab this info.
19:48:56dom96or more easily, get koch to look for a 'nimble-pkg' directory (or whatever name you want). Git clone the version you want in there.
19:49:02dom96and have koch fail if that dir doesn't exist
19:51:02dom96Hrm, I think it's far too late to implement `--global` in Nimble I'm afraid.
19:51:14Araqindeed.
19:55:32dom96I can reproduce https://github.com/nim-lang/nimble/issues/220 though
20:02:13*kulelu88 joined #nim
20:06:27*nimnoob joined #nim
20:09:21*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
20:10:20nimnoobhello nim gurus. I'm trialing the language and having what seems to be a basic problem. I defined an object as 'type TestObject = object field: Table[int,int]', and then in a proc I try to delete a key: self.field.del(1), or tables.del(self.field,1). But I receive a 'type mismatch' compiler error
20:10:57*TheLemonMan joined #nim
20:12:16Araqnimnoob: use a 'var' parameter
20:12:28*akaisora quit (Read error: Connection reset by peer)
20:12:40Araqand yeah, pity that wasn't on my todo, would have been great for 0.14 to improve this error message.
20:13:02nimnoobhello.nim(60, 15) Error: type mismatch: got (Table[system.int, system.int], int literal(1)); but expected one of: tables.del(t: var Table[del.A, del.B], key: A);
20:13:20nimnoobUse a var parameter in the proc definition?
20:13:29Araqyes
20:13:34nimnooboh
20:14:03*TheLemonMan quit (Client Quit)
20:14:29*TheLemonMan joined #nim
20:15:12*TheLemonMan quit (Client Quit)
20:15:14nimnoobAraq: worked! thankyou. Beginner error, I feel daft
20:16:36*akaisora joined #nim
20:19:10*Mat4 joined #nim
20:19:47*TheLemonMan joined #nim
20:23:52*irrequietus quit (Ping timeout: 252 seconds)
20:26:33*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
20:29:25*TheLemonMan joined #nim
20:31:12*pregressive quit (Read error: Connection reset by peer)
20:31:52*pregressive joined #nim
20:33:33*xet7 quit (Quit: Leaving)
20:37:27*pregress_ joined #nim
20:38:12*pregressive quit (Read error: Connection reset by peer)
20:41:15*irrequietus joined #nim
20:43:02*girvo joined #nim
20:43:22cheatfatebefore i start to test it myself maybe somebody knows what happen if you make more than one call to read/recv on one non-blocking socket/descriptor with different buffers?
20:44:26cheatfatei mean if socket gets enough data to satisfy all read requests, are they consume whole data?
20:47:21*girvo quit (Ping timeout: 250 seconds)
20:59:55*irrequietus quit ()
21:02:06*gokr quit (Ping timeout: 246 seconds)
21:08:28*PMunch quit (Quit: leaving)
21:17:35*Matthias247 joined #nim
21:20:16dom96Araq: So, where are we with the release?
21:20:54*Demon_Fox joined #nim
21:22:33AraqI don't want to build any installers before midnight
21:22:50Araqsince I already wrote 7th of June as release day in the news
21:24:32jeffc_Excellent! Super glad libui is making it to nim :)
21:25:46dom96Araq: :\
21:26:01dom96Araq: Let's not postpone any more.
21:31:33cheatfatebut i have midnight already :)
21:32:04*desophos_ joined #nim
21:35:52*desophos quit (Ping timeout: 264 seconds)
21:43:10federico3Araq: can you please be aware of https://github.com/nim-lang/Nim/issues/3918 while doing the release?
21:43:50*girvo joined #nim
21:45:51Araqer ... ok?
21:46:04*nimnoob quit (Ping timeout: 250 seconds)
21:47:54dom96Like I said already in #nim-offtopic, doing so would require changes to install.sh
21:48:40*girvo quit (Ping timeout: 272 seconds)
21:48:41*desophos_ quit (Remote host closed the connection)
21:58:43federico3dom96: even putting Nimble in both the zip and the tarball (or neither)?
22:02:42*pregress_ quit (Remote host closed the connection)
22:03:53*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
22:07:47*desophos joined #nim
22:09:54*desophos quit (Remote host closed the connection)
22:10:33*irrequietus joined #nim
22:12:47cheatfateAraq, you are still busy with release?
22:13:29cheatfatejust want to ask you, threads.nim dont support exit code for some reason?
22:15:13*desophos joined #nim
22:17:47AraqI find them unnatural.
22:21:00*desophos quit (Remote host closed the connection)
22:25:08*Matthias247 quit (Quit: Matthias247)
22:27:11*girvo joined #nim
22:32:18*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:32:20*desophos joined #nim
22:35:18*desophos quit (Remote host closed the connection)
22:35:33*desophos joined #nim
22:36:45*Trustable quit (Remote host closed the connection)
22:40:18fowlLibui looks neat
22:40:22fowl.
22:47:39*Mat4 left #nim (#nim)
22:48:35Araqhttps://github.com/nim-lang/Nim/wiki/Creating-a-release
22:48:55Araqha, forgot to update the version in compiler.nimble
22:48:59Araqand stdlib.nimble
22:51:50dom96Yep, useful to have this in the wiki
22:53:04Araqunforunately it doesn't list my .bat file
22:53:35*bjz joined #nim
23:02:44Araqdom96: https://github.com/nim-lang/Nim/issues/4286
23:02:49Araqseems to be a showstopper
23:04:34Araqand while we're at it, use Table instead of TableRef here, one 'ref' is enough, it's already slow enough
23:04:49*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
23:10:36dom96hrm?
23:10:39dom96Did you look at the note?
23:10:41dom96I already fixed it
23:11:26Araqwhy is the ticket still open then?
23:11:40dom96Dunno
23:11:43dom96I didn't see the ticket until now
23:16:25dom96I'll close it since it mentions 'values' explicitly.
23:17:16dom96https://github.com/andlabs/libui#language-bindings :D
23:23:46jeffc_:D
23:30:05dom96Looks like 3rd times the charm. def-'s metaprogramming article is finally on HN's front page.
23:32:24*yglukhov quit (Remote host closed the connection)
23:37:53*pregressive joined #nim
23:38:33def-dom96: HN is strange, feels very random when an article hits the front page
23:39:18dom96yeah, but as soon as it does it's almost always going to stay there.
23:40:17*elrood quit (Quit: Leaving)
23:40:31*pregressive quit (Remote host closed the connection)
23:52:23*irrequietus quit ()
23:55:01*yglukhov joined #nim
23:59:03*yglukhov quit (Ping timeout: 240 seconds)