<< 27-09-2018 >>

00:00:11AlexMaxoverview.c is 1306
00:00:40AlexMaxlines
00:20:33*jimi|ansible joined #nim
00:25:10*jimi|ansible quit (Ping timeout: 246 seconds)
00:28:27*junland joined #nim
00:32:15*nephyrin11 joined #nim
00:33:20*krux02 quit (Remote host closed the connection)
00:36:35*nephyrin11 quit (Remote host closed the connection)
00:39:49*m27frogy23 joined #nim
00:43:22*m27frogy23 quit (Remote host closed the connection)
00:54:02AlexMaxhrm, c2nim seems to have skipped over something
00:54:49AlexMaxohhhhhhhhhhhh
00:54:55AlexMaxthat's becuase it's a #define
00:55:09*kmehall8 joined #nim
00:55:18*redlegion_ joined #nim
00:57:47*kmehall8 quit (Remote host closed the connection)
00:59:14*PrimHelios quit (Quit: Leaving)
01:03:52AlexMaxIs there an equivalent of __LINE__ or __FILE__ in Nim?
01:04:37AlexMaxactually hrm, that's why this is a macro...it uses the line number and file name to initialize a unique hash
01:05:32*dddddd quit (Ping timeout: 252 seconds)
01:05:57*gitness20 joined #nim
01:06:11AlexMaxso wrapping that function will be difficult
01:09:58*gitness20 quit (Remote host closed the connection)
01:14:53*redlegion_ quit (Ping timeout: 252 seconds)
01:15:51leorizeAlexMax: you can use `{.emit.}`
01:16:13leorizeor just replicate the macro in nim
01:18:47FromGitter<zacharycarter> there's ways to replace C macros in the c2nim header section
01:18:55FromGitter<zacharycarter> if they're simple
01:19:29FromGitter<zacharycarter> if they're not - I'd recommend using a C/C++ pre-processor before running your code through c2nim
01:19:49FromGitter<zacharycarter> or you could use nimgen - which does a lot of this for you I believe AlexMax ^
01:20:05AlexMaxI'm already using nimgen. That's why the original macro isn't even the c2nim'ed source
01:20:31FromGitter<zacharycarter> weird
01:20:42FromGitter<zacharycarter> I don't know the internals of nimgen well enough to comment
01:20:57AlexMaxWell, it's obvious why it's gone, the macro is defined, but never "called"
01:21:06*stefanos82 quit (Quit: Quitting for now...)
01:21:12FromGitter<zacharycarter> all I know is - when I run into macros in code I'm trying to bind to - I usually run `gcc -E`
01:21:27AlexMaxand even if it was called, it would be expanded into a form of nk_tree_push_hashed
01:21:30FromGitter<zacharycarter> ah - I solve this problem with Nuklear I believe
01:21:34FromGitter<zacharycarter> in the header files
01:21:38FromGitter<zacharycarter> oh
01:21:52AlexMaxWhat I'm trying to figure out is if I can recreate the intent of the macro from nothing
01:22:00AlexMaxthe macro is
01:22:01AlexMax#define nk_tree_push_id(ctx, type, title, state, id) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),id)
01:22:13AlexMaxand
01:22:14AlexMax#define nk_tree_push(ctx, type, title, state) nk_tree_push_hashed(ctx, type, title, state, NK_FILE_LINE,nk_strlen(NK_FILE_LINE),__LINE__)
01:22:39AlexMaxIt uses __FILE__ and __LINE__ to come up with a hash unique to that invocation
01:23:02AlexMaxand I bet some other mechanism could replace it
01:23:45*adelrune quit (Ping timeout: 244 seconds)
01:27:53FromGitter<zacharycarter> HRM
01:28:03FromGitter<zacharycarter> sorry - I wouldn't try to replace the macros like that
01:28:16FromGitter<zacharycarter> I'd use the compiler pre-processor to process them
01:28:32FromGitter<zacharycarter> I think that's your problem tbh
01:30:10FromGitter<zacharycarter> I ran into this issue when originally trying to write the bindings for nuklear
01:30:50FromGitter<zacharycarter> the solution isn't to try to reproduce the macro / code in Nim - it's to get the C pre-processor to spit out the C code so that you can create Nim bindings to it
01:31:14FromGitter<zacharycarter> if that makes any sense AlexMax ^
01:35:27FromGitter<zacharycarter> the best approach to writing bindings (in a manual way) is this - ⏎ ⏎ 1) Find the header file that is the source of the library and start from there - run this through c2nim and see where things start erroring out. ⏎ ⏎ 2) Most likely it's going to be due to some C construct Nim doesn't support - so start commenting these out. ... [https://gitter.im/nim-lang/Nim?at=5bac33dfaedb375b9c514fb9]
01:39:14AlexMaxI think you think I'm further behind the eight-ball than I am :P
01:39:52AlexMaxI'm fixing the nimgen'ed bindings
01:39:58AlexMaxIt already runs the preprocessor on it
01:40:36AlexMaxAnd like I said, the macro disappears because when you run the preprocessor and define a "function" macro with no calls to it, there's no actual code to convert
01:41:03AlexMaxAnd inserting a call to convert would be useless because it would just be whatever __FILE__ and __LINE__ evaluate to at that point
01:41:47FromGitter<zacharycarter> yeah - I guess I don't understand the problem - I didn't mean any offense
01:42:04AlexMaxNo worries.
01:42:05FromGitter<zacharycarter> or like - to insinuate you didn't know what you were doing - sorry if it came off that way
01:42:30AlexMaxI didn't take it like that at all. There was just a clear miscommunication and I wanted to clear the air. :)
01:42:31*darithorn quit (Quit: Konversation terminated!)
01:42:33FromGitter<zacharycarter> maybe it's a c2nim problem then?
01:42:49FromGitter<zacharycarter> I guess the question is - what's generating the bad macro code?
01:42:52AlexMaxIt's a byproduct of nimgen's running the preprocessor
01:42:56FromGitter<zacharycarter> ah
01:43:37FromGitter<zacharycarter> so probably Nimgen needs to incorporate some more clean-up logic after the preprocessor step
01:43:37AlexMaxThe macro function vanishes
01:43:45FromGitter<zacharycarter> which makes sense
01:43:53FromGitter<zacharycarter> since it'd only be there at compile-time
01:43:58FromGitter<zacharycarter> and if nimgen's not evaluating it
01:44:06AlexMaxIt's a catch 22
01:44:14FromGitter<zacharycarter> yeah - I see now
01:44:15AlexMaxIt needs to run the preprocessor in order to sort out some things
01:44:32AlexMaxbut it also makes macro functions vanish
01:44:40AlexMaxI think the only option is a reimplementation
01:47:33AlexMaxIt needs some way to get a guaranteed unique string, along with a guaranteed unique number
01:48:37AlexMaxWhat's the intended way to create a multiline if statement?
01:48:59FromGitter<zacharycarter> do you mean via a Nim macro?
01:49:29FromGitter<zacharycarter> also - is there an issue or any reference I can look at to further understand this problem?
01:49:32AlexMaxnah, i just mean how do people use whitespace on multiline if statements
01:49:40AlexMaxit's a separate question
01:49:46FromGitter<zacharycarter> oh
01:49:55FromGitter<zacharycarter> typically - I do something like this:
01:50:03AlexMaxit's been bugging me for a while
01:50:37AlexMaxoffsetting the second line of a two line if statement by two spaces looks like it melds into the conditional block itself
01:50:43*hassan_ joined #nim
01:50:49AlexMaxFour spaces is...eh
01:50:53AlexMaxI was thinking three spaces
01:51:15AlexMaxit's not aligned with anything, so it should stick out more
01:52:03AlexMaxAnd if you want to understand the macro problem I'm having, take a look at this
01:52:05AlexMaxhttps://github.com/vurtun/nuklear/blob/master/src/nuklear.h#L2552
01:52:12FromGitter<zacharycarter> I don't know - it's typically up to the individual programmer ⏎ all I know is whenever I encounter libraries that don't rely two-spaces, I want to pull my hair out
01:52:38*Tef61 joined #nim
01:52:51AlexMaxWell, I indent everything by two spaces
01:53:05AlexMaxBut I was talking about how many spaces to indent the second line of a multi-line if statement by
01:53:32FromGitter<zacharycarter> I ported this in three(ish) days - https://github.com/zacharycarter/litz/blob/master/src/litz.nim
01:53:33AlexMaxindenting _that_ by two makes the second line of the if statement blend in with the conditional block below it
01:53:44FromGitter<zacharycarter> so that's how I write Nim code when I'm just in a groove I guess
01:54:02FromGitter<zacharycarter> I get what you're saying - but my response is - every Nim programmer has their own way of doing it
01:54:15FromGitter<zacharycarter> and lining up the next line of code
01:54:24FromGitter<zacharycarter> some people - indent it by four spaces for some reason
01:55:23FromGitter<zacharycarter> others try to line it up parameter wise - I'm not sure there is a real existing standard for this - I know there's a Nim style-guide but I don't think it's really up-to-date or followed
01:55:28*hassan_ quit (Remote host closed the connection)
01:56:23FromGitter<zacharycarter> also - that is a port straight from JS
01:57:24*Tef61 quit (Remote host closed the connection)
01:57:50AlexMaxhrm
01:57:54AlexMaxhttps://nim-lang.org/docs/oids.html
01:58:04AlexMaxthis could work, possibly
01:58:18FromGitter<zacharycarter> I don't think you'll find too much difference from this code I wrote a while back either though - https://github.com/zacharycarter/zengine/blob/master/src/zengine/zgl.nim - in terms of styling
01:59:47FromGitter<zacharycarter> I think you can line up the code any way that makes sense for you
02:00:29AlexMaxhrm, damn, except that isn't consistent from function call to function call
02:00:32FromGitter<zacharycarter> https://github.com/flyx/emerald/blob/master/src/emerald/filters.nim
02:00:35FromGitter<zacharycarter> drives me crazy
02:01:07FromGitter<zacharycarter> well - these are mostly ports of libraries that I never went back and spent a lot of time cleaning up
02:01:13FromGitter<zacharycarter> zenigne = raylib
02:01:25FromGitter<zacharycarter> and the other code is hyperHTML
02:01:34FromGitter<zacharycarter> which I plan to actually turn into a usable library
02:01:47AlexMaxdamn son
02:02:02FromGitter<zacharycarter> but I'm just giving you the basic gist of how, when I'm porting / writing a large library - I start out structuring my code
02:02:22FromGitter<zacharycarter> I write a TON of throw-away Nim code
02:02:47FromGitter<zacharycarter> but there's no other language I'd rather program in - it's the only language I feel okay about throwing away code in
02:03:03AlexMaxI...wish Nim had destructors as part of the type
02:03:12AlexMaxotherwise, yeah, this langauge is pretty fun
02:03:18FromGitter<zacharycarter> other languages make me take way to long to think about how to structure / write my code or worry about memory allocation / deallocation
02:03:31FromGitter<zacharycarter> they're coming - according to our BDFL anyway
02:03:55leorizeThere's even an issue to track it, and they are already somewhat working
02:03:59FromGitter<zacharycarter> most of my code is just hobby shit anyway - I don't need it to work in any professional sense
02:04:00AlexMaxI don't like how right now you gotta remember to pass the finalizer as part of `new`
02:04:15AlexMaxbut yeah, I saw the work on destructors n stuff
02:04:20FromGitter<zacharycarter> well get in on the RFC then!
02:04:23AlexMaxBut I thought it was a ways off...
02:04:29AlexMaxlike, Nim 2.0 land
02:04:40leorizeit's in v1 milestone so...
02:04:45FromGitter<zacharycarter> I have no idea - ever - what is going on with this language from a future perspective
02:04:54FromGitter<zacharycarter> there are constantly too many things up in the air
02:05:05*redlegion_ joined #nim
02:05:19FromGitter<zacharycarter> but I know that I can A) write a front-end web app with Nim and generally keep up with the JS backend changes to not worry about it being a big deal
02:05:45FromGitter<zacharycarter> and B) at the same time - experiment with game programming and learn lower level programming concepts via Nim - since I come from a zero comp-sci background
02:06:02AlexMaxi like this language because it's not C++-levels of complexity
02:06:06FromGitter<zacharycarter> so for me - Nim is THE perfect language - except for the fact it leads to zero job opportunities in the space
02:06:15FromGitter<zacharycarter> yeah - C++ just infuriates me
02:06:18AlexMaxbut it's also not C's level of lack of complexity
02:06:21FromGitter<zacharycarter> I'd rather program in C every day
02:06:34AlexMaxwell, maybe it's not even complexity, it's just the endless minutea you gotta know
02:06:41FromGitter<zacharycarter> yeah
02:06:52FromGitter<zacharycarter> not that the language isn't designed well
02:06:56FromGitter<zacharycarter> froma . feature perspective
02:07:19FromGitter<zacharycarter> it's just - my god - I don't want to deal with another JavaScript in the native programming world
02:07:33FromGitter<zacharycarter> I feel like I'm dealing w/ babel and ECMAScript these days when it comes to C++
02:07:54FromGitter<zacharycarter> regardless of the fact that the code actually matters
02:08:26FromGitter<zacharycarter> just in terms of having to learn different specifications and then on top of it worry about platform compatability
02:09:31FromGitter<zacharycarter> seems like the pattern these days though - there's like Rust 2015 or something ow
02:09:33FromGitter<zacharycarter> now*
02:09:41FromGitter<zacharycarter> and then a new dated spec of Rust coming out soon
02:10:15FromGitter<zacharycarter> https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html
02:10:34FromGitter<zacharycarter> hey - if we just do a Nim 2018 - we never need a Nim 1.0
02:11:12AlexMaxI don't want the mental overhead Rust would bring
02:11:36FromGitter<zacharycarter> oh - I'm just saying from a versioning perspective :P
02:11:43FromGitter<zacharycarter> we can just cheat
02:12:54FromGitter<zacharycarter> I mean really - wtf - how corporate can you get from a language perspective beyond releasing yearly candidates of your softare
02:12:58FromGitter<zacharycarter> software*
02:13:18FromGitter<zacharycarter> I can only see things going into supported releases and enterprise support etc
02:14:27AlexMaxWell, hoenstly, I wish Nim had that kind of corporate support
02:14:36AlexMaxof a Mozilla or Google
02:15:29FromGitter<zacharycarter> I think we all do
02:15:45FromGitter<zacharycarter> but - we're attracted to Nim for some reason or another, and it factually lacks all of that
02:16:24shashlickLooks like I missed some nimgen fun
02:16:30FromGitter<zacharycarter> so IMO - Nim is worth exploring, evangelizing, improving, and donating to
02:16:56FromGitter<zacharycarter> and hopefully one day, it becomes the better alternative to Rust / C++
02:17:21FromGitter<zacharycarter> but for me - it's already better than TypeScript
02:20:28shashlick@AlexMax: the #defines basically implement function shortcuts - no way to get those into nim without reimplement
02:21:37AlexMaxshashlick: Exactly my suspicion. ;)
02:21:55AlexMaxOnly trouble is, what is __FILE__ and __LINE__ in nim?
02:22:11AlexMaxRight now I'm progressing just fine by creating a unique string per invocation of nuklear.tree_push_hashed
02:22:27*redlegion_ quit (Ping timeout: 240 seconds)
02:22:28AlexMaxbut it'd be nice to turn it into a plain old function
02:25:07FromGitter<achou11> Has anyone run into this issue when drying to do a simple `nim c -r filename.nim`? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bac3f83fbe23c730fa64886]
02:25:33FromGitter<rayman22201> @AlexMax https://nim-lang.org/docs/system.html#instantiationInfo
02:26:09leorizeachou11: What OS are you running?
02:27:12FromGitter<achou11> @FromIRC just updated my post
02:28:03leorizeyou would have to type my name out if you wanted to tag me :)
02:28:22FromGitter<achou11> @leorize my bad haha
02:29:30FromGitter<achou11> I found this (https://stackoverflow.com/questions/19580758/gcc-fatal-error-stdio-h-no-such-file-or-directory) and tried the command but it didn’t help
02:30:57*craigger joined #nim
02:31:14FromGitter<zacharycarter> @achou11 - you're going to have to tell the Nim compiler what gcc version you want to use - if you want to override the default
02:31:23FromGitter<zacharycarter> funny thing is - clang = gcc on osx
02:31:33FromGitter<zacharycarter> because Apple loves to eff with things
02:32:19FromGitter<zacharycarter> soooo
02:33:19FromGitter<achou11> @zacharycarter what does that flag look like?
02:33:34FromGitter<zacharycarter> one sec - trying to find it now
02:34:00FromGitter<achou11> also I never had to do it before, so I’m wondering if all of these updates came back to bite me haha
02:36:11FromGitter<zacharycarter> @achou11 - check out - https://github.com/zacharycarter/zapp/blob/master/nim.cfg
02:36:28FromGitter<zacharycarter> maybe clang / llvm had an update? can always refer to Nim release notes
02:36:40FromGitter<zacharycarter> some things that gcc supports / llvm doesn't
02:37:07FromGitter<zacharycarter> I've found myself having to install gcc on my osx machine before and switching the compiler to use the gcc binary
02:37:30*craigger quit (Quit: bye)
02:37:40FromGitter<zacharycarter> for instance - llvm doesn't support all of the intrinsics gcc does - certain atomic operations that work on gcc won't work on clang
02:38:24shashlick@AlexMax: that function is only using __LINE__ as a unique seed
02:38:30shashlickyou can set it to some other random value
02:38:48FromGitter<zacharycarter> this section probably explains it better than I can - https://nim-lang.org/docs/nimc.html#cross-compilation
02:38:59AlexMaxshashlick: Yeah, but I wonder if there's a way to do that automatically
02:39:07AlexMaxinstead of having to define a cstring ahead of time like I'm doing now
02:39:09FromGitter<zacharycarter> and then of course - just search on github for examples if you need more specifics
02:39:19AlexMaxalso I'm having a bizarre problem
02:39:22AlexMaxI can't index an array
02:40:06AlexMaxcode that works fine in the playgournd is totally broken in the context of the nimgenned nuklear library
02:40:24FromGitter<zacharycarter> pg is old
02:40:34FromGitter<zacharycarter> like 18.0 I think?
02:40:35AlexMaxIt specifically takes issue with the index operator, saying "type expected"
02:40:43FromGitter<zacharycarter> maybe older
02:40:52FromGitter<achou11> @zacharycarter thanks for the help! I see that nim 0.19.0 was just released, so maybe it has fixes for this?
02:41:21AlexMaxOh man I'm an idiot
02:41:25shashlickyou can use instantiationInfo()
02:41:26FromGitter<zacharycarter> @achou11 I wouldn't call what you're describing a bug - it's a fact of software
02:41:27shashlickhttps://forum.nim-lang.org/t/3221
02:41:34AlexMaxi was using : by accident
02:41:36AlexMaxinstead of =
02:41:38AlexMaxlollll
02:41:49AlexMaxwhat
02:41:51AlexMax0.19 is out?
02:41:51*Taylor21 joined #nim
02:41:54shashlickbung87: I'm testing on mac and I see the issue
02:41:58*Taylor21 quit (Remote host closed the connection)
02:42:00shashlickya just updated and I see 0.19.0
02:42:16FromGitter<achou11> also how do I update to latest nim version with choosenim?
02:42:22AlexMaxno blog post about it?
02:42:24FromGitter<zacharycarter> @achou11 - gcc and llvm are totally out of Nim's control - Nim allows you to override the executable you use to compile the C code it produces
02:42:27FromGitter<zacharycarter> that's pretty much it
02:42:51shashlick@AlexMax: see https://forum.nim-lang.org/t/3221 for getting file info at compile time
02:42:59FromGitter<zacharycarter> @achou11 - I believe the command is `choosenim update devel` but you can refer to `choosenim --help` for specifics
02:43:16FromGitter<achou11> @zacharycarter i see. I guess I’ll have to dig then. Thanks much!
02:43:27FromGitter<zacharycarter> np!
02:43:44AlexMaxshashlick: nice
02:46:01shashlickbung87: please try compiling now - should work correctly with clang itself
02:46:31shashlickyou needed -std=c++0x for clang++ to understand the new enum syntax
02:48:04FromGitter<zacharycarter> @achou11 feel free to post a gist / whatever summarizing your problem in here - it's just difficult to guess what your issue might be regarding compiler implementations and their inconsistencies - if you post your entire project on some public SCM solution, and then a public link with the error message - that's even better, as people can try to compile it themselves (I have a mac book pro that I generally develop
02:48:04FromGitter... on Nim with)
02:48:22FromGitter<achou11> @zacharycarter just tried specifying the compiler and it worked, even if I specify the default one 🙄
02:48:33*craigger joined #nim
02:48:54FromGitter<zacharycarter> do you have xcode dev tools - or whatever - installed?
02:49:05FromGitter<achou11> Yeah I’m pretty sure I do
02:49:26leorizeAlexMax: since Araq haven't merged back to master, I would assume the release is still in unofficial state, hence no blog post (yet)
02:49:45FromGitter<zacharycarter> please keep in mind - apple likes to do everything differently from everyone else - and at the same time make its dev users live's hell
02:49:51FromGitter<achou11> Is that what `xcode-select —install` does?
02:49:57FromGitter<zacharycarter> yup
02:50:02FromGitter<achou11> damn
02:50:32FromGitter<zacharycarter> if you're working on apple specific software - life is fine
02:50:38FromGitter<zacharycarter> use XCode and that whole eco-system
02:51:29FromGitter<zacharycarter> if you want to go cross-platform with a OSX as your dev machine - it's not quite as simple
02:52:21FromGitter<achou11> where would I find the config settings with the defaults?
02:52:33FromGitter<zacharycarter> heh there are none
02:52:38FromGitter<zacharycarter> apple just overrides things
02:52:44FromGitter<zacharycarter> like try typing this into your terminal
02:52:46FromGitter<achou11> for nim?
02:53:15FromGitter<zacharycarter> `gcc --version`
02:53:36FromGitter<achou11> I get this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bac462ffbe23c730fa6488a]
02:53:36FromGitter<zacharycarter> one sec - I'll point you to Nim's
02:53:47FromGitter<zacharycarter> yeah
02:53:50FromGitter<zacharycarter> notice how gcc
02:53:53FromGitter<zacharycarter> points to clang
02:53:55FromGitter<zacharycarter> :)
02:54:20FromGitter<zacharycarter> a totally different compiler frontend (LLVM)
02:54:32FromGitter<zacharycarter> gotta love apple
02:54:37FromGitter<achou11> yeah I see that. So which one is nim using???
02:54:50FromGitter<zacharycarter> https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg
02:54:56FromGitter<zacharycarter> Nim will be using your OS's default I believe
02:55:09FromGitter<zacharycarter> if you want Nim to use actual gcc - you need to specify it in a config file
02:55:29FromGitter<zacharycarter> like here - https://nim-lang.org/docs/nimc.html#cross-compilation
02:55:45FromGitter<zacharycarter> so you can use brew to install bcc
02:56:30FromGitter<zacharycarter> and then link to it in your project with a cfg file - or override it with a more global cfg file somewhere - I forget where you put those - but the manual outlines that as well
02:57:43FromGitter<achou11> hmm makes sense
02:57:56FromGitter<zacharycarter> I think if you just put a .cfg file in your root project dir with `gcc.exe=whatever` it will work
02:58:31FromGitter<zacharycarter> but by default it's just going to invoke gcc on your system
02:58:34FromGitter<zacharycarter> and if that points to clang
02:58:44leorizeyou can put a global config file in ~/.config/nim/nim.cfg
02:59:01FromGitter<zacharycarter> you'll run into whatever compiler inconsistencies exisit - but this is how C++ started out too - so...
02:59:10FromGitter<zacharycarter> C++ started out by compiling to C
02:59:13FromGitter<zacharycarter> you gotta start somewhere
02:59:32leorizeachou11: or just `nim c` something, the path to the configs will appear on top
03:00:09FromGitter<achou11> leorize I see that now. Very helpful :)
03:00:27FromGitter<achou11> @zacharycarter is it a problem if I have 2 paths for C??
03:00:42AlexMaxGNU Nim in our future?
03:00:43AlexMax:P
03:01:00leorizegnc - GNU Nim Compiler :P
03:01:30FromGitter<zacharycarter> @achou11 what do you mean two paths for C?
03:01:33FromGitter<zacharycarter> clang?
03:01:48FromGitter<zacharycarter> or two entries to a C compiler on your path?
03:01:57*Haydos23 joined #nim
03:02:03FromGitter<zacharycarter> as long as you're not overriding the default gcc symlink to clang on your system
03:02:06FromGitter<zacharycarter> you should be fine
03:02:07*Haydos23 quit (Remote host closed the connection)
03:02:19FromGitter<zacharycarter> generally you'll want to install gcc like `brew install gcc-8` or whatever
03:02:35FromGitter<zacharycarter> and then in your .cfg file - provide a path to wherever gcc-8 gets installed
03:02:49FromGitter<zacharycarter> like - `/usr/local/bin/gcc-8`
03:03:01FromGitter<achou11> yeah. So I have these two paths: ⏎ ⏎ ```clang is /usr/local/bin/clang ⏎ clang is /usr/bin/clang``` ⏎ ⏎ The second one is obviously the system one. The first seems to be the one that was installed with my LLVM homebrew installation (maybe???) [https://gitter.im/nim-lang/Nim?at=5bac4865fbe23c730fa6488c]
03:03:13FromGitter<zacharycarter> don't muck with the default paths / symlinks that OSX sets up for you
03:03:34FromGitter<zacharycarter> hrm - possibly
03:03:59FromGitter<achou11> and runnning clang points to the first one. not sure if that would be a problem for nim though
03:04:53FromGitter<zacharycarter> not sure either - I generally just use whatever version of clang is installed w/ OSX
03:05:08FromGitter<zacharycarter> and then if I need GCC, or another compiler backend I link to it
03:05:18FromGitter<zacharycarter> I've never tried to point to a different version of clang on OSX
03:05:29FromGitter<achou11> I didn’t either. I have no idea how this happened tbh
03:05:49FromGitter<zacharycarter> but I mean - I think it's all about just making sure the clang.exe / gcc.exe whatever points to the right location
03:06:00FromGitter<zacharycarter> and that location resolves (whether it's a symlink or whatever) to the correct executable
03:06:22FromGitter<zacharycarter> you can even get so specific w/ the compiler settings as to override the linkker
03:06:27FromGitter<zacharycarter> etc
03:08:13FromGitter<achou11> lol
03:08:25*skellock quit (Quit: WeeChat 1.9.1)
03:08:31FromGitter<achou11> so I just removed that homebrew installed clang binary from my path, and now nim is working again
03:08:41FromGitter<achou11> i hate computers
03:08:55FromGitter<zacharycarter> :) sounds about right with OSX
03:08:56FromGitter<achou11> i’ll be needing that table-flipping meme
03:09:07FromGitter<zacharycarter> please don't blame this on computers in general
03:09:15FromGitter<achou11> fair
03:09:20FromGitter<zacharycarter> just blame it on apple - the fact that they're calling clang gcc
03:09:24FromGitter<achou11> my only experience with computers for dev stuff is osx
03:09:26FromGitter<zacharycarter> is beyond stupid in the first place
03:09:44FromGitter<zacharycarter> well - in case you're interested in why this is so confounding
03:09:49FromGitter<achou11> i don’t know enough about C and compilers to understand
03:09:57FromGitter<zacharycarter> gcc = https://gcc.gnu.org/
03:10:14FromGitter<achou11> ah
03:10:18FromGitter<achou11> i had an idea
03:10:21FromGitter<zacharycarter> llvm / clang = https://clang.llvm.org/ & https://llvm.org/
03:10:31FromGitter<achou11> but when it comes to troubleshooting, I’m a sitting duck
03:10:41FromGitter<zacharycarter> and the latter - of course - is spear headed by apple
03:11:40FromGitter<achou11> so does this mean i have two installations of Clang on my computer??
03:12:03FromGitter<achou11> one from system and the other from LLVM via Homebrew?
03:12:22FromGitter<zacharycarter> well if you installed any other version of clang on your computer, via homebrew - then yes
03:12:56FromGitter<achou11> daaahh
03:12:59FromGitter<zacharycarter> OSX comes with a default installation of llvm / clang because that compiler infrastructure is relied upon for building a lot of the internals the OS needs
03:13:20FromGitter<zacharycarter> if you install another version on top of that via a package manager - the default OS installation will likely get confused
03:13:25FromGitter<zacharycarter> which is probably what led to your issue
03:13:26FromGitter<achou11> yeah
03:13:35FromGitter<achou11> happens to me with other homebrew stuff
03:13:49FromGitter<zacharycarter> yeah - every modern operating system is a mess tbh
03:13:53FromGitter<zacharycarter> there are no great options
03:14:10FromGitter<zacharycarter> windows takes longer to update than a fresh install
03:14:57FromGitter<zacharycarter> almost every linux distro is a security mess and plus - linux itself has become extremely bloated over time and filled with unnecessary cruft
03:15:08FromGitter<zacharycarter> OSX is... OSX
03:15:21FromGitter<achou11> ah geez. I was thinking of switching to a Linux distro sometime soon :///
03:15:38FromGitter<zacharycarter> well - certain linux distros are worse than others
03:15:47FromGitter<zacharycarter> would probably pay off to ask for advice in that realm
03:16:14FromGitter<zacharycarter> I just use what my work gives me for free - if I actually had to choose my own OS - I'd probably write my own and then never end up having access to a usable computer ever again :P
03:17:28FromGitter<achou11> what’s funny about all of this is that I’m *obviously* new to Nim and I was planning to go through the 2nd part of the official guide for funsies
03:17:36FromGitter<achou11> and then I ended up with this mess
03:18:00FromGitter<achou11> and what’s even funnier is that I’m used to it hahaha
03:18:04FromGitter<zacharycarter> well - this is kind of the bridge I try to inform my co-workers of regarding native vs non-native programming
03:18:13FromGitter<zacharycarter> and most of them don't get it at all
03:18:56FromGitter<achou11> Yeah I usually don’t have to deal with very low-level issues on my computer. Tonight was a little new for me, that’s for sure
03:19:22FromGitter<zacharycarter> you're not writing JS or HTMl that goes through an engine - you're writing code and saving it to a source file and then that's going through a compiler that has several phases to it, along with a linker, and other processes that you're probably not used to.
03:19:33FromGitter<achou11> Like once I see Clang in the error message, I start sweating lol
03:19:35FromGitter<zacharycarter> Best thing to do - is learn C
03:19:35FromGitter<achou11> yeah definitely
03:19:46FromGitter<zacharycarter> or at least get a semi-solid understanding of it
03:20:12FromGitter<achou11> one thing at a time. would be nice to have a general knowledge of that. at least learn some of the terminology
03:20:32FromGitter<zacharycarter> well - I think that C is a good bridge to Nim
03:20:37FromGitter<zacharycarter> and any other systems programming language
03:20:48FromGitter<zacharycarter> especially if you're starting from a high level of understanding regarding programming
03:20:58FromGitter<zacharycarter> it's the complete opposite of the spectrum
03:21:14FromGitter<zacharycarter> without diving into assembly / circuitry and logic gates and all of that
03:21:38FromGitter<zacharycarter> https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628 - is probably a book every person studying comp-sci should ready anyway
03:22:03AlexMax....this is weird
03:22:04AlexMaxvar x: array[3, cint] = [1'i32, 2, 3]
03:22:08AlexMaxwhy does this compile?
03:22:24AlexMaxOnly the first literal is annotated as a 32-bit integer
03:22:28FromGitter<zacharycarter> and then if you really want to understand how computers / programs work there is - https://www.amazon.com/Code-Language-Computer-Hardware-Software/dp/0735611319
03:22:36AlexMaxif you remove that annotation, the compilation fails
03:22:44FromGitter<zacharycarter> and then from there you can move onto some book about a particular machine / instruction set
03:22:51AlexMaxbecause you can't convert a literal to a cint
03:23:10AlexMaxBut shouldn't I be annotating EVERY literal?
03:23:23AlexMaxvar x: array[3, cint] = [1'i32, 2'i32, 3'i32]
03:24:04FromGitter<achou11> Yeah I’ve heard great things about that book. I wasn’t forced to do the low-level stuff in school since I wasn’t a CS major, so definitely started high-level. I’m a few weeks from starting my first full-time job, so I’ll have to put the low-level deep-dive on hold for now
03:24:33FromGitter<achou11> Seriously thanks for all of the help and conversation @zacharycarter ! Really appreciate it
03:25:34FromGitter<zacharycarter> like - https://www.amazon.com/Computer-Organization-Design-ARM-Architecture/dp/0128017333
03:25:37FromGitter<zacharycarter> yeah - np
03:25:54FromGitter<zacharycarter> that's another good book once you read the code book
03:26:28FromGitter<zacharycarter> @achou11 - just FYI - I started at a high level and now am having to work through a lot of adversity getting to a lower level / more challenging position
03:27:26FromGitter<zacharycarter> I was a history major in college and am tired of doing the web dev thing (started by teaching myself HTMl / JS / CSS when I was like 12 - and then taught myself basic programming, and yadda yadda yadda - now my job is boring AF and my peers are all like me when I was just starting out / there's no where for me to go)
03:28:04FromGitter<zacharycarter> so - just be wary of the skillset you go after - sometimes learning the harder stuff / lower-level stuff even though it's not immediately practical, is the way to go
03:28:16FromGitter<zacharycarter> especially if you are passionate about software / not just web dev
03:28:42FromGitter<zacharycarter> but either way - good luck! I wish you the best and hope you get to use Nim in your pursuits!
03:28:52FromGitter<achou11> @zacharycarter Thanks for the book links! I’ll check them out some time in the near future. ⏎ ⏎ I definitely understand what you’re talking about with the whole web dev thing. While I really like the web dev stuff, I find the lower-level topics fascinating and always wished that I devoted time to doing that stuff first, whether on my own time or in school
03:30:45FromGitter<achou11> Hopefully I’ll make more progress with learning Nim after this snafu hahaha. I find that the ease of learning is great, especially from a Python background.
03:32:02FromGitter<zacharycarter> I'm sure you will - and trust me - there will be plenty more head scratchers if you stick around and use Nim :) I think I ran into a similar problem with GCC / Clang inconsistencies regarding atomic operations only a few months ago - you're doing great! :P
03:33:21FromGitter<zacharycarter> and the fact that you find the lower-level stuff fascinating and are drawn to it is great! (not that I can speak from being one of them) - but I think those with that kind of curiosity and dedication make the best engineers - they don't get complacent after they learn a framework and can pump out the same app over and over with it
03:33:40FromGitter<zacharycarter> which is what I find the goal of a lot of software orgs is these days
03:36:16FromGitter<zacharycarter> also - this is, IMO, a fantastic read on why being a software dev (who cares) in enterprise IT today - sucks: http://tonsky.me/blog/disenchantment/
03:39:20*darithorn joined #nim
03:51:18*chemist69 quit (Ping timeout: 252 seconds)
03:53:02*chemist69 joined #nim
04:05:13*zachcarter quit (Quit: Lost terminal)
04:22:50FromGitter<zacharycarter> http://skiplang.com/
04:24:52FromGitter<zacharycarter> https://github.com/skiplang/skip/blob/master/src/native/coroutine.sk
04:25:15FromGitter<zacharycarter> pretty interesting
04:29:35FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bac5caf7bd81c5b9dbd61e4]
04:33:01FromGitter<zacharycarter> haha - beat me to it of course - https://news.ycombinator.com/item?id=18080755
04:51:47FromGitter<zacharycarter> how is one to manage dependencies w/o nimble?
04:51:49FromGitter<zacharycarter> nawabs?
04:54:52FromGitter<zacharycarter> I'm going to give it a shot - nimble is starting to annoy me as well in certain circumstances - in others it's fine
05:10:16*cswang10 joined #nim
05:12:30FromGitter<kayabaNerve> @zacharycarter What about Parabola (Libre Arch) with hardening ?
05:13:03FromGitter<zacharycarter> I haven't tried it
05:13:33FromGitter<kayabaNerve> They have a couple of wiki pages on making it more secure. It's fully open and Arch is pretty minimal.
05:14:35*cswang10 quit (Remote host closed the connection)
05:14:46FromGitter<zacharycarter> I'll have to check it out
05:16:25FromGitter<kayabaNerve> I have never installed Arch; I know for security, Hardened Gentoo is what most people go to. That said, for the three criteria you said, since usability and user experience wasn't one, Parabola is likely your best bet.
05:18:17ldleworkNixOS is my favorite these days
05:18:26ldleworktruly distinct linux distribution
05:18:38FromGitter<kayabaNerve> "distinct" ⏎ ⏎ "linux"
05:19:31ldleworkWell, it and Guix
05:20:16FromGitter<kayabaNerve> I like Ubuntu Mate.
05:20:47ldleworkNone of those distros are very different. Different package repos, different update schedules, different package manager which all basically work the same way
05:22:05ldleworkCryptographically assured package reporducability using a single config language for the whole linux system, X, firewalls, boot options, services, everything - can stick my whole config in git and know that if my machine crashes I can reproduce my whole environment no problem.
05:22:25ldleworkIf I build a configuration one time that does the wrong thing, and say my window manager wont start, i can just roll back to the last generation in grub.
05:23:16ldleworkthe configuration language is almost a real language so you can make your config from modular abstractions and reusable bits that you can share with others.
05:24:21FromGitter<kayabaNerve> Parabola is Arch, a minimal distro that uses pacman, with no binary blobs and only free software in its package repos. ⏎ ⏎ I like Nix as a package manager but I question the idea of a whole OS around it. That said, the main thing between distros is the package manager/used Desktop...
05:24:57ldleworkI just highlighted just a few of the great benefits of having an OS utilize the technology in Nix
05:25:19ldleworkBut you're right, another great thing about the ecosystem is it can be used on any linux distro and even OSX
05:26:00FromGitter<kayabaNerve> Yes but that alone doesn't make it an OS.
05:26:16ldlework"that alone"? what alone doesn't make what an OS?
05:26:32FromGitter<kayabaNerve> Distro, package manager, desktop, supporting suite...
05:26:37FromGitter<kayabaNerve> I would love to see Parabola with Guix and Mate.
05:26:38ldleworkwhat?
05:27:04ldleworkGuix is an operating system that uses Nix under the hood.
05:27:15ldleworkSo you mean Parabola with Nix pointed at the Guix repositories.
05:27:32FromGitter<kayabaNerve> An OS is a multitude of things. I'm not sure a OS built around Nix is the best option. I'm questioning NixOS versus another distro with Nix. That said, I acknowledge the major differences between distros is the package manager.
05:27:41ldleworkI don't know why you'd want to use Nix as a package manager
05:27:51ldleworkBut then not have it for system configuration
05:28:03FromGitter<kayabaNerve> Guix is a package manager; GuixSD is the distro.
05:29:08ldlework"I'm not sure" is a very vague form of argument that nobody can do anything with.
05:29:13ldleworkHave you heard of the term "FUD"
05:29:24FromGitter<kayabaNerve> Fear, uncertainty, and doubt.
05:29:48FromGitter<kayabaNerve> It's used to call out unfounded claims against a project.
05:30:28FromGitter<kayabaNerve> I like Nix. I 'm not sure about creating an entire distro around it. That said, most distros have their differences in what package manager is used. Therefore, I don't have a problem with NixOS.
05:30:56FromGitter<kayabaNerve> If I say Parabola + Nix that can be defined as Paranix (a new distro) so...
05:30:57ldleworkMost OSes do not use their package manager technology for system configuration.
05:31:06FromGitter<kayabaNerve> True.
05:31:14ldleworkOK I only pointed this out i think three times.
05:31:36FromGitter<kayabaNerve> Dude. I get you. I think you get me. Just a disconnect. Best thing is to move on.
05:31:40ldleworklike i said, most linux distributions are barely distinct, until nixos and guixsd
05:32:01ldleworkand maybe those distros that run literally every process in a container
05:32:57FromGitter<kayabaNerve> Arch is a very different thing from Ubuntu which is a very different thing from Qubes which is a different thing from TAILS.
05:33:19ldleworkQubes, sure. TAILS and ubuntu, not so much.
05:33:27FromGitter<kayabaNerve> Arch is a minimal OS. Ubuntu is an user friendly OS. Qubes is a secure OS. TAILS is an amnesiac system that resets on each launch.
05:33:38ldleworkyou can turn any of those into any of the other
05:33:52FromGitter<kayabaNerve> You can configure Nix to be Ubuntu
05:33:58ldleworknope
05:34:09ldleworki can install the same DE sure
05:34:12FromGitter<kayabaNerve> You're saying I can't use Nix to install Apt/GNOME and more?
05:34:19ldleworkthat's not what makes Ubuntu
05:34:21ldleworkas you yourself pointed out
05:34:24FromGitter<kayabaNerve> Then what does?
05:34:35ldleworkI can take all the linux distros and install any DE I want
05:34:38FromGitter<kayabaNerve> Kernel ⏎ Supporting Stack ⏎ Package Manager ⏎ DE [https://gitter.im/nim-lang/Nim?at=5bac6bee7bd81c5b9dbdbc68]
05:35:26FromGitter<kayabaNerve> So if I have my Nix script install the stack Ubuntu uses, install Apt, install the DE, install the software it ships with...
05:35:28FromGitter<kayabaNerve> It's all Linux.
05:35:43ldleworkYou'd still be using Nix
05:35:46ldleworkAnd if you were on NixOS
05:35:50ldleworkNix for all system configuration
05:36:01FromGitter<kayabaNerve> Can Nix be used to uninstall Nix?
05:36:04ldleworkI don't see how or why you want to continuously miss the point about how system confgiuration is done
05:36:04FromGitter<kayabaNerve> You can argue every Linux distro is not distinct or a lot are.
05:36:09FromGitter<kayabaNerve> I don't
05:36:22FromGitter<kayabaNerve> I'm commenting that it's not the only distinct Linux distro
05:36:26ldleworkMaybe it is easier to think in terms of supersets of functionality
05:36:32FromGitter<kayabaNerve> I'm done...
05:37:01ldleworkI already mentione two others that area also distinct, so maybe your frustration comes from fighting a strawman
05:37:32ldleworkAnd I said "not that distinct" compared to the great distinctions with container OSes and functionally pure OSes
05:37:55*nsf joined #nim
05:38:25ldleworkThere are distinctions even between different flavours of ubuntu, but it is magnitude that was the crux of everything said
06:07:49*darithorn quit (Quit: Konversation terminated!)
06:22:46*jjido joined #nim
06:27:11*jjido quit (Client Quit)
06:42:19FromGitter<vivekimsit> I tried `nimble init` and its really cool
06:42:47FromGitter<vivekimsit> I was thinking if its a good idea to generate minimal `.gitignore` as well?
06:43:11FromGitter<codenoid> hi
06:43:33FromGitter<codenoid> last night try to combine nim mongo
06:46:44*faildrone2 joined #nim
06:48:53FromGitter<codenoid> AFAIK
06:49:23Araqis it too late to remove the 0.19 tag...
06:49:46*skrylar joined #nim
06:51:01FromGitter<gogolxdong> what's wrong.
06:51:19Araqthe windows zips ship with a finish.exe that is wrong
06:52:18FromGitter<gogolxdong> I published a post of Nim 0.19 changelog on https://www.oschina.net/news .
06:52:21*faildrone2 quit (Ping timeout: 244 seconds)
06:53:28Araqbefore the official news entry is published?
06:53:52Araqoh well, I will just rebuild the windows zips with 0.19.1
06:54:09Araqthey are checksum'ed so people can still be sure these are not corrupted
06:56:17*unlink2 joined #nim
06:56:21FromGitter<narimiran> tags can be remove than added on a different commit ;)
06:56:30FromGitter<narimiran> *removed then
06:58:25*unlink2 quit (Remote host closed the connection)
06:58:29FromGitter<gogolxdong> where are you codenoid?
06:59:09FromGitter<bung87> shashlic I just wake up, I check it later.
06:59:17FromGitter<codenoid> i'm malaysia
07:00:18FromGitter<bung87> ah ,same timezone
07:00:37FromGitter<gogolxdong> We went to Kuala Lumpur two months ago.
07:00:37FromGitter<codenoid> where are you ?
07:01:09FromGitter<bung87> I didnot sleep last night , I’m in beijing of china
07:01:44FromGitter<gogolxdong> so you can read Chinese codenoid?
07:01:54FromGitter<codenoid> i love china
07:01:58FromGitter<codenoid> i have qq account
07:02:01FromGitter<codenoid> http://cd1.sportsdiscourse.com/uploads/2018/01/WANG-Manyu-ITTF.jpg
07:03:08FromGitter<gogolxdong> Genting Highlands is great.
07:05:07FromGitter<codenoid> ups, weibo too
07:06:00FromGitter<codenoid> 👍
07:06:53FromGitter<gogolxdong> https://discord.gg/WxVRN8 we are in a discord group of most chinese ,there isn't many members atm.
07:09:50FromGitter<gogolxdong> another is from beijing too, didn't see him for a while.
07:10:41FromGitter<gogolxdong> bad English, haven't seen him for a while.
07:46:23FromGitter<gogolxdong> not sure how to translate `breaking changes` to Chinese exactly.
07:57:24*flusicaptain joined #nim
08:00:29*flusicaptain quit (Remote host closed the connection)
08:03:06*camu17 joined #nim
08:03:45*gmpreussner quit (Ping timeout: 252 seconds)
08:03:48*gmpreussner_ joined #nim
08:07:31*camu17 quit (Ping timeout: 246 seconds)
08:16:32*Vladar joined #nim
08:22:57*jvdmr27 joined #nim
08:23:09FromGitter<alehander42> @arnetheduck thank you, I am not absolutely sure, as mostly @michael72 works on zero-functional these days
08:25:33*PMunch joined #nim
08:29:29*jvdmr27 quit (Ping timeout: 244 seconds)
08:33:30*Vladar quit (Remote host closed the connection)
08:33:54*Vladar joined #nim
08:42:26*hackoon8 joined #nim
08:45:19*hackoon8 quit (Remote host closed the connection)
08:53:32*SupaHam9 joined #nim
08:55:08*SupaHam9 quit (Remote host closed the connection)
09:00:59*seni joined #nim
09:01:59*mpjetta25 joined #nim
09:06:18*mpjetta25 quit (Remote host closed the connection)
09:17:18*Rickta599 joined #nim
09:22:05*Rickta599 quit (Remote host closed the connection)
09:27:39FromGitter<7sDream> Does Nim have a release schedule table/web page that show our planning in recent years?
09:36:07FromGitter<gogolxdong> https://github.com/nim-lang/Nim/milestones
09:36:57FromGitter<gogolxdong> Are you still in Beijing?
09:40:11*geordi joined #nim
09:41:10*geordi quit (Remote host closed the connection)
09:46:04FromGitter<7sDream> Thx.
09:46:13FromGitter<7sDream> Yes~
09:47:32FromGitter<gogolxdong> There is another one from Beijing , you can talk.
09:48:56*xet7 quit (Quit: Leaving)
09:49:11*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
09:49:25*xet7 joined #nim
09:52:04FromGitter<7sDream> I saw a programming language performance benchmark project on weibo this morning, just for share
09:52:14FromGitter<7sDream> (https://files.gitter.im/nim-lang/Nim/TOiv/image.png)
09:52:17FromGitter<7sDream> https://github.com/drujensen/fib
09:53:28*Calinou joined #nim
09:57:15*Pinapl2 joined #nim
09:57:44FromGitter<7sDream> happy to see more and more people notice Nim~
10:00:04*jjido joined #nim
10:01:13PMunchHuh, tried to compile his fib.nim example with "nim cpp -d:release fib.nim" runs for me 16.8x faster
10:01:20PMunchFrom 11.3s to 0.68s
10:02:03PMunchI wonder what causes that..
10:05:35FromGitter<narimiran> can i be the one that says that this benchmark is pointless?
10:05:38*Pinapl2 quit (Ping timeout: 252 seconds)
10:06:18PMunchOh yeah, it's completely pointless.
10:07:00*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:08:07PMunchThis is very strange..
10:08:42PMunchOn my machine the C++ given by the benchmark runs about as fast as the Nim code compiled to C, but the Nim code compiled to C++ runs 16x faster than both of them
10:09:20FromGitter<narimiran> there are people who would say that all benchmarks are pointless (khmaraqkhm), but this one takes the cake :D
10:11:39FromGitter<gogolxdong> takes a cake , learned , lol
10:11:48FromGitter<gogolxdong> takes the cake
10:12:19FromDiscord<Shield> wow it took 130secs for me
10:13:08PMunchShield, the Nim version?
10:13:17PMunchCould you try it with cpp instead of c?
10:14:00PMunchI just want to see if it's just something on my machine
10:14:33*preludedrew_ joined #nim
10:15:50*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
10:16:23FromDiscord<Shield> what's the correct way of putting compileToCpp in the cfg file?
10:16:58*noonien joined #nim
10:17:08*preludedrew_ quit (Remote host closed the connection)
10:18:03FromDiscord<Shield> it takes 3secs, the binary is small too
10:18:23PMunchSo down from 130secs to 3 secs?
10:18:28FromGitter<narimiran> @gogolxdong i don't know if it is "a" or "the", i have a problem with those as they don't exist in my mother tongue
10:19:17FromDiscord<Shield> yeah, i'm on nim 0.18.0
10:19:24FromGitter<narimiran> oh, it is indeed "the", i've checked :)
10:19:36FromDiscord<Shield> it seems that using --opt:speed isn't doing much when exporting to cpp
10:19:43PMunchHad a look at the C++ source code it generates, and it appears to actually calculate it on runtime
10:19:50FromDiscord<Shield> while for c it takes about 40secs
10:19:55PMunchShield, -d:release implies --opt:speed
10:20:52FromDiscord<Shield> really? it went from 130secs to 40secs with --opt:speed, let me recheck
10:25:48FromGitter<gogolxdong> If your mother language derived from Germanic languages.
10:27:43FromGitter<gogolxdong> Is there a library implemented HAMT?
10:28:48FromGitter<gogolxdong> I found go uses de Bruijn (64 bit) constant
10:29:28FromDiscord<Shield> okay, the corrects times are: c takes 14.7s while cpp takes 1.93s
10:30:10FromDiscord<Shield> i had to clear nimcache, didn't expect it to cause problems
10:30:29PMunchCrazy that the C++ target is so much faster than the C target
10:30:58FromGitter<gogolxdong> It is if it is.
10:34:06FromDiscord<Shield> my machine is certainly not powerful to beat the 5.751s for C++ in the benchmark, i guess it may be closer to C++(constexpr)
10:35:14FromGitter<Bennyelg> Hey Im reviewing nim-days for the first time and I came across this: ⏎ ⏎ ```for i, l in pairs(lines):``` ⏎ ⏎ I know that we dont need use pairs. ```for idx, l in lines:``` will work just fine right? [https://gitter.im/nim-lang/Nim?at=5bacb262aedb375b9c544882]
10:35:54FromGitter<gogolxdong> no
10:37:02FromGitter<Bennyelg> work like charm to me
10:37:06FromDiscord<Shield> still, from the generated cpp code it doesn't seem like using it
10:37:09FromGitter<Bennyelg> ```var s = @["a", "b", "c"] ⏎ for i, x in s: ⏎ echo(i ,x)``` [https://gitter.im/nim-lang/Nim?at=5bacb2d553c31c11117104d0]
10:37:46FromGitter<bung87> the type must implements the pairs interface
10:38:06FromGitter<bung87> for builtins you already have
10:38:22FromGitter<Bennyelg> I c,
10:39:11leorizeThere's an implicit rule for items/pairs https://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations
10:42:42FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacb4214d320a463bffa283]
10:45:56FromGitter<vinodvinu> Hi, this code is from nim manual. ⏎ iterator countupT (a, b: T; step = 1): T {..} ⏎ Whats the meaning of "[T]" in this code ?, AFAIK, we are note using this. Since the code is countup(0, 10).
10:46:55FromGitter<bung87> called generic
10:47:11FromGitter<bung87> you can search in manual
10:47:56FromGitter<vinodvinu> Means, we can use this countup for all generic types, Am i right ?
10:48:27FromGitter<vinodvinu> But conting is only possible for numbers
10:49:02FromGitter<bung87> thats depens on the implements
10:50:03FromGitter<vinodvinu> So "[T]" means generic types
10:50:42FromGitter<bung87> if the implements requres some method of the type it must have
10:51:01FromGitter<bung87> otherwise you cannot do this
10:51:26FromGitter<vinodvinu> could you pls point me to an example ?
10:51:28*leru joined #nim
10:52:36FromGitter<bung87> sorry I am one my phone better search nim manual for generic
10:52:59FromGitter<vinodvinu> Ok
10:53:50FromGitter<vinodvinu> I saw this "[T]" in lot of pros in system module.
10:54:28FromGitter<vinodvinu> So i thought how to use this "[T]" in my procs
10:56:18FromGitter<bung87> yeah you can implements one ,if you implements same interfaces for not just one type.
10:57:16FromGitter<bung87> I thought it as c++ template
10:57:52FromGitter<moigagoo> Hi! How do I pass and mutate state inside an AyncHttpServer callback? I'm getting "Illegal capture" error.
10:58:05*jjido joined #nim
10:58:23FromGitter<vinodvinu> ha ha, i thought that i can declare a "seq[T]" as it is in my code :)
10:59:04FromGitter<moigagoo> I'm writing an app that uses websockets and I need it to mutate the state when certain payload is received on a certain path.
10:59:14FromGitter<bung87> no it ’s not the `any`
11:00:08FromGitter<vinodvinu> yes, later i learned that i can only declare a seq[] with a concrete type.
11:00:27*dddddd joined #nim
11:00:38FromGitter<bung87> @moigagoo I guess you pass variable from outer scope to a inner scope.
11:00:39FromGitter<vinodvinu> And the "any", "auto" are not concrete types
11:01:44*leru quit (Ping timeout: 252 seconds)
11:02:38FromGitter<moigagoo> @bung87 Well, yes. First, I tried mutating a global variable, then I tried wrapping the callback and server call in a closure and call that instead.
11:05:24FromGitter<bung87> well ,I also tried many times then give up, better redesign the process.
11:06:52FromGitter<bung87> closure proc and inline proc are different types
11:07:18FromGitter<moigagoo> What's the proper way to do it? Since I can't pass the state to the callback proc. I thought using a closusre was my only option.
11:07:30FromGitter<bung87> it’s not like you programming in js or python in that way
11:08:20FromGitter<bung87> no , you can using template or macro
11:08:38FromGitter<moigagoo> Sorry, I don't think I'm following you. Also, I think I've formulated the question wrong.
11:09:05FromGitter<moigagoo> I'm sure there's a simpler way, without templates or macros.
11:09:35FromGitter<bung87> then you need put you code
11:09:58FromGitter<bung87> otherwise no body knows what you exactly want to do
11:10:31FromGitter<moigagoo> Exactly. I'll tinker with it myself and come back with a concrete example if I fail.
11:16:35*Calinou joined #nim
11:20:38*Remram0 joined #nim
11:22:47FromGitter<Vindaar> @moigagoo (speaking as someone who's not very experienced with this sort of thing either) You should be able to use a channel to send something e.g. to the callback like I do here: https://github.com/brentp/nim-plotly/blob/master/src/plotly/image_retrieve.nim
11:24:28*Remram0 quit (Remote host closed the connection)
11:26:59FromGitter<Bennyelg> Mimicking python decorator , is templates are fine ?
11:28:26FromGitter<gogolxdong> it's from http:#supertech.csail.mit.edu/papers/debruijn.pdf
11:29:09FromGitter<gogolxdong> de Bruijn Sequences
11:31:16*francisl joined #nim
11:33:51FromGitter<mratsim> Nim also uses deBruijn for bit counting/log2: https://github.com/nim-lang/Nim/blob/master/lib/pure/bitops.nim#L56
11:35:03*krux02 joined #nim
11:59:21*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
12:04:00*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:07:52*francisl quit (Quit: francisl)
12:10:01FromGitter<gogolxdong> oh, great , seems it's a standardized implementation. Just finished the port from Go to Nim.
12:12:19*bloodygo1zo joined #nim
12:15:01*bloodygo1zo quit (Remote host closed the connection)
12:17:32*dade`22 joined #nim
12:23:23FromGitter<mratsim> Just use countTrailingZeroBits in the bitops module: https://github.com/nim-lang/Nim/blob/master/lib/pure/bitops.nim#L315
12:23:42FromGitter<mratsim> the only issue I have with it is how the “noundefined” work
12:23:48*dade`22 quit (Ping timeout: 245 seconds)
12:24:00FromGitter<mratsim> Feel free to add your thoughts in this PR: https://github.com/nim-lang/Nim/pull/9029
12:35:28*NimBot joined #nim
12:36:20*SenasOzys quit (Ping timeout: 252 seconds)
12:38:23*stefanos82 joined #nim
12:43:36*alephnull17 joined #nim
12:44:10*alephnull17 quit (Remote host closed the connection)
12:47:11*SenasOzys joined #nim
12:48:28FromGitter<gogolxdong> np
12:49:29*skrylar quit (Remote host closed the connection)
12:51:37*vlad1777d joined #nim
12:56:55FromDiscord<Shield> is using addr() the safest way to avoid object.field.subfield everytime you want to access the subfield?
12:58:36def-Shield: Template
12:58:54*emberquill joined #nim
12:58:59*francisl quit (Quit: francisl)
12:59:30*emberquill quit (Remote host closed the connection)
13:00:02def-template s: auto = obj.field.subfield
13:00:55FromDiscord<Shield> thanks
13:03:30FromGitter<zacharycarter> I got custom-tags working w/ the emerald DSL now
13:03:41FromGitter<zacharycarter> so the first custom element I'm building, is a router
13:07:44FromGitter<rufusroflpunch> ```proc sequence[T : any; R : set](ps: T): R = {1,2,3} ⏎ sequence(5)``` [https://gitter.im/nim-lang/Nim?at=5bacd62098245f4ae0908aca]
13:07:53FromGitter<rufusroflpunch> can someone explain why that results in a compilation error?
13:09:16*francisl joined #nim
13:14:19FromGitter<rufusroflpunch> scratch that, wrong snippet
13:14:39*ritchie_ joined #nim
13:14:49FromGitter<rufusroflpunch> ```proc sequence[T: any; R : seq](ps: T): R = @[1,2,3] ⏎ discard sequence[int, seq[int]](5)``` [https://gitter.im/nim-lang/Nim?at=5bacd7c901fb5f4ae12e919c]
13:15:20FromGitter<rufusroflpunch> that' s the one giving me trouble. I'm getting a "can't instantiate" error
13:15:43*chintimin joined #nim
13:15:53FromGitter<zacharycarter> I don't think you can use seq as a generic type
13:16:02*chintimin quit (Remote host closed the connection)
13:16:04FromGitter<zacharycarter> you'd need like
13:16:38FromDiscord<demotomohiro> Shield:
13:16:39FromDiscord<demotomohiro> https://wandbox.org/permlink/gKPvJgf8bB7NX46j
13:17:13FromGitter<zacharycarter> ```discard foo[int, seq[int]](5)``````
13:17:19FromGitter<zacharycarter> also - like any isn't a concrete type
13:17:25FromGitter<zacharycarter> so I don't think it works w/ generics like that
13:17:35FromGitter<zacharycarter> you could use like SomeNumber or some other type that represents all numeric types
13:17:39FromGitter<zacharycarter> but I don't think you can use any like that
13:18:36FromGitter<rufusroflpunch> ah, I see. I think the issue was the any, I misunderstood its meaning
13:19:10FromGitter<rufusroflpunch> it actually works if I remove the `any` but leave it with `seq`
13:19:11FromGitter<ephja> yes, that works if you remove "any"
13:19:16*leru joined #nim
13:19:34FromGitter<rufusroflpunch> beautiful, thanks guys
13:19:51FromGitter<zacharycarter> sure thing
13:20:12FromDiscord<Shield> thanks for the snippet demotomohiro
13:21:17*TrentP8 joined #nim
13:22:49*TrentP8 quit (Read error: Connection reset by peer)
13:26:03*chemist69 quit (Ping timeout: 252 seconds)
13:26:30*chemist69 joined #nim
13:26:33krux02yay it works: http://ix.io/1nGE
13:26:35*Riviera22 joined #nim
13:26:39krux02this is fun
13:26:57Araqimport segfaults
13:27:03Araqwould have accomplished the same
13:27:07krux02hmm
13:27:31*PrimHelios joined #nim
13:27:49FromDiscord<Shield> ouch
13:27:56krux02can't find segfaults
13:28:30*Riviera22 quit (Remote host closed the connection)
13:28:35*leru quit (Ping timeout: 252 seconds)
13:28:57krux02ok I did
13:29:00krux02cool
13:29:16Araqit's terrible :-)
13:29:27krux02why?
13:29:42krux02actually I have no idea what I am doing, I just ported code from stack overflow
13:29:48krux02and it works
13:30:04krux02I don't know what a longjmp really does
13:30:17krux02there will be a lot of unwinded stuff on the stack
13:30:26*Calinou joined #nim
13:31:21krux02the idea is that this could be somewhen integrated in nimsuggest, so that even when it crashes with a segfault, it doesn't really crash, it restarts itself.
13:32:02krux02Because there are bugs in nim, and with this safetyguard they don't need to be fixed for nimsuggest to become a stable process.
13:32:35FromGitter<zacharycarter> may want to be a bit more careful w/ the comparisons to Rust in Nim's twitter
13:32:47krux02Araq: did you discuss with yuuta yamada the epc protocol of nimsuggest?
13:32:50FromGitter<zacharycarter> the whole - Rust type-safety comment - is getting a lot of flack from rustaceans
13:33:02krux02I currently try to get the problems I have with nim-mode resolved.
13:33:30krux02one is that sometimes emacs becomes unresposive, and when nimsuggest crashes, emacs really gets confused.
13:34:01krux02I don't want to fix all the bugs in the compiler, I want emacs to be able to deal with imperfect nimsuggest, but the complexity of nim-mode is killing my progress.
13:34:29FromGitter<zacharycarter> VSCode / NimSuggest have the same issue
13:34:30krux02I think yuuta yamada likes too much to add new fancy technology
13:34:56krux02zacharycarter[m], I wonder where to fix the issue
13:34:56FromGitter<zacharycarter> Nimsuggest starts leaking and VSCode eventually needs a restart / you have to through your task manager and kill all the orphan nimsuggest processes
13:35:18dom96https://nim-lang.org/blog/2018/09/26/version-0190-released.html 👑🎉👑🎉
13:35:20krux02on nimsuggest could handle it's own segfaults with the pattern I just posted (on posix)
13:36:00krux02there is a buzz word missing
13:36:29krux02metaprogramming
13:36:41FromGitter<kaushalmodi> @dom96 yay!
13:37:17Araqrestarting after a segfault should be a watchdog's job, or supervisor, or whatever
13:37:43krux02a "yay" from me as well :P
13:38:03FromGitter<zacharycarter> Also - just FYI Araq - I literally had to change zero things in my code to go from a relatively recent version of devel to 0.19.0 last night - at least for the JS target
13:38:49*ap0calypse22 joined #nim
13:39:05FromGitter<zacharycarter> great reply on the tweeters!
13:39:09FromGitter<zacharycarter> :D
13:39:11dom96pff zacharycarter, you need more faith in my marketing :P
13:39:16Araqthat doesn't count though, devel == 0.19
13:39:16krux02zacharycarter[m], how extensively do you use the js target?
13:39:17dom96(regarding your tweet)
13:40:21FromDiscord<Shield> yay from me as well, waiting for the docs to catch up
13:40:41dom96docs should be live already
13:40:43*ap0calypse22 quit (Killed (Sigyn (Spam is off topic on freenode.)))
13:40:46FromDiscord<Shield> the link for for-loop macros seems to be broken
13:42:05Araqyeah, the link structure isn't what I anticipated
13:42:10Araqthese links are thus all broken
13:42:18Araq:-/
13:42:19FromDiscord<demotomohiro> yay! for Version 0.19.0!
13:42:28Araqtold you I hate directories with a passion :P
13:43:26*seni quit (Ping timeout: 252 seconds)
13:43:46dom96When in doubt, use absolute links
13:43:48*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
13:44:13dom96Should be fixed now
13:44:24FromGitter<survivorm> Congratulations on new release!
13:45:02FromGitter<codenoid>
13:45:06FromGitter<kaushalmodi> dom96: what's fixed?
13:45:07FromGitter<codenoid> 🌽
13:45:23FromGitter<kaushalmodi> I was commenting on this in parallel: https://github.com/nim-lang/Nim/issues/8974#issuecomment-425096067
13:45:24FromDiscord<Shield> it is fixed
13:45:50shashlickIs there a lib to make cpp interop easier
13:46:01shashlickWorking with cpp data types
13:46:23FromGitter<kaushalmodi> nvm.. the broken link discussion was about the link in the blog post
13:46:48*nc-x joined #nim
13:48:38dom96Araq: we need to merge devel into master
13:48:50krux02there is a master?
13:48:52dom96I'll do it
13:49:35krux02I am so used that the master in Nim is called devel
13:49:39FromGitter<timotheecour> @dom96 @araq could that be the perfect time to do https://github.com/nim-lang/Nim/issues/8576 ?
13:51:11FromGitter<rufusroflpunch> > Added system.toOpenArray in order to support zero-copy slicing operations. This is currently not yet available for the JavaScript target.
13:51:13FromGitter<rufusroflpunch> wow!
13:51:43FromGitter<mratsim> if only \[\] defaulted to openarray now ;)
13:52:11dom96kaushalmodi: that should now be fixed too
13:54:00krux02regarding openarray, I think it is possible to tread any seq/string in the argument list of a function like an openarray.
13:54:21*vlad1777d quit (Ping timeout: 252 seconds)
13:54:31krux02meaning people can write functions like ``proc foobar(a: string)`` and it takes no copy substrings
13:55:18krux02but I would put it in the "it's neat if it's done" bucket. But it's not important for the moment at all.
13:55:21*nc-x quit (Quit: Page closed)
13:56:33FromDiscord<Zireael> I'm getting mad. I wanted to try out nim for an engine I'm using, but I can't grab nake... nimble install nake -n returns a git tlsv1 error 😦
13:56:48FromDiscord<Zireael> first day using nim btw, so how would I grab nake manually?
13:56:50FromGitter<timotheecour> > and it takes no copy substrings ⏎ ⏎ seems incompatible with nil-terminated strings (which is why I suggested nil-terminated strings should only be for string literals)
13:56:58krux02Araq: do you have any rough estimate on how many distinct symbols there are in the compilation of the nim compiler? I mean how many symbol IDs are there?
13:56:59FromGitter<mratsim> nake is usually not needed anymore @ Zireael
13:56:59FromDiscord<2vg> version 0.19.0! 🎉
13:57:15FromGitter<mratsim> you can just use nimble if you need tasks
13:57:30Araqkrux02, iirc about a million
13:57:51FromDiscord<Zireael> the bindings https://pragmagic.github.io/godot-nim/master/index.html tell me to use nake, so I want to use nake
13:57:59FromDiscord<Shield> nake didn't work for me
13:58:07FromGitter<kaushalmodi> @dom96 I am talking about the broken source/edit links on https://nim-lang.org/docs/cpuinfo.html
13:58:11FromGitter<kaushalmodi> they are still broken
13:58:15krux02I have a rough idea in my head to implement responsive completion like colorpicking in computer graphics.
13:58:20FromGitter<kaushalmodi> I thought docgen would need to be fixed to fix those
13:58:25FromDiscord<Zireael> anyway if it blows up due to tls it means any other git libraries won't work either, which is a main problem
13:58:32FromDiscord<Shield> oh right, just read what the nake script does and make a nim program instead, i did exactly that to generate godot's bindings
13:58:49FromGitter<codenoid> we need a corn
13:59:02dom96kaushalmodi: This file is missing in devel too
13:59:05dom96so I dunno what's going on
13:59:19krux02color picking is a technique where every distinct object is rendered in its unique color to an image that is usually not displayed.
13:59:30dom96Zireael: You don't need nake, just use Nimble files
13:59:40dom96or nimscript
13:59:41FromDiscord<Zireael> anyway I can't get the bindings themselves either, nimble install godot blows up with the same tls error
13:59:49krux02then when you interact with the scene, like lick on an object, the pixel is read from that image and the color says exactly what object it is.
13:59:56FromDiscord<Zireael> I'm on Nim 0.18.0
13:59:57krux02this can be done with compilation, too
14:00:04FromGitter<mratsim> compile with -d:ssl maybe
14:00:09dom96Zireael: this might help: https://github.com/nim-lang/nimble#troubleshooting
14:01:03FromDiscord<Zireael> I'm on Windows, so MacOS mumbo-jumbo doesn't need apply
14:01:15FromGitter<zetashift> ` Success: godot installed successfully.` @Zireael it's currently working for me I'm also on 0.18
14:01:33krux02the project is compiled and every character is mapped to a symbol id. Then the editor only needs to read the symbolid for that byte position in the file.
14:01:52krux02plus some diffing this could really be super responsive and reliable
14:02:09dom96Zireael: it might, if you have an old openssl dll
14:02:14FromGitter<kaushalmodi> @dom96 ⏎ ⏎ > so I dunno what's going on ⏎ ⏎ the paths are wrong. ... [https://gitter.im/nim-lang/Nim?at=5bace2e541177e0bc7b573c9]
14:02:18FromDiscord<Zireael> C:\Users\AdmKasia>nimble install godot
14:02:18FromDiscord<Zireael> Downloading https://github.com/pragmagic/godot-nim using git
14:02:18FromDiscord<Zireael> Error: unhandled exception: Unable to query remote tags for https://github.com/p
14:02:18FromDiscord<Zireael> ragmagic/godot-nim. Git returned: fatal: unable to access 'https://github.com/pr
14:02:19FromDiscord<Zireael> agmagic/godot-nim/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 al
14:02:20FromDiscord<Zireael> ert protocol version
14:02:22FromDiscord<Zireael> [OSError]
14:02:39FromGitter<zetashift> yikes pastebin it next time gitter/irc doesn't play well with discord code blocks
14:02:40krux02one million symbol ids still fit in one 32 bit integer.
14:02:41dom96kaushalmodi: that's not easily fixable
14:02:41FromDiscord<Zireael> C:\Users\AdmKasia>nimble install godot
14:02:42FromDiscord<Zireael> Downloading https://github.com/pragmagic/godot-nim using git
14:02:42*ash_worksi27 joined #nim
14:02:42FromDiscord<Zireael> Error: unhandled exception: Unable to query remote tags for https://github.com/pragmagic/godot-nim. Git returned: fatal: unable to access 'https://github.com/pragmagic/godot-nim/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
14:02:42FromDiscord<Zireael> [OSError]
14:02:53dom96zireael: please use a pastebin
14:02:53*ash_worksi27 quit (Remote host closed the connection)
14:03:19FromGitter<kaushalmodi> dom96: But should be fixed right? :) I didn't say "easily".
14:03:35FromGitter<kaushalmodi> It leaves a bad taste for new adopters if they find such broken links
14:03:40dom96yes, it should
14:03:44FromDiscord<Zireael> pastebin: https://pastebin.com/CeJ8iv59
14:03:47FromGitter<kaushalmodi> I believe almost all source/edit links are broken
14:04:02dom96oh, that's bad
14:04:03FromGitter<kaushalmodi> (or at least they should be removed till they start getting pointed correctly)
14:04:45FromGitter<zacharycarter> omg - gitter just caught up - for some reason I haven't seen any messages for the past 20 mins or so
14:05:06FromGitter<zacharycarter> krux02: I'm building quite a bit with the JS target these days - while I work on a new version of the playground and my personal website
14:05:29FromDiscord<Zireael> so the reason tlsv1 doesn't work is this: https://blog.github.com/2018-02-23-weak-cryptographic-standards-removed/
14:05:41FromGitter<zetashift> @Zireael this might be something with Git: https://github.com/glennhickey/progressiveCactus/issues/93
14:05:55FromDiscord<Zireael> unfortunately it was so long ago I forgot what changes I had to make to my sourcetree to make it work
14:05:59Araq@Zireael: 'nimble install godot' works for me
14:06:10Araqyou seem to be using an outdated git version
14:06:33*elrood joined #nim
14:07:11dom96Zireael: You need to update git and/or your openssl
14:07:55FromDiscord<Zireael> ouch, indeed - sourcetree seems to have embedded its own newer version
14:08:00FromDiscord<Zireael> rectifying it now
14:08:16FromDiscord<Shield> system docs still only have two atomic functions
14:08:16FromDiscord<Zireael> sorta glad I picked up Nim today, otherwise the problem would still be there undetected 😛
14:10:37FromGitter<kaushalmodi> @dom96 I have opened https://github.com/nim-lang/Nim/issues/9083 to focus on just fixing the Source/Edit links. Should such issues be tagged with a 0.19.1 milestone or similar?
14:12:00Araqthese links are not wrong, so they haven't been fixed
14:12:48Araqoh now they are, ok :P
14:13:44dom96kaushalmodi: showstopper label will do
14:13:56FromGitter<kaushalmodi> ok, I cannot add it, please do it
14:14:06FromGitter<kaushalmodi> Araq: That's what I have been saying since 12 days! :P
14:14:23AraqI thought it's about the devel vs master
14:14:35Araqedit should point to devel, view source to master, that one is not a bug
14:15:34FromGitter<kaushalmodi> Araq: Right, fixing this should fix both source/edit assuming master and devel have the same path hierarchy
14:16:21FromGitter<kaushalmodi> This is another regression I found yesterday in regenerating my Nim notes (the only regression from my snippet set): https://github.com/nim-lang/Nim/issues/9079
14:18:56dom96If someone wants a challenge: write a script that will find all such links in our docs and fix them :)
14:19:57*nc-x joined #nim
14:21:03FromGitter<kaushalmodi> dom96: I can easily do that (find the broken links, not fix :P) using a cli tool called `htmltest`: https://github.com/nim-lang/Nim/issues/8974#issuecomment-421579314
14:21:17FromGitter<kaushalmodi> Last time I ran it, I had 20k+ broken links
14:21:38FromGitter<kaushalmodi> probably half were because of not finding dochack.js on local doc builds
14:21:49*SenasOzys quit (Remote host closed the connection)
14:22:09*SenasOzys joined #nim
14:23:08dom96nc-x: You should now be able to speak
14:23:22elroodnoble attempt, kaushalmodi, i've mentioned broken links in the docs numerous times in the past, and ways to automatically check for those, but nobody seemed to really care
14:23:45nc-xThank you dom96
14:23:47nc-xAraq: "edit should point to devel". But well then the line numbers might change if file gets modified/removed/something else. Maybe point it at a commit in devel (The url you get when you press 'y')
14:24:19FromGitter<kaushalmodi> nc-x: need to consider line number change, file path change too
14:24:32dom96elrood: Mentioning ways is great, what's better is preparing a PR that will perform those checks :)
14:25:10FromGitter<kaushalmodi> dom96: I already got autocheck working.. https://github.com/nim-lang/Nim/issues/8974#issuecomment-421579314
14:25:23FromGitter<kaushalmodi> the autocheck crashes because of unescaped % in the URLs
14:25:43FromGitter<kaushalmodi> while most browsers support those, you don't typically put bare symbols in URLs
14:26:39FromGitter<kaushalmodi> For example, to have `%` literally in the link, you need to encode that as `%25`
14:26:46FromGitter<kaushalmodi> `%` happens to be the URL encoding prefix
14:26:49FromGitter<kaushalmodi> https://www.w3schools.com/tags/ref_urlencode.asp
14:29:34dom96Yeah, we should fix that
14:29:45FromDiscord<Zireael> @Shield so what did you do to eliminate using nake? I have nake installed but any nake commands complain that nake is unrecognized
14:29:56dom96yay for early morning US HN traffic
14:29:56stefanos82congrats to all folks who contributed to this new Nim release. Well done everyone +1
14:30:51Araqthe problem is that the docgen is freaking mess
14:31:11Araqso "don't have broken links in the docs" is easy to say, hard to fix
14:31:54Araqand the core problem here is that everything needs to be "configurable" so I have to read 3 to 5 different places at once to figure out how these links are produced
14:32:25Araqthe fact that I'm not the original programmer responsible for this code doesn't help
14:33:02Araqthe doc config system needs to be replaced with NimScript IMO
14:34:03Araqand ideally the documentation is full of hyperlinks to external projects like Nimble, popular Nimble packages...
14:34:12FromDiscord<Shield> @Zireael I meant look at the nake script and try to do the things it does manually, it's pretty simple, "godot.exe --gdnative-generate-json-api api.json" then call the genApi on it
14:34:26FromDiscord<Zireael> way over my head
14:34:50FromDiscord<Shield> it's really odd that the library needs to autogen the bindings insead of offering them
14:34:55FromDiscord<Zireael> anyway manually doing nim -c -r nakefile works, so why doesn't the 'nake' shortcut work?
14:35:07*Enigmagic11 joined #nim
14:35:42FromDiscord<Shield> nake exists in another folder, you need to set the PATH variable for it to call it like a command
14:35:55FromDiscord<Shield> use the full path
14:36:14livcdfunc is now an alias for proc <- the biggest change :D
14:37:06FromDiscord<Shield> nake is in "C:\Users\user name\.nimble\bin"
14:37:53*Enigmagic11 quit (Remote host closed the connection)
14:38:05FromGitter<kaushalmodi> > and ideally the documentation is full of hyperlinks to external projects like Nimble, popular Nimble packages ⏎ ⏎ Yeah, seems like the docgen needs to be a good static site generator
14:38:55*sooda22 joined #nim
14:39:43dom96So many spammers
14:42:47PMunchHaha, did you recognize him by his nick?
14:43:07dom96No, I can only see their messages
14:43:11dom96Because I have +o
14:43:17dom96They are constantly posting crap
14:43:30PMunchAh right
14:43:34dom96And now they're starting by choosing some random legit-sounding question
14:43:49dom96Like this one joined and said: "are there any means to get `std::hash` without including <functional> or <unordered_{multi,}{set,map} > ????"
14:44:12FromGitter<zetashift> The bots are getting smarter
14:44:22PMunchHaha, yeah that seems like bot speak
14:44:29leorizethey're copying stuff from other channels actually
14:44:43*Guest60373 joined #nim
14:44:46PMunchAah, that kinda makes sense
14:44:56FromGitter<zetashift> I just read the HN topic, the stdlib of Nim isn't that bad is it now?
14:45:13PMunchWhat would be smarter would lurk in a channel for a couple of days or grab something from reddit.com/r/<channel>
14:45:20PMunchThen it would at least be the same topic
14:45:45PMunchzetashift, it's a bit eclectic
14:48:34*Guest60373 quit (Remote host closed the connection)
14:48:37*onionhammer1 quit (Ping timeout: 246 seconds)
14:49:10PMunchSo now I should be able to see the spammers to?
14:51:17*tzui joined #nim
14:52:06*jonadab4 joined #nim
14:52:21*jonadab4 quit (Remote host closed the connection)
14:52:47planetis[m]congrats on the new release :)
14:53:25*francisl quit (Quit: francisl)
14:53:42FromGitter<cpunion> Can’t install nim 0.19.0 with choosenim.
14:53:56FromGitter<cpunion> (https://files.gitter.im/nim-lang/Nim/RaVl/image.png)
14:54:28FromGitter<cpunion> macOS 10.14
14:54:41FromDiscord<Shield> removing 0.18.0 from PATH and installing 0.19.0 still call the old version
14:54:41dom96weird
14:54:49dom96I built it successfully using 10.11
14:55:09PMunchOh cool, didn't notice we had a new release
14:55:22dom96cpunion: pretty sure this isn't a choosenim bug, report on Nim's github please
14:55:33FromGitter<cpunion> OK.
14:55:53leorizesomeone came here earlier today and complain about nim can't build a simple hello world on macOS Mojave
14:55:58*francisl joined #nim
14:56:14dom96cpunion: you can double check by following this: https://nim-lang.org/install_unix.html#manual-installation-from-source
14:56:31livcdleorize: i can check later at home
14:56:31FromDiscord<demotomohiro> I found typo in nim manual:
14:56:32FromDiscord<demotomohiro> https://nim-lang.github.io/Nim/manual.html#types-preminusdefined-integer-types
14:56:32FromDiscord<demotomohiro> uintXX
14:56:32FromDiscord<demotomohiro> additional signed integer
14:56:32FromDiscord<demotomohiro> This should be "additional unsigned integer"
14:56:45dom96PR :)
14:56:49FromDiscord<demotomohiro> ok
14:56:51*Praise20 joined #nim
14:57:03dom96leorize: That would suck :(
14:57:24leorizeI think it's a macOS problem...
14:58:08FromGitter<mratsim> I suddenly don’t want to update ...
14:58:13livcd:D
14:58:50FromGitter<Bennyelg> any thoughts ? https://github.com/nim-lang/Nim/issues/9082
14:58:51*Praise20 quit (Read error: Connection reset by peer)
14:58:57FromGitter<7sDream> Can we install choosenim via brew?
14:59:23FromGitter<mratsim> It’s probably better to install it in your user directory
14:59:47FromGitter<cpunion> Aha, workaround: `C_INCLUDE_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/ choosenim update stable`
14:59:57FromGitter<cpunion> (https://files.gitter.im/nim-lang/Nim/pbBp/image.png)
15:00:01FromDiscord<Shield> so calling nim -v reports 0.19 but calling it in my project folder reports 0.18, god I hate windows
15:00:21leorizecpunion: definitely macOS bug :P
15:00:34FromGitter<kaushalmodi> Shield: why not delete the old version first?
15:01:54FromGitter<cpunion> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacf0e2aedb375b9c561fc7]
15:02:12FromGitter<cpunion> @dom96
15:02:20leorizetry to build a simple "Hello world" in C
15:02:35livcdhmm I just git pull and go through the build process. Am I doing it wrong ?
15:03:02FromGitter<kaushalmodi> livcd: that would work too. I have been always building that way
15:04:36*m4ho3 joined #nim
15:05:46FromGitter<kdheepak> Hi all, when I run `choosenim update stable` I get the following: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacf1ca56877c463a921a5a]
15:06:32FromGitter<cpunion> ```code paste, see link``` ⏎ ⏎ @leorize `cc` works, `clang` fail. [https://gitter.im/nim-lang/Nim?at=5bacf1f8eba8e60bc6538717]
15:07:19FromGitter<cpunion> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacf22753c31c111172c84d]
15:07:47FromDiscord<Shield> windows is slow with updating the path variable
15:07:59FromGitter<kaushalmodi> Shield: restart?
15:08:03FromGitter<kaushalmodi> :P
15:08:19*m4ho3 quit (Remote host closed the connection)
15:08:22FromGitter<kaushalmodi> it's funny and sad at the same time that restarts "fix" things in Windows
15:08:51nc-xHmm.. usually you only need to open and close the terminal for path changes to take effect. Not restart PC
15:08:54FromGitter<kaushalmodi> on the other hand, my old RHEL 6.8 has had an uptime of may be a year now
15:09:00FromGitter<cpunion> Maybe it’s my problem.
15:09:06FromGitter<7sDream> It is the new MacOS that cause this compile failed? Just test on 10.13, works like a charm.
15:09:08FromGitter<cpunion> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacf294aedb375b9c562ac0]
15:09:39leorizeupdate your clang then
15:09:41*MSHughes joined #nim
15:10:58*stefantalpalaru joined #nim
15:11:13livcdkaushalmodi: that's a bit unfair. Restarts fix issues because people do not know and cant be bothered to investigate where the issue is :P
15:12:11FromDiscord<Shield> it works now, i recompiled fib.nim, it's really weird, compiling it the first time makes the program really slow, compiling it again will make it run the normal speed, these kind of things are what drive me mad
15:12:17FromGitter<kaushalmodi> livcd: I installed lastpass binary for Firefox, and the plugin asked me to restart
15:12:35FromGitter<kaushalmodi> It's not uncommon for software installs/updates to request restart on Windows
15:12:38*MSHughes quit (Killed (e (spam)))
15:12:50stefantalpalaruI'm getting a compile error for 0.19.0: ../lookups.nim(239, 35) Error: type mismatch: got <string> but expected one of: proc getIdent(ic: IdentCache; identifier: string): PIdent [...] expression: getIdent(toLowerAscii(x.s[0]) & substr(x.s, 1))
15:13:55livcdkaushalmodi: I suspect devs opt for an easy restart instead of trying to fix the experience. Easier than trying to cover all the edge cases.
15:13:57FromGitter<dom96> @cpunion yeah, that's a regression in our new release I guess
15:14:06FromGitter<dom96> or maybe the same happens for Nim 0.18.0
15:14:14FromGitter<dom96> in any case, report it on the Nim github repo if you haven't already
15:14:41FromGitter<dom96> include your workaround too
15:15:01livcdkaushalmodi: btw thanks for your nim notes :)
15:15:44FromGitter<kdheepak> I'm using a fresh install of nim ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacf42001fb5f4ae12f66b7]
15:15:57FromGitter<dom96> @kdheepak that sucks :( try looking for a libcrypto on your system, add a symlink that matches one of those names, for example: libcrypto.1.1.dylib or install it if it hasn't been installed yet
15:16:32FromDiscord<Shield> targetting C++ using nim 0.19 makes the program ask about libstdc++-6.dll
15:16:39FromDiscord<Shield> and where's nimcache
15:17:08FromGitter<kaushalmodi> livcd: Thanks! :) btw they are guaranteed to work 100% on 0.19.0 :)
15:18:44livcdI like your site. It's very very readable
15:18:59nc-xShield: You can use msvc compiler if you don't want dependency on libstdc++. Or maybe mingw has some switch for not having a dependency, idk.
15:19:04*SenasOzys quit (Remote host closed the connection)
15:19:17*SenasOzys joined #nim
15:19:40FromGitter<cpunion> @dom96 I installed `llvm` with `Homebrew`, so `clang` in llvm was called and failed. Just make `/usr/bin` first in `PATH`, the compilation succeeded. I think it’s not a bug of Nim.
15:20:17nc-xShield: nimcache path - https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory
15:20:44FromGitter<kaushalmodi> livcd: Thanks. Really happy to hear that (btw the way, I have got reports that the site crashes Android Chrome as it has a lots of DOM elements.. so might split up that page into sub pages when I get time)
15:21:11FromGitter<kdheepak> Shouldn't this be updated too: https://github.com/Homebrew/homebrew-core/blob/master/Formula/nim.rb
15:21:55*Trustable joined #nim
15:22:17*PMunch quit (Quit: Leaving)
15:23:14FromDiscord<Shield> thanks nc-x, I prefered when nimcache was local
15:23:32*Zevv joined #nim
15:23:35ZevvCongratulations!
15:24:03FromDiscord<Shield> what did happen between 0.18 and 0.19 to make it depend on libstdc++ tho
15:24:32*teus10 joined #nim
15:24:33FromGitter<kdheepak> I have the following file: /usr/local/lib/libcrypto.1.0.0.dylib
15:24:35FromGitter<kaushalmodi> Shield: You can force the nimcache switch in your nim.cfg
15:24:52FromGitter<kdheepak> so I'm not sure why it's not finding it
15:26:33*teus10 quit (Remote host closed the connection)
15:29:13FromDiscord<Shield> everything's fine now
15:29:14nc-xShield: So `nim cpp` on 0.18 did not depend on libstdc++? https://stackoverflow.com/questions/31449769/distribute-program-compiled-with-mingw-g I think mingw g++ always depends on them
15:30:10FromDiscord<Shield> yeah it didn't depend on it for the fib executable on nim 0.18, otherwise it'll complain like it did now
15:30:10nc-x-static-libstdc++ works maybe (https://stackoverflow.com/questions/14225083/linking-with-static-libstdc-flag-on-mingw-4-7-1)
15:30:11*nsf quit (Quit: WeeChat 2.2)
15:31:06stefantalpalaruthe "../lookups.nim(239, 35) Error: type mismatch: got <string>" error appears when compiling nimfix
15:31:37nc-xisn't nimfix dead?
15:32:08FromDiscord<Shield> https://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L3243
15:32:08FromDiscord<Shield> only two atomic functions are forward declared and atomics module has no docs
15:32:15nc-xhaven't heard about it since I started using nim which is about atleast half a year now.
15:32:33livcdhmm how do i pass the mingw switches in nim.cfg ?
15:33:16FromGitter<kaushalmodi> livcd: `nim --fullhelp | grep pass`
15:33:46FromGitter<kaushalmodi> sorry, nvm
15:33:58FromGitter<kaushalmodi> I guess you already know the switches and want to know how to set them in cfg?
15:35:07livcdyup
15:35:32FromGitter<kaushalmodi> I don't use nim.cfg, but I know how to set it in project directory config.nims
15:35:33FromGitter<kaushalmodi> https://nim-lang.org/docs/nims.html
15:36:23FromGitter<iffy> Does Nim have a combination grammar/parser? I've played with `pegs` and `strscans` and am now looking at `lexbase`, but I'm wondering if there's something like Python's excellent parsley library: https://parsley.readthedocs.io/en/latest/tutorial.html
15:37:37FromGitter<iffy> Also, the `Source` links from the docs to GitHub seem to be broken today: For instance, click on the `Source` link here: https://nim-lang.org/docs/parsesql.html#newNode,SqlNodeKind
15:38:25FromGitter<kaushalmodi> livcd: Here's an example of setting switches in nim.cfg: https://nim-lang.org/docs/nimc.html#cross-compilation-for-nintendo-switch
15:38:50FromGitter<kaushalmodi> @iffy The issue is known: https://github.com/nim-lang/Nim/issues/9083
15:39:04FromGitter<iffy> k
15:39:41livcdkaushalmodi: thanks. weird i found --pasC:".." but dunno if it actually works
15:40:19FromGitter<kaushalmodi> is that a typo here in IRC or you are quoting it verbatim from docs?
15:40:26FromGitter<mratsim> passC
15:40:33livcdtypo
15:40:55livcdand it works
15:41:09FromGitter<kaushalmodi> 👍
15:41:11livcdwas just passing linker flags to --passC:...ooops
15:42:23livcdjust wanted to try the --passL:"-static -static-libgcc -static-libstdc++"
15:43:14*shashlick quit (Remote host closed the connection)
15:45:06FromDiscord<Shield> how to make it compile with C++ from nim.cfg?
15:47:33nc-xWell atleast as a hack, you can modify this https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L141 (I think)
15:48:13nc-xsearch for `@if windows` in the file. There are many such locations where you can do the changes
15:50:43FromDiscord<Shield> it'll be nicer if you can change that in the configs, they're more convenient
15:52:33FromDiscord<Shield> btw, using -d:release still show line tracing in the source file
15:52:34nc-xYou might also be able to use `passc` in .nims using `switch(...)`. Dunno about .nim.cfg though
15:53:20nc-xMaybe create an issue on github for static linking libstdc++ in mingw. That might become the default configuration then,
15:54:25FromDiscord<Shield> --passL:"-static -static-libgcc -static-libstdc++" did the job
15:54:27nc-xAlso, I think nimscript, nimble, .cfg. There are too many ways for configuration. One needs to become the default and better get rid of the others.
15:55:08FromGitter<kaushalmodi> nc-x: I think nimscript is the recommended way (just that we cannot yet? create a global Nim config using .nims)
15:55:14FromDiscord<Shield> I find nim.cfg the simplest since it can affect a whole folder and works with sublime text
15:55:27FromGitter<kaushalmodi> and .nimble use NimScript
15:55:41FromGitter<kaushalmodi> config.nims affects the whole folder too
15:56:11FromGitter<kaushalmodi> Shield: See https://nim-lang.org/docs/nims.html
15:56:12FromDiscord<Shield> I'll try them
15:56:54*pink_mist4 joined #nim
15:57:02*Calinou joined #nim
15:57:10*pink_mist4 quit (Remote host closed the connection)
15:57:22FromGitter<kaushalmodi> Shield: The reason I love .nims is that I can code just as I do in Nim without .cfg syntax overhead
15:57:25FromGitter<kaushalmodi> example: https://github.com/kaushalmodi/hello_musl/blob/master/config.nims
15:58:22*TuxedoJack joined #nim
15:58:29*francisl quit (Quit: francisl)
15:58:52FromDiscord<Shield> i want somebody else to confirm this, -d:release does not remove line tracing
15:59:01*PMunch joined #nim
16:00:31nc-xWell according to https://github.com/nim-lang/Nim/blob/devel/config/nim.cfg#L55 , linetrace:off
16:01:32*TuxedoJack quit (Remote host closed the connection)
16:02:11FromGitter<kaushalmodi> Shield: How are you setting -d:release?
16:02:12nc-xI dunno what is linetrace so can't check any further :)
16:02:25FromGitter<kaushalmodi> are you typing it out manually on the command line?
16:03:22FromDiscord<Shield> it's more than that, -d:release in the config file will show you that it's the release build in the compilation message, but it's actually debug, using -d:release in the command line works the right way
16:03:48cavariuxI'm happy about the new release, my only doubt is, what was the reasoning behind moving the nimcache?
16:04:47FromGitter<kdheepak> @dom96 `nim compile ...` works but nimble doesn't
16:05:22FromGitter<kdheepak> Any help here will be appreciated. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bacffc153c31c1111732a17]
16:05:35FromGitter<kdheepak> I've installed `brew install openssl`
16:05:41FromGitter<kaushalmodi> Shield: `-d:release` cannot work in .cfg or .nims
16:06:11FromGitter<kaushalmodi> See the *Note* in that nims docs I linked above (I learned that recently too)
16:06:35FromGitter<kaushalmodi> > Note: In general, the define switches can also be set in NimScripts using switch or --, as shown in above examples. Only the release define (-d:release) cannot be set in NimScripts.
16:07:20FromGitter<kaushalmodi> cavariux: it doesn't add bloat to the src dirs
16:07:27*bezaban2 joined #nim
16:07:54FromDiscord<Shield> so release doesn't work in nims and cfg, but it still shows that it's making a release build, and all this time I thought I was doing the release build for my projects...
16:07:57FromGitter<kaushalmodi> you can easily `rm -rf $XDG_CACHE_HOME/nim`
16:08:08cavariuxkaushalmodi, what I'm more worried about is forgeting aboug it and nimcache using too much space in my home folder :/
16:08:15FromGitter<kaushalmodi> Shield: One apparent different you will see is the change in binary size
16:08:28FromGitter<kaushalmodi> do `-d:release` from command-line vs in .cfg
16:08:45FromGitter<kaushalmodi> set --nimcache to /tmp/nim in you .cfg
16:08:59FromGitter<kaushalmodi> s/you/your
16:09:05FromGitter<kaushalmodi> (i haven't tried it though)
16:09:07nc-xShield: Maybe open an issue for this as well. It might be possible to detect `release` defined in your config and maybe show a warning or atleast not print that it is working in release mode
16:09:12cavariuxI'm in windows :p
16:09:13*bezaban2 quit (Remote host closed the connection)
16:09:19FromGitter<kaushalmodi> I have actually just set XDG_CACHE_HOME to `/tmp/$USER/.cache`
16:09:54FromGitter<kaushalmodi> cavariux: you can dedicate any dir you like for cache
16:10:42FromGitter<kaushalmodi> haven't tried..
16:10:55FromGitter<kaushalmodi> can you set XDG_CACHE_HOME env var on Windows?
16:11:03FromGitter<kaushalmodi> does Nim respect that env var if you set it?
16:11:59FromGitter<kaushalmodi> nvm I see that for Windows it goes to $HOME/cache
16:12:00FromGitter<kaushalmodi> https://nim-lang.org/docs/nimc.html#compiler-usage-generated-c-code-directory
16:12:24FromGitter<kaushalmodi> s/$HOME\/cache/$HOME\/nimcache
16:13:29cavariuxI guess I could move it to the temo folder of windows
16:13:54cavariuxbut I'm not sure if windows cleans that folder periodically
16:15:15*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
16:18:05*tzui quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:21:52*jjido joined #nim
16:23:27*jjido quit (Client Quit)
16:24:25*tzui joined #nim
16:26:08*miran joined #nim
16:28:29FromGitter<kaushalmodi> cavariux: If Windows doesn't do it automatically, check out CCleaner
16:29:21FromGitter<kaushalmodi> https://www.ccleaner.com/ccleaner/features
16:31:16*gertvdijk joined #nim
16:31:22FromDiscord<demotomohiro> I also use windows and using ram disk. All files created on ram disk are gone everytime I reboot PC.
16:31:42FromDiscord<demotomohiro> It is like a tmpfs or /tmp on Linux
16:31:42FromGitter<dom96> Araq: this probably shouldn't 404: https://nim-lang.org/docs/c2nim.html
16:32:41*SenasOzys__ joined #nim
16:32:51*hethkar10 joined #nim
16:33:20*SenasOzys quit (Read error: Connection reset by peer)
16:33:44*revprez_stg1 joined #nim
16:34:13*hethkar10 quit (Remote host closed the connection)
16:34:31*tzui quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:36:00*gertvdijk quit (Remote host closed the connection)
16:38:03*revprez_stg1 quit (Remote host closed the connection)
16:38:10*SenasOzys__ quit (Ping timeout: 246 seconds)
16:39:34FromGitter<dom96> @kdheepak you need to check what .dylib file brew installed
16:41:34FromGitter<codenoid> hi @dom96 long time no c
16:42:10FromGitter<Bennyelg> @dom96 any idea why this happen ? https://github.com/nim-lang/Nim/issues/9082
16:44:47*SenasOzys joined #nim
16:45:15*PrimHelios quit (Quit: Leaving)
16:45:17FromGitter<dom96> no idea
16:45:19FromGitter<dom96> Check blame :)
16:46:24FromGitter<kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad096053c31c111173779f]
16:46:51FromGitter<kdheepak> How do I check all the paths nimble searches?
16:48:18krux02I just looked at the round function, it it takes an argument for decimal rounding
16:48:29krux02floating point numbers aren't stored decimal
16:48:45krux02that argument doesn't make a lot of sence for a core low level math operation.
16:50:05FromGitter<Bennyelg> Anyone tried ⏎ https://clickhouse.yandex/ ?
16:50:46*stefantalpalaru quit (Quit: Leaving)
16:51:03FromDiscord<Shield> I think it's because of the floating point precision, since it's just "round0(x*mult)/mult"
16:51:59*darithorn joined #nim
16:53:11FromGitter<kdheepak> Is this right? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad0af77bd81c5b9dc20aed]
16:56:05*nc-x quit (Quit: Page closed)
16:58:14FromGitter<kdheepak> Hmm. I tried this on my other mac, and it seems to work fine.
16:58:23FromGitter<kdheepak> I'm not sure what is going on on this machine.
16:58:36federico3Araq: there's no mention of RISC-V on https://nim-lang.org/blog/2018/09/26/version-0190-released.html - is it officially supported?
16:58:59FromGitter<mratsim> The fact that this concept works is just plain awesome: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad0c5301fb5f4ae1300f8a]
16:59:36FromGitter<kdheepak> @dom96 can you tell me where nimble searches for libcrypto?
16:59:53FromGitter<kdheepak> My other machine doesn't even have libcrypto installed from brew, and it seems to work on there.
16:59:57FromGitter<kdheepak> Not sure what is going on.
17:02:20*dkp2 joined #nim
17:04:38*dkp2 quit (Read error: Connection reset by peer)
17:05:04*riidom joined #nim
17:06:56*adelrune joined #nim
17:07:16*floppydh quit (Quit: WeeChat 2.2)
17:07:59FromGitter<Bennyelg> 1) 19.0 fantastic release.
17:09:26FromGitter<dom96> @kdheepak what macOS versions are you running on those machines?
17:09:41FromGitter<dom96> Typically the .dylibs are found in your PATH
17:11:17FromGitter<dom96> try `export DYLD_LIBRARY_PATH="/usr/local/lib"`
17:11:40FromGitter<dom96> It's up to the OS to find these, not Nimble
17:12:01FromGitter<dom96> Nimble just says "give me libcrypto.dylib or libcrypt.1.1.dylib ... etc"
17:12:50*Calinou joined #nim
17:14:30cavariuxdom96 nim should gc the nimcache folder :p
17:14:59cavariuxserious note: where do you find more apropiate to put the cache path in windows?
17:16:37FromGitter<kaushalmodi> why not just use the temp files dir?
17:16:54FromGitter<kaushalmodi> there are many ways online that show how to auto-delete stuff from there: https://www.easeus.com/recover-deleted-files/automatically-delete-temp-files.html
17:17:22cavariuxI'm currently using it, and also nim and nimble uses the temp dir for some common compilations
17:17:32cavariuxbut wanted to know if dom96 had other idea
17:18:13FromGitter<kaushalmodi> understood
17:18:25FromGitter<tim-st> I think golang doesnt gc the cache files too
17:18:55miranshouldn't nimcache files be in ~/.cache/nim ?
17:18:58FromGitter<tim-st> well they have a `clean` command
17:19:16cavariuxtim-st I was joking there, there's no point in a compiler gc the cache files haha, but I agree a clean command would be neat
17:19:16miranbecause now i see that i have lots of nim-related stuff all over ~/.cache
17:19:28*mr_yogurt quit (Max SendQ exceeded)
17:19:53*mr_yogurt joined #nim
17:19:58*tzui joined #nim
17:20:03FromGitter<tim-st> on windows it's `$HOME\nimcache\`
17:20:05miranfor example, now it is not easy to delete all nim-related files at once.
17:20:10cavariuxmiran you can change it changing the $XDG_CACHE_HOME variable in posix
17:20:30mirani must carefully open every folder to see if it is or isn't related to nim
17:20:48FromGitter<tim-st> on windows it's easy, I can just delete `nimcache`
17:21:28cavariuxmiran also the docs says that it should be ~/.cache/nim/$projectname(_r|_d) on Posix
17:21:41miranthese are some relatively old files/folders. is maybe this sorted out in v0.19 so it leaves more tidy ~/.cache?
17:21:48FromGitter<tim-st> maybe it's a bug on posix
17:22:11FromGitter<mratsim> wow people are creating impressive stuff in Nim in stealth mode: https://news.ycombinator.com/item?id=18085914
17:22:13FromGitter<tim-st> but not sure why people always figure these things out after the release :\
17:22:20FromGitter<tim-st> :D
17:22:39mirancavariux: i have ~/.cache/nim and inside of it are folders from today when i updated to v0.19
17:22:56miranlet me see if i run some file from my project where it will finish
17:23:37mirannope, still a mess
17:24:03mirani've compiled called `day01.nim`, and it created ~/.cache/day01_d folder
17:24:10FromGitter<tim-st> maybe on posix a trailing `\` is needed to be recognized as a folder, but just a guess
17:24:34cavariuxhmm that's weird, I would expect some bugs in windows but irc dom96 and araq work on macos
17:24:43FromGitter<mratsim> no Araq uses windows
17:25:13FromGitter<mratsim> @tim-st we should have a path distinct string ...
17:25:18miranhmmmm https://github.com/nim-lang/Nim/issues/8599
17:25:44miranis should be fixed but it seems it isn't
17:26:26FromGitter<mratsim> works for me, but I’m still on a devel from last week
17:26:53*Jesin quit (Quit: Leaving)
17:27:14FromGitter<kaushalmodi> miran: what'
17:27:21FromGitter<kaushalmodi> what's your OS?
17:27:29FromGitter<kaushalmodi> cache works as expected for me: https://ptpb.pw/6r9l/text
17:28:08*vlad1777d joined #nim
17:28:17FromGitter<tim-st> I compiled my code with 0.19 and had no problems :)
17:28:56*SenasOzys quit (Ping timeout: 252 seconds)
17:29:18miranhmmm, so nobody can reproduce this :/
17:29:33FromGitter<tim-st> which os do you have? linux?
17:29:35mirani'll open an issue regardless
17:29:40miranyeah, manjaro linux
17:30:02FromGitter<tim-st> manjaro is good, would use it too, if they recognize energy is a thing
17:30:19miranenergy? what do you mean?
17:30:25FromGitter<tim-st> battery
17:30:35miraneh, i'm using desktop
17:30:45FromGitter<tim-st> I can run manjaro inside windows 7 and it uses less energy than running it native
17:30:48deependbrowsing nim-lang.org/docs, the source links all seem to be dead
17:31:12deependhttps://github.com/nim-lang/Nim/tree/master/terminal.nim#L127
17:31:20FromGitter<kaushalmodi> miran: Can you check if setting $XDG_CACHE_HOME helps?
17:31:22mirandeepend: there is already open issue about that
17:31:43deependok
17:32:01miran@kaushalmodi please tell me exactly what to check and what to do. i'm not very familiar with env variables
17:32:13FromGitter<kaushalmodi> `echo $XDG_CACHE_HOME`
17:32:21FromGitter<kaushalmodi> looking at this code: https://github.com/nim-lang/Nim/blob/devel/compiler/options.nim#L516
17:32:30cavariuxmiran I was about to link you to an issue related until I saw narimiran was the author haha
17:32:37FromGitter<kaushalmodi> it should have created the `/nim` subdir.. so I am surprised
17:32:43mirancavariux: ;)
17:32:55miran@kaushalmodi nothing is printed!
17:33:10FromGitter<kaushalmodi> hmm, so it is not set
17:33:20FromGitter<codenoid> is nim have something like http://crystalshards.xyz/
17:33:22FromGitter<kaushalmodi> so it should default to the second arg of `getEnv`
17:33:32FromGitter<kaushalmodi> wondering if there's a bug there..
17:33:42FromGitter<kaushalmodi> are you using bash?
17:33:49FromGitter<kaushalmodi> ^ miran
17:33:56miranfish
17:34:13FromGitter<kaushalmodi> hmm, does it understand `export` command?
17:34:28FromGitter<kdheepak> @dom96 I'm running High Sierra on the one that works (10.13.6)
17:34:34FromGitter<kaushalmodi> try `export XDG_CACHE_HOME=~/.cache`
17:34:36FromGitter<kdheepak> I'm running Sierra on the one that doesn't work.
17:34:48FromGitter<kaushalmodi> from that same terminal then run a nim compilation
17:34:57FromGitter<kaushalmodi> does it *then* create the `nim/` subdir?
17:36:33FromGitter<kaushalmodi> miran: well, that logic works fine.. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad1521aedb375b9c572629]
17:36:45FromGitter<kdheepak> @dom96 There are no matching results for crypto in nimble? I used github search and found no results (https://github.com/nim-lang/nimble/search?q=crypto&unscoped_q=crypto)
17:36:48mirani exported it, but now there are no cache files, not in .cache, not in .cache/nim !?
17:37:16FromGitter<kaushalmodi> what does `echo $XDG_CACHE_HOME` say now?
17:37:29miran~/.cache
17:37:35FromGitter<kaushalmodi> what do you get when you eval the above snippet?
17:38:46miran`/home/miran/.cache/nim` (twice)
17:39:02*Jesin joined #nim
17:39:06FromGitter<kaushalmodi> umm.. check your nim.cfg
17:39:10FromGitter<kaushalmodi> anything funny in there?
17:39:23FromGitter<kaushalmodi> betting that that's the case :P
17:39:36FromGitter<mratsim> @codenoid nimble.directory
17:39:47FromGitter<mratsim> https://nimble.directory/
17:39:55miranthere is no nim.cfg file in that folder
17:40:09miranin that project folder where i run those files
17:40:27FromGitter<kaushalmodi> I mean in your `~/.config/nim` (if you have any)
17:40:55FromGitter<kaushalmodi> if not that, then I am out of ideas.. I'll follow that issue of yours as I am curious
17:40:58miranand now the file i've used to run that `getenv` is put once again in .cache
17:41:11*SenasOzys joined #nim
17:43:14FromGitter<codenoid> umm actualy, nimble init ask me a lot of question
17:43:30FromGitter<kaushalmodi> @codenoid that's an update!
17:44:10FromGitter<codenoid> so, how i can update nim with nimble
17:44:20FromDiscord<Shield> I'd like some help with macros
17:44:21FromGitter<mratsim> e choosenim update stable
17:44:26FromGitter<mratsim> use*
17:44:30FromGitter<codenoid> i just install nim and it's still 0.19
17:44:35FromGitter<codenoid> ok
17:44:42FromGitter<mratsim> but 0.19 is the latest
17:44:46FromGitter<Clyybber> lol
17:44:48FromGitter<mratsim> it’s out since today
17:45:17FromGitter<kaushalmodi> lol
17:45:21FromGitter<codenoid> ```$ choosenim stable ⏎ Info: Version 0.19.0 already selected ⏎ ``` [https://gitter.im/nim-lang/Nim?at=5bad1730aedb375b9c5734d2]
17:45:27FromGitter<mratsim> @Shield can’t help will be back in 50 min
17:45:40FromGitter<mratsim> @codenoid you have the latest version already
17:45:54FromDiscord<Shield> okay I'll wait
17:46:01FromGitter<codenoid> '-'
17:46:33FromGitter<codenoid> i thought the latest version is 0.19.1
17:46:43FromGitter<mratsim> 1) 19.1 is the current devel
17:46:57FromGitter<mratsim> odd minor for devel and even for stable release
17:47:09miranno, 0.xx.1 is devel version. until today it was 0.18.1
17:47:55FromGitter<mratsim> @Shield you should ask away anyway, I’ll see the history when I’m back, maybe someone will unblock you in the mean time
17:49:40krux02dom96, I saw some activity from you in the design how math.round behaves today so maybe some attention from you on this PR: https://github.com/nim-lang/Nim/pull/9089
17:50:32*tzui quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:50:58*tzui joined #nim
17:51:57FromGitter<codenoid> is nim have mongo driver
17:52:26*Trustable quit (Remote host closed the connection)
17:52:35FromDiscord<Shield> I want a macro which will add blocks to the definition of a procedure, something like add_block("proc_name"):block which will modify the proc accordingly, preferably with an extra parameter "priority" which will be used to sort the blocks before inserting them
17:52:58FromGitter<Clyybber> @mratsim Do you know why exactly https://github.com/nim-lang/Nim/issues/6348 was closed?
17:53:05FromGitter<Clyybber> It seems like it still fails
17:54:18*tzui quit (Client Quit)
17:57:10FromGitter<kdheepak> @dom96 I solved it by adding the following: `export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:$(brew --prefix openssl)/lib` to my path
17:57:42FromDiscord<niv> hello! great work on shipping 0.19. really nice release.
17:58:28FromGitter<codenoid> NiGui is cool
17:59:17*francisl joined #nim
18:00:47*metsjeesus25 joined #nim
18:01:20FromDiscord<niv> i have a question. `($Args["--add-restypes"]).split(",").mapIt(a.split(":"))` worked fine on 0.18. 0.19 now requires `($Args["--add-restypes"]).split(",").map do (a: string) -> seq[string]: a.split(":")` .. why?
18:01:49FromGitter<zacharycarter> does anyone know if gara - is a replacement for ast_pattern_matching?
18:01:59*wh0pie joined #nim
18:02:00FromGitter<zacharycarter> in other words - can gara be used to pattern match AST as well?
18:02:44*metsjeesus25 quit (Remote host closed the connection)
18:03:47miranthose of you who like the new release: https://old.reddit.com/r/programming/comments/9jdfwe/nim_version_0190_released/ please write it publicly ;)
18:04:35FromGitter<dom96> @kdheepak glad you got it fixed! Please report this as an issue on the Nimble repo, include your macOS version and any other details you think are relevant.
18:06:10*wh0pie quit (Remote host closed the connection)
18:08:11FromDiscord<niv> also, another question: i've had the habit of creating custom `write` procs for my own types (i.e. proc write*(io: Stream, t: MyType)). that used to work in 0.18, but now the generic one in streams.nim appears to shadow my custom writers. is this intended? have i been doing things wrong all the time?
18:13:18*pjb16 joined #nim
18:14:37FromGitter<kaushalmodi> niv: If there's a regression, then you should open an issue I think. btw did `a.split` in mapIt work before? or did you mean `it.split`? (that doesn't work either)
18:15:06FromGitter<kaushalmodi> niv: Are you basically trying to parse `"a:bc,d:ef,g:hi"` ?
18:15:27*abm joined #nim
18:15:48FromGitter<vivekimsit> I would like to know which editor you all use?
18:15:49*pjb16 quit (Read error: Connection reset by peer)
18:15:54FromGitter<vivekimsit> I use vscode and vim
18:15:54Araqniv: please open bug reports, even if we tell you "It's now this way" this change needs to be communicated/documented
18:15:55FromGitter<kaushalmodi> Emacs
18:16:06FromGitter<vivekimsit> :(
18:16:09FromDiscord<niv> sorry, it.split, yes. typo when i made that example. that used to work before.
18:16:16miranvscode with vim keybindings :)
18:16:17FromDiscord<niv> and correct on what i'm parsing.
18:16:30FromGitter<vivekimsit> @miran that would work
18:16:33FromDiscord<niv> i'll create tickets then
18:16:44FromGitter<vivekimsit> does it support autocompletion?
18:16:57miran@vivekimsit yes it does
18:17:14FromGitter<kaushalmodi> niv: yeah, looks like a bug from this example: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad1eaa7bd81c5b9dc2989b]
18:17:16miranyou install Nim extension and you're ready to go
18:17:35FromGitter<kaushalmodi> uncommenting the last echo in there gives: ⏎ ⏎ > Error: type mismatch: got <seq[string]> but expected 'string = Alias'
18:17:59FromGitter<kaushalmodi> but.. the type of `it` is string, not `seq[string]`
18:18:37FromGitter<vivekimsit> installing...
18:19:11miran@kaushalmodi @niv put it inside of parantheses and it works
18:19:18miran`echo ("a:bc,d:ef,g:hi".split(",")).mapIt(it.split(":"))`
18:19:27*krako joined #nim
18:19:47FromGitter<vivekimsit> ```code paste, see link``` ⏎ ⏎ this compiles [https://gitter.im/nim-lang/Nim?at=5bad1f43691dc567dbb264e3]
18:20:04FromGitter<vivekimsit> but not this `this.properties.getOrDefault(name, newSection())`
18:20:07FromGitter<kaushalmodi> miran: I get the same error
18:20:26FromGitter<kaushalmodi> I am on Nim built with f6c5c636bb1a1f4e1301ae0ba5a8afecef439132
18:20:27FromGitter<vivekimsit> sorry
18:20:35FromGitter<vivekimsit> this is correct method: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5bad1f7341177e0bc7b73a87]
18:20:38miranouch, i have used devel, not 0.19
18:20:41FromGitter<vivekimsit> proc getSection*(this: Ini, name: string): Section = ⏎ return this.sections.getOrDefault(name) ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5bad1f79fe3778111008c5da]
18:20:44miranit fails in 0.19 indeed
18:21:11FromGitter<kaushalmodi> when did you last build devel?
18:22:05miranaaaand, that explains my error with cache
18:22:21mirani have installed the newest stable, but i didn't use it. time to close that issue
18:22:22FromGitter<kaushalmodi> :P
18:22:41*shashlick joined #nim
18:23:16FromGitter<mratsim> @Clyybber use —newruntime (or whatever the flag is called now)
18:23:26miranthe moral of the story: kids, don't be stupid like miran!
18:23:33krakoHi everyone ! I'm new to nim-lang and nim community. To start learning the nim language, I want to code a CLI app like fzf (https://github.com/junegunn/fzf). Can it be done with Nim ?
18:23:36FromGitter<vivekimsit> @miran how do you run tests on saving changes?
18:23:57miran@vivekimsit which tests?
18:24:22FromGitter<mratsim> @vivekimsit use Travis/Appveyor, and trigger a build at each commit
18:24:41FromGitter<kaushalmodi> he's asking how to run nimble test or whatever on local buffer saves
18:24:43miranthere is some "nim: check project" function of the nim extension, but i have never used it, i don't know what does it do
18:25:17FromGitter<kaushalmodi> *could have simply triggered a fn on `after-save-hook` in Emacs.. just saying*
18:25:18FromGitter<mratsim> @krako sounds like a nice project. The basic rule is that if it can be done in C it can be done in Nim
18:25:55FromGitter<vivekimsit> @mratsim I am talking about running unit tests on my local machine
18:26:03FromDiscord<niv> kaushalmodi: wandered off to create a ticket, sorry. didn't follow chat. https://github.com/nim-lang/Nim/issues/9093
18:26:03FromGitter<vivekimsit> sorry but its a vscode specific issue
18:26:21FromGitter<mratsim> @Shield if you still have your macro issue, ask away
18:26:21FromDiscord<niv> and https://github.com/nim-lang/Nim/issues/9091
18:27:50*TheLemonMan joined #nim
18:28:07miran@vivekimsit sorry i cannot help you with that, i've never had a code where i would have to run unit tests after each save
18:28:47shashlickhello
18:28:56FromGitter<mratsim> @vivekimsit the easiest is to define a `nimble test` task and run it.
18:29:57TheLemonManyo Araq I revived nimfix in #9094
18:30:05FromGitter<mratsim> Something like this: https://github.com/numforge/loop-fusion/blob/master/loopfusion.nimble though I have to update to 0.19 due to nimcache change
18:30:18FromGitter<iffy> Where are the docs for the `do` notation?
18:30:42FromGitter<mratsim> do just replaces a comma
18:30:58FromGitter<vivekimsit> @mratsim let me check that, I just shifted from vim to vscode so still new to this ecosystem
18:31:02FromGitter<mratsim> you can do foo(a, b) or foo(a) do: b
18:31:06krakoDo I need two threads for the job or async code could do it ? (One thread for the main script and one that filter a list based on user input)
18:31:29FromGitter<iffy> @mratsim is that documented somewhere?
18:31:30FromGitter<kaushalmodi> @iffy https://nim-lang.org/docs/manual.html#procedures-do-notation
18:31:35FromGitter<mratsim> @vivekimsit it’s not vscode specific, it works in all editors, ef you hav an integrated terminal
18:31:36FromDiscord<Shield> how do I convert an untyped body to a NimNode?
18:31:42FromGitter<iffy> ah, not the tutorial
18:31:44FromGitter<iffy> thanks
18:32:05FromGitter<mratsim> @Shield, macros automatically converts all parameters to NimNode except the static one
18:32:09FromGitter<vivekimsit> I then don't know about it
18:32:29FromGitter<kaushalmodi> @iffy also see my notes https://scripter.co/notes/nim/#do-notation
18:32:33FromGitter<mratsim> `macro foo(a: untyped): untyped` will give you a in NimNode form
18:32:36*umaxx19 joined #nim
18:32:58FromGitter<mratsim> use a.treerepr to make sense of it
18:33:13TheLemonMangetting nimfix to replace all the isNil for you would be nice
18:33:21krakoDo you think I could code my fzf project with just the standard lib or I'll need external libs ?
18:35:59*umaxx19 quit (Remote host closed the connection)
18:36:34FromDiscord<Shield> I can't seem to get this right, I want to create an stmtList(), then add the untyped body to it
18:36:58FromGitter<mratsim> @krako checking the go dependencies: https://github.com/junegunn/fzf/blob/master/glide.yaml isatty is probably something related to terminal, you have the terminal module in stdlib, runewidth related to utf8, you can import unicode it has Rune type, shellwords: not sure, tcell: not sure, crypto: not sure what it is used for in a fuzzer, if it’s murmurhash or minxish, check what @bung87 released just yesterday
18:36:58FromGitter... https://github.com/Nim-NLP/minhash or use nimcrypto for more standard hash: https://github.com/cheatfate/nimcrypto
18:37:42FromGitter<kaushalmodi> niv: about that mapIt thing, sugar `=>` comes to the rescue
18:37:46FromGitter<mratsim> @Shield: macro foo(a: untyped): untyped = result = newStmtList(); result.add a
18:37:58FromGitter<kaushalmodi> ```code paste, see link``` ⏎ ⏎ > a of type seq[seq[string]] = @[@["a", "bc"], @["d", "ef"], @["g", "hi"]] [https://gitter.im/nim-lang/Nim?at=5bad2386691dc567dbb2833b]
18:38:36FromGitter<mratsim> mapIt(it.split(“:”)) would avoid allocating the anonymouse function though
18:39:00FromDiscord<niv> i don't really mind changing the code to suit a new paradigm. i'm more worried about it being a undocumented/unknown regression
18:39:10FromGitter<kaushalmodi> niv: I agree
18:39:21FromDiscord<niv> not really enthusiastic about surprises in software development :p
18:39:22FromGitter<kaushalmodi> I was just trying to find the most concise way that works right now
18:39:47FromGitter<mratsim> choosenim 0.18.0 ;)
18:39:54FromGitter<kaushalmodi> :)
18:40:01FromDiscord<niv> oh, i'm not upgrading to 0.19 :p just having a play
18:40:23FromGitter<mratsim> but if there is a lot of breakage we can have a 0.18.2 in a week
18:40:27FromGitter<mratsim> 1) 19.2
18:41:01FromDiscord<niv> im not too worried about the macro breakage. what worries me more is that suddenly my `write` proc isn't picked anymore. a problem in the generic system sounds more serious to my naive ears
18:41:31FromGitter<mratsim> Don’t worry, we have TheLemonMan, he eats generics for breakfast
18:42:51FromGitter<kaushalmodi> +1 for TheLemonMan/Boy
18:48:50FromDiscord<Shield> now how to inject the content of the nimNode in the body of a proc?
18:49:03*francisl quit (Quit: francisl)
18:49:03FromGitter<vivekimsit> cannot run the task, I am using this setting for tasks.json: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad261f41177e0bc7b76a61]
18:49:10FromGitter<vivekimsit> and I use fish shell btw
18:49:52*francisl joined #nim
18:51:04FromGitter<vivekimsit> anyways can someone help me with my query please?
18:51:19FromGitter<vivekimsit> I posted before
18:51:26FromGitter<vivekimsit> regarding default value
18:52:15FromGitter<mratsim> is your repo open source?
18:52:42FromGitter<vivekimsit> yes
18:52:54FromGitter<mratsim> avec a look here: https://github.com/status-im/nimbus/blob/master/.vscode/tasks.json
18:52:58FromGitter<vivekimsit> but changes are local right now
18:53:00FromGitter<mratsim> have a look*
18:53:39*cbaines8 joined #nim
18:53:59FromGitter<mratsim> make sure to have actual tests to run in tests/t* by default or override the test tasts in your project.nimble
18:54:24*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
18:54:38*Calinou joined #nim
18:55:32FromGitter<vivekimsit> sure will check that
18:56:03*Calinou quit (Remote host closed the connection)
18:56:18*Calinou joined #nim
18:57:00*nsf joined #nim
18:57:17FromGitter<vivekimsit> sorry guys but posting a long traceback: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad280d7bd81c5b9dc2ce5c]
18:57:42FromGitter<vivekimsit> I am doing this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad28258ddf5867dc831b8c]
18:57:52*cbaines8 quit (Remote host closed the connection)
18:59:00*solarnetone0 joined #nim
18:59:19FromGitter<mratsim> you’re passing an extra parameter
18:59:37*Ven`` joined #nim
18:59:48FromGitter<vivekimsit> but in the doc `proc getOrDefaultA, B (t: Table[A, B]; key: A; default: B): B`
18:59:59FromGitter<vivekimsit> I can pass a default value right?
19:00:18FromGitter<mratsim> I think the way to do the default parameter changed between 0.18 and 0.19, are you using the latest?
19:00:34*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
19:00:37FromGitter<mratsim> or the default param input was added in 0.19
19:01:27FromGitter<vivekimsit> no 0.18
19:01:35FromGitter<mratsim> update to 0.19 then
19:01:53FromGitter<vivekimsit> ok
19:02:55*solarnetone0 quit (Remote host closed the connection)
19:03:27FromGitter<vivekimsit> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad297f53c31c111174541a]
19:03:39FromGitter<mratsim> choosenim update stable
19:04:40*javier24 joined #nim
19:05:42FromDiscord<Shield> How can I pass a NimNode to a macro and add things to it? I get "Error: cannot add to node kind: nkSym"
19:05:49*javier24 quit (Remote host closed the connection)
19:07:01FromGitter<mratsim> use a proc not a macro to recive NimNode
19:07:06FromGitter<mratsim> receive*
19:07:39FromGitter<mratsim> you can check this library, it has a lot of examples on working with NimNode: https://github.com/numforge/loop-fusion
19:08:22FromDiscord<Shield> okay, thanks
19:08:24FromGitter<mratsim> Or this one is even simpler: https://github.com/SimonDanisch/julia-challenge/pull/3/files
19:09:03FromGitter<Bennyelg> heheh
19:10:04*Jesin quit (Quit: Leaving)
19:11:29FromDiscord<phelps> Hey, just found Nim and have a few questions about working with some system libraries on OS X
19:12:36FromDiscord<phelps> I have a project that uses the mach system libraries on OS X, does anyone here have experience with these and Nim?
19:12:54FromGitter<Bennyelg> @kaushalmodi i guess mapIt is related to this change evalOnceAs(s2, s, compiles((let _ = s)))
19:13:40FromGitter<mratsim> @phelps you can compile Nim to C, C++ or Objective C, as long as those libraries have such an interface you can use them
19:14:01Araqphelps, we have little OSX specific wrapper/libraries but read posix.nim to see how to interface with Posix
19:14:02FromGitter<mratsim> compile to and also load from*
19:14:26*francisl quit (Quit: francisl)
19:14:26FromDiscord<phelps> the project is currently in C
19:15:41*francisl joined #nim
19:16:30*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:19:21FromGitter<Bennyelg> Why I can't find anywhere anything about the usage of `{.inject.} pragma`
19:22:22FromGitter<kaushalmodi> @Bennyelg I don't understand most of the code in `mapIt` (not there yet).. so I just copied the authors based on git blame
19:23:08FromGitter<mratsim> @Bennyelg inject basically means replace the symbol there by the actual name taken from the parameter
19:23:37FromGitter<mratsim> look here: https://nim-lang.org/docs/manual.html#templates-identifier-construction
19:24:18FromGitter<mratsim> you replace “name” by myint
19:24:46*francisl quit (Quit: francisl)
19:24:47FromGitter<mratsim> note that if T and P were parameters they would also be replaced
19:26:26FromGitter<kaushalmodi> @mratsim based on experiments, looks like `mapIt` needs the op (outType) to be the same type as that of `it`
19:26:47FromGitter<kaushalmodi> mapIt code for ref: https://github.com/nim-lang/Nim/blob/f6c5c636bb1a1f4e1301ae0ba5a8afecef439132/lib/pure/collections/sequtils.nim#L663-L697
19:27:03Araqjust fyi, I'm fixing the documentation links
19:27:13FromGitter<kaushalmodi> woohoo!
19:27:20Araqor is there even more important things to do?
19:27:34FromDiscord<phelps> does anyone have experience compiling nim to a dylib?
19:28:03FromGitter<kaushalmodi> Araq: Will that fix the search locally too?
19:28:27Araqphelps: there is tests/dll and these tests are green
19:28:36Araqand show the required configuration
19:28:41FromGitter<mratsim> @kaushalmodi that doesn’t read like that. assume your op is (it + 1). ⏎ ⏎ the output type is type(it + 1).
19:28:56FromGitter<kaushalmodi> Araq: I can test using `htmltest` once you ping me
19:29:11FromGitter<mratsim> @phelps nim c —app:yourlib.dylib
19:29:24Araqkaushalmodi: what's wrong with the search? It requires ../dochack.js build from tools/dochack.nim
19:30:30FromGitter<kaushalmodi> Araq: I am doing `koch docs`
19:30:41FromGitter<mratsim> @phelps the main pifall is that after loading a nim dll, you need to do NimMain() to initialize the Nim runtime (even from another language). But I guess we need a blog post on that
19:30:42FromGitter<kaushalmodi> is there a manual step needed to get that .js?
19:31:04FromGitter<mratsim> @kaushalmodi ^ want to do some notes about Nim dynamic library?
19:31:16FromGitter<kaushalmodi> right now, locally, I get "Failed to load resource: net::ERR_FILE_NOT_FOUND dohack.js"
19:31:45Araqyeah
19:31:57Araqyou need to do:
19:32:04Araqnim js tools/dochack.nim
19:32:05FromGitter<kaushalmodi> @mratsim I don't have notes, just one toy project.. but that creates .so
19:32:09FromGitter<kaushalmodi> what is .dylib
19:32:16FromGitter<mratsim> the .so ofOS
19:32:23FromGitter<mratsim> of MacOS
19:32:27FromGitter<kaushalmodi> Araq: Aha! then we are missing that in the nightly docs deploy too
19:32:34FromGitter<mratsim> you can name dynlib both .so or .dylib on Mac
19:32:37FromGitter<kaushalmodi> let me try
19:32:37Araqcp tools/nimcache/dochack.js docs/
19:32:47Araqer, doc/ I guess
19:34:09FromGitter<kaushalmodi> @mratsim actually I have only used `--app:lib`: https://github.com/kaushalmodi/nim-emacs-module/blob/master/test/Makefile#L14
19:34:16*PrimHelios joined #nim
19:34:25FromGitter<kaushalmodi> *time to update that Makefile to config.nims*.. I did not know NimScript then
19:35:23FromGitter<mratsim> time to actually do something productive :P
19:35:32FromGitter<Bennyelg> @mratsim thanks.
19:36:07*yonkapin joined #nim
19:36:47FromGitter<kaushalmodi> Araq: I'll work through those js generation steps in few mins
19:36:55FromGitter<kaushalmodi> but.. should that be part of `koch docs`?
19:37:31Araqyeah
19:37:32*yonkapin quit (Remote host closed the connection)
19:38:28*tcsiwula joined #nim
19:39:56FromGitter<kaushalmodi> I'll send a PR to fix nightly docs soon
19:40:16*Nolan[m] joined #nim
19:40:20FromGitter<kaushalmodi> I had to add these 2 lines after koch nim: ⏎ ⏎ ```nim js ./tools/dochack/dochack.nim ⏎ cp -f ./tools/dochack/nimcache/dochack.js ./doc/.``` [https://gitter.im/nim-lang/Nim?at=5bad3224fe3778111009433d]
19:40:40FromGitter<kaushalmodi> s/koch nim/koch docs
19:41:04*tcsiwula quit (Read error: Connection reset by peer)
19:43:57*tay_ joined #nim
19:43:57Nolan[m]Hey, trying to evaluate Nim for a project I've been fighting with Rust over--namely, building a library usable via Wasm that needs to interface with some native C libraries. I'm trying to rapidly figure out whether this will work before investing lots of time in a rewrite. I grabbed a nim.cfg from the forums that claims to compile via Emscripten, but how do I pass compiler args (I.e. `-d:emscripten`) to `nimble build`?
19:44:56Nolan[m]Also, is there anything like a REPL that works with 0.19? I found inim but it doesn't seem to build.
19:45:03FromGitter<kayabaNerve> For the Nimble build task you should be able to use Nimscript.
19:45:06FromGitter<kayabaNerve> `nim secret`
19:46:07*PrimHelios quit (Ping timeout: 240 seconds)
19:46:52Nolan[m]Oh cool.
19:47:02AraqNolan[m], most projects need to be updated to work with 0.19
19:47:08Nolan[m]Why the odd name?
19:47:26*tay_ quit (Client Quit)
19:48:46Araqbecause it's unsupported
19:48:52*RifRaf joined #nim
19:48:52Nolan[m]Now to figure out how to do something like `nim build -d:emscripten`. I have a nim.cfg that claims to set things up correctly, I just need to test that.
19:48:59Nolan[m]Er, `nimble build`.
19:49:31FromGitter<kaushalmodi> Nolan[m]: nim.cfg is old way
19:49:37FromGitter<kaushalmodi> NimScript is the new way :)
19:49:50FromDiscord<exelotl> "The {.this.} pragma has been deprecated." oh no :(
19:50:00FromGitter<kaushalmodi> Using config.nims (NimScript), you can have `nim emscripten foo.nim` do what you want
19:50:15FromGitter<kaushalmodi> you just create a NimScript task named `emscripten` in the config.nims
19:50:56FromGitter<kaushalmodi> About NimScript task, here's an example: https://github.com/kaushalmodi/hello_musl/blob/master/config.nims
19:51:00Nolan[m]Hmm, wait, so I ran `nimble init <myprojname>` and got myprojname.nimble. Is that not how I should start a new package?
19:51:15FromGitter<kaushalmodi> yes, that's how you start a new package
19:51:39*RifRaf quit (Remote host closed the connection)
19:51:46FromGitter<kaushalmodi> .. but you don't have to use just `nimble` commands
19:52:21Nolan[m]Got it. Then I visited https://forum.nim-lang.org/t/2838 and grabbed that nim.cfg, placing it in the top-level directory.
19:52:49FromGitter<mratsim> @Nolan for emscripten, check out nimx or nimes (Nes emulator) or zengine, they all have emscripten support.
19:52:56Nolan[m]So that config is what I'd replace with nimscript?
19:53:15FromGitter<kaushalmodi> give me few minutes.. can give a quick untested sample
19:53:35FromGitter<mratsim> nim.cfg is fine tbh.
19:53:39Nolan[m]OK, cool, so folks are actually doing this and not just experimenting? :)
19:54:03FromGitter<mratsim> Nimx is used in production for the Reel Valley Fb + Android + iOS 5 stars game
19:54:45FromGitter<mratsim> https://yglukhov.github.io/Making-ReelValley-Overview/
19:55:08FromGitter<mratsim> Also we have a lot of interest at Status (Nim main sponsor) due to Ethereum moving to WASM
19:56:21FromGitter<kaushalmodi> Nolan[m]: Put this in `config.nims` in your project dir
19:56:30FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad35ee56877c463a941383]
19:56:49*francisl joined #nim
19:56:58FromGitter<kaushalmodi> docs for NimScript: https://nim-lang.org/docs/nims.html
19:59:42FromGitter<vivekimsit> @mratsim I also want to learn about blockchain, how to get started?
20:05:07Nolan[m]HmmHmm, so how do I compile with the `em` task? If I run `nim em src/waynav.nim` I see nothing but hints about which config file is being used. If I run `nim em c src/waynav.nim` I get `Error: arguments can only be given if the '--run' option is selected`.
20:06:27*booto15 joined #nim
20:07:12*booto15 quit (K-Lined)
20:07:15FromGitter<kaushalmodi> Nolan[m]: Try putting `setCommand("c")` at the very end, *inside* that task
20:09:26FromGitter<kayabaNerve> Araq not if you reinstall devel every 3 days.
20:09:38FromGitter<kayabaNerve> Or every commit...
20:09:50FromGitter<kayabaNerve> I don't. Just commenting about updating to 0.19.
20:10:00Nolan[m]Ah, thanks, that did it! One additional question, it seems `c` doesn't place its output in the current directory. Guessing I need to explicitly specify that? Seems a bit odd if so.
20:10:35FromGitter<kayabaNerve> What output? The nimcache or the bin?
20:11:05FromGitter<kaushalmodi> Nolan[m]: it places the binary in the same dir as the source .nim
20:11:18FromGitter<kaushalmodi> now this is a .nims so you can use the awesome procs from the nimscript module
20:11:44FromGitter<kaushalmodi> see `mvFile` etc from https://nim-lang.org/docs/nimscript.html#mvFile,string,string
20:11:58Nolan[m]Ah, so it does. Thanks!
20:12:30*tzui joined #nim
20:12:46*tzui quit (Client Quit)
20:12:47FromGitter<kaushalmodi> though.. you might not be able to do mvFile etc *after* setCommand
20:13:05*scott_gonzalez11 joined #nim
20:13:09FromGitter<kaushalmodi> you you would need another task that calls `nim em ..` and then you do `mvFile` etc in that other task
20:13:17FromGitter<kaushalmodi> s/you you/though you
20:13:45Nolan[m]Cool, thanks for helping me get started!
20:13:46*scott_gonzalez11 quit (Remote host closed the connection)
20:13:59FromGitter<kaushalmodi> sure, play around with .nims, it's pretty flexible
20:16:30Nolan[m]And there we go, Hello world in wasm. :) Now to see if I can get the same thing running in JS packages.
20:16:42FromGitter<mratsim> @vivekimsit it depends at which level you want to learn: do you want to learn to program on the blockchain, to program a blockchain or learn something else?
20:17:06FromGitter<kaushalmodi> Nolan[m]: Make sure you write about such things as you learn and then publish somewhere
20:17:11FromGitter<kaushalmodi> like Nim forum or your blog :)
20:19:32Nolan[m]Will certainly do if I can get this working. I've had so many false starts on this that I hope Nim gets me somewhere. Rust was working out well until I tried exporting my Rust interfaces to JS, at which point it threw up because the community seems to be abandoning the Emscripten target which I need.
20:19:35Nolan[m]So back to the drawing board...
20:20:19*kipari18 joined #nim
20:21:40*skelett quit (Quit: WeeChat 2.1)
20:22:16FromGitter<zacharycarter> Nolan[m] - what are you trying to do? I have quite a bit of experience with A) the Nim JS target B) Nim and emscripten C) Nim and wasm via emscripten
20:23:09*kipari18 quit (Remote host closed the connection)
20:24:37FromGitter<zacharycarter> Rust is abandoning emscripten - because they have a LLVM target - which Nim does not
20:24:41FromGitter<zacharycarter> thus Nim needs another compilation step
20:25:02FromGitter<zacharycarter> but if you're goal is WASM w/ Rust - you shouldn't need emscripten
20:25:10FromGitter<zacharycarter> again - not sure what you're trying to do exactly
20:26:35Nolan[m]I'm using Spatialite, a C library, and creating a nicer interface around that to do some custom data processing. I then want to export that interface to JS, which gets wrapped in either a browser or mobile UI for geospatial analysis.
20:27:11FromDiscord<Shield> I'm still failing to pass the name of a NimNode and make it contain the Ast of a body
20:27:16FromGitter<zacharycarter> well - you won't be able to combine the JS and the C backend
20:27:23FromGitter<zacharycarter> they're not 1:1
20:27:25*trijntje26 joined #nim
20:27:29Nolan[m]Basically, I want to access Spatialite from either a browser or something like React Native to create an offline-capable mapping app. But I don't know the capabilities of my platforms yet, so I'm trying to keep my interface/development options open.
20:27:39FromGitter<zacharycarter> gotcha
20:28:21Nolan[m]I.e. I recently thought desktop browsers could interface with connected GPS hardware. Apparently they can't. Neither can browsers on ChromeOS. So I'm looking at wasm for mobile targets, but maybe native for desktop apps.
20:28:24FromGitter<mratsim> sounds fun. be sure to check Vega as well @Nolan: http://vega.github.io/ and what mapbox does, and maybe Superset: https://github.com/apache/incubator-superset
20:29:48Nolan[m]So what I need is a wasm library that creates a nicer interface around Spatialite. Rust is a non-starter, unless I want to port the entire Spatialite stack to Rust and use wasm32-unknown-unknown. :/
20:30:07*francisl quit (Quit: francisl)
20:31:16FromGitter<mratsim> @Nolan you should look into @Vindaar Neural network demo: https://github.com/Vindaar/NeuralNetworkLiveDemo, it combines C backend Arraymancer https://github.com/mratsim/Arraymancer with JS backend Plotly: https://github.com/brentp/nim-plotly
20:32:14Nolan[m]Thanks, will check all those projects out.
20:32:18FromGitter<zacharycarter> thoughts on this color palette for a personal website - http://colorpeek.com/#f4f7f4,778994,f0c743,b63b50,231926 ?
20:32:30FromGitter<zacharycarter> I want to kind of keep with a Nim(ish) theme
20:32:43FromGitter<zacharycarter> but still have some uniqueness
20:34:22*trijntje26 quit (Ping timeout: 244 seconds)
20:37:59FromGitter<bung87> why not developing base one electron
20:38:03FromGitter<bung87> on
20:38:23*miran quit (Ping timeout: 245 seconds)
20:39:56Nolan[m]Two reasons. First, I'll want to run this on mobile devices, and to my knowledge Electron doesn't work on mobile. Second, this is GPS navigation software for blind users, and Electron is inaccessible under Linux.
20:43:45FromDiscord<Shield> "static: var node = newStmtList()" makes it possible to add NimNodes to node when referred to it directly but I can't pass node as a variable for a macro or a proc to add an untyped body to it
20:44:28FromGitter<bung87> hmm have no idea about application for blind users, seems this is the major problem..
20:45:04Araq<kaushalmodi>: fixed and uploaded new docs
20:45:34FromGitter<kaushalmodi> thanks! And I have that PR for fixing dochack for devel docs
20:46:00FromGitter<kaushalmodi> the PR is passing (there's nothing it's doing to fail the tests)
20:46:07FromGitter<kaushalmodi> affect only before_deploy stage
20:46:27FromGitter<kaushalmodi> https://github.com/nim-lang/Nim/pull/9096
20:46:40copygirlAww, no `from module import thing as custom` D:
20:46:57*Vladar quit (Remote host closed the connection)
20:47:33copygirlI guess `as` is module renaming, not identifier.
20:48:14FromGitter<bung87> there’s a issue for this ,not implemented.
20:48:47FromGitter<kaushalmodi> Araq: Tested the Source/Edit fix to work perfectly in local build. Thanks!
20:49:31FromGitter<bung87> I tried once ,very new to nim at that time :)
20:54:06FromDiscord<Shield> help!
20:55:47Nolan[m]Are exporting enums to C still unsupported?
20:56:02*krako left #nim (#nim)
20:56:20AraqNolan[m], yeah and in fact header file generation is hardly supported at all
20:57:48Nolan[m]Not sure I'd need header generation, I just need symbols to be exported so Emscripten can see them.
20:58:35Nolan[m]So is there another data structure that might work in place of enums if I need C interop? Something like, say, the classic Direction enum with nort, northNortheast, etc.?
20:59:28*BlackBishop15 joined #nim
21:00:06AraqI think your best option is an {.emit: """...""".} in this case
21:00:41Nolan[m]Thanks, I'll read up on that.
21:01:02*BlackBishop15 quit (Remote host closed the connection)
21:01:35PMunchhttps://github.com/drujensen/fib ah, that's better. Now Nim is the fastest :)
21:01:51*jjido joined #nim
21:02:50FromGitter<mratsim> @Nolan, Electron works on Linux
21:03:30Nolan[m]mratsim: Not with my screen reader it doesn't. :)
21:03:42FromGitter<mratsim> @PMunch is Nim cpp backend so much faster than the C backend? Native exceptions?
21:03:47FromGitter<mratsim> Why*
21:04:03PMunchI have no idea, but when I tested it it was 16x faster than the C back-end
21:04:13PMunchHe apparently didn't see the same speed-up though
21:05:29PMunchhttp://ix.io/1nIG/Nim <- these are the results I get
21:06:22FromGitter<mratsim> mmm, I think there is some constant folding going on, that doesn’t make sense
21:07:35FromGitter<mratsim> why is crystal using uint32 :?
21:10:45federico3nim 0.19.0 is looking for /etc/nim/nim.cfg instead of /etc/nim.cfg
21:12:16FromGitter<tim-st> c uses long, is that an alias of int32?
21:13:29FromGitter<mratsim> not sure, it’s always confusing
21:13:33FromGitter<tim-st> btw why should nim be faster than cpp?
21:13:43FromGitter<tim-st> I mean nim with cpp backend
21:14:05*Kristine17 joined #nim
21:14:21FromGitter<tim-st> the only thing I can imagine is that there is a huge memory difference
21:14:29*Kristine17 quit (Remote host closed the connection)
21:14:54FromGitter<mratsim> Actually it might be because everyone else is using uint32 instead of uint64
21:15:25FromGitter<tim-st> wikipedia says long is signed and atleast of size 32
21:15:29FromGitter<mratsim> before all computations they would need to zero-extend the result number which adds additional cost
21:15:31FromGitter<tim-st> (in c)
21:15:45FromGitter<mratsim> the input not result
21:15:51FromDiscord<Shield> how to convert an untyped body to a NimNode so I can pass it to a proc?
21:17:21FromGitter<Bennyelg> @PMunch The mem section is annoying
21:17:23*mrshu quit (Remote host closed the connection)
21:17:29FromGitter<Bennyelg> this is not a test, mem is a mem
21:18:34PMunchBennyelg, mem section?
21:18:35*gangstacat quit (Quit: Ĝis!)
21:18:52FromGitter<ephja> do buffered sockets result in received data being copied twice?
21:18:57FromGitter<Bennyelg> (https://files.gitter.im/nim-lang/Nim/xavX/image.png)
21:19:20Araqephja, good question, I don't think we try to hard to avoid copies
21:19:28PMunchOh yeah, I was considering to add a Nim mem example
21:19:38PMunchIt's super easy to write and just as fast as the others
21:19:42FromGitter<Bennyelg> memoization shoud be enouge
21:19:45FromGitter<Bennyelg> should be*
21:19:49Araqkeep in mind that every caching layer in your CPU produces "copies"
21:23:55PMunchhttp://ix.io/1nIL/Nim <- there you go
21:24:06PMunchWith memorization
21:25:02FromDiscord<Shield> is there really no way to store an untyped body in a nimNode
21:25:30FromGitter<mratsim> @Shield I already gave you an example
21:26:18FromDiscord<Shield> whenever I try to store the result it gives me an error
21:26:32FromGitter<mratsim> @PMunch, it’s a bench on recursion :P I prefer the Haskell one though: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bad4b0898245f4ae093b3d0]
21:26:43FromGitter<mratsim> @Shield can you post a gist
21:29:47FromGitter<mratsim> ```code paste, see link``` ⏎ ⏎ ^ @Shield [https://gitter.im/nim-lang/Nim?at=5bad4bcaeba8e60bc6560c66]
21:34:35FromGitter<zacharycarter> would anyone be interested in a live stream of Nim web-dev?
21:34:55FromGitter<zacharycarter> at this point I have a hot-reloading JS / CSS site that I'm building as my personal website
21:35:03*PMunch quit (Remote host closed the connection)
21:35:05Araqlive streams are always fun :-)
21:35:21AraqI would watch it, if I can
21:35:37FromGitter<zacharycarter> okay - I think I'm going to spend some time at my parent's house this weekend - so I'll see what I can do as far as setting up a camera and recording
21:36:06FromGitter<zacharycarter> thanks for the encouragement :D
21:36:35*SenasOzys quit (Quit: Leaving)
21:36:53*SenasOzys joined #nim
21:37:54FromGitter<zacharycarter> I will try to start super early on Saturday morning - so that all Nimmers might have a chance to attend
21:38:43*bozaloshtsh left #nim ("Killed buffer")
21:38:46*bozaloshtsh joined #nim
21:40:24Araqwhat's that in UTC?
21:40:54FromGitter<zacharycarter> I just spoke with my rents, and they're fine with the idea - so let me set up a time and I'll send that info out and put out a tweet as well
21:40:56FromDiscord<Shield> @mratsim https://pastebin.com/XGaygUX3
21:42:22FromDiscord<Shield> I'm trying to make a nimNode which I can push blocks separately and get the whole result in the end
21:42:59*nsf quit (Quit: WeeChat 2.2)
21:43:07AraqShield, that's entirely possilbe (and also bad style, but ok)
21:43:31*guillom3 joined #nim
21:43:44*guillom3 quit (Remote host closed the connection)
21:45:16FromDiscord<Shield> can I get an example please? it's hard to translate a body to a nimNode that you can pass around to other nimNodes, "macro foo(body:untyped):untyped" seem to inject its code directly without a way to capture it, passing a nimNode to a macro doesn't work
21:46:12FromGitter<zacharycarter> https://calendar.google.com/event?action=TEMPLATE&tmeid=NDc1aGIyZGY3ZW8yM3ZtYnExN2oydTA2bzQgY2FydGVyemFAbQ&tmsrc=carterza%40gmail.com
21:47:03*abm quit (Read error: Connection reset by peer)
21:47:34FromDiscord<Shield> i'd really appreciate if there's a template where you can pass a block and will returns a nimNode
21:48:09FromGitter<zacharycarter> I need a better way to share this w/o giving out my email
21:48:15FromGitter<zacharycarter> over twitter
21:48:46*inhahe1 joined #nim
21:49:08FromGitter<zacharycarter> I guess there's not a better way
21:49:09FromGitter<zacharycarter> oh well
21:49:36FromGitter<zacharycarter> what I get for using google
21:50:09FromGitter<tim-st> when I call `len` on `UncheckedArray[char]` it uses the len of `cstring`? is it expected?
21:50:24FromGitter<tim-st> not every UncheckedArray is null terminated
21:50:27*abm joined #nim
21:51:21*gangstacat joined #nim
21:53:02FromGitter<tim-st> ah, I see, it does it because the underlying type is just an array and array is null terminated, so this "works" but is highly dangerous
21:54:09FromGitter<zacharycarter> https://twitter.com/Hahaitsfunny/status/1045431375476805632
21:54:11*inhahe1 quit (Ping timeout: 260 seconds)
21:54:12FromGitter<zacharycarter> in case anyone wants to RT
21:57:06*berendt_5 joined #nim
21:58:33FromGitter<zacharycarter> would someone be so kind as to check out the tweet - and see if the event link works for them? If not I'll work with something other than google calendar
21:58:55*berendt_5 quit (Remote host closed the connection)
21:59:53FromGitter<zetashift> the link works, but that page is confusing like hell
21:59:54FromGitter<mratsim> @Shield macro cannot receive NimNode, use proc for that
22:00:26FromGitter<mratsim> proc that have a Nimnode arg or return value have the same semantics as macros
22:01:17*flokli23 joined #nim
22:01:32*flokli23 quit (Remote host closed the connection)
22:02:21FromGitter<tim-st> is `cstring.len` O(n)?
22:02:45FromGitter<tim-st> (or is there some extra hidden field for length)
22:02:46FromDiscord<Shield> the problem is getting a macro to returna nimNode from an untyped body
22:03:16FromGitter<ephja> O(n)
22:03:36FromGitter<tim-st> thanks
22:04:43FromDiscord<Shield> something like var node = treeFromBlock(block)
22:06:18*inhahe27 joined #nim
22:07:41*inhahe27 quit (Remote host closed the connection)
22:14:12*lebarondemerde9 joined #nim
22:16:53*lebarondemerde9 quit (Remote host closed the connection)
22:17:52*elrood quit (Quit: Leaving)
22:19:24*wgrant25 joined #nim
22:20:57*twan_ joined #nim
22:21:39*krux02 quit (Remote host closed the connection)
22:21:45*Calinou quit (Quit: http://quassel-irc.org - Discuter simplement. Partout.)
22:23:35*wgrant25 quit (Remote host closed the connection)
22:25:10*twan_ quit (Remote host closed the connection)
22:28:32FromDiscord<Shield> solved it, but it's kinda convoluted that you need a temp nimNode and a macro to transform an untyped body to a nimNode
22:31:22Nolan[m]Can I get a variable's type in `nim secret`?
22:34:47Nolan[m]What I'm actually trying to do is figuring out the return type of a function that returns a sequence of tuples of the form (string, string, int).
22:35:11Nolan[m]But seq[tuple] doesn't seem to be it, unless I'm doing something wrong at the call site.
22:35:55cavariuxNolan maybe this could help you https://nim-lang.org/docs/tut1.html#advanced-types-tuples
22:37:02Nolan[m]RIght, I've seen that. I guess what I'm unclear on is whether or not I have to define function return types in a `type` block?
22:42:50FromGitter<kayabaNerve> Named tuples have their fields as part of the type.
22:44:01FromGitter<kayabaNerve> I think it's stupid. IMO, the idea of a named tuple is the names are for ease. Else, you would just just use objects.
22:44:25FromGitter<kayabaNerve> I think dom96 agreed with that, but Araq disagreed and said it fixed a lot of issues when you forced naming conventions.
22:45:28FromGitter<kayabaNerve> I forget dom's final stance...
22:47:16FromGitter<zacharycarter> @zetashift I don't have twitch / don't think I'll have time to troubleshoot / set it up before Saturday AM :/
22:48:25FromGitter<kaushalmodi> Nolan[m]: haven't tried.. don't typetraits work in nim secret?
22:50:21FromDiscord<Shield> so far it seems impossible to access a NimNode variable unless it's in the same static body, even then attempting to apply what's inside it yields an error "attempt to access a nil address"
22:50:58FromDiscord<Shield> I guess you can't make a global nimNode, fill it then use its content?
22:56:30*armdale9 joined #nim
22:58:02FromGitter<codenoid> 05:57am still coding with nim <3
22:59:18FromGitter<bung87> what project you work on?
22:59:45*kirkland15 joined #nim
23:00:16*armdale9 quit (Remote host closed the connection)
23:00:56*kirkland15 quit (Remote host closed the connection)
23:00:57*SenasOzys quit (Remote host closed the connection)
23:01:14*SenasOzys joined #nim
23:03:52*pips2 joined #nim
23:05:07*zama quit (Quit: leaving)
23:05:39*pips2 quit (Remote host closed the connection)
23:06:56FromGitter<dm1try> > What I'm actually trying to do is figuring out the return type of a function that returns a sequence of tuples of the form (string, string, int). ⏎ > But seq[tuple] doesn't seem to be it, unless I'm doing something wrong at the call site. ⏎ ⏎ Nolan, seq[(string, string, int)] ? [https://gitter.im/nim-lang/Nim?at=5bad6290cdc50131726383b3]
23:07:02*finnzi22 joined #nim
23:09:13*zama joined #nim
23:09:53FromDiscord<exelotl> uhhh I don't understand why this simple template usage isn't working https://gist.github.com/geckojsc/3d6a4a4c7b98b2e7d44ffb181429dc5c
23:10:37FromDiscord<exelotl> gives "Error: undeclared identifier: 'derp'"
23:10:48FromGitter<codenoid> social media bot @bung87
23:11:09*finnzi22 quit (Remote host closed the connection)
23:11:10FromDiscord<exelotl> but the template takes an untyped parameter so why would it check whether derp is defined?
23:15:27AlexMaxDoes Nim come with a build in way to embed a windows manifest.xml?
23:15:37FromGitter<bung87> ah I have done something in that domain
23:15:53FromGitter<zacharycarter> going to use twitch instead of hangouts for the broadcast Saturday morning - https://www.twitch.tv/zachary_carter
23:18:28*thomasross joined #nim
23:18:41AlexMaxHrm
23:18:57AlexMaxKoch just links in a .res/.o file directly...somehow\
23:19:12AlexMaxin order to apply an icon to an executable
23:32:21*Wessie16 joined #nim
23:37:02FromGitter<gogolxdong> cannot find reel valley in google play.
23:37:47*Wessie16 quit (Ping timeout: 240 seconds)
23:41:24FromGitter<zacharycarter> link seems dead
23:42:48FromGitter<zacharycarter> all I know is - I wish I had the city-build graphics that reel valley has - except sci-fi military and alien themed :P
23:44:11FromGitter<kdheepak> Some pages in the documentation are broken?
23:44:19FromGitter<kdheepak> https://nim-lang.org/docs/parseopt2.html
23:44:30FromGitter<kdheepak> How do I find the current page?
23:47:54*noonien quit (Quit: Connection closed for inactivity)
23:50:09*gangstacat quit (Quit: Ĝis!)
23:56:06*Apocalypse15 joined #nim
23:57:34FromGitter<kaushalmodi> Can you open an issue for that?
23:57:45FromGitter<kaushalmodi> Btw parseopt2 is deprecated
23:57:51FromGitter<kaushalmodi> Have a look at https://nim-lang.org/docs/parseopt.html
23:57:57FromGitter<kaushalmodi> That link works too.
23:58:12*Apocalypse15 quit (Remote host closed the connection)