<< 07-11-2018 >>

00:02:12shashlickDoubt it @zacharycarter - they might be using vms
00:03:02*chemist69 joined #nim
00:03:27FromGitter<zacharycarter> true
00:08:11shashlickWell I can check on my Windows vm once you get it working there
00:10:53FromGitter<arnetheduck> @timotheecour fact remains that a `Nim` array is a value type - can't think of it in `C`terms, comes out wrong
00:11:53FromGitter<arnetheduck> besides, you're showing the impl of a `seq` which is a different beast entirely
00:14:35FromGitter<zacharycarter> shashlick: I think I'm probably going to abandon using this lib for now so I can make progress on my game jam entry
00:14:49FromGitter<zacharycarter> but once I'm done with that I will eventually want to get it usable
00:14:59FromGitter<zacharycarter> or just port it entirely to Nim if possible
00:19:30*xet7 quit (Read error: Connection reset by peer)
00:39:10*d10n-work quit (Quit: Connection closed for inactivity)
00:42:57*citycide quit (Ping timeout: 252 seconds)
00:43:24*zachk quit (Quit: Leaving)
00:45:19*citycide joined #nim
01:00:31shashlickWhat isn't working for you right now
01:08:07*kapil____ quit (Quit: Connection closed for inactivity)
01:27:02*elrood quit (Remote host closed the connection)
01:38:18*tobbez quit (Ping timeout: 264 seconds)
01:40:42*theelous3_ quit (Ping timeout: 268 seconds)
01:44:30*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:55:41*tobbez joined #nim
02:06:03FromGitter<zacharycarter> shashlick: it's putting together a CI pipeline that will accommodate all the platforms I'm going to need to build this game for
02:06:05FromGitter<zacharycarter> for that library
02:08:41FromGitter<zacharycarter> I'll need to build for windows and probably linuux
02:09:26FromGitter<zacharycarter> I'm on osx - all those advanced instruction sets and varying compiler support make the prospect of building something in time, a scary onee
02:28:47*jjido quit (Ping timeout: 240 seconds)
02:44:11*Aareon_ quit (Ping timeout: 260 seconds)
02:45:46*Aareon_ joined #nim
03:05:21*banc quit (Quit: ZNC - http://znc.in)
03:05:36shashlickwell i can help build when you need - i have both
03:20:48*banc joined #nim
03:25:03FromGitter<zacharycarter> thanks - I appreciate it. hopefully Ill end up having time to optimize
03:31:46*endragor joined #nim
04:41:26*chemist69 quit (Ping timeout: 260 seconds)
04:42:15*chemist69 joined #nim
04:47:46*Pisuke joined #nim
04:48:36*MyMind quit (Ping timeout: 252 seconds)
05:02:21*chemist69 quit (Ping timeout: 252 seconds)
05:04:28*chemist69 joined #nim
05:17:03*dddddd quit (Remote host closed the connection)
05:28:24*nsf joined #nim
05:35:00*kapil____ joined #nim
06:12:41*itschin joined #nim
06:38:29*darithorn quit ()
07:06:17*krux02 joined #nim
07:19:19*Yardanico quit (Quit: Quitting)
07:31:49FromGitter<alehander42> Araq, what do you think about swift's ownership plans https://forums.swift.org/t/sil-ownership-model-proposal-refreshed/16872 (not sure if this is the most relevant link, but I just found they have such plans)
07:35:05FromGitter<narimiran> wow, my (six months old) article about python vs numpy vs nim has just been published in pycoder's weekly newsletter!
07:35:42Araqnarimiran: nice :-)
07:37:16FromGitter<narimiran> i have no idea how and why did somebody notice it just now.... but i don't mind :)
07:40:48*NimBot joined #nim
07:41:20Araqalehander42: I don't understand it well enough to have an opinion about it
07:42:29FromGitter<gogolxdong> Anyone work on QUIC ?
07:53:31*PMunch joined #nim
08:06:09FromGitter<alehander42> Araq, me too, haha
08:07:22FromGitter<alehander42> btw what do you think about generational gc-s ? I was reading about the "young objects are collected much often than older ones" theory and I wondered if there is such an assumption in some of the nim gc
08:07:55FromGitter<xmonader> @kdheepak still suffering with openssl 1.1 on mac https://pastebin.com/raw/aft2paAw
08:10:18Araqgenerational GCs are nice but the occasional "full collection" means they have no benefit for realtime guarantees
08:11:25*vlad1777d quit (Ping timeout: 244 seconds)
08:17:23*floppydh joined #nim
08:18:32*xet7 joined #nim
08:20:28*chemist69 quit (Ping timeout: 250 seconds)
08:21:01*xet7 quit (Client Quit)
08:21:24*xet7 joined #nim
08:21:36itschinis it that the GC stops for a full collection or the time it takes?
08:21:42*chemist69 joined #nim
08:27:20livcdoh the pics from this article are gone : http://bootstrap.me.uk/programming-languages/2017/07/09/nim-for-the-discerning-rubyist.html. Anyone has them ?
08:33:15PMunchThe wayback machine has a couple of them: https://web.archive.org/web/20180905055951/http://bootstrap.me.uk/programming-languages/2017/07/09/nim-for-the-discerning-rubyist.html
08:36:36PMunchAnd some of the scripts he for some reason decided to make images out of can probably be found on his GitLab page here: https://gitlab.com/users/RedFred7/snippets
08:38:22Araqitschin: depends on the implementation. for a good implementation it's mostly "CPU cycles spent"/power consumption
08:39:08*vlad1777d joined #nim
08:39:44*citycide quit (Remote host closed the connection)
08:39:58*citycide joined #nim
08:40:52itschinAraq: https://wiki.openjdk.java.net/display/zgc/Main
08:40:57itschincan you scale things like this down?
08:43:11itschinspeaking generally, wondering if good things need economy of scale
08:44:29Araq"scale things down" -- to what. it will never run with e.g. 4MB of RAM
08:46:45Araqthat doesn't make it a bad piece of technology, ofc
08:50:08*vlad1777d_ joined #nim
08:54:13*vlad1777d quit (Ping timeout: 268 seconds)
09:21:26FromGitter<narimiran> Araq: i see that the test for version-0-19 branch are now passing. do we backport some more (e.g. your yesterday's nimscript fix), or is 0.19.2 release nearby?
09:29:32Araqwell we can release 0.19.2 anytime, but automated builds would be nice
10:00:16FromGitter<xmonader> ok i opened an issue no idea how to proceed https://github.com/nim-lang/Nim/issues/9641
10:05:02*craigger_ joined #nim
10:06:38*craigger quit (Ping timeout: 244 seconds)
10:11:48*voiceftp quit (Ping timeout: 244 seconds)
10:12:55*voiceftp joined #nim
10:18:47*dom96_w joined #nim
10:43:29FromGitter<xmonader> @Araq are you using openssl 1.1.1 ?
10:44:43Araqdunno, how to find out?
10:46:15FromGitter<xmonader> openssl version
10:56:06livcdPMunch: thanks. Did not think about archive
10:56:37FromGitter<xmonader> how do i know the exact libraries version linked against in mac ? in case my passL is just wrong or ignored ?
10:57:14FromGitter<mratsim> ldd
10:57:53FromGitter<mratsim> ah no, otool -L
10:58:13FromGitter<mratsim> but Nim doesn’t link, it dlopens
10:58:56FromGitter<xmonader> @mratsim i see it only shows ``` otool -L zos ⏎ zos: ⏎ /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1) ⏎ MacBookPro:zos codescalers$ otool --help ⏎ ... [https://gitter.im/nim-lang/Nim?at=5be2c56fbb06d73a9937b039]
10:59:09FromGitter<xmonader> is there away to see the exact version opened in dlopens in nim?
11:00:38*jjido joined #nim
11:02:06FromGitter<mratsim> no idea :/
11:10:40Araqstrace it if osx has one
11:13:12jjidodtrace
11:14:54FromGitter<xmonader> yeah i'm searching how to use it .. only used ltrace and strace
11:16:25leorizeyou could just use `--dynlibOverrideAll` and use normal linking...
11:20:52FromGitter<xmonader> @leorize i get that https://pastebin.com/u6W1uRhh do i need to add the explicit paths again?
11:22:09FromGitter<xmonader> also with explicit paths ⏎ https://pastebin.com/PDV4Szwr
11:30:10*Vladar joined #nim
11:43:56*theelous3 joined #nim
11:54:18FromGitter<xmonader> @Araq I added dtruss logs too ⏎ https://github.com/nim-lang/Nim/issues/9641
12:11:27PMunchHmm, is there a way to pass a name, list of arguments, and body to a template?
12:12:31PMunchBasically what I want to do is this: http://ix.io/1rdW/Nim
12:16:19*jjido quit (Ping timeout: 244 seconds)
12:44:49*Snircle joined #nim
12:53:46*nsf quit (Quit: WeeChat 2.3)
12:57:28leorizexmonader: `--dynlibOverrideAll` just disable them
12:57:35leorizeit doesn't pass any link flags
12:57:40leorizeso you'd have to do so yourself
12:58:09FromGitter<xmonader> @leorize yeah i figured i passed the flags too https://pastebin.com/PDV4Szwr
12:59:56leorizeI mean you'd have to pass the respective `-l`
13:00:16leorizein this case `-lssl -lcrypto -lpcre`
13:06:41FromGitter<kaushalmodi> Araq: May be I didn't understand the nightly build requirements entirely
13:06:57FromGitter<kaushalmodi> We now already have the nightly releases
13:07:12FromGitter<kaushalmodi> User just needs to download those and build locally
13:07:53FromGitter<kaushalmodi> What is missing (apart from creating the archive on Windows and getting koch testinstall to pass)
13:08:17FromGitter<kaushalmodi> A windows user can extract the Linux or os built release and build Nim locally right now.
13:09:28FromGitter<kaushalmodi> Also, I wouldn't be able to be much active here for the coming month; work load + long vacation
13:11:13FromGitter<kaushalmodi> livcd: interestingly I ended up on that missing pics blog earlier today, and emailed the author about that issue. So hopefully he fixes them soon.
13:13:42Araqkaushalmodi: I broke nightlies
13:17:48*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:21:01FromGitter<kaushalmodi> Hmm, let me see if I find time today. Travis debugs are huge time sinks.
13:21:42livcdkaushalmodi: doh i really dislike that irssi wont highlight me if you msg me via this gitter bridge :/
13:48:35*platoff joined #nim
13:56:38FromGitter<xmonader> @leorize you're the man thanks
14:00:38shashlick@kaushalmodi that's what I'm doing on Travis but it will be nice to have binaries rather than source
14:01:32*itschin left #nim ("Leaving")
14:01:56leorizelivcd: use weechat :)
14:05:37FromGitter<kaushalmodi> shashlick: I won't have time to go down the binary generation route any time soon.
14:06:22*endragor quit (Remote host closed the connection)
14:06:48*endragor joined #nim
14:11:44*endragor quit (Ping timeout: 276 seconds)
14:12:41*dddddd joined #nim
14:20:16*endragor joined #nim
14:24:49*couven92 quit (Read error: Connection reset by peer)
14:25:00*endragor quit (Ping timeout: 252 seconds)
14:27:10*dddddd quit (Remote host closed the connection)
14:45:26*platoff quit (Read error: Connection reset by peer)
14:49:04*platoff joined #nim
14:49:57*Aareon_ quit (Ping timeout: 252 seconds)
14:50:55PMunchAnyone knows how I can pass an argument list to a template?
14:53:44*Aareon_ joined #nim
14:55:54FromGitter<alehander42> what do u mean by arg list
14:56:22PMunchBasically I want to do this: http://ix.io/1rdW/Nim
14:56:47FromGitter<alehander42> ahhh
14:56:55FromGitter<alehander42> I am not sure if this is easily possible
14:56:56PMunchHave a template that creates a proc which has some common functionality, but which takes different arguments, and has a different main body
14:58:38FromGitter<alehander42> it doesn't work with "`arguments`" ?
14:58:45FromGitter<alehander42> ugh ``
15:01:06PMunchBut how would I call it`
15:01:08PMunch?
15:04:37FromGitter<alehander42> I just wonder if quoting arguments would somehow make it valid
15:05:38Araquse a macro
15:21:43FromGitter<kdheepak> @xmonader you may have already done this, but I'm curious if you get the same error if you try it without `--dynlibOverride:ssl`?
15:24:01*kapil____ quit (Quit: Connection closed for inactivity)
15:50:44*citycide quit (Ping timeout: 244 seconds)
15:51:18*citycide joined #nim
16:02:17*narimiran joined #nim
16:05:12*floppydh quit (Quit: WeeChat 2.3)
16:16:31*darithorn joined #nim
16:46:01*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:47:20*dom96_w joined #nim
17:01:39*dom96_w quit (Read error: Connection reset by peer)
17:12:04*platoff quit (Read error: Connection reset by peer)
17:30:18xacehttps://pastebin.com/EAxpUyZf can someone explain how i can get line 15 to accept the arrays by reference?
17:32:20Araqleave out the ': var' part
17:32:30xaceAraq: will it implicitly conver it to a ref type?
17:32:48Araqno, Nim doesn't copy parameters unless that is faster
17:33:01Araqconceptually everything is passed as 'const &' in C++ terms
17:33:13Araq(unless it would be faster by copy)
17:33:33*vlad1777d_ quit (Ping timeout: 244 seconds)
17:36:08*endragor joined #nim
17:36:26xaceAraq: Alright I'll interpret it as: when I send immutable objects to procedures, it may be sent as a `const &` if its faster than copy.
17:37:38xaceSecond question: In my example, does this also mean I have to change the arrays into seq[] ? as it is now it wont accept a array[2,string] vs array[3,string]
17:38:28narimiranxace: `openArray` to the rescue
17:43:53xacenarimiran: found openArray in the manual but cant figure out how to initialize it, and the link to the Source doesnt point to the type definition afaik
17:44:35xaceconst example: openArray[string] = {"a","b","c"} #doesn't compile
17:44:55narimiranxace: you use openarray only as a parameter in your function. it is basically shorthand for "i don't care if you give me seq, array or even string"
17:45:28narimiranso your `const example` remains defined as array
17:46:01narimiranbut your proc is now: `proc extIsMedia(extension: string,filter: openArray[string]): bool`
17:46:08xacenarimiran: wow, i would've never figured that one out
17:46:20narimiranxace: that's why we're here ;)
17:46:35xaceso openArray[] is meant for procedure parameters?
17:46:47narimiranyes
17:46:50xaceas a common way to wrap generics arrays/sequence?
17:48:21*endragor quit (Remote host closed the connection)
17:50:17xaceyeah, seems like it after re-reading the manual
17:50:51*endragor joined #nim
17:51:54*endragor quit (Remote host closed the connection)
17:55:07*wildlander joined #nim
18:00:32*jjido joined #nim
18:04:24*Vladar quit (Remote host closed the connection)
18:05:44*Vladar joined #nim
18:07:02*theelous3 quit (Ping timeout: 276 seconds)
18:10:00*nsf joined #nim
18:14:36*jjido quit (Ping timeout: 260 seconds)
18:18:25*zachk joined #nim
18:19:25*zachk quit (Read error: Connection reset by peer)
18:19:47*zachk joined #nim
18:23:15*zachk quit (Changing host)
18:23:15*zachk joined #nim
18:25:21*rnrwashere joined #nim
18:26:25*theelous3_ joined #nim
18:27:33*rnrwashere quit (Client Quit)
18:34:51*jjido joined #nim
18:42:01*rlr quit (Quit: quitting)
18:51:50*Vladar quit (Remote host closed the connection)
18:53:47*rlr joined #nim
18:53:48*jlhouchin joined #nim
19:05:43*Aareon_ quit (Quit: Quit)
19:06:49martin1_PMunch: I was trying nimlsp out and I can't get past the time outs.. running it debug mode shows results for completions (for example) and they are found quite fast, but still the client isn't able to show them and times out.. any ideas? maybe it's some parsing issue or something?
19:08:18PMunchHmm, that sounds strange
19:08:22PMunchWhat client are you using?
19:08:53martin1_I'm on neovim, so I'm using LanguageClient-neovim
19:09:54*jjido quit (Read error: Connection reset by peer)
19:09:58FromGitter<xmonader> @kdheepak I believe it failed because it'll also need to override libcrypto
19:10:11PMunchHmm, so far I've only tried it with Sublime
19:10:18PMunchJust to not bork up Vim :P
19:12:20PMunchMaybe it's missing a newline or something..
19:12:36PMunchWhich Sublime just ignores
19:12:39PMunchI'll look into it
19:20:07*PMunch quit (Quit: Leaving)
19:32:10martin1_it definitely is an issue with the deserializing, the error seems to be coming from serde_json, which is used by LanguageClient-neovim, it isn't really a useful error, but what I get is "expected ident a line 1 column 2", I'll try to dig deeper and see if I find something
19:50:22*smt joined #nim
19:51:29*dddddd joined #nim
19:57:55FromGitter<Varriount> xace: openarray is also used to pass slices of strings/sequences/arrays via toOpenAray
19:58:55FromGitter<kayabaNerve> If my program is completely async, and I want to run every 10 seconds, I should call X (without using await) and have that proc call asyncSleep(10000), right?
19:59:20FromGitter<kayabaNerve> (while true: asyncSleep 10 secs; do stuff)
20:01:30Araqsounds about right
20:04:34FromGitter<kayabaNerve> Yep. Thanks.
20:07:42FromGitter<arnetheduck> @krux02 https://github.com/nim-lang/Nim/pull/9635 passes now, in case you feel like doing a quick merge
20:08:25krux02done
20:08:29FromGitter<arnetheduck> gracias
20:09:16krux02thank you! I like when cruft is removed.
20:10:26FromGitter<arnetheduck> there's one refactoring idea from `nlvm` I've been thinking about porting over to `nim` as well - for every node type, there's basically a `proc` handling it.. in `nlvm` I've consistently named them after the node they handle which makes for some nice grepping (ie `nkSym` is processed by `genNodeSym`) - likewise for magics.. this would be really nice to see in the c/js backends as well
20:12:47FromGitter<arnetheduck> that - and join ccgexprs/ccgstmts.nim - they're used as includes anyway, and since the expr/stmt difference was mostly refactored away at some point, it would make finding stuff slightly easier, I believe
20:20:17Araqif we do that we can also replace the 'case' statement with a macro :P
20:21:44*avsej quit (Quit: Quit)
20:21:56*avsej joined #nim
20:21:56*avsej quit (Changing host)
20:21:56*avsej joined #nim
20:24:04FromGitter<arnetheduck> can and should are different beasts :)
20:27:33Araqit's called "DRY" and "automation"
20:29:28FromGitter<arnetheduck> "rube goldberg" comes to mind - there's also the downside of not being able to grep for where stuff is being called from which leaves a bad taste
20:29:46FromGitter<arnetheduck> (once you start getting too clever)
20:31:57FromGitter<arnetheduck> btw, I was under the impression that `func` and `proc nosideeffects` should be equivalent - not so it seems - wrote a little`sed` script that does the transformation, but it results in weird overload resolution issues.. ideas?
20:32:45FromGitter<arnetheduck> ie running it on `system.nim` breaks a fair bit of stuff, even if it shouldn't
20:34:48FromGitter<arnetheduck> .. which would be a way to move forwards with https://github.com/nim-lang/Nim/pull/9029 - seems kind of weird to introduce a feature that saves typing and makes the language safer and easier to reason about, and then *not* use it in the std lib
20:35:09Araq"how to grep for it" is my approach how to do language design
20:35:13Araq*is not
20:36:38FromGitter<arnetheduck> nonetheless, text is king, as they say, and the fewer custom tools needed, the easier it is to jump into getting stuff done
20:37:36Araqas for your question, I don't know, maybe 'sed' is as terrible as I always thought it to be
20:38:39FromGitter<arnetheduck> in this case it's pretty accurate actually, which is why I was surprised
20:39:24Araq"and then *not* use it in the std lib" well the existing codebase doesn't use it and some scream "consistency" all day long
20:39:51krux02Araq: sed is the tool to go if you want to change the licese information in all source files of a project. I've done it. But sure it's not really for data that isn't text.
20:40:36Araqreally? can sed do --confirm? no? they I stick with nimgrep, thank you very much
20:41:25Araq*then
20:43:36FromGitter<arnetheduck> sed or not aside, the errors I get are all around overload resolution and the like, it seems.. ie if forward declaration and implementation don't match, or if there are several overloads where some are proc and some are func, it all breaks down
20:44:12Araqwell if they don't match, you have 2 procs instead of one
20:45:21FromGitter<arnetheduck> well.. not really:
20:46:08FromGitter<arnetheduck> ```code paste, see link``` ⏎ ⏎ if the first equalmem is turned into a `func`, this breaks [https://gitter.im/nim-lang/Nim?at=5be34f10bb06d73a993b6409]
20:46:23Araqprocfind.nim, line 70
20:47:02Araqthe algorithm isn't aware of skFunc == skProc for forwarding detection
20:47:07Araqso you need to be consistent
20:47:39FromGitter<arnetheduck> yeah, but the same happens for overload resolution.. ie `$` or `==` break as well
20:47:43*surma__ quit (Ping timeout: 252 seconds)
20:47:43*euantor quit (Ping timeout: 252 seconds)
20:47:58*zielmicha__ quit (Read error: Connection reset by peer)
20:48:16*sz0 quit (Ping timeout: 252 seconds)
20:48:16*r4vi quit (Ping timeout: 252 seconds)
20:48:16*fowl quit (Ping timeout: 252 seconds)
20:48:25*mids joined #nim
20:48:40*federico3 quit (Remote host closed the connection)
20:48:58*zielmicha__ joined #nim
20:49:11*euantor joined #nim
20:49:15*surma__ joined #nim
20:49:15*r4vi joined #nim
20:49:17*fowl joined #nim
20:49:31FromGitter<arnetheduck> so basically what you're saying is that they're not equivalent
20:49:49*federico3 joined #nim
20:49:51*sz0 joined #nim
20:50:06*nsf quit (Quit: WeeChat 2.3)
20:50:27*couven92 joined #nim
20:50:54martin1_PMunch: found the issue! really simple solution, submitted a PR!
20:52:12FromGitter<arnetheduck> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5be3507cf1b87534048e6d40]
20:53:02FromGitter<arnetheduck> this should print `f ` twice (because `proc x` has side effects, potentially)
20:53:42FromGitter<arnetheduck> or it should give an error, depending on when overload resolution happens
20:56:01Araqthat's not what the spec says
20:56:59Araqdebugecho is not a side-effect and for procs the .noSideEffect is inferred, hence your example compiles
20:58:12FromGitter<arnetheduck> oh, it's inferred? that's.. unexpected.
21:11:53FromGitter<arnetheduck> it also seems.. inconsistent.. ie after fixing a few of those proc/func definition / declarations so they all become func, I now get ```
21:12:16FromGitter<arnetheduck> ```lib/pure/strutils.nim(798, 6) Error: 'split' can have side effects```
21:13:07*narimiran quit (Remote host closed the connection)
21:13:21benjikunDoes anyone here have any suggestions about what I should add to https://github.com/ijneb/nimetry
21:14:37*martin1__ joined #nim
21:17:08*martin1__ quit (Client Quit)
21:19:34FromGitter<arnetheduck> the inferring is weird.. it basically means that in a `func` I can call bunch of procs that someone explicitly declared as having side effects (by choosing to use the `proc` keyword over `func`), then have my code break when they change the implementation (!)
21:20:27Araqyes (!), that is true for all inferred effects.
21:26:07Araq'func' is what the community wanted :-)
21:26:31krux02I like func
21:26:43krux02but I don't use it
21:26:48krux02I like to know that it exists
21:27:27AraqI would throw away Nim's effect system, but I have said it before and not many agree with me
21:28:01benjikunWhat do you guys mean when you say `effects`
21:28:10krux02side effect checking
21:28:50FromGitter<arnetheduck> hm. that significantly decreases the "power" of func however. sad.
21:29:31*kapil____ joined #nim
21:32:04FromGitter<arnetheduck> `func`, `let`, `discard` etc - all these are features that promote good defaults and limit the surface area of things that can go wrong.. I like that nim has escape hatches that allow each of these to be avoided, but they're also tools that tremendously help when optimizing for maintainability and refactoring, which is why I'm sad
21:32:33benjikunSo using func is just generally more performant?
21:32:37Araqwell write an RFC, we can turn .noSideEffect into "Not inferred" or something
21:33:12Araqbut not inferring things comes with its own problems, like the well-known ripple effects
21:33:21krux02benjikun, no it's not
21:33:54krux02func is just activating nim to check that you don't get side effects. Side effect free code is generally more maintainable.
21:34:00krux02but not faster
21:34:08benjikunoh, I see
21:34:12benjikunty
21:34:48FromGitter<arnetheduck> benjikun, depends how you look at it.. it's a semantic difference - that said, the compiler can sometimes use that knowledge in optimizations
21:35:14benjikuninteresting
21:35:26Demos[m]well if the compiler can use it in optimization it could before adding the func / {.noSideEffects.} annotation, since it's checked anyways
21:36:28Araqthat's true but IMO if you wanna optimize, give the compiler an optimizer, don't introduce cargo-cultish programming language features
21:37:38FromGitter<arnetheduck> krux02, well, there are several optimizations that are safe only in a side-effect-free world.. ie loop hoisting etc, and `func` could potentially convey that meaning in places where it cannot be inferred (shared libs? importc?)
21:38:19benjikunAraq: So you're against the func keyword?
21:38:38FromGitter<arnetheduck> so I see pragmas mostly as a feature for the latter case - ie when the compiler cannot possibly know and you want to pass it a hint.. whereas func vs proc is about telling your fellow programmer a story
21:39:11Araqbenjikun: yeah but I'm in a minority
21:39:45benjikunhm
21:40:03Araqand it is sexy, so ... we have no choice but to make it work well
21:40:33Araqwell we'll see.
21:41:31Araqone easy solution: func can only call 'func', proc with inferred .noSideEffect doesn't count
21:41:54Araqbut then you have to patch the whole stdlib as arnetheduck is trying to do
21:47:01FromGitter<arnetheduck> araq, that's how I thought it worked ;) well, func can call func or explicitly annotated proc
21:55:14*martin1__ joined #nim
21:58:37*martin1_1 joined #nim
22:01:07*martin1__ quit (Ping timeout: 240 seconds)
22:06:15FromGitter<rayman22201> @araq what is wrong with the effect system?
22:07:24Araqgiven its complexity, it doesn't catch enough bugs
22:07:41Araqit's a programming placebo.
22:09:05Araqsome effects are essential for Nim to work at all though, like .gcsafe
22:10:32Araqand the locking levels for compile-time deadlock prevention is an under-used/developed feature too
22:13:45FromGitter<rayman22201> I think the locking levels feature is under-used because Nim is under used for systems programming lol :-P
22:14:37FromGitter<arnetheduck> https://github.com/nim-lang/Nim/pull/9646 - not sure this is a brilliant idea right now though, will probably wreak havoc with open pull requests
22:27:31*vlad1777d_ joined #nim
22:55:57*jlhouchin quit (Quit: Leaving)
23:01:13FromGitter<tim-st> PMunch: maybe you need this for your lsp server: https://gist.github.com/tim-st/df0ce1c4b712abe7d4e2a90f0b8c78a2
23:04:53*mids quit (Quit: Connection closed for inactivity)
23:24:28*zachk quit (Remote host closed the connection)
23:24:55*zachk joined #nim
23:30:28*zachk quit (Read error: Connection reset by peer)
23:30:59*zachk joined #nim
23:43:05Araqoh lol my 'not' fix doesn't work with 'not nil'
23:51:07FromGitter<kaushalmodi> May be wrapping that not nil in parens would work?
23:57:36*smt quit (Ping timeout: 260 seconds)