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:35 | def-pri-pub | zacharycarter: 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:57 | FromGitter | <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:21 | FromGitter | <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:47 | dom96 | good morning guys |
09:21:01 | * | nsf quit (Quit: WeeChat 1.9) |
09:24:53 | FromGitter | <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:53 | skrylar | python sort of accidentally gained its status as the science scripting language |
09:34:12 | skrylar | iirc |
09:34:28 | skrylar | facebook used to use torch7 though which runs on luajit |
09:34:33 | skrylar | as did deepmind |
09:34:42 | skrylar | they only switched to python because google basically told them to |
09:35:44 | dom96 | citation needed :P |
09:39:06 | Tiberium_ | also luajit is not something like pypy |
09:39:30 | Tiberium_ | with luajit you can't write in usual lua style (if you want speed) |
09:40:51 | Tiberium_ | also pypy has one big (very very very big) disadvantage - one-threaded compilation |
09:41:01 | Tiberium_ | 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:29 | dom96 | skrylar: What is the context here? Why the sudden talk about python? |
09:45:59 | skrylar | dom96, it was in my chat buffer from earlier |
09:46:33 | skrylar | https://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:18 | Tiberium | By 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:24 | mahmudov | whats the main reason of not acceptable dashes at nim files? |
11:28:48 | mahmudov | ex 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:49 | FromGitter | <zacharycarter> morning |
11:37:34 | Tiberium | also, just as some nice addition - is there shortcut for tuple[key, val: string] ? |
11:37:59 | Tiberium | ah sorry |
11:38:17 | FromGitter | <jacob88888> ```code paste, see link``` ⏎ ⏎ I'm getting a bunch of c compilation errors/code gen issues (mingw64 6.0.3.7), 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:44 | FromGitter | <zacharycarter> @Araq: something like - https://github.com/gatsbyjs/gatsby - for karax would be neat |
11:38:47 | Tiberium | jacob88888: are you using some nim to C library? |
11:38:55 | Tiberium | like some C library bindings |
11:39:39 | FromGitter | <jacob88888> Tiberium: yeah a bunch, opengl and sdl2 at least |
11:39:48 | kalexm | If 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:04 | Tiberium | kalexm, there's easier way |
11:40:07 | Tiberium | use "rsplit" |
11:40:35 | FromGitter | <zacharycarter> @jacob88888 weird - you could use gdb / lldb |
11:40:35 | Tiberium | like: path.rsplit("/", maxsplit=1)[1] |
11:40:42 | FromGitter | <zacharycarter> if you have the offending code I can take a look |
11:41:10 | Tiberium | A possible common use case for `rsplit` is path manipulation, |
11:41:14 | kalexm | thanx! 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:08 | FromGitter | <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:35 | FromGitter | <zacharycarter> weird |
11:46:43 | FromGitter | <jacob88888> I'll take a look at setting up the debugger |
11:47:24 | Tiberium | well debugger can't help you? |
11:47:33 | Tiberium | because it's an error on c code compilation |
11:48:06 | FromGitter | <zacharycarter> oh it's a compile time error? |
11:48:08 | FromGitter | <zacharycarter> not a runtime error? |
11:48:13 | Tiberium | yes |
11:48:22 | Tiberium | https://gitter.im/nim-lang/Nim?at=59903a29bc464729747b758b |
11:48:48 | FromGitter | <jacob88888> Can't find much on google for it |
11:49:00 | FromGitter | <zacharycarter> sorry yeah then the debugger won't be of aid to you |
11:49:24 | FromGitter | <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:01 | FromGitter | <ephja> can the `pragma` pragma not be pushed? |
11:53:18 | FromGitter | <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:10 | FromGitter | <ephja> `when defined(VK_VERSION_1_0): ...` -> `WhenStmt(ElifBranch(Call(Sym(defined), Ident(!"VK_VERSION_1_0")) ...` hmm |
12:06:19 | FromGitter | <ephja> nevermind |
12:06:34 | * | haha_ joined #nim |
12:14:03 | * | kalexm quit (Remote host closed the connection) |
12:14:45 | FromGitter | <zacharycarter> @Araq I'm making said ssg now |
12:17:28 | * | PMunch joined #nim |
12:22:58 | FromGitter | <zacharycarter> is there any easy way to check if a directory is empty or not? |
12:23:04 | FromGitter | <zacharycarter> I see nimscript has listFiles |
12:25:56 | FromGitter | <zacharycarter> https://rosettacode.org/wiki/Empty_directory#Nim |
12:26:07 | FromGitter | <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:41 | dom96 | Tiberium: 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:40 | dom96 | well. It's all been moved to ospaths :\ |
12:55:15 | dom96 | But this is all you need: https://nim-lang.org/docs/ospaths.html#extractFilename,string |
12:55:22 | dom96 | and it works on all platforms |
12:58:44 | * | dankrad quit (Ping timeout: 258 seconds) |
13:06:22 | FromGitter | <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:06 | Tiberium | dom96, I know |
13:13:29 | dom96 | Tiberium: Then why not suggest it? |
13:15:49 | Tiberium | dom96, 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:24 | Tiberium | ah, sorry |
13:16:30 | Tiberium | i can use them |
13:16:35 | dom96 | It can be used at compile-time. |
13:16:36 | Tiberium | dom96, is there a way to get current directory from macro? |
13:18:07 | Jipok[m] | Tiberium: здесь? |
13:18:58 | dom96 | Not sure |
13:19:15 | Tiberium | Jipok[m], write in private IRC messages |
13:19:45 | FromGitter | <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:09 | FromGitter | <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:59 | FromGitter | <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:24 | FromGitter | <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:51 | Araq | try a .dirty template |
13:40:37 | FromGitter | <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:58 | Jipok[m] | how to redefine procedure from another module? |
13:51:04 | Jipok[m] | like: |
13:51:09 | Jipok[m] | OldProc = foo |
13:51:13 | Jipok[m] | proc foo()*= |
13:51:15 | Jipok[m] | ... |
13:51:18 | Jipok[m] | OldProc() |
13:52:48 | * | rauss quit (Read error: Connection reset by peer) |
13:54:27 | * | rauss joined #nim |
13:58:23 | FromGitter | <ephja> jipok[m]: https://nim-lang.org/docs/manual.html#types-procedural-type |
13:58:24 | * | haha_ quit (Quit: haha_) |
13:59:16 | Tiberium | ephja: well, he wants to redefine a proc from another module |
13:59:25 | Tiberium | and this proc has standart calling convention |
13:59:37 | Tiberium | (default nim calling convention) |
14:01:46 | FromGitter | <ephja> redefine it at compile time? why? |
14:02:25 | Tiberium | well, 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:33 | Tiberium | ask him :) |
14:03:32 | * | haha_ joined #nim |
14:05:19 | alaviss | Hi 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:24 | FromGitter | <ephja> you might have to either extend or patch the library |
14:05:43 | Tiberium | alaviss, why are you registered 3 accounts? |
14:05:46 | dom96 | Hey alaviss. What's your email provider? |
14:05:47 | Tiberium | alaviss, they're manually approved |
14:06:28 | dom96 | Tiberium: Yes, but first the user has to confirm their email |
14:06:30 | alaviss | because they i never got any email, so i retry every month (or less) |
14:06:48 | dom96 | I'll activate alaviss for you |
14:06:51 | alaviss | got one for the latest registration now |
14:07:14 | dom96 | lol |
14:07:18 | Tiberium | alaviss, you just could ask here |
14:07:23 | Tiberium | and not try every month :) |
14:07:26 | alaviss | can you check if the forum has problems with email that has a '+' in it? |
14:07:34 | dom96 | Well, the first one is confirmed now in any case |
14:07:34 | alaviss | I was lazy :)) |
14:07:48 | Tiberium | + is used for registering many accounts with one email :) |
14:07:57 | Tiberium | like on gmail |
14:08:00 | dom96 | alaviss: Are you on gmail or something else? |
14:08:08 | * | haha_ quit (Ping timeout: 246 seconds) |
14:08:09 | alaviss | yeah |
14:08:22 | dom96 | Hrm, well we did have trouble with email a while back |
14:08:30 | dom96 | I guess it was fixed in the meantime? :) |
14:08:37 | Tiberium | [email protected] is equal to [email protected] |
14:08:38 | alaviss | nice, the first one got confirmed |
14:08:46 | alaviss | thanks :) |
14:08:55 | Tiberium | or |
14:08:57 | dom96 | Tiberium: Why are you explaining this? |
14:09:04 | Tiberium | dom96, ah, I don't know, just about "+" |
14:09:15 | alaviss | can you clean up the account mess i created? :p |
14:09:33 | dom96 | not really |
14:09:40 | dom96 | It's fine though :P |
14:11:08 | alaviss | anw, do we have the survey results yet? It's interesting to see what people think about the language |
14:12:04 | Tiberium | on next week I guess |
14:12:55 | Tiberium | interesting to see if there's more or less people who completed the survey |
14:14:13 | dom96 | we have the results but it will take me a while to write up an analysis |
14:14:46 | Tiberium | well hopefully you can write smaller post :) |
14:15:05 | FromGitter | <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:37 | FromGitter | <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:50 | FromGitter | <zacharycarter> @araq: still very wip but - https://github.com/zacharycarter/zax |
15:11:11 | FromGitter | <ephja> @zacharycarter https://nim-lang.org/docs/fsmonitor.html (currently linux only) |
15:11:45 | FromGitter | <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:22 | Ovius | Hi |
15:38:29 | Ovius | I'm going crazy over this but how do I get CPU usage? |
15:38:36 | Ovius | (for the entire system, not just nim) |
15:39:51 | Tiberium | Ovius, read /proc/stat :) |
15:40:31 | Tiberium | and for windows there's some winapi - https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process |
15:40:47 | Tiberium | but I don't know if Nim has bindings to "pdh.h" in windows |
15:42:39 | Ovius | ah, thanks Tiberium |
15:44:46 | Tiberium | well this is not an easy task even in linux |
15:44:51 | Tiberium | you need to read and parse /proc/stat |
15:45:16 | Ovius | yeah |
15:45:53 | * | rauss quit (Read error: Connection reset by peer) |
15:46:28 | dom96 | you might want to find a C library that does this |
15:46:30 | dom96 | and then just wrap it |
15:46:46 | dom96 | of course, writing your own in pure Nim would be fun :) |
15:47:02 | * | rauss joined #nim |
15:47:09 | dom96 | I got printed copies of Nim in Action. yay! |
15:47:14 | Ovius | hm |
15:47:43 | dom96 | It's actually thinner than I thought |
15:51:20 | * | nhywyll joined #nim |
15:54:12 | FromGitter | <zacharycarter> is there any quick way to replace all non alphanumeric characters from a string? |
15:54:17 | FromGitter | <zacharycarter> or strip rather |
15:56:17 | dom96 | hrm, maybe `filter`, not sure if it works on strings though. |
15:56:19 | dom96 | It should |
15:57:30 | * | couven92 quit (Read error: Connection reset by peer) |
15:58:01 | Ovius | Am I going nuts or does the os module not have a function to read the file? |
15:58:29 | FromGitter | <zacharycarter> readFile |
15:58:44 | FromGitter | <zacharycarter> hrm filter doesn't seem to work |
15:59:02 | Tiberium | Ovius, readFile is in system module |
15:59:11 | Tiberium | you don't need any imports for it |
15:59:21 | Ovius | ah |
15:59:26 | Ovius | Tiberium: thanks! |
15:59:34 | Tiberium | https://nim-lang.org/docs/system.html#readFile,string |
16:00:46 | dom96 | Pro Tip: Use https://nim-lang.org/docs/theindex.html to search for procs |
16:00:47 | FromGitter | <zacharycarter> hah |
16:00:51 | FromGitter | <zacharycarter> I knew https://github.com/pragmagic/redux.nim |
16:01:01 | FromGitter | <zacharycarter> was going to be coming around |
16:01:10 | dom96 | lol |
16:01:28 | dom96 | zacharycarter: I think an issue is in order for `filter` and `map` for strings. |
16:01:37 | FromGitter | <zacharycarter> gotcha thanks dom |
16:01:40 | * | sz0 quit (Quit: Connection closed for inactivity) |
16:01:41 | Tiberium | where is all magic from system.nim is implemented? |
16:01:43 | FromGitter | <zacharycarter> until then I'll have to figure out something more clever |
16:01:49 | dom96 | Tiberium: In the compiler. |
16:01:53 | Tiberium | dom96, ah, ok :) |
16:02:06 | dom96 | Search for the name of the magic in the compiler files and you should find something :) |
16:04:48 | Tiberium | also I didn't knew there's "on" and "off" |
16:04:54 | Tiberium | nice aliases actually |
16:06:20 | Ovius | I'm reading the docs but not getting this - |
16:06:34 | Ovius | can I call procs without including brackets? eg echo "test" and echo("test") seem to be the same |
16:07:17 | Tiberium | yes |
16:07:51 | Ovius | And if a function like nre.find has two params, can I call `find target re"regex"`? |
16:08:43 | Tiberium | AFAIK no |
16:08:50 | Tiberium | but you can like this |
16:08:55 | Tiberium | find target, re"regex" |
16:09:01 | Ovius | ah, thank you! |
16:09:18 | Ovius | Tiberium: I'm trying to learn nim at the same time as parsing /proc/stat |
16:09:20 | Ovius | not a fun process :P |
16:10:02 | dom96 | You might want to look into the parseutils module |
16:10:15 | Ovius | dom96: I was going for regex, would that not work? |
16:10:15 | dom96 | I'd advise to stay away from regex if possible :) |
16:10:29 | Ovius | why? |
16:10:30 | dom96 | It'll work, but you'll have a dependency on PCRE |
16:10:35 | Ovius | eh |
16:10:41 | Tiberium | Ovius, or you can use "pegs" as a replacement for regex:) |
16:10:47 | Tiberium | but it's different |
16:10:50 | Ovius | I'm only using this for a small thing |
16:11:01 | Ovius | Tiberium: Pegs are used as compiler parsers right? |
16:11:10 | dom96 | Often though, parseutils is much more flexible than regex IMO |
16:11:32 | Tiberium | Ovius, not only, but nim has pure-nim implementation of pegs |
16:11:36 | Tiberium | and yes, better to use parseutils |
16:11:37 | Ovius | oh |
16:11:48 | Ovius | Off to parse utils wiki page I go |
16:15:33 | Ovius | oh god |
16:16:29 | Tiberium | Ovius, what? |
16:19:06 | Ovius | Tiberium: Learning a new language |
16:19:33 | Ovius | Tiberium: So frustrating! :P |
16:20:04 | Tiberium | why? :) |
16:20:59 | FromGitter | <zacharycarter> hrm i need to figure out how to handle running the binary for my ssg in another directory |
16:21:10 | Ovius | Tiberium: Just used to knowing the intricacies of a language and doing stuff quickly |
16:21:19 | Ovius | Tiberium: Whereas with a new language it's like everything isn't in the right place! |
16:22:15 | Ovius | Tiberium: 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:26 | FromGitter | <zacharycarter> is there a way to ship additional files with a nim binary with nimble? |
16:24:23 | Tiberium | Ovius, why? you just wanted to learn it? |
16:24:53 | Tiberium | there's nim plugins for a plenty of editors |
16:25:03 | Ovius | Tiberium: yep |
16:25:09 | Ovius | Tiberium: I've installed nim.vim |
16:25:58 | Tiberium | there's also https://github.com/baabelfish/nvim-nim |
16:26:14 | Tiberium | with nimsuggest support |
16:26:30 | Tiberium | nimsuggest is basically an autocompletion backend, written in Nim |
16:26:44 | Tiberium | so IDEs don't need to implement their own autocompletion |
16:27:17 | Ovius | Tiberium: Nice, thank you! |
16:27:48 | * | Ovius left #nim ("WeeChat 1.9") |
16:29:39 | Tiberium | hmm, maybe I should try some command-line editor too |
16:29:49 | Tiberium | I've use vim from time to time, but only for very basic stuff |
16:29:59 | FromGitter | <zacharycarter> @dom96: could you offer any insight into this pattern? |
16:30:14 | FromGitter | <zacharycarter> I need certain files to be available to my binary |
16:30:28 | FromGitter | <zacharycarter> and I can't guarantee the location that the binary will be run from |
16:31:00 | Tiberium | statically read files to your binary? |
16:31:08 | Tiberium | on compile-time :P |
16:31:35 | FromGitter | <zacharycarter> how do I do that Tiberium? |
16:31:45 | Tiberium | staticRead and store result in a constant? |
16:31:56 | FromGitter | <zacharycarter> never even heard of this before |
16:31:59 | dom96 | Yeah, static reading would be best |
16:32:10 | dom96 | depends what these files are |
16:32:15 | Tiberium | zacharycarter: https://nim-lang.org/docs/system.html#staticRead |
16:32:39 | FromGitter | <zacharycarter> interesting |
16:32:43 | FromGitter | <zacharycarter> can I static read an entire directory? |
16:33:01 | FromGitter | <zacharycarter> oh doesn't look like it |
16:33:01 | Tiberium | well no |
16:33:11 | Tiberium | but you can read all files from it |
16:33:15 | FromGitter | <zacharycarter> I guess I could use compression |
16:33:27 | Tiberium | well you can walkDir on compiletime |
16:36:21 | Tiberium | and store all files in an array :D |
16:36:48 | Tiberium | well it's too much |
16:37:10 | Tiberium | interesting, can I statically link ALL libraries on linux? when compiling nim |
16:37:28 | FromGitter | <zacharycarter> I'll try zipping |
16:37:30 | Tiberium | *nim project |
16:37:57 | dom96 | what are these files? |
16:38:33 | FromGitter | <zacharycarter> dom96: basically template files for a static site generator |
16:38:39 | FromGitter | <zacharycarter> so html, css, javascript etc |
16:38:50 | Tiberium | ah, nice |
16:38:55 | FromGitter | <zacharycarter> these are the files that each new site will be bootstrapped with |
16:38:56 | Tiberium | but maybe users would change them? |
16:39:03 | FromGitter | <zacharycarter> this is just for like |
16:39:05 | Tiberium | or you would provide the possibility to "overwrite" it? |
16:39:06 | FromGitter | <zacharycarter> tool new project |
16:39:15 | Tiberium | ah, ok then |
16:39:19 | Tiberium | very nice |
16:40:09 | dom96 | What you can do IIRC is use getApplicationDir() |
16:40:19 | dom96 | (name might be slightly different) |
16:40:37 | dom96 | oh, it's getAppDir() |
16:40:46 | dom96 | That should get you the directory of where your binary is |
16:41:18 | FromGitter | <zacharycarter> but how would I install these files along with my binary? |
16:41:26 | FromGitter | <zacharycarter> so I know where they're located |
16:42:15 | Tiberium | just pack your app with files into "zip"? |
16:42:18 | Tiberium | user would unpack them |
16:42:23 | Tiberium | and you'll read files from the current dir |
16:42:28 | dom96 | They will need to be in your 'src' dir |
16:43:07 | FromGitter | <zacharycarter> ahh okay |
16:43:10 | FromGitter | <zacharycarter> didn't realize I could do that |
16:52:05 | FromGitter | <zacharycarter> cool thank you both for the help I got it working |
16:57:49 | dom96 | awesome:) |
16:59:37 | * | zahary_ joined #nim |
17:10:38 | FromGitter | <ephja> has anyone done anything interesting with concepts yet? |
17:11:49 | * | madmalik joined #nim |
17:18:41 | FromGitter | <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:33 | FromGitter | <zacharycarter> could I create a macro that would act like handlebars |
17:44:53 | FromGitter | <zacharycarter> I'm basically trying to create a macro that lets me type {{some wildcard here}} |
17:45:01 | dom96 | handlebars? |
17:45:15 | FromGitter | <zacharycarter> so I have |
17:45:25 | FromGitter | <zacharycarter> macro `{{`*(tag: untyped): untyped = ⏎ discard |
17:45:52 | FromGitter | <zacharycarter> is there a way to allow for a wildcard inside of a macro? |
17:46:07 | Tiberium | are you doing a template engine? |
17:46:50 | FromGitter | <zacharycarter> not exactly |
17:46:57 | FromGitter | <zacharycarter> I'm extending karax |
17:47:22 | FromGitter | <zacharycarter> with this ssg - so you can basically write a template in karax and write partials in karax |
17:47:59 | FromGitter | <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:57 | dom96 | Unfortunately I don't think you can have enclosing macros |
18:05:08 | * | Matthias247 joined #nim |
18:14:10 | * | haha_ joined #nim |
18:15:05 | FromGitter | <zacharycarter> gotcha |
18:16:45 | * | haha_ quit (Client Quit) |
18:21:19 | dom96 | This 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:44 | FromGitter | <zacharycarter> okay this is pretty awesome |
18:36:29 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59909c2dc101bc4e3a142017] |
18:36:32 | FromGitter | <ephja> not so much if you can't define such operators yourself |
18:36:58 | FromGitter | <zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59909c492723db8d5e9e15c5] |
18:37:21 | FromGitter | <zacharycarter> ```return buildHtml(tdiv(class="main")): ⏎ text("Post!")``` [https://gitter.im/nim-lang/Nim?at=59909c61614889d47544a195] |
18:38:04 | FromGitter | <zacharycarter> if I can pass through include |
18:38:10 | FromGitter | <zacharycarter> which I highly doubt |
18:38:17 | FromGitter | <zacharycarter> I'll be estatic |
18:41:40 | * | couven92 joined #nim |
18:52:11 | Tiberium | zacharycarter: you can do this pretty easily in Nim already |
18:52:21 | Tiberium | just create an alias |
18:52:34 | dom96 | zacharycarter: what are you working on? |
18:53:56 | FromGitter | <zacharycarter> dom96: I'm trying to create a static site generator for karax |
18:54:02 | FromGitter | <zacharycarter> where you can build your templates using karax |
18:54:05 | FromGitter | <zacharycarter> and inject markdown into them |
18:54:25 | dom96 | but karax is an SPA framework |
18:54:52 | dom96 | are you going to be using it to generate html statically? |
18:55:44 | FromGitter | <zacharycarter> the concept I'm aiming for is similar to : https://www.gatsbyjs.org/ |
18:56:28 | FromGitter | <zacharycarter> so I want to ideally be generating karax |
18:58:07 | * | haha_ quit (Quit: haha_) |
18:59:01 | dom96 | hrm |
18:59:10 | dom96 | so it's a static site run by an SPA framework I guess |
18:59:19 | Tiberium | well I doubt Araq would agree on this: https://docs.perl6.org/language/unicode_texas.html |
18:59:42 | dom96 | so you don't need to get a fresh request when you click on an article |
19:01:01 | subsetpark | good christ Tiberium |
19:01:21 | * | haha_ joined #nim |
19:02:07 | * | kalexm quit (Remote host closed the connection) |
19:02:28 | Tiberium | well it's actually pretty easy to create templates for equality operators |
19:02:31 | * | haha_ quit (Client Quit) |
19:03:03 | Tiberium | but not for numbers in unicode |
19:03:42 | FromGitter | <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:27 | FromGitter | <zacharycarter> or actually you could just run it and see it |
19:04:52 | Tiberium | at least you can do "const ⅒ = 1/10" already in Nim |
19:06:57 | * | kalexm joined #nim |
19:08:38 | FromGitter | <zacharycarter> dom96: https://github.com/zacharycarter/zax |
19:08:54 | FromGitter | <zacharycarter> specifically: https://github.com/zacharycarter/zax/tree/master/src/template |
19:09:17 | FromGitter | <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:50 | dom96 | Looks awesome. Can't test right now though. |
19:14:17 | dom96 | subsetpark: did you figure out the Nimble issues? |
19:14:56 | subsetpark | dom96: Nope. Some time Friday I pasted the output of trying to nimble install compiler@#head and then nimble@#head - did you see that? |
19:15:10 | dom96 | I asked you a follow up question IIRC |
19:15:14 | dom96 | I guess you missed it |
19:15:45 | subsetpark | I definitely did... |
19:15:52 | dom96 | https://irclogs.nim-lang.org/11-08-2017.html#22:30:32 |
19:16:59 | subsetpark | ah, thanks |
19:21:38 | subsetpark | dom96: pkgs/lib does not exist |
19:23:50 | dom96 | subsetpark: can you verify via `which nimble` that it's ~/.nimble/bin/nimble that you're executing? |
19:24:19 | subsetpark | [i] ~/.nimble ; which nimble |
19:24:19 | subsetpark | /home/zax/.nimble/bin/nimble |
19:24:19 | subsetpark | [i] ~/.nimble ; nimble --version |
19:24:20 | subsetpark | nimble v0.8.6 compiled at 2017-08-10 21:30:24 |
19:24:20 | subsetpark | [i] ~/.nimble ; |
19:25:31 | dom96 | subsetpark: which nim; plz |
19:26:14 | subsetpark | [i] ~/.nimble ; which nim |
19:26:14 | subsetpark | /home/zax/.nimble/bin/nim |
19:26:14 | subsetpark | [i] ~/.nimble ; nim --version |
19:26:15 | subsetpark | Nim Compiler Version 0.17.1 (2017-08-10) [Linux: amd64] |
19:26:43 | * | yglukhov joined #nim |
19:27:53 | dom96 | this is weird. |
19:28:36 | dom96 | Just to see if this works: set the NIM_LIB_PREFIX env var equal to wherever your stdlib is. |
19:29:27 | dom96 | Even if this does work though I would like to know why the automatic detection is failing. Hope you don't mind. |
19:30:33 | subsetpark | that would be ~/.choosenim/toolchains/nim-#head/lib I believe? |
19:32:14 | dom96 | yes |
19:32:24 | dom96 | You can always try it and adjust anyway :) |
19:32:48 | dom96 | Another useful piece of information is `nim -v` (or `choosenim show` :)) |
19:32:53 | * | yglukhov quit (Remote host closed the connection) |
19:34:01 | couven92 | if 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:27 | couven92 | or should the macro simply emit `when not declared(strutils): import strutils` |
19:35:03 | dom96 | bindSym IIRC |
19:35:13 | couven92 | dom96, inside the macro? |
19:35:19 | dom96 | yes |
19:35:21 | couven92 | bindSym strutils? |
19:35:24 | dom96 | no |
19:35:33 | dom96 | Instead of newIdentNode("toUpper") |
19:35:36 | dom96 | bindSym("toUpper"0 |
19:35:38 | dom96 | *) |
19:35:41 | couven92 | ah |
19:35:43 | dom96 | or whatever proc you want |
19:35:47 | couven92 | ok |
19:36:26 | subsetpark | dom96: 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:51 | dom96 | wat |
19:36:52 | subsetpark | However! 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:56 | dom96 | wait wait |
19:37:02 | dom96 | but you didn't create this env var yet, right? |
19:37:28 | dom96 | remember you were running `nimble dump` last time |
19:38:01 | subsetpark | yes that works too |
19:38:09 | subsetpark | but let me see the state of my env |
19:38:35 | subsetpark | oh thank goodness - the var is there already :) so yes, the var fixes it |
19:38:42 | * | haha_ quit (Quit: haha_) |
19:38:42 | dom96 | lol |
19:38:52 | subsetpark | yes, without the var the same issue happens |
19:38:56 | dom96 | ok good. So we can continue investigating |
19:39:01 | subsetpark | :) |
19:39:08 | dom96 | `nim -v` and/or `choosenim show` plz |
19:39:21 | dom96 | (of course if you don't have the will/time just let me know) |
19:40:09 | * | ipjk joined #nim |
19:40:16 | subsetpark | dom96: no, happy to keep going |
19:40:50 | subsetpark | [i] develop ~/mksp-src/syphus-nim ; nim -v |
19:40:50 | subsetpark | Tip: 1 messages have been suppressed, use --verbose to show them. |
19:40:50 | subsetpark | Error: Unable to parse config file: Unknown key: path |
19:40:50 | subsetpark | Info: If unexpected, please report this error to https://github.com/dom96/choosenim |
19:40:50 | subsetpark | [i] develop ~/mksp-src/syphus-nim ; choosenim show |
19:40:50 | subsetpark | Tip: 1 messages have been suppressed, use --verbose to show them. |
19:40:51 | subsetpark | Error: Unable to parse config file: Unknown key: path |
19:41:20 | subsetpark | (they both seem to call a different version of nimble, not nimble@#head) |
19:41:42 | dom96 | whoa wat |
19:41:43 | * | yglukhov joined #nim |
19:42:41 | dom96 | this is an incredibly interesting debugging journey :) |
19:42:56 | subsetpark | happy to keep throwing you curveballs.. |
19:43:44 | dom96 | but how was this working before? |
19:43:57 | dom96 | wait, so `nimble -v` works? |
19:44:02 | dom96 | but `nim -v` gives that error? |
19:46:49 | dom96 | So you were actually the one that implemented this `path` key for Nimble's config: https://github.com/nim-lang/nimble/commit/c89ca099a2a108819bc6793d1864578323c0ddb6 |
19:47:17 | dom96 | choosenim was compiled using an older version of Nimble |
19:47:54 | dom96 | and so it isn't aware of this config option |
19:48:32 | dom96 | but `nimble -v` should have failed with the same error |
19:48:43 | dom96 | ls -la ~/.nimble/bin |
19:49:31 | subsetpark | yes to your two above questions |
19:50:12 | subsetpark | https://www.irccloud.com/pastebin/86YTjGVc/ |
19:50:46 | subsetpark | which makes sense - nimble was responsible for the up to date version of nimble; choosenim is responsible for the other binaries |
19:51:15 | dom96 | oh ok. Hrm. |
19:52:06 | subsetpark | so there seem to be two things going on: |
19:52:24 | subsetpark | 1. nim has its own idea of where to call nimble from that doesn't get updated by nimble; |
19:52:27 | dom96 | okay, I think I see what's happened. |
19:52:49 | subsetpark | 2. the whole lib/system thing (!??) |
19:52:53 | dom96 | For reference, here is the function that handles this: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptsupport.nim#L191 |
19:53:16 | dom96 | No to #1. Nim never calls Nimble. |
19:53:37 | dom96 | The "symlinks" that choosenim creates are actually binaries |
19:54:03 | dom96 | Which read the Nimble config |
19:54:44 | subsetpark | ah i see |
19:55:03 | dom96 | But right now I can't remember why that's necessary |
19:55:21 | dom96 | Its necessary for choosenim so that it knows where to place these "symlinks" |
19:55:31 | dom96 | (because ~/.nimble can be changed to a different path) |
19:55:39 | dom96 | *It's |
19:56:11 | dom96 | Not too much I can do about that. |
19:56:29 | dom96 | Except maybe make it continue if it encounters keys that it doesn't know. |
19:57:20 | * | pilne joined #nim |
19:57:37 | dom96 | As far as #2 is concerned though... in the way that you have set up Nimble and Nim the heuristic is broken. |
19:58:01 | dom96 | It falls back to using `getAppDir().head` to find the Nim stdlib |
19:59:09 | subsetpark | Is there a non-breaking way to get a version of nimble installed that understands the `path` key? |
19:59:58 | dom96 | Your Nimble understands it |
20:00:52 | dom96 | But yeah, it's broken because of this issue. You can fix that by setting the environment var |
20:01:00 | subsetpark | yes, 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 nimble@#head` will magically break things. |
20:01:18 | dom96 | choosenim will remain broken though |
20:01:46 | subsetpark | yeah, that's not great. |
20:02:29 | dom96 | Yeah, I will have to fix choosenim so that it doesn't die when it encounters an unknown key in Nimble's config. |
20:04:21 | dom96 | So there is basically like a too damn high amount of combinations of how Nim and Nimble can be installed together. |
20:04:43 | dom96 | Araq's solution would just be to say "okay, the Nim and Nimble binaries always have to be in the same directory." |
20:05:35 | dom96 | That would fix all of these problems sure, but it would also be quite a big constraint. |
20:06:02 | dom96 | And 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:41 | dom96 | I 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:06 | dom96 | And 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:24 | dom96 | Like "Sorry, can't find your stdlib. Please set this environment variable to its location" |
20:09:36 | dom96 | Does that make sense? |
20:10:47 | subsetpark | Yeah, 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:26 | dom96 | yep |
20:11:33 | subsetpark | The other thing you could do is - ask nim |
20:12:57 | dom96 | That's very true. A ``getStdlibLocation`` (or something) command for the Nim compiler would be handy |
20:13:07 | dom96 | Not sure if Araq would approve. |
20:14:09 | * | yglukhov quit (Remote host closed the connection) |
20:14:37 | subsetpark | well, as soon as my choosenim works, i'll get bugfix for why it interprets mksp_packages.json as mksppackages.json :) |
20:15:39 | dom96 | style insensitivity I guess? :) |
20:16:43 | Araq | that's right, Araq's solution works and the others don't. |
20:18:10 | Araq | "constraints" ensure that things work. |
20:18:54 | dom96 | In that case I should simply disallow the installation of Nimble via Nimble |
20:19:07 | dom96 | Which wouldn't help subsetpark achieve what he wants |
20:20:32 | Araq | what is it that he wants? |
20:21:05 | dom96 | Install Nimble@#head on top of 0.17.0 (right?) |
20:21:58 | Araq | and how am I gonna implement getStdlibDir() ? |
20:22:35 | subsetpark | dom96: right |
20:22:48 | subsetpark | well, install nimble@#head at all, really |
20:23:10 | dom96 | you can also just `choosenim devel` |
20:23:17 | dom96 | that should get you Nimble@#head as well |
20:23:40 | dom96 | Araq: same way you get it currently in the compiler |
20:23:44 | dom96 | getAppDir().head |
20:24:25 | dom96 | (btw choosenim puts all binaries in the same `bin` directory :)) |
20:24:35 | subsetpark | dom96: `choosenim #head` gives you nimble 0.8.6 |
20:25:20 | subsetpark | which 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:26:58 | dom96 | hrm |
20:27:14 | dom96 | well I do have an issue which mentions implementing a `--newest-nimble` flag: https://github.com/dom96/choosenim/issues/23 |
20:27:26 | dom96 | But I guess I may as well allow you to select a version of it |
20:27:59 | Araq | getAppDir().head is not a solution at all |
20:28:16 | dom96 | Araq: That's what the compiler uses currently for this... |
20:28:23 | Araq | findExe"nim" /../ "lib" but that's like rolling a dice |
20:28:46 | Araq | the compiler knows it's nim.exe, is the app that calls getStdLib() also nim.exe? dubious. |
20:29:01 | dom96 | The idea is for the app to call `nim getStdlibLocation` |
20:29:09 | dom96 | Nim always knows where its stdlib is |
20:29:47 | Araq | when you call 'nim getStdlibLocation' you know where nim.exe is, otherwise you couldn't call it |
20:30:03 | Araq | if you know where nim.exe is, you also know where its lib is |
20:30:48 | dom96 | subsetpark: You can also hackishly cp ~/.nimble/pkgs/nimble-#head/nimble ~/.choosenim/toolchains/nim-whatever/bin/nimble |
20:31:05 | dom96 | Araq: No, you don't. |
20:31:13 | Tiberium | nimble is a standalone binary? cool |
20:31:35 | dom96 | Not when `nim` is a proxy binary |
20:31:37 | Araq | of course you do, or you use findExe"nim" to find it |
20:31:51 | Araq | there is no "proxy" binary, findExe resolves symlinks |
20:31:57 | dom96 | there is for choosenim |
20:32:33 | dom96 | It's a binary that executes the real `nim` |
20:32:37 | dom96 | hence the problem |
20:32:43 | Araq | omg wtf |
20:32:56 | Araq | choosenim simulates a nim.exe? |
20:33:20 | dom96 | It creates a simple binary that passes all command line args to nim.exe |
20:33:41 | Araq | so ... the binary then knows where nim.exe is? |
20:33:58 | Araq | btw 'koch nimble' also gives you the latest nimble if you built from source |
20:34:18 | * | sz0 joined #nim |
20:34:26 | dom96 | subsetpark: I just did `choosenim update #head` and it installed Nimble 0.8.7 |
20:34:37 | dom96 | Araq: yes |
20:36:21 | * | BitPuffin|osx joined #nim |
20:36:38 | subsetpark | dom96: interesting. Let me try that and report back |
20:37:21 | Araq | ok, so ... who would exec 'nim getstdlib' again? nimble? |
20:38:07 | dom96 | Yeah. |
20:38:15 | subsetpark | Yes to my understanding |
20:38:24 | dom96 | I don't think it's necessary though |
20:38:50 | dom96 | I will instead make it easy to select the Nimble version with choosenim |
20:39:00 | dom96 | And give users a nice error message if they install Nimble in some odd way |
20:39:14 | dom96 | Telling them they can set the env var if they please |
20:39:37 | Araq | don't you dare making me setup a stupid environment var |
20:39:54 | dom96 | Calm down. You won't have to. |
20:40:01 | Araq | :P |
20:40:15 | dom96 | You love to keep your Nim and Nimble close. |
20:40:51 | dom96 | If it turns out that this environment var needs to be set too often then we can see about implementing this Nim command. |
20:41:28 | Araq | I don't "love" it, it's just that it works, it makes sense and all the other solutions don't. |
20:42:34 | Araq | it'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:16 | couven92 | Araq, how to you apply doc comments to importc procs that do not have a body? |
20:56:31 | couven92 | s/to/do |
21:05:40 | Araq | proc foo() {.importc.} |
21:05:44 | Araq | ## comment here? |
21:11:42 | dom96 | https://twitter.com/d0m96/status/896840572266328064 |
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:16 | FromGitter | <zacharycarter> how can I do |
21:32:39 | FromGitter | <zacharycarter> let var = "text("""abc""")" |
21:33:32 | FromGitter | <zacharycarter> sorry |
21:33:45 | FromGitter | <zacharycarter> I mean var abc = "text("""abc""")" |
21:34:49 | dom96 | escape the " I guess? |
21:35:08 | FromGitter | <zacharycarter> all six of them? |
21:35:21 | * | kalexm quit (Ping timeout: 255 seconds) |
21:36:12 | FromGitter | <zacharycarter> okay got it working |
21:42:46 | subsetpark | dom96: 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:57 | dom96 | subsetpark: cool, thanks. |
21:44:21 | dom96 | so did choosing #head give you nimble@#head? |
21:44:31 | * | nhywyll quit (Quit: nhywyll) |
21:49:05 | * | Sentreen quit (Ping timeout: 246 seconds) |
21:50:35 | couven92 | how do you goto another case in Nim? |
21:51:43 | Araq | of valueA, valueB: ... |
21:51:55 | Araq | you cannot 'goto' but you can collect the values |
21:52:04 | Araq | into a list |
21:52:31 | couven92 | Araq, 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:09 | couven92 | Araq, 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:12 | FromGitter | <zacharycarter> damnit meant to drag that into imgur |
21:56:58 | Araq | use a macro? |
21:57:33 | couven92 | Araq, and invoke the macro through pragma syntax? that's an idea... |
21:57:53 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/HyiG/zax.gif) |
21:58:41 | FromGitter | <zacharycarter> ugh can't even read the font |
21:58:51 | * | Trustable quit (Remote host closed the connection) |
21:59:25 | Araq | zacharycarter: do you know how to make karax "partial"? |
21:59:32 | Araq | hard to describe my question |
21:59:40 | FromGitter | <zacharycarter> I think I know what you mean |
21:59:57 | FromGitter | <zacharycarter> so like portions of the vdom can get injected |
22:00:32 | FromGitter | <zacharycarter> I think you're already there with components |
22:00:49 | Araq | yeah well, no. |
22:00:52 | FromGitter | <zacharycarter> but I'm probably not thinking the same way you are |
22:01:10 | Araq | my idea is to mix "reactive lists" with karax, so usually karax works as before, however |
22:01:20 | Araq | you can also write something like |
22:01:34 | Araq | persons.map(personToVNode) |
22:01:50 | Araq | and then whenever person changes, its corresponding VNode gets computed |
22:01:56 | FromGitter | <zacharycarter> gotcha |
22:02:05 | Araq | but nothing else, so O(1) instead of O(n) |
22:02:14 | * | Sentreen joined #nim |
22:02:44 | FromGitter | <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:38 | Araq | react doesn't do that at all |
22:04:48 | Araq | maybe some addons on top of react do |
22:05:57 | FromGitter | <zacharycarter> oh |
22:06:27 | FromGitter | <zacharycarter> I meant just like iterating over collections and rendering components |
22:06:40 | FromGitter | <zacharycarter> I didn't realize that reacts list weren't "reactive" |
22:07:01 | dom96 | what does "reactive" even mean? :) |
22:07:27 | FromGitter | <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:29 | FromGitter | <zacharycarter> apparently nim yaml load doesn't work with threads |
22:53:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:57:49 | FromGitter | <zacharycarter> bummer |
23:01:17 | FromGitter | <zacharycarter> json it is |
23:06:52 | * | Matthias247_ quit (Read error: Connection reset by peer) |
23:13:59 | Tiberium | It's there any Nim wrapper for cimgui or imgui? |
23:14:51 | Tiberium | I mean Dear imgui |
23:30:47 | FromGitter | <zacharycarter> Tiberium: my nuklear wrapper |
23:32:14 | Tiberium | Well it's not "dear imgui" :) |
23:32:25 | Tiberium | Imgui 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) |