<< 31-03-2019 >>

00:18:22FromGitter<Varriount> Araq: If we could do it at compile time, always, yes, I would change my mind.
00:32:26*ikan-keli_ quit (Ping timeout: 250 seconds)
02:00:46*vlad1777d quit (Ping timeout: 246 seconds)
02:06:01*banc quit (Quit: Bye)
02:18:23*rnrwashere joined #nim
02:23:46*sealmove joined #nim
02:24:23FromGitter<kayabaNerve> I actually think I currently have P2P code that relies on how Nim sorts a seq of objects (custom data type of key/value)... I wrote the comparison function when I called algorithm's sort, but I don't know how it handles ties (original ordering?). Been meaning to fix that. Part of it is fine (highest to lowest), but
02:25:02FromGitter<kayabaNerve> Just realized I didn't actually hit backspace on a snippet at the end of that message that I meant to. Sorry, IRC. >_<
02:27:45*banc joined #nim
02:29:58*rnrwashere quit (Remote host closed the connection)
02:30:56*rnrwashere joined #nim
02:31:27*rnrwashere quit (Remote host closed the connection)
02:32:07*rnrwashere joined #nim
02:36:30*rnrwashere quit (Ping timeout: 250 seconds)
02:42:09*rnrwashere joined #nim
02:42:09*rnrwashere quit (Client Quit)
02:45:27*thomasross quit (Read error: Connection reset by peer)
02:45:31*thomasross_ joined #nim
02:45:32*thomasross_ is now known as thomasross
03:02:46*seni joined #nim
03:16:00*theelous3_ quit (Ping timeout: 268 seconds)
04:00:05*seni quit (Quit: Leaving)
04:12:39*dddddd quit (Remote host closed the connection)
04:28:40*sealmove quit (Quit: WeeChat 2.4)
04:38:32FromGitter<Varriount> @kayabaNerve yes, stable sort means that ties will maintain their original relative order
04:41:33*oculux quit (Ping timeout: 252 seconds)
04:50:52*vlad1777d joined #nim
05:02:32*rnrwashere joined #nim
05:31:59*rnrwashere quit (Remote host closed the connection)
05:32:37*rnrwashere joined #nim
05:32:42*rnrwashere quit (Remote host closed the connection)
05:32:59*rnrwashere joined #nim
05:39:20FromGitter<kayabaNerve> Thanks for the info
05:40:15FromGitter<kayabaNerve> I'm testing to see if I wrote a prune function correctly, but the mem usage remains the same. I think, from long ago, I heard a discussion where the GC never deallocates RAM, just marks it for reusing. Is that correct or am I dreaming as I search for an explanation?
05:41:17FromGitter<Varriount> I believe that is false. At least on Windows
05:41:36FromGitter<kayabaNerve> Because I wrote a program to use 6% of my RAM with a recursive ref type, then set the children of the top ref to nil, but the RAM is still 6%. I then declared a recursive manual GC_unref, but the RAM is still 6%.
05:41:40FromGitter<kayabaNerve> Linux here.
05:42:09I_Right_ISo I am working on cleaning up the public interface to a library I wrote. And I was wondering, "Public Variables" Do or Don't?
05:42:15FromGitter<kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ca05336a0790b29c9374b51]
05:42:22FromGitter<Varriount> @kayabaNerve Have you looked at the code that does memory allocation?
05:42:31FromGitter<kayabaNerve> My code or the Nim code?
05:42:52FromGitter<kayabaNerve> I don't think I've looked at any of the Nim compiler except when I wrote an ugly hack 6 months ago
05:43:10FromGitter<Varriount> Look at the standard library system code
05:43:24FromGitter<Varriount> That holds all the Garbage collection logic
05:43:40FromGitter<kayabaNerve> I guess my next test is to embed this in a block, because IIRC global variables have different collection rules, and then to create a second instance and see if RAM doubles or not.
05:43:42FromGitter<kayabaNerve> Alrighty
05:43:49FromGitter<Varriount> I_Right_I: what kind of variables?
05:44:22I_Right_Ilike var publicitem: int
05:45:33I_Right_Iwait what are they used for
05:47:08I_Right_Ithe public var would be used in a sleep function in my library
05:48:10I_Right_II could put error checking in before the sleep
05:48:51I_Right_II think it simplifies the api rather then use a set_property
05:51:22FromGitter<Varriount> Why not give the sleep function a parameter?
05:52:57I_Right_Iokay so stdlib sleep() used in one of my public proc's
05:54:26FromGitter<Varriount> I_Right _I: Could you perhaps post your code on gist or pastebin?
05:56:01I_Right_Isure give me a sec. Its still a work in progress
06:03:43*sutke11782 quit (Remote host closed the connection)
06:05:46*narimiran joined #nim
06:06:13I_Right_Ihttps://pastebin.com/4hJqXy8s
06:07:09*nsf joined #nim
06:07:19I_Right_II am in the process of making it a library
06:07:56*sutke11782 joined #nim
06:08:08I_Right_Ihaven't even added the '*' to the public interface
06:13:08I_Right_II just started learning nim a couple of weeks ago, I wrote that last weekend. I am going to modify it as I learn
06:14:07I_Right_II was just wondering if public var would break any nim api standards
06:14:40I_Right_Ior cause future problems with the api
06:15:08FromGitter<Varriount> Yeah, I would just add a parameter with a default value.
06:15:35FromGitter<Varriount> That lets the caller easily adjust the timeout period
06:17:15I_Right_II was thinking about just adding it to the init proc
06:18:43I_Right_Ibut I would be nice to adjust it on the fly while doing any optimizing.
06:20:01*sutke11782 quit (Remote host closed the connection)
06:24:50*solitudesf joined #nim
06:25:34I_Right_IVarriount: anyways, thanks!
06:35:59*I_Right_I quit (Remote host closed the connection)
06:45:11*rnrwashere quit (Ping timeout: 258 seconds)
06:45:41*rnrwashere joined #nim
06:50:32ZevvWhat is the fastest way to switch nim versions from source for bisecting? For example if I now switch my git repo from devel to 0.19.4 I get funny errors like "undeclared identifier: 'is'". Do I really need to do a complete bootstrap each time?
06:51:33*rnrwashere quit (Remote host closed the connection)
06:51:50*rnrwashere joined #nim
06:54:38*solitudesf quit (Ping timeout: 245 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:49*gmpreussner joined #nim
07:08:04*vlad1777d quit (Ping timeout: 250 seconds)
07:09:04*uvegbot quit (Remote host closed the connection)
07:09:50*uvegbot joined #nim
07:27:12*rnrwashere quit (Remote host closed the connection)
07:29:48*rnrwashere joined #nim
07:49:17*tefter joined #nim
07:51:12*rnrwashere quit (Remote host closed the connection)
07:58:57*jjido joined #nim
08:08:30*nsf quit (Quit: WeeChat 2.4)
08:39:10*vlad1777d joined #nim
09:00:35*dddddd joined #nim
09:20:19*stefanos82 joined #nim
09:24:30*clyybber joined #nim
09:31:34*uvegbot quit (Ping timeout: 246 seconds)
09:32:17*uvegbot joined #nim
10:00:03*vlad1777d quit (Ping timeout: 245 seconds)
10:01:04*vlad1777d joined #nim
10:03:20federico3Zevv: if you do that often I would check out the repo at different tags using git worktree
10:07:04*uvegbot quit (Ping timeout: 255 seconds)
10:11:23*solitudesf joined #nim
10:16:46Zevvnah i just wanted to find a particular commit breaking/fixing my code
10:17:15Zevvin the end i just scripted around "git rebase" and made lunch
10:18:10Zevvthe I found commit dee8e6e98 and I still dont know :)
10:18:55*NimBot joined #nim
10:26:17*solitudesf quit (Ping timeout: 245 seconds)
10:32:57*Cthalupa quit (Ping timeout: 245 seconds)
10:34:08*Cthalupa joined #nim
10:39:57*clyybber quit (Quit: WeeChat 2.4)
10:52:00*rnrwashere joined #nim
10:56:34*rnrwashere quit (Ping timeout: 268 seconds)
11:05:15*nsf joined #nim
11:15:17*lritter joined #nim
11:17:00*narimiran quit (Ping timeout: 268 seconds)
11:21:20*solitudesf joined #nim
11:30:53*ikan-keli_ joined #nim
11:39:20*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:19:07*ng0 joined #nim
12:30:07*sealmove joined #nim
12:35:01*jjido joined #nim
12:36:57*sealmove quit (Quit: WeeChat 2.4)
12:38:19*Snircle joined #nim
12:49:40*ng0 quit (Quit: Alexa, when is the end of world?)
12:50:15*ng0 joined #nim
13:01:24*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:08:13*vlad1777d quit (Ping timeout: 246 seconds)
13:25:52*Jesin quit (Ping timeout: 245 seconds)
13:58:22*vlad1777d joined #nim
14:04:26FromGitter<dawkot> (https://files.gitter.im/nim-lang/Nim/Okbk/image.png)
14:04:28FromGitter<dawkot> Does anyone have any idea why I get an error starting with something like this when trying to install nimterop using nimble or how to fix it?
14:12:44*vlad1777d quit (Ping timeout: 250 seconds)
14:21:41livcdis there something like Go's context in Nim ?
14:46:30leorizedawkot: you should paste your entire install log
14:56:10*theelous3_ joined #nim
14:58:48*narimiran joined #nim
15:19:50*abm joined #nim
15:29:12shashlickdawkot, there's a change in upstream tree sitter that is breaking on build
15:29:27shashlickI'll fix it later today
15:31:29*rnrwashere joined #nim
15:36:51*vlad1777d joined #nim
15:40:32*vlad1777d quit (Remote host closed the connection)
15:41:38*vlad1777d joined #nim
15:46:12*a_chou joined #nim
15:48:43*mosORadi joined #nim
15:49:01*jjido joined #nim
16:04:14*a_chou quit (Ping timeout: 250 seconds)
16:07:06*Vladar joined #nim
16:25:15*Trustable joined #nim
16:34:06*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:41:15FromGitter<liquid600pgm> @Avatarfighter: I compiled Nim successfully on the latest Raspbian, no clue what could be the cause of your error
17:01:11*rnrwashere quit (Remote host closed the connection)
17:01:47*rnrwashere joined #nim
17:02:18*a_chou joined #nim
17:02:36*vlad1777d quit (Ping timeout: 250 seconds)
17:03:10*a_chou quit (Client Quit)
17:04:28*Jesin joined #nim
17:04:57*sealmove joined #nim
17:06:04*rnrwashere quit (Ping timeout: 250 seconds)
17:28:12*jjido joined #nim
17:48:10*noeontheend joined #nim
17:50:57*natrys joined #nim
17:52:54*Snircle quit (Ping timeout: 268 seconds)
18:10:27*Tyresc joined #nim
18:17:45*I_Right_I joined #nim
18:17:47*noeontheend quit (Ping timeout: 240 seconds)
18:17:53*sealmove quit (Quit: WeeChat 2.4)
18:24:45*Snircle joined #nim
18:29:03*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:38:15*mosORadi quit (Quit: Connection closed for inactivity)
18:39:40*jjido joined #nim
18:44:47I_Right_Iwhen making a default parameter which is better? "proc myLoop(timeout : int = 100)" or "proc myLoop(timeout : int = LoopTimeOut)" where LoopTimeOut is a constant equal to 100.
18:46:29*sealmove joined #nim
18:51:05dom96I_Right_I, That depends if you're going to be using that constant anywhere else
18:51:13dom96also please don't put spaces before the `:`
18:51:37I_Right_II was thinking with code completion using the value "100" directly would be better for someone using the api.
18:52:25I_Right_Iyeah should have been typed, proc myLoop*(timeout: int = 100)
18:58:35I_Right_Ifrom a coding view point I always go with constants of magic numbers. But I haven't used a language that allowed default parameter very often.
18:59:15I_Right_Iconstants over magic number^
19:04:24*rnrwashere joined #nim
19:06:16*cdunn2001 joined #nim
19:08:27*rnrwashere quit (Ping timeout: 240 seconds)
19:10:29*enthus1ast quit (Ping timeout: 250 seconds)
19:11:14cdunn2001With "--newruntime" on a trivial program, I get "Error: system module needs: nimGCvisit". What's the trick I need?
19:12:38Araqwhat's the trivial program? :-)
19:15:04*Senketsu joined #nim
19:17:51*Sencatsu quit (Ping timeout: 255 seconds)
19:18:53I_Right_Iis --newruntime the implementation with out a GC you were talking about?
19:19:25Araqyes
19:20:03I_Right_Iwhat version of nim do you need to use it?
19:21:01Araqdevel
19:21:30I_Right_Icool thanks
19:23:37*enthus1ast joined #nim
19:28:42cdunn2001"trivial program": https://gist.github.com/cdunn2001/e3a461e8ef070227125e5f335812fa44
19:29:24*jjido quit (Read error: Connection reset by peer)
19:30:20*narimiran quit (Remote host closed the connection)
19:31:41sealmovecompiles & runs just fine for me
19:32:21sealmovesorry, I get "Error: '=' is not available for type <owned ref string>; requires a copy because it's not the last read of 'src'"
19:33:21sealmovewow, awesome messages already
19:33:35cdunn2001Hmmm. I'm on devel. Just rebuilt. Odd.
19:34:10cdunn2001What is your exact command-line to build/run?
19:34:56sealmove`nim c -r --newruntime <file>`
19:35:47cdunn2001"Error: system module needs: nimGCvisit" again.
19:37:44sealmovew8, i'll build latest Nim version
19:38:01cdunn2001Wait. What sha1 were you on?
19:38:04cdunn2001$ nim --version Nim Compiler Version 0.19.9 [MacOSX: amd64] Compiled at 2019-03-31 Copyright (c) 2006-2019 by Andreas Rumpf git hash: cce8d3da27438a6718c8b0d381ccb296f5e1cd4d active boot switches: -d:release
19:39:34Araqcdunn2001, 'repr' is not ported
19:41:13Araqand I told you it's not ready for you to tinker with, I can create a TODO though
19:42:58sealmovethat would be nice
19:44:48*Trustable quit (Remote host closed the connection)
19:46:30cdunn2001:-( OK.
19:46:48*cdunn2001 quit (Quit: Page closed)
19:50:05I_Right_Iso is GC use going to remain optional or is it going to be phased out?
19:50:24Araqway too early to say.
19:50:39AraqI'm for phasing out so that we don't have an annoying language split
19:51:09I_Right_Iwell I really hope the new runtime turns out
19:51:13Araqbut in the meantime I did figure out how to make it opt-in
19:51:20sealmoveI agree maintaining a GC runtime is too much of a burden, new idea cleverly saves us from this
19:52:08AraqI would go for Boehm Gc, if you want a GC, use boehm, Nim supports it well
19:52:18Araqand it too gives us a shared heap
19:52:45Araqso at least we have two modes with a shared heap
19:53:51I_Right_Ino GC equals a lot smaller runtimes correct?
19:54:29Araqthat's mostly a coincidence of the implementation
19:55:18Araqthe new runtime is smaller than the old one but in the old one I made a couple of mistakes that are mostly orthogonal to the GC
19:56:20I_Right_Iah,I was just think about embedded runtimes might stand to gain a lot with no GC.
19:57:11Araqah I misunderstood you
19:57:20AraqI was talking about code sizes
19:58:23Araqheap sizes are very roughly smaller by a factor of 2 since stuff gets freed earlier than a GC can do it
19:59:09sealmovefwiw I think this new style of programming won't be harder than having a GC
20:00:12sealmovebut it IS a new style
20:01:22AraqI expect it to be simpler as your sockets do auto-close and you can use every sanitizer for C/C++ out of the box
20:01:51sealmoveI think it can give a good "identity" to Nim
20:02:13Araqand encoding the ownership in your program just makes sense
20:02:14sealmoveMany people try Rust for its "unique" MM, maybe they give Nim a try for the same reason
20:02:53Araqif you can't encode the ownership you have a mess and bugs, GC or not
20:02:54sealmovejust try to advertise it cleverly ;)
20:03:20sealmoveI'd put it in front page: https://nim-lang.org/
20:03:27Araqyup, thanks.
20:03:28Araqhttps://gist.github.com/Araq/d3525a488484d0ef760a1bf5347cfc08
20:03:53AraqI don't know about you but this is not JSON behaviour. Yay, it doesn't crash, but that's about it
20:04:19FromGitter<xmonader> Hi i'm trying to automate the docset generation for nim/dashing, but executing `nim rst2html afile.txt` doesn't really do anything (i'm using the doc directory) on nim 0.19.4
20:04:45Araqit does do things, it's used for Nim's documentation too
20:05:02FromGitter<xmonader> exactly, maybe i'm invoking it wrong?
20:05:09AraqI generate by blog with 'nim rst2html' fwiw
20:05:26Araqmaybe you have --out in your config or crap
20:06:06FromGitter<xmonader> i'm executing with in Nim code repo
20:06:28Araqwhat does afile.txt contain?
20:07:26*sealmove quit (Quit: WeeChat 2.4)
20:10:34FromGitter<xmonader> too weird it works nvm thanks
20:18:23I_Right_ISo FYI as a new user to nim: My bullet points for Nim are as follows ---> Clear Easy Productive Syntax. Small Binaries. Speeds compare to C. It's Very Portable. Binds to C very easily.
20:25:00shashlickAraq - how do Nim macros compare to lisp in terms of capabilities? Just read http://www.paulgraham.com/avg.html again
20:25:31Araqthey have the same power, shashlick
20:25:57I_Right_IAnd I forgot Macro's
20:27:01shashlickI've not had to use macros as much in the text editor but nimterop has them all over the place
20:28:17I_Right_IAraq: Do you have any Docs or Proposal's published for the memory management model of the new runtime?
20:28:21*nsf quit (Quit: WeeChat 2.4)
20:28:51*rnrwashere joined #nim
20:28:52Zevvhttps://nim-lang.org/araq/ownedrefs.html
20:36:17*rnrwashere quit (Remote host closed the connection)
20:36:29*lritter quit (Quit: Leaving)
20:38:40*Jesin quit (Quit: Leaving)
20:39:06*rnrwashere joined #nim
20:40:15*Jesin joined #nim
20:41:03*rnrwashere quit (Remote host closed the connection)
20:43:00*rnrwashe_ joined #nim
20:45:11*rnrwashe_ quit (Remote host closed the connection)
20:47:59*rnrwashere joined #nim
20:55:19*rnrwashere quit (Remote host closed the connection)
20:56:12*rnrwashere joined #nim
20:58:16*rnrwashere quit (Remote host closed the connection)
20:59:19*rnrwashere joined #nim
21:00:10*Vladar quit (Remote host closed the connection)
21:01:16*rnrwashere quit (Remote host closed the connection)
21:12:58*rnrwashere joined #nim
21:14:48*rnrwashere quit (Remote host closed the connection)
21:15:04I_Right_IAraq: Does using a multitude of different sized types adversely affect the new model?
21:18:25*ng0 quit (Quit: Alexa, when is the end of world?)
21:21:18Araqhardly, seqs and strings are variable sized and don't use type-safe allocation since it's not required.
21:21:58Araqthis blog post is more misunderstood than understood so read the RFC instead
21:22:08Araqhttps://github.com/nim-lang/RFCs/issues/144
21:36:29*rnrwashere joined #nim
21:36:42*solitudesf quit (Ping timeout: 245 seconds)
21:46:30*vlad1777d joined #nim
21:55:15*rnrwashere quit (Remote host closed the connection)
22:01:04*stefanos82 quit (Remote host closed the connection)
22:12:59Araqbtw we need a shorter term for "type-bound operation"
22:13:17Araq(= destructor, assignment, move)
22:14:37FromDiscord<sealmove> Typerators?
22:15:05Araqraptors
22:15:55I_Right_Itybops
22:18:52FromDiscord<sealmove> Not bad
22:19:08AraqYou bred raptors?
22:20:35I_Right_Inow I have to put on "Jurassic Park"
22:26:30I_Right_I"this is a a UNIX system I know this" - did anyone ever use that 3d unix interface? Did SGI have anything like that?
22:27:09I_Right_Idid they teach that in middle school in the 90's?
22:33:48Araqno idea but it's funny as Unix is usually not associated with fancy UIs
22:34:46I_Right_IYeah lol, I know what my next nim project will be. A 3d File Manger that takes 10 times as long to navigate as a 2d equivalent but looks 2 times as cool!
22:39:30I_Right_Iplus it will have a minimum of 5 recursive dependence to make it Linux-ie.
22:45:41*natrys quit (Quit: natrys)
23:00:25*sentreen_ joined #nim
23:00:36*sentreen quit (Ping timeout: 255 seconds)
23:03:53*sentreen_ quit (Client Quit)
23:04:01*sentreen joined #nim
23:18:19*sealmove joined #nim
23:18:55*Tyresc quit (Quit: WeeChat 2.5-dev)
23:25:38*vlad1777d quit (Remote host closed the connection)
23:25:42FromDiscord<exelotl> say I have a constant object passed to a macro
23:25:57FromDiscord<exelotl> is it possible to use that constant itself inside the macro?
23:26:12FromDiscord<exelotl> instead of using it's AST
23:26:47*a_b_m joined #nim
23:27:47sealmove$thatConstant
23:28:07sealmovefor the identifier string
23:28:18sealmoveand if you need the value, then lookup static[T]
23:30:45*abm quit (Ping timeout: 255 seconds)
23:35:55FromDiscord<exelotl> wow static[T] is some black magic
23:36:04FromDiscord<exelotl> couldn't find any docs on it but I used it and it did what I wanted xD
23:36:36sealmovewell yeah, I saw a nice explanation in some "macros tutorial" but I can't find it :/
23:42:53sealmovehttps://nim-lang.org/docs/tut3.html#introduction-static-arguments
23:42:55sealmovehere you are
23:43:24sealmoveyou have untyped, typed and static arguments
23:43:56sealmovestatic arguments in macros, work like normal arguments in procs