00:13:28*krux02 quit (Remote host closed the connection)
00:39:14*dwdv quit (Ping timeout: 276 seconds)
00:46:42*lritter quit (Ping timeout: 252 seconds)
01:23:52*ng0 quit (Quit: Alexa, when is the end of world?)
01:30:39madpropshow do i quit from inside a try/except ?
01:31:51disruptekyou don't use try/except for control flow.
01:46:11madpropsis there a reason for that?
01:47:13madpropsjust realized it's actually possible
01:47:19madpropsi was doing something wrong on some lines above
01:48:15disruptekyeah, it's bad style, slow, and very heavy-handed.
01:48:33disruptekhard to understand what's happening where, and why.
01:49:26madpropsit's a simple check if a parseInt fails when checking arguments
01:49:55disrupteki don't recommend using exceptions, but sometimes you have no choice. this is not about that.
01:50:19disruptekthis is about using what should be exceptional conditions as normal reactive code path.
01:50:33madpropshow would you avoid exceptions when a parseInt fails?
01:50:35disruptekexceptions should be exceptional. most of the time, you should just crash.
01:50:44madpropsbut i want to display a message
01:51:08disruptekdude; it's your code, write whatever you want. that's a reasonable time to catch an exception.
01:53:16disrupteki would say that i use exceptions when i have to; ie. the code i'm working with throws an exception which, to me, isn't exceptional. if i expect it could happen and i'm prepared to write code that'll executed when it happens, then how exceptional could it be?
01:57:05FromDiscord_<exelotl> If you wanted to parse an int with error checking in a non-exceptiony way, the parseutils module has what you need
01:57:59FromDiscord_<exelotl> But tbh just use strutils.parseInt and catch the exception, unless you're really aiming for speed
02:03:23leorizelqdev[m]: :make
02:03:40leorizeor use an automated `:make` tool like neomake
02:04:18disruptekneomakes my knees throb.
02:04:27leorizeI might add nimsuggest-based linting to nim.nvim, but so far everyone is happy with :make
02:48:39FromGitter<Obround> Hey guys! How do you have a seq with multiple types? How would I make this work?: ⏎ ⏎ ```@["something", @["4", "98", "873"]]``` [https://gitter.im/nim-lang/Nim?at=5de47b879319bb5190c7c397]
02:55:25*rockcavera quit (Remote host closed the connection)
02:56:42*endragor joined #nim
03:03:43*couven92 quit (Quit: Client Disconnecting)
03:06:23FromGitter<bung87> why not using a tuple ?
03:06:59FromGitter<bung87> `("something", @["4", "98", "873"])`
03:07:24sealmoveyou could use case objects
03:40:58FromDiscord_<treeform> Obround, in nim you usually would not be doing this. Are you passing this as json to some API endpoint? This is some thing dynamic languages do a ton, like python or javascript, but not static ones.
03:46:22FromDiscord_<treeform> this is your 3 options: https://play.nim-lang.org/#ix=23lp
04:06:45*chemist69_ joined #nim
04:09:37*chemist69 quit (Ping timeout: 240 seconds)
04:47:56*nsf joined #nim
04:57:14*narimiran joined #nim
06:11:17madpropsif not mode[1] in [1, 2]
06:11:25madpropswhat's wrong here?
06:11:36madpropsmode[1] is an int, which in this case is above 2
06:11:40madpropsbut that doesn't trigger
06:11:55madpropsalso tried @[1, 2]
06:12:16FromGitter<bung87> it doest not compare value
06:12:39FromGitter<bung87> it detect same object
06:12:54madpropswhat can i do what im trying to do?
06:14:12FromGitter<bung87> read doc, I cant remenber , contains?includes? indexOf?
06:15:16madpropsoh contains yeah. was trying to do a python
06:15:25FromGitter<xflywind> notin ?
06:17:29FromGitter<bung87> the main problem is he meant to compare value, but the code trying to find same address
06:18:03madprops'notin' works
06:18:16madpropsif mode[1] notin [1, 2]:
06:19:43FromGitter<xflywind> nim use templates `notin` `isnot` different from Python
06:22:43FromGitter<bung87> hmm ,I checked it does compare value.
06:23:07FromGitter<bung87> ```if 1 notin [1, 2]: ⏎ debugEcho 1 ⏎ ⏎ if not 1 in [1, 2]: ⏎ debugEcho 1``` ⏎ ⏎ same results [https://gitter.im/nim-lang/Nim?at=5de4adca8e906a1c8d53d35f]
06:26:48FromGitter<bung87> @xflywind you maintains nim-cn.com ?
06:28:02Zevvnarimiran: you're really doing this eh. Just staring at your screen watching the clock
06:28:32FromDiscord_<Rika> hmm `nimble run` is supposed to run w/o changing anything in the path (excluding including nimble binaries itself) right?
06:28:47narimiranZevv: you would be surprised how much 6am lowers your IQ
06:29:18FromDiscord_<Rika> ive never experienced a lower in IQ at 6am, considering you cant exactly go lower than 0
06:32:25FromGitter<xflywind> @bung87 we have four , I maintain tea.nim-cn.com.
06:33:04Zevvnarimiran: im not setting my alarm clokck for this, I do it just while walking the dog and feeding the kids
06:35:21FromGitter<bung87> @xflywind ok ,I see the email group , I can remenber this id `tulayang ` I've read his nim source repo.
06:37:22FromGitter<xflywind> maybe you can join our qq group 469329878
06:39:54FromGitter<bung87> cool
06:43:33*solitudesf joined #nim
06:48:31narimiranZevv: yeah, rub it in more, thank you very much! you can do it while doing other things, while i'm struggling to properly read
06:52:38FromGitter<zacharycarter> I feel like there has to be a better way to have a localized Chinese Nim website than actually having a separate Chinese Nim website
06:53:16FromGitter<zacharycarter> I understand China blocks the org gTLD
06:54:27FromGitter<zacharycarter> but hosting an entirely separate website seems like not the right solution, since it's totally unofficial and won't necessarily host the same content as nim-lang.org
06:58:27*LargeEpsilon joined #nim
07:00:04FromDiscord_<Rika> well, whoever is managing nim-lang.org would need to host it
07:01:28FromGitter<zacharycarter> yeah - but couldn't we just have another domain pointing to the same web server that Chinese users can access?
07:02:03FromGitter<zacharycarter> and then use some internationalization / localization solution
07:07:34FromGitter<zacharycarter> @xflywind @bung87 - thoughts on ^ ?
07:10:09FromGitter<zacharycarter> also - according to: https://www.comparitech.com/privacy-security-tools/blockedinchina/
07:10:19FromGitter<zacharycarter> https://nim-lang.org is accessible in mainland China
07:11:16Zevvnarimiran: yeah, but you score above me :)
07:20:36*dddddd quit (Remote host closed the connection)
07:29:13*LargeEpsilon quit (Read error: Connection reset by peer)
07:37:35FromGitter<zacharycarter> @gogolxdong I guess I should ask your opinion as well :)
07:41:09FromGitter<xflywind> @zacharycarter many people is not good at English.i'm a student, but am still hard to understand English article. some website is too slow to visit. for example i usually can't use choosenim to update devel. The Network speed is only 2 ~ 10 kb. I even can't use curl to install choosenim in my vmware Ubuntu.
07:43:42FromGitter<zacharycarter> well - as far as the English vs Chinese thing goes - having localized website content would solve that problem
07:44:22FromGitter<zacharycarter> the latency thing is a thing - but I imagine most of the content on nim-lang.org is static, so it should be possible to host in a CDN
07:44:59FromGitter<zacharycarter> I guess if the current situation is working it's working - but it just seems extremely likely that at some point content between the sites will differ
07:49:28FromGitter<bung87> maybe just fork the forum repo and serve it on china, in case we need upstream changes
07:58:12*PMunch joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:06*lj00nal quit (Quit: ljoonal.xyz)
08:02:14*ljoonal joined #nim
08:03:52FromGitter<zacharycarter> yeah - I was thinking that the forum doesn't matter so much but the website is kind of weird to have two copies of
08:04:39*gmpreussner joined #nim
08:07:13FromGitter<xflywind> nim-forum need to click google v2 checkbook to register, so can't register in china.
08:07:37FromGitter<xflywind> checkbox
08:08:15FromGitter<gogolxdong> @zacharycarter yes, we are here. I don't mind hosting Chinese community in nim-lang.org, and it would look like just what it looks like now. We are reponsible to maintain the Chinese copy. We simply forked and translated the static content and keep updating with official webiste except some localized content like blogs.
08:10:13FromGitter<gogolxdong> Another thing @xflywind mentioned is , some components cannot be accessible from China which we cannot foresee what it will be.
08:10:27FromGitter<zacharycarter> yeah, that's true
08:11:29FromGitter<zacharycarter> well, if it's working, no real need to change I guess, was just curious as to why things were the way they are :) I guess in the future if there's a strong desire to merge the websites it's doable but maybe not so straightforward
08:17:03*njoseph quit (Ping timeout: 250 seconds)
08:31:53*floppydh joined #nim
08:45:09sealmovehow do you properly represent a type hierarchy in Nim? Since nested types are not supported?
08:46:12sealmoveI wanted `myType1.myType2` syntax instead of `myType1myType2`
08:47:04FromGitter<zacharycarter> what do you mean nested types aren't supported?
08:47:50FromGitter<zacharycarter> can you post some example of what you're trying to do? I think I'm confused by the wording of your question.
08:53:16FromGitter<bung87> you can choose using table lib
08:59:27sealmovezacharycarter: https://play.nim-lang.org/#ix=23mf
08:59:47FromDiscord_<yewpad> I just fixed Niminst (the Nim installer thingy). Geez, a lot of broken code ladies and gents
08:59:47FromDiscord_<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/650984441002590220/unknown.png
09:00:44sealmoveessentially I need something like this: https://play.nim-lang.org/#ix=23mi
09:01:47sealmovesorry the last example doesn't make sense
09:01:57FromDiscord_<yewpad> I think doing `Parser.XmlParser` like you would do it in Java sometimes, doesn't work in Nim
09:02:21*tklohna joined #nim
09:02:25sealmovebut anyway what I am trying to do is to expose an API where there are procs with the same name and you can call them on nested types
09:02:29sealmovefor example:
09:03:36sealmoveor at least mimic it
09:03:42sealmoveany ideas?
09:04:57sealmoveunfortunatelly Nim doesn'
09:05:00sealmovet have namespaces
09:05:08FromDiscord_<yewpad> Maybe create a top level proc and use generics or even unions?
09:05:50FromDiscord_<yewpad> https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/httpclient.nim#L991
09:05:54FromDiscord_<yewpad> Unions in use for HTTP client
09:06:09FromDiscord_<yewpad> Recommend generics though
09:06:56sealmoveCan I support `myType.myNestedType.myProc()` syntax with generics?
09:07:34FromDiscord_<yewpad> Just to clarify, Nim doesn't have namespaces. So `myType.myNestedType` doesn't work in general, if I'm not completely mistaken
09:08:09sealmoveyes... that's the problem
09:08:47sealmoveI don't need generics, the supposted `myType1.myNestedType.myProc()` and `myType2.myNestedType.myProc()` should do different things.
09:09:21sealmoveI think the only solution is to concatinate names, but meh...
09:10:30FromDiscord_<yewpad> What are you trying to achieve? You're apparently coming from a C++ or Java like environment/ecosystem? Do you have any real-world examples you're trying to "transform" in a way so they work in Nim?
09:13:02sealmoveI am not coming from C++ or Java. My use case is a bit complex. I have to stay compatible with this algorithm: https://doc.kaitai.io/ksy_reference.html#attribute-type
09:13:42sealmoveIn these `.ksy` files, the written can nest types like that, and I have to generate corresponding Nim types.
09:13:56sealmoveThen I have to generate procs which are consistent with the types.
09:14:09sealmovethe writter*
09:14:42sealmove(skip to the shown diagram in link)
09:17:32sealmovewell, I guess the writters of Kaitai Struct do come from a C++/Java like enviroment
09:17:44sealmoveso this is reflected in KSY syntax
09:18:09FromDiscord_<yewpad> I just tried doing something like Go's anonymous types in Nim but that doesn't work either, unfortunately
09:18:33FromDiscord_<yewpad> You might wanna hang around and wait for Araq. Maybe he can offer you a solution
09:18:53Araq Inner = object ...
09:18:57Araq Outer = object
09:19:02Araq x: Inner
09:19:36sealmoveAraq, I need proc myProc(t: typedesc[Outer.Inner])
09:20:13Araqwhy? proc myProc(t: typedesc[Inner]) works
09:20:18sealmoveso that user can write `Outer.Inner.myProc()` instead of `OuterInner.myProc()`
09:20:34Araqlet me write Inner.myProc
09:21:13sealmovethe problem is...
09:21:29sealmove`myType1.myType2` and `myType2` both exist
09:21:40sealmovethe code is generated based on a syntax where this is supported
09:21:47FromDiscord_<yewpad> (Araq: Have a look at the 'niminst' repository. I created a pull request that fixes the codebase so that it compiles again)
09:22:19Araqgimme a link please
09:22:26FromDiscord_<yewpad> https://github.com/nim-lang/niminst/pull/4
09:22:55Araqsealmove: do they *really* both exist or is there a possibility of them existing?
09:22:55sealmoveso a solution is to generate `myType1myType2` and `myType2`, but I was looking for something more elegant.
09:23:03sealmoveAraq: possibility
09:23:47sealmoveI can disallow it of course, but I want to support the official Kaitai Struct syntax...
09:24:04Araqthen I wouldn't bother, names work better when they don't have to be qualified. Proof: Every single sentence ever created by mankind.
09:24:36sealmoveso you are saying I should disallow it?
09:25:05Araqyeah or you introduce the prefix if there actually is an ambiguity otherwise
09:25:25*njoseph joined #nim
09:26:40sealmoveok, this will be a little more complex to implement, but sounds like a good idea, thanks!
09:28:48Araqyewpad: niminst is part of the Nim core btw, we should deprecate the Nimble package
09:29:35FromDiscord_<yewpad> I got some stuff to manage today but actually planned to tidy up some of Nim's old repositories. Will look into it
09:30:47*njoseph quit (Ping timeout: 268 seconds)
09:31:34PMunchHmm, when passing a literal to a procedure, why can't the procedure have that argument as a "var"?
09:32:41sealmovebecause the literal is read-only?
09:33:34PMunchBut there is no reason that it has to be..
09:34:41PMunchI mean, the idea with "var" is to make it explicit that a given value can be changed so that the caller knows. But if the caller doesn't really care enough about a value to put it in a value it's probably not something they care about.
09:36:08sealmovePMunch: if the caller doesn't care then `var` doesn't make sense, do this instead: https://play.nim-lang.org/#ix=23mq
09:36:23PMunchThe reason I was trying to do this is that I tried to port the "delay" function from Arduino, it counts down the input argument directly, which I can't do in Nim without a var parameter. And by assigning the value to a var the code grows slightly bigger
09:36:45sealmoveyou can do the assignment inside the proc
09:37:50*njoseph joined #nim
09:38:44*tklohna quit (Ping timeout: 276 seconds)
09:38:58PMunchOh wait, it was just me being dumb again I think.
09:39:48PMunchSince the "delay" procedure is used elsewhere it is of course compiled in already. So when I implemented my own version it obviously added a procedure to the code
09:40:28PMunchIf I switch between calling one call to mine and ten to the default and one call to the default and ten to mine it is actually smaller to use mine.
09:41:07AraqPMunch: you keep bringing it up and there is no technical reason Nim cannot pass a temporary location to 'var T', but I've always seen that as a C++ anti-feature with no benefit
09:41:27Araqit's like removing the 'discard' requirement from Nim, a bad idea
09:42:32Araqin fact, these two features are one and the same: be explicit when you ignore computation results
09:43:25PMunchBut we have {.discardable.} for when I write a procedure that may or may not return something interesting
09:44:05Araq1. .discardable was a bad idea IMO.
09:44:21madpropsi've come to like discard
09:44:25Araq2. we could indeed add .discardable to 'var T' parameters
09:44:34PMunchmadprops, oh yeah don't get me wrong, I like discard
09:45:17sealmove{.discardable.} is only useful for C/C++ wrapping.
09:45:17Araq"abc".add("xyz") # yay, compiles?! newcomers will be pleased
09:45:50PMunchsealmove, well there are some rare occasions where it might be useful
09:46:48PMunchAraq, hmm, yeah that would be unfortunate..
09:47:01Araqor we extend '_' for more contexts, sleep(100, _) # ok, ignore the 'var T' thing
09:47:06PMunchOh well, I figured out that it wasn't really neccesarry for this optimisation anyways :)
09:47:41PMunchWell you still need to pass a value :P
09:48:17*ng0 joined #nim
09:48:30Araqtemplate varof(x): untyped = (var y = x; y)
09:48:43Araqbut I've brought it up before
09:49:17Araqas usual it turns out Nim doesn't need more language features :P
09:49:25PMunchThis is an optimisation that threw me for a sec by the way. They have a wrapper "delayShort" in the Arduboy library that takes a uint16 instead of the unsigned long that the normal delay takes.
09:49:38PMunchEssentially just to save some bytes every time they call that procedure :P
09:51:23PMunchAraq, that didn't work by the way: http://ix.io/23mw/Nim
09:51:32PMunchOpps, ignore the /Nim there
09:54:31FromDiscord_<yewpad> No, Nim really doesn't need more language features. Please don't. Don't make the same mistake like D, squeezing every single possible language feature into it
09:56:16PMunchHmm, well that added a lot of overhead size-wise compared to `var ms = ms` (I'm guessing GCC is able to simple ignore that)
10:00:09madpropsis there a way to get around recursive imports? i have an util function in utils.nim which i wanted to use in config.nim but utils.nim imports config.nim
10:00:52AraqPMunch: Nim devel has an --asm switch to inspect the produced asm
10:01:10Zevvproduced *asm*?
10:01:28Zevvwhat did I miss
10:02:17FromDiscord_<yewpad> I plan on writing a service where you can upload your Nim code snippets, tag and share them. Nim only. The uploaded snippet will be evaluated and if the syntax doesn't match, the uploaded snippet will be rejected. Sick of uploading stuff to Github Gist etc. I maybe call it something like "nimpastr" having the domain "nimpas.tr" or so 😄
10:02:50madpropssounds cool
10:03:09AraqZevv: the C compilers support asm file generation
10:03:20Araqand via --asm Nim tells them to do that
10:03:27Zevvoh you just ask the C compiler :)
10:03:38ZevvI just found your commit yes
10:04:17FromDiscord_<yewpad> And if the thing turns out to be working without any problems, maybe I'll hand it over to Araq or so, so that it lives on in the Nim organization repository, that is, if Araq's okay with that
10:04:41FromDiscord_<yewpad> Nim organization ~repository~
10:04:47FromDiscord_<yewpad> cut out the repository thingy
10:04:48Araqsure, thanks
10:05:58FromDiscord_<yewpad> Can I evaluate Nim syntax at runtime?
10:06:24*dwdv joined #nim
10:06:40Araqimport the compiler as a package
10:07:07madpropsneed that for my pastebin service
10:07:27madpropsmaybe i'll try making a module
10:08:46Araqmadprops: not sure, why not use the playground's code?
10:09:04Araqspeaking of which ... can the playground get --asm support somehow? PMunch?
10:09:20PMunchHmm, interesting, for some reason this: http://ix.io/23mx/Nim has a size benefit over this: http://ix.io/23mz/Nim
10:09:30PMunchAraq, hmm I guess it could
10:10:34PMunchBut I need to rework the site design so that it's easier to add more buttons
10:21:10*tklohna joined #nim
10:23:14FromDiscord_<demotomohiro> --asm output in wandbox.org
10:23:15FromDiscord_<demotomohiro> https://wandbox.org/permlink/hTXq4aYogwfqC4et
10:27:53madpropsi like how easy it is to copy and share the link in the playground
10:28:08madpropsshould i have no idea what ix is
10:37:38FromDiscord_<Rika> just a paste service afaik
10:44:13FromDiscord_<mratsim> @Araq, but the compiler as library is broken due to findStdLib or what it's called :/
10:48:17Araqbroken? it's covered by tests
10:48:58Araqand you don't have to use findStdLib anyway, you can setup the paths yourself
10:58:54*Vladar joined #nim
11:10:48*leorize quit (Ping timeout: 260 seconds)
11:12:44*leorize joined #nim
11:29:01*dwdv quit (Ping timeout: 250 seconds)
11:31:25*abm joined #nim
11:32:10madpropssome improvement the playground could have is to avoid it having 2 scrollbars
11:32:13madpropsmakes scrolling harder
11:32:25madpropsi mean two | scrollbars
11:34:57*couven92 joined #nim
11:41:53FromDiscord_<Kurolox> I've been banging my head for a while now trying to figure out how to map a function to an array
11:42:34FromDiscord_<Kurolox> I'm trying to cast a string array to ints, so I'm trying something like this:
11:43:32FromDiscord_<Kurolox> map(["0", "32", "398"], int)
11:43:39*shashlick[m] quit (*.net *.split)
11:43:39*macsek1911[m] quit (*.net *.split)
11:43:39*meff[m] quit (*.net *.split)
11:43:39*LEdoian[m] quit (*.net *.split)
11:44:27FromDiscord_<Kurolox> I'm getting an error, though. It says that it was expecting something of type {.closure.} and it got an int
11:44:35FromDiscord_<Kurolox> how could I do what I'm trying to do here?
11:45:05solitudesfyou're supposed to pass a procedure
11:45:12solitudesfparseInt from strutils
11:45:45solitudesfint is not a function
11:47:03stefantalpalaruHow do I use the `except ExceptionType as e` syntax with multiple matching types?
11:47:21*rockcavera joined #nim
11:47:59*NimBot joined #nim
11:48:10FromDiscord_<Kurolox> isn't the function int() a type conversion, though?
11:48:13FromDiscord_<Kurolox> I've used it before
11:48:55FromDiscord_<Solitude> ints not a function
11:49:02FromDiscord_<Solitude> *its
11:49:10FromDiscord_<Kurolox> then what it is?
11:49:14*meff[m] joined #nim
11:49:14*macsek1911[m] joined #nim
11:49:14*shashlick[m] joined #nim
11:49:14*LEdoian[m] joined #nim
11:49:16*deepend quit (*.net *.split)
11:49:25FromDiscord_<Solitude> its a type
11:49:36FromDiscord_<Kurolox> no, I'm not explaining myself correctly
11:49:56FromDiscord_<Kurolox> int is a type, but according to the documentation you can cast stuff to int using the int() function as follows
11:50:00FromDiscord_<Kurolox> int(5.0 / 3)
11:50:17Araqthat doesn't turn it into a function though
11:50:22FromDiscord_<Solitude> its not a function, that just how type conversion to builtin types looks
11:50:23Araqyou're better off with 'mapIt'
11:50:27FromDiscord_<Solitude> and its not a cast
11:50:55FromDiscord_<Kurolox> so why it can't be mapped?
11:51:09FromDiscord_<Kurolox> even if it's not a function, it seems to behave like one
11:53:34FromDiscord_<Solitude> it doesnt behave like one. its just type conversion syntax looks the same.
11:53:54FromDiscord_<Solitude> you still have to use parseInt anyway
11:55:08*deepend joined #nim
11:55:12FromDiscord_<demotomohiro> !eval echo int("123")
11:55:14NimBotCompile failed: /usercode/in.nim(1, 9) Error: type mismatch: got <string> but expected 'int'
11:56:40FromDiscord_<Kurolox> fair enough
12:15:37FromDiscord_<mratsim> @araq how do I setup path on a user system then?
12:17:09Araq var intr = createInterpreter("myscript.nim", ["path here"])
12:20:06*dwdv joined #nim
12:20:22PMunch!eval import strutils; echo parseInt("123")
12:20:25FromDiscord_<mratsim> so how do I find that the Nim stdlib was installed in "/ooh/this/is/a/weird/path/lib/system/pure"
12:20:38PMunchdemotomohiro ^
12:21:15PMunchOh wait, you were talking about this earlier :P
12:21:33PMunchmadprops, two scrollbars?
12:29:18Araqhow am I supposed to know? ship your own stdlib that actually works with the compiler that you also ship
12:45:08*clyybber joined #nim
12:47:55FromDiscord_<onelivesleft> After a final refactor, my command line parser package works in 1.0.2 again, so I guess it's usable. It lets you parse the command line without putting in any effort. If you're building a complex command line tool then you probably want `docopt` or something similar, but if you just want to add some parameters this should useful. https://nimble.directory/pkg/simpleparseopt
13:05:58lqdev[m]@mratsim just compile a piece of code and see where nim.cfg is
13:21:07*endragor quit (Remote host closed the connection)
13:25:10FromDiscord_<mratsim> The goal is to embed the Nim compiler a bit like Lua scripting
13:32:03FromGitter<dawkot> Is it idiomatic to use `quote` instead of building NimNode trees manually whenever possible?
13:32:47PMunchWell, there is a middle ground somewhere
13:33:21FromDiscord_<Rika> i think it really depends on the programmer
13:33:35PMunchBut yeah I think using quote as long as you don't need to build the AST manually to get it right is preferable for readability reasons
13:43:17*solitudesf quit (Ping timeout: 240 seconds)
13:43:25sealmovequote works in templates where you NimNodes are not exposed
13:44:01sealmoveand it's preferable to use template instead of macro where possible
13:49:30*Kaivo joined #nim
13:56:00*drewr joined #nim
13:58:08*sideshow joined #nim
13:58:20*sideshow quit (Remote host closed the connection)
14:03:25*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
14:07:25*lritter joined #nim
14:07:26*drewr joined #nim
14:13:41FromGitter<alehander92> yewpad why only nim, make it work with many languages
14:14:03FromGitter<alehander92> i like multi-language services :P
14:16:15*solitudesf joined #nim
14:19:50Araqyeah nothing beats a loooong dropdown list, always results in nice usability
14:21:36disruptekwell, make sure there's no way to index it.
14:22:15disruptekalso be sure to constrain its use by input device.
14:36:34livcdIs there a repo for nimble.directory ?
14:40:30*shadowbane joined #nim
14:48:48disruptekany opinions on how to name lockfile write/read save/load freeze/thaw?
14:49:13FromGitter<Willyboar> freeze is cool :P
14:52:21clyybberfreeze/thaw +1
14:55:56PMunchlock/unlock might be the obvious one?
14:56:25*endragor joined #nim
15:00:18*PMunch quit (Quit: Leaving)
15:00:25*endragor quit (Remote host closed the connection)
15:01:30lqdev[m]livcd: yes, https://github.com/FedericoCeratto/nim-package-directory
15:01:54Araqdisruptek: 'pin'
15:02:14disruptekand, what, unpin?
15:13:32sealmovehow to do `x = someIntSeq + someInt`?
15:13:54sealmove(create a new seq instead of mutating)
15:15:20clyybberx = someIntSeq & someInt
15:15:59clyybbermaybe you have to do `[someInt]` or `@[someInt]`
15:18:21Araq'unpin', what else
15:18:33Araqbut maybe I imagine English to work in ways it doesn't
15:22:42disruptekno, i think i was just being obtuse. maybe it's more obvious than i thought.
15:24:11sealmoveclyybber: oh `&` is not just for strings?
15:24:31disruptekevery time i look at this lockfile problem it looks more trivial. i must be missing something.
15:25:05disruptek!search locking of dependencies
15:25:06disbot12https://github.com/nim-lang/nimble/issues/127 -- 3Locking of dependencies 🧠11dom96
15:25:18clyybbersealmove: Nope, its for seqs too
15:25:20disruptekis there a different issue i'm supposed to be looking at?
15:25:56clyybbersealmove: And I just checked you can really do `x = someIntSeq + someInt`
15:26:42clyybberYou can even do `x = someInt & someIntSeq` to prepend
15:27:18sealmovebut does this return a newly allocated seq?
15:27:28sealmoveit seems to be an alias of "add"
15:27:57Araqdisruptek: it is quite easy if your initial design is a good one
15:28:07clyybbersealmove: Yes it does.
15:29:28disrupteklet me ask you this... should we bother supporting locks against nimble packages that aren't git repositories?
15:29:56disruptekie. packages that are missing contents such as docs, tests, and are opaque with respect to validating the contents?
15:30:55disrupteki mean, i can support them in a deprecated fashion. i just think it's kinda dumb.
15:31:32Araqwell Nimble support both, git and freddie mercury
15:31:50disruptekyeah, i'm not supporting freddie.
15:32:10disruptekthere are something like 11 merc packages among 1100 git.
15:32:55disrupteknow, if someone wants to wrap a merc lib for me, perhaps i will write a proper vcs abstraction.
15:33:02Araqalso support SQlgite please
15:33:09disruptekthe one i'm writing for git is a total pos hack.
15:33:21disrupteksqlite for what?
15:33:57AraqI mean fossil
15:34:22disrupteki dunno what that is.
15:34:47Araqflat earther detected
15:34:52disruptek!repo fossil
15:34:53disbot12https://github.com/jaccarmac/nimikanren -- 9nimikanren: 11This repository is obsolete. Please visit the Fossil version hosted on Chisel for a more recent version. 15 0⭐ 0🍴
15:35:21Araqok, I suppose nobody understands my jokes, so....
15:35:26clyybberdisruptek: fossil is like git or hg but with issue tracking and stuff
15:35:54disruptekwhy would we support that?
15:36:05clyybberAraq: Who says a flat earth cant contain fossils :p
15:36:42disruptekyou have to move nim to fossil before i'll support it.
15:36:43clyybberdisruptek: I don't think so. But supporting mercurial might be a good idea
15:36:55disruptekwell, submit a PR.
15:37:04clyybberask disbot
15:37:29clyybberdisruptek: I mean, its a good idea. Not that we should do it unless somebody actually needs it :p
15:37:30disruptekdisbot: should we ignore mercurial in favor of git, which /everyone/ uses?
15:37:31disbotyep. 😊
15:37:40Araqdisruptek: can't but I like its design more than git's
15:38:20Araqdisbot: are you a human being?
15:38:37disruptekdisbot: ignore Araq.
15:38:38disboton it. 👍
15:38:57clyybberhgs is certainly easier to grok than git IMO
15:39:14*nsf quit (Quit: WeeChat 2.6)
15:39:22disrupteki agree that tooling should support the workflow of the developer.
15:39:26clyybbers/hgs/hgs cli
15:39:36disruptekshow me some developers using hg and fossil and we can talk about it.
15:39:55clyybberfossil hosts software fossils mainly
15:40:36disruptekoh, like old greyhairs?
15:41:54clyybberalso if you want to move or rename a file inside a fossil repo you have to do `fossil mv`/`fossil rename`
15:42:24disruptekthat's amazing. 🤯
15:43:45Araqwhat? 'git mv' is the same
15:43:54disruptekjust /s
15:44:03clyybberAraq: git autodetects moves ideally
15:44:41disruptekdisbot: obey Araq.
15:44:42disboton it. 👍
15:44:47Araqmaybe. I simply use 'git mv' and accept file system operations all have to be mediated
15:45:48Araqdisbot: ignore disruptek
15:46:01clyybberif bitbucket weren't shit I'd use mercurial
15:46:03Araqyour bot hates me
15:48:35disrupteki gave araq the fork.
15:48:48FromGitter<matrixbot> `archibaldt` mention of fossil just caught my eye... I use it all the time and build distributed processing and IoT data collection systems with it (after git critically/unrecoverably failed for me)
15:49:14disruptekcan you thumbnail that failure?
15:49:35FromGitter<matrixbot> `archibaldt` but, I'm fine with git being the defacto standard for nimble, and what not
15:49:53disrupteki don't believe nimble plans to deprecate hg support.
15:51:11Araqso ... exception handling still broken with --gc:arc
15:51:24clyybberAraq: Thought you fixed it?
15:51:25Zevvuse quirky exceptions! :)
15:51:27disruptekyou're in good company.
15:51:27Araqjson.nim works otherwise and json is the only thing we care about right
15:51:44disruptek!issue author:disruptek exception
15:51:45disbot12https://github.com/nim-lang/Nim/issues/11081 -- 3DateTime field on Exception produces inconsistent C/++ handling @11disruptek 7& 2 more...
15:52:10Araqclyybber: I thought so too but when you extract a tiny test case
15:52:13Araqguess what happens
15:52:24*dddddd joined #nim
15:52:26Araqyou fix the test case and in reality the problem remains
15:53:27disruptekreality is such a bummer.
15:53:49disruptekZevv: taste the rainbow.
15:54:02Araqclyybber: I'm also changing my mind about optimizing destructors, we can simply do it in injectdestructors already, no need to do it as a separate step
15:54:29clyybberYeah, thats why you eliminated them for trivial types in your branch right?
15:55:05Araqno, that was unrelated
15:56:05clyybberAraq: Btw, I managed to get p's modes of operation down to 3, I use an enum param rn: sinked, consumed, normal
15:56:24disrupteksinked sank sunk
15:56:31Araqhow is 'sinked' different from 'consumed'?
15:57:59FromGitter<alehander92> disruptek nice
15:58:07FromGitter<alehander92> !issue author:disruptek ref
15:58:09disbot12https://github.com/nim-lang/Nim/issues/12471 -- 3nim doc cannot grok IOSelectorsException @11disruptek 7& 2 more...
16:00:14clyybberAraq: Good question, not sure yet. It shouldn't be much different anymore now. I'm trying to eliminate the distinction currently
16:09:08FromGitter<alehander92> guys
16:09:13FromGitter<alehander92> why was isDigit(string) removed
16:09:33FromGitter<alehander92> i agree it was a bad name, but still isNumeric or something would make sense
16:09:34disruptekit was the only way to break terminaltables.
16:09:42FromGitter<alehander92> lol
16:13:14*floppydh quit (Quit: WeeChat 2.6)
16:16:10Araqalehander92: isDigit("0 3") returned true iirc
16:16:42FromGitter<alehander92> yeah i guess we can argue using other primitives is more elegant
16:16:49FromGitter<alehander92> a.allIt(it.isDigit)
16:17:41*nixfreak86 joined #nim
16:18:36nixfreak86settings: port = Port(mainPort) bindAddr = mainURL
16:19:21nixfreak86.env/nim/nimweb/main.nim(36, 1) template/generic instantiation of settings from here.env/nim/nimweb/main.nim(37, 14) Error: type mismatch: got but expected 'Port = distinct uint16'
16:19:40nixfreak86so Port has to be a uint16 variable ?
16:20:21Araqnixfreak86: the error is unclear
16:20:24FromGitter<alehander92> did we have `<`
16:20:25FromGitter<alehander92> unary?
16:20:38Araqyeah, now we don't have it anymore
16:20:43FromGitter<alehander92> what did it do
16:20:45Zevv.. %
16:20:52Zevv.. < that is
16:20:54FromGitter<alehander92> i found it out in some old code trying to port to 1.0.4
16:21:18Araq<x was x - 1
16:21:26FromGitter<alehander92> dude, good removal
16:39:21*Trustable joined #nim
16:40:35*njoseph quit (Ping timeout: 250 seconds)
16:42:30clyybberAraq: sinked also does the last read checks and destructive move var and the like
16:45:42*tane joined #nim
16:48:10*sealmove quit (Quit: WeeChat 2.6)
16:51:59clyybberI don't think they are mergeable
17:00:42FromDiscord_<Rika> sunken
17:01:10clyybberAraq: Fixed the exception issue huh?
17:06:07FromGitter<alehander92> hm
17:13:42FromDiscord_<Lantos> 🙂 just snuck nim into work for parsing csv values and verifying values. Comparison nodejs parsing 10s nim ~ .1s
17:17:36*leorize quit (Ping timeout: 260 seconds)
17:18:16*couven92 quit (Ping timeout: 240 seconds)
17:19:34clyybberAraq, mratsim: Should we just replace stdlib threadpool with yglukhovs? From what I can tell from #11922 its completely broken anyways
17:19:35disbot12https://github.com/nim-lang/Nim/issues/11922 -- 3Threadpool deadlocks on common multithreading examples @11mratsim
17:19:41*leorize joined #nim
17:27:30FromDiscord_<spacepluk> I'm still going through the manual but I have a quick question: is there a way I can recklessly share ptrs between threads c-style?
17:31:14*nsf joined #nim
17:32:14leorizeuse Channel[T] or something like that to share ptr
17:32:35leorizemake sure that the ptrs are Shared (ie. allocated using allocShared, createShared)
17:33:38*njoseph joined #nim
17:33:40FromDiscord_<spacepluk> thanks, I'll continue with my reading 🙂
17:34:03FromDiscord_<spacepluk> pretty cool language!
17:35:06FromDiscord_<spacepluk> I'm curious, what's the reason macros are executed in a vm?
17:35:19leorizewell, how can you execute it otherwise?
17:35:41FromDiscord_<spacepluk> two compiler passes maybe?
17:35:55leorizeit takes too much time for little gain
17:36:33*tklohna quit (Ping timeout: 245 seconds)
17:36:35FromDiscord_<spacepluk> can you spawn other processes from the vm?
17:36:44clyybberspacepluk: staticExec, so yeah
17:36:50FromDiscord_<spacepluk> cool, thanks 🙂
17:36:55FromDiscord_<spacepluk> this is checking all the boxes haha
17:37:14clyybberspacepluk: Having a VM is also pretty handy, since you can embed it into your own program and use it as a scripting lang at runtime.
17:37:33clyybberTheres also hotcode reloading which is handy for gamedev
17:37:44FromDiscord_<spacepluk> yeah, I was just wondering what was the original reason, because writing a vm is a lot of work
17:38:12leorizeAraq: ^
17:38:19FromDiscord_<spacepluk> clojurescript whent the opposite way trying to keep full language functionality in macros
17:38:29FromDiscord_<spacepluk> clojurescript went the opposite way trying to keep full language functionality in macros
17:38:45FromDiscord_<spacepluk> they actually execute macros in the jvm is very complicated
17:39:12FromDiscord_<spacepluk> or at least the did, not sure what's the situation atm
17:39:15clyybbersounds reasonable because the VM is already there
17:39:43FromDiscord_<spacepluk> it was still weird that you could run some stuff in the macros and not in cljs
17:39:59AraqI started with an AST based interpreter
17:41:24FromDiscord_<spacepluk> I see, so the main reason was to avoid compiling twice?
17:41:38clyybberAraq: In passCopyToSink you introduced the check for hasDestructor, but if it doesn't n will not be processed, while it should (I think)
17:42:12Araqback then "compiling twice" was not really considered by me but it's problematic
17:42:49Araqfor example, you can create an array of function pointers at compile-time. close to impossible to accomplish via staticExec
17:44:15FromDiscord_<spacepluk> got it 👍
17:45:51FromDiscord_<spacepluk> thanks for making/sharing this, I'm liking everything I see so far 🙂 no idea how I didn't look into it before
17:46:45clyybberAraq: Im referring to this line: https://github.com/nim-lang/Nim/pull/12781/files#diff-586c73babdc7aadda90947310df85afcR287
17:46:47disbot➥ 3arc devel 🔱11Araq
17:47:41Araqclyybber: what's wrong about it? If the type is trivial we don't have to pass a copy to 'sink T'. hmmm
17:47:56Araqyou're right, it's wrong
17:48:10clyybberShould be p(n)'d
17:48:40Araqyeah and also it must be copied anyway
17:49:03Araqas you can 'move(x)' it inside the proc and it must not propagate
17:49:23Araqbut this means we "move" trivial stuff into object constructors
17:50:08clyybberthats not a problem, isn't it?
17:53:14Araqit was ugly
17:53:33Araqit was correct after my bugfix though
17:53:40Araqnow I made it incorrect
18:00:41disruptekshashlick: seems like the best approach is to use project.nim.cfg for compilation defines and nim.cfg for paths. then nim.cfg doesn't need to be checked-in, but it still applies paths correctly to sub-projects.
18:09:22disruptekshould we lock packages in the environment that we cannot trace to requirements?
18:28:26*Araq sighs
18:28:35AraqNim's exception handling code is full of crap
18:28:49disruptekno comment.
18:29:17Araqwas written by an amateur who just read about Lisp's condition system
18:29:24Araqand failed to replicate it
18:29:40disrupteklet's kill her.
18:31:07*nsf quit (Quit: WeeChat 2.6)
18:38:38clyybberAraq: Is there a way to import io in the compiler or to make testament print the tests output?
18:38:59*ng0 quit (Quit: Alexa, when is the end of world?)
18:39:16Araqtestament --print
18:41:17disruptekleorize: if you feel like bug hunting... i dunno what it is; importing the compiler, or importing libgit2, but nimph really doesn't work all that well in nimsuggest.
18:44:17Araqwe should really say "arc requires quirky exceptions" ...
18:44:25disruptekthat would be awesome.
18:44:57clyybberAraq: Fuck yeah!
18:45:06clyybberI think we really should.
18:45:15rayman22201coming out of lurk mode to say I agree :-P
18:46:20Araqwhat about the fact that control flow continues after 'raise'?
18:46:56Araqfix it? but then it's not "quirky" anymore, just a different implementation of real exceptions
18:49:02shashlick@disruptek so both cfg files get loaded if both exist?
18:49:15shashlickIn what order
18:49:38Araqbtw how can we ensure that C++ gets yet another exception handling mechanism? anybody with direct connections to Herb Sutter?
18:49:39disruptekdepends on path.
18:49:55AraqI meant "ensure that C++ DOES NOT get another"
18:50:18shashlickAraq is pushing for @include with nimbledeps.cfg which can add additional lock file stuff when we get to it
18:50:47disrupteki'm increasingly 👎 on @include.
18:51:04shashlickAllows us to make it optional to check in but simultaneously generic enough to check in as well
18:51:18disruptekit makes the semantics much more complex and harder to infer for pm.
18:51:44disruptekit's already optional and generic to check-in. the pm is allowed to hack paths as much as it wants.
18:53:04shashlickEither that or repurpose an existing file
18:53:18shashlickSince few are fans here of auto editing a user file
18:53:23shashlickThis is a decent compromise
18:53:31disruptekno, it's not a compromise.
18:53:37disruptekit's a capitulation to laziness.
18:54:07shashlickEverything doesn't need an attack to rationalize
18:54:27disrupteki can't help it if you attack rationality.
18:54:46Araqkeep it civilized please
18:55:13Araqso disruptek ... what's wrong with @include?
18:55:17disruptekwhat we have works fine; it achieves the semantics we want in the scope we want.
18:55:37Araqwhat we have lacks lockfiles
18:55:40disruptek@include is going to have people @including all kinds of stuff; we won't be able to easily infer what came from where.
18:56:05disrupteklockfiles are trivial. i've spent all day looking at the same 80 lines of code trying to figure out what i'm missing.
18:56:26Araqwell so enlighten me please
18:56:51Araqand I don't mean the format you chose for your lockfiles
18:56:54disruptekproject.nim.cfg is only run when building the project, so it's a good place to put anything project-specific.
18:57:13Araqhow do pass the --paths to the compiler?
18:57:16Araq*do you
18:57:18disruptekas nim.cfg can be inherited by those projects below, eg. local dependencies, it's nice to put paths there.
18:57:34disruptekthen your local deps can find each other magically, "for free".
18:58:23Araqso you edit nim.cfg?
18:58:58Araqmarked with special comments?
18:59:19disruptekwhy bother? it's obvious what the commands do, and there's only one that we need ever add: --path.
18:59:30disruptekbut, sure, i'll put some comments in if you want.
18:59:52disruptekwhaddya want it to say? date+time? $USER?
19:00:16Araq# edited by imph
19:00:30Araq# end
19:00:59disrupteki don't remove comments, though, so when the paths change, you'll get lotsa cruft building up.
19:01:27disruptekbut, it's your pointless feature. you can deal with it.
19:01:41shashlick@disruptek local deps inherit parent cfg but not the other way round
19:02:03shashlickOk then keep going
19:02:37disruptekkeep going /where/ ?
19:03:07shashlickThis is exactly what I've been proposing - populating cfg with paths with nimble
19:03:13shashlickHe's asking about lock files
19:03:40disruptekwell, i have my entire dependency tree in memory. i can store whatever i want.
19:03:50disrupteki'm choosing to store the import name, because that seems important.
19:04:00disruptekalso the requirement that fomented the dependency in the first place.
19:04:19disruptekalso the distribution method, because we may want to ignore lockfile records that aren't git.
19:04:33disruptekalso, the source url.
19:04:40planetis[m]personally I still find try except blocks weird, I mean reasoning which statements inside may raise and which errors should it handle, is puzzle for me. I think quirky exceptions are better than the regular ones, so +1
19:04:41disrupteki dunno what else i could possibly want.
19:05:24Araqdisruptek: the problem is that --paths are absolute or guesswork
19:05:37disruptekcan you give me a scenario?
19:05:39planetis[m]try finally on the other hand is simple
19:05:54*adeohluwa joined #nim
19:06:02Araqguesswork is bad for lockfiles, absolute is bad if you 'git add' the nim.cfg
19:06:18disrupteklockfiles aren't about paths. they are about inputs.
19:06:44disruptekthe input is source code. a tree with a certain hash. either something from nimble, or git.
19:06:58Araqnot my point
19:07:07Araqthe point is what you write into the nim.cfg file
19:07:26disruptekwell, that's not my point, either.
19:07:37Araqeither it's --path:abs or --path:rel or --path:$nimbledir/foo
19:07:40disrupteki write paths in the nim.cfg. if that doesn't satisfy you, i'm sorry.
19:08:05disrupteki can write absolute paths. i currently optimize paths using whatever substitution fits -- the "closer", the better.
19:08:16disruptekso i write $config/something or $home/something or whatever.
19:09:15disrupteki have a toggle for writing $nimbledir/ paths, but it's disable by default because $nimbledir is dumb.
19:09:30disruptekin my opinion, anyway.
19:09:37Araqit's ambiguous
19:09:44Araqand that concerns me too
19:10:23shashlickOnly if there's multiple nimble paths
19:10:29shashlickAnd clean nimble paths solved that
19:10:42disrupteki use multiple nimblePaths. it's useful.
19:10:50shashlickNothing stopping that
19:10:57disruptekanyway, it's not my problem. you can do whatever you want in nimbleland.
19:11:17Araqdisruptek: I value your opinion though
19:11:26disrupteki mean that i do not care one way or another.
19:11:31shashlick1 nimble path with 1 version of a package with specific --path isn't ambiguous anymore
19:11:37Araqno need to be snide
19:11:41disrupteki only created a ticket because the compiler was broken.
19:11:51disruptekhonestly, i'm really fine with whatever.
19:11:58disruptekjust please don't break the compiler. 🤣
19:12:49shashlickI'm trying my best not to break anything but it is hard to tell why a proposal is a bad idea this way
19:13:03disrupteki'm not sure what proposal you're referring to.
19:13:14shashlick@include does not add any package manager specific functionality
19:13:31Araqthe proposal to add @include to the config file mechanism
19:13:52shashlickSo if it is a bad idea, I'm interested in understanding why
19:14:03disruptekin order to operate correctly, i need to make many interpretations of localized environments. i depend upon knowing the semantics of these configuration parses.
19:14:08*spacepluk joined #nim
19:14:22shashlickI'm considering it since it allows for Nimble stuff to be separate
19:14:24disruptekthat's how i'm able to handle the arbitrary complexity of myriad paths, packages, etc.
19:14:42disrupteki've yet to hear a scenario which demands this greater complexity.
19:14:45Araqwhich your PM would deal with by the fact that you use the compiler's API to parse the config files, but that doesn't mean @include is a good idea, it's yet another feature
19:14:46shashlickYour concern is that you will need to load it as well to infer the env
19:15:07disruptekmy concern is that i will no longer be able to make assumptions about the semantics.
19:15:19shashlickIt is being proposed to enable separation
19:15:25disruptekit's unnecessary as far as i can tell.
19:15:54disruptekyou can repeat yourself, but that's not the same as an example which proves your point. i could really use one of those.
19:15:55shashlickYou are saying put stuff in Nim.cfg
19:16:32disrupteki'm not telling you what to do. you tell me the problem @include solves. if you cannot do that, well, i don't know what to say.
19:16:33Araqdisruptek: the example is basiscally "Nimble adds @include lockfilepaths to your nim.cfg"
19:16:47Araqthat's why I brought it up
19:16:51disruptekwhy don't we just have the compiler load it, then?
19:16:58disruptekthat's a simpler semantic.
19:17:16Araqbecause then it's another special case in my compiler
19:17:20shashlickCause then compiler is more married to nimble and we are trying to reduce that
19:17:57disrupteki see all kinds of contents being added to @include'd files. i see loops, inclusions outside the current path, on and on and on.
19:18:07disrupteksounds like a mess to me.
19:18:55disruptekif the compiler can present to me the parse order of all targets, such that i can perform my own evaluations, then i'm fine with anything.
19:19:08disrupteki'll support @include, i mean.
19:20:13Araqwell to be honest, I don't like @include, nor $nimblepath. the simplest way that can possibly work for me is "assume dependency X is in ../X"
19:20:54disruptekthe only reason nimph needs to add --path to nim.cfg is to point to packages that have a src/ subdirectory which represents the "import root".
19:20:55Araqit's how I've seen most people setup these things anyway, nothing wrong with enforcing it for lockfile support
19:21:07disruptekthis has nothing at all to do with lockfiles.
19:21:33Araqor for "I want to use Nimble's usecfg" for that matter
19:21:34disrupteklockfiles aren't about paths. they are about inputs to the compiler. code. not where that code happens to sit on the filesystem.
19:22:05Araqwell yes, as I said, for "I want to use <new Nimble stuff>"
19:22:16disruptekif a lockfile assumes that the contents of two paths are equal because their names math, then that's a defect.
19:23:10Araqwell you said it yourself, lockfiles have little to do with "let's have working relative paths"
19:23:45disrupteklook, if you want to remove --nimblePath, i will be sad to see it go, but it won't really hurt what i'm able to provide with nimph.
19:23:51disruptekit'll just make life harder for the user.
19:24:07disruptekhowever, this @include thing is going to make life harder for me if it's implemented poorly.
19:24:37disruptekso that's why i'm pushing back upon it.
19:26:42Araqshashlick: any opinion on my remarks about relative paths?
19:27:08*spacepluk quit (Quit: leaving)
19:28:36*spacepluk joined #nim
19:29:22disrupteki honestly don't know what "working relative paths" means.
19:31:01disruptekthe only path that doesn't work for me is --outdir, because the compiler doesn't perform pathSubs on it.
19:31:03Araqok whatever, I need to watch Indiana Jones 1 now
19:31:09disruptekhave fun.
19:33:34shashlicksorry on a call, will check in 30
19:37:03spaceplukI'm looking at this: https://github.com/ephja/nim-glfw/blob/master/glfw/wrapper.nim
19:37:25spaceplukis there any tool that let's you wrap c/cpp lib using the original build system?
19:38:24Araqspacepluk: yes but the "original build system" is usually less portable than the rest of the C/C++ codebase
19:42:09spaceplukthe thing is that some project go really crazy with defines and options that change the deps that are linked
19:42:16spaceplukit's just a lot of work to keep that in sync
19:43:31spaceplukit would be nice if you just could add a git submodule with the original source and only add the nim wrappers without having to deal with that
19:44:18disruptek!repo nimterop
19:44:19disbot12https://github.com/nimterop/nimterop -- 9nimterop: 11Nimterop is a Nim package that aims to make C/C++ interop seamless 15 131⭐ 7🍴 7& 3 more...
19:45:18spaceplukthat looks perfect, thanks!
19:47:20*ng0 joined #nim
20:03:59*NimBot joined #nim
20:06:04*nsf joined #nim
20:25:04lqdev[m]I added the ability to call Wren from Nim in euwren, what do you think? https://github.com/liquid600pgm/euwren#retrieving-variables
20:25:13shashlick@disruptek - looks right? https://github.com/nim-lang/Nim/compare/devel...genotrance:pathSubs?expand=1
20:26:19shashlick@Araq - not sure what the specific question is wrt relative paths
20:27:49*letto quit (Read error: Connection reset by peer)
20:30:00*letto joined #nim
20:32:05disruptekshashlick: we should probably be using that expandTilde in pathSubs, right?
20:34:26*adeohluwa quit (Remote host closed the connection)
20:37:39shashlickIt's in path subs as well
20:37:59disrupteki know it's expanded there, but it's kinda hackish iirc.
20:38:05disruptekanyway, up to you.
20:38:23disrupteki think that pr is a good one. 👍
20:39:41shashlickI should replace the path subs stuff to call expand tilde
20:39:51disruptekthat was my thought, yes.
20:40:36disruptekare there any other cases where we don't call processPath?
20:41:17shashlickI looked but didn't see any that stood out
20:41:32*nsf quit (Quit: WeeChat 2.6)
20:42:50disrupteki would give that notRelativeToProj an explicit = in the call.
20:42:54disruptekjust a style nit.
20:43:42disrupteki actually changed that proc in my fork once and it was annoying.
20:46:46clyybberAraq: I think your changes in moveOrCopy for conversions are wrong.
20:50:20*thomasross is now known as Guest17240
20:50:21*Guest17240 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
20:50:29*thomasross joined #nim
20:56:41clyybberHmm, or maybe not..
20:57:45*narimiran quit (Ping timeout: 268 seconds)
21:01:41FromDiscord_<Kaynato> There's also the "nimline" by fragcolor. Not sure where that stands relative to nimterop
21:07:12*couven92 joined #nim
21:09:49FromDiscord_<exelotl> is raiseassert intended for general usage?
21:10:32*Vladar quit (Quit: Leaving)
21:10:49FromDiscord_<exelotl> e.g. if my case statement fails in advent of code, I just want a quick and simple way to raise an error with a message and terminate the program
21:12:40*fredrik92 joined #nim
21:12:47*fredrik92 quit (Remote host closed the connection)
21:14:56*couven92 quit (Ping timeout: 240 seconds)
21:20:04*abm quit (Remote host closed the connection)
21:20:32*abm joined #nim
21:24:44*zielmicha[m]1 quit (Ping timeout: 240 seconds)
21:24:44*joachimschmidt55 quit (Ping timeout: 240 seconds)
21:27:56*tane quit (Quit: Leaving)
21:28:01*abm quit (Quit: Leaving)
21:41:12*ntm joined #nim
21:50:08*Kaivo quit (Quit: WeeChat 2.6)
21:50:21*luis_ joined #nim
21:53:23*nif quit (Quit: ...)
21:53:32*nif joined #nim
21:56:33clyybberAraq: I made my PR against your branch, so you can merge it into your PR if you want: #12793
21:56:34disbot12https://github.com/nim-lang/Nim/pull/12793 -- 3Refactor injectdestructors @11Clyybber
21:59:54*beatmox quit (Remote host closed the connection)
22:00:25*beatmox joined #nim
22:13:21*Trustable quit (Remote host closed the connection)
22:18:18*nif quit (Quit: ...)
22:18:27*nif joined #nim
22:20:16disruptekparsetoml writes toml files that it cannot read. 🙄
22:22:47disruptekman, i get tired of problems like this.
22:26:23FromDiscord_<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/651187432607186973/unknown.png
22:26:26FromDiscord_<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/651187445479505940/unknown.png
22:27:02FromDiscord_<yewpad> Don't know about you but the first one looks a bit more pleasing to me than the second one where the first is the edited version of Nim's doc standard design
22:27:25disrupteki can't grok either of them because discord.
22:27:50FromDiscord_<yewpad> Discord's compression? On the phone?
22:28:39FromDiscord_<yewpad> Oh wait, the bot doesn't include send you guys images that were posted in Discord?
22:29:00disruptekit does, but they are hugely blown up on my screen.
22:29:06*solitudesf quit (Ping timeout: 252 seconds)
22:29:16FromDiscord_<yewpad> Hold the phone for a sec
22:29:38FromDiscord_<yewpad> https://imgur.com/jiEBrGX
22:29:48disrupteki'm on a 4k display and i have to scroll horizontally... it's bananas.
22:29:54FromDiscord_<yewpad> xD
22:30:22disrupteki like the 2nd one.
22:30:30FromDiscord_<yewpad> left or right one
22:30:37disruptekthe right.
22:30:48disruptekwhat did you change?
22:31:29FromDiscord_<yewpad> You sure? The right one feels like it would jump into my face but I figure that it is better for you because you've got yourself a 4k display where fonts are rendered/displayed differently
22:31:50FromDiscord_<yewpad> I changed the font sizes of the body and code snippets
22:32:35*nif quit (Quit: ...)
22:32:45*nif joined #nim
22:32:47disrupteki just like large fonts. i'm old and i work hard enough at just writing code; i don't want to struggle to read, too.
22:33:21FromDiscord_<yewpad> Fair enough
22:34:02disruptekthe manual doesn't look great on my display, probably because of my font size.
22:34:34disrupteki promised araq i wouldn't read the manual, though, so it's not a problem.
22:35:12FromDiscord_<yewpad> I'd like to re-design the manual so that it fits more the homepage and playground style with this cool dark blue-ish color and Dracula syntax
22:35:47disruptekdracula syntax sounds bloody awesome.
22:36:29FromDiscord_<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/651189974107947008/tumblr_n00ugclrKG1rpwm80o1_250.jpg
22:36:30disruptekwhat's the point of lockfiles if you can write them but not read them?
22:36:41FromDiscord_<yewpad> I'll just have to figure out how to change the design
22:42:05disruptek!repo toml
22:42:06disbot12https://github.com/NimParsers/parsetoml -- 9parsetoml: 11A Nim library to parse TOML files 15 53⭐ 9🍴 7& 3 more...
22:42:17disruptek!repos toml
22:42:18disbot12https://github.com/NimParsers/parsetoml -- 9parsetoml: 11A Nim library to parse TOML files 15 53⭐ 9🍴
22:42:19disbot12https://github.com/judofyr/toml.nim -- 9toml.nim: 11TOML parser for Nim 15 6⭐ 0🍴
22:42:20disbot12https://github.com/alaviss/toml -- 9toml: 11Nim TOML parser 15 0⭐ 0🍴 7& 1 more...
22:43:55disruptekwell, json it is! good thing everything in the backend is already json. stupid toml.
22:44:07disruptekpointless anyway -- you can't add comments to it!
22:49:25FromDiscord_<yewpad> 😄
22:50:06disruptekyay, it works. honestly, it even renders better.
22:52:06madpropslove how i could easily just use generics
22:52:16disruptekyeah, they are nice.
22:52:37madpropsim using it for some echo alias though maybe i should use something like "printable" or "stringable" or something
23:02:57*abm joined #nim
23:04:11*nixfreak86 quit (Ping timeout: 260 seconds)
23:07:59*luis_ quit (Ping timeout: 276 seconds)
23:08:37*luis_ joined #nim
23:10:45*dddddd quit (Remote host closed the connection)
23:14:42FromDiscord_<yewpad> https://imgur.com/tWQ4a2e
23:14:45FromDiscord_<yewpad> Making progress
23:14:51FromDiscord_<yewpad> Love it already, and my eyes too
23:15:28disruptekthat looks great, but then again, i'm using dark reader.
23:19:45*luis_ quit (Ping timeout: 246 seconds)
23:19:59madpropsplease make it in a way where i can cook up some script to make a POST request and receive a url
23:26:05FromDiscord_<yewpad> ?
23:28:51madpropsfor instance i would make a script to read from my clipboard and post it on nimpastr
23:29:01madpropsand then get the url in my clipboard ready to share
23:32:15FromDiscord_<yewpad> AH
23:32:15FromDiscord_<yewpad> sure
23:32:30FromDiscord_<yewpad> I thought you were talking about the design xd
23:43:44madpropsalso you talked about checking the code?
23:43:53madpropswhat if i want to just show some out of context code
23:43:59madpropswhich won't compile
23:44:51disrupteki wrote an ix paster in nim that does all that.
23:44:56disruptek!repo disruptek/xs
23:44:57disbot12https://github.com/disruptek/xs -- 9xs: 11xstreamstartup.com 15 1⭐ 0🍴
23:45:03disrupteksee `ix`
23:45:58madpropsoh cool
23:46:00madpropsi'll check it out
23:48:15FromDiscord_<yewpad> Whatcha sayin'?
23:48:15FromDiscord_<yewpad> https://imgur.com/tF1Lffq
23:48:20FromDiscord_<yewpad> Love it
23:48:52FromDiscord_<yewpad> https://imgur.com/7Hjcz78
23:49:10madpropsdisruptek: https://paste.merkoba.com/1575330543-rohiyu-1
23:49:14madpropsthis happens on nimble install
23:52:39madpropsmaybe i need some dbus dev packages
23:57:48*abm quit (Quit: Leaving)