00:00:43 | * | thomasross joined #nim |
00:32:20 | * | SenasOzys quit (Ping timeout: 245 seconds) |
00:57:15 | * | krux02_ quit (Remote host closed the connection) |
01:01:29 | * | CodeVance quit (Read error: Connection reset by peer) |
01:05:42 | * | CodeVance joined #nim |
01:05:43 | * | CodeVance left #nim (#nim) |
01:36:40 | * | PMunch quit (Quit: leaving) |
01:48:23 | * | donlzx joined #nim |
02:12:25 | * | }{ultimo}{ left #nim (#nim) |
02:12:51 | * | lainon joined #nim |
02:59:37 | * | CodeVance joined #nim |
03:03:21 | CodeVance | How to kill a thread |
03:03:45 | CodeVance | Can't find any info on it |
03:08:32 | * | CodeVance quit (Read error: Connection reset by peer) |
03:09:21 | * | CodeVance joined #nim |
03:22:06 | * | CodeVance left #nim (#nim) |
03:35:18 | * | yglukhov[i] joined #nim |
03:39:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
03:52:58 | * | CodeVance joined #nim |
04:31:20 | * | cspar quit (Ping timeout: 276 seconds) |
04:56:12 | * | cspar joined #nim |
05:20:53 | * | SenasOzys joined #nim |
05:33:22 | * | CodeVance quit (Quit: Leaving.) |
05:35:32 | * | miran joined #nim |
05:38:30 | shashlick | PMunch: this bug - https://github.com/nim-lang/Nim/issues/7776, cc @mratsim |
06:44:52 | Araq | you can't "kill" a thread, the posix APIs pretty much deprecated it |
06:45:06 | Araq | you thread needs to support receiving a "shutdown" message |
06:45:14 | Araq | or else you use a process instead. |
06:48:22 | * | xkapastel quit (Quit: Connection closed for inactivity) |
06:55:30 | * | jjido joined #nim |
06:58:15 | FromGitter | <Varriount> Anyone have a clue as to why https://github.com/nim-lang/Nim/pull/8002 has failing checks? |
07:07:17 | * | nsf joined #nim |
07:16:48 | FromGitter | <tim-st> Varriount: manual_snippet_104.nim and tut1_snippet_116.nim raise Errors |
07:17:27 | FromGitter | <tim-st> and also some more related to these files |
07:26:38 | * | donlzx quit (Remote host closed the connection) |
07:44:25 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:51:32 | * | subsetpark quit (Ping timeout: 260 seconds) |
07:59:14 | * | subsetpark joined #nim |
08:04:17 | * | gmpreussner quit (Ping timeout: 248 seconds) |
08:05:15 | * | gmpreussner_ joined #nim |
08:11:07 | * | tzekid joined #nim |
08:28:29 | * | gangstacat quit (Quit: Ĝis!) |
08:36:27 | * | yglukhov[i] joined #nim |
08:39:22 | * | xet7 joined #nim |
08:42:54 | Araq | tim-st: these are "correct" failures, should probably change 'nim doc' so that they don't appear in the logs |
08:49:43 | * | dddddd joined #nim |
08:59:05 | * | lainon quit (Ping timeout: 240 seconds) |
09:00:18 | * | BitPuffin joined #nim |
09:14:48 | * | Vladar joined #nim |
09:17:20 | * | yglukhov[i] quit (Remote host closed the connection) |
09:18:53 | * | gangstacat joined #nim |
09:25:59 | * | jjido joined #nim |
09:26:28 | * | skrylar quit (Remote host closed the connection) |
09:29:04 | * | yglukhov[i] joined #nim |
09:32:47 | FromGitter | <tim-st> ok, thanks! |
09:33:57 | FromGitter | <tim-st> btw are there cases when `nim check file.nim` finds errors that are not found by nimsuggest? |
09:49:57 | * | SenasOzys quit (Ping timeout: 240 seconds) |
09:50:45 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:51:12 | * | krux02 joined #nim |
10:00:02 | * | Shivelight joined #nim |
10:01:55 | Araq | tim-st: nimsuggest has the occasional glitch because it needs to be fast |
10:02:17 | Araq | so 'nim check' is more reliable. but incremental compilation should fix that |
10:05:02 | FromGitter | <tim-st> ok, thanks, good to know |
10:07:33 | * | SenasOzys joined #nim |
10:09:58 | Araq | btw 'nim check --os:linux'/macosx/windows is underused |
10:10:17 | Araq | but works really well for cross platform development |
10:14:40 | * | tzekid quit (Ping timeout: 256 seconds) |
10:31:09 | FromGitter | <Vindaar> @Araq in case you're still around: I've been looking at https://github.com/nim-lang/Nim/issues/7997 to learn a little more about the compiler. The issue of course is that `locks` defines a `release` proc. So that after symbol lookup the `release` in `defined(release)` is of type `nkSym` instead of `nkIdent`. Would a fix now try to make sure it's still of type `nkIdent` or simply handle `nkSym` in `semexprs.semDefined`? |
10:32:14 | FromGitter | <cschardt> cs @2vg: cool thing. Question: how did you create the page and particularly its navigation frame? |
11:14:47 | * | elrood joined #nim |
11:25:47 | Araq | Vindaar: just handle nkSym in semDefined, excellent digging! :-) |
11:34:39 | * | yglukhov[i] quit (Remote host closed the connection) |
12:11:26 | FromGitter | <Vindaar> @Araq Ok, I did that. Running tests now. I'm not sure under which circumstances the `"obsolete usage of 'defined', use 'declared' instead"` was supposed to appear though. So maybe I'm shadowing some of these cases with my inclusion of nkSym now? |
12:18:10 | * | PMunch joined #nim |
12:19:28 | Araq | you can actually remove this error message |
12:19:37 | Araq | defined vs declared is a clear distinction now |
12:20:12 | FromGitter | <Vindaar> Ah, even better! Should I just discard all cases besides `nkIdent` and `nkSym` then? |
12:20:26 | Araq | for 'defined', sure |
12:20:39 | FromGitter | <Vindaar> ok! |
12:21:12 | Araq | or better use lookups.considerQuotedIdent |
12:22:19 | FromGitter | <Vindaar> yeah, that's already in use for the check against `"defined"`: ⏎ ⏎ ```if not onlyCurrentScope and considerQuotedIdent(c.config, n[0], n).s == "defined":``` [https://gitter.im/nim-lang/Nim?at=5b1d17fbffd8896fe919c0a5] |
12:23:24 | * | find0x90 joined #nim |
12:25:08 | * | yglukhov[i] joined #nim |
12:28:20 | FromGitter | <Vindaar> here we go: https://github.com/nim-lang/Nim/pull/8005 |
12:41:44 | * | sz0 quit (Quit: Connection closed for inactivity) |
12:49:13 | dom96 | Varriount: Did you see my PM? |
13:04:23 | dom96 | huh, when did this get released? https://narimiran.github.io/nim-basics/ |
13:04:29 | FromGitter | <Varriount> Ah, just saw it. |
13:04:54 | miran | dom96: yesterday, but it is in "beta-phase" |
13:05:04 | dom96 | looks good |
13:05:11 | dom96 | Mind if I tweet about it? :) |
13:05:18 | miran | in fact i do :) |
13:05:24 | miran | from telegram: "I would appreciate if you would read it and report the mistakes and errors so I can correct it before going fully public. (That means - please do not share the link just yet on Nim forum, Reddit, etc.)" |
13:05:37 | dom96 | okay, no worries |
13:05:47 | dom96 | I saw the link in #crystal-lang lol |
13:06:00 | FromGitter | <Vindaar> @miran sorry I haven't sent another mail about it yet, I'll continue reading later today :) |
13:06:14 | miran | i would wait couple more days for error corrections before publishing it widely |
13:06:26 | miran | @vindaar no probs :) |
13:06:41 | dom96 | miran: Where shall I submit corrections? |
13:06:54 | dom96 | oh, issue tracker |
13:07:10 | dom96 | Maybe I can just make a PR actually |
13:07:15 | dom96 | Nice to see asciidoc :D |
13:07:33 | miran | dom96: either issue tracker, or to me privately (here / gitter / telegram), whichever is easier to you |
13:08:22 | miran | asciidoc is nice, but for example - i haven't seen the option to have multiple web-pages, whilst keeping TOC as it is |
13:10:00 | dom96 | You could try hacking that in with a post-processing step written in Nim ;) |
13:10:13 | miran | hehe, true that :) |
13:12:35 | * | xkapastel joined #nim |
13:16:43 | FromDiscord | <2vg> @cschardt it's vuepress. |
13:16:43 | FromDiscord | <2vg> my wiki repo: https://github.com/2vg/Nim-World |
13:26:30 | * | sz0 joined #nim |
13:27:54 | * | xkapastel quit () |
13:28:24 | * | xkapastel joined #nim |
13:36:41 | * | yglukhov_ joined #nim |
13:38:27 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
13:46:52 | miran | dom96: should i expect more changes coming in in your PR, or should i merge it as it is? |
13:46:52 | * | yglukhov_ quit (Read error: Connection reset by peer) |
13:46:53 | * | yglukhov[i] joined #nim |
13:48:09 | dom96 | merge it |
13:50:53 | * | clyybber joined #nim |
13:52:26 | PMunch | Araq, do you have any idea why packedjson doesn't like to have a .kind statement generated through a macro? |
13:53:14 | PMunch | I just get: Error: attempting to call undeclared routine: 'kind' |
13:53:29 | PMunch | Copying the output of the macro into a program works just fine.. |
13:53:40 | Araq | PMunch: 'kind' is a proc, newCall(bindSym"kind", ...) ? |
13:53:52 | Araq | it is not a field. |
13:53:59 | PMunch | It's made with a quote do block.. |
13:54:11 | miran | dom96: done. thanks for the correction! |
13:54:46 | * | yglukhov_ joined #nim |
13:57:57 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
14:06:11 | PMunch | This is what the macro generates: http://ix.io/1cUL |
14:06:21 | PMunch | A call with kind as symbol and data as an ident |
14:06:34 | PMunch | data is a JsonNode |
14:07:46 | * | yglukhov_ quit (Remote host closed the connection) |
14:07:59 | Araq | PMunch: try to generate it without 'quote do' |
14:08:34 | Araq | not sure why quote do is so fragile, I blame the lack of .dirty support for the hidden template that is generated |
14:10:25 | PMunch | Ooh, interesting |
14:10:47 | PMunch | let kindSym = bindSym"kind" and then use `kindSym` instead of kind in the quote do block seems to work |
14:14:00 | PMunch | Hmm, what was the difference between a JsonTree and a JsonNode again |
14:14:12 | PMunch | One was mutable and the other is just a view into a larger tree? |
14:16:58 | * | Snircle joined #nim |
14:20:31 | Araq | exactly |
14:22:45 | PMunch | Hmm, well that's a bit troublesome.. |
14:23:14 | PMunch | How do you generate a JObject in packedJson without the %* macro? |
14:23:24 | Araq | the %* macro exists |
14:23:42 | Araq | and works as in json.nim |
14:24:29 | PMunch | Yeah I know, but I'm generating this through a macro. So it was easier to just use result["key"] = value for each of the key value pairs |
14:25:31 | PMunch | Wait.. That should work fine.. |
14:25:41 | Araq | you need to know the path |
14:26:00 | Araq | root["field", 0, 1, "fieldB"] = newValue |
14:26:10 | Araq | as only the root node can be used to update fields |
14:26:17 | Araq | this could be your problem |
14:26:38 | PMunch | Ah, the problem was in my array construction |
14:26:53 | PMunch | I did result["key"].add for each field |
14:27:01 | PMunch | Hmm |
14:40:23 | * | yglukhov[i] joined #nim |
14:44:47 | * | yglukhov[i] quit (Ping timeout: 245 seconds) |
14:47:29 | * | miran quit (Ping timeout: 248 seconds) |
14:47:43 | Vladar | trying out gouache and acrylics https://i.imgur.com/bZkw8LO.jpg |
14:48:04 | Vladar | oops, wrong channel, sorry |
14:48:39 | dom96 | Beautiful though :) |
14:48:53 | PMunch | Yeah, nice paintings :) |
14:49:05 | Vladar | thanks ) |
14:53:04 | * | nsf quit (Quit: WeeChat 2.1) |
14:59:30 | * | yglukhov[i] joined #nim |
14:59:36 | * | yglukhov[i] quit (Remote host closed the connection) |
14:59:51 | * | yglukhov[i] joined #nim |
15:01:01 | * | clyybber quit (Quit: good night) |
15:03:22 | * | SenasOzys quit (Ping timeout: 264 seconds) |
15:11:11 | FromGitter | <Varriount> Miran: May I send you a list of grammatical suggestions later? |
15:16:55 | dom96 | Varriount: Check PMs |
15:19:53 | * | find0x90_ joined #nim |
15:21:48 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
15:21:55 | * | yglukhov[i] joined #nim |
15:21:59 | * | find0x90 quit (Ping timeout: 276 seconds) |
15:24:12 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/rh2t/2018-06-10_17-23-49.png) |
15:24:29 | FromGitter | <mratsim> ^Time machine in Nim devel? |
15:25:29 | Yardanico | 1-year old PR :D |
15:28:12 | * | jjido joined #nim |
15:28:38 | FromGitter | <cschardt> @2vg: thanks! |
15:31:39 | shashlick | 7zip is now wrapped - https://github.com/genotrance/nim7z |
15:36:18 | Yardanico | shashlick, btw, I've used easylzma a while ago: |
15:36:27 | Yardanico | https://github.com/Yardanico/nim-osureplay/blob/master/src/lzma.nim |
15:36:41 | Yardanico | (it's just a wrapper over 7z ) |
15:37:03 | Yardanico | shashlick, thanks for the project though, it will definitely be very useful |
15:40:02 | * | edcragg quit (Quit: ZNC - http://znc.in) |
15:40:19 | * | edcragg joined #nim |
15:45:51 | * | SenasOzys joined #nim |
15:51:38 | * | PMunch quit (Quit: leaving) |
15:52:54 | shashlick | Nice yardanico |
15:53:29 | * | find0x90_ quit (Quit: find0x90_) |
15:53:40 | shashlick | I had to add the ability to rename generated files to nimgen to wrap this, should be useful to varriount as well |
15:54:23 | * | SenasOzys quit (Ping timeout: 265 seconds) |
15:59:44 | * | Shivelight quit (Quit: Connection closed for inactivity) |
16:00:55 | Yardanico | shashlick, your nimgen project is amazing |
16:09:10 | * | yglukhov_ joined #nim |
16:12:21 | * | yglukhov[i] quit (Ping timeout: 240 seconds) |
16:17:19 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
16:20:01 | * | yglukhov[i] joined #nim |
16:21:47 | * | yglukhov_ quit (Ping timeout: 276 seconds) |
16:22:33 | * | rauss quit (Read error: Connection reset by peer) |
16:24:50 | * | rauss joined #nim |
16:24:57 | * | yglukhov[i] quit (Ping timeout: 264 seconds) |
16:30:53 | shashlick | 👍 thanks I'm glad it's useful, I just wonder whether the wrappers are being used or not |
16:42:08 | * | SenasOzys joined #nim |
16:59:46 | FromGitter | <data-man> @shashlick Now with pegs! :) |
17:07:08 | FromGitter | <ephja> my code is too accessible. I need more obscure unicode operators |
17:10:26 | * | elrood quit (Quit: Leaving) |
17:13:49 | * | yglukhov[i] joined #nim |
17:18:05 | * | yglukhov[i] quit (Ping timeout: 260 seconds) |
17:26:34 | shashlick | data-man: yep, will have to slowly migrate to pegs |
17:28:30 | FromGitter | <ephja> `let camera = 𝕀3` |
17:28:54 | Yardanico | shashlick, there's also pure-nim regex |
17:31:37 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
17:31:41 | FromGitter | <ephja> `↻(not window.shouldClose):...` |
17:32:29 | shashlick | Ya will mostly migrate to pegs though native regex might be easiest to do |
17:34:25 | Yardanico | @ephja this is easy to do in Nim :) just make a template probably |
17:35:16 | FromGitter | <ephja> that's what I did. the only problem is the difficulty of inputting various symbols |
17:36:29 | shashlick | I hope to make it seamless to use c libraries with nimgen, simple nimble install should work anywhere and underlying wrapper stuff should be invisible |
17:36:51 | shashlick | That way, we don't need to rewrite every single library natively in Nim |
17:37:25 | shashlick | I'd rather we write a Nim API layer over the wrapper instead |
17:38:15 | shashlick | Like make it possible to nimble install pcre and not require any dlls |
17:38:32 | shashlick | Compile in the code directly |
17:45:24 | * | miran joined #nim |
17:48:53 | Yardanico | shashlick, well, but we need to aim to have more pure-nim libraries in the future |
17:49:20 | Yardanico | so we should probably write our libraries if we have time and resources :) |
17:58:28 | Araq | I still think a *simple* graphics library is the most important thing |
17:58:51 | Araq | sure plenty of other topics are not yet covered well by libraries |
17:59:05 | Araq | but with graphics you can attract people |
17:59:42 | Araq | and graphics.nim wasn't bad, needs a port to SDL2 |
17:59:49 | shashlick | I'm not a fan of rewriting, rather leverage as much as possible and make it seamless |
18:00:16 | Araq | just imagine we have graphics examples like others have shitty "hello world" examples |
18:00:19 | dom96 | hrm, anything in the stdlib to format large numbers nicely (with commas etc.)? |
18:00:27 | dom96 | 1000 -> 1,000 |
18:00:39 | Araq | strformat? no idea if it supports it |
18:01:02 | shashlick | Someone else is already done the hard work, why reimplement and waste that time, new bugs, etc |
18:01:44 | shashlick | Araq: are you saying wrapper or new lib? |
18:02:22 | * | yglukhov[i] joined #nim |
18:03:34 | Araq | neither. |
18:03:45 | Araq | port the existing graphics.nim to use SDL2 under the hood |
18:03:50 | Araq | and maybe rework its event handling |
18:04:28 | Araq | so it fits your goal, no wheel reinventions |
18:06:29 | Araq | shashlick: that said, wrappers tend to be mediocre because of the cross platform issues, you need to ship DLLs for 3 different OSes, 32 vs 64 bit builds etc etc |
18:06:57 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
18:08:19 | Araq | and few have an environment where they can develop for 3+ different OSes |
18:08:34 | Yardanico | most of nimgen wrappers compile C in place the binary |
18:08:48 | * | Araq himself relies on travis to cover Linux testing... |
18:08:58 | Yardanico | Araq, you have us for Linux testing :D |
18:09:25 | Araq | sure but maybe I'll try to fix my linux VM ... eventually... |
18:09:51 | Yardanico | use something simple like manjaro or mint :) |
18:10:14 | Araq | could also dual boot but then I waste precious hard disk space that I instead need for all this porn... |
18:11:24 | * | SenasOzys quit (Remote host closed the connection) |
18:13:00 | * | SenasOzys joined #nim |
18:15:04 | shashlick | Yep, most nimgen wrappers are compiled in so no dll dependencies |
18:15:19 | Yardanico | this can probably be even done to SDL2 |
18:15:24 | Yardanico | (but IDK) |
18:15:36 | shashlick | But it needs to be smarter, run configure or cmake behind the scenes, right now it's more delicate |
18:16:07 | Araq | I usually modify the code to not require configure or cmake. |
18:16:41 | Araq | it's more work but makes for a less fragile build process |
18:17:10 | Yardanico | well, it would require to manually update the wrapper to newer versions of libraries |
18:17:31 | * | nsf joined #nim |
18:20:13 | FromGitter | <mratsim> replace graphics by cross platform UI toolkit :P |
18:20:39 | FromGitter | <mratsim> imagine everyone complaining about Qt, Electron and GTK, and here we go with Nim-UI-Toolkit |
18:21:05 | Yardanico | nimx :P |
18:21:11 | Yardanico | but it uses SDL |
18:24:46 | shashlick | Right now nimgen doesn't support configure, cmake etc, and only gcc |
18:25:18 | shashlick | Am thinking of adding configure and cmake and fall back if those aren't installed |
18:26:08 | shashlick | Like for nimarchive, I have it working on Windows and Linux but have to hard code a config.h. If I can detect these tools then can generate live instead |
18:26:27 | FromGitter | <mratsim> I think you’re in for a world of hurt but who knows |
18:26:51 | shashlick | Anyway, my main concern with nimgen as it stands is whether people are able to use the wrappers successfully |
18:27:08 | shashlick | I have received very limited feedback |
18:27:35 | Araq | mratsim: I agree on the native Nim UI toolkit but |
18:27:47 | Araq | a) It's much more work than a newer graphics.nim |
18:27:56 | FromGitter | <mratsim> (yeah of course) |
18:28:01 | Araq | b) Trustable is working on it, help him |
18:29:05 | Araq | also data plotting only requires a graphics.nim, not a fullblown UI lib |
18:29:26 | Araq | unfortunately I lost the source code for my putpixel based plotting... :-) |
18:29:39 | FromGitter | <mratsim> for plotting this works - https://github.com/Vindaar/NeuralNetworkLiveDemo |
18:30:29 | Araq | I am not familiar with "Plotly", what is it based on? |
18:30:48 | Yardanico | JS |
18:30:51 | FromGitter | <mratsim> d3.js |
18:30:58 | Araq | lol ok |
18:31:12 | FromGitter | <mratsim> it’s taking data science by storm and replacing matplotlib in Python |
18:31:22 | Araq | not even a bad solution, compared to gnuplotlib and matplotlib |
18:32:23 | Araq | matplotlib -- one week trying to produce scatter plots that show something. |
18:33:02 | Araq | putpixel -- 4 hours to reimplement scatter plots with transparency so that you could see something. :P |
18:33:10 | miran | if MPL is too complicated, try seaborn |
18:33:16 | federico3 | pandas. |
18:34:44 | Yardanico | NimData :P |
18:34:55 | FromGitter | <data-man> @shashlick TinyCC supports -E too. You can try static links it to nimgen and don't use gcc. We have the wrapper. Just an idea. :) |
18:36:43 | FromGitter | <ephja> ```code paste, see link``` ⏎ ⏎ hmmm [https://gitter.im/nim-lang/Nim?at=5b1d6fbb0b75bc7d5afb22c3] |
18:36:50 | miran | federico3: yup, pandas' plot wrapper is also quite nice |
18:37:01 | miran | well, everything is nice compared to MPL :P |
18:37:33 | Araq | good to know I'm not up to date and people stopped with matplotlib :P |
18:40:27 | miran | unfortunately, when you want something special, it is most likely that you'll need MPL. but for some basic/typical stuff - there are these much saner wrappers around it |
18:42:14 | shashlick | data-man: but you need to run pre processing thru the same compiler that builds Nim as well |
18:42:27 | shashlick | The Nim code that is |
18:42:42 | shashlick | Else your idea may not line up |
18:42:51 | shashlick | Ifdef, not idea |
18:44:47 | FromGitter | <mratsim> for pandas plotting I like cufflinks |
18:45:00 | shashlick | The main thing is that bigger libraries use autoconf or similar methods to discover what's supported by the compiler |
18:45:24 | shashlick | Until nimgen abstracts that, it's not going to scale for more complicated libs |
18:45:32 | FromGitter | <data-man> @shashlick Maybe tcc can use gcc-headers, but I haven't tried it. |
18:46:20 | shashlick | Well I've not heard from anyone asking for clang or vcc support yet so haven't bothered |
18:47:21 | shashlick | And regardless, anyone installing nimgen has already installed nimble, Nim and hence a compiler |
18:52:18 | * | jjido joined #nim |
18:53:29 | Araq | shashlick: maybe add yet-another-build-tool to nimgen? |
18:55:01 | Araq | or generate nimble tasks that run ./configure |
18:56:17 | * | yglukhov[i] joined #nim |
18:56:33 | * | lainon joined #nim |
18:58:12 | * | yglukhov[i] quit (Read error: Connection reset by peer) |
18:58:49 | * | yglukhov[i] joined #nim |
19:00:33 | FromGitter | <ephja> ok so `foo(bar=baz)` where 'bar' is misspelled causes that |
19:03:15 | shashlick | Araq: is that a real thing? yet another build tool? |
19:03:36 | shashlick | I was just going to detect and call cmake or configure |
19:03:38 | Araq | well I'm just thinking aloud |
19:03:55 | shashlick | Since that's what most c libraries use |
19:03:58 | FromGitter | <ephja> Boost.Jam! |
19:04:09 | FromGitter | <data-man> tup :) |
19:04:27 | FromGitter | <kayabaNerve> I hate Make |
19:04:29 | FromGitter | <kayabaNerve> I love Nake |
19:06:14 | Yardanico | you should use nimscript :) |
19:06:37 | FromGitter | <kayabaNerve> Sad to hear dom96 say it's been deprecated. Happy to see the repo doesn't agree, even if dev has died down |
19:07:01 | Araq | nimscript was inspired by nake fwiw |
19:07:12 | FromGitter | <kayabaNerve> Yardanico: Blasphemer! |
19:07:31 | Araq | but nake handles some things better, admittedly |
19:07:44 | Yardanico | I mean that nake isn't required in most cases |
19:08:30 | FromGitter | <kayabaNerve> Dom also said that :P It looks good. It just isn't as powerful and I liked the concept of the full Nim language being the build tool, not a subset. |
19:08:32 | shashlick | Well but at least in nimgen case, I don't need to create a new build system, just invoke the build system chosen by the underlying c lib |
19:08:48 | Yardanico | @kayabaNerve nimscript allows you to use almost all Nim modules :) |
19:08:53 | Yardanico | and a lot of third-party ones |
19:32:24 | Araq | well that's debatable |
19:32:53 | Araq | and in fact, nimscript is a historical accident, I wouldn't write a VM for Nim today |
19:33:20 | Araq | but it's pretty cool and works and should be useful to embed in game engines |
19:34:33 | Yardanico | Araq, what would you do instead? :) |
19:34:44 | FromGitter | <kayabaNerve> Yardanico Not Nimscript |
19:34:47 | FromGitter | <kayabaNerve> He just said that |
19:34:47 | Yardanico | for macros/compiletime stuff/etc |
19:41:44 | * | sz0 quit (Quit: Connection closed for inactivity) |
19:45:55 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:47:10 | Araq | Yardanico: compile Nim snippets to native code and execProcess() it |
19:49:49 | Yardanico | Araq, same with macros? |
19:50:18 | * | thomasross quit (Read error: Connection reset by peer) |
19:50:37 | Araq | that's how I would implement the macro system, yeah |
19:51:01 | Araq | but that only works with the compilation cache |
19:52:26 | Araq | and in fact, it's not 100% sure this would work. |
19:52:39 | Araq | it's a research project for later Nim versions |
19:55:36 | * | Arrrr joined #nim |
19:56:11 | * | Vladar quit (Quit: Leaving) |
20:00:33 | * | Trustable joined #nim |
20:02:30 | FromGitter | <notTito> hey speaking of macros, here is a dump question: Suppose i have a local variable, how I check where its used in the body? Compare the NimNodes directly with `==` use eqIdent or store the .ident of that variable and check? |
20:03:39 | FromGitter | <krux02> @notTito do not use the .ident member of a node anymore |
20:03:51 | FromGitter | <krux02> the type NimIdent is deprecated |
20:04:31 | FromGitter | <krux02> comparing nimnodes with `==` should be fine |
20:04:52 | * | PMunch joined #nim |
20:04:55 | FromGitter | <krux02> when the AST has the same symbol several times they should be identical |
20:05:13 | FromGitter | <notTito> ok thanks krux02 |
20:05:33 | FromGitter | <krux02> so you should have a typechecked AST, and then to a recursive traversal and test for equality. |
20:06:23 | FromGitter | <krux02> do the typechecking because, then you can be shure that another symbol with the same name does not match. |
20:13:25 | * | chrismc joined #nim |
20:13:28 | FromGitter | <notTito> makes sense but in my case I cant do that bc i was experimenting with a `this` macro |
20:14:06 | FromGitter | <notTito> not sure how its going to work or if its even possible |
20:17:22 | * | chrismc quit (Client Quit) |
20:17:40 | * | chrismc joined #nim |
20:18:50 | * | chrismc quit (Client Quit) |
20:18:53 | * | chrismc_ joined #nim |
20:19:34 | * | chrismc_ quit (Client Quit) |
20:19:56 | * | chrismc joined #nim |
20:26:53 | FromGitter | <turbolent> Hi there! I'm trying to get Nim working on my rusty old PowerMac G5 on Mac OS X 10.4. With https://github.com/nim-lang/Nim/compare/devel...turbolent:macosx-powerpc I get the C sources of v0.18 compiling , and the nim command spits out its help. However, compiling a simple hello world fails with: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ Any idea what could be wrong here? [h |
20:26:53 | FromGitter | ... ttps://gitter.im/nim-lang/Nim?at=5b1d898cddd61d08e545a67d] |
20:30:08 | Arrrr | It must be that, until now, no one implemented that proc in mac i guess |
20:30:27 | Arrrr | or for you exact os |
20:33:03 | FromGitter | <turbolent> how come the nim works on recent versions of macOS though? I assumed the implementation at the very end in lib/system/excpt.nim was picked. is that used for other mac platforms/versions, or another one? it looks like this should work just fine even on the old PPC |
20:34:14 | Arrrr | That's a good question. Nim figures it out through defines. So there must be something special about your OS. |
20:35:29 | Arrrr | https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim |
20:39:20 | Araq | turbolent: check instead how far you get with 'koch boot --gc:none' |
20:39:37 | Araq | I think Power32 needs adjustments in its stack handling |
20:39:50 | Araq | and a wrong GC can sadly produce totally misleading Nim compiler errors |
20:41:22 | Araq | the responsible file would be system/gc_common.nim |
20:42:01 | FromGitter | <turbolent> On the PPC target machine or on my macOS/x86 host? On the target, I only got `build.sh` succeeding, `./bin/nim c koch` fails with the same error, as it does for the hello world program |
20:42:14 | FromGitter | <turbolent> interesting |
20:43:08 | Araq | well you cross compile on the host for the target machine |
20:43:20 | Araq | and compiling on the host should work |
20:43:31 | FromGitter | <turbolent> I see, will give that a shot |
20:43:39 | Araq | I assumed you reported this result when the compiler already runs on the PPC target machine |
20:44:16 | FromGitter | <turbolent> yes, report was from the PPC target |
20:46:28 | Araq | alternatively build with --gc:markAndSweep |
20:47:01 | Araq | the M&S GC probes the stack so rarely that it doesn't matter much if the stack scanning is 100% correct :P |
20:47:53 | shashlick | doesn't look like our cached copy of mingw contains what's required to run cmake or autoconf on windows |
20:48:18 | * | chrismc quit (Quit: Leaving) |
20:48:27 | * | chrismc joined #nim |
20:50:00 | Araq | autoconf on windows never worked for me |
20:50:15 | Araq | and on other OSes it rarely worked |
20:50:20 | shashlick | cmake ships a separate installer/.zip |
20:50:34 | shashlick | configure has worked fine for me in msys but that's a huge dependency |
20:52:18 | * | chrismc quit (Client Quit) |
20:52:29 | * | chrismc joined #nim |
20:53:06 | * | chrismc quit (Client Quit) |
20:53:17 | * | chrismc joined #nim |
20:54:03 | * | chrismc left #nim (#nim) |
20:56:37 | FromGitter | <zetashift> @Yardanico is it bad that nimx is based on sdl? |
20:56:50 | * | chrismc joined #nim |
20:58:12 | shashlick | can you make a PR that's based on another PR? |
20:58:29 | shashlick | without reusing the branch of the first PR |
21:04:46 | Yardanico | @zetashift not really |
21:08:05 | chrismc | Quick question, I'm pretty new to Nim and I'm getting a "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" error, however it doesn't indicate the line for the error. How do I determine which line has the issue? |
21:09:17 | shashlick | without reusing the branch of the first PR |
21:09:31 | Yardanico | chrismc, are you getting this error at compile-time or runtime? |
21:09:42 | Yardanico | and if at runtime, did you compile your program in release mode? |
21:10:01 | * | nsf quit (Quit: WeeChat 2.1) |
21:10:22 | chrismc | compile time, compiled with just "nim c -r" |
21:10:25 | Araq | shashlick: I don't know |
21:10:45 | Araq | chrismc: don't use types as values and vice versa |
21:11:00 | shashlick | ok, guess I have to wait for my PRs to be integrated before working on anything building on top of them |
21:11:13 | Yardanico | chrismc, it's an error in the compiler then, can you post source code on gist or somewhere else? if it's not confidential |
21:11:41 | Araq | shashlick: actually, you only have to wait with *pushing* more commits onto your PR branch |
21:12:37 | chrismc | Yardanico: https://gitlab.com/chrismc/fooling-around-with-nim/blob/master/datastructures/stack.nim |
21:12:47 | shashlick | ya but don't want to go too far into the rabbit hole if I receive feedback which changes the design too much |
21:13:25 | FromGitter | <Varriount> Shashlick: What pull request is this? |
21:13:59 | shashlick | https://github.com/dom96/choosenim/pull/63 |
21:21:24 | Yardanico | chrismc, it doesn't crash for me on devel |
21:21:31 | chrismc | interesting |
21:21:32 | Yardanico | chrismc, and you have a typo on line 99 |
21:21:38 | Yardanico | chrismc, stack -> stack1 |
21:21:46 | Yardanico | and it passed all tests |
21:22:13 | chrismc | yea, that's the error, shit, thanks Yardanico for the 2nd look |
21:22:26 | chrismc | when fixed to "stack1", it runs fine |
21:22:45 | * | dddddd quit (Ping timeout: 268 seconds) |
21:22:47 | Yardanico | chrismc, compiler crashing is always considered a bug, but it doesn't happen on devel, so it's fixed :) |
21:23:02 | Yardanico | compiler gave me a clear error "test.nim(99, 17) Error: undeclared identifier: 'stack'" |
21:23:26 | Yardanico | chrismc, what nim version are you using? |
21:23:34 | Yardanico | nim -v |
21:23:44 | chrismc | 0.18.0 |
21:24:12 | Yardanico | very strange, it doesn't even crash with SIGSEGV on play.nim-lang.org |
21:24:29 | chrismc | interesting, I wonder what's happening there |
21:24:45 | * | euinix joined #nim |
21:25:10 | * | euinix quit (Client Quit) |
21:27:31 | * | Arrrr quit (Quit: Arrrr) |
21:28:18 | * | dddddd joined #nim |
21:29:32 | * | yglukhov[i] quit (Ping timeout: 268 seconds) |
21:30:52 | chrismc | I see what happened: I declared a type "Stack" and then used "stack.pop", which basically was me "using a type as a value" per Araq's message above |
21:33:37 | chrismc | does that make sense? I'm pretty new with Nim |
21:33:57 | * | yglukhov[i] joined #nim |
21:36:15 | shashlick | can you print stuff in the `=destroy` proc? nothing prints out, how do I know it is running |
21:36:55 | Yardanico | chrismc, maybe you've used "Stack.pop" ? |
21:38:02 | chrismc | I don't know what happened, but when I use "discard stack.pop" in my file, it does the error message I saw before without any compile errors |
21:38:05 | FromGitter | <ephja> if it doesn't print anything then it's not being called |
21:43:01 | shashlick | ok then I need a review of my SvnzFile object and destructor: https://github.com/genotrance/nim7z/blob/master/nim7z.nim |
21:43:07 | shashlick | appreciate it |
21:43:20 | chrismc | Yardanico: When I run that same code with the devel branch, it still gives me that same output with no "undeclared identifier" message |
21:44:13 | Yardanico | chrismc, that's veeeeryy strange |
21:44:18 | Yardanico | can you post the exact code? |
21:44:23 | Yardanico | are you sure it's the same as on gitlab? |
21:46:04 | chrismc | Here is a static snippet: https://gitlab.com/snippets/1723320 |
21:46:26 | chrismc | the last line "discard stack.pop" does the SIGSEGV |
21:47:10 | chrismc | it does it on stable and devel branches for me |
21:48:03 | Yardanico | well, lol, it still gives "discard stack.pop" to me |
21:48:10 | * | Trustable quit (Remote host closed the connection) |
21:48:12 | Yardanico | I mean "test.nim(132, 11) Error: undeclared identifier: 'stack" |
21:48:15 | * | miran quit (Quit: Konversation terminated!) |
21:48:36 | chrismc | yea, weird, it gives me that in play.nim-lang.org, but on my local PC nothing |
21:52:13 | chrismc | Can I do anything else to troubleshoot this? I'd like it if my nim would give me the same errors as everyone else, lol |
21:53:02 | Araq | what's the OS? how did you install Nim? what does 'nim -v' really say |
21:53:44 | chrismc | Linux and Nim Compiler Version 0.18.0 [Linux: amd64] |
21:53:44 | chrismc | Copyright (c) 2006-2018 by Andreas Rumpf |
21:53:44 | chrismc | git hash: 855956bf617f68ac0be3717329e9e1181e5dc0c6 |
21:53:44 | chrismc | active boot switches: -d:release |
21:54:00 | FromGitter | <turbolent> @Araq same error with `./koch csources --debuginfo -d:debug --linedir:on --debugger:native --gc:none` |
21:55:00 | Araq | turbolent: also try -d:useSysAssert -d:useGcAssert but first learn how to cross compile without 'koch csources |
21:55:14 | Araq | which is super slow as it does way too much work |
21:55:24 | chrismc | Araq: I can file a bug report, if it is easier to gather info that way |
21:55:35 | * | Cthalupa joined #nim |
21:56:03 | Araq | ok but don't expect miracles if nobody can reproduce your problem ;-) |
21:56:47 | FromGitter | <turbolent> @Araq thanks, I'll try that and also look into actual cross compiling, but I doubt that is even possible |
21:56:51 | Araq | nim c --cpu:power32 --os:macosx --genscript --nimcache:osxpower32 compiler/nim.nim |
21:57:11 | chrismc | yea, no worries, there are more important things for you to work on of course, I'll file a ticket with everything I know so far |
21:57:12 | Araq | and then move the osxpower32 dir to your machine and run the produced sh build script |
21:57:48 | Araq | is much faster for cross compiling |
21:58:57 | * | CodeVance joined #nim |
21:59:50 | FromGitter | <turbolent> @Araq great, thanks! |
22:00:52 | Araq | and thanks to shashlick we know --genscript works. right? |
22:01:04 | CodeVance | Thank you Araq |
22:01:16 | shashlick | 👍 |
22:02:37 | Araq | CodeVance: for what? :-) |
22:02:51 | CodeVance | Araqyou can't "kill" a thread, the posix APIs pretty much deprecated it06:45:06Araqyou thread needs to support receiving a "shutdown" message06:45:14Araqor else you use a process instead. |
22:03:06 | CodeVance | For telling me to use a process instead |
22:03:12 | Araq | ok lol |
22:03:15 | Araq | you're welcome |
22:04:28 | CodeVance | I have a problem when I try to load a nim dll that has an infinite loop in it. it blocks the main program and I don't know how to cancel loading it. For now I made a seperate program loaded the dll and checked if the program exited normally. is that correct? |
22:05:09 | Araq | pretty much the best solution afaict |
22:06:34 | CodeVance | Ok. its not a nim problem its a microsoft problem I think |
22:06:41 | CodeVance | so nothing else I can do |
22:06:47 | Araq | or you wait until https://github.com/nim-lang/Nim/blob/araq-incremental-compilation/tests/compilerapi/tcompilerapi.nim lands in devel and use NimScript for your plugin system |
22:06:57 | FromGitter | <ephja> the loader actually doesn't detect loops? |
22:07:21 | Araq | depends on whether Nim's VM is good enough for you. |
22:07:38 | chrismc | for my weird problem, feel free to ask for more information there, low priority since it seemingly only affects me: https://github.com/nim-lang/Nim/issues/8011 |
22:07:50 | Araq | the VM can be made to not run into endless loops |
22:09:18 | CodeVance | VM would be the best solution. I'll switch to it when its available? |
22:09:55 | Araq | need to fix 3 test cases and then it'll be in devel. check tomorrow |
22:10:02 | FromGitter | <ephja> oh the vm |
22:10:21 | Araq | don't you dare say anything against my vm :P |
22:10:30 | Araq | it's come a long way. |
22:11:12 | Araq | and it's a super cool register based VM |
22:11:21 | Araq | inspired by Lua's. |
22:11:32 | CodeVance | is the vm like a full nim interpreter? |
22:12:04 | FromGitter | <ephja> I just read "dll" |
22:12:07 | CodeVance | Can it do everything normal programs can |
22:12:21 | Araq | it's the only Nim interpreter |
22:12:35 | Araq | and it can't run the FFI ;-) |
22:15:03 | krux02 | Araq: do you plan to kill the interpreter? |
22:15:21 | Araq | within the next decade, maybe |
22:15:41 | * | PMunch quit (Quit: leaving) |
22:15:52 | Araq | but it's useful for game engines too. |
22:16:03 | Araq | so it probably should become just another backend |
22:16:06 | FromGitter | <ephja> I assume we don't have enough linalg libraries yet |
22:16:20 | Araq | and the macro system should be based on a plugin system. |
22:16:28 | Araq | but that's far away. |
22:16:38 | CodeVance | I wanted to experiment with hotloading nim libs |
22:17:10 | krux02 | well I don't think it's wise to kill it. There are macros that are only used library internal, there is little point in compiling those scripts into a plugin and then execute them once |
22:17:12 | FromGitter | <ephja> plugin sandboxing |
22:18:06 | krux02 | don't get me wrong, I like the idea of plugins, I think the nim to glsl compiler works much better as a Nim plugin than it does now |
22:18:15 | Araq | krux02: if the caching works and the compiler is based on packed data structures it would be a performance win |
22:18:28 | krux02 | but I don't think plugins are superior to the scripting system |
22:18:37 | Araq | and when was the last time you compiled a program/snippet only "once" anyway |
22:18:59 | krux02 | isn't caching completely orthogonal to the macros as plugin transition? |
22:19:14 | krux02 | Araq: the glm library does that |
22:19:25 | krux02 | it generates all swizzle procs with a macro |
22:19:28 | FromGitter | <ephja> quake 3's vm loads bytecode produced by LCC |
22:19:46 | krux02 | it's not used once, the macro is used 3 times |
22:19:51 | Araq | ephja. pretty crazy, but if it worked for them |
22:20:12 | krux02 | for the set "xyzw", "abcd" and "uv.." |
22:20:16 | krux02 | I forgot the last part |
22:20:30 | krux02 | but that's it, the macro isn't used outside of the library |
22:20:45 | FromGitter | <ephja> certain operations are not allowed. pretty sure that's how it worked |
22:20:57 | krux02 | waht is LCC again? |
22:21:14 | Araq | a C compiler. |
22:21:22 | Araq | pretty dead these days. |
22:21:55 | Araq | was based on a book about how to build table based code generators. |
22:22:15 | Araq | was quite impressive in its days. |
22:22:46 | Araq | and small too. but it never produced code on par with GCC |
22:23:45 | krux02 | I mean projects that are written for teaching purpose are often not rich in featuers like optimizations |
22:23:54 | Araq | was then developed further by a guy who didn't understand C++ and wanted to improve C in his own silly ways, like so many other "C improvements" |
22:23:55 | krux02 | but yea, I don't know much about it |
22:24:34 | Araq | "C++ is bad because '=' can mean more than a memcpy and so I added big nums as builtins to C..." |
22:24:41 | krux02 | Well to be honest, c++ also has silly ideas, because people didn't know better |
22:25:18 | Araq | the C++ haters usually fail to mention its silly ideas. :P |
22:25:29 | krux02 | yea that is true |
22:25:41 | Araq | and instead come up with FUD. |
22:25:54 | krux02 | the c++ haters usually are not able to properly program in c++ and don't like it becaues of it |
22:26:13 | krux02 | but spotting the concrete problem is actually quite hard if you don't understand the language |
22:26:16 | Araq | oh it's fine to not be able to program in it. |
22:26:40 | krux02 | Nim also has silly ideas |
22:26:55 | Araq | huh, blasphemy. |
22:26:58 | Araq | like what? |
22:27:10 | krux02 | the "range" type |
22:27:17 | krux02 | :D |
22:27:44 | Araq | yeah, that thing that helps Ada's proof engines surely was a mistake to copy over |
22:27:51 | CodeVance | lol I don't know if I've ever used the range type |
22:27:57 | Araq | :P |
22:28:15 | krux02 | yes exactly |
22:28:41 | krux02 | I just don't use the range types, and I am 100% happy with the language |
22:28:52 | FromGitter | <ephja> CodeVance: get out! |
22:28:57 | FromGitter | <ephja> :-) |
22:29:48 | CodeVance | ephja nim's pretty big. Maybe I've used them I just don't know??? |
22:29:53 | krux02 | well I like the idea to be able to specify constraints on numbers, I just don't think it should be builtin to the language |
22:30:14 | krux02 | it's a type that has two static numbers baked into them |
22:30:47 | dom96 | range types may have a niche use, but for that use they are great |
22:30:59 | CodeVance | range for numbers? that's useful |
22:31:14 | CodeVance | its not like its bothering anyone |
22:31:36 | CodeVance | does it look like this range[0..5] |
22:32:05 | krux02 | and I am always confused it an expression is a type or a value |
22:32:18 | krux02 | is 0 .. 5 a value or is it a type |
22:32:21 | krux02 | I never know |
22:32:43 | * | yglukhov[i] quit (Ping timeout: 256 seconds) |
22:33:02 | krux02 | and when 0 .. 5 is a range value |
22:33:51 | krux02 | and range[0..5] is a rangle type that as a static range value as part of it, then why can't the range type be just a pure library feature? |
22:34:00 | krux02 | a type with two static integer fields |
22:34:05 | krux02 | but we had this discussion |
22:34:10 | krux02 | it's not going anywhere |
22:34:14 | FromGitter | <ephja> it constructs a slice. maybe range[T:static[Slice]] would have been more obvious |
22:34:17 | krux02 | so I won't continue here |
22:34:41 | krux02 | Araq: I have a question to the compilation cache, because I don't quite understand the technical challenges with it |
22:34:58 | krux02 | you mentiond the gathering technique |
22:35:06 | Araq | no, zahary did |
22:35:14 | Araq | but go on |
22:35:15 | krux02 | ah, sorry |
22:35:54 | * | CodeVance left #nim (#nim) |
22:36:00 | krux02 | well yes, that technique is something that I would like to take advantage of, but I didn't even do it, because I didn't find a way that I was happy with |
22:36:37 | krux02 | all I was able to do was to write macros that appended to this shared global state, and then the user was responsible to call another macro that then used this shared global state |
22:36:38 | * | CodeVance joined #nim |
22:36:44 | FromGitter | <ephja> I don't think you can implement it in Nim yet |
22:36:52 | krux02 | but I din't find a way to take this resposibility away from the user |
22:37:03 | krux02 | so I didched that idea |
22:37:15 | krux02 | but I would really liket ot have it back. |
22:37:41 | krux02 | so the question is, when there is a shared global state of something, what is the problem there with the compilation cache? |
22:38:06 | Araq | you are asking about the 'sealing' step |
22:38:15 | Araq | problem is that Nim lacks it. |
22:38:38 | Araq | and a compilation cache is the wrong thing to latch this feature onto. |
22:38:48 | krux02 | what is the 'sealing' step? |
22:39:19 | Araq | what you described, what current needs to be done as 'proc callThisWhenDone() {.compileTime.}' |
22:39:32 | Araq | which everybody seeks to avoid :P |
22:39:44 | krux02 | I am not saying I want to "latch" this feature on the compilation cache, but I would like to have that featuer, and I would like the compilation cache to work. σo I would like to know about where those two things bite each other. |
22:40:02 | Araq | I only used this technique in 'nimsqueak' |
22:40:30 | krux02 | nimsqueak? |
22:40:36 | Araq | and often the lookup tables are moved to the runtime due to a lack of a sealing step |
22:40:39 | krux02 | reminds of of newsqueak |
22:40:51 | Araq | whatever, it's not important. |
22:41:06 | Araq | jester uses runtime routing tables for this reason |
22:41:32 | Araq | (and maybe because the VM doesn't support these tables with regexes in them properly) |
22:42:09 | Araq | well. we discussed this here in #nim |
22:42:20 | Araq | and there are not too big obstacles to do this |
22:42:59 | krux02 | and then? |
22:43:20 | Araq | but the phase orderings would probably need to be changed, affecting everything |
22:43:40 | Araq | zahary claimed "it's not much work" but he always says that :P |
22:43:49 | krux02 | I was actually thinking about making regular expressions available on the VM, as a reald binding |
22:44:17 | Araq | I am not convinced we need to change the phase orderings to get this feature |
22:44:34 | krux02 | yea, I used to say that too. Wisedom told me, it is always a lot of work when you want to do it properly |
22:45:41 | krux02 | it always, idea, concrete concept, implementation, problems, implementation, problems, done, works, bugs, fixing bugs, bugs, fixing bug, more bugs. Finally done, last bug ... |
22:46:06 | krux02 | It just takes a long time to write something that works without problems when it is something non trivial |
22:47:08 | krux02 | well back to topic, what do you/he mean with phase orderings? |
22:47:12 | Araq | well partly that's because we made the mistake of making Nim not 100% "introspectable" |
22:47:48 | Araq | but we'll get there, it's my "vision" |
22:48:03 | krux02 | what do you mean with introspectable? |
22:48:18 | Araq | krux02: zahary argued the sealing step needs to be done after sem but before transf |
22:48:33 | krux02 | transf? |
22:48:42 | Araq | and it runs after the full program has been sem'checked |
22:48:54 | Araq | and before anything was transf'ed. |
22:48:59 | Araq | sorry, compiler terms. |
22:49:05 | Araq | the compiler is a pipeline |
22:49:12 | krux02 | well, I have to look that term up |
22:49:16 | Araq | 'transf' is the first codegen step |
22:49:22 | Araq | it inlines iterators, for example |
22:49:35 | krux02 | yea google corrects me |
22:49:37 | Araq | so the AST is not recognizable afterwards for macros |
22:50:12 | Araq | and we would need to change how this pipeline is setup. |
22:50:25 | krux02 | in typed macro arguments, iterators are already inlined |
22:50:34 | Araq | yeah :P |
22:51:11 | Araq | that's why I think it's not even important ;-) |
22:51:22 | Araq | macros already need to be able to eat this shit |
22:52:18 | krux02 | I even wrote a pattern matcher for an inlined iterator to compile it to glsl, because glsl does not have a goto and I can't compile te inlined iterator with the named break statements |
22:52:30 | Araq | have you seen my packedjson? |
22:52:38 | krux02 | no |
22:52:58 | Araq | well I long for using this idea for Nim's ASTs |
22:52:58 | krux02 | link? |
22:53:10 | Araq | https://github.com/Araq/packedjson |
22:54:00 | FromDiscord | <jos> QUICK QUESTION |
22:54:09 | FromDiscord | <jos> best way to install nim for an ephemeral CI build? |
22:54:13 | FromDiscord | <jos> best way to install nim for an ephemeral CI build? |
22:54:33 | Araq | check Nim's .travis and appveyor scripts |
22:54:38 | krux02 | well that is actually a great idea, I never thought about that it might be possible for the ast. |
22:54:45 | FromDiscord | <jos> ok |
22:54:46 | FromDiscord | <jos> thanks |
22:54:47 | Araq | it is possible. |
22:55:05 | Araq | and it creates an aliasing free AST. |
22:55:15 | Araq | with a O(1) destructor. |
22:55:41 | Araq | that you can copyMem() to a different thread or write to disk. |
22:56:19 | krux02 | I think the write to disk is pretty useful for compilation caching |
22:56:29 | Araq | oh really, tell me about it :P |
22:57:30 | FromDiscord | <jos> i looked in a third party repo and they use a script in the nim repo called ci/build.sh |
22:57:44 | Araq | you check the input file length, you know the AST is usually 80% of that size, you allocate the buffer for the complete AST in one alloc |
22:57:51 | krux02 | 94MB compared to 1.2GB is pretty neat |
22:58:28 | Araq | the input file is 180MB |
22:58:30 | krux02 | (comment about packed jsone) |
22:58:55 | krux02 | loading 180MB can be pretty fast |
23:00:43 | krux02 | Araq: I think stdlib json should become deprecated and people should be encouraged to use packedjson instead. But thats just my opinion. |
23:01:07 | Araq | the API is harder to work with though and I cannot support all of json.nim |
23:01:37 | krux02 | what is missing? |
23:01:58 | Araq | well you can't change the tree from a child node |
23:02:09 | Araq | only from the root node (called JsonTree) |
23:02:22 | Araq | because the aliasing otherwise becomes unmanagable |
23:02:34 | krux02 | that is of course true |
23:02:44 | Araq | you could introduce COW and versioning perhaps, but I didn't need it |
23:03:04 | krux02 | COW? |
23:03:41 | Araq | copy-on-write |
23:05:49 | * | chrismc quit (Quit: Leaving) |
23:06:00 | krux02 | well I am thinking about a reference to a node that knows all parents, and when you change the node by adding more stuff to it, it krows the space the node has like a seq does, and then you can just write to it, but at a certain amount it has to reallocate everything, the entire tree, so everything stays flat. |
23:06:37 | krux02 | or the nods that you edit, are replaced in the tree by some sort of escaped pointers |
23:07:04 | krux02 | so that the json is flat except the edited nodes |
23:07:11 | krux02 | but yea very hypothetical |
23:07:36 | krux02 | I only use json for parsing and for serialization, I neverd needed mutable json. |
23:08:31 | krux02 | Araq: macros generate ref based Nodes |
23:08:46 | krux02 | so they explicitly allow reuse of Nodes |
23:09:07 | krux02 | do you want to give Copy semantic to all Nim Nodes? |
23:10:49 | Araq | yeah |
23:11:16 | krux02 | would break a lot. |
23:11:35 | krux02 | I am not the one who is against breaking a lot of code when it is eventually changing for the good. |
23:11:47 | Araq | I know but you can also use the packed AST in the compiler |
23:11:52 | Araq | and the ref based AST in the VM |
23:12:00 | Araq | and convert between them |
23:12:05 | krux02 | ok |
23:13:02 | krux02 | then I won't need to search for all cases where I append to a node after I've inserted it into another node |
23:13:35 | krux02 | Well it's getting late again, and I need to get up tomorrow again, so I would postphone this discussion for tomorrow. I will be online the entire day starting from 10:00 |
23:13:43 | krux02 | until maybe 20 |
23:13:50 | krux02 | so I have to say good night |
23:14:00 | Araq | ok, bye |
23:19:55 | * | krux02 quit (Quit: Leaving) |
23:38:53 | * | xet7 quit (Remote host closed the connection) |
23:52:21 | FromGitter | <turbolent> ```$ ./hello ⏎ Hello from PowerPC G5 on Mac OS X 10.4``` [https://gitter.im/nim-lang/Nim?at=5b1db9b5dd54362753008a2e] |
23:56:02 | FromGitter | <turbolent> compiling the compiler directly sped up iteration a lot, but no matter what I tried, every GC and option resulted in the original error. once I commented out the `setControlCHook` forward declaration in lib/system.nim:3216 it worked. Really nice to finally have Nim working, but I still wonder why the implementation in lin/system/excpt.nim isn't found and used 🤔 |
23:59:36 | * | BitPuffin quit (Remote host closed the connection) |