00:04:04 | * | manjaro-user- joined #nim |
00:04:05 | * | manjaro-user- is now known as alphazino |
00:04:39 | * | alphazino quit (Client Quit) |
00:05:32 | * | Alphazino joined #nim |
00:06:44 | * | Alphazino quit (Client Quit) |
00:17:52 | * | clyybber quit (Quit: WeeChat 2.6) |
00:26:33 | * | norm joined #nim |
00:26:48 | * | norm is now known as Guest17824 |
00:27:50 | * | Guest17824 quit (Client Quit) |
00:34:55 | * | couven92 joined #nim |
00:43:35 | * | norm joined #nim |
00:43:51 | * | norm is now known as Guest68252 |
00:46:12 | FromGitter | <kayabaNerve> Anyone have experience with stack smashing? |
00:46:38 | FromGitter | <kayabaNerve> Because I think this is Nim's fault but I don't know enough to diagnose/submit it. |
00:47:06 | FromGitter | <kayabaNerve> My echo statement at the end of my function prints, yet then the returned value is not set. AFAICT, the popFrame function is the problem. |
00:48:22 | FromGitter | <kayabaNerve> GDB says the issue is in the standard lib's arithm.nim, L338, which is blank :/ |
00:48:40 | FromGitter | <kayabaNerve> Valgrind gives this fun error. |
00:48:43 | FromGitter | <kayabaNerve> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ded99eb550662459891fbae] |
00:49:15 | FromGitter | <kayabaNerve> There's 10 more question marks after that, one at address 0x5. |
00:53:39 | FromGitter | <kayabaNerve> So the arithm is addInt while the system is `template dotdotLessImpl(t) {.dirty.} =`. The code block at the end of the function consistently causing crashes is: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ To be clear, print statements after the for loop do print, `s` is not used elsewhere or accessed outside of scope, and that if statement is never triggered. The add call is to a C FFI but neither GDB or |
00:53:39 | FromGitter | ... Valgrind point the finger there. [https://gitter.im/nim-lang/Nim?at=5ded9b12d64a052fb6de11c5] |
01:00:13 | * | dwdv quit (Ping timeout: 268 seconds) |
01:03:14 | * | Guest68252 quit (Quit: Leaving) |
01:11:15 | * | Hideki_ joined #nim |
01:15:37 | * | Hideki_ quit (Ping timeout: 250 seconds) |
01:49:07 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
02:13:59 | * | couven92 quit (Read error: Connection reset by peer) |
02:14:26 | * | couven92 joined #nim |
02:30:16 | FromGitter | <kayabaNerve> Never mind. It was an FFI issue that just didn't pop up until popFrame was called :/ |
02:47:48 | * | rockcavera joined #nim |
02:54:51 | * | sealmove joined #nim |
02:58:57 | * | dddddd quit (Ping timeout: 246 seconds) |
03:24:33 | sealmove | hello world works! https://github.com/sealmove/nimitai 🎉 |
03:24:44 | disruptek | nice! |
03:24:53 | disruptek | congrats, that was a long time coming. |
03:29:36 | sealmove | it's more work than expected, I had to use some IR |
03:29:52 | disruptek | infra-red, huh? wow, that /is/ a lot of work. |
03:30:21 | sealmove | text -> IR -> ast -> nim ast |
03:34:03 | * | drewr quit (Ping timeout: 245 seconds) |
03:35:57 | FromDiscord | <Rika> So, why does nim enforce space indentation |
03:37:47 | sealmove | it doesn't |
03:37:50 | sealmove | you can use `;` |
03:38:30 | sealmove | pairing it with parenthesis of course |
03:41:29 | * | kevinchau joined #nim |
03:47:16 | FromDiscord | <Rika> I mean vs tab indentation |
03:47:27 | FromDiscord | <Rika> Tab usage is an error from what I recall |
03:47:58 | disruptek | you can use a source code filter to get around it, but from experience, it's not worth it. |
03:53:38 | * | endragor joined #nim |
04:01:27 | FromGitter | <gogolxdong> Is there any AEAD implementation? |
04:09:23 | FromGitter | <gogolxdong> conforms to TLS1.3 |
04:14:41 | nisstyre | link with openssl? |
04:18:20 | * | nsf joined #nim |
04:20:13 | * | drewr joined #nim |
04:32:16 | * | kevinchau quit (Ping timeout: 240 seconds) |
04:40:30 | * | crem quit (Read error: Connection reset by peer) |
04:45:22 | * | crem joined #nim |
04:50:32 | * | rockcavera quit (Remote host closed the connection) |
04:52:38 | * | couven92 quit (Quit: Client Disconnecting) |
04:54:31 | * | narimiran joined #nim |
04:59:33 | * | leorize joined #nim |
05:01:06 | * | chemist69 quit (Ping timeout: 246 seconds) |
05:03:07 | * | chemist69 joined #nim |
05:12:54 | * | Hideki_ joined #nim |
05:16:56 | * | Hideki_ quit (Ping timeout: 240 seconds) |
05:47:39 | * | nif quit (Quit: ...) |
05:47:48 | * | nif joined #nim |
06:02:27 | * | ltriant quit (Quit: leaving) |
06:05:23 | FromGitter | <gogolxdong> How to change the [n.prepare] section in .cfg file generated by nimgen , aside which the git repo has been cloned ? |
06:06:53 | shashlick | n.prepare isn't generated - it is hand created right? |
06:07:17 | FromGitter | <gogolxdong> as for nimssl, it's generated. |
06:08:52 | FromGitter | <gogolxdong> I am trying to copy it to openssl directory and run nimgen manually. |
06:09:19 | FromGitter | <gogolxdong> openssl is so big that it could fail while cloning. |
06:11:00 | shashlick | I see |
06:11:45 | shashlick | you just need to modify the output in n.global |
06:12:08 | shashlick | just remove it and nimgen will look in local directory for openssl code |
06:13:57 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dede625d75ad3721d7d9071] |
06:30:56 | shashlick | Remove output = from the cfg file |
06:31:08 | shashlick | Put it below openssl directory |
06:31:29 | shashlick | Or use a symlink |
06:39:31 | FromGitter | <gogolxdong> yes, I removed output=nimssl and put nimssl.cfg below openssl directory |
06:48:02 | shashlick | what parts of openssl do you want to use |
06:48:15 | * | solitudesf joined #nim |
06:50:16 | FromGitter | <gogolxdong> what do you mean |
07:25:55 | leorize | don't we have openssl bindings in the stdlib already? |
07:27:13 | FromGitter | <gogolxdong> I'm afraid it's not conforming to TLS1.3 |
07:29:29 | leorize | if you're working on a new project I'd suggest to not use openssl |
07:30:25 | FromGitter | <gogolxdong> It's the specification of QUIC-TLS |
07:33:00 | * | PMunch joined #nim |
07:35:25 | * | Vladar joined #nim |
07:53:51 | * | solitudesf quit (Ping timeout: 250 seconds) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:05:08 | * | gmpreussner joined #nim |
08:11:56 | Yardanico | What the heck is this https://github.com/nim-lang/Nim/commit/bef1c4437db3ec2afdcc0180c9eefb87aaf8fba6#commitcomment-36330963 |
08:12:25 | Yardanico | And https://github.com/nim-lang/Nim/commit/bec82254486a72c34bc2c78a8aa841d1eca498fd#commitcomment-36330960 |
08:13:33 | Araq | I reported him multiple times now |
08:32:00 | shashlick | @gogolxdong I'm asking what parts of openssl do you need wrapped |
08:44:28 | * | lritter joined #nim |
08:46:04 | * | ng0 joined #nim |
08:54:56 | PMunch | Yardanico, Araq, uhm am I missing something here? |
08:55:30 | PMunch | Oh, there were some comments on those commits that were deleted? |
08:58:58 | * | floppydh joined #nim |
09:09:10 | * | Hideki_ joined #nim |
09:10:39 | * | leorize quit (Quit: WeeChat 2.6) |
09:12:49 | aeverr[m] | how bad were the comments |
09:13:36 | FromGitter | <gogolxdong> aes gcm sha256, pkcs7 is related |
09:13:38 | * | Hideki_ quit (Ping timeout: 245 seconds) |
09:15:15 | * | thomasross_ joined #nim |
09:15:15 | * | thomasross is now known as Guest14973 |
09:15:15 | * | thomasross_ is now known as thomasross |
09:16:28 | shashlick | I need to see how easy it is to wrap openssl with nimterop |
09:16:34 | shashlick | Nimgen method is obsolete |
09:17:52 | * | Guest14973 quit (Ping timeout: 268 seconds) |
09:19:46 | FromDiscord | <yewpad> I actually thought you'd report rayman22201 but it seems like this all was about some weird ass comments which have been deleted already |
09:19:53 | FromGitter | <gogolxdong> oh, I forgot nimterop. Will you update your repo to use nimterop? |
09:21:58 | shashlick | Need to try it out |
09:22:15 | * | kevinchau joined #nim |
09:22:42 | * | dwdv joined #nim |
09:23:08 | FromGitter | <gogolxdong> ok, thanks. |
09:30:06 | * | kevinchau quit (Ping timeout: 265 seconds) |
09:58:55 | * | ikan-keli_2 joined #nim |
09:58:59 | * | dddddd joined #nim |
10:01:56 | * | ikan-keli_ quit (Ping timeout: 240 seconds) |
10:04:06 | PMunch | Araq, robustified the fixed size integer support a lot more in my PR: https://github.com/nim-lang/Nim/pull/12817 |
10:04:08 | disbot | ➥ Fix AVR target to define ints properly @11PMunch |
10:14:29 | * | nc-x joined #nim |
10:14:59 | nc-x | What does a `var T` parameter do in a template? I thought `var` is not required for template? |
10:16:04 | * | GitterIntegratio quit (Quit: killed) |
10:16:09 | * | salotz[m] quit (Quit: killed) |
10:16:09 | * | Balu[m] quit (Quit: killed) |
10:16:13 | * | aeverr[m] quit (Quit: killed) |
10:16:15 | * | k0mpjut0r quit (Quit: killed) |
10:16:16 | * | isaac[m]1 quit (Quit: killed) |
10:16:19 | * | BitPuffin quit (Write error: Connection reset by peer) |
10:16:19 | * | lqdev[m] quit (Quit: killed) |
10:16:20 | * | Demos[m] quit (Quit: killed) |
10:16:23 | * | lasso[m] quit (Quit: killed) |
10:16:23 | * | TheManiac[m] quit (Quit: killed) |
10:16:31 | * | meff[m] quit (Quit: killed) |
10:16:36 | * | zielmicha[m]1 quit (Quit: killed) |
10:16:36 | * | LEdoian[m] quit (Quit: killed) |
10:16:36 | * | Miguelngel[m] quit (Quit: killed) |
10:16:36 | * | yglukhov[m] quit (Quit: killed) |
10:16:39 | * | Connor[m] quit (Quit: killed) |
10:16:39 | * | Mike[m]2 quit (Quit: killed) |
10:16:42 | * | xomachine[m] quit (Quit: killed) |
10:16:42 | * | spymasterd[m] quit (Quit: killed) |
10:16:42 | * | macsek1911[m] quit (Quit: killed) |
10:16:42 | * | planetis[m] quit (Quit: killed) |
10:16:43 | * | leorize[m] quit (Quit: killed) |
10:16:44 | * | nergal[m]1 quit (Quit: killed) |
10:16:44 | * | zacharycarter[m] quit (Quit: killed) |
10:16:44 | * | pigmej quit (Quit: killed) |
10:16:45 | * | d-nice2[m] quit (Write error: Connection reset by peer) |
10:16:45 | * | nc-x[m] quit (Quit: killed) |
10:16:46 | * | skrylar[m] quit (Quit: killed) |
10:16:46 | * | Manny8888 quit (Quit: killed) |
10:19:46 | nc-x | Araq: How would https://github.com/nim-lang/Nim/pull/12860#issuecomment-563159360 work? `os.nim` does not have an implementation of those procs for nimscript. |
10:19:47 | disbot | ➥ Undefine `paramCount` & `paramStr` in os.nim for *.nims @11nc-x |
10:20:25 | * | voidlinux-free joined #nim |
10:20:32 | voidlinux-free | hello |
10:21:25 | voidlinux-free | setCookie(user, "admin"; expires = ""; |
10:21:26 | voidlinux-free | secure = true; httpOnly = true) |
10:21:29 | nc-x | Also is this patch good or do you want different behaviour? https://github.com/nim-lang/Nim/pull/12861 If this is good, I need the answer to the above template var parameter question so that I can send PR to the packages. |
10:21:30 | disbot | ➥ Error on invalid var typeclass syntax in proc arguments @11nc-x |
10:21:38 | * | nc-x quit (Remote host closed the connection) |
10:21:38 | voidlinux-free | why does ^ this fail? |
10:22:24 | voidlinux-free | it says expected setCookie(string, string) got (string, string; expires = string...) |
10:37:46 | Araq | voidlinux-free, use ',' instead of ';' |
10:38:07 | Araq | nc-x: 'var' parameters in templates still influence overloading resolution |
10:38:44 | * | tklohna joined #nim |
10:38:45 | Araq | nc-x: os.nim should get impls for paramStr and paramCount at compile-time for API consistency |
10:39:13 | voidlinux-free | sorry i mixed 2 lines; when ';' is used it says expected ')' at end |
10:39:49 | voidlinux-free | when',' is used it says Error type mismatch |
10:40:22 | voidlinux-free | got (string, string, expires: string, secure: bool..) expected proc setCookie(name, value: string) |
10:40:48 | voidlinux-free | my line: setCookie("test", "tests", expires = "",....) |
10:41:03 | voidlinux-free | importing strtabs and cgi at top |
10:42:43 | * | nc-x joined #nim |
10:42:50 | nc-x | voidlinux-free: fix your string |
10:43:02 | nc-x | by escaping " characters properly |
10:43:59 | * | lqdev[m] joined #nim |
10:43:59 | lqdev[m] | nc-x: I assume it affects type checking, just like any other type you can specify as a template param |
10:45:04 | nc-x | Araq, lqdev[m]: in that case I guess instead of producing error (https://github.com/nim-lang/Nim/pull/12861), it would be better to actually make it work? |
10:45:05 | disbot | ➥ Error on invalid var typeclass syntax in proc arguments @11nc-x |
10:45:43 | * | voidlinux-free quit (Remote host closed the connection) |
10:47:03 | * | voidlinux-free joined #nim |
10:47:10 | voidlinux-free | sorry i got disconnected |
10:47:29 | voidlinux-free | after escaping " it says Error: closing " expected |
10:47:39 | voidlinux-free | ^ same error with ';' and ',' |
10:48:09 | voidlinux-free | line: setCookie(\"test\", \"test\", httpOnly = true....) |
10:49:36 | nc-x | you are not doing it properly |
10:49:58 | voidlinux-free | whats wrong? |
10:50:02 | nc-x | setCookie requires two strings |
10:50:30 | voidlinux-free | yes i am passing it two strings, test and test |
10:50:55 | nc-x | you can't escape the first and last quote |
10:51:04 | nc-x | because they mean that it is a string |
10:51:08 | voidlinux-free | yeah passing only those two strings works, it sets the cokkie but then how do i set other values httpOnly ..? |
10:51:24 | nc-x | you have to escape any extra code inside the string |
10:51:28 | nc-x | *quote |
10:51:30 | * | nc-x quit (Remote host closed the connection) |
10:51:49 | voidlinux-free | there is no extra quote inside the string |
10:52:03 | voidlinux-free | setCookie("test, "test,) ___ this works |
10:52:28 | voidlinux-free | setCookie("test", "test"; httpOnly = false) # this doesnt work |
10:57:53 | Araq | setCookie("test", "test; httpOnly = false") |
10:58:05 | Araq | or better use multiple setCookie calls |
10:59:12 | voidlinux-free | Araq: like setCookie("test", "test) # line break # setCookie(httpOnly = false; ....) this? |
11:00:06 | Araq | no... |
11:01:14 | voidlinux-free | hmm yeah that would be wrong, then what did you sayabout multiple setcookie calls? |
11:03:53 | voidlinux-free | sorry i am new to this, just want a cgi page up and running |
11:04:36 | sealmove | can I create a dll out of macros? |
11:05:30 | Araq | sealmove, ha, how could that work? |
11:05:42 | FromGitter | <vinodvinu> Hi |
11:06:02 | FromGitter | <vinodvinu> Nimsuggest is eating memory |
11:06:09 | FromGitter | <vinodvinu> What to do ? |
11:06:37 | voidlinux-free | you mean memory leak? |
11:07:02 | FromDiscord | <mratsim> kill it with fire |
11:07:06 | FromGitter | <vinodvinu> Yup, its start from 100 MBs and growing to 2 GB in seconds |
11:07:16 | voidlinux-free | lol report it |
11:07:31 | sealmove | my use-case is that I want to produce a test-suite file based on other (spec) files. The number of files are 100+ so I don't want to do I/O for them every single time. |
11:07:44 | voidlinux-free | file an issue on github |
11:07:47 | FromGitter | <vinodvinu> First of all, please tell me to how to disable nimsuggest |
11:07:49 | FromDiscord | <yewpad> @Araq: https://github.com/nim-lang/Nim/pull/12816 |
11:07:51 | disbot | ➥ feature dracula themed doc 👑11Araq |
11:07:54 | FromDiscord | <mratsim> |
11:07:54 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/653553402600488970/DeepinScreenshot_select-area_20191208230303.png |
11:07:59 | FromDiscord | <mratsim> ^ look what it did to me |
11:09:24 | FromGitter | <vinodvinu> Is there any way to disable this memory eater ? |
11:09:52 | sealmove | should I print the test-suite to a file using `toStrLit()` or something? |
11:10:27 | voidlinux-free | yeah uninstall it, or maybe report it |
11:12:32 | * | nergal[m]1 joined #nim |
11:12:32 | * | isaac[m]1 joined #nim |
11:12:32 | * | leorize[m] joined #nim |
11:12:32 | * | Demos[m] joined #nim |
11:12:32 | * | k0mpjut0r joined #nim |
11:12:32 | * | LEdoian[m] joined #nim |
11:12:33 | * | GitterIntegratio joined #nim |
11:12:33 | * | BitPuffin joined #nim |
11:12:38 | * | zacharycarter[m] joined #nim |
11:12:38 | * | zielmicha[m]1 joined #nim |
11:12:38 | * | nc-x[m] joined #nim |
11:12:38 | * | meff[m] joined #nim |
11:12:38 | * | salotz[m] joined #nim |
11:12:39 | * | spymasterd[m] joined #nim |
11:12:39 | * | skrylar[m] joined #nim |
11:12:39 | * | lasso[m] joined #nim |
11:12:39 | * | pigmej joined #nim |
11:12:39 | * | aeverr[m] joined #nim |
11:12:39 | * | Connor[m] joined #nim |
11:12:39 | * | d-nice2[m] joined #nim |
11:12:39 | * | Miguelngel[m] joined #nim |
11:12:40 | * | planetis[m] joined #nim |
11:12:40 | * | macsek1911[m] joined #nim |
11:12:40 | * | Manny8888 joined #nim |
11:12:40 | * | xomachine[m] joined #nim |
11:12:40 | * | yglukhov[m] joined #nim |
11:12:40 | * | Mike[m]2 joined #nim |
11:12:40 | * | TheManiac[m] joined #nim |
11:12:40 | * | Balu[m] joined #nim |
11:13:22 | FromGitter | <vinodvinu> nimsuggest is not in the "instaled" programs list |
11:13:24 | sealmove | so anyone has an idea how I can do this? |
11:13:51 | aeverr[m] | vinodvinu how did you install nim |
11:14:05 | aeverr[m] | choosenim, apt, what? |
11:14:50 | voidlinux-free | vinodvinu: https://github.com/nim-lang/nimsuggest/issues/85 |
11:14:51 | disbot | ➥ nimsuggests consumes too much memory @11xmonader |
11:14:57 | sealmove | 100 files -> macro -> test-code in AST form -> (now need a way to execute this AST without necessarily having to run the macro) |
11:15:05 | FromGitter | <vinodvinu> @aeverr, Just downloaded Nim from the web and extracted & run the finish.exe |
11:15:14 | voidlinux-free | add your issue there, if possible describe e it briefly |
11:15:57 | voidlinux-free | vinodvinu: link to the website? |
11:16:18 | FromGitter | <vinodvinu> @voidlinux, Nim home |
11:16:34 | Araq | yewpad: I want to move the CSS out of nimdoc.cfg first before merging |
11:16:47 | voidlinux-free | can you please give a diret link? |
11:16:53 | FromGitter | <vinodvinu> Sure |
11:16:59 | voidlinux-free | i dont see nimsuggest link inn downloads |
11:17:07 | FromDiscord | <yewpad> Araq: https://media.giphy.com/media/RuUcPEjyJzA52/giphy.gif |
11:17:27 | FromGitter | <vinodvinu> https://nim-lang.org/install.html |
11:17:56 | FromGitter | <vinodvinu> I downloaded nim fro this link |
11:18:16 | FromGitter | <vinodvinu> I think nimsuggest is icluded in that installation |
11:18:18 | sealmove | ok rephrasing: how can I *permanently* cache the AST I build in a macro? |
11:18:40 | voidlinux-free | yeah it was merged to base, readme says that |
11:18:56 | voidlinux-free | then you have to remove nim to remove nimsugeest (if it was included) |
11:19:00 | FromGitter | <vinodvinu> Anyway, now i am managed to suspend nimsuggest with "Process Hacker" and i can work with nim |
11:19:10 | voidlinux-free | just dont use it, |
11:19:19 | voidlinux-free | you dont have to use nimsuggest to work with nim |
11:19:49 | FromGitter | <vinodvinu> I am not using intentionally. It is starting with VS Code |
11:19:59 | Araq | sealmove, good question, you can store it via writeFile and load it back |
11:20:28 | voidlinux-free | vinodvinu ask vscode to not start it, there should be a config somewhere |
11:20:38 | FromGitter | <vinodvinu> I cant find a way to remove it. Still suspended |
11:20:44 | voidlinux-free | https://github.com/nim-lang/nimsuggest/issues/75 |
11:20:45 | disbot | ➥ Memory leak with `staticRead` @11GULPF |
11:21:05 | FromGitter | <vinodvinu> Let me check |
11:21:18 | voidlinux-free | ask on vscode channels on how to disable it, i dont know vscode |
11:21:37 | voidlinux-free | https://github.com/nim-lang/nimsuggest/issues/49 ; related |
11:21:38 | disbot | ➥ Excessive memory usage @11Krognol |
11:22:01 | FromGitter | <vinodvinu> I am also planning to quit vs code because of lag in intellisense |
11:22:52 | voidlinux-free | yeah it should allow you to just write nim code without starting nimsuggest |
11:22:54 | FromDiscord | <yewpad> Never had problems with vscode and nimsuggest lol |
11:22:55 | FromGitter | <vinodvinu> voidlinux - Thanks for links and quick replys. :) |
11:23:08 | voidlinux-free | np;) |
11:23:47 | voidlinux-free | Araq: will cgi stay in base modules? |
11:24:48 | Araq | unknown |
11:25:06 | * | tklohna quit (Ping timeout: 252 seconds) |
11:25:24 | * | Vladar quit (Quit: Leaving) |
11:25:27 | sealmove | store ast in a file? hmm, how do I do this? |
11:25:39 | voidlinux-free | oh, thats my only use. python is removing their module with 3.10 |
11:25:58 | Araq | lispRepr it and parse it back, sealmove ? |
11:26:01 | voidlinux-free | are there plans to remove it? |
11:26:13 | sealmove | Araq: aha! got it, thx |
11:26:23 | Araq | voidlinux-free, not really, we said v1 froze the stdlib for better or worse |
11:27:05 | * | tklohna joined #nim |
11:27:22 | Araq | cgi.nim doesn't say "unstable API", so we're committed to keep it |
11:29:14 | * | voidlinux-free quit (Remote host closed the connection) |
11:30:36 | FromDiscord | <yewpad> Always thinking of "Computer Generated Imagery".. I wish there was a better name for it |
11:31:19 | * | voidlinux-free joined #nim |
11:31:52 | voidlinux-free | Araq: that would be awesome, so frozen means: will it be maintained? or just frozen as is |
11:33:06 | Araq | I think in this case "maintained" means "it's done" |
11:33:20 | Araq | no changes planned, it does what it does |
11:33:30 | Araq | but we won't remove it either |
11:33:38 | FromDiscord | <yewpad> 🤔 |
11:34:23 | voidlinux-free | thanks that "test" "test; expires=..." worked |
11:35:07 | sealmove | do we have a standard lisp ast parser (reverse of lispRepr)? |
11:35:34 | sealmove | i know it's probably very simple to parse, but still, maybe we should have one? |
11:41:11 | * | ehmery is now known as ehmry |
11:42:47 | * | nc-x joined #nim |
11:43:40 | voidlinux-free | whats the difference b/w stdout.write "" and echo "" ? which should be used if writing .cgi ? |
11:43:56 | nc-x | Araq: how would defining paramStr and paramCount in os.nim for nimscript work? nimscript cannot access the ffi, or otherwise it would already be working. |
11:45:18 | * | Hideki_ joined #nim |
11:46:29 | * | thomasross quit (Ping timeout: 268 seconds) |
11:47:35 | FromDiscord | <mratsim> stdout.write is a thin wrapper around the OS syscall, also it doesn't auto add new lines |
11:48:10 | voidlinux-free | yeah there is also writeLine that adds new line, so its okay to use both? |
11:50:19 | * | thomasross joined #nim |
11:50:28 | * | nc-x quit (Remote host closed the connection) |
11:52:21 | * | tklohna quit (Ping timeout: 246 seconds) |
11:54:45 | sealmove | hmm, maybe I can directly load and run the code produced by `dumpAstGen()`? |
11:58:16 | sealmove | or astGenRepr() I anyways |
11:58:22 | * | clyybber joined #nim |
12:00:53 | Araq | sealmove, we don't have it |
12:01:04 | * | krux02 joined #nim |
12:01:16 | Araq | voidlinux-free, stdout.write is better style IMO |
12:01:40 | Araq | nc-x[m], not hard to do |
12:02:00 | sealmove | but after parsing lisp ast you want to write code that produces it right? doest astGenRepr already do this? :D |
12:02:27 | Araq | how do you think nimscript.paramStr works? it's known by the VM as a registered callback |
12:06:37 | * | tklohna joined #nim |
12:11:47 | * | voidlinux-free quit (Ping timeout: 260 seconds) |
12:12:58 | clyybber | Araq: Sup, do you have an idea why the .sym of a node would be nil? |
12:13:40 | Araq | which node, what's the context? |
12:15:44 | clyybber | Currently trying to figure that out. The context is that it ends up as an def in the dfa |
12:16:17 | clyybber | And I can't access its id |
12:16:23 | Araq | better use the node in the DFA not the sym field |
12:17:03 | clyybber | Alright. Why does the sym field exist in the dfa then? Is it redundant? |
12:17:29 | Araq | of def, use: sym*: PSym # 'sym' can also be 'nil' and |
12:17:29 | Araq | # then 'n' contains the def/use location. |
12:17:29 | Araq | # This is used so that we can track object |
12:17:29 | Araq | # and tuple field accesses precisely. |
12:18:12 | clyybber | Ah, thanks. Missed that |
12:18:50 | * | tklohna quit (Ping timeout: 276 seconds) |
12:19:14 | Araq | if sym == nil it's definitely not a local and not of your interest |
12:19:24 | Araq | there is some redudancy here but it's valuable info |
12:21:46 | * | nc-x joined #nim |
12:22:27 | nc-x | Araq: done https://github.com/nim-lang/Nim/pull/12860 (I previously thought that you want to remove the callback and implement it properly) |
12:22:28 | disbot | ➥ Undefine `paramCount` & `paramStr` in os.nim for *.nims @11nc-x |
12:23:32 | * | nc-x quit (Remote host closed the connection) |
12:33:44 | FromGitter | <phillvancejr> Hello all, just wanted to say hi. I've just started using Nim and I really like it. Regards to all |
12:39:51 | Araq | hi, welcome |
12:41:37 | * | Vladar joined #nim |
12:43:07 | sealmove | the good thing with Nim is that once you try it it's almost impossible to not stick around |
12:43:18 | sealmove | the bad thing with Nim is that not enough people try it |
12:49:23 | * | Hideki_ quit (Ping timeout: 276 seconds) |
12:49:59 | lqdev[m] | sealmove: so true |
12:53:15 | * | Romanson joined #nim |
13:01:43 | clyybber | nc-x[m]: Does that mean that one cant use paramCount or paramStr in nimscript anymore? |
13:03:45 | Araq | clyybber, no it means you need to import os to get it |
13:03:58 | clyybber | nice |
13:04:01 | Araq | no difference between nimscript and ordinary nim, always a good thing |
13:04:07 | clyybber | yeah |
13:08:26 | FromDiscord | <mratsim> Famous last words |
13:09:40 | * | tklohna joined #nim |
13:12:27 | PMunch | Hmm, how do I run all the tests and see the results? |
13:14:17 | FromGitter | <phillvancejr> speaking of the paramstr in nimscript, whenever I try to use it I get an OSError saying that it is not defined for nintendoswitch, how can I get around this? |
13:14:40 | FromGitter | <phillvancejr> I'm working on and compiling for MacOS |
13:17:56 | FromGitter | <phillvancejr> PMunch thanks for the wxWidgets bindings. I'm using them successfully on MacOS |
13:21:28 | * | solitudesf joined #nim |
13:27:16 | PMunch | phillvancejr, good to hear that they still work fine. Been a while since I've tested more than the examples :) |
13:27:42 | PMunch | But I wasn't the one who made the bindings, I just started maintaining them after I wrote the genui macro :) |
13:37:21 | sealmove | never tried dynamic linking in nim, how does it work? |
13:37:34 | PMunch | Pretty well, if you know what you're doing |
13:37:53 | PMunch | (And good luck figuring that out, not a whole bunch of documentation on the topic) |
13:38:24 | sealmove | yeah, we should make one |
13:39:02 | PMunch | Documentation for dynamic libraries? |
13:39:13 | PMunch | Yeah, it's on my ever growing list of things to write about :P |
13:39:14 | * | vycb[m] joined #nim |
13:40:01 | sealmove | hehe, just added it to mine ;P |
13:40:36 | sealmove | I realized people will want to produce parsers with nimitai and link them dynamically |
13:40:59 | FromDiscord | <mratsim> do you need to NimMain() the dll your linking to if you are already using Nim? |
13:41:02 | sealmove | because if your project is big you don't want to re-generate 10 parsers every time |
13:41:17 | sealmove | using Nim only |
13:42:05 | sealmove | just want compile modules |
13:42:21 | sealmove | import dll instead of .nim |
13:43:11 | sealmove | compiled* |
13:43:43 | * | banc joined #nim |
13:44:35 | PMunch | mratsim, think so yeah |
13:44:40 | PMunch | But not 100% sure |
13:47:32 | sealmove | but dynamic linking doesn't seem hot for Nim, isn't that so? |
13:47:41 | sealmove | I don't see many people doing it |
13:49:53 | PMunch | I just moved a Python script over to a Nim DLL for work :) |
13:51:24 | * | abm joined #nim |
13:53:49 | * | endragor quit (Remote host closed the connection) |
13:55:45 | Araq | this is the weirdest bug ever |
13:56:38 | Araq | clyybber, https://play.nim-lang.org/#ix=23XT |
13:56:57 | Araq | node how the declaration order inside 'type' influences the destructor generation |
13:57:14 | Araq | now that wouldn't be too hard to explain in itself |
13:57:35 | Araq | except when I look at the produced C code it looks entirely correct in both cases |
13:59:34 | Araq | never mind, found it |
13:59:39 | Araq | it is wrong |
14:01:01 | * | banc quit (Quit: Bye) |
14:01:05 | shashlick | How do you sign your exe files on windows |
14:01:24 | PMunch | There is a signtool |
14:01:27 | shashlick | So that the virus scanner stops irritating |
14:01:53 | livcd | Dont you need like an official cert ? |
14:01:54 | shashlick | My IT has made local dev a nuisance |
14:03:28 | PMunch | Crap.. This nimbase.h type stuff is surprisingly hard to get right with C++.. |
14:03:47 | PMunch | Stupid namespaces.. |
14:05:01 | shashlick | Trying to update tree sitter in nimterop |
14:05:11 | shashlick | Gosh doing anything is a pain |
14:05:23 | shashlick | Wonder why I code sometimes |
14:05:45 | Araq | same here, everything is so hard |
14:06:33 | shashlick | Especially since I'm trying to work on my Linux machine remotely across the planet |
14:15:23 | * | rockcavera joined #nim |
14:16:59 | PMunch | shashlick, `C:\"Program Files (x86)"\"Windows Kits"\10\bin\10.0.17763.0\x64\signtool.exe sign /f cert.pfx /p password123 /t http://timestamp.globalsign.com/scripts/timestamp.dll /v file_to_sign.exe |
14:17:01 | PMunch | ` |
14:17:47 | * | tklohna quit (Ping timeout: 276 seconds) |
14:23:29 | Araq | rubber duck bugfixing, it works so well |
14:23:41 | Araq | 20 minutes later and I have a bugfix |
14:25:57 | FromDiscord | <mratsim> Everything is easy compared to debugging a multithreaded memory manager, you get the best of two wolrds: memory bugs and threading bugs 😉 |
14:27:49 | shashlick | Thanks @PMunch, will try it out some day |
14:29:14 | Araq | mratsim: what's wrong with my wrapper for mimalloc? |
14:40:18 | clyybber | Araq: Is that the fix: https://github.com/nim-lang/Nim/pull/12823/commits/6d87e9c421598a3ac89b465e079d46a0345c6819 ? |
14:40:19 | disbot | ➥ ARC: cycle detector 👑11Araq |
14:45:28 | Araq | yes |
14:47:00 | * | junland quit (Quit: %ZNC Disconnected%) |
14:47:33 | * | tane joined #nim |
14:48:16 | * | junland joined #nim |
14:50:39 | clyybber | Araq: It just occured to me that eliding initalization seems impossible. |
14:51:10 | clyybber | Because then =sink and = would check uninitialized memory and do things that shant be done |
14:51:40 | clyybber | Well, it would be possible with the section approach you mentioned |
14:52:04 | PMunch | Why is fixed sized integers so hard in C/C++ |
14:52:14 | PMunch | Such a simple thing, which is so hard to do.. |
14:54:47 | tane | PMunch, they're available? |
14:55:20 | * | endragor joined #nim |
14:55:48 | PMunch | tane, what do you mean? |
14:56:03 | PMunch | Include stdint.h and use uintX_t and you have them |
14:56:03 | tane | fixed size types are available and work fine |
14:56:10 | tane | sure |
14:56:14 | tane | so I don't see what's hard |
14:56:14 | PMunch | Yeah, unless Nim is creating a namespace |
14:56:22 | PMunch | Or your compiler doesn't have stdint.h |
14:56:29 | PMunch | Or any of a number of other weird edge cases |
14:56:44 | tane | is stdint optional in any current standard? |
14:56:46 | sealmove | can I interact with filesystem at compile time? |
14:56:53 | sealmove | walkFiles doesn't seem to work |
14:57:11 | PMunch | And the compiler always knows the sizes it will apply to the different short/int/long keywords, but why would it tell you it's secrets! |
14:57:22 | PMunch | tane, well it is optional in C++11 |
14:57:51 | tane | hm, then you probably need to call the compiler once up front and query the info, just to be safe :) |
14:58:31 | PMunch | And in C++98 it is placed in the regular C stdint.h, while in C++11 you should use cstdint. But of course the AVR (arduino) compiler doesn't include cstdint even when using C++11. |
14:58:44 | FromDiscord | <snluu> Hello! Random newbie question. What’s the idiomatic way to pass a sequence by reference and have it immutable (as in, I don’t want to copy the sequence to the caller)? I know we can use `proc doX(s: var seq[...])`, but that gives the function the ability to modify the sequence. |
14:58:59 | tane | lol ok, sounds like a lot of work, I understand the hardness now :) |
14:59:20 | * | ng0_ joined #nim |
14:59:23 | * | ng0 quit (Disconnected by services) |
14:59:26 | * | ng0_ is now known as ng0 |
14:59:32 | PMunch | Yeah Nim should just ship a "printf("%ld", sizeof(short/int/long))" file that got compiled and run on compile-time to get these secret sizes and build the proper integer sizes.. |
14:59:32 | sealmove | `Error: cannot 'importc' variable at compile time; glob` |
14:59:53 | tane | yeah |
14:59:54 | clyybber | Araq: How do you imagne the section approach to be implemented? magic templates/macros? |
15:00:16 | sealmove | snluu: just pass by value, the compilers always knows how to optimize it |
15:00:21 | PMunch | snluu, just pass it normally. Nim will see that it is not something that should be copied and use a pointer behind the scenes |
15:00:50 | Araq | clyybber, it's simpler than you think |
15:01:10 | Araq | an init + =sink pair must be turned into a plain copyMem (= nkAsgn) |
15:01:36 | sealmove | do we have walkFiles() or similar for CT? |
15:01:36 | Araq | no sections required, we will say in the spec that copyMem are the semantics |
15:01:39 | * | endragor quit (Remote host closed the connection) |
15:02:21 | clyybber | Araq: Ah right. Ok. |
15:02:38 | clyybber | Araq: What about = tho |
15:02:49 | FromDiscord | <snluu> Ah thanks! I come from a C++ world so kind of itching to be implicitly “const ref”. I assume the compiler will detect that the proc does not modify the sequence and thus passes by pointer? |
15:02:49 | FromDiscord | <snluu> |
15:02:49 | FromDiscord | <snluu> How does it deal with multithreading then? Does at least one copy always happen if the sequence is sent to a different thread? |
15:02:54 | sealmove | also something else: why can't macros module be used in runtime? (if you just want to play around with nodes and not run ast code; for example print the string repr) |
15:03:22 | clyybber | sealmove: Thats a compiler :) embed it |
15:04:10 | sealmove | but it could be possible right? it's not because we are reusing parts of the compiler |
15:04:42 | clyybber | sealmove: It *is* possible. If you embed the compiler. |
15:05:09 | * | endragor joined #nim |
15:05:18 | PMunch | snluu, you can't share things between threads without either explicitly copying them, or by sharing a pointer. |
15:05:52 | sealmove | oh hmm, but I suspect there should be a simpler solution for my case... I just want to walkFiles(), make AST out of them, and print Nim code on a file with toStrLit.strval |
15:05:54 | sealmove | any ideas? |
15:06:04 | PMunch | And yes, it will check that you aren't messing with the data that got passed in (however it is still possible to edit the data if you use ugly pointer casting hacks). |
15:06:20 | * | PMunch quit (Quit: Leaving) |
15:06:32 | sealmove | walkFiles() complains for importc and newStmtList() complains for "can't do at runtime", lol... |
15:08:26 | FromDiscord | <mratsim> @PMunch ugliness is in the eye of the beholder 😉 |
15:08:52 | FromDiscord | <snluu> Thanks PMunch! I’ll read more on multi-threading. Still has some unanswered questions, mostly around the unexplicit/undocumented behavior of how & when the compiler would copy |
15:09:24 | sealmove | is `import nimscript` legit to do? |
15:10:38 | * | NimBot joined #nim |
15:11:04 | FromDiscord | <mratsim> below it's passed by the default calling convention, i.e. registers or stack |
15:11:24 | clyybber | Araq: I think the section approach is a better idea because otherwise we can't optimize away the initialization of `b` in the following: let a = ...; let b = a; echo a; echo b` |
15:11:29 | FromDiscord | <mratsim> Seq are just pointer+len+reserved on the stack |
15:11:41 | FromDiscord | <mratsim> that's the only thing that is copied when you pass them around |
15:11:49 | * | endragor quit (Remote host closed the connection) |
15:11:50 | Araq | "that's not all", we also got move semantics, 'lent T', .acyclic, sink parameters |
15:12:14 | Araq | and maybe soon .new to give us unique ownership |
15:12:23 | FromDiscord | <mratsim> yes but he was talking about parameter passing, not assignment |
15:12:49 | Araq | the general philosphy is to turn imperative code into declarative code by telling the compiler more about your program |
15:13:21 | FromDiscord | <snluu> @mratsim I guess that makes, since parameters are by default immutable so the C code can easily pass by pointer/reference under the hood |
15:13:30 | FromDiscord | <mratsim> if you want to make sure that there is no copy, just have your proc accept openarrays instead of seq |
15:13:53 | Araq | and it's working out so far, I'm about to publish results where we get down to no overhead |
15:14:01 | FromDiscord | <mratsim> ref seq is costly because that means 2 pointers indirections |
15:14:38 | Araq | so we optimize the "GC" code down to malloc/free performance levels (latency, throughput and memory consumption) |
15:14:48 | Araq | ... famous last words ... *cough* |
15:14:49 | FromDiscord | <mratsim> otherwise use seqs packaged in a {.shallow.} object like I do there if you want reference semantics: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/data_structure.nim#L21-L30 |
15:15:15 | FromDiscord | <snluu> ::nod:: Thanks! That makes a lot of sense. Just takes a little mental gymnastic, coming from a different set of languages 🙂 |
15:15:27 | FromDiscord | <snluu> languages/semantics |
15:15:31 | FromDiscord | <mratsim> The hard part about the GC or malloc/free is the freeing memory from remote thread part :/ |
15:16:25 | FromDiscord | <mratsim> in my memory pool, I'm 3x to 5x faster than malloc/free for blocks allocated/released from the same thread, but I'm only as "slow" as malloc/free when those blocks are released from a thread that did not allocate them. |
15:16:43 | * | njoseph quit (Ping timeout: 250 seconds) |
15:17:16 | FromDiscord | <mratsim> Coming from C++, Nim low-level details should be relatively straightforward |
15:17:46 | FromDiscord | <mratsim> you just need someone to explain them and/or time to experiments because they are pretty much only known by people not laid out in some overarching document |
15:18:17 | FromDiscord | <snluu> Yeah, it makes sense now. Just need to think through how the compiler reasons about things, since the language itself is not as explicit (which is probably a good thing) |
15:19:03 | FromDiscord | <snluu> Thanks for your help! 😄 |
15:19:08 | sealmove | ok I give up, how do I embed the compiler and use macros module as normal at runtime? |
15:19:14 | FromDiscord | <mratsim> it depends on what you need, actually, I would say it's not explicit because it lets the dev roam free |
15:19:27 | FromGitter | <alehander92> you dont use the macros module sealmove |
15:19:35 | FromGitter | <alehander92> you use `parser` etc |
15:19:46 | sealmove | that's painful |
15:19:49 | FromDiscord | <mratsim> @sealmove, if you can make "import compiler/nimeval" working 😉 |
15:20:02 | FromGitter | <alehander92> sealmove why? |
15:20:06 | clyybber | sealmove: Thats expected. What you are trying to do is probably a really bad idea. |
15:20:10 | FromGitter | <alehander92> you just use the compiler module as a lib |
15:20:32 | FromDiscord | <mratsim> but if you embed the compiler you don't need macros |
15:21:00 | sealmove | I'd rather not import the compiler, but I don't see a solution since I can't use walkFiles() at CT |
15:21:11 | FromGitter | <alehander92> i remember that setting up the code for parseString was a bit annoying, but you can abstract it away in a function |
15:21:22 | FromGitter | <alehander92> but i think this was made easier |
15:21:50 | FromDiscord | <mratsim> search for compileTime FFI, it's a doubly hidden option by timotheecour, you need an experimental flag and a command-line flag |
15:21:54 | FromGitter | <alehander92> yeah |
15:22:10 | FromDiscord | <snluu> @mratsim definitely. it’s refreshing to write code like python and have the compiler do the right thing. granted, g++ -O3 probably does the same thing, but the C++ mindset is always to be explicit because you don’t know what other compilers would do |
15:22:11 | FromDiscord | <mratsim> this will allow you to importc at compile-time and you will be able to use IO at compile-time |
15:22:47 | sealmove | that's a relief |
15:22:52 | clyybber | sealmove: May I ask what your endgoal is? |
15:22:52 | sealmove | thx |
15:23:59 | shashlick | @sealmove what exactly are you trying to do |
15:24:18 | FromDiscord | <mratsim> @snluu I often have to drop down being explicit in Nim as well, but with Nim it's good that I have the large spectrum of being C-like when needed (i.e. low-level memory, multithreading or GPU work) or Python-like otherwise. |
15:24:50 | sealmove | clyybber: ok so... I have some files based on which I want to generate a unittest suite |
15:24:53 | FromDiscord | <mratsim> + the ability to create your own mini declarative languages via macros is great |
15:25:23 | FromDiscord | <snluu> Thanks! I’ll play with Nim some more. Have been going through the Advent of Code this year to learn Nim 🙂 |
15:25:29 | sealmove | the files look like this: https://play.nim-lang.org/#ix=23Yb |
15:25:45 | FromDiscord | <mratsim> Have fun, the problems seem quite headscratching :p |
15:25:46 | sealmove | obviously I don't want to print a .nim file using strings |
15:26:13 | sealmove | I want to make the Nim code at AST level and use toStrLit().strval to print it |
15:26:26 | clyybber | sealmove: Why not do that at compile time? |
15:26:40 | sealmove | because walkFiles() doesn't work :D |
15:26:50 | sealmove | it's over 100 files which might change anytime |
15:26:59 | FromDiscord | <snluu> @mratsim ^^ I’m only at day 3 so far. I have to say though, it’s so much more joyous compared to when I used Rust for the 2018 AoC. Rust trades developer happiness for safety, it feels like 😛 |
15:27:15 | shashlick | @sealmove - https://github.com/nimterop/nimterop/blob/master/nimterop/cimport.nim#L47 |
15:27:38 | FromGitter | <alehander92> why not staticExec? |
15:27:56 | shashlick | Poor man's walkDir, you can repurpose |
15:27:58 | * | endragor joined #nim |
15:28:19 | sealmove | alehander92: ohh to find the files? didn't think that, seems like a good option! |
15:29:05 | FromGitter | <alehander92> yeah, it seems the shashlick example invokes something similar |
15:29:22 | sealmove | but.. I'd need to parse the result manually and extract filenames, which is inheritely problematic |
15:29:50 | clyybber | why? |
15:29:52 | FromGitter | <alehander92> well, you just call a command which returns only filenames |
15:29:57 | FromGitter | <alehander92> look at shashlick's link |
15:30:14 | Araq | sealmove, we do have |
15:30:30 | Araq | proc listFiles*(dir: string): seq[string] |
15:30:33 | Araq | in nimscript.nim |
15:31:14 | sealmove | Araq: I saw it, naively tried `import nimscript`, didn't work, I gave up, lol |
15:31:37 | Araq | and also oswalkdir.nim |
15:34:11 | * | endragor quit (Remote host closed the connection) |
15:35:05 | sealmove | ok so I probably have to ship nimscript.nim with my project |
15:36:13 | * | zyklon quit (Ping timeout: 250 seconds) |
15:38:07 | sealmove | wow wtf, importing nimscript is not even necessary, this works: |
15:38:09 | sealmove | template builtin = discard |
15:38:11 | sealmove | proc listFiles*(dir: string): seq[string] = |
15:38:13 | sealmove | builtin |
15:38:29 | * | zyklon joined #nim |
15:38:49 | sealmove | sorry I am very confused, I will shut up |
15:43:02 | * | njoseph joined #nim |
15:45:18 | Araq | any git bisect masters around? |
15:52:20 | * | clyybber quit (Quit: WeeChat 2.6) |
15:55:59 | FromDiscord | <mratsim> why do you need a master? you just need to do git bisect start, bit bisect good, git bisect bad and git bisect reset |
15:56:16 | * | endragor joined #nim |
15:56:18 | FromDiscord | <mratsim> the only difficult thing is if you need to rebuild your koch with older csources |
15:56:31 | disruptek | sshhh, we masters need job security. |
15:58:45 | Araq | well I dunno if I ever had a "good commit" |
15:58:56 | Yardanico | lol |
15:58:58 | Araq | so I don't know a commit range |
15:59:00 | stefantalpalaru | Sometimes it's more intuitive to use "old" and "new" instead of "good" and "bad". (Had to use git bisect to locate the commit that accidentally fixed a Nim compiler bug, so it got confusing.) |
16:00:10 | stefantalpalaru | You also need to know about "git bisect skip", when a certain commit can't be tested. |
16:00:36 | * | endragor quit (Ping timeout: 240 seconds) |
16:01:43 | * | Romanson quit (Quit: Connection closed for inactivity) |
16:01:56 | FromDiscord | <mratsim> yeah I agreee, when you want to locate fixes, bad/good gets super confusing |
16:02:24 | FromDiscord | <mratsim> skip was very useful during the "not nil" time when changes where breaking left and right |
16:06:52 | sealmove | oswalkdir is the perfect solution after all |
16:10:08 | * | nsf quit (Quit: WeeChat 2.6) |
16:11:07 | Araq | I realized I'm happier without git bisect and found the problem on my own |
16:11:16 | * | clyybber joined #nim |
16:11:39 | Yardanico | I'm trying my hands on fixing #12820 (PR by cooldome didn't work for me), and it turns out the code in sempass2.nim at line 762 gets "proc (s: var seq[empty], newlen: Natural){.noSideEffect.}" as one of the values in `n`. Does that mean that the type was incorrectly chosen before sempass2 or somewhere in it? |
16:11:41 | disbot | https://github.com/nim-lang/Nim/issues/12820 -- 3@[] is a problem for --gc:destructors @11cooldome; snippet at 12https://play.nim-lang.org/#ix=23Yu |
16:16:19 | * | azed joined #nim |
16:17:18 | Araq | Yardanico, yeah, I think so |
16:19:06 | Araq | clyybber, ping |
16:22:21 | Araq | clyybber, https://play.nim-lang.org/#ix=23Yx you forgot to destroy nkObjConstr and friends when not passed to a sink location |
16:24:09 | disruptek | oh shoot! |
16:26:31 | clyybber | Araq: pong, huh, no idea how I missed that :) |
16:26:58 | Araq | I had an unsubmitted test case that is now failing |
16:27:14 | Araq | if only I had submitted it |
16:27:53 | * | Araq sighs |
16:28:07 | Araq | still such a piece of junk |
16:28:19 | Araq | after all these months |
16:33:02 | clyybber | should be easy to fix |
16:33:52 | Araq | the fix breaks the 'echo' impl in the backend |
16:34:43 | disruptek | Araq: your piece of junk looks great. it's what's on the outside that counts. |
16:38:51 | clyybber | Araq: Ah, I hit that error too while working on it |
16:38:52 | * | floppydh quit (Quit: WeeChat 2.6) |
16:39:33 | clyybber | ccgexprs:1032 is that right? |
16:42:01 | Araq | yes |
16:45:55 | lqdev[m] | Araq: what's the difference between `type(x)` and `typeof(x)`? they behave quite differently when used in macros. https://play.nim-lang.org/#ix=23YC |
16:46:37 | Araq | use typeof |
16:48:22 | disruptek | one is unfortunately named and the other isn't. |
16:50:10 | lqdev[m] | yeah, took me a while to figure out that `typeof(x)` should be generated as an nnkCall to `typeof` instead of an nnkTypeOfExpr |
16:50:16 | lqdev[m] | until I looked at the .repr output. |
16:50:35 | Araq | lqdev[m], I think that's an error in renderer.nim |
16:50:48 | Araq | I also think I fixed it... |
16:51:20 | disruptek | i found a compiler segfault involving once: and defer: in a template, but i can't create a minimal example. |
16:52:21 | * | dddddd quit (Ping timeout: 268 seconds) |
16:54:59 | lqdev[m] | Araq: yeah, but I'm referring to the fact that `typeof(x)` is reported as a nnkTypeOfExpr by .treeRepr which is confusing |
16:56:37 | disruptek | what do you think it should be? |
17:03:34 | * | dddddd joined #nim |
17:04:38 | nisstyre | is there an up to date version of this? https://github.com/VPashkov/awesome-nim |
17:04:42 | nisstyre | looks like the owner archived it |
17:04:47 | nisstyre | oh derp, I can't read |
17:04:53 | FromDiscord | <michalm> Hi. I have a really strange error message from my nim compiler. https://pastebin.com/6qGr5csf Do you know what is wrong with my code? |
17:08:06 | Yardanico | @michalm your Params type is not really correct since Param is a generic type |
17:08:47 | Yardanico | (I think) |
17:09:35 | Yardanico | If you want to be able to store different types in Param, you might want to use an object variant |
17:09:35 | Yardanico | https://nim-lang.org/docs/manual.html#types-object-variants |
17:10:19 | * | Trustable joined #nim |
17:10:26 | Yardanico | but the compiler doesn't give a good error message, I agree :) |
17:10:38 | FromGitter | <alehander92> well this shouldn't be a problem in general |
17:10:45 | FromGitter | <alehander92> like you should be able to have generic fields etc |
17:11:00 | FromGitter | <alehander92> i guess that something with this particular scenario |
17:11:10 | FromDiscord | <michalm> Hmm this is the first time where Nim solution is not the most elegant one IMHO. But community once again have save my day. Thx 🙂 |
17:11:16 | FromGitter | <alehander92> is wrong, but you havent provided actual calls of generateTemplate |
17:11:37 | FromGitter | <alehander92> michalm: maybe if you write down your `[T]` in types explicitly it might be easier |
17:12:00 | FromDiscord | <michalm> what do you mean ? |
17:12:35 | FromGitter | <alehander92> type Params*[T] = Table[string, Param[T]] |
17:12:35 | FromGitter | <alehander92> etc |
17:12:56 | Yardanico | well yeah, but that way Params can only contain Param of one type, I think that's not what michalm wants |
17:13:08 | FromGitter | <alehander92> i prefer this style, but i know some people prefer omitting it indeed |
17:13:10 | Yardanico | @michalm you want to store different types as values in a Params table ? |
17:13:23 | Yardanico | like key1 is int, key2 is bool? |
17:13:39 | FromGitter | <alehander92> hm, i thought he wants just a generic table and decided to use implicitness (typeclass?) |
17:18:52 | * | njoseph quit (Ping timeout: 268 seconds) |
17:25:01 | Araq | I think he wants JsonNode |
17:25:10 | Yardanico | sealmove: rip MIT in nimitai :D |
17:25:18 | Araq | I always think that people re-invent Json, poorly |
17:26:56 | Yardanico | sealmove: but doesn't GPL v3 in nimitai mean that if you use nimitai in your app it should be open source? |
17:31:35 | * | njoseph joined #nim |
17:33:03 | Araq | what's nimitai? |
17:33:15 | Yardanico | https://github.com/sealmove/nimitai |
17:33:34 | Yardanico | a nim lib for parsing files from https://kaitai.io/ ksy grammar |
17:34:00 | sealmove | Yardanico: I had to, because I added some files from Kaitai Struct, which is GPLv3 |
17:34:15 | Yardanico | sealmove: well, that's a bummer since most of nim libs/apps are MIT :( |
17:34:56 | sealmove | sorry :| I wonder if I can license files within the project differently, then I can make it MIT again |
17:35:13 | clyybber | Araq: How do you think the section approach can be implemented the best? (I don't know if you received my message before, but we need the section approach to elide inits in the presence of `=`) |
17:36:16 | Araq | sealmove: oh, please put the files from Katai Struct in a different repo under a different license then |
17:36:33 | Araq | clyybber: I didn't understand your remark |
17:38:57 | FromDiscord | <mratsim> @Araq, we need to remove the CFI directives, etc in the produce ASM, this is a mess: |
17:38:59 | FromDiscord | <mratsim> |
17:38:59 | FromDiscord | <mratsim> https://cdn.discordapp.com/attachments/371759389889003532/653651824364093470/DeepinScreenshot_select-area_20191209183747.png |
17:39:20 | clyybber | Araq: The problem is that `=`(a: var T, b: T) checks a and destroys it when necessary. When we elide of a however, it will check and destroy random memory. Thus we need to remove the "check and destroy" part of `=` when eliding the initialization of `a` |
17:41:59 | FromGitter | <alehander92> mratsim but debugging? |
17:42:05 | FromGitter | <alehander92> or you mean only in the asm output |
17:47:45 | FromGitter | <Varriount> Araq: I vaguely recall asking why refcounting wasn't enough, and why possible cycles couldn't be detected at compile-time (or the opposite, situations where cycles could never occur) |
17:48:15 | FromGitter | <Varriount> I don't know if I ever suggest just using ARC and a mark/sweep collector |
17:48:34 | disruptek | great, someone else to blame. |
17:49:45 | Araq | mratsim: yeah, PR please, no idea what's all that junk in there |
17:50:06 | Araq | clyybber: well but '=' is not common |
17:50:20 | Araq | most assignments are turned into =sink |
17:50:30 | sealmove | ok ready: https://github.com/sealmove/nimitai |
17:51:09 | FromDiscord | <mratsim> @alehander92 I only want the ASM, all those locs are used by the linker to create the exception unwinding table |
17:51:21 | FromDiscord | <mratsim> and also for debugging symbols |
17:51:58 | FromDiscord | <mratsim> that means we can't have both debugging and ASM output in the same command but if people are ready to use GDB they probably don't mind doing one compilation for ASM and one usable for GDB |
17:52:12 | clyybber | Araq: Still seems like a worthwile optimization IMO. Also it makes the spec more elegant IMO. |
17:52:26 | clyybber | IMO IMO IMO :p |
17:52:40 | FromDiscord | <mratsim> should be IMHO |
17:53:28 | Yardanico | yeah, we should be honest IMHO |
17:53:44 | Yardanico | or humble 🤔 |
17:55:15 | clyybber | Araq: It also makes the analysis a bit more complicated since we have to check if it gets sinked or = then. |
17:55:43 | clyybber | And only one path wich `=` is enough to make the elision impossible |
17:55:50 | clyybber | Even if all other paths `=sink` |
18:16:53 | Araq | clyybber: related is also the common and important "emplace_back" optimization |
18:21:07 | * | nsf joined #nim |
18:26:11 | Araq | Varriount: one thing I learned in the last months is that the heap topology with closures and closure iters is untractable, it makes my head hurt |
18:26:38 | Araq | so if you use these features there is little hope but to also add a cycle detector. which I did last weekend |
18:32:14 | clyybber | Araq: Is |
18:32:26 | clyybber | "emplace back" constructing in-place? |
18:32:47 | Araq | constructing in-place at the end of the seq |
18:33:03 | Araq | so you don't have to zeroMem the seq's storage |
18:33:47 | Araq | beating C++ is not as easy as people think, it's actually a beautiful design behind a layer of C based bullshit |
18:35:36 | clyybber | hmm |
18:36:17 | clyybber | Araq: Btw a `try: ... except: ...` is not slower than a `try: ... finally: ...` right? |
18:40:16 | * | azed quit (Read error: Connection reset by peer) |
18:44:40 | * | tane quit (Quit: Leaving) |
18:47:26 | Araq | correct |
18:50:29 | clyybber | Cool |
18:51:03 | * | azed joined #nim |
18:51:13 | * | Trustable quit (Remote host closed the connection) |
18:56:22 | * | rockcavera is now known as Guest45301 |
18:56:22 | * | tiorock joined #nim |
18:56:22 | * | Guest45301 quit (Killed (karatkievich.freenode.net (Nickname regained by services))) |
18:56:22 | * | tiorock is now known as rockcavera |
18:59:34 | Araq | ok, now to answer your question |
18:59:48 | Araq | if we want sections, here is how to do it |
18:59:59 | Araq | template section(body) = |
19:00:21 | Araq | {.newPragmaName.}: body |
19:00:39 | Araq | this way we don't have to add new keywords |
19:00:50 | clyybber | Nice, good idea thanks! |
19:17:28 | FromGitter | <mratsim> When you push a pragma and then import, does the push pragma apply to the imported module/proc/globals? Can we control that? |
19:19:41 | disruptek | #12862 harks back to the point i was trying to make 6 months ago. |
19:19:43 | disbot | https://github.com/nim-lang/Nim/issues/12862 -- 3The Defect exceptions are not consistently tracked @11zah; snippet at 12https://play.nim-lang.org/#ix=23Zp |
19:20:19 | Araq | disruptek: in this case there was no consensus on what to do |
19:20:38 | Araq | Defects shouldn't be tracked IMO. |
19:21:11 | disruptek | agree. but a decision, however damaging, is more important at this point. |
19:28:35 | Araq | PRs are welcome |
19:28:45 | Araq | I can guide you if you want to help out |
19:29:21 | disruptek | pretty focused on nimph, but my vote is for quirky. maybe it could be the only supported option for arc? |
19:30:14 | Araq | quirky is independent of how we do the exception tracking |
19:30:35 | disruptek | no one else needs to know that. |
19:32:43 | * | MarquisdeFalbala joined #nim |
19:37:39 | * | tiorock joined #nim |
19:37:39 | * | tiorock quit (Changing host) |
19:37:39 | * | tiorock joined #nim |
19:37:39 | * | rockcavera is now known as Guest3855 |
19:37:39 | * | Guest3855 quit (Killed (cherryh.freenode.net (Nickname regained by services))) |
19:37:39 | * | tiorock is now known as rockcavera |
19:39:13 | * | tiorock joined #nim |
19:39:13 | * | tiorock quit (Changing host) |
19:39:13 | * | tiorock joined #nim |
19:39:13 | * | rockcavera quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
19:39:13 | * | tiorock is now known as rockcavera |
19:39:55 | * | azed quit (Read error: Connection reset by peer) |
19:40:12 | disruptek | Error: unhandled exception: int128.nim(383, 11) `false` overflow [AssertionError] |
19:41:18 | * | tiorock joined #nim |
19:41:18 | * | rockcavera quit (Killed (adams.freenode.net (Nickname regained by services))) |
19:41:18 | * | tiorock is now known as rockcavera |
19:41:18 | * | rockcavera quit (Changing host) |
19:41:18 | * | rockcavera joined #nim |
19:45:33 | * | azed joined #nim |
19:55:12 | * | azed quit (Quit: WeeChat 2.6) |
19:55:52 | FromDiscord | <mratsim> don't multiply a negative number by 0 in the VM |
19:56:07 | disruptek | bingo, thank you! |
19:56:24 | disruptek | ffi symbol must be 0. |
19:56:47 | disruptek | yep, that was it. |
19:58:20 | FromDiscord | <mratsim> you can use a constant proc as a workaround, the C compiler should constant fold it |
19:58:26 | * | PMunch joined #nim |
19:59:35 | FromDiscord | <mratsim> otherwise, use latest devel: https://github.com/nim-lang/Nim/issues/12783 |
19:59:37 | disbot | ➥ semfold bug with negative value * 0 ⚫11mratsim; snippet at https://play.nim-lang.org/#ix=23ZP |
19:59:59 | disruptek | my solution was to simply not * by -n. |
20:14:39 | PMunch | Hmm |
20:15:04 | PMunch | My 2FA code for the GitHub authenticator app is gone.. |
20:15:14 | PMunch | And none of the recovery codes seem to work.. |
20:16:41 | * | kevinsjoberg left #nim ("Textual IRC Client: www.textualapp.com") |
20:17:15 | * | banc joined #nim |
20:20:15 | FromDiscord | <mratsim> github has an authenticator app? |
20:20:19 | FromDiscord | <mratsim> I use andOTP |
20:21:05 | sealmove | how do I create a typedesc node literal? |
20:21:37 | FromDiscord | <mratsim> typedesc can only exist as function parameter |
20:21:48 | PMunch | mratsim, well I use Google Authenticator |
20:21:49 | FromDiscord | <mratsim> so newIdentDef(ident"T", ident"typedesc") |
20:22:02 | PMunch | But I recently switched phones and need to transfer the key |
20:22:04 | PMunch | Oh wait |
20:22:07 | PMunch | I'm an idiot.. |
20:22:09 | FromDiscord | <mratsim> ah that's the issue, Google Authenticator is notoriously bad at backups |
20:22:23 | PMunch | I can just grab my old phone.. |
20:24:28 | sealmove | thx mratsim |
20:26:21 | sealmove | hmm but... |
20:28:32 | * | banc quit (Quit: Bye) |
20:29:29 | PMunch | Hmm my PR https://github.com/nim-lang/Nim/pull/12817 seems to have failed because of the CI |
20:29:30 | disbot | ➥ Fix AVR target to define ints properly @11PMunch |
20:35:01 | * | nsf quit (Quit: WeeChat 2.6) |
20:37:43 | PMunch | Could someone re-run them? |
20:51:14 | * | narimiran quit (Ping timeout: 252 seconds) |
20:54:11 | * | sagax joined #nim |
20:57:21 | FromDiscord | <kodkuce> what |
21:00:25 | * | Vladar quit (Quit: Leaving) |
21:01:04 | PMunch | kodkuce, what what? |
21:01:31 | sealmove | i don't really understand the private directory convension of nimble |
21:01:58 | clyybber | its where you put files you don't want people to import |
21:01:58 | sealmove | how is "private" special? |
21:02:02 | clyybber | its not |
21:02:12 | sealmove | so i can name it "priv" and nothing changes? |
21:02:16 | clyybber | yeah |
21:02:23 | clyybber | I named it 'imnothere' |
21:02:33 | PMunch | I think nimble will complain though |
21:02:37 | clyybber | its just a convention as you said yourself |
21:02:39 | PMunch | That you are not following the convention |
21:03:50 | sealmove | it's confusing because... when reading documentation i thought that |
21:04:10 | sealmove | if you do `import myproject` then `myproject/mymodule` is also imported |
21:04:26 | sealmove | but you still have to do `import myproject/mymodule` |
21:04:58 | disruptek | it's a death trap; |
21:05:03 | disruptek | it's a suicide rap. |
21:05:43 | sealmove | all I am saying is I can't see how someone will mistakenly import something that he shouldn't, and why we need "private" convension. |
21:06:12 | sealmove | which makes me think this is not its intention |
21:06:39 | sealmove | i guess it is for developers to have a clearer image of what symbols they expose |
21:06:51 | clyybber | sealmove: No |
21:06:53 | FromDiscord | <kodkuce> rerun what |
21:06:53 | disruptek | it's silly. |
21:07:02 | clyybber | When you have a project myproject/mymodule |
21:07:10 | clyybber | you should be able to do `import mymodule` |
21:07:38 | disruptek | if you have it in the path, sure. |
21:07:48 | clyybber | thats the purpose of nimblePaths |
21:07:59 | disruptek | nah, that's the purpose of --path. |
21:08:07 | clyybber | should be |
21:08:09 | clyybber | :) |
21:08:10 | disruptek | --nimblePath is a globbing construct. |
21:08:29 | clyybber | if I install a nimble pkg |
21:08:31 | disruptek | what's annoying is that if --nimblePath finds a directory it cannot process, it crashes the nim.cfg parser. |
21:08:34 | disruptek | to me, that's a bug. |
21:08:40 | clyybber | oof |
21:08:44 | clyybber | that sounds bad |
21:09:08 | disruptek | i'm talking a directory named "foo" will crash it. nothing in it, just an empty directory. |
21:09:15 | disruptek | silliness. |
21:10:26 | sealmove | clyybber: oh so it's indeed what I originally thought! nice, hmm, but when testing my package how do I enable this feature? I should use nimble command while developing? |
21:10:32 | * | lritter quit (Quit: Leaving) |
21:11:05 | clyybber | nimble develop |
21:11:07 | clyybber | I think |
21:11:40 | clyybber | sealmove: But tbh if you want to KISS use git submodules :) |
21:11:47 | clyybber | or if you want it to just work use nimph :) |
21:12:27 | sealmove | hmm |
21:12:33 | sealmove | food for thought you gave me |
21:13:44 | sealmove | what is nimph? |
21:13:55 | * | filcuc joined #nim |
21:14:02 | disruptek | !repo nimph |
21:14:04 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11a nim package hierarchy manager from the future 🧚 15 8⭐ 0🍴 7& 1 more... |
21:15:55 | * | ltriant joined #nim |
21:16:15 | FromDiscord | <michalm> Anyone from Zurich or surroundings? Maybe some small Nim based meetup? |
21:17:58 | sealmove | disruptek, can you give a tl;dr overview of nimph? |
21:18:07 | sealmove | persude me to use it |
21:18:40 | disruptek | it's a package manager that integrates tightly with git, github, and the compiler. so that you don't have to use it as often as you use nimble. |
21:19:21 | disruptek | it's like a developer-oriented package manager, as opposed to the other kind. |
21:19:24 | sealmove | my only concern is that nimble is the mainstream (I think?) |
21:19:38 | disruptek | sure. |
21:19:54 | disruptek | you can use both at the same time. |
21:20:41 | sealmove | well, I just want people to be able to install my repo as easily/conveniently/familiarly as possible |
21:20:51 | disruptek | weird. |
21:21:30 | disruptek | nimph doesn't change any of that. you still use the .nimble file and all that bullshit. |
21:21:46 | disruptek | it just yields useful information about your environment and helps you keep it sane. |
21:21:47 | sealmove | yes I realized it uses .nimble, which is encouraging |
21:22:12 | clyybber | |
21:22:23 | sealmove | so... people will be able to install it using nimble? even if I am not? |
21:22:42 | clyybber | yeah |
21:22:46 | sealmove | great! <3 |
21:22:54 | disruptek | why can't you install your repo with nimble? |
21:23:18 | sealmove | i didn't try, not used to package managers |
21:23:51 | disruptek | yeah, they are dumb. |
21:24:17 | sealmove | this is not my opinion, i don't have an opinion yet, since i haven't tried |
21:24:33 | sealmove | might as well start with nimph |
21:25:15 | disruptek | no, it's my opinion. |
21:25:30 | disruptek | i would rather just have symlinks, but i know araq would never go for that. |
21:25:32 | * | thomasross quit (Ping timeout: 268 seconds) |
21:26:15 | Araq | I would use relative addressing, project foo, dependency bar in ../bar, problem solved. |
21:26:39 | disruptek | where my code sits has little to do with what i need it to provide. |
21:27:55 | Araq | well you can put your symlinks in ../ then :P |
21:28:06 | disruptek | the fact is that the world is flat as far as the compiler is concerned. ../bar is the same as bar or ../../bar. |
21:28:45 | clyybber | ? |
21:29:13 | disruptek | bar == bar == bar |
21:29:48 | clyybber | foo |
21:30:18 | * | thomasross joined #nim |
21:30:31 | clyybber | disruptek: Reminds me.. I wanted to make a not-sure-how-that-operator-thing-is-called macro |
21:30:42 | clyybber | that allows you to write `a < b < c |
21:30:49 | clyybber | or `a == b == c` |
21:30:50 | disruptek | ah, yeah, cool. |
21:31:02 | clyybber | just to see if it *can* be done |
21:31:07 | disruptek | hmm, i wonder about that. |
21:31:21 | PMunch | A term rewriting macro? |
21:31:35 | clyybber | I wonder if haskell supports that syntax |
21:31:39 | clyybber | PMunch: Yeah |
21:31:44 | clyybber | Ideally I guess |
21:32:14 | disruptek | seems like you can do it with your own operators, but i dunno about using existing ones with it. |
21:32:47 | Araq | you can do chain(x < y < z) |
21:32:56 | disruptek | clearly. |
21:33:00 | Araq | but IMHO it's silly |
21:34:04 | disruptek | clearly! |
21:34:14 | Araq | and math only has it because it's a legacy. plenty of math syntax is tasteless |
21:34:50 | Araq | "let's use ab for a*b and then run out of single letter vars and so we'll use Greek and Arabic letters" |
21:35:09 | disruptek | pretty sure that /adds/ flavor. |
21:35:11 | disruptek | so to speak. |
21:35:27 | clyybber | Its handy for cartesian products |
21:35:31 | clyybber | A x B x C |
21:35:59 | Araq | as much as I dislike the word, it really doesn't "scale". at all. |
21:36:18 | PMunch | Araq, can you re-run this: https://github.com/nim-lang/Nim/pull/12817 or should I just force push to trigger it? |
21:36:20 | disbot | ➥ Fix AVR target to define ints properly @11PMunch |
21:36:41 | PMunch | disruptek, I like how disbot works now :) |
21:36:51 | PMunch | It's actually useful instead of just annoying :D |
21:37:06 | disruptek | you mean, the way it messages /me/ when someone posts an ix link? |
21:37:23 | PMunch | Huh? |
21:38:03 | Araq | PMunch: tests/compiler/tcppCompileToNamespace.nim is failing |
21:38:12 | disruptek | it doesn't post ix links to the playground and then reproduce them here. instead, it posts links to the playground and then sends them to me alone. |
21:38:14 | Araq | https://dev.azure.com/nim-lang/Nim/_build/results?buildId=1123 |
21:38:19 | PMunch | Still? I thought I fixed that.. |
21:39:04 | PMunch | Where do you see what fails? |
21:39:47 | * | thomasross quit (Ping timeout: 276 seconds) |
21:40:04 | Araq | follow my link |
21:40:14 | Araq | click on one job |
21:40:38 | Araq | scroll down, click on "Run CI - Failed" |
21:40:54 | PMunch | And then just go scrolling through the log into you find something that seems out of order? |
21:41:03 | PMunch | I mean I got that far intuitively.. |
21:41:33 | Araq | search for 'FAIL' |
21:42:11 | Araq | disruptek: does nimph work on Windows? |
21:42:20 | disruptek | dunno. |
21:42:32 | Araq | would you accept patches? |
21:42:35 | disruptek | i don't know of a good reason it wouldn't. |
21:42:42 | disruptek | why not? |
21:42:52 | PMunch | Araq, oh great.. That test runs fine on my machine |
21:42:54 | FromDiscord | <mratsim> @Clyybber I have one |
21:43:22 | disruptek | i need a patch to fix this dirty repo issue. |
21:43:23 | clyybber | one <...> ? |
21:43:24 | rayman22201 | so happy PMunch is doing the hard work of making Nim work on Arduino because it's something I want to play with one day :-P |
21:43:29 | * | thomasross joined #nim |
21:43:38 | FromDiscord | <mratsim> Had to parse this for my misguided attempt at a polyhedral compiler: https://github.com/mratsim/hydra/blob/master/tests/test_sets.nim#L52 |
21:43:39 | PMunch | rayman22201, it actually works pretty well |
21:43:59 | PMunch | This is just some weird edge-case issue that is easy to work around with a compiler define :) |
21:44:06 | FromDiscord | <mratsim> macro for chained a < b < c |
21:44:18 | clyybber | mratsim: NIce |
21:44:18 | PMunch | But come to my talk at FOSDEM for more details :) |
21:44:41 | FromDiscord | <mratsim> it's surprisingly a pain: https://github.com/mratsim/hydra/blob/master/hydra/ilp/constraints.nim#L28-L152 |
21:45:19 | rayman22201 | If only I could fly to Brussels from the US cheaply... I will have to hope somebody records it :-) |
21:45:32 | Araq | clyybber: waiting for your p(ObjectRef(...)) patch |
21:45:55 | FromDiscord | <mratsim> but the basic strategy is that you just do comparisons from left to right and you return the right operand |
21:45:57 | PMunch | rayman22201, don't worry all the talks are live-streamed and later uploaded to YouTube :) |
21:46:51 | clyybber | Araq: Thought you'd fixed it yourself :p |
21:47:15 | FromDiscord | <mratsim> you could create your custom one that returns both the comparison result and the right operand and have a converter that discards the right operand automatically |
21:47:26 | FromDiscord | <mratsim> to create the illusion of native Nim support |
21:47:32 | clyybber | Hmm |
21:48:08 | FromDiscord | <mratsim> that would only works on your custom types of course |
21:48:14 | Araq | I suppose I programmed for too long, a < b < c makes no sense to me anymore |
21:48:31 | Araq | why compare '<' against a bool? |
21:48:55 | PMunch | Hmm, what distro are the azure jobs running on? |
21:49:14 | disruptek | to see if one bool is larger than the other. |
21:49:28 | clyybber | Araq: Thats what I think too when I see stuff like |A| < |P(A)| = |A^A| |
21:49:36 | disruptek | there are some crazy big bools rollin' aroun' here. |
21:50:05 | Araq | PMunch: "Zealot Linux" |
21:50:19 | clyybber | Araq: Is there some fancy printing for PContexts? |
21:50:43 | Araq | I never printed a PContext, ever. |
21:51:13 | Araq | it contains the symbol table, usually it's so big that you get lost |
21:51:52 | clyybber | Nice. |
21:52:22 | PMunch | Hmm okay, I'll set up a VM and try to figure out why it fails tomorrow |
21:52:42 | clyybber | Araq: I want to check that the section pragma is used in a =sink or `=` context |
21:52:51 | clyybber | So I thought I'd take a peek in PContext |
21:53:01 | clyybber | since there is no sym I could look at the owner of |
21:53:29 | Araq | c.p.owner.name.s in ["=sink", "="] |
21:53:36 | clyybber | Nice, thanks |
21:53:44 | * | nif quit (Quit: ...) |
21:53:53 | * | nif joined #nim |
21:54:31 | clyybber | Araq: One quick last qeustion: Should I check for that in semstmts or in sempass2? Or would it make no difference? |
21:55:07 | Araq | for sempass2 the check looks different |
21:55:30 | * | thomasross_ joined #nim |
21:55:30 | * | thomasross quit (Killed (wolfe.freenode.net (Nickname regained by services))) |
21:55:30 | * | thomasross_ is now known as thomasross |
21:55:47 | Araq | and sempass2 already checks for body pragmas |
21:56:07 | Araq | so it's probably easier to add to sempass2. |
21:56:19 | Araq | but semantically it makes no difference |
21:56:43 | clyybber | ok :) |
21:59:31 | sealmove | clyybber: the submodules are not imported after all, what am I missing? |
22:00:10 | clyybber | sealmove: You place git submodules where you want them to be |
22:00:27 | sealmove | i mean nimble. as documentation says: |
22:00:29 | sealmove | ├── src |
22:00:31 | sealmove | │ ├── foobar |
22:00:33 | sealmove | │ │ ├── utils.nim # Imported via `import foobar/utils` |
22:00:35 | sealmove | │ │ └── common.nim # Imported via `import foobar/common` |
22:00:37 | sealmove | │ └── foobar.nim # Imported via `import foobar` |
22:00:39 | sealmove | so `import foobar` doesn |
22:00:42 | sealmove | 't pull submodules |
22:00:51 | clyybber | submodules? |
22:00:56 | clyybber | ah you don't mean git submodules |
22:01:14 | clyybber | sealmove: Yeah you are right |
22:01:31 | clyybber | I was referring to the fact that you don't have to do import foobar/src/foobar |
22:01:45 | sealmove | ah i see |
22:01:45 | clyybber | or foobar/foobar in the case of a different repo layout |
22:01:49 | disruptek | if you put src in the path, sure. |
22:02:05 | clyybber | disruptek: Which nimble does |
22:02:10 | clyybber | in nimblePath I guess |
22:02:18 | clyybber | or rather nimblePath does |
22:02:20 | clyybber | whatever |
22:02:22 | clyybber | :p |
22:02:58 | disruptek | here's an easy way to remember it: nimble doesn't use nimblePath. 😉 |
22:03:09 | * | PMunch quit (Quit: leaving) |
22:03:32 | clyybber | aight |
22:04:00 | * | dwdv quit (Quit: quit) |
22:26:35 | sealmove | anyone knows any good guides for versioning? |
22:26:49 | disruptek | !repo bump |
22:26:50 | disbot | https://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 6⭐ 1🍴 |
22:27:07 | disruptek | see the semver link therein. |
22:27:55 | sealmove | thanks! |
22:29:10 | FromDiscord | <mratsim> Disruptek is trying to silently takeover all Nim packages. A package manager, a versioning system, soon a package search. I know another company who did that, shhhhh it's called Google |
22:29:28 | clyybber | Araq: Instead of the section approach we can also introduce a =initSink and =initCopy . The section thing is basically syntax sugar around it. |
22:29:35 | disruptek | package search is built into both irc and nimph. 😜 |
22:29:41 | clyybber | It's an optional optimization after all |
22:29:55 | FromDiscord | <mratsim> for me optimizations are not optional 😉 |
22:30:06 | clyybber | mratsim: For you I'm doing this :) |
22:30:39 | * | david_ joined #nim |
22:30:47 | david_ | hello |
22:31:04 | sealmove | hi |
22:32:38 | david_ | got hex chat to work on this little terminal i have, so i figured i would go to an IRC that i can talk about what im programming. How general is the conversation in here? |
22:32:42 | FromDiscord | <mratsim> well I don't know if I how much I will use them, weave is actually too low-level and only uses trivial types because multithreading. And Laser is now becoming a custom compiler |
22:33:10 | clyybber | mratsim: I'm working on init elision |
22:33:19 | FromDiscord | <mratsim> I'd rather think it's for the naive soul that is trying to do functional programming with strings and is paying memory allocation at every function that is not updated in-place |
22:33:25 | clyybber | So we don't zeromem stuff that is later overwritten by anyways |
22:33:30 | FromDiscord | <mratsim> ah nice |
22:34:05 | clyybber | but to make that work I need to have a =sink and `=` variant that does not destroy the previous location |
22:34:13 | clyybber | as that location will contain uninit memory |
22:34:44 | disruptek | uninit memory makes my heels throb. |
22:34:53 | disruptek | but, like, in a good way. |
22:35:11 | clyybber | surprise surprise |
22:35:18 | david_ | exit |
22:35:20 | * | david_ quit (Remote host closed the connection) |
22:35:24 | disruptek | lol |
22:35:35 | clyybber | you enter |
22:35:38 | clyybber | enter |
22:35:48 | * | clyybber enters the matrix |
22:37:26 | clyybber | the fastest "random" number generator is reading uninitialized memory, fite me |
22:41:21 | * | david_ joined #nim |
22:42:01 | david_ | does anyone know of any "Neural Network" modules written in nim? |
22:42:42 | david_ | i am just looking for some examples of what is possible and doing some reasearch, but i am having a hard time finding anything |
22:43:55 | disruptek | !repo arraymancer |
22:43:57 | disbot | https://github.com/mratsim/Arraymancer -- 9Arraymancer: 11A fast, ergonomic and portable tensor library in Nim with a deep learning focus for CPU, GPU and embedded devices via OpenMP, Cuda and OpenCL backends 15 527⭐ 48🍴 7& 6 more... |
22:44:30 | david_ | ok thanks! i will look into it |
22:44:44 | disruptek | no problem. |
22:46:48 | * | david_ quit (Remote host closed the connection) |
22:49:54 | sealmove | anyone knows what's the deal with Lox? https://www.craftinginterpreters.com/the-lox-language.html |
22:53:15 | sealmove | :S I wonder if I should break compatibility with Kaitai Struct grammar... They used weird/undocumented expression language where I can just use Nim expressions |
22:53:35 | sealmove | also there are undocumented features which I have to support if I don't want to break compatibility |
22:56:25 | FromGitter | <kaushalmodi> How do I profile a Nim code's performance? |
22:56:52 | disruptek | there's a profiling section in the manual. |
22:56:55 | FromDiscord | <mratsim> Since I'm writing a profiler, I can say |
22:57:00 | FromDiscord | <mratsim> not with nim |
22:57:13 | rayman22201 | lol. What happened to Golden disruptek? |
22:57:19 | FromDiscord | <mratsim> use perf record + perf annotate, or Apple isntruments or intel VTune or Valgrind |
22:57:32 | FromGitter | <kaushalmodi> mratsim: thanks will have a look |
22:57:35 | * | MarquisdeFalbala quit () |
22:57:40 | disruptek | it works, but it's unfinished. i'm focussed on nimph at the moment. |
22:57:52 | FromGitter | <kaushalmodi> This thread made me think of profiling my AoC code: https://www.reddit.com/r/adventofcode/comments/e8etjl/rustcc_users_how_long_does_your_day_9_part_2_take/ |
22:58:11 | FromDiscord | <mratsim> I tried nimprof like 3 hours ago and deadlocked my program, + it requires stacktraces which are a big source of slowdown themselves so .... |
22:58:22 | FromGitter | <kaushalmodi> My code takes 120ms, whereas the OP's code there takes 9ms |
22:58:42 | rayman22201 | I was looking into to profiling and flamegraphs myself. @kuashalmodi and @mratsim you might appreciate this blog: http://www.brendangregg.com/flamegraphs.html |
22:58:55 | rayman22201 | for performance profiling |
23:00:00 | FromDiscord | <mratsim> I've never understood the appeal of flamegraphs personally |
23:00:01 | FromGitter | <kaushalmodi> I've never done profiling before.. would it list which line/block of the Nim code took how long? By correlating it with the compiled C? |
23:00:19 | FromDiscord | <mratsim> give me the line <-> Assembly any day, and also the cache misses |
23:00:30 | FromDiscord | <mratsim> what platform are you on? |
23:01:11 | FromDiscord | <mratsim> perf/Intel VTune and Apple Instruments can correlate directly with the Nim code if you compile with --debugger:native |
23:01:18 | FromDiscord | <mratsim> you don't have to go through C |
23:01:34 | FromGitter | <kaushalmodi> I'm on RHEL 6.8 |
23:02:17 | FromDiscord | <mratsim> then compile with --debugger:native |
23:02:25 | FromDiscord | <mratsim> do "perf record yourbinary" |
23:02:36 | FromDiscord | <mratsim> it will create a per profile |
23:02:42 | FromDiscord | <mratsim> and then "perf annotate" |
23:03:13 | FromGitter | <kaushalmodi> Thanks, I'll try these out when I get to my PC |
23:03:27 | FromGitter | <kaushalmodi> Also reading this: https://nim-lang.org/docs/estp.html |
23:05:23 | * | clyybber quit (Quit: WeeChat 2.7) |
23:06:40 | * | azed joined #nim |
23:13:11 | sealmove | oh I wasn't aware of: |
23:13:19 | sealmove | !repo binaryparse |
23:13:19 | disbot | https://github.com/PMunch/binaryparse -- 9binaryparse: 11Binary parser for Nim 15 30⭐ 2🍴 |
23:13:33 | FromDiscord | <mratsim> I didn't try the ESTP but just nimprof results in empty calls for me |
23:19:17 | * | solitudesf quit (Ping timeout: 240 seconds) |
23:20:04 | * | filcuc quit (Quit: Konversation terminated!) |
23:35:45 | * | lkw_ quit (Quit: ZNC 1.7.3 - https://znc.in) |
23:36:50 | * | lkw joined #nim |
23:38:31 | * | thomasross quit (Ping timeout: 250 seconds) |
23:48:06 | FromDiscord | <Fern & Simula (They/Them)> any chance nim has anonymous functions? |
23:48:09 | * | thomasross joined #nim |
23:48:44 | FromDiscord | <Fern & Simula (They/Them)> oh, it's in sugar |
23:52:21 | * | thomasross_ joined #nim |
23:52:21 | * | thomasross is now known as Guest73229 |
23:52:21 | * | Guest73229 quit (Killed (tolkien.freenode.net (Nickname regained by services))) |
23:52:21 | * | thomasross_ is now known as thomasross |
23:57:11 | * | abm quit (Quit: Leaving) |
23:57:29 | FromGitter | <Willyboar> ```the doctor wasn't able to fix everything `````` |
23:58:33 | FromDiscord | <mratsim> @david_ also had this demo to your NN in Nim: https://github.com/Vindaar/NeuralNetworkLiveDemo |