<< 23-06-2019 >>

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:08Araqhttps://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:35FromDiscord_<djazz> "Super-duper oiled-up fast!" Sounds good to me!
07:41:58FromGitter<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:41FromGitter<mohamedmoussa89> whats `=sink`? Cannot find a reference to it in the manual
07:57:22FromGitter<alehander42> a newruntime overload
07:58:51FromGitter<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:10FromGitter<alehander42> but afaik `=sink` should be replaced by `=move` as there are problems with `=sink`
07:59:12FromGitter<alehander42> https://github.com/nim-lang/Nim/wiki/Destructors,-2nd-edition
07:59:17FromGitter<alehander42> Araq, is this the last doc
08:00:26*laaron quit (Remote host closed the connection)
08:00:30FromGitter<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:46Araqalehander42: I'm working on an update ;-) but yes, for now.
09:02:09FromGitter<matrixbot> `cfv` I have changed my username. It was BaldEagleX02
09:05:18FromGitter<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:49FromGitter<matrixbot> `cfv` I don't think anyone is still maintaining it
09:06:54FromGitter<matrixbot> `cfv` Or going to do so
09:07:50FromGitter<matrixbot> `cfv` https://nim-lang.org/docs/lib.html
09:12:11*Trustable quit (Remote host closed the connection)
09:19:00Araqbut it should be maintained
09:19:05Araqplease update it
09:19:20Araqhttps://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:05narimiran@cfv, leorize: ...but the last issue comment was made three days ago. so it is still active.
09:31:56FromGitter<matrixbot> `cfv` Yeah, you are right but there isn't any README update
09:32:24narimiranwhat should be updated there?
09:33:27FromGitter<matrixbot> `cfv` We could create a list of needed libraries in the README
09:33:50narimiranthat's why we have issues
09:33:58narimirani don't see a problem there, to be honest
09:34:23narimiranit is much easier for people to comment on some issue than to send a PR to change readme
09:34:47FromGitter<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:22FromGitter<matrixbot> `cfv` But we still need to write something about the status of those libraries
09:35:34narimiranofftopic: 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:01FromGitter<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:27FromGitter<matrixbot> `cfv` I tried but it doesn't find the IRC room on freenode
09:36:32narimiran"we need...." is usually translated here to "somebody else, but surely not me, should do..."
09:37:35narimiranand 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:38FromGitter<matrixbot> `cfv` > <@gitter_fromirc:matrix.org> *<narimiran>* "we need...." is usually translated here to "somebody else, but surely not me, should do..." ⏎ ⏎ ☹️
09:38:25narimiranif 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:49FromGitter<dom96> cfv: look at how you come through, you're going through at least two different relays: https://irclogs.nim-lang.org
09:39:25narimirane.g. how would you "translate" https://github.com/nim-lang/needed-libraries/issues/77 to readme?
09:40:22FromGitter<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:18FromGitter<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:38FromGitter<matrixbot> `cfv` It cannot find nim on freenode
09:41:47FromGitter<matrixbot> `cfv` Only on gitter
09:44:20FromGitter<matrixbot> `cfv` I have just tried with #python and it works
09:44:40FromGitter<matrixbot> `cfv` While it cannot find #nim
09:45:59BaldEagleX02_.
09:46:53*NimBot joined #nim
09:48:10leorize[m]@cfv: the matrix room is #freenode_#nim
09:48:27leorize[m]full name #freenode_#nim:matrix.org
09:48:42leorize[m]you won't find the room in Matrix's listing, dunno why
09:48:55*cfv[m] joined #nim
09:49:00cfv[m]Thank you
09:49:51*nsf quit (Quit: WeeChat 2.4)
10:04:56dom96Nim in Action is 50% off today: bit.ly/2IYjiT5
10:05:09dom96https://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:15FromDiscord_<djazz> How much has Nim changed since it was written?
10:14:36leorizea lot :p, but most of the book is still valid
10:14:53leorizeaccording to dom96 iirc
10:16:56FromGitter<rokups> second edition when
10:21:09sammichdom96: thanks for the heads up, picked up nim & elm in action!
10:23:52dom96sammich, yay :)
10:25:26dom96djazz: 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:09FromDiscord_<djazz> 👍
10:29:32*neceve joined #nim
10:34:54*stefanos82 joined #nim
10:46:36vegai_hmm, I think I oughta buy a paper version as well...
10:47:57vegai_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:14FromDiscord_<djazz> I was reading the chapter on C interop earlier, good stuff
10:52:18FromDiscord_<Núkley> does glitterirc work in off-topic
10:52:30FromDiscord_<Núkley> it hasnt posted in around 8 months
10:56:05FromDiscord_<Marrakezh = nil> Hi
10:58:00*laaron quit (Remote host closed the connection)
10:59:21FromGitter<alehander42> ey
11:00:00FromDiscord_<Núkley> my eyesight is so bad i thought it said glitterirc
11:00:05FromDiscord_<Núkley> it says gitterirc
11:00:13*laaron joined #nim
11:00:44FromGitter<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:16noonienhello!
12:47:27noonienwhere can i read more about `import pkg/...`?
12:48:32skarutshow 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:58noonienskaruts: i believe the keyword is `notin`
12:49:24skarutsoh
12:51:34skarutsworks, thanks
12:51:55*vlad1777d__ joined #nim
13:00:17lqdev[m]noonien: in the manual, I suppose
13:00:33noonienmanual 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:22WilhelmVonWeineri guess `not x in xs` inverts x
16:46:48WilhelmVonWeiner`not (x in xs)` might work
16:46:53WilhelmVonWeinerbut 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:21FromGitter<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:39dom96Nice :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:40FromDiscord_<djazz> So, what advantages does nlvm have?
18:38:00*natrys quit (Quit: natrys)
18:38:50Araqdoes nvlm work with --newruntime?
18:39:15FromGitter<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:20FromGitter<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:24FromGitter<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:59Araqhmm 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:07Araqripping out nimvm is a nice research project but I think it's really hard
18:45:22Araqthe 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:56Araqhow can you construct NimNodes from LLVM's IR?
18:46:07FromDiscord_<djazz> Hows wasm support?
18:46:09FromGitter<arnetheduck> callbacks I guess
18:46:39FromGitter<arnetheduck> reason for doing is basically to get full ctfe and repl going
18:47:26FromGitter<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:57FromGitter<arnetheduck> djazz: https://forum.nim-lang.org/t/4779
18:50:52FromGitter<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:29FromGitter<arnetheduck> I missed reply, if any, Araq, from the other day.. wdyt of removing the nil checker completely?
18:52:13FromDiscord_<djazz> Thanks.
18:52:45FromGitter<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:25Araqarnetheduck: 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:58Araqhttps://www.pascalcoin.org/ @arnetheduck
21:06:07lqdev[m]I recall importing like this: `import mod1/[submod1, submod2/[suba, subb]]` was not possible. is this still true?
21:07:52lqdev[m]nvm, it's still impossible
21:08:06lqdev[m]that kinda sucks
21:32:16*solitudesf quit (Ping timeout: 248 seconds)
21:35:38*onionhammer quit (Ping timeout: 272 seconds)
21:36:54Araqok, 'kinda'. the good news is that most code comes *after* the lists of module imports
21:37:35lqdev[m]yeah, but it's still nicer if those could be nested.
21:46:56*dwdv quit (Quit: quit)
21:47:14FromGitter<arnetheduck> I'm still hoping for a multiline import without the ','
22:12:27FromGitter<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:58Araqit should be like "array out of bounds", it should panic. eventually
22:31:45AraqI 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:12AraqI think it's fine to produce SIGSEGVs, the error message is definitely a "quality of implementation" thing :P
22:41:30Araqalso, "let x = p[]; if p != nil: action()" can be transformed into "let x = p[]; action()"
22:42:00Araqif p is nil it dies at 'x = p[]'
22:42:18Araqso p is provably not nil after p[]
22:43:24FromGitter<arnetheduck> yes, it's hard to reason about code in the presence of sigsegs :)
22:44:30FromGitter<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:19AraqI wrote segfaults.nim
22:46:46*couven92 quit (Ping timeout: 246 seconds)
22:46:50FromGitter<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:08AraqI know
22:47:37FromGitter<arnetheduck> well, what can I say.. it's broken regardless of who wrote it :/ allocates memory -> malloc not reentrant / safe -> UB
22:48:06AraqNim's allocator doesn't use malloc
22:48:22Araqbut I'm sure it's broken in other ways
22:49:23FromGitter<arnetheduck> `s/malloc/mmap/` - equally broken
22:49:44Araqthe only thing you can do in a signal handler is set a global
22:49:55FromGitter<arnetheduck> it's broken internally in nim even, pretty sure the memory allocator is not arbitrarily reentrant
22:50:10Araqbut then we would need to poll this global all the time so *shrug*
22:50:43FromGitter<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:09Araqthat's Linux, Posix has its own ideas
22:51:31FromGitter<arnetheduck> no, that's posix actually
22:52:20FromGitter<arnetheduck> but for the purpose of this discussion, you can't setjmp, so no exceptions
22:52:21*natrys quit (Quit: natrys)
22:52:41FromGitter<arnetheduck> (in addition to the memory allocator and nims own reentrant-unsafe code)
22:58:47Araqwell the implementation doesn't try hard, if it crashes in attempting to deal with a crash ... not much is lost
23:00:00Araqanyway, the point is that nil-deref is not UB
23:00:27Araqthe compiler is allowed to leave out the check if the hardware does it instead
23:01:57Araqand 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:20Araqhttps://isc.sans.edu/diary/A+new+fascinating+Linux+kernel+vulnerability/6820
23:17:05Araq"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:05Araqince the tun NULL check does not exist, proceed with exploiting the kernel."
23:17:52Araqwell 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