| 00:11:49 | FromGitter | <coocheenin> @FromIRC <shashlick> thank you! I will check tomorrow. |
| 00:12:07 | ryukoposting | did somebody say musl |
| 00:14:18 | * | matti quit (Quit: Oh dear ...) |
| 00:17:27 | * | matti joined #nim |
| 00:27:02 | * | stefanos82 quit (Remote host closed the connection) |
| 00:27:53 | * | leorize joined #nim |
| 00:33:26 | * | rockcavera joined #nim |
| 01:00:28 | * | dddddd quit (Remote host closed the connection) |
| 01:02:09 | * | noeontheend quit (Ping timeout: 244 seconds) |
| 01:12:00 | * | ptdel joined #nim |
| 01:12:39 | * | carlosmmiranda[m left #nim ("User left") |
| 01:18:44 | ptdel | Hello. I'm a stodgy, corporate type from a Python/Typescript shop that lurks the Nim repos. Just stopping by to say please keep up your great work, I love seeing this group dedicated to the language and it's stdlib. My coworkers are already impressed and refreshed by the functionality inherit to Nim, we are cheering for you. |
| 01:22:51 | * | icebattle quit (Quit: leaving) |
| 01:27:14 | ryukoposting | ^ |
| 01:28:33 | FromGitter | <brentp> I am getting ` Error: Cannot satisfy the dependency on c2nim #3ec45c24585ebaed and c2nim 0.9.14` on a `nimble install` but I can't find what is depending on 0.9.14. Is there a way to make that more obvious? |
| 01:28:49 | FromGitter | <brentp> nimgen is pinned to 3ec45c24585ebaed |
| 01:29:22 | shashlick | brentp on the road |
| 01:29:33 | shashlick | But I ran into this recently |
| 01:29:41 | shashlick | What packages do you require |
| 01:30:35 | FromGitter | <brentp> @shashlick: https://github.com/brentp/slivar/blob/master/slivar.nimble#L21 |
| 01:31:00 | FromGitter | <gogolxdong> Hi, shashlick , morning. |
| 01:31:14 | * | onionhammer joined #nim |
| 01:33:31 | * | onionhammer1 quit (Ping timeout: 246 seconds) |
| 01:34:47 | shashlick | Hey @gogolxdong |
| 01:35:13 | shashlick | brentp I know duktape used nimgen, need to check the others |
| 01:35:50 | shashlick | I had to pin since the newer hash broke something |
| 01:36:52 | FromGitter | <gogolxdong> Do you mean C++ AST mapping to Nim is not completed in nimterop? |
| 01:37:00 | FromGitter | <brentp> yes, duktape uses, but I don't seen anything else. I went through the deps recursively and didn't see where it was defined. |
| 01:37:33 | FromGitter | <brentp> ... defined to require c2nim 0.9.14 |
| 01:38:16 | shashlick | https://github.com/nim-lang/c2nim/commit/be3e8b9ab81c25cc0cb10b1ae117da57f71560e3#r31256227 |
| 01:38:21 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
| 01:39:07 | FromGitter | <gogolxdong> Is it the matter of so much code to do as well? |
| 01:40:32 | * | zachk quit (Quit: Leaving) |
| 01:41:38 | shashlick | @gogolxdong ya I've not gotten that far yet, still since c stuff remains |
| 01:41:52 | shashlick | Do want to get that right before going to c++ |
| 01:41:59 | shashlick | You can use c2nim though |
| 01:42:34 | shashlick | brentp ya I'm not sure I remember, let me try and find out |
| 01:44:15 | FromGitter | <brentp> @shaslick looks like it might have been fixed: https://github.com/nim-lang/c2nim/issues/131 |
| 01:44:47 | FromGitter | <gogolxdong> checked cpp parser of treesitter , 144K loc is overwhelming |
| 01:44:51 | FromGitter | <brentp> nevermind. I guess that's when it was broken. :( |
| 01:46:48 | FromGitter | <gogolxdong> c2nim doesn't process cpp properly as well, iirc |
| 01:48:39 | FromGitter | <gogolxdong> It seems have to farm manually. |
| 01:51:08 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 01:51:21 | shashlick | @gogolxdong if you can identify the files to wrap, I can give it a go |
| 01:51:45 | shashlick | @brentp is duktape c or c++ |
| 01:51:52 | * | rockcavera quit (Remote host closed the connection) |
| 01:52:11 | FromGitter | <gogolxdong> What's your time now? |
| 01:53:40 | FromGitter | <gogolxdong> I could extract the dependency according to the gn ninja make file sent last night. |
| 01:55:36 | * | rockcavera joined #nim |
| 01:56:09 | FromGitter | <brentp> @shashlick it is C |
| 01:58:03 | FromGitter | <gogolxdong> tools/quic/quic_simple_client_bin.cc |
| 01:58:08 | FromGitter | <gogolxdong> tools/quic/quic_simple_server_bin.cc |
| 01:59:22 | * | noeontheend joined #nim |
| 02:01:01 | shashlick | Neat |
| 02:05:36 | FromGitter | <gogolxdong> For the deps I suggest you fetch the code entirely, as the instruction. |
| 02:10:54 | shashlick | brentp: testing with devel from few days ago on Windows |
| 02:11:21 | FromGitter | <brentp> it's odd. I can get it to work on my machine, but it fails in a docker container. |
| 02:11:58 | shashlick | that's cause something is already installed |
| 02:12:07 | shashlick | bpbio isn't installing with devel |
| 02:12:10 | shashlick | should I install #head |
| 02:14:30 | shashlick | well it's cause duktape isn't installed |
| 02:15:28 | shashlick | hmm, I don't have hg so it is unable to install duktape for me |
| 02:16:20 | shashlick | why is it asking for hg |
| 02:19:27 | shashlick | some nimble bug which causes #dev to make it run hg |
| 02:29:12 | * | abm quit (Ping timeout: 245 seconds) |
| 02:29:23 | FromGitter | <brentp> hmm. yeah. I tagged bpbio v0.1.2, but now that's not building for me. I'll start there. thanks for looking into it. |
| 02:37:49 | * | rockcavera quit (Remote host closed the connection) |
| 03:01:03 | FromGitter | <brentp> @shashlick not sure what's with the error message about c2nim, but there is a problem in duktape-nim because https://github.com/brentp/duktape-nim/blob/dev/duktape/src/duktape.h#L213 is a forward decl, then there's a type def, then the actual definition: https://github.com/brentp/duktape-nim/blob/dev/duktape/src/duktape.h#L244 |
| 03:02:35 | * | banc quit (Quit: Bye) |
| 03:06:01 | FromGitter | <brentp> oh. that only occurs with the more recent c2nim |
| 03:11:50 | * | theelous3 quit (Ping timeout: 244 seconds) |
| 03:18:37 | FromGitter | <brentp> so. I got the dockerfile working by adding `nimble install -y c2nim@#3ec45c24585ebaed` explicitly. not sure why that works but I'll take it. |
| 03:23:29 | shashlick | If duktape is c, you can just use nimterop directly |
| 03:23:35 | * | banc joined #nim |
| 03:23:37 | shashlick | No complicated dependencies |
| 03:23:52 | shashlick | Or just check in the generated Nim code |
| 03:24:21 | * | nsf joined #nim |
| 03:26:12 | shashlick | But if that works, don't bother |
| 03:30:26 | FromGitter | <brentp> I'll leave it for now, would have used nimterop, but someone had already started duktape using nimgen. |
| 03:32:59 | shashlick | Ya it's been around for a while |
| 04:08:44 | FromGitter | <brentp> it's not possible to do: `nimble install "somepkg >= 1.0"` ? |
| 04:08:55 | FromGitter | <brentp> only `nimble install "somepkg"` |
| 04:15:48 | * | amosbird_ joined #nim |
| 04:19:08 | * | amosbird_ is now known as amosbird |
| 04:23:16 | * | noeontheend quit (Ping timeout: 246 seconds) |
| 04:42:35 | shashlick | You can in the require statement I think |
| 04:51:25 | * | noonien quit (Quit: Connection closed for inactivity) |
| 04:54:27 | * | noeontheend joined #nim |
| 05:06:39 | * | leorize quit (Quit: WeeChat 2.3) |
| 05:28:53 | FromGitter | <gogolxdong> @shashlick , around? |
| 05:30:29 | FromGitter | <gogolxdong> I made a repository for extracted dependencies to build quic_server and quic_client. https://github.com/gogolxdong/QUIC |
| 05:31:00 | FromGitter | <gogolxdong> which still has 30MB |
| 05:33:36 | shashlick | Going to bed, and a busy couple days but I will take a look on Friday |
| 05:38:11 | FromGitter | <gogolxdong> sure, good night. |
| 06:03:01 | * | noeontheend quit (Ping timeout: 246 seconds) |
| 06:06:41 | * | Arlenx joined #nim |
| 06:12:34 | * | narimiran joined #nim |
| 06:37:20 | * | leorize joined #nim |
| 06:42:45 | * | ptdel quit (Remote host closed the connection) |
| 06:58:52 | * | Arlenx quit (Quit: Leaving) |
| 07:08:59 | * | Vladar joined #nim |
| 07:14:51 | * | krux02 joined #nim |
| 07:28:48 | * | pwntus joined #nim |
| 07:38:10 | * | amosbird left #nim ("WeeChat 2.4") |
| 07:47:32 | * | rockcavera joined #nim |
| 08:00:00 | * | gmpreussner_ quit (Quit: kthxbye) |
| 08:04:54 | * | gmpreussner joined #nim |
| 08:07:19 | * | PMunch joined #nim |
| 08:09:04 | * | rockcavera quit (Remote host closed the connection) |
| 08:14:49 | FromDiscord | <Zireael> hey guys, I am using a dll for native app, but I would like to have a web version of the same app. is there a way to tell nim compiler to ignore this line (e.g. this one dynlib import) if compiling for javascript? |
| 08:15:04 | FromDiscord | <Zireael> I've looked through the docs and can't figure it out |
| 08:16:03 | PMunch | when defined(js) |
| 08:16:07 | PMunch | Or something like that |
| 08:18:58 | PMunch | github.com/nim-lang/Nim/wiki/Consts-defined-by-the-compiler |
| 08:19:12 | FromDiscord | <Zireael> aaa, one place I haven't tried looking, thanks |
| 08:20:30 | PMunch | Yeah, this works: http://ix.io/1C91/Nim |
| 08:20:41 | PMunch | No problem :) |
| 08:22:32 | FromDiscord | <Zireael> are there any app/game cross-platform framework/engines? I have tried searching github and I'm having trouble finding stuff that isn't, like, 3 years old |
| 08:28:09 | PMunch | Depends on what exactly you're looking for |
| 08:28:25 | PMunch | For a game you can use SDL cross-platform |
| 08:28:59 | PMunch | I guess the Godot bindings could do that as well |
| 08:29:21 | FromDiscord | <Zireael> I want to leverage webgl 1 because some phones have sucky webgl2 support |
| 08:29:31 | FromDiscord | <Zireael> (webgl 1 for web, obviously) |
| 08:29:57 | FromDiscord | <Zireael> I don't think SDL bindings can be used with js target, because well, they use a dynlib... |
| 08:30:22 | PMunch | So you're writing a web-based game for phones? |
| 08:32:15 | * | rockcavera joined #nim |
| 08:32:38 | PMunch | I guess you could try the bgfx bindings: https://github.com/Halsys/nim-bgfx |
| 08:35:15 | * | rockcavera quit (Remote host closed the connection) |
| 08:38:42 | PMunch | You should be able to use SDL with emscripten I think |
| 08:38:51 | FromDiscord | <Zireael> yeah, pretty much - I tried my Godot game's build on my own phone and nope, doesn't work because sucky drivers on said phone |
| 08:39:18 | FromDiscord | <Zireael> and I want the game to be playable on my own device, so... 😛 |
| 08:40:14 | FromDiscord | <Zireael> bgfx... oh wow, it supports webgl 1 too? ❤ thanks a lot |
| 08:41:11 | * | rockcavera joined #nim |
| 08:43:59 | PMunch | Have you tried SDL on your phone? |
| 08:44:25 | FromDiscord | <Zireael> SDL is something I never tried using so far 😛 - I only heard of it |
| 08:45:45 | PMunch | I've got it running on my phone, with pretty decent performance even :) |
| 08:46:39 | PMunch | forum.nim-lang.org/t/640 |
| 08:47:44 | * | NimBot joined #nim |
| 08:47:53 | PMunch | Uh oh, you alright there NimBot? |
| 08:48:07 | PMunch | forum.nim-lang.org/t/640 |
| 08:48:27 | * | JustASlacker joined #nim |
| 08:52:54 | * | bobby quit (Ping timeout: 268 seconds) |
| 08:54:30 | * | bobby joined #nim |
| 09:02:18 | * | bobby quit (Ping timeout: 258 seconds) |
| 09:02:37 | * | bobby joined #nim |
| 09:06:44 | * | floppydh joined #nim |
| 09:09:37 | * | cornfeedhobo quit (Ping timeout: 245 seconds) |
| 09:24:19 | * | neceve joined #nim |
| 09:33:23 | FromGitter | <coocheenin> @shashlick, Morning! Could you so glade to share your 32bit binary (via hbb) of nimble and other nim-tools, that are created during koch execution? NIM Compiler itself working like a charm. |
| 09:43:51 | PMunch | If the Nim compiler works it should be possible to build to other tools with it |
| 09:56:29 | FromGitter | <alehander42> what happened to @timotheecour |
| 09:56:40 | FromGitter | <alehander42> i havent seen commits by him lately |
| 09:58:27 | FromGitter | <coocheenin> ☝️ February 26, 2019 11:20 PM (https://gitter.im/nim-lang/Nim?at=5c759fab4a65f754733091df) @PMunch Sad, but no way |
| 09:59:24 | PMunch | Aah I see |
| 09:59:42 | PMunch | alehander42, yeah I haven't seen him around lately either |
| 10:03:35 | * | kapil____ joined #nim |
| 10:12:00 | * | abm joined #nim |
| 10:39:08 | * | couven92 joined #nim |
| 10:56:14 | FromGitter | <mratsim> 🎆 https://github.com/nim-lang/Nim/commit/ca4b971bc81b2e751e0388d80896fde7079b1679 |
| 11:01:55 | * | dddddd joined #nim |
| 11:23:39 | * | cornfeedhobo joined #nim |
| 11:29:34 | * | Pisuke quit (Ping timeout: 250 seconds) |
| 11:29:36 | * | Sembei joined #nim |
| 11:50:51 | PMunch | mratsim, wow really? |
| 11:50:57 | PMunch | It's now in Nim devel? |
| 11:51:29 | * | ng0 joined #nim |
| 12:17:05 | FromGitter | <kaushalmodi> @alehander42 yeah, I was wondering the same .. missing @timotheecour around here |
| 12:24:02 | shashlick | @coocheenin: where should I upload the binary? |
| 12:25:51 | shashlick | 6.5mb around |
| 12:33:54 | * | leorize quit (Ping timeout: 258 seconds) |
| 12:35:38 | * | leorize joined #nim |
| 12:38:54 | shashlick | Here try this link - https://transfernow.net/21ivp4d7pi00 |
| 12:39:04 | shashlick | Expires in 6 days |
| 12:40:12 | FromGitter | <coocheenin> @shashlick Done! Thanks a lot. |
| 12:43:11 | shashlick | Here are the scripts to make this yourself |
| 12:43:16 | shashlick | https://gist.github.com/genotrance/8789260aff1570c7c5fe930eaba7ce33 |
| 12:43:28 | shashlick | Let me know if the bin works |
| 12:44:26 | shashlick | Holy build box scripts to build Nim Linux binaries that work across distros |
| 12:52:55 | * | lritter joined #nim |
| 13:02:19 | * | waleee joined #nim |
| 13:13:36 | * | Vladar quit (Remote host closed the connection) |
| 13:33:11 | * | theelous3 joined #nim |
| 13:34:57 | narimiran | sanity check: https://nim-lang.github.io/Nim/lib.html |
| 13:35:12 | narimiran | can somebody try to click on any of the modules? |
| 13:35:26 | * | kungtott1 is now known as kungtotte |
| 13:35:32 | * | kungtotte quit (Quit: leaving) |
| 13:35:42 | * | kungtotte joined #nim |
| 13:35:55 | * | Snircle joined #nim |
| 13:36:32 | FromGitter | <zetashift> All 404 on me |
| 13:36:39 | FromGitter | <zetashift> well all I tried* |
| 13:36:50 | narimiran | ok, same here |
| 14:00:57 | shashlick | Ditto |
| 14:02:44 | narimiran | and they worked couple minutes before that |
| 14:03:15 | FromGitter | <mratsim> 404 as well |
| 14:06:36 | FromGitter | <coocheenin> @shashlick Of course. Will do. |
| 14:06:42 | FromGitter | <coocheenin> 404 too |
| 14:15:19 | PMunch | 404 here as well |
| 14:15:20 | PMunch | Ouch |
| 14:18:25 | * | noeontheend joined #nim |
| 14:31:42 | FromGitter | <qqtop> the posix module in the index has gone awol too |
| 14:40:43 | FromGitter | <kaushalmodi> narimiran: I have my local build on the commit prior to that last big commit |
| 14:40:54 | FromGitter | <kaushalmodi> and the docs built using that are working fine |
| 14:41:21 | FromGitter | <kaushalmodi> Do the docs built using that latest commit work fine for you locally? (I haven't tried) |
| 14:41:27 | narimiran | @kaushalmodi "the last big commit" = hot code reloading? |
| 14:41:32 | FromGitter | <kaushalmodi> yes |
| 14:41:41 | narimiran | docs worked fine even after it |
| 14:41:53 | FromGitter | <kaushalmodi> hmm ok |
| 14:43:08 | narimiran | last commit to `gh-pages` was at 14:07 (hour and a half ago) |
| 14:44:25 | narimiran | and i noticed things stopped working couple of minutes after that |
| 14:44:39 | * | PMunch quit (Remote host closed the connection) |
| 14:45:21 | narimiran | hmmm, could this be some github/travis glitch so maybe just another commit to devel will make the pages work again like before? |
| 14:46:24 | FromGitter | <kaushalmodi> no, it won't |
| 14:46:35 | FromGitter | <kaushalmodi> I see https://github.com/nim-lang/Nim/tree/gh-pages/threads/threads.html |
| 14:46:48 | FromGitter | <kaushalmodi> it should have been https://github.com/nim-lang/Nim/tree/gh-pages/threads.html |
| 14:46:51 | shashlick | Araq: https://github.com/nim-lang/nightlies/commit/2f7c65c10979c954a1f6cc26d86e0eca73f7c594#commitcomment-32501780 |
| 14:46:58 | FromGitter | <kaushalmodi> somehow that extra folder got introduced inbetween |
| 14:48:10 | FromGitter | <kaushalmodi> narimiran: That threads.html was just one example; I am seeing `../foo/foo.html` for every module |
| 14:48:27 | FromGitter | <kaushalmodi> it should have been either `../foo.html` or `../foo/index.html` |
| 14:48:44 | narimiran | hmmm, yeah, look at this: https://nim-lang.github.io/Nim/system/system.html |
| 14:50:00 | narimiran | you're right, an extra folder got introduced somewhere and somehow |
| 14:50:35 | shashlick | kaushalmodi: I've posted my holy build box scripts to build a generic linux binary of Nim - can you please take a look and see what's the best way to integrate into nightlies? cc Araq |
| 14:50:37 | shashlick | https://gist.github.com/genotrance/8789260aff1570c7c5fe930eaba7ce33 |
| 14:51:01 | narimiran | https://github.com/nim-lang/Nim/commit/ca4b971bc81b2e751e0388d80896fde7079b1679#diff-3cb9f480d71020c8cd3d36be5bdd73afL955 |
| 14:51:15 | shashlick | current nightlies creates an xz file which can run through this script and create a binary, but that would mean two full builds |
| 14:51:19 | FromGitter | <kaushalmodi> narimiran: the "big commit" is touching docgen.nim and docgen2.nim |
| 14:51:31 | narimiran | @kaushalmodi, yep, just shared a link |
| 14:51:33 | FromGitter | <kaushalmodi> you might want to review that |
| 14:53:02 | FromGitter | <kaushalmodi> shashlick: I haven't tried but it looks promising |
| 14:53:15 | FromGitter | <kaushalmodi> can you put that info in an issue on nightlies so that we don't lose that? |
| 14:53:50 | shashlick | okay cool |
| 14:54:16 | FromGitter | <kaushalmodi> i'm about to get busy with personal life (moving house, emergency international trip coming up), and I won't be able to focus on this for a while |
| 15:02:25 | FromGitter | <matrixbot> `Juan Carlos` Oh, good luck with that!. |
| 15:17:33 | shashlick | Araq: https://github.com/nim-lang/nightlies/issues/22 cc @kaushalmodi |
| 15:18:51 | shashlick | while we are at it, I'll appreciate anyone who has a 32-bit linux - old or new - to test this nim binary package and confirm if it works on your install - https://transfernow.net/21ivp4d7pi00 |
| 15:33:03 | * | neceve quit (Remote host closed the connection) |
| 15:33:07 | * | rnrwashere joined #nim |
| 15:46:28 | * | rnrwashere quit (Remote host closed the connection) |
| 15:49:20 | * | oz left #nim ("WeeChat 2.4") |
| 15:49:33 | * | oz joined #nim |
| 16:07:19 | * | JustASlacker quit (Remote host closed the connection) |
| 16:11:51 | * | rnrwashere joined #nim |
| 16:33:10 | FromGitter | <alehander42> Araq |
| 16:33:18 | Araq | what? |
| 16:33:20 | FromGitter | <alehander42> how can i make renderer.nim render `:` for command and list |
| 16:33:37 | FromGitter | <alehander42> currently it just does `,` |
| 16:34:01 | FromGitter | <alehander42> i mean is there an option, or does it make sense to PR this |
| 16:34:18 | Araq | I'm not sure we keep the information in the typed AST |
| 16:36:27 | * | sealmove joined #nim |
| 16:37:37 | * | rnrwashere quit (Remote host closed the connection) |
| 16:38:23 | * | rnrwashere joined #nim |
| 16:40:35 | * | Vladar joined #nim |
| 16:42:07 | Araq | you could introduce yet-another silly node flag, but at some point we gotta accept that after syntax sugar elimination we're dealing with a Lisp |
| 16:42:49 | * | shadowbane quit (Ping timeout: 246 seconds) |
| 16:43:20 | * | ng0_ joined #nim |
| 16:43:35 | * | ng0 quit (Remote host closed the connection) |
| 16:43:36 | * | shadowbane joined #nim |
| 16:54:40 | * | ng0_ is now known as ng0 |
| 16:55:58 | * | rockcavera quit (Remote host closed the connection) |
| 17:12:48 | leorize | looks like httpclient doesn't support basic authentication |
| 17:17:30 | * | Trustable joined #nim |
| 17:17:48 | * | flaviu quit (Remote host closed the connection) |
| 17:21:59 | * | stefanos82 joined #nim |
| 17:22:14 | * | nsf quit (Quit: WeeChat 2.4) |
| 17:30:06 | FromGitter | <alehander42> Araq but I am not sure: if we have a stmtlist |
| 17:30:17 | FromGitter | <alehander42> Doesn't it always make sense to generate : |
| 17:30:28 | FromGitter | <alehander42> Even without type info |
| 17:31:01 | FromGitter | <alehander42> If the last argument to a comman ⏎ d is a stmtlist |
| 17:31:18 | Araq | that's true |
| 17:36:46 | * | rockcavera joined #nim |
| 17:37:59 | FromGitter | <alehander42> Ok I can make a pr for that |
| 17:42:22 | * | Jesin quit (Quit: Leaving) |
| 17:43:58 | Araq | ok |
| 17:44:33 | * | Jesin joined #nim |
| 17:47:45 | FromDiscord | <Zireael> let's say I want to use a js rendering library with nim, I understand {.importc } is used, but the only example in the docs is with a function (proc) |
| 17:47:45 | FromDiscord | <Zireael> does this work on e.g. JS classes? |
| 17:52:40 | leorize | for those, we use importcpp |
| 17:53:12 | rnrwashere | Does anybody now how can I reliably wait for a flowvar. Right now I am getting SIGSEGV on blockUntil |
| 17:53:33 | rnrwashere | I did ^res |
| 17:54:24 | leorize | try this threadpool instead: https://github.com/yglukhov/threadpools |
| 18:00:18 | FromDiscord | <Zireael> eh, documentation sucks then - it tells me to use .importc https://nim-lang.org/docs/backends.html |
| 18:01:05 | narimiran | PRs welcome |
| 18:03:29 | leorize | Zireael: There's also the jsffi module that should simplify interfacing with js |
| 18:04:12 | rayman22201 | HCR is merged in develop!? Awesome. 🎉 |
| 18:05:28 | leorize | narimiran: has the docs been fixed? |
| 18:06:36 | narimiran | leorize: devel docs that stopped working earlier today? nope, no new commits since then |
| 18:07:51 | * | xet7 quit (Ping timeout: 250 seconds) |
| 18:08:44 | narimiran | i asked HCR guys why `docgen` was modified in the first place. waiting for the answer.... |
| 18:10:58 | leorize | I'd say prepare a hotfix as a PR then tag them there :p |
| 18:14:25 | shashlick | leorize: how is yglukhov's threadpools different from the stdlib implementation |
| 18:14:30 | shashlick | wish there was more docs |
| 18:14:56 | leorize | @yglukhov ping |
| 18:15:20 | leorize | I haven't checked up on the impl, but for the most part, it doesn't crash when stdlib's threadpool does :P |
| 18:16:17 | shashlick | 🙂 |
| 18:20:08 | * | xet7 joined #nim |
| 18:21:32 | FromDiscord | <demotomohiro> This code cause compile error. Is it a bug? |
| 18:21:32 | FromDiscord | <demotomohiro> https://wandbox.org/permlink/mjenBFrJtqjNxWvA |
| 18:22:50 | FromGitter | <dandevelo> Are there any plans to support import for C constants in Nim? |
| 18:23:13 | leorize | it's always been possible, not recommended though |
| 18:23:28 | FromGitter | <dandevelo> @leorize how is that possible? |
| 18:23:48 | leorize | something like this: https://github.com/nim-lang/Nim/blob/devel/lib/posix/posix_other_consts.nim |
| 18:25:56 | FromGitter | <dandevelo> @leorize I know this is possible for vars, I am looking for consts |
| 18:26:17 | FromGitter | <dandevelo> @leorize vars can not be used at compile time |
| 18:26:34 | leorize | use nimterop :P |
| 18:26:54 | leorize | it'll automatically wrap any C header, and you'd not have to worry about consts |
| 18:27:28 | leorize | demotomohiro: does seem like a bug to me |
| 18:28:41 | narimiran | demotomohiro: remove pragma and it works |
| 18:29:06 | narimiran | https://nim-lang.github.io/Nim/manual.html#pragmas-compiletime-pragma |
| 18:30:35 | FromGitter | <dandevelo> @leorize, nimterop seems like overkill for this. Not sure why this is possible with Nim. It works for procs and types, but not for consts |
| 18:30:56 | FromGitter | <dandevelo> *why this is not possible with Nim |
| 18:31:17 | leorize | because for proc we don't need to parse anything |
| 18:31:36 | leorize | runtime are simple |
| 18:32:05 | leorize | compile time is the hard part :P |
| 18:32:16 | FromGitter | <dandevelo> i mean procs imported with header pragma instead of dynlib |
| 18:32:57 | leorize | you can't check if an imported identifier is a const |
| 18:33:08 | leorize | Nim's approach to {.header.} is optimistic |
| 18:33:36 | leorize | it just include the header, then assume that whatever in that header will match your declared procs/vars |
| 18:33:52 | leorize | then generates call as written in C |
| 18:34:03 | FromGitter | <dandevelo> Yes, that's what I am interested in |
| 18:34:10 | FromGitter | <dandevelo> Why do you see that as a problem? |
| 18:34:20 | leorize | it does not parse the header |
| 18:34:25 | FromGitter | <dandevelo> Why does it need to check if an imported indentified is a const? |
| 18:34:25 | leorize | it just includes it |
| 18:34:31 | FromGitter | <dandevelo> Why should it parse it? |
| 18:34:56 | leorize | you can't identify if something is a const, much less taking the value without knowing what it contains |
| 18:35:25 | FromGitter | <dandevelo> But the real question here is: why do you want to identify if something is a const? |
| 18:35:52 | leorize | the real question is: how can you get the value for use in compile time if you don't parse it? |
| 18:36:27 | FromGitter | <dandevelo> You simply write it in the generated C file the same way you would write C |
| 18:36:50 | leorize | then vars should work just fine |
| 18:36:57 | FromDiscord | <demotomohiro> @narimiran it works after removing compileTime pragma, but it should work with compileTime pragma, isnt it? |
| 18:37:14 | leorize | consts are for the compiler to evaluate during compile time |
| 18:37:26 | leorize | the compiler here is Nim compiler, not the underlying C compiler |
| 18:37:26 | FromGitter | <dandevelo> You mean the C compiler, right? |
| 18:37:55 | FromGitter | <dandevelo> The Nim compiler is interested about the type of that const |
| 18:38:03 | FromGitter | <dandevelo> Not the value of that const |
| 18:38:19 | leorize | nope, the value is needed for compile time evaluation within Nim's VM |
| 18:38:21 | FromGitter | <dandevelo> And you specify the type of that const when you import it. Same way you do for types |
| 18:38:50 | leorize | most of the constant folding is done by the nim compiler |
| 18:39:30 | FromGitter | <dandevelo> That's what I am interested it, for consts that the Nim compiler would just leave in their original form (generated in the C file) |
| 18:40:01 | leorize | the "pseudo" vars I showed you do just that |
| 18:40:18 | FromGitter | <dandevelo> They can't be used in case statements |
| 18:41:00 | leorize | yea, case statements require that the value is known by the Nim compiler |
| 18:41:51 | FromGitter | <dandevelo> If the case statements checks a proc argument, how would the Nim compiler know the value of the proc argument? |
| 18:42:24 | leorize | what do you mean? |
| 18:43:30 | leorize | oh, what I mean was the `of` within case stmts requires constant as the operand |
| 18:43:44 | leorize | consts that are known to the Nim compiler |
| 18:44:24 | shashlick | dandevelo: just catching up - when you say const, are you saying #define or actual C vars |
| 18:44:33 | FromGitter | <dandevelo> #define |
| 18:44:36 | FromGitter | <dandevelo> sorry |
| 18:44:43 | FromGitter | <dandevelo> I mean #define |
| 18:44:45 | shashlick | ya a #define doesn't really exist in C |
| 18:45:01 | shashlick | it is effectively a search/replace in the code |
| 18:45:13 | shashlick | that the preprocessor does |
| 18:45:26 | FromGitter | <dandevelo> Yes, that is why I am surprised this is not possible with Nim. It is simply a search/replace |
| 18:45:59 | leorize | You'd need to parse the header to get the value for search 'n replace :P |
| 18:45:59 | FromGitter | <dandevelo> I mean that #define would be written as it is in the generated C file and the C preprocessor would take care of it |
| 18:46:18 | FromGitter | <dandevelo> Actually the C compiler needs to do that, not the Nim compiler |
| 18:46:31 | shashlick | I know it is used for constants but Nim doesn't see any such thing since it talks to the compiled binary which doesn't have this at all |
| 18:46:46 | shashlick | i think an example of what you want to do will help |
| 18:46:57 | FromGitter | <dandevelo> Sure |
| 18:48:02 | FromGitter | <dandevelo> When using constants like WM_CREATE from windows.h, Nim writes 1 instead of WM_CREATE in the generated C file. When debugging this and setting breakpoints, it helps to see WM_CREATE instead of 1 in the generated C file |
| 18:49:17 | shashlick | how is WM_CREATE declared in Nim? |
| 18:49:57 | FromGitter | <dandevelo> That's the problem, I don't have a way to declare it except for writing its actual value const WM_CREATE = 1 |
| 18:50:20 | leorize | you should use --linedirs: on |
| 18:50:45 | leorize | that'll generate lines directive pointing to the .nim file and not the .c |
| 18:51:01 | shashlick | so that's something we can ask Araq - instead of writing out the value in the rendered C, he could use a #define and not the actual value |
| 18:51:03 | FromGitter | <Varriount> @dandevelo I believe you might be able to use importc on the constant, in order to get that. |
| 18:51:32 | FromGitter | <dandevelo> @shashlick that would be great |
| 18:51:53 | shashlick | but he might probably ask you why you are debugging the C code and not the Nim code |
| 18:52:02 | shashlick | that's what leorize is also alluding to |
| 18:54:31 | shashlick | have you seen the video and blog post explaining how to debug Nim with gdb |
| 18:54:50 | shashlick | it's far better to debug the code you wrote than the code Nim rendered |
| 18:55:46 | FromGitter | <dandevelo> I guess the reason why I wanted this was to peek at the generated C code as I am debugging it. Maybe my C background should get a rest :P |
| 18:59:08 | FromGitter | <HKGx> Hello, ⏎ I've installed Nim (it's my first time with it) and I've got a problem - I can't import any libs directly. I mean, when I'm trying to do `import os` compiler says that it can't find file named "os". |
| 19:00:56 | shashlick | dandevelo: ya and then you don't need to comprehend what Nim does behind the scenes |
| 19:01:22 | shashlick | its like the assembly expert who wants to debug the code gcc generated |
| 19:01:32 | shashlick | you know what I mean 🙂 |
| 19:01:42 | FromGitter | <dandevelo> Yep :) |
| 19:04:37 | * | zachk joined #nim |
| 19:09:27 | FromGitter | <dandevelo> @Varriount tried to use importc on the constant but could not get it to work |
| 19:14:28 | * | waleee quit (Quit: WeeChat 2.4) |
| 19:20:14 | FromGitter | <dandevelo> @shashlick @leorize @Varriount I guess I will use --linedirs for my debugging even though it sometimes misses the correct line. But when that happens I use the call stack to identify the exact function I am currently debugging |
| 19:23:20 | FromGitter | <dandevelo> Thank you all for coping with my rant about importc consts in Nim :D |
| 19:23:50 | shashlick | np |
| 19:24:27 | FromDiscord | <demotomohiro> This page might help you to debug Nim code. |
| 19:24:27 | FromDiscord | <demotomohiro> https://internet-of-tomohiro.netlify.com/nim/gdb.en.html |
| 19:26:32 | FromDiscord | <demotomohiro> @dandevelo you need to add `--debugger:native` option to Nim to generate executable for debug. |
| 19:27:40 | FromGitter | <dandevelo> Thanks @demotomohiro ! |
| 19:28:26 | * | sealmove quit (Quit: WeeChat 2.4) |
| 19:31:23 | FromDiscord | <demotomohiro> @hkgx That sounds like `lib` directory that have Nim's standard library is not correctly installed. |
| 19:32:28 | shashlick | how did you install? |
| 19:36:29 | FromDiscord | <hkg> well, I can access files from it, but I need to do (for example) `import pure/strformat` |
| 19:37:16 | FromDiscord | <hkg> @demotomohiro so i don't know what's wrong |
| 19:39:13 | FromDiscord | <demotomohiro> When you import module in standard library, you can write "import std/strformat" or "import strformat". |
| 19:41:46 | FromDiscord | <hkg> std has only two files 🤔 |
| 19:44:30 | FromDiscord | <demotomohiro> Most of standard modules in `lib/pure` directory. |
| 19:45:22 | FromDiscord | <hkg> yeah, I've noticed it |
| 19:45:38 | FromDiscord | <demotomohiro> If you are using Nim ver 0.19.4, there are only 2 files in `lib/pure`. |
| 19:45:58 | FromDiscord | <demotomohiro> Not `lib/pure, `lib/std` |
| 19:46:07 | FromDiscord | <hkg> Yep |
| 19:46:19 | FromDiscord | <hkg> Online two files in std |
| 19:46:23 | FromDiscord | <hkg> Only two files in std |
| 19:47:10 | FromDiscord | <demotomohiro> How did you installed Nim? |
| 19:48:31 | FromDiscord | <hkg> i've put it in some folder in user directory |
| 19:48:35 | FromDiscord | <hkg> and executed finish.exe |
| 19:54:21 | * | salewski joined #nim |
| 19:55:20 | salewski | narimiran, https://nim-lang.github.io/Nim/system.html gives 404 file not found for me. |
| 19:55:49 | FromDiscord | <demotomohiro> @hkg Did you just download zip file from this page, unzipped it and put some folder? |
| 19:55:49 | FromDiscord | <demotomohiro> https://nim-lang.org/install_windows.html |
| 19:55:52 | salewski | https://nim-lang.github.io/Nim/algorithm.html also. |
| 19:56:08 | narimiran | salewski: yeah, it is down and we know why |
| 19:56:14 | FromDiscord | <hkg> finish.exe setted up %PATH% for me |
| 19:56:16 | FromDiscord | <hkg> as I could see |
| 19:56:22 | salewski | OK, bye. |
| 19:56:33 | * | salewski quit (Client Quit) |
| 19:56:44 | narimiran | all modules are now (by mistake) under ..../moduleName/moduleName.html |
| 19:57:47 | FromDiscord | <demotomohiro> @hkg can you see lib\pure\strformat.nim? |
| 19:57:51 | FromDiscord | <hkg> yup |
| 19:58:13 | FromDiscord | <hkg> I can import packages using |
| 19:58:13 | FromDiscord | <hkg> ```nim |
| 19:58:13 | FromDiscord | <hkg> import pure/math |
| 19:58:13 | FromDiscord | <hkg> ``` |
| 19:58:43 | * | a_b_m joined #nim |
| 19:59:19 | FromDiscord | <hkg> but when trying to compile program with strformat |
| 19:59:39 | FromDiscord | <hkg> it throws me an error |
| 19:59:39 | FromDiscord | <hkg> `nim\lib\pure\strformat.nim(253, 8) Error: cannot open file: macros` |
| 20:01:24 | * | abm quit (Ping timeout: 244 seconds) |
| 20:01:49 | * | a__b__m joined #nim |
| 20:04:48 | FromDiscord | <demotomohiro> can you see lib/core/macros.nim? |
| 20:05:02 | * | a_b_m quit (Ping timeout: 245 seconds) |
| 20:13:03 | FromDiscord | <hkg> @demotomohiro yup |
| 20:14:38 | * | ng0 quit (Remote host closed the connection) |
| 20:15:42 | * | ng0 joined #nim |
| 20:21:13 | * | a__b__m quit (Ping timeout: 246 seconds) |
| 20:26:04 | * | a__b__m joined #nim |
| 20:27:02 | * | rnrwashere quit (Remote host closed the connection) |
| 20:27:19 | * | rnrwashere joined #nim |
| 20:29:27 | FromDiscord | <demotomohiro> Can you compile the code that just contain "import macros"? |
| 20:34:27 | FromDiscord | <hkg> nope |
| 20:43:25 | FromDiscord | <demotomohiro> @hkg so your Nim can read lib/pure/strformat.nim but lib/core/macros.nim. |
| 20:43:25 | FromDiscord | <demotomohiro> And these files are actually exist. |
| 20:43:58 | FromDiscord | <hkg> It can't read just *macros* |
| 20:44:01 | FromDiscord | <hkg> or just *strformat* |
| 20:44:14 | * | rnrwashere quit (Remote host closed the connection) |
| 20:46:07 | FromDiscord | <demotomohiro> This error message means Nim can read the file `nim\lib\pure\strformat.nim` |
| 20:46:07 | FromDiscord | <demotomohiro> `nim\lib\pure\strformat.nim(253, 8) Error: cannot open file: macros` |
| 20:46:21 | FromDiscord | <hkg> yeah |
| 20:46:32 | FromDiscord | <hkg> but I import strformat with ```nim |
| 20:46:32 | FromDiscord | <hkg> import pure/strformat |
| 20:46:32 | FromDiscord | <hkg> ``` |
| 20:50:04 | * | narimiran quit (Remote host closed the connection) |
| 20:51:50 | FromDiscord | <demotomohiro> You cannot import strformat with `import strformat`? |
| 20:51:55 | FromDiscord | <hkg> nope |
| 20:52:41 | FromDiscord | <hkg> ```nim |
| 20:52:41 | FromDiscord | <hkg> >>> import strformat |
| 20:52:41 | FromDiscord | <hkg> stdin(1, 8) Error: cannot open file: strformat |
| 20:52:41 | FromDiscord | <hkg> ``` |
| 20:52:42 | * | Vladar quit (Remote host closed the connection) |
| 20:52:59 | * | floppydh quit (Quit: WeeChat 2.3) |
| 20:56:13 | FromDiscord | <demotomohiro> Can you see nim/config/nim.cfg? |
| 20:57:03 | FromDiscord | <hkg> omg |
| 20:57:52 | FromDiscord | <hkg> smh, it didn't extract |
| 20:58:32 | FromDiscord | <hkg> @demotomohiro big thanks |
| 20:58:39 | FromDiscord | <demotomohiro> np |
| 21:04:01 | FromDiscord | <demotomohiro> When I delete my nim/config/nim.cfg, compiling `import strformat` says `Error: cannot open file: strformat` and compiling `import pure/strformat' says `nim-0.19.4\lib\pure\strformat.nim(253, 8) Error: cannot open file: macros`. |
| 21:04:01 | FromDiscord | <demotomohiro> Showing some error or warning when Nim cannot read nim/config/nim.cfg file might be helpful. |
| 21:04:26 | FromDiscord | <hkg> yeah |
| 21:04:59 | FromDiscord | <demotomohiro> If you are using windows, you can also install Nim using Scoop. |
| 21:05:00 | FromDiscord | <demotomohiro> https://scoop.sh/ |
| 21:05:46 | FromDiscord | <hkg> hm, scoop looks cool |
| 21:06:11 | FromDiscord | <hkg> but, I already installed it "the normal way" |
| 21:19:42 | * | rockcavera quit (Remote host closed the connection) |
| 21:19:55 | * | rnrwashere joined #nim |
| 21:24:20 | * | rnrwashere quit (Ping timeout: 255 seconds) |
| 21:39:07 | * | rnrwashere joined #nim |
| 21:43:41 | * | rnrwashere quit (Ping timeout: 255 seconds) |
| 21:48:31 | Zevv | is Nim in chocolatey? |
| 21:49:12 | Zevv | oh 0.11.2 |
| 22:09:21 | * | rockcavera joined #nim |
| 22:14:25 | * | a_b_m joined #nim |
| 22:14:49 | * | a_b_m quit (Read error: Connection reset by peer) |
| 22:15:14 | * | a_b_m joined #nim |
| 22:15:34 | * | Trustable quit (Remote host closed the connection) |
| 22:17:06 | * | krux02 quit (Remote host closed the connection) |
| 22:17:17 | * | a__b__m quit (Ping timeout: 244 seconds) |
| 22:28:44 | * | flaviu joined #nim |
| 23:02:34 | * | noeontheend quit (Ping timeout: 246 seconds) |
| 23:02:43 | * | rnrwashere joined #nim |
| 23:04:26 | * | rnrwashere quit (Remote host closed the connection) |
| 23:05:19 | * | rnrwashere joined #nim |
| 23:08:37 | * | rnrwashere quit (Remote host closed the connection) |
| 23:09:51 | * | rnrwashere joined #nim |
| 23:14:08 | * | rnrwashere quit (Remote host closed the connection) |
| 23:18:10 | * | fredrik92 joined #nim |
| 23:19:48 | * | couven92 quit (Ping timeout: 250 seconds) |
| 23:21:38 | * | rnrwashere joined #nim |
| 23:23:30 | * | a_b_m quit (Remote host closed the connection) |
| 23:23:55 | * | a_b_m joined #nim |
| 23:24:54 | * | rnrwashere quit (Remote host closed the connection) |
| 23:31:34 | * | rnrwashere joined #nim |
| 23:38:41 | * | fredrik92 quit (Read error: Connection reset by peer) |
| 23:42:31 | * | Jesin quit (Quit: Leaving) |
| 23:44:54 | * | Jesin joined #nim |
| 23:47:47 | ryukoposting | so who's the dude on the cover of nim in action |
| 23:48:12 | dom96 | My great grand father obviously :P |
| 23:48:54 | ryukoposting | wait really or no |
| 23:50:08 | rayman22201 | No, they just made Dom dress up in a silly costume :-P |
| 23:52:50 | * | theelous3 quit (Ping timeout: 255 seconds) |
| 23:53:05 | * | leorize quit (Quit: WeeChat 2.3) |
| 23:53:14 | ryukoposting | kek |
| 23:54:59 | xace | ryukoposting: it's explained in the book... |
| 23:55:18 | ryukoposting | o |
| 23:55:32 | ryukoposting | tbh I've only read the first chapter |
| 23:55:44 | ryukoposting | good first chapter though, I plan to get around to it |
| 23:56:07 | dom96 | lol, it's easy to skip over the cover explanation |
| 23:56:28 | dom96 | It's before the first chapter |
| 23:56:36 | dom96 | Thanks for grabbing a copy btw :) |
| 23:57:06 | ryukoposting | :) |
| 23:58:33 | * | lritter quit (Ping timeout: 244 seconds) |