00:03:46*adeohluwa quit (Quit: Connection closed for inactivity)
00:08:36*ipjk joined #nim
00:23:13*dyce[m] quit (Ping timeout: 246 seconds)
00:23:33*jivank[m] quit (Ping timeout: 255 seconds)
00:23:34*mindB quit (Ping timeout: 258 seconds)
00:23:34*MrAxilus[m] quit (Ping timeout: 258 seconds)
00:23:48*Demos[m] quit (Ping timeout: 240 seconds)
00:23:55*TheManiac quit (Ping timeout: 246 seconds)
00:23:59*ehmry quit (Ping timeout: 255 seconds)
00:24:07*Jipok[m] quit (Ping timeout: 240 seconds)
00:24:22*hohlerde quit (Ping timeout: 264 seconds)
01:06:49*couven92 joined #nim
01:23:58*Jipok[m] joined #nim
01:24:05*Jipok[m] quit (Remote host closed the connection)
01:25:50*chemist69 quit (Ping timeout: 246 seconds)
01:31:23*Jipok[m] joined #nim
01:36:00*ipjk quit (Quit: Leaving)
01:36:56*dyce[m] joined #nim
01:36:56*mindB joined #nim
01:36:56*MrAxilus[m] joined #nim
01:36:56*Demos[m] joined #nim
01:36:57*ehmry joined #nim
01:37:04*jivank[m] joined #nim
01:37:04*hohlerde joined #nim
01:37:04*TheManiac joined #nim
01:39:52*chemist69 joined #nim
01:40:34*couven92 quit (Ping timeout: 255 seconds)
01:43:07*sz0 joined #nim
01:45:32*yglukhov joined #nim
01:49:32*mahmudov quit (Ping timeout: 240 seconds)
01:49:56*yglukhov quit (Ping timeout: 255 seconds)
02:02:51*sz0 quit (Quit: ZNC - http://znc.in)
02:13:28*sz0 joined #nim
02:13:55*Nobabs25 quit (Quit: Leaving)
02:43:07*dddddd quit (Remote host closed the connection)
02:44:35def-pri-pubzacharycarter: I've got another one (or two) for you on the issue tracker
03:03:01*sz0 quit (Quit: ZNC - http://znc.in)
03:05:20*arnetheduck joined #nim
03:06:40*sz0 joined #nim
03:09:57*arnetheduck quit (Ping timeout: 260 seconds)
03:11:57FromGitter<zacharycarter> @define-private-public: starting on a website now
04:01:05*Nobabs27 joined #nim
04:01:33*Nobabs27 quit (Remote host closed the connection)
04:02:03*kalexm joined #nim
04:06:05*kalexm quit (Ping timeout: 240 seconds)
04:45:35*adeohluwa joined #nim
04:53:21FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/fxDX/Screen-Shot-2017-08-13-at-12.52.36-AM.png)
04:54:13*haha_ joined #nim
05:01:48*endragor joined #nim
05:02:50*def-pri-pub quit (Quit: leaving)
05:15:15*pilne quit (Quit: Quitting!)
05:20:42*yglukhov joined #nim
05:24:49*yglukhov quit (Ping timeout: 248 seconds)
05:37:41*haha_ quit (Quit: haha_)
05:43:02*haha_ joined #nim
06:02:48*ShalokShalom joined #nim
06:07:03*dankrad joined #nim
06:11:32*dankrad quit (Ping timeout: 240 seconds)
06:26:59*haha_ quit (Quit: haha_)
06:32:26*ShalokShalom_ joined #nim
06:36:04*ShalokShalom quit (Ping timeout: 276 seconds)
06:48:51*kalexm joined #nim
06:49:06*kalexm quit (Remote host closed the connection)
06:49:47*haha_ joined #nim
06:50:53*yglukhov joined #nim
06:55:29*yglukhov quit (Ping timeout: 255 seconds)
07:05:51*nsf joined #nim
07:08:19*dankrad joined #nim
07:15:21*adeohluwa quit (Quit: Connection closed for inactivity)
07:16:07*dankrad quit (Ping timeout: 260 seconds)
07:48:35*Sentreen quit (Ping timeout: 255 seconds)
07:50:24*kalexm joined #nim
07:54:07*rokups joined #nim
07:57:49*dankrad joined #nim
08:01:44*Sentreen joined #nim
08:14:23*ShalokShalom_ is now known as ShalokShalom
08:15:50*dankrad quit (Ping timeout: 258 seconds)
08:21:08*Matthias247 joined #nim
08:32:33*dankrad joined #nim
08:37:21*dankrad quit (Ping timeout: 248 seconds)
08:38:59*dankrad joined #nim
08:43:37*dankrad quit (Ping timeout: 260 seconds)
08:47:13*skrylar joined #nim
08:47:58*Tiberium_ joined #nim
08:55:18*dankrad joined #nim
09:04:44*kalexm quit (Remote host closed the connection)
09:06:05*dankrad quit (Ping timeout: 240 seconds)
09:11:44*kalexm joined #nim
09:16:47dom96good morning guys
09:21:01*nsf quit (Quit: WeeChat 1.9)
09:24:53FromGitter<stisa> 'morning
09:26:41*dddddd joined #nim
09:30:34*solitude joined #nim
09:31:56*solitude quit (Client Quit)
09:32:19*solitude joined #nim
09:33:53skrylarpython sort of accidentally gained its status as the science scripting language
09:34:28skrylarfacebook used to use torch7 though which runs on luajit
09:34:33skrylaras did deepmind
09:34:42skrylarthey only switched to python because google basically told them to
09:35:44dom96citation needed :P
09:39:06Tiberium_also luajit is not something like pypy
09:39:30Tiberium_with luajit you can't write in usual lua style (if you want speed)
09:40:51Tiberium_also pypy has one big (very very very big) disadvantage - one-threaded compilation
09:41:01Tiberium_it literally takes 1.5 hours only to compile it
09:41:59*dankrad joined #nim
09:42:41*Tiberium left #nim (#nim)
09:42:48*Tiberium_ quit (Quit: Leaving)
09:43:25*Tiberium joined #nim
09:45:29dom96skrylar: What is the context here? Why the sudden talk about python?
09:45:59skrylardom96, it was in my chat buffer from earlier
09:46:33skrylarhttps://github.com/kuz/DeepMind-Atari-Deep-Q-Learner torch files ;p
09:48:09*dankrad quit (Remote host closed the connection)
09:52:23*haha_ quit (Quit: haha_)
09:53:22*haha_ joined #nim
09:56:12*solitude quit (Quit: WeeChat 1.9)
09:56:27*solitude joined #nim
10:07:34*Kingsquee joined #nim
10:13:15*dankrad joined #nim
10:20:34*dankrad_ joined #nim
10:21:48*dankrad quit (Ping timeout: 240 seconds)
10:33:58*dankrad_ quit (Remote host closed the connection)
10:46:19*Tiberium quit (Ping timeout: 276 seconds)
10:46:32*skrylar quit (Ping timeout: 246 seconds)
10:47:50*Tiberium joined #nim
10:56:49*couven92 joined #nim
11:04:04*dankrad joined #nim
11:04:18TiberiumBy the way, 11,000 commits
11:08:14*dankrad quit (Ping timeout: 246 seconds)
11:18:11*yglukhov joined #nim
11:27:18*mahmudov joined #nim
11:28:24mahmudovwhats the main reason of not acceptable dashes at nim files?
11:28:48mahmudovex it doesnt allow aa-bb.nim name
11:30:47*solitude quit (Quit: WeeChat 1.9)
11:31:03*solitude joined #nim
11:32:15*solitude quit (Client Quit)
11:32:31*solitude joined #nim
11:35:49FromGitter<zacharycarter> morning
11:37:34Tiberiumalso, just as some nice addition - is there shortcut for tuple[key, val: string] ?
11:37:59Tiberiumah sorry
11:38:17FromGitter<jacob88888> ```code paste, see link``` ⏎ ⏎ I'm getting a bunch of c compilation errors/code gen issues (mingw64, but no nim errors, anyway of figuring out what's wrong with my code from that? [https://gitter.im/nim-lang/Nim?at=59903a29bc464729747b758b]
11:38:29*haha_ quit (Quit: haha_)
11:38:44FromGitter<zacharycarter> @Araq: something like - https://github.com/gatsbyjs/gatsby - for karax would be neat
11:38:47Tiberiumjacob88888: are you using some nim to C library?
11:38:55Tiberiumlike some C library bindings
11:39:39FromGitter<jacob88888> Tiberium: yeah a bunch, opengl and sdl2 at least
11:39:48kalexmIf I have path lets say /Users/kalexm/bla.jpg in a String s. I could use s.split("/") to split the path apart. If I only want the last element 'bla.jpg' how could I extract the last element of an Iterator in a functional way?
11:40:04Tiberiumkalexm, there's easier way
11:40:07Tiberiumuse "rsplit"
11:40:35FromGitter<zacharycarter> @jacob88888 weird - you could use gdb / lldb
11:40:35Tiberiumlike: path.rsplit("/", maxsplit=1)[1]
11:40:42FromGitter<zacharycarter> if you have the offending code I can take a look
11:41:10Tiberium A possible common use case for `rsplit` is path manipulation,
11:41:14kalexmthanx! You guys are great. And also the language. Totally fell for nim in the last couple of days!
11:41:19*Arrrr joined #nim
11:41:20*Arrrr quit (Changing host)
11:41:20*Arrrr joined #nim
11:42:24*solitude quit (Quit: WeeChat 1.9)
11:45:08FromGitter<jacob88888> @zacharycarter yeah I tried to isolate what causes it to error out, but it's just some basic 'object of' inheritance (like oop demo (https://nim-by-example.github.io/oop/), and it runs fine on it's own, still trying to isolate it
11:45:18*solitude joined #nim
11:45:35FromGitter<zacharycarter> weird
11:46:43FromGitter<jacob88888> I'll take a look at setting up the debugger
11:47:24Tiberiumwell debugger can't help you?
11:47:33Tiberiumbecause it's an error on c code compilation
11:48:06FromGitter<zacharycarter> oh it's a compile time error?
11:48:08FromGitter<zacharycarter> not a runtime error?
11:48:48FromGitter<jacob88888> Can't find much on google for it
11:49:00FromGitter<zacharycarter> sorry yeah then the debugger won't be of aid to you
11:49:24FromGitter<zacharycarter> I'd recommend posting up the code somewhere @jacob88888 - maybe on github, then one of us can can take a crack at it
11:53:01FromGitter<ephja> can the `pragma` pragma not be pushed?
11:53:18FromGitter<jacob88888> yeah not sure what to try next on my end otherwise but I'll take a break and see what I can think of
12:02:10FromGitter<ephja> `when defined(VK_VERSION_1_0): ...` -> `WhenStmt(ElifBranch(Call(Sym(defined), Ident(!"VK_VERSION_1_0")) ...` hmm
12:06:19FromGitter<ephja> nevermind
12:06:34*haha_ joined #nim
12:14:03*kalexm quit (Remote host closed the connection)
12:14:45FromGitter<zacharycarter> @Araq I'm making said ssg now
12:17:28*PMunch joined #nim
12:22:58FromGitter<zacharycarter> is there any easy way to check if a directory is empty or not?
12:23:04FromGitter<zacharycarter> I see nimscript has listFiles
12:25:56FromGitter<zacharycarter> https://rosettacode.org/wiki/Empty_directory#Nim
12:26:07FromGitter<zacharycarter> guess I'll make a template
12:28:37*solitude quit (Quit: Leaving)
12:29:05*solitude joined #nim
12:29:09*solitudesf joined #nim
12:29:09*solitudesf quit (Client Quit)
12:29:32*solitude quit (Client Quit)
12:34:10*nhywyll joined #nim
12:35:13*dankrad joined #nim
12:35:19*solitude joined #nim
12:37:13*haha_ quit (Quit: haha_)
12:45:55*dankrad quit (Ping timeout: 276 seconds)
12:52:11*dankrad joined #nim
12:52:41dom96Tiberium: kalexm: no no no, that's not how you do it. The `os` module has many procedures for manipulating OS paths.
12:54:19*kalexm joined #nim
12:54:40dom96well. It's all been moved to ospaths :\
12:55:15dom96But this is all you need: https://nim-lang.org/docs/ospaths.html#extractFilename,string
12:55:22dom96and it works on all platforms
12:58:44*dankrad quit (Ping timeout: 258 seconds)
13:06:22FromGitter<zacharycarter> Nim needs a GraphQL implementation
13:09:18*ShalokShalom quit (Remote host closed the connection)
13:09:43*dankrad joined #nim
13:10:26*solitude quit (Quit: Leaving)
13:11:06Tiberiumdom96, I know
13:13:29dom96Tiberium: Then why not suggest it?
13:15:49Tiberiumdom96, well because I didn't knew that this particular feature exists :) and also I can't use them in macro, because os module can't be used at compile-time, so I need to join paths manually
13:16:24Tiberiumah, sorry
13:16:30Tiberiumi can use them
13:16:35dom96It can be used at compile-time.
13:16:36Tiberiumdom96, is there a way to get current directory from macro?
13:18:07Jipok[m]Tiberium: здесь?
13:18:58dom96Not sure
13:19:15TiberiumJipok[m], write in private IRC messages
13:19:45FromGitter<ephja> I'm guessing that `macros.name` shouldn't yield a PostFix node when `*` is present
13:22:43*mahmudov quit (Remote host closed the connection)
13:26:09FromGitter<zacharycarter> is there a way to stream output from execProcess to stdout
13:26:21*solitude joined #nim
13:26:52*mahtov quit (Ping timeout: 276 seconds)
13:27:59FromGitter<zacharycarter> nevermind
13:28:03*mahtov joined #nim
13:29:05*dankrad quit (Ping timeout: 248 seconds)
13:30:31*dankrad joined #nim
13:32:24FromGitter<ephja> `template getProcs = proc p(x: T, ...) ...` I'm doing `getAst(procs())` and all the parameter names are getting mangled
13:33:10*haha_ joined #nim
13:35:09*dankrad quit (Ping timeout: 258 seconds)
13:38:51Araqtry a .dirty template
13:40:37FromGitter<ephja> yeah that works
13:44:46*Matthias247 quit (Read error: Connection reset by peer)
13:47:08*Jipok[m] sent a long message: Jipok[m]_2017-08-13_13:47:07.txt <https://matrix.org/_matrix/media/v1/download/matrix.org/smGYCdULYquHATwOpyZHkqJQ>
13:50:58Jipok[m]how to redefine procedure from another module?
13:51:09Jipok[m]OldProc = foo
13:51:13Jipok[m]proc foo()*=
13:52:48*rauss quit (Read error: Connection reset by peer)
13:54:27*rauss joined #nim
13:58:23FromGitter<ephja> jipok[m]: https://nim-lang.org/docs/manual.html#types-procedural-type
13:58:24*haha_ quit (Quit: haha_)
13:59:16Tiberiumephja: well, he wants to redefine a proc from another module
13:59:25Tiberiumand this proc has standart calling convention
13:59:37Tiberium(default nim calling convention)
14:01:46FromGitter<ephja> redefine it at compile time? why?
14:02:25Tiberiumwell, he wants to redefine some quit and start procedures from sdl2 to make it compatible with emscripten
14:02:31*alaviss joined #nim
14:02:33Tiberiumask him :)
14:03:32*haha_ joined #nim
14:05:19alavissHi everyone! I've registered 3 accounts on nim forum, and so far none got confirmation email, they're, in order: alaviss, alaviss0, alaviss1. Hopefully someone can look into this problem :/
14:05:24FromGitter<ephja> you might have to either extend or patch the library
14:05:43Tiberiumalaviss, why are you registered 3 accounts?
14:05:46dom96Hey alaviss. What's your email provider?
14:05:47Tiberiumalaviss, they're manually approved
14:06:28dom96Tiberium: Yes, but first the user has to confirm their email
14:06:30alavissbecause they i never got any email, so i retry every month (or less)
14:06:48dom96I'll activate alaviss for you
14:06:51alavissgot one for the latest registration now
14:07:18Tiberiumalaviss, you just could ask here
14:07:23Tiberiumand not try every month :)
14:07:26alavisscan you check if the forum has problems with email that has a '+' in it?
14:07:34dom96Well, the first one is confirmed now in any case
14:07:34alavissI was lazy :))
14:07:48Tiberium+ is used for registering many accounts with one email :)
14:07:57Tiberiumlike on gmail
14:08:00dom96alaviss: Are you on gmail or something else?
14:08:08*haha_ quit (Ping timeout: 246 seconds)
14:08:22dom96Hrm, well we did have trouble with email a while back
14:08:30dom96I guess it was fixed in the meantime? :)
14:08:37Tiberium[email protected] is equal to [email protected]
14:08:38alavissnice, the first one got confirmed
14:08:46alavissthanks :)
14:08:57dom96Tiberium: Why are you explaining this?
14:09:04Tiberiumdom96, ah, I don't know, just about "+"
14:09:15alavisscan you clean up the account mess i created? :p
14:09:33dom96not really
14:09:40dom96It's fine though :P
14:11:08alavissanw, do we have the survey results yet? It's interesting to see what people think about the language
14:12:04Tiberiumon next week I guess
14:12:55Tiberiuminteresting to see if there's more or less people who completed the survey
14:14:13dom96we have the results but it will take me a while to write up an analysis
14:14:46Tiberiumwell hopefully you can write smaller post :)
14:15:05FromGitter<cooldome> i
14:15:57*alaviss quit (Quit: Page closed)
14:16:18*Trustable joined #nim
14:27:45*dankrad joined #nim
14:28:20*nhywyll quit (Quit: nhywyll)
14:38:23*yglukhov quit (Remote host closed the connection)
14:39:21*nsf joined #nim
14:52:27*arnetheduck joined #nim
14:58:37FromGitter<zacharycarter> is there any way to figure out if a file changed within a directory without recursively walking it?
15:02:16*Gertm joined #nim
15:04:34*HTTP_____GK1wmSU joined #nim
15:06:22*HTTP_____GK1wmSU left #nim (#nim)
15:07:52*haha_ joined #nim
15:10:50FromGitter<zacharycarter> @araq: still very wip but - https://github.com/zacharycarter/zax
15:11:11FromGitter<ephja> @zacharycarter https://nim-lang.org/docs/fsmonitor.html (currently linux only)
15:11:45FromGitter<zacharycarter> thanks @ephja
15:23:05*def-pri-pub joined #nim
15:35:28*ShalokShalom joined #nim
15:38:14*Ovius joined #nim
15:38:29OviusI'm going crazy over this but how do I get CPU usage?
15:38:36Ovius(for the entire system, not just nim)
15:39:51TiberiumOvius, read /proc/stat :)
15:40:31Tiberiumand for windows there's some winapi - https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process
15:40:47Tiberiumbut I don't know if Nim has bindings to "pdh.h" in windows
15:42:39Oviusah, thanks Tiberium
15:44:46Tiberiumwell this is not an easy task even in linux
15:44:51Tiberiumyou need to read and parse /proc/stat
15:45:53*rauss quit (Read error: Connection reset by peer)
15:46:28dom96you might want to find a C library that does this
15:46:30dom96and then just wrap it
15:46:46dom96of course, writing your own in pure Nim would be fun :)
15:47:02*rauss joined #nim
15:47:09dom96I got printed copies of Nim in Action. yay!
15:47:43dom96It's actually thinner than I thought
15:51:20*nhywyll joined #nim
15:54:12FromGitter<zacharycarter> is there any quick way to replace all non alphanumeric characters from a string?
15:54:17FromGitter<zacharycarter> or strip rather
15:56:17dom96hrm, maybe `filter`, not sure if it works on strings though.
15:56:19dom96It should
15:57:30*couven92 quit (Read error: Connection reset by peer)
15:58:01OviusAm I going nuts or does the os module not have a function to read the file?
15:58:29FromGitter<zacharycarter> readFile
15:58:44FromGitter<zacharycarter> hrm filter doesn't seem to work
15:59:02TiberiumOvius, readFile is in system module
15:59:11Tiberiumyou don't need any imports for it
15:59:26OviusTiberium: thanks!
16:00:46dom96Pro Tip: Use https://nim-lang.org/docs/theindex.html to search for procs
16:00:47FromGitter<zacharycarter> hah
16:00:51FromGitter<zacharycarter> I knew https://github.com/pragmagic/redux.nim
16:01:01FromGitter<zacharycarter> was going to be coming around
16:01:28dom96zacharycarter: I think an issue is in order for `filter` and `map` for strings.
16:01:37FromGitter<zacharycarter> gotcha thanks dom
16:01:40*sz0 quit (Quit: Connection closed for inactivity)
16:01:41Tiberiumwhere is all magic from system.nim is implemented?
16:01:43FromGitter<zacharycarter> until then I'll have to figure out something more clever
16:01:49dom96Tiberium: In the compiler.
16:01:53Tiberiumdom96, ah, ok :)
16:02:06dom96Search for the name of the magic in the compiler files and you should find something :)
16:04:48Tiberiumalso I didn't knew there's "on" and "off"
16:04:54Tiberiumnice aliases actually
16:06:20OviusI'm reading the docs but not getting this -
16:06:34Oviuscan I call procs without including brackets? eg echo "test" and echo("test") seem to be the same
16:07:51OviusAnd if a function like nre.find has two params, can I call `find target re"regex"`?
16:08:43TiberiumAFAIK no
16:08:50Tiberiumbut you can like this
16:08:55Tiberiumfind target, re"regex"
16:09:01Oviusah, thank you!
16:09:18OviusTiberium: I'm trying to learn nim at the same time as parsing /proc/stat
16:09:20Oviusnot a fun process :P
16:10:02dom96You might want to look into the parseutils module
16:10:15Oviusdom96: I was going for regex, would that not work?
16:10:15dom96I'd advise to stay away from regex if possible :)
16:10:30dom96It'll work, but you'll have a dependency on PCRE
16:10:41TiberiumOvius, or you can use "pegs" as a replacement for regex:)
16:10:47Tiberiumbut it's different
16:10:50OviusI'm only using this for a small thing
16:11:01OviusTiberium: Pegs are used as compiler parsers right?
16:11:10dom96Often though, parseutils is much more flexible than regex IMO
16:11:32TiberiumOvius, not only, but nim has pure-nim implementation of pegs
16:11:36Tiberiumand yes, better to use parseutils
16:11:48OviusOff to parse utils wiki page I go
16:15:33Oviusoh god
16:16:29TiberiumOvius, what?
16:19:06OviusTiberium: Learning a new language
16:19:33OviusTiberium: So frustrating! :P
16:20:04Tiberiumwhy? :)
16:20:59FromGitter<zacharycarter> hrm i need to figure out how to handle running the binary for my ssg in another directory
16:21:10OviusTiberium: Just used to knowing the intricacies of a language and doing stuff quickly
16:21:19OviusTiberium: Whereas with a new language it's like everything isn't in the right place!
16:22:15OviusTiberium: Also I'm learning to use vim, so that's doing my head in too
16:22:24*kalexm quit (Remote host closed the connection)
16:23:26FromGitter<zacharycarter> is there a way to ship additional files with a nim binary with nimble?
16:24:23TiberiumOvius, why? you just wanted to learn it?
16:24:53Tiberiumthere's nim plugins for a plenty of editors
16:25:03OviusTiberium: yep
16:25:09OviusTiberium: I've installed nim.vim
16:25:58Tiberiumthere's also https://github.com/baabelfish/nvim-nim
16:26:14Tiberiumwith nimsuggest support
16:26:30Tiberiumnimsuggest is basically an autocompletion backend, written in Nim
16:26:44Tiberiumso IDEs don't need to implement their own autocompletion
16:27:17OviusTiberium: Nice, thank you!
16:27:48*Ovius left #nim ("WeeChat 1.9")
16:29:39Tiberiumhmm, maybe I should try some command-line editor too
16:29:49TiberiumI've use vim from time to time, but only for very basic stuff
16:29:59FromGitter<zacharycarter> @dom96: could you offer any insight into this pattern?
16:30:14FromGitter<zacharycarter> I need certain files to be available to my binary
16:30:28FromGitter<zacharycarter> and I can't guarantee the location that the binary will be run from
16:31:00Tiberiumstatically read files to your binary?
16:31:08Tiberiumon compile-time :P
16:31:35FromGitter<zacharycarter> how do I do that Tiberium?
16:31:45TiberiumstaticRead and store result in a constant?
16:31:56FromGitter<zacharycarter> never even heard of this before
16:31:59dom96Yeah, static reading would be best
16:32:10dom96depends what these files are
16:32:15Tiberiumzacharycarter: https://nim-lang.org/docs/system.html#staticRead
16:32:39FromGitter<zacharycarter> interesting
16:32:43FromGitter<zacharycarter> can I static read an entire directory?
16:33:01FromGitter<zacharycarter> oh doesn't look like it
16:33:01Tiberiumwell no
16:33:11Tiberiumbut you can read all files from it
16:33:15FromGitter<zacharycarter> I guess I could use compression
16:33:27Tiberiumwell you can walkDir on compiletime
16:36:21Tiberiumand store all files in an array :D
16:36:48Tiberiumwell it's too much
16:37:10Tiberiuminteresting, can I statically link ALL libraries on linux? when compiling nim
16:37:28FromGitter<zacharycarter> I'll try zipping
16:37:30Tiberium*nim project
16:37:57dom96what are these files?
16:38:33FromGitter<zacharycarter> dom96: basically template files for a static site generator
16:38:39FromGitter<zacharycarter> so html, css, javascript etc
16:38:50Tiberiumah, nice
16:38:55FromGitter<zacharycarter> these are the files that each new site will be bootstrapped with
16:38:56Tiberiumbut maybe users would change them?
16:39:03FromGitter<zacharycarter> this is just for like
16:39:05Tiberiumor you would provide the possibility to "overwrite" it?
16:39:06FromGitter<zacharycarter> tool new project
16:39:15Tiberiumah, ok then
16:39:19Tiberiumvery nice
16:40:09dom96What you can do IIRC is use getApplicationDir()
16:40:19dom96(name might be slightly different)
16:40:37dom96oh, it's getAppDir()
16:40:46dom96That should get you the directory of where your binary is
16:41:18FromGitter<zacharycarter> but how would I install these files along with my binary?
16:41:26FromGitter<zacharycarter> so I know where they're located
16:42:15Tiberiumjust pack your app with files into "zip"?
16:42:18Tiberiumuser would unpack them
16:42:23Tiberiumand you'll read files from the current dir
16:42:28dom96They will need to be in your 'src' dir
16:43:07FromGitter<zacharycarter> ahh okay
16:43:10FromGitter<zacharycarter> didn't realize I could do that
16:52:05FromGitter<zacharycarter> cool thank you both for the help I got it working
16:59:37*zahary_ joined #nim
17:10:38FromGitter<ephja> has anyone done anything interesting with concepts yet?
17:11:49*madmalik joined #nim
17:18:41FromGitter<ephja> a container interface would make low overhead wrappers more attractive
17:28:35*benoliver999 quit (Ping timeout: 240 seconds)
17:31:25*benoliver999 joined #nim
17:40:14*rokups quit (Quit: Connection closed for inactivity)
17:42:50*haha_ quit (Quit: haha_)
17:44:33FromGitter<zacharycarter> could I create a macro that would act like handlebars
17:44:53FromGitter<zacharycarter> I'm basically trying to create a macro that lets me type {{some wildcard here}}
17:45:15FromGitter<zacharycarter> so I have
17:45:25FromGitter<zacharycarter> macro `{{`*(tag: untyped): untyped = ⏎ discard
17:45:52FromGitter<zacharycarter> is there a way to allow for a wildcard inside of a macro?
17:46:07Tiberiumare you doing a template engine?
17:46:50FromGitter<zacharycarter> not exactly
17:46:57FromGitter<zacharycarter> I'm extending karax
17:47:22FromGitter<zacharycarter> with this ssg - so you can basically write a template in karax and write partials in karax
17:47:59FromGitter<zacharycarter> and karax spits out js
17:51:12*kalexm joined #nim
17:58:13*endragor quit (Remote host closed the connection)
17:59:17*ShalokShalom quit (Quit: No Ping reply in 180 seconds.)
18:00:39*ShalokShalom joined #nim
18:03:57dom96Unfortunately I don't think you can have enclosing macros
18:05:08*Matthias247 joined #nim
18:14:10*haha_ joined #nim
18:15:05FromGitter<zacharycarter> gotcha
18:16:45*haha_ quit (Client Quit)
18:21:19dom96This is now a must-have in Nim https://twitter.com/chordbug/status/838769114869084160
18:25:59*nsf quit (Quit: WeeChat 1.9)
18:32:38*haha_ joined #nim
18:35:44FromGitter<zacharycarter> okay this is pretty awesome
18:36:29FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59909c2dc101bc4e3a142017]
18:36:32FromGitter<ephja> not so much if you can't define such operators yourself
18:36:58FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59909c492723db8d5e9e15c5]
18:37:21FromGitter<zacharycarter> ```return buildHtml(tdiv(class="main")): ⏎ text("Post!")``` [https://gitter.im/nim-lang/Nim?at=59909c61614889d47544a195]
18:38:04FromGitter<zacharycarter> if I can pass through include
18:38:10FromGitter<zacharycarter> which I highly doubt
18:38:17FromGitter<zacharycarter> I'll be estatic
18:41:40*couven92 joined #nim
18:52:11Tiberiumzacharycarter: you can do this pretty easily in Nim already
18:52:21Tiberiumjust create an alias
18:52:34dom96zacharycarter: what are you working on?
18:53:56FromGitter<zacharycarter> dom96: I'm trying to create a static site generator for karax
18:54:02FromGitter<zacharycarter> where you can build your templates using karax
18:54:05FromGitter<zacharycarter> and inject markdown into them
18:54:25dom96but karax is an SPA framework
18:54:52dom96are you going to be using it to generate html statically?
18:55:44FromGitter<zacharycarter> the concept I'm aiming for is similar to : https://www.gatsbyjs.org/
18:56:28FromGitter<zacharycarter> so I want to ideally be generating karax
18:58:07*haha_ quit (Quit: haha_)
18:59:10dom96so it's a static site run by an SPA framework I guess
18:59:19Tiberiumwell I doubt Araq would agree on this: https://docs.perl6.org/language/unicode_texas.html
18:59:42dom96so you don't need to get a fresh request when you click on an article
19:01:01subsetparkgood christ Tiberium
19:01:21*haha_ joined #nim
19:02:07*kalexm quit (Remote host closed the connection)
19:02:28Tiberiumwell it's actually pretty easy to create templates for equality operators
19:02:31*haha_ quit (Client Quit)
19:03:03Tiberiumbut not for numbers in unicode
19:03:42FromGitter<zacharycarter> dom96 - care to review what I've built so far and tell me what you think? I can walk you through it
19:04:27FromGitter<zacharycarter> or actually you could just run it and see it
19:04:52Tiberiumat least you can do "const ⅒ = 1/10" already in Nim
19:06:57*kalexm joined #nim
19:08:38FromGitter<zacharycarter> dom96: https://github.com/zacharycarter/zax
19:08:54FromGitter<zacharycarter> specifically: https://github.com/zacharycarter/zax/tree/master/src/template
19:09:17FromGitter<zacharycarter> but instructions are there for running it it's easy enough to play around with as it is
19:13:02*haha_ joined #nim
19:13:50dom96Looks awesome. Can't test right now though.
19:14:17dom96subsetpark: did you figure out the Nimble issues?
19:14:56subsetparkdom96: Nope. Some time Friday I pasted the output of trying to nimble install [email protected]#head and then [email protected]#head - did you see that?
19:15:10dom96I asked you a follow up question IIRC
19:15:14dom96I guess you missed it
19:15:45subsetparkI definitely did...
19:16:59subsetparkah, thanks
19:21:38subsetparkdom96: pkgs/lib does not exist
19:23:50dom96subsetpark: can you verify via `which nimble` that it's ~/.nimble/bin/nimble that you're executing?
19:24:19subsetpark[i] ~/.nimble ; which nimble
19:24:19subsetpark[i] ~/.nimble ; nimble --version
19:24:20subsetparknimble v0.8.6 compiled at 2017-08-10 21:30:24
19:24:20subsetpark[i] ~/.nimble ;
19:25:31dom96subsetpark: which nim; plz
19:26:14subsetpark[i] ~/.nimble ; which nim
19:26:14subsetpark[i] ~/.nimble ; nim --version
19:26:15subsetparkNim Compiler Version 0.17.1 (2017-08-10) [Linux: amd64]
19:26:43*yglukhov joined #nim
19:27:53dom96this is weird.
19:28:36dom96Just to see if this works: set the NIM_LIB_PREFIX env var equal to wherever your stdlib is.
19:29:27dom96Even if this does work though I would like to know why the automatic detection is failing. Hope you don't mind.
19:30:33subsetparkthat would be ~/.choosenim/toolchains/nim-#head/lib I believe?
19:32:24dom96You can always try it and adjust anyway :)
19:32:48dom96Another useful piece of information is `nim -v` (or `choosenim show` :))
19:32:53*yglukhov quit (Remote host closed the connection)
19:34:01couven92if I have a module that generates code and includes code from strutils... How do I make sure that strutils is actually inclded where I invoke the macro?
19:34:27couven92or should the macro simply emit `when not declared(strutils): import strutils`
19:35:03dom96bindSym IIRC
19:35:13couven92dom96, inside the macro?
19:35:21couven92bindSym strutils?
19:35:33dom96Instead of newIdentNode("toUpper")
19:35:43dom96or whatever proc you want
19:36:26subsetparkdom96: as so often is the case... What wasn't working before, works now :) a `nimble refresh` understands my package list and tries to read it.
19:36:52subsetparkHowever! Now I have found a new bug - it sees path = r"/home/zax/mksp/nim_packages.json" but for some reason looks for nimpackages.json
19:36:56dom96wait wait
19:37:02dom96but you didn't create this env var yet, right?
19:37:28dom96remember you were running `nimble dump` last time
19:38:01subsetparkyes that works too
19:38:09subsetparkbut let me see the state of my env
19:38:35subsetparkoh thank goodness - the var is there already :) so yes, the var fixes it
19:38:42*haha_ quit (Quit: haha_)
19:38:52subsetparkyes, without the var the same issue happens
19:38:56dom96ok good. So we can continue investigating
19:39:08dom96`nim -v` and/or `choosenim show` plz
19:39:21dom96(of course if you don't have the will/time just let me know)
19:40:09*ipjk joined #nim
19:40:16subsetparkdom96: no, happy to keep going
19:40:50subsetpark[i] develop ~/mksp-src/syphus-nim ; nim -v
19:40:50subsetpark Tip: 1 messages have been suppressed, use --verbose to show them.
19:40:50subsetpark Error: Unable to parse config file: Unknown key: path
19:40:50subsetpark Info: If unexpected, please report this error to https://github.com/dom96/choosenim
19:40:50subsetpark[i] develop ~/mksp-src/syphus-nim ; choosenim show
19:40:50subsetpark Tip: 1 messages have been suppressed, use --verbose to show them.
19:40:51subsetpark Error: Unable to parse config file: Unknown key: path
19:41:20subsetpark(they both seem to call a different version of nimble, not [email protected]#head)
19:41:42dom96whoa wat
19:41:43*yglukhov joined #nim
19:42:41dom96this is an incredibly interesting debugging journey :)
19:42:56subsetparkhappy to keep throwing you curveballs..
19:43:44dom96but how was this working before?
19:43:57dom96wait, so `nimble -v` works?
19:44:02dom96but `nim -v` gives that error?
19:46:49dom96So you were actually the one that implemented this `path` key for Nimble's config: https://github.com/nim-lang/nimble/commit/c89ca099a2a108819bc6793d1864578323c0ddb6
19:47:17dom96choosenim was compiled using an older version of Nimble
19:47:54dom96and so it isn't aware of this config option
19:48:32dom96but `nimble -v` should have failed with the same error
19:48:43dom96ls -la ~/.nimble/bin
19:49:31subsetparkyes to your two above questions
19:50:46subsetparkwhich makes sense - nimble was responsible for the up to date version of nimble; choosenim is responsible for the other binaries
19:51:15dom96oh ok. Hrm.
19:52:06subsetparkso there seem to be two things going on:
19:52:24subsetpark1. nim has its own idea of where to call nimble from that doesn't get updated by nimble;
19:52:27dom96okay, I think I see what's happened.
19:52:49subsetpark2. the whole lib/system thing (!??)
19:52:53dom96For reference, here is the function that handles this: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L191
19:53:16dom96No to #1. Nim never calls Nimble.
19:53:37dom96The "symlinks" that choosenim creates are actually binaries
19:54:03dom96Which read the Nimble config
19:54:44subsetparkah i see
19:55:03dom96But right now I can't remember why that's necessary
19:55:21dom96Its necessary for choosenim so that it knows where to place these "symlinks"
19:55:31dom96(because ~/.nimble can be changed to a different path)
19:56:11dom96Not too much I can do about that.
19:56:29dom96Except maybe make it continue if it encounters keys that it doesn't know.
19:57:20*pilne joined #nim
19:57:37dom96As far as #2 is concerned though... in the way that you have set up Nimble and Nim the heuristic is broken.
19:58:01dom96It falls back to using `getAppDir().head` to find the Nim stdlib
19:59:09subsetparkIs there a non-breaking way to get a version of nimble installed that understands the `path` key?
19:59:58dom96Your Nimble understands it
20:00:52dom96But yeah, it's broken because of this issue. You can fix that by setting the environment var
20:01:00subsetparkyes, but at the expense of breaking the heuristic. I mean I can just make sure that env is set, but that feels like a hack. And it seems undesirable that `nimble install [email protected]#head` will magically break things.
20:01:18dom96choosenim will remain broken though
20:01:46subsetparkyeah, that's not great.
20:02:29dom96Yeah, I will have to fix choosenim so that it doesn't die when it encounters an unknown key in Nimble's config.
20:04:21dom96So there is basically like a too damn high amount of combinations of how Nim and Nimble can be installed together.
20:04:43dom96Araq's solution would just be to say "okay, the Nim and Nimble binaries always have to be in the same directory."
20:05:35dom96That would fix all of these problems sure, but it would also be quite a big constraint.
20:06:02dom96And in the real world people will always install these things in a way that doesn't guarantee them being in the same directory.
20:07:41dom96I can continue adding support for more combinations, but in the end there will always be cases that I didn't think of which will require this environment variable.
20:08:06dom96And actually I think it's a good fallback, I just need to ensure the user knows it exists by making the error message nicer.
20:08:24dom96Like "Sorry, can't find your stdlib. Please set this environment variable to its location"
20:09:36dom96Does that make sense?
20:10:47subsetparkYeah, I think that works. I think it's a big difference to notice when we've failed to find the stdlib, rather than just reporting that some file is not in a directory which, to the user, it seems obvious it shouldn't be in the first place.
20:11:33subsetparkThe other thing you could do is - ask nim
20:12:57dom96That's very true. A ``getStdlibLocation`` (or something) command for the Nim compiler would be handy
20:13:07dom96Not sure if Araq would approve.
20:14:09*yglukhov quit (Remote host closed the connection)
20:14:37subsetparkwell, as soon as my choosenim works, i'll get bugfix for why it interprets mksp_packages.json as mksppackages.json :)
20:15:39dom96style insensitivity I guess? :)
20:16:43Araqthat's right, Araq's solution works and the others don't.
20:18:10Araq"constraints" ensure that things work.
20:18:54dom96In that case I should simply disallow the installation of Nimble via Nimble
20:19:07dom96Which wouldn't help subsetpark achieve what he wants
20:20:32Araqwhat is it that he wants?
20:21:05dom96Install [email protected]#head on top of 0.17.0 (right?)
20:21:58Araqand how am I gonna implement getStdlibDir() ?
20:22:35subsetparkdom96: right
20:22:48subsetparkwell, install [email protected]#head at all, really
20:23:10dom96you can also just `choosenim devel`
20:23:17dom96that should get you [email protected]#head as well
20:23:40dom96Araq: same way you get it currently in the compiler
20:24:25dom96(btw choosenim puts all binaries in the same `bin` directory :))
20:24:35subsetparkdom96: `choosenim #head` gives you nimble 0.8.6
20:25:20subsetparkwhich isn't necessarily wrong; it makes sense that just because you want bleeding edge compiler you might not want bleeding edge package manager. but handling it some other way in choosenim would be another solution
20:25:43*Arrrr quit (Read error: Connection reset by peer)
20:27:14dom96well I do have an issue which mentions implementing a `--newest-nimble` flag: https://github.com/dom96/choosenim/issues/23
20:27:26dom96But I guess I may as well allow you to select a version of it
20:27:59AraqgetAppDir().head is not a solution at all
20:28:16dom96Araq: That's what the compiler uses currently for this...
20:28:23AraqfindExe"nim" /../ "lib" but that's like rolling a dice
20:28:46Araqthe compiler knows it's nim.exe, is the app that calls getStdLib() also nim.exe? dubious.
20:29:01dom96The idea is for the app to call `nim getStdlibLocation`
20:29:09dom96Nim always knows where its stdlib is
20:29:47Araqwhen you call 'nim getStdlibLocation' you know where nim.exe is, otherwise you couldn't call it
20:30:03Araqif you know where nim.exe is, you also know where its lib is
20:30:48dom96subsetpark: You can also hackishly cp ~/.nimble/pkgs/nimble-#head/nimble ~/.choosenim/toolchains/nim-whatever/bin/nimble
20:31:05dom96Araq: No, you don't.
20:31:13Tiberiumnimble is a standalone binary? cool
20:31:35dom96Not when `nim` is a proxy binary
20:31:37Araqof course you do, or you use findExe"nim" to find it
20:31:51Araqthere is no "proxy" binary, findExe resolves symlinks
20:31:57dom96there is for choosenim
20:32:33dom96It's a binary that executes the real `nim`
20:32:37dom96hence the problem
20:32:43Araqomg wtf
20:32:56Araqchoosenim simulates a nim.exe?
20:33:20dom96It creates a simple binary that passes all command line args to nim.exe
20:33:41Araqso ... the binary then knows where nim.exe is?
20:33:58Araqbtw 'koch nimble' also gives you the latest nimble if you built from source
20:34:18*sz0 joined #nim
20:34:26dom96subsetpark: I just did `choosenim update #head` and it installed Nimble 0.8.7
20:34:37dom96Araq: yes
20:36:21*BitPuffin|osx joined #nim
20:36:38subsetparkdom96: interesting. Let me try that and report back
20:37:21Araqok, so ... who would exec 'nim getstdlib' again? nimble?
20:38:15subsetparkYes to my understanding
20:38:24dom96I don't think it's necessary though
20:38:50dom96I will instead make it easy to select the Nimble version with choosenim
20:39:00dom96And give users a nice error message if they install Nimble in some odd way
20:39:14dom96Telling them they can set the env var if they please
20:39:37Araqdon't you dare making me setup a stupid environment var
20:39:54dom96Calm down. You won't have to.
20:40:15dom96You love to keep your Nim and Nimble close.
20:40:51dom96If it turns out that this environment var needs to be set too often then we can see about implementing this Nim command.
20:41:28AraqI don't "love" it, it's just that it works, it makes sense and all the other solutions don't.
20:42:34Araqit's also the solution that uses relative addressing instead of the usual Unix-like absolute addressing that then require an endless whack-a-mole game to "fix"
20:53:10*Tiberium quit (Remote host closed the connection)
20:54:11*ipjk quit (Quit: Leaving)
20:56:16couven92Araq, how to you apply doc comments to importc procs that do not have a body?
21:05:40Araqproc foo() {.importc.}
21:05:44Araq ## comment here?
21:11:52*Tiberium joined #nim
21:22:53*adeohluwa joined #nim
21:24:13*skrylar joined #nim
21:26:47*kalexm quit (Remote host closed the connection)
21:27:32*madmalik quit (Quit: Connection closed for inactivity)
21:31:02*kalexm joined #nim
21:32:16FromGitter<zacharycarter> how can I do
21:32:39FromGitter<zacharycarter> let var = "text("""abc""")"
21:33:32FromGitter<zacharycarter> sorry
21:33:45FromGitter<zacharycarter> I mean var abc = "text("""abc""")"
21:34:49dom96escape the " I guess?
21:35:08FromGitter<zacharycarter> all six of them?
21:35:21*kalexm quit (Ping timeout: 255 seconds)
21:36:12FromGitter<zacharycarter> okay got it working
21:42:46subsetparkdom96: a fix for the bug I encountered (and caused) earlier https://github.com/nim-lang/nimble/pull/391
21:42:54*nitely joined #nim
21:43:57dom96subsetpark: cool, thanks.
21:44:21dom96so did choosing #head give you [email protected]#head?
21:44:31*nhywyll quit (Quit: nhywyll)
21:49:05*Sentreen quit (Ping timeout: 246 seconds)
21:50:35couven92how do you goto another case in Nim?
21:51:43Araqof valueA, valueB: ...
21:51:55Araqyou cannot 'goto' but you can collect the values
21:52:04Araqinto a list
21:52:31couven92Araq, ok, so I'd need to do an if statement at the beginning of the `of`
21:55:30*skrylar quit (Ping timeout: 240 seconds)
21:56:09couven92Araq, BTW, I was thinking about importc... In C we usually have constants in ALL_UPPERCASE, whese in Nim we (very logically) normally use lowercase. Anyway to write the importc pragma value just as: take the nim ident and convert to all uppercase?
21:56:12FromGitter<zacharycarter> damnit meant to drag that into imgur
21:56:58Araquse a macro?
21:57:33couven92Araq, and invoke the macro through pragma syntax? that's an idea...
21:57:53FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/HyiG/zax.gif)
21:58:41FromGitter<zacharycarter> ugh can't even read the font
21:58:51*Trustable quit (Remote host closed the connection)
21:59:25Araqzacharycarter: do you know how to make karax "partial"?
21:59:32Araqhard to describe my question
21:59:40FromGitter<zacharycarter> I think I know what you mean
21:59:57FromGitter<zacharycarter> so like portions of the vdom can get injected
22:00:32FromGitter<zacharycarter> I think you're already there with components
22:00:49Araqyeah well, no.
22:00:52FromGitter<zacharycarter> but I'm probably not thinking the same way you are
22:01:10Araqmy idea is to mix "reactive lists" with karax, so usually karax works as before, however
22:01:20Araqyou can also write something like
22:01:50Araqand then whenever person changes, its corresponding VNode gets computed
22:01:56FromGitter<zacharycarter> gotcha
22:02:05Araqbut nothing else, so O(1) instead of O(n)
22:02:14*Sentreen joined #nim
22:02:44FromGitter<zacharycarter> interesting, I don't really have an understanding of how react does that under the hood but I use that all the time
22:04:38Araqreact doesn't do that at all
22:04:48Araqmaybe some addons on top of react do
22:05:57FromGitter<zacharycarter> oh
22:06:27FromGitter<zacharycarter> I meant just like iterating over collections and rendering components
22:06:40FromGitter<zacharycarter> I didn't realize that reacts list weren't "reactive"
22:07:01dom96what does "reactive" even mean? :)
22:07:27FromGitter<zacharycarter> araq linked to the wiki article a while ago
22:09:12*solitude quit (Ping timeout: 258 seconds)
22:23:01*nitely quit (Quit: Page closed)
22:23:57*Kingsquee quit (Ping timeout: 240 seconds)
22:24:07*Matthias247_ joined #nim
22:26:11*Matthias247 quit (Ping timeout: 246 seconds)
22:49:13*yglukhov joined #nim
22:53:29FromGitter<zacharycarter> apparently nim yaml load doesn't work with threads
22:53:35*yglukhov quit (Ping timeout: 240 seconds)
22:57:49FromGitter<zacharycarter> bummer
23:01:17FromGitter<zacharycarter> json it is
23:06:52*Matthias247_ quit (Read error: Connection reset by peer)
23:13:59TiberiumIt's there any Nim wrapper for cimgui or imgui?
23:14:51TiberiumI mean Dear imgui
23:30:47FromGitter<zacharycarter> Tiberium: my nuklear wrapper
23:32:14TiberiumWell it's not "dear imgui" :)
23:32:25TiberiumImgui seems to be easier to understand
23:33:47*Sentreen quit (Ping timeout: 260 seconds)
23:39:48*jinshil joined #nim
23:46:31*Sentreen joined #nim
23:51:14*def-pri-pub quit (Quit: leaving)
23:52:15*adeohluwa quit (Quit: Connection closed for inactivity)