00:04:56*rockcavera quit (Killed (adams.freenode.net (Nickname regained by services)))
00:04:57*rockcavera joined #nim
00:32:48FromDiscord<Technisha> What's the matrix channel for Nim?
00:32:54*Onionhammer quit (Quit: The Lounge - https://thelounge.chat)
00:33:17*Onionhammer joined #nim
00:33:40*xet7 joined #nim
00:59:42*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
01:00:02*njoseph joined #nim
01:05:36leorize@Technisha #freenode_#nim:matrix.org
01:07:04FromDiscord<Technisha> Thanks!
01:07:42*TechnishaCircuit joined #nim
01:07:56FromDiscord<Technisha> Oh look, it's me-
01:08:01FromDiscord<Technisha> Ew it says I'm using IRC
01:09:14*TechnishaCircuit is now known as Technisha[m]
01:09:32Technisha[m]It is what it is-
01:10:27FromDiscord<Technisha> Now it shows me using Matric?
01:14:52Technisha[m]<FromDiscord "<Technisha> @yglukhov, could i h"> @yglukhov
01:15:38Technisha[m]This is the post btw: https://forum.nim-lang.org/t/7757
01:18:23FromDiscord<Technisha> Oof Matrix fucking up
01:19:57leorizewell you're technically talking to discord via irc :P
01:20:34leorizethe discord bridge use the `[m]` in your irc nick as the differentiator for matrix vs irc
01:22:51Technisha[m]Wait does Matrix have IRC support natively?
01:23:50Technisha[m]If so that sucks
01:24:03*vicfred quit (Ping timeout: 260 seconds)
01:28:47FromDiscord<ElegantBeef> Why?
01:28:48leorizematrix has a good-enough irc bridge
01:28:52leorizeand the bridge is native
01:28:54leorizeto irc
01:31:12FromDiscord<ElegantBeef> Compatibility to irc is a good thing means if you used irc you dont need a second client 😛
01:33:06*rockcavera quit (Remote host closed the connection)
01:46:54FromDiscord<Technisha> IRC just sucks-
01:47:53lainis there a way for a template accepting a string argument to use that argument as an identifier (e.g. for declaring a proc whose name is the contents of the string)?
01:48:19lainalternatively should I be accepting it as untyped and then making a string out of the identifier when I need it as a string? (if so, how do I do that :o )
01:48:33lain((or is this a job for macros))
01:49:14leorize!eval echo astToStr(randomIdentHere)
01:49:27lainleorize: awesome, thanks!
01:49:29leorize!eval echo astToStr(even + expression / works)
01:49:31NimBoteven + expression / works
01:53:19*rockcavera joined #nim
02:03:43lainis it possible to pass parameter declarations to a template? like: someTemplate(id: uint32, mask: uint32)
02:05:13lainseems to confuse the parser, I'm getting "Error: type expected" on the line where I use the template
02:06:42FromDiscord<ElegantBeef> What are you trying to do?
02:07:32lainI want to declare a handful of things (a type, a var, and a proc) based on an identifier and a list of args for the proc
02:07:48lainit's always the same so a template or macro seems appropriate
02:08:02*Tanger joined #nim
02:09:03FromDiscord<ElegantBeef> Might have to use a macro, would be good to see a desired implementation
03:29:25*spiderstew joined #nim
03:32:23*spiderstew_ quit (Ping timeout: 260 seconds)
03:44:36*waleee-cl quit (Quit: Connection closed for inactivity)
03:56:50*rockcavera quit (Remote host closed the connection)
04:02:52*motersen quit (Remote host closed the connection)
04:03:09*motersen joined #nim
04:12:57FromDiscord<Rika> In reply to @dom96 "you need to add": This makes me wonder why nimble doesn’t edit the nimble file when I do nimble install
04:28:06FromDiscord<Yardanico> In reply to @Rika "This makes me wonder": `nimble install` is context-independent, it doesn't behave differently based on which folder you're in
04:28:19FromDiscord<Rika> Yes I know but why would it be
04:28:22FromDiscord<Yardanico> why not?
05:19:32*narimiran joined #nim
05:21:00*haxscramper joined #nim
05:34:41FromDiscord<Yardanico> https://www.reddit.com/r/ProgrammingLanguages/comments/mm9j4k/closures_in_llvm/ nim mentioned in a top comment (on how to implement closures) :)
05:34:45FromDiscord<Yardanico> with the link to https://nim-lang.org/docs/intern.html#code-generation-for-closures
05:36:07FromDiscord<Yardanico> although seems like this is quite a standard way of making closures
06:17:57*teal joined #nim
06:39:28*teal quit (Quit: WeeChat 3.1)
06:39:38leorizeYardanico: because the alternative way works better :) literally every "just works" package manager does it
06:40:23FromDiscord<Yardanico> really? pip and other similar package managers don't write the package to the requirements file in the dir if you do "pm install package", no?
06:40:42leorizewell npm, cargo, go does
06:40:49leorizeand they are very, very successful
06:41:45leorizepip on the other hand is universally hated :)
06:42:02leorizethe chances of pip f-ing up your python installation is higher than it should be
06:42:13leorizeeven using virtualenv is kinda a requirement if you want to stay sane
06:42:30FromDiscord<Yardanico> i mean sure, it can be good behaviour, but only after we get nimble lockfiles :)
06:45:01leorizeas of currently this mythical nimble lock file never manifested
06:46:33leorizefrankly I have little faith on any development related to nimble given the project's negligence on it
06:47:42FromDiscord<Yardanico> there are commits for lockfile support though
06:47:57FromDiscord<Yardanico> https://github.com/bobeff/nimble/tree/feature/lock-file and https://github.com/bobeff/nim/tree/feature/nimble-lockfile-support
06:50:19*PMunch joined #nim
06:52:30leorize[m]hopefully this will turn nimble into something that can be fully trusted
06:57:50FromDiscord<mrotaru> most people would probably expect the package manager to put installed packages in the current project, and update whatever mechanism there is for keeping track of project deps
06:58:48FromDiscord<mrotaru> even after reading the docs it was still a bit unclear to me that `nimble` does things quite a bit differently
06:59:03FromDiscord<haxscramper> You can put `requires` and then do nimble build/test/run etc. and it will install package
06:59:23FromDiscord<haxscramper> Though it is a bit backwards
06:59:23FromDiscord<Rika> also `nimble install`
06:59:46FromDiscord<haxscramper> nimble `install` should install. not `add-dep`
06:59:51FromDiscord<Rika> adding a requires then a bare nimble install will install the package you're developing (so --depsonly)
07:00:13FromDiscord<ElegantBeef> I do think `nimble find-deps` would be a nice addon and i think dom said "it wouldnt be too hard to implement"
07:00:29*fredrikhr joined #nim
07:01:35FromDiscord<Yardanico> In reply to @ElegantBeef "I do think `nimble": hmm, what should this do? find all nimble packages imported in the current project and add them to the requires?
07:02:43FromDiscord<mrotaru> maybe a cli switch for `nimble install` ? so `nimble install fsevents --local` will put package in current project, and also update the `.nimble` file
07:03:09leorizethere's --localdeps for installing to the current project
07:03:18leorizeupdating the .nimble doesn't exist though
07:03:34FromDiscord<ElegantBeef> Yea yardanico
07:04:09FromDiscord<Yardanico> In reply to @ElegantBeef "Yea yardanico": I don't think this is that easy
07:04:13FromDiscord<Yardanico> it depends on how you implement it of course
07:04:33FromDiscord<ElegantBeef> Well that's what dom said iirc, dont look at me
07:04:41FromDiscord<Yardanico> looks at ElegantBeef
07:05:52FromDiscord<mrotaru> `-l, --localdeps Run in project local dependency mode` - that's a bit opaque
07:06:17leorizeit is as vague as how well supported that feature is :)
07:06:30FromDiscord<mrotaru> makes sense 😄
07:06:46leorizeyou have to read into nimble manual to figure out how you are supposed to use it
07:07:06leorizethere is a mode where it's just scoped to you and a vendored mode iirc
07:07:36FromDiscord<mrotaru> i get the impression i'd be saving myself some headaches if i just manually downloaded the packages 😄
07:09:02leorizesomeone wrote a nim package manager on that concept
07:09:37leorizeit worked well but was never adopted and probably doesn't work now :P
07:11:15FromDiscord<mrotaru> i don't that would scale though; manually keeping track of deps for deps would be a pain
07:11:45FromDiscord<mrotaru> nimble ain't that bad but docs could be improved
07:12:04leorize[m]https://github.com/disruptek/nimph <- you can try playing with it if you have time
07:13:28FromDiscord<mrotaru> too early for that, i barely know the language
07:15:05*l1x joined #nim
07:15:21Clonkk[m]<leorize "@Clonkk @zetashift fixed that bu"> Will try ! Thanks
07:19:28Clonkk[m]It seems to work
07:24:56PMunchHmm, I've been doing some stuff in F# recently. Really starting to like the static types we enjoy in Nim after that..
07:27:57*leorize quit (Ping timeout: 240 seconds)
07:38:18FromDiscord<flywind> yet another arc +{.global.} issue https://github.com/nim-lang/Nim/issues/16823
07:39:24*leorize joined #nim
07:50:53*Vladar joined #nim
08:24:03FromDiscord<arnetheduck> we use git submodules + make instead of trying to deal with all nimble issues - there are lock files being developed for nimble which is sort of a minimum standard for any PM to be usable
08:24:45*leorize quit (Ping timeout: 240 seconds)
08:24:55FromDiscord<arnetheduck> https://github.com/status-im/nimbus-build-system/ - it's not pretty but it does get the job done to create reliable builds
08:39:54*Tanger quit (Remote host closed the connection)
08:47:53*haxscramper quit (Ping timeout: 260 seconds)
09:00:07*rwiser[m] quit (Quit: Idle for 30+ days)
09:00:16*tane_ joined #nim
09:02:21FromDiscord<zetashift> In reply to @PMunch "Hmm, I've been doing": Static types?
09:02:46FromDiscord<zetashift> Also is https://nimble.directory/ down for anybody else?
09:04:25*leorize joined #nim
09:07:02FromDiscord<Yardanico> ping @federico3
09:07:10FromDiscord<Yardanico> In reply to @zetashift "Also is https://nimble.directory/ down": yep
09:07:16FromDiscord<willyboar> Yes me too
09:07:54FromDiscord<ElegantBeef> Zeta i believe pmunch means things like `type Thing[I: static int] = object`
09:08:11FromDiscord<ElegantBeef> Or the actual static typing that F# doesnt have D:
09:10:35FromDiscord<zetashift> Huh? F# has "static typechecking", right? It does not have the `static T` thing, but tbh that sometimes works for me and sometimes doesn't haha
09:10:54FromDiscord<ElegantBeef> It's functional so most things are just implied afaik
09:11:05FromDiscord<ElegantBeef> I've never wrote any so i'm just assuming
09:11:32FromDiscord<zetashift> It has typechecking, but a lot of types can be inferred, so they are rarely written. It uses https://en.wikipedia.org/wiki/Hindley%E2%80%93Milner_type_system
09:11:48FromDiscord<zetashift> But when dealing with lots of OO stuff from C# you have to annotate yeah
09:23:03*lritter joined #nim
09:30:03PMunchOh I meant the explicit types
09:30:38PMunchOne thing returns the wrong type now suddenly it composes together with 10 other things and you've got a type error somewhere but no idea where it came from
09:31:29*johannes_ joined #nim
09:31:34*johannes_ is now known as kenran
09:48:12FromDiscord<zetashift> Ah yeah that's messed up
09:48:23FromDiscord<zetashift> Errors not helpful?
09:50:28PMunchWell it might just be me not used to reading them
09:50:58PMunchBut I seem to change something in one place and receive an error in a completely different place
09:53:32FromDiscord<zetashift> There is an F# Slack that's always been helpful to me, they know a lot. Also narimiran might have some tips too
09:53:52PMunchI've been asking in the ##fsharp IRC channel, but it's not very active
09:54:11*krux02 joined #nim
09:54:50PMunchI mean its not so bad that I can't figure it out
09:57:14narimiranheh, i haven't used F# in quite a while....
09:57:24FromDiscord<zetashift> The slack is more active...but yeah that requires Slack.
09:57:58FromDiscord<zetashift> In reply to @narimiran "heh, i haven't used": Nimming it all the way up
09:58:06narimiranyep :)
10:02:02FromDiscord<patasuss> Did the 'assertions' module get moved/deleted? Or where do I get a 'assert' from now? https://play.nim-lang.org/#ix=2Vno
10:03:24PMunch!eval assert(1 != 1)
10:03:27NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/assertions.nim(30) failedAssertImpl↵/playground/nim/lib/system/assertions.nim(23) raiseAssert↵/playground/nim/lib/system/fatal.nim(49) sysFatal↵Error: unhandled exception: /usercode/in.nim(1, 7) `1 != 1` [AssertionDefect]
10:03:31*m4r35n357 quit (Ping timeout: 248 seconds)
10:03:47PMunchAssertions are built in, where they ever their own module?
10:04:23*m4r35n357 joined #nim
10:05:40FromDiscord<patasuss> oh weird, there is https://nim-lang.org/docs/assertions.html
10:06:31FromDiscord<patasuss> Googling "nim assert" brings up that page.
10:06:51FromDiscord<Yardanico> In reply to @patasuss "oh weird, there is": it's always imported
10:07:01FromDiscord<Yardanico> In reply to @PMunch "Assertions are built in,": some parts of system are split up into modules
10:08:14FromDiscord<flywind> see https://nim-lang.github.io/Nim/assertions.html
10:08:19FromDiscord<flywind> docs imporved
10:08:29FromDiscord<flywind> > This module is reexported by system and thus does not need to be imported directly (with system/assertions).
10:09:15FromDiscord<flywind> !eval import system/assertions; assert(1 != 1)
10:09:17NimBot/usercode/in.nim(1) in↵/playground/nim/lib/system/assertions.nim(30) failedAssertImpl↵/playground/nim/lib/system/assertions.nim(23) raiseAssert↵/playground/nim/lib/system/fatal.nim(49) sysFatal↵Error: unhandled exception: /usercode/in.nim(1, 33) `1 != 1` [AssertionDefect]
10:11:52FromDiscord<patasuss> any reason why there are two versions of the documentation? Why don't both URLs point to the same resource?
10:13:16FromDiscord<flywind> devel docs are latest docs built from the Nim devel branch(night version). Rebuilt on every commit. stable docs are built from every release version(stable version).
10:13:35FromDiscord<flywind> https://nim-lang.org/documentation.html
10:13:55FromDiscord<flywind> see Bleeding Edge Docs on that page
10:19:36FromDiscord<flywind> though we need a better navigation https://github.com/nim-lang/Nim/issues/10744
10:24:52federico3@Yardanico: fixed, thanks for the ping
10:51:34FromGitter<ynfle> @patasuss, https://nim-lang.github.io/Nim is the docs built from `devel` branch and https://nim-lang.org/docs are the previous released stable version
10:54:32FromDiscord<patasuss> flywind already answered that, but thanks
11:12:35FromDiscord<Charlotte> :p
11:35:49*kenran quit (Quit: leaving)
11:41:54FromDiscord<madman> hey can someone help me with this
11:41:55FromDiscord<madman> https://play.nim-lang.org/#ix=2VnW
11:44:40FromDiscord<Yardanico> you should use codegenDecl
11:45:24FromDiscord<Yardanico> but there's another problem - nim's own rules for exporting/importing can contradict with this KINC_FUNC macro
11:45:59FromDiscord<madman> yeah i some error that had to do with this:"`imp_nimLoadLibrary'"
11:46:02FromDiscord<Yardanico> ah, right, they wont with cdecl
11:46:13FromDiscord<Yardanico> In reply to @x19 "yeah i some error": something like
11:46:37FromDiscord<Yardanico> might work
11:46:43FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2VnZ
11:47:52FromDiscord<Yardanico> also
11:48:05FromDiscord<Yardanico> the C macro has no effect if you're importing from a dll unless you also include the header
11:48:44FromDiscord<Yardanico> because you're importing the proc, not implementing it yourself
11:48:58FromDiscord<Yardanico> so you probably don't need this KINC_FUNC at all
11:49:21FromDiscord<madman> well i am importing the proc but it's failing
11:49:28FromDiscord<Yardanico> In reply to @x19 "well i am importing": define "failing"
11:49:54FromDiscord<Yardanico> but yeah, you don't need KINC_FUNC here, it's only needed in the actual implementation
11:49:57FromDiscord<madman> its weird. it doesnt crash when i step over the function call in debug mode, but it doesnt update the shaders with the correct data
11:50:15FromDiscord<madman> yes because i am importing the dll
11:50:31FromDiscord<Yardanico> In reply to @x19 "its weird. it doesnt": maybe the problem is something else?
11:51:25FromDiscord<madman> could be
11:52:03FromDiscord<Yardanico> without the code which doesn't work as intended it's really hard to guess :P
11:52:44FromDiscord<madman> hehe
11:53:10FromDiscord<madman> it was working but i updated the C lib and there was this new macro added
11:53:50FromDiscord<Yardanico> maybe something changed in behaviour of kinc itself?
11:54:04FromDiscord<Yardanico> that macro has nothing to do with importing the functions as we found out
11:54:12FromDiscord<madman> ok cool
11:54:16FromDiscord<madman> then i can rule that one out
11:54:20FromDiscord<madman> and look for other things
11:54:23FromDiscord<madman> thanks
12:02:16FromDiscord<zetashift> @madman are you binding Kinc? The haxe/C graphics lib?
12:02:41FromDiscord<madman> yes'
12:02:47FromDiscord<madman> u wanna work with me dude?
12:03:31FromDiscord<zetashift> I don't know C that well
12:03:38FromDiscord<madman> `c2nim --dynlib:"something/dll" file.h`↵i cant get c2nim to emit " for some reason it ignores them
12:03:51FromDiscord<zetashift> Did you try nimterop?
12:04:00FromDiscord<madman> no
12:04:03FromDiscord<madman> i got it to work
12:04:07FromDiscord<madman> but then i updated Kinc
12:04:16FromDiscord<madman> now im redoing the c2nim again
12:04:32FromDiscord<madman> i was able to use shaders and draw and triangle
12:04:45FromDiscord<madman> i never tried nimterop
12:05:07FromDiscord<madman> u dont need to know C at all with c2nim xD
12:05:36FromDiscord<zetashift> Oh pretty cool, got a repo, I'd like to try it out
12:06:24FromDiscord<Conifer> The online playground doesn’t support user input does it?
12:07:13FromDiscord<haxscramper> It doesn't, but nim is available at https://wandbox.org/ which has support for user input
12:07:33FromDiscord<haxscramper> And also supports `devel` compiler version
12:08:00FromDiscord<Conifer> Thanks
12:14:52FromDiscord<Yardanico> yeah wanbox is quite nice
12:14:59FromDiscord<Yardanico> they update devel every week or more often
12:22:41*rockcavera joined #nim
12:22:50*waleee-cl joined #nim
12:23:10FromDiscord<Conifer> Huh.↵Just tried to ran simple test on wandbox with user input but I’m getting error.↵↵Difficult to get it written as I’m at work so I thought I would play around with Nim
12:23:51FromDiscord<Conifer> Technically raiseEOF and Error: unhandled exception: EOF reached (EOFError)
12:26:02FromDiscord<Yardanico> what "simple test"?
12:26:21FromDiscord<Yardanico> if you require standard input, you have to provide it in "stdin" before running the code
12:26:56FromDiscord<Yardanico> https://media.discordapp.net/attachments/371759389889003532/829693793208238080/unknown.png
12:27:12FromDiscord<Conifer> Ah. There we go. That I wasn’t aware I need on here
12:27:33FromDiscord<Conifer> Lowkey starting to feel like installing vsc on this piece of crap and keep it hidden
12:42:22FromDiscord<Conifer> In reply to @Yardanico "": Did exactly the same thing as you. Still got an error
12:42:30FromDiscord<Yardanico> what's your code though?
12:42:58FromDiscord<Conifer> I ran the same as the one on your screenshot
12:43:09FromDiscord<Yardanico> with nim HEAD ?
12:43:25FromDiscord<Conifer> Yeah
12:43:30FromDiscord<Yardanico> weird
12:43:35FromDiscord<Yardanico> can you show a screenshot?
12:43:38FromDiscord<Conifer> Tried 1.4.4 too
12:43:54FromDiscord<haxscramper> In reply to @Yardanico "can you show a": wandbox support code share
12:44:07FromDiscord<Yardanico> In reply to @haxscramper "wandbox support code share": the code is the same as they say
12:44:07FromDiscord<Conifer> I’m at work so don’t have discord on it
12:44:15FromDiscord<Yardanico> In reply to @Yoshiharu "I’m at work so": you can make a photo from the phone :)
12:44:24FromDiscord<Conifer> Yeah was going to say I will do that
12:46:46FromDiscord<Conifer> https://media.discordapp.net/attachments/371759389889003532/829698780680028180/image0.jpg https://media.discordapp.net/attachments/371759389889003532/829698781980786768/image1.jpg
12:46:48FromDiscord<Conifer> There we go.
12:47:26FromDiscord<Conifer> Oh wait. I think I might of... realised something
12:47:29FromDiscord<Conifer> Yeah
12:47:37FromDiscord<Conifer> Well trial and error boys...
12:47:41FromDiscord<Conifer> Trial and stupidity too
12:47:55FromDiscord<Conifer> Didn’t know I have to use the Stdin before running it
12:48:01FromDiscord<Yardanico> I said that to you :)
12:48:02FromDiscord<Conifer> Or rather “write in it”
12:48:10FromDiscord<Conifer> Must of missed it
12:48:16FromDiscord<Yardanico> In reply to @Yardanico "if you require standard": > you have to provide it in "stdin" before running the code
12:49:21FromDiscord<Conifer> Did miss it
12:50:56FromDiscord<madman> hey @Yardanico i fixed it.↵quick question. when binding stuff using c2nim, if i leave out some fields in the nim file, it fails to compile
12:51:10FromDiscord<madman> i mean it fails to use the proc correctly
12:51:20FromDiscord<Yardanico> can you show the part of the code and the full error?
12:51:34FromDiscord<madman> there is no real error
12:51:43FromDiscord<madman> the proc just doesnt fill the shader
12:51:47FromDiscord<madman> wanna go voice chat?
12:51:53FromDiscord<Yardanico> you will stream?
12:51:55FromDiscord<madman> yes
12:52:02FromDiscord<Yardanico> ok, sure
12:52:17FromDiscord<madman> cool
13:28:21FromDiscord<Charlotte> Does Nim have generators?
13:28:59FromDiscord<Yardanico> define "generators"?
13:29:23PrestigeI think an iterator is what you want?
13:30:59*letto quit (Ping timeout: 248 seconds)
13:31:35FromDiscord<Charlotte> For asynchronous functions
13:31:41FromDiscord<Charlotte> It has asyncdispatch, right?
13:33:16FromDiscord<Charlotte> I'm just being dumb nvm me
13:36:18*letto joined #nim
13:41:51*letto quit (Ping timeout: 260 seconds)
13:44:15*letto joined #nim
13:44:31*rockcavera quit (Remote host closed the connection)
13:50:43*letto_ joined #nim
13:50:47*letto quit (Ping timeout: 268 seconds)
13:53:44*letto_ quit (Read error: Connection reset by peer)
13:55:12*letto_ joined #nim
14:22:57*narimiran quit (Ping timeout: 260 seconds)
15:00:21*leorize quit (Ping timeout: 240 seconds)
15:03:57*leorize joined #nim
15:41:46FromDiscord<Rozzamarine> Nobody asked me for URL randomizer in pure Nim, so I prototyped it without asking: https://gist.github.com/Guevara-chan/7d20b40001449a9d9694f62829a6f852↵Am I cool yet ?
16:00:03FromDiscord<ajusa> sent a code paste, see https://paste.rs/AVm
16:00:42FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=2VoZ
16:15:57ozzzI unable to import monotimes
16:16:31ozzzimport std/monotimes ... std/[os,monotimes] not work
16:16:54leorizewhat version of nim are you using?
16:17:02*couven92 joined #nim
16:17:18ozzzNim Compiler Version 0.19.4
16:17:46ozzzoh! sorry, seems it's VsCOde bug
16:17:46leorizethat's very, very old
16:18:06ozzzleorize, that one in debian repo
16:18:24leorizeif you enable backports you should get 1.4.2 I think
16:18:37leorizefederico3 would know more about debian packaging of nim
16:18:50ozzzthanks for the info
16:19:11leorizeyea, 1.0.4 is in buster-backports
16:19:14federico3ozzz: I guess you are using Buster
16:19:19ozzzI can compile it manually
16:19:25ozzzfederico3, right
16:19:28leorizeif you want the latest then I'd recommend choosenim or manually compiling
16:19:29federico3I could backport 1.4.2 actually
16:19:32ozzzbuster, 10
16:19:41*fredrikhr quit (Ping timeout: 240 seconds)
16:20:18ozzzthanks guys, I will switch to the newer version
16:24:01federico3time to test the new laptop with a Nim build
16:41:50FromDiscord<haxscramper> I'm getting a weird error from this code https://play.nim-lang.org/#ix=2Vpb - "target cannot be assigned to". It happens as soon as I moved from just `var DoxVersionNumber` to `var | var seq` and added `when` check
16:42:36FromDiscord<haxscramper> How can this be fixed without splitting implementation into two different overloads?
16:43:56*couven92 is now known as fredrikhr
16:45:46FromDiscord<clyybber> @haxscramper `var (DoxVersionNumber | seq[DoxVersionNumber]);`
16:46:48FromDiscord<haxscramper> Yes, that worked,
17:00:26*fputs quit (Quit: WeeChat 3.1)
17:01:50FromDiscord<Chem> Is anyone by chance familiar with C/C++ interop in Nim?↵I'm trying to get a simple 20 line C `.dll` program ported to Nim and it's crashing the host program/not working ;..;
17:02:25FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2Vpl
17:02:53leorizehow is your nim code looking right now?
17:03:23FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2Vpm
17:04:56FromDiscord<hugogranstrom> sent a code paste, see https://play.nim-lang.org/#ix=2Vpo
17:06:16FromDiscord<hugogranstrom> And one of the many lines in the error message pointed to this line: https://github.com/nim-lang/Nim/blob/8ccde68f132be4dba330eb6ec50f4679e564efac/lib/pure/asyncfile.nim#L150
17:06:39*rockcavera joined #nim
17:07:21FromDiscord<hugogranstrom> But `DWORD` is a `unint32` and should be able to handle that now that I think about it: https://github.com/nim-lang/Nim/blob/8ccde68f132be4dba330eb6ec50f4679e564efac/tools/urldownloader.nim#L82
17:09:17FromDiscord<hugogranstrom> Not sure where I'm going with this 🙃 I guess I should file a issue?
17:11:37*narimiran joined #nim
17:14:02*leorize quit (Remote host closed the connection)
17:14:31*leorize joined #nim
17:14:44FromDiscord<Chem> @hugogranstrom https://media.discordapp.net/attachments/371759389889003532/829766222186545171/unknown.png
17:15:07FromDiscord<Chem> Does Nim not just have a "make an HTTP request and pipe the response bytes as a binary stream to a file" method?
17:15:25FromDiscord<Chem> open a pipe to the download URL and set the pipe out to be an `fd`
17:15:41FromDiscord<hugogranstrom> In reply to @Chem "<@!454991120028663809>": Didn't know about that 🙂 But I should still be under that, right?
17:15:55FromDiscord<hugogranstrom> I may have found the culprit: https://github.com/nim-lang/Nim/blob/8ccde68f132be4dba330eb6ec50f4679e564efac/lib/windows/winlean.nim#L38
17:16:07FromDiscord<hugogranstrom> It's defined as `DWORD = int32` on windows
17:16:32FromDiscord<Chem> Yeah, but I don't know that I would deem any sort of function that is meant to download files, that has a hard-set nonconfigurable limit as acceptable lol
17:17:06FromDiscord<Chem> files are just bytes, network connections are just streams, you should in theory be able to open a stream in which one end is the file download and then pipe it directly to a file descriptor as output
17:17:41FromDiscord<hugogranstrom> That's true 🤔
17:18:34FromDiscord<Chem> Dunno if there's some Windows limitation about this or if pipes aren't a thing on Windows↵I use Windows now (unfortunately) but spent most of my life on Linux and so only really know how nix kernels works
17:18:36FromDiscord<Chem> (edit) "works" => "work"
17:20:07FromDiscord<Chem> (sockets are literally network file-descriptors)
17:20:23FromDiscord<hugogranstrom> Haha Windows is unpredictable as usual xD
17:23:30FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2Vpt
17:24:04ozzzstrange, I updated from backports nim compiler in debian, and now my code wont work
17:24:16ozzzI get segfaults :)
17:26:01ozzzbtw koch not provided with pkg?
17:27:54FromDiscord<hugogranstrom> In reply to @Chem "Basically I'd imagine you'd": Yeah I guess so 🤔 haven't really done much networking before
17:28:56FromDiscord<Chem> Ah. Even if you have it's not really intuitive, this sort of notion of everything being mostly streams and file-descriptors is also a bit low-level unix centric
17:29:35FromDiscord<Chem> you can work with web/net stuff for a long time and never be exposed to the concept of streams/pipes and all this, and you don't really need it (most API's don't use streams)
17:30:13FromDiscord<Chem> but I think it's good background context/understanding. With the disclaimer that Windows might be completely different and none of this applies on Windows.
17:30:26FromDiscord<Chem> (edit) "but I think it's good background context/understanding. With the disclaimer that Windows might be completely different and ... none" 03added "maybe"
17:31:49FromDiscord<hugogranstrom> It's always nice to learn new thing 🙂 But preferably not when you're frustrated that it doesn't work 🤣
17:32:06FromDiscord<Chem> "Concrete" file downloads to a physical file on disk = creation of a new file descriptor, opening that `fd` handle as a writeable stream, opening a connection to the file on the network through a socket (which is also a `fd`, just on the net), and then streaming the data into the local `fd` and closing the writeable stream.
17:32:20FromDiscord<Chem> that's what happens behind the scenes
17:32:59FromDiscord<Chem> also maybe you don't stream directly into the local file, maybe you're storing it in memory temporarily and then copying the data over to the `fd` afterwards, that works too
17:34:36FromDiscord<Chem> In reply to @hugogranstrom "It's always nice to": This is with the language's default HTTP client?
17:34:55FromDiscord<hugogranstrom> Yes, that correct
17:36:04FromDiscord<Chem> I would definitely file an issue if you can confirm it's not something weird on your end
17:36:05FromDiscord<hugogranstrom> In reply to @Chem ""Concrete" file downloads to": Interesting 🙂 TIL ↵Yeah when handling smaller files, storing them in memory works but when you get to this scale it can be a stretch
17:36:44FromDiscord<hugogranstrom> Mind trying to replicate it if you also have windows? It should be a small program
17:36:46FromDiscord<Chem> That would mean the Windows implementation can't download files over 4GB
17:36:48FromDiscord<Chem> Yeah sur
17:36:49FromDiscord<Chem> (edit) "sur" => "sure"
17:36:56FromDiscord<Chem> might just take a while to download because of the size
17:37:50FromDiscord<hugogranstrom> In reply to @Chem "That would mean the": Yeah that seems about right sadly
17:37:57FromDiscord<hugogranstrom> In reply to @Chem "Yeah sure": Nice, one minute
17:38:42FromDiscord<hugogranstrom> In reply to @Chem "might just take a": I'm spoiled with fiber since the autumn 🙃
17:42:53*vicfred joined #nim
17:44:55*vicfred_ joined #nim
17:46:57FromDiscord<hugogranstrom> sent a code paste, see https://play.nim-lang.org/#ix=2Vpw
17:47:11FromDiscord<hugogranstrom> (edit) "https://play.nim-lang.org/#ix=2Vpw" => "https://play.nim-lang.org/#ix=2Vpx"
17:47:41*vicfred quit (Ping timeout: 240 seconds)
17:47:57FromDiscord<Chem> You on Windows 10 out of curiosity?
17:48:16FromDiscord<hugogranstrom> Yes
17:51:51FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2VpA
17:52:08FromDiscord<Chem> (edit) "https://play.nim-lang.org/#ix=2VpA" => "https://play.nim-lang.org/#ix=2VpB"
17:52:16FromDiscord<hugogranstrom> I changed from Async to ordinary httpclient and it worked as well :/
17:52:37FromDiscord<Chem> (edit) "https://play.nim-lang.org/#ix=2VpB" => "https://play.nim-lang.org/#ix=2VpE"
17:52:47FromDiscord<Chem> Win10 comes with `curl` now apparently
17:53:05FromDiscord<Chem> you can use the verbose/showprogress flag and pipe the output
17:53:05FromDiscord<hugogranstrom> In reply to @Chem "Win10 comes with `curl`": That's nice 😄
17:53:08FromDiscord<Chem> if you wanna see progress
17:53:12FromDiscord<Chem> instead of re-implementing this yourself
17:53:52FromDiscord<Chem> `--progress-bar`
17:56:20FromDiscord<Chem> In reply to @hugogranstrom "I changed from Async": Would maybe file an issue anyways 🤔 Not really sure, dunno much about Nim or expected behavior/limitations
17:56:44*lkjasdf joined #nim
17:57:27FromDiscord<Chem> Would be grateful if anyone that's worked with porting C/C++ would be able to say if they see any obvious/glaring translation errors in this little snippet btw 🙏
17:57:42FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2Vpl
17:57:54FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2VpH
17:59:18FromDiscord<hugogranstrom> @Chem Many thanks for helping me out 😄 ↵Yes I'll file an issue, one would expect async and ordinary to work the same.
17:59:55FromDiscord<hugogranstrom> In reply to @Chem "Would be grateful if": Do you have any reason to belive it has errors? Any error messages or such?
18:00:50FromDiscord<Chem> It gets loaded as an addon `.dll` by an external, closed-source Windows application and the Nim once causes the application to crash immediately upon loading it haha
18:00:51*vicfred_ quit (Quit: Leaving)
18:01:08FromDiscord<Chem> whereas the C one pops up a console message on the screen that says "Hello world"
18:04:54FromDiscord<hugogranstrom> In reply to @Chem "It gets loaded as": Hmm okay, I'm not fluent in C++ by any means but from my little experience I don't see any glaring errors :/
18:05:08FromDiscord<hugogranstrom> But something with the function casting would be my guess
18:05:58FromDiscord<hugogranstrom> If Nim attaches more information to its functions than C++ does or something like that
18:07:53FromDiscord<hugogranstrom> In reply to @Chem "It gets loaded as": Have you looked at the generated Nim c++ code and compared?
18:11:30FromDiscord<Chem> Yeah I have, the generated Nim code even with `-d:danger` is essentially unreadable. Though it does look close enough to be honest
18:12:19FromDiscord<hugogranstrom> I don't think it's too chabby most of the time. But I think ordinary C++ is ugly as well 😛
18:12:30FromDiscord<Chem> https://media.discordapp.net/attachments/371759389889003532/829780761879904286/mreaper_nim.nim.c
18:13:34FromDiscord<hugogranstrom> I take back my word 😱
18:14:19FromDiscord<Chem> `nim c --cc:vcc --gc:orc --app:lib --noMain:on -d:danger --listcmd src/reaper_nim.nim`
18:14:28FromDiscord<Clonkk> In reply to @Chem "It gets loaded as": If you export Nim code to a dll I think you need a flag to not export the gc in your dll
18:14:53FromDiscord<Chem> Ahh the GC would mess with it?
18:15:08FromDiscord<Clonkk> Otherwise compiling Nim code into a dll that you call from C will be messy
18:15:24FromDiscord<Chem> Ah I was planning on having just Nim coded
18:15:25FromDiscord<Chem> (edit) "coded" => "code"
18:15:40FromDiscord<Chem> I only have the C code as the starting point for what works, trying to work backwards from that
18:16:24FromDiscord<Clonkk> Same thing. If you call Nim code from Nim using a dll you'll end up with weird gc issues
18:16:42FromDiscord<Chem> Ahh didn't know this
18:17:01FromDiscord<pranavbaburaj> I am new to nim and trying to run my first nim program . But, I get some errors.
18:17:07FromDiscord<Chem> > --gc:none. No memory management strategy nor a garbage collector. Allocated memory is simply never freed. You should use --gc:arc instead.
18:17:45FromDiscord<pranavbaburaj> sent a code paste, see https://play.nim-lang.org/#ix=2VpS
18:18:03FromDiscord<Clonkk> In reply to @Chem "> --gc:none. No memory": Give me a minute I'll find it out again
18:18:12FromDiscord<pranavbaburaj> sent a code paste, see https://paste.rs/WpJ
18:19:15FromDiscord<Chem> In reply to @SneakyBaguette "Give me a minute": I don't mind `gc:none`
18:20:03FromDiscord<Chem> I'm more just curious about getting the proper translation going, I think once I can do the first C struct + function pointers right, then I'll be able to translate most of the rest
18:21:20FromDiscord<Clonkk> https://nim-lang.org/docs/nimc.html#dll-generation
18:21:53FromDiscord<Clonkk> Its -d:useNimRtl
18:21:55FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=2VpT
18:22:08FromDiscord<Chem> > --embedsrc:on|off embeds the original source code as comments in the generated output↵This would probably be useful as well lol
18:22:20FromDiscord<Clonkk> In reply to @Chem "I'm more just curious": If it's simple code you can try c2nim and compare the result
18:22:20FromDiscord<haxscramper> In reply to @haxscramper "https://wandbox.org/permlink/6Z7te74WVUgnrGEv how d": It works perfectly fine for me on the playground, and even prints what is expected
18:22:27FromDiscord<Chem> In reply to @SneakyBaguette "Its -d:useNimRtl": 🤦‍♂️
18:22:39FromDiscord<Chem> In reply to @SneakyBaguette "If it's simple code": Unfortunately, this is using the output of `c2nim` 😅
18:22:56FromDiscord<Clonkk> Haha, well it looks correct
18:24:12FromDiscord<Clonkk> In reply to @Chem "🤦‍♂️": Read the docs carefully it's the nimRtl is tricky
18:24:26FromDiscord<Clonkk> It's not obvious at all
18:25:16FromDiscord<Chem> Oh wait no I'm an idiot -- `c2nim` actually changes based on whether you pass a `.c` or `.h` file
18:25:27FromDiscord<Chem> It'll convert function bodies as well if it's not a header
18:25:57FromDiscord<Chem> I just tried it as `.c` instead of the `.h` as it is in the source
18:26:45FromDiscord<Chem> https://media.discordapp.net/attachments/371759389889003532/829784344301404187/unknown.png
18:27:03FromDiscord<Chem> It just cant' translate this:↵`void (ShowConsoleMsg)(const char text) = rec->GetFunc("ShowConsoleMsg");`
18:27:07FromDiscord<Clonkk> Yeah c2nim can a lot of Things as long as the C code is straight forward
18:27:19FromDiscord<Chem> but I think `cast[ShowConsoleMsg](rec.GetFunc)` is right
18:28:09FromDiscord<Clonkk> In reply to @Chem "It just cant' translate": I don't see why not
18:28:10FromDiscord<Chem> Okey, I will add the `rtl` in there, I'm almost certain that's what it was -- thank you!! 🙏
18:28:45FromDiscord<Chem> https://media.discordapp.net/attachments/371759389889003532/829784849144479794/unknown.png
18:28:53FromDiscord<Chem> Just a bug, I hit quite a few of them with `c2nim` so far haha
18:29:09FromDiscord<Chem> but it's much better than nothing
18:29:14FromDiscord<Clonkk> Don't forget to generate the nimrtl.dll
18:29:28FromDiscord<Clonkk> You can try nimterop if c2nim fails
18:29:50FromDiscord<Clonkk> it's on github it can translate C code into Nim as well
18:30:05FromDiscord<Chem> Did not know about that, let me try to run that really quick instead as well
18:30:19FromDiscord<Chem> I'm sure between that Nimterop thing and the inclusion of the rtl DLL that'll probably do it
18:30:22FromDiscord<Clonkk> https://github.com/Clonkk/duckdb_wrapper
18:30:29FromDiscord<Chem> (it's got to be the runtime lib DLL missing)
18:30:32FromDiscord<Clonkk> Here is an example on duckdb
18:30:42FromDiscord<Chem> Bless u fren🙏
18:30:58FromDiscord<Chem> DuckDB is so cool
18:31:30FromDiscord<Clonkk> In reply to @Chem "(it's got to be": https://nim-lang.org/docs/nimc.html#dll-génération read more carefully 😋
18:32:55FromDiscord<Chem> Can you script the build process with this `.nims` configuration file, to automatically have the flags?
18:33:19FromDiscord<Clonkk> You should be able to
18:33:27FromDiscord<Chem> Will google this, ty
18:35:33FromGitter<awr1> is there a define that identifies the nim reference compiler as opposed to say, nlvm?
18:36:10FromGitter<awr1> if not there should be a PR for this
18:36:33FromDiscord<Clonkk> You can use --cc:gcc,--cc:clang
18:36:51FromDiscord<Clonkk> So switch which C compiler gets invoked
18:36:58FromDiscord<Clonkk> Is that what you meant?
18:37:01FromGitter<awr1> eh that's not robust enough
18:37:36FromGitter<awr1> unless you were talking to Chem
18:37:38FromDiscord<Clonkk> Why?
18:37:44m33[m]hi guys, I'm nearly finished with my 1st program in nim 🙂 I made a nimble package and all. I don't quite get if publishing nimbles packages is encouraged for single use apps, or only for frameworks, libraries and reusable components...?
18:37:57FromDiscord<Clonkk> In reply to @awr1 "is there a define": I was answering to this
18:38:24FromDiscord<Clonkk> In reply to @awr1 "eh that's not robust": Who do you think it's not robust
18:39:04FromDiscord<Clonkk> (edit) "Who" => "Why"
18:39:46FromGitter<awr1> because nim reference compiler has enough potential variability to its backend. there's no one simple define that says "this is the 'bonafide original' nim compiler suite." nim compiler can produce JS, C, C++, you can change the C compiler to your own custom thing, etc.
18:40:05FromDiscord<Clonkk> In reply to @m33 "hi guys, I'm nearly": Meh I've published package that I probably am the only one to use so I'd say go ahead
18:40:18FromDiscord<Clonkk> There is no nimble police to stop you 😆
18:40:59FromGitter<awr1> there is already a define (of sorts, not really a define but more of a magical directive) for `nimvm`
18:42:03FromDiscord<Clonkk> In reply to @awr1 "because nim reference compiler": Ah you mean inside Nim code?
18:42:27m33[m]<FromDiscord "<Clonkk> There is no nimble poli"> hum, what ? the nimble repository is not moderated ?
18:42:31FromDiscord<Clonkk> You can do when defined(cpp) for example
18:43:20FromDiscord<Clonkk> In reply to @m33 "<FromDiscord "<Clonkk> There is": In order to publish a package all you have to do is your package to the json package list and make a PR
18:43:35FromDiscord<Clonkk> All you're doing is adding a few lines to a json
18:43:48m33[m]<FromDiscord "<Clonkk> You can do when defined"> ok, a PR would be fine indeed
18:44:19FromDiscord<Clonkk> Nimble publish can do it fr you If you have a github token ready
18:44:38FromGitter<awr1> yes
18:45:04FromGitter<awr1> that might work, actually. basically i'm testing for emit pragma presence
18:45:32FromDiscord<Clonkk> When defined(js), when defined(gcc), when defined(clang) etc. should work I think
18:46:43FromDiscord<Clonkk> https://www.github.com/Clonkk/nimjl/tree/master/nimjl%2Fprivate%2Fbasetypes_helpers.nim
18:46:59FromDiscord<Clonkk> In reply to @awr1 "that might work, actually.": I do something like this in this file
18:47:23m33[m]<FromDiscord "<Clonkk> Nimble publish can do i"> oh, that would not work, my repos in on git.qoto.org. I have a github account of course but I try not to use it so often
18:47:58FromDiscord<haxscramper> Nimble can use non-github repositories
18:48:15FromDiscord<Clonkk> Where a function change definition on the C++ background because of const char /char  being different in C VS C++
18:48:48FromDiscord<Clonkk> In reply to @haxscramper "Nimble can use non-github": Yep. The github account is just to make the PR on the json package file
19:04:19*lritter quit (Ping timeout: 248 seconds)
19:07:41*vicfred joined #nim
19:10:45ForumUpdaterBotNew thread by Japplegame: Interrupt vector table implementation trouble, see https://forum.nim-lang.org/t/7763
19:22:31FromDiscord<Chem> sent a code paste, see https://play.nim-lang.org/#ix=2Vq7
19:22:46FromDiscord<Chem> Is this meant to be run from somewhere special, it appears to be compiling `./lib/nimrtl.nim` but that's not a file I know of
19:24:06FromDiscord<Chem> Ah it looks like it's part of the Nim source code
19:24:13FromDiscord<Chem> so need to clone from github
19:48:50FromDiscord<Conifer> iirc can I just slap parseInt/parseFloat infront of the readLine proc when asking for input?
20:03:15*narimiran quit (Ping timeout: 268 seconds)
20:04:32*NimBot joined #nim
20:07:00FromDiscord<ajusa> just to make sure I don't reinvent the wheel, are there libpcap bindings for Nim? Not just parsing pcap files like https://github.com/PMunch/nim-pcap but bindings that allow me to call pcap_loop directly?
20:14:39*Vladar quit (Quit: Leaving)
20:25:54*blueberrypie6 joined #nim
20:26:29*MightyJoe joined #nim
20:26:52*clemens3 quit (Ping timeout: 268 seconds)
20:26:53*blueberrypie quit (Ping timeout: 268 seconds)
20:26:53*ddevault quit (Ping timeout: 268 seconds)
20:26:53*cyraxjoe quit (Ping timeout: 268 seconds)
20:26:53*blueberrypie6 is now known as blueberrypie
20:27:04*ddevault_ joined #nim
20:28:40*clemens3 joined #nim
20:28:50*ddevault_ is now known as ddevault
20:59:18*gpanders quit (Remote host closed the connection)
21:04:24*lkjasdf quit (Quit: WeeChat 3.0.1)
21:04:48*lkjasdf joined #nim
21:29:49*tane_ quit (Quit: Leaving)
21:35:12ForumUpdaterBotNew post on r/nim by dullbananas: Are there any good examples with JavaScript FFI?, see https://reddit.com/r/nim/comments/mn236p/are_there_any_good_examples_with_javascript_ffi/
21:43:15ForumUpdaterBotNew post on r/nim by dullbananas: i switched, see https://reddit.com/r/nim/comments/mn2adg/i_switched/
21:45:57*leorize quit (Ping timeout: 240 seconds)
21:56:16*gpanders joined #nim
22:00:38*gpanders quit (Remote host closed the connection)
22:04:11*shmorgle quit (Ping timeout: 240 seconds)
22:08:32PMunchSeems like there's an increase in people using Nim for embedded :) https://forum.nim-lang.org/t/7763
22:12:59FromDiscord<inv> Hi, is it possible to have some static fields in object?
22:17:09FromDiscord<Hi02Hi> sent a code paste, see https://play.nim-lang.org/#ix=2Vre
22:18:09PMunch@Hi02Hi, yet that doesn't work in your example
22:19:43PMunchYou can do this though: https://play.nim-lang.org/#ix=2Vrf
22:20:30FromDiscord<inv> holy ...
22:22:35FromDiscord<inv> the first time I see the syntax
22:22:38FromDiscord<Hi02Hi> should have checked before replying, sorry
22:23:06PMunchI used that quite extensively in my Arduboy experiments. Basically having a type that on runtime was just a pointer to an array, but which on compile-time also knew the dimensions and size of the buffer. This was used to create optimisations for the Arduino target
22:23:31PMunchIt's just the generic syntax really, just tricked into keeping data for us :)
22:27:00FromDiscord<inv> How to write proc for it? https://play.nim-lang.org/#ix=2Vrg
22:28:47*hyiltiz quit (Ping timeout: 268 seconds)
22:30:04FromDiscord<inv> ok, probably better question: how to pass it from argument
22:30:49FromDiscord<inv> ... but I can pass it from generic 🙂
22:32:10*hyiltiz joined #nim
22:32:10*hyiltiz quit (Changing host)
22:32:10*hyiltiz joined #nim
22:32:46FromDiscord<InventorMatt> something like this
22:32:47FromDiscord<InventorMatt> https://play.nim-lang.org/#ix=2Vri
22:32:49PMunchYou can write a template I think to get around that
22:33:13PMunchOh, or like that I guess .P
22:41:00FromDiscord<inv> And the next question: how to initialize set with custom range? https://play.nim-lang.org/#ix=2Vrk
22:44:04FromDiscord<ElegantBeef> `{1..10}` `{11..14,16..19,110}`
22:44:29FromDiscord<ElegantBeef> Oh that
22:44:53FromDiscord<inv> it is still ``0..65535``
22:46:19FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2Vrl
22:46:24FromDiscord<ElegantBeef> It's how i'd do it atleast
22:46:34FromDiscord<ElegantBeef> Hmm need a macro for this
22:47:03FromDiscord<inv> hm, quite complicate for autogeneration
22:47:18FromDiscord<ElegantBeef> Proceeds to make a macro to add to the devel `std/setutils`
22:50:56FromDiscord<inv> thx
23:01:40FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2Vrt @inv
23:01:57FromDiscord<inv> thx
23:02:09FromDiscord<ElegantBeef> Now to make a PR and get told it's unneeded 😄
23:06:22FromDiscord<InventorMatt> for the original problem an rfc may be needed as it should be able to figure out the proper range automatically in a scenario like that
23:06:37FromDiscord<ElegantBeef> I suppose
23:07:34FromDiscord<ElegantBeef> Very much seems like this is a odd work around but it benefits if you use distincts
23:08:00FromDiscord<ElegantBeef> Hmm
23:08:11FromDiscord<ElegantBeef> Probably not really needed in setutils.... hmmmm
23:14:21FromDiscord<inv> Another question: https://play.nim-lang.org/#ix=2Vry
23:14:45FromDiscord<inv> With the new syntax (for me) - how can I pass field from one type into another?
23:15:35FromDiscord<ElegantBeef> Fields cannot be set
23:15:39FromDiscord<ElegantBeef> Atleast those ones
23:15:46FromDiscord<ElegantBeef> Those are static and apart of the type description
23:15:47FromDiscord<inv> undeclared field: 'field1' for type initFoo.b:type
23:16:01FromDiscord<ElegantBeef> Oh wait
23:16:03FromDiscord<ElegantBeef> Never mind 😄
23:16:23FromDiscord<inv> Trying: https://play.nim-lang.org/#ix=2Vrz
23:17:06*PMunch quit (Quit: leaving)
23:18:24FromDiscord<InventorMatt> this seems to get it to compile https://play.nim-lang.org/#ix=2VrA
23:18:39FromDiscord<ElegantBeef> https://play.nim-lang.org/#ix=2VrB or the explict generic https://play.nim-lang.org/#ix=2VrB
23:18:44FromDiscord<ElegantBeef> (edit) 04removed "https://play.nim-lang.org/#ix=2VrB"
23:18:54*jess joined #nim
23:20:10FromDiscord<inv> @InventorMatt, a bit strange , the only diff is in static for Bar which is static
23:21:22FromDiscord<inv> @ElegantBeef I was trying to replace F1 with static[int], but it did not work, but this one is fine - thx
23:22:39FromDiscord<InventorMatt> it is able to implicitly figure out the deafult parameters when you don't have the static there is my guess
23:30:46*krux02 quit (Remote host closed the connection)
23:58:11*lkjasdf quit (Ping timeout: 248 seconds)