00:41:07 | * | NimBot joined #nim |
00:53:25 | * | envoyt joined #nim |
01:23:45 | * | envoyt quit (Ping timeout: 248 seconds) |
01:25:14 | * | envoyt joined #nim |
01:45:27 | * | theelous3 quit (Ping timeout: 245 seconds) |
02:09:20 | * | neceve quit (Remote host closed the connection) |
02:47:25 | * | rayman22201 quit (Quit: Connection closed for inactivity) |
03:05:39 | * | dddddd quit (Remote host closed the connection) |
03:17:37 | * | rayman22201 joined #nim |
03:58:44 | * | envoyt quit (Ping timeout: 244 seconds) |
04:49:01 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:05:07 | * | arecaceae quit (Remote host closed the connection) |
05:05:25 | * | arecaceae joined #nim |
06:12:08 | Araq | https://media.contentapi.ea.com/content/dam/eacom/frostbite/files/scopestacks-public.pdf |
06:20:09 | * | nsf joined #nim |
06:23:38 | * | solitudesf joined #nim |
06:42:07 | * | solitudesf quit (Ping timeout: 245 seconds) |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:37 | * | gmpreussner joined #nim |
07:27:16 | * | Trustable joined #nim |
07:32:35 | FromDiscord_ | <djazz> "Super-duper oiled-up fast!" Sounds good to me! |
07:41:58 | FromGitter | <rokups> typed macros run after overload resolution, right? my typed macro modified proc parameters so two procs are no longer ambiguous but i still get ambiguity error |
07:47:55 | * | pvn joined #nim |
07:49:54 | * | dwdv joined #nim |
07:51:06 | * | narimiran joined #nim |
07:51:41 | FromGitter | <mohamedmoussa89> whats `=sink`? Cannot find a reference to it in the manual |
07:57:22 | FromGitter | <alehander42> a newruntime overload |
07:58:51 | FromGitter | <alehander42> in the new runtime there are move-s, sink-s etc and others and if you overload `=` you need to make sure whioch one it is |
07:59:10 | FromGitter | <alehander42> but afaik `=sink` should be replaced by `=move` as there are problems with `=sink` |
07:59:12 | FromGitter | <alehander42> https://github.com/nim-lang/Nim/wiki/Destructors,-2nd-edition |
07:59:17 | FromGitter | <alehander42> Araq, is this the last doc |
08:00:26 | * | laaron quit (Remote host closed the connection) |
08:00:30 | FromGitter | <mohamedmoussa89> ok i'll have a read |
08:04:13 | * | laaron joined #nim |
08:06:47 | * | Vladar joined #nim |
08:37:47 | * | Kaivo quit (Quit: WeeChat 2.5) |
08:45:46 | Araq | alehander42: I'm working on an update ;-) but yes, for now. |
09:02:09 | FromGitter | <matrixbot> `cfv` I have changed my username. It was BaldEagleX02 |
09:05:18 | FromGitter | <matrixbot> `cfv` > <@gitter_fromirc:matrix.org> *<leorize>* nim-lang/needed-libraries <- is that repo still maintained? ⏎ ⏎ The last commit was made on May 29, 2018 |
09:06:49 | FromGitter | <matrixbot> `cfv` I don't think anyone is still maintaining it |
09:06:54 | FromGitter | <matrixbot> `cfv` Or going to do so |
09:07:50 | FromGitter | <matrixbot> `cfv` https://nim-lang.org/docs/lib.html |
09:12:11 | * | Trustable quit (Remote host closed the connection) |
09:19:00 | Araq | but it should be maintained |
09:19:05 | Araq | please update it |
09:19:20 | Araq | https://www.microsoft.com/en-us/research/uploads/prod/2019/06/mimalloc-tr-v1.pdf excellent stuff |
09:26:10 | * | jonafato- quit (Remote host closed the connection) |
09:26:19 | * | jonafato joined #nim |
09:29:34 | * | pvn quit (Quit: Leaving.) |
09:30:05 | narimiran | @cfv, leorize: ...but the last issue comment was made three days ago. so it is still active. |
09:31:56 | FromGitter | <matrixbot> `cfv` Yeah, you are right but there isn't any README update |
09:32:24 | narimiran | what should be updated there? |
09:33:27 | FromGitter | <matrixbot> `cfv` We could create a list of needed libraries in the README |
09:33:50 | narimiran | that's why we have issues |
09:33:58 | narimiran | i don't see a problem there, to be honest |
09:34:23 | narimiran | it is much easier for people to comment on some issue than to send a PR to change readme |
09:34:47 | FromGitter | <matrixbot> `cfv` > <@gitter_fromirc:matrix.org> *<narimiran>* it is much easier for people to comment on some issue than to send a PR to change readme ⏎ ⏎ You are right |
09:35:22 | FromGitter | <matrixbot> `cfv` But we still need to write something about the status of those libraries |
09:35:34 | narimiran | offtopic: you can directly connect matrix and irc, no need for matrixbot (i don't know the details, but i know it is possible and people usually do that) |
09:36:01 | FromGitter | <matrixbot> `cfv` > <@gitter_fromirc:matrix.org> *<narimiran>* offtopic: you can directly connect matrix and irc, no need for matrixbot (i don't know the details, but i know it is possible and people usually do that) ⏎ ⏎ It seems today it's not working |
09:36:27 | FromGitter | <matrixbot> `cfv` I tried but it doesn't find the IRC room on freenode |
09:36:32 | narimiran | "we need...." is usually translated here to "somebody else, but surely not me, should do..." |
09:37:35 | narimiran | and after "we" do that, "we" would need to maintain and update that readme, etc. once again, i really don't see the problem with the way things are now in that repo. |
09:37:38 | FromGitter | <matrixbot> `cfv` > <@gitter_fromirc:matrix.org> *<narimiran>* "we need...." is usually translated here to "somebody else, but surely not me, should do..." ⏎ ⏎ ☹️ |
09:38:25 | narimiran | if you're interested in some topic, you search the issues. readme is a short overview which tells you what a repo is about |
09:38:49 | FromGitter | <dom96> cfv: look at how you come through, you're going through at least two different relays: https://irclogs.nim-lang.org |
09:39:25 | narimiran | e.g. how would you "translate" https://github.com/nim-lang/needed-libraries/issues/77 to readme? |
09:40:22 | FromGitter | <dom96> Also, narimiran is completely right. That repo doesn't need any maintenance, it's a community effort, just comment on the issues |
09:41:18 | FromGitter | <matrixbot> `cfv` > <@gitter_dom96:matrix.org> cfv: look at how you come through, you're going through at least two different relays: https://irclogs.nim-lang.org ⏎ ⏎ I know. There must be something down at Matrix today |
09:41:38 | FromGitter | <matrixbot> `cfv` It cannot find nim on freenode |
09:41:47 | FromGitter | <matrixbot> `cfv` Only on gitter |
09:44:20 | FromGitter | <matrixbot> `cfv` I have just tried with #python and it works |
09:44:40 | FromGitter | <matrixbot> `cfv` While it cannot find #nim |
09:45:59 | BaldEagleX02_ | . |
09:46:53 | * | NimBot joined #nim |
09:48:10 | leorize[m] | @cfv: the matrix room is #freenode_#nim |
09:48:27 | leorize[m] | full name #freenode_#nim:matrix.org |
09:48:42 | leorize[m] | you won't find the room in Matrix's listing, dunno why |
09:48:55 | * | cfv[m] joined #nim |
09:49:00 | cfv[m] | Thank you |
09:49:51 | * | nsf quit (Quit: WeeChat 2.4) |
10:04:56 | dom96 | Nim in Action is 50% off today: bit.ly/2IYjiT5 |
10:05:09 | dom96 | https://bit.ly/2IYjiT5 |
10:09:28 | * | solitudesf joined #nim |
10:09:36 | * | envoyt joined #nim |
10:11:06 | * | abm quit (Read error: Connection reset by peer) |
10:11:31 | * | abm joined #nim |
10:12:15 | FromDiscord_ | <djazz> How much has Nim changed since it was written? |
10:14:36 | leorize | a lot :p, but most of the book is still valid |
10:14:53 | leorize | according to dom96 iirc |
10:16:56 | FromGitter | <rokups> second edition when |
10:21:09 | sammich | dom96: thanks for the heads up, picked up nim & elm in action! |
10:23:52 | dom96 | sammich, yay :) |
10:25:26 | dom96 | djazz: the book's examples are in the test suite and they still pass 100%, so apart from some deprecation warnings everything should be good |
10:27:09 | FromDiscord_ | <djazz> 👍 |
10:29:32 | * | neceve joined #nim |
10:34:54 | * | stefanos82 joined #nim |
10:46:36 | vegai_ | hmm, I think I oughta buy a paper version as well... |
10:47:57 | vegai_ | I wish there was an ebook reader that made it easy to read technical books... |
10:48:39 | * | envoyt quit (Read error: Connection reset by peer) |
10:49:19 | * | envoyt joined #nim |
10:52:14 | FromDiscord_ | <djazz> I was reading the chapter on C interop earlier, good stuff |
10:52:18 | FromDiscord_ | <Núkley> does glitterirc work in off-topic |
10:52:30 | FromDiscord_ | <Núkley> it hasnt posted in around 8 months |
10:56:05 | FromDiscord_ | <Marrakezh = nil> Hi |
10:58:00 | * | laaron quit (Remote host closed the connection) |
10:59:21 | FromGitter | <alehander42> ey |
11:00:00 | FromDiscord_ | <Núkley> my eyesight is so bad i thought it said glitterirc |
11:00:05 | FromDiscord_ | <Núkley> it says gitterirc |
11:00:13 | * | laaron joined #nim |
11:00:44 | FromGitter | <alehander42> not really an english thing, easy to misread |
11:03:36 | * | laaron quit (Remote host closed the connection) |
11:05:06 | * | envoyt quit (Read error: Connection reset by peer) |
11:05:26 | * | envoyt joined #nim |
11:07:02 | * | zyklon joined #nim |
11:07:20 | * | uvegbot quit (Quit: Konversation terminated!) |
11:07:37 | * | laaron joined #nim |
11:08:53 | * | uvegbot joined #nim |
11:08:53 | * | zyklon quit (Read error: Connection reset by peer) |
11:09:32 | * | nsf joined #nim |
11:10:20 | * | dddddd joined #nim |
11:10:57 | * | laaron quit (Remote host closed the connection) |
11:12:45 | * | laaron joined #nim |
11:19:12 | * | solitudesf quit (Ping timeout: 245 seconds) |
11:30:50 | * | laaron quit (Remote host closed the connection) |
11:32:35 | * | laaron joined #nim |
11:33:00 | * | laaron quit (Client Quit) |
11:35:43 | * | laaron joined #nim |
11:42:24 | * | envoyt quit (Ping timeout: 248 seconds) |
11:42:46 | * | envoyt joined #nim |
11:49:33 | * | envoyt quit (Ping timeout: 258 seconds) |
11:50:32 | * | envoyt joined #nim |
12:20:23 | * | Snircle joined #nim |
12:47:16 | noonien | hello! |
12:47:27 | noonien | where can i read more about `import pkg/...`? |
12:48:32 | skaruts | how do I check if something isn't in an array? The expressions "not x in arr" and "x not in arr" don't seem to work |
12:48:58 | noonien | skaruts: i believe the keyword is `notin` |
12:49:24 | skaruts | oh |
12:51:34 | skaruts | works, thanks |
12:51:55 | * | vlad1777d__ joined #nim |
13:00:17 | lqdev[m] | noonien: in the manual, I suppose |
13:00:33 | noonien | manual doesn't have much info about that |
13:00:39 | * | solitudesf joined #nim |
13:09:52 | * | nsf quit (Quit: WeeChat 2.4) |
13:14:38 | * | envoyt quit (Read error: Connection reset by peer) |
13:20:27 | * | vlad1777d__ quit (Ping timeout: 245 seconds) |
13:24:32 | * | natrys joined #nim |
13:51:19 | * | couven92 joined #nim |
13:57:03 | * | abm quit (Quit: Leaving) |
13:58:59 | * | confundus joined #nim |
13:59:59 | * | confundus quit (Client Quit) |
14:00:13 | * | confundus joined #nim |
14:07:06 | * | confundus quit (Quit: leaving) |
14:16:59 | * | laaron quit (Remote host closed the connection) |
14:19:20 | * | laaron joined #nim |
14:30:02 | * | theelous3 joined #nim |
14:43:50 | * | laaron quit (Remote host closed the connection) |
14:51:12 | * | laaron joined #nim |
15:26:47 | * | laaron quit (Remote host closed the connection) |
15:28:29 | * | laaron joined #nim |
15:44:13 | * | sz0 joined #nim |
15:50:27 | * | laaron quit (Remote host closed the connection) |
15:51:02 | * | laaron joined #nim |
15:51:25 | * | nsf joined #nim |
16:21:13 | * | Jesin quit (Quit: Leaving) |
16:31:33 | * | Jesin joined #nim |
16:36:36 | * | jjido joined #nim |
16:46:22 | WilhelmVonWeiner | i guess `not x in xs` inverts x |
16:46:48 | WilhelmVonWeiner | `not (x in xs)` might work |
16:46:53 | WilhelmVonWeiner | but ofc use notin |
17:02:55 | * | envoyt joined #nim |
17:17:08 | * | envoyt quit (Ping timeout: 245 seconds) |
17:17:31 | * | envoyt joined #nim |
17:21:46 | * | deech joined #nim |
17:32:52 | * | deech quit (Ping timeout: 252 seconds) |
17:41:52 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:43:37 | * | nsf quit (Quit: WeeChat 2.4) |
17:49:53 | * | jmiven quit (Quit: co'o) |
17:50:24 | * | neceve quit (Remote host closed the connection) |
17:50:40 | * | jmiven joined #nim |
17:59:17 | * | Trustable joined #nim |
18:05:18 | * | theelous3_ joined #nim |
18:18:01 | * | stefanos82 quit (Quit: Quitting for now...) |
18:21:21 | FromGitter | <arnetheduck> `nlvm` updated to 0.20 - get your prebuilt binary from https://github.com/arnetheduck/nlvm/releases/download/continuous/nlvm-x86_64.AppImage (includes stdlib and all, just `chmod +x` and run like you'd run nim: `curl -L https://bit.ly/2W7O0yH -o nlvm; chmod +x nlvm; echo 'echo "space mutants"' > t.nim; ./nlvm c -d:release -r t.nim` |
18:23:39 | dom96 | Nice :O |
18:24:27 | * | Trustable quit (Remote host closed the connection) |
18:27:19 | * | skaruts quit (Ping timeout: 256 seconds) |
18:28:07 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
18:28:33 | * | laaron joined #nim |
18:30:04 | * | jjido joined #nim |
18:34:40 | FromDiscord_ | <djazz> So, what advantages does nlvm have? |
18:38:00 | * | natrys quit (Quit: natrys) |
18:38:50 | Araq | does nvlm work with --newruntime? |
18:39:15 | FromGitter | <arnetheduck> mainly potential for better codegen for everything from exceptions, debug info to optimizations.. cuts out the `c` middleman (consequently, compatibility with C requires more correct/strict nim code) |
18:40:20 | FromGitter | <arnetheduck> @Araq unlikely.. haven't even tried, there are just absolutely minimal impls in places for the newruntime magics and I disabled that part of the test suite because it was too noisy |
18:42:24 | FromGitter | <arnetheduck> was considering what to do next: newruntime, proper exceptions or maybe rip out the nimvm and maybe replace it with the llvm jit.. or maybe delve deeper into wasm-land |
18:42:59 | Araq | hmm ok, pity. almost all of it is an AST to AST rewrite so that nlvm can keep up |
18:43:33 | * | natrys joined #nim |
18:44:07 | Araq | ripping out nimvm is a nice research project but I think it's really hard |
18:45:22 | Araq | the VM is not just a shitty bytecode interpreter used for compiletime evaluations. it constructs NimNodes and is the foundation of Nim's macro system. |
18:45:56 | Araq | how can you construct NimNodes from LLVM's IR? |
18:46:07 | FromDiscord_ | <djazz> Hows wasm support? |
18:46:09 | FromGitter | <arnetheduck> callbacks I guess |
18:46:39 | FromGitter | <arnetheduck> reason for doing is basically to get full ctfe and repl going |
18:47:26 | FromGitter | <arnetheduck> though I agree, the nimvm is pretty deeply embedded in the nim compiler code, might be hard to extract a clean api |
18:47:57 | FromGitter | <arnetheduck> djazz: https://forum.nim-lang.org/t/4779 |
18:50:52 | FromGitter | <arnetheduck> on the topics of macros, ran into a funny bug - tmacros7.nim generates a string literal where the `typ` field is unset.. looks like the c backend doesn't use it, but `nlvm` does so it crashed (on nil ref that wasn't caught by nim nil ref checker..) |
18:51:29 | FromGitter | <arnetheduck> I missed reply, if any, Araq, from the other day.. wdyt of removing the nil checker completely? |
18:52:13 | FromDiscord_ | <djazz> Thanks. |
18:52:45 | FromGitter | <arnetheduck> fwiw, I don't think it's a lot of work to complete newruntime, but I just don't want to keep up with lots of changes all the time, don't have time for that nowadays |
19:03:26 | * | Trustable joined #nim |
19:08:07 | * | Vladar quit (Remote host closed the connection) |
19:09:22 | * | sz0 quit (Quit: Connection closed for inactivity) |
19:21:49 | * | nergal[m] joined #nim |
19:21:51 | * | Vladar joined #nim |
19:28:25 | Araq | arnetheduck: fine with me (runtime nil checking) |
19:36:50 | * | Vladar quit (Remote host closed the connection) |
19:37:40 | * | Mister_Magister quit (Quit: bye) |
19:38:28 | * | Mister_Magister joined #nim |
20:07:11 | * | laaron quit (Quit: ZNC 1.7.1 - https://znc.in) |
20:07:35 | * | laaron joined #nim |
20:14:20 | * | sagax joined #nim |
20:41:33 | * | narimiran quit (Remote host closed the connection) |
21:01:37 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:04:58 | Araq | https://www.pascalcoin.org/ @arnetheduck |
21:06:07 | lqdev[m] | I recall importing like this: `import mod1/[submod1, submod2/[suba, subb]]` was not possible. is this still true? |
21:07:52 | lqdev[m] | nvm, it's still impossible |
21:08:06 | lqdev[m] | that kinda sucks |
21:32:16 | * | solitudesf quit (Ping timeout: 248 seconds) |
21:35:38 | * | onionhammer quit (Ping timeout: 272 seconds) |
21:36:54 | Araq | ok, 'kinda'. the good news is that most code comes *after* the lists of module imports |
21:37:35 | lqdev[m] | yeah, but it's still nicer if those could be nested. |
21:46:56 | * | dwdv quit (Quit: quit) |
21:47:14 | FromGitter | <arnetheduck> I'm still hoping for a multiline import without the ',' |
22:12:27 | FromGitter | <arnetheduck> @Araq https://github.com/nim-lang/Nim/pull/11570 - couldn't find any mentions in manual what happens on nil object deref.. guess it's UB? this is not a bad situation, allows defining a behaviour in the future (ie raising.. I'm not opposed to runtime nil checks per se, just as long as they're consistent.. that implementation should probably start with a panic that prints a nice diagnostic) |
22:12:50 | * | laaron quit (Remote host closed the connection) |
22:15:32 | * | laaron joined #nim |
22:17:07 | * | envoyt quit (Ping timeout: 245 seconds) |
22:17:27 | * | envoyt joined #nim |
22:27:02 | * | xace quit (Ping timeout: 258 seconds) |
22:30:58 | Araq | it should be like "array out of bounds", it should panic. eventually |
22:31:45 | Araq | I really don't like if it produced code that the HW already does for us |
22:34:20 | * | Trustable quit (Remote host closed the connection) |
22:37:07 | * | arecaceae quit (Remote host closed the connection) |
22:37:26 | * | arecaceae joined #nim |
22:38:12 | Araq | I think it's fine to produce SIGSEGVs, the error message is definitely a "quality of implementation" thing :P |
22:41:30 | Araq | also, "let x = p[]; if p != nil: action()" can be transformed into "let x = p[]; action()" |
22:42:00 | Araq | if p is nil it dies at 'x = p[]' |
22:42:18 | Araq | so p is provably not nil after p[] |
22:43:24 | FromGitter | <arnetheduck> yes, it's hard to reason about code in the presence of sigsegs :) |
22:44:30 | FromGitter | <arnetheduck> on the bright size, it's possible to produce a readable panic message by preallocating a signal handler buffer and using signal-safe functions to produce it / dump it - it's just that the existing one, using an exception, is quite broken |
22:46:19 | Araq | I wrote segfaults.nim |
22:46:46 | * | couven92 quit (Ping timeout: 246 seconds) |
22:46:50 | FromGitter | <arnetheduck> > *<Araq>* so p is provably not nil after p[] ⏎ ⏎ this is the kind of optimizations that drive C programmers nuts.. like the one with some loops being optimized away completely because they depend on UB like overflow semantics and it's therefore valid to simply remove it.. |
22:46:50 | * | theelous3_ quit (Ping timeout: 268 seconds) |
22:47:08 | Araq | I know |
22:47:37 | FromGitter | <arnetheduck> well, what can I say.. it's broken regardless of who wrote it :/ allocates memory -> malloc not reentrant / safe -> UB |
22:48:06 | Araq | Nim's allocator doesn't use malloc |
22:48:22 | Araq | but I'm sure it's broken in other ways |
22:49:23 | FromGitter | <arnetheduck> `s/malloc/mmap/` - equally broken |
22:49:44 | Araq | the only thing you can do in a signal handler is set a global |
22:49:55 | FromGitter | <arnetheduck> it's broken internally in nim even, pretty sure the memory allocator is not arbitrarily reentrant |
22:50:10 | Araq | but then we would need to poll this global all the time so *shrug* |
22:50:43 | FromGitter | <arnetheduck> well, it's not *that* bad.. you can actually do a whole lot - http://man7.org/linux/man-pages/man7/signal-safety.7.html - in particular, you can `write` |
22:51:09 | Araq | that's Linux, Posix has its own ideas |
22:51:31 | FromGitter | <arnetheduck> no, that's posix actually |
22:52:20 | FromGitter | <arnetheduck> but for the purpose of this discussion, you can't setjmp, so no exceptions |
22:52:21 | * | natrys quit (Quit: natrys) |
22:52:41 | FromGitter | <arnetheduck> (in addition to the memory allocator and nims own reentrant-unsafe code) |
22:58:47 | Araq | well the implementation doesn't try hard, if it crashes in attempting to deal with a crash ... not much is lost |
23:00:00 | Araq | anyway, the point is that nil-deref is not UB |
23:00:27 | Araq | the compiler is allowed to leave out the check if the hardware does it instead |
23:01:57 | Araq | and yeah, I know C programmers do not understand compilers but it's not like there is any viable alternative. if you write 'if (cond) { if (cond) ... }' then that can be transformed into 'if (cond)' |
23:12:23 | * | xace joined #nim |
23:16:20 | Araq | https://isc.sans.edu/diary/A+new+fascinating+Linux+kernel+vulnerability/6820 |
23:17:05 | Araq | "By mmaping at 0 (and first bypassing restrictions on doing so either by just having SELinux enabled -- their default policies allow anyone to mmap at 0, overriding any mmap_min_addr restriction provided by the kernel, due to the fact that both SELinux and mmap_min_addr both contend for the same LSM hook, but only one can be used (SELinux's in this case)) I can avoid the initial crash that would occur upon the initializing of sk from tun->sk, and s |
23:17:05 | Araq | ince the tun NULL check does not exist, proceed with exploiting the kernel." |
23:17:52 | Araq | well d'oh. don't mmap at 0. ever. problem solved. |
23:31:44 | * | envoyt quit (Ping timeout: 248 seconds) |
23:32:06 | * | envoyt joined #nim |
23:45:57 | * | vlad1777d__ joined #nim |