<< 16-06-2023 >>

00:20:35*cedb quit (Quit: WeeChat 3.8)
00:26:50FromDiscord<wrld> how would I convert a string into a byte array
00:33:18*disso-peach joined #nim
00:34:14*derpydoo joined #nim
00:36:56FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/P4NTE
01:03:03*krux02 quit (Remote host closed the connection)
01:06:50FromDiscord<michaelb.eth> In reply to @wrld "how would I convert": stew/byteutils has `[string].toBytes`:↵https://github.com/status-im/nim-stew/blob/master/stew/byteutils.nim#L244-L254
01:08:45FromDiscord<michaelb.eth> note that `string`s in Nim:↵> are both zero-terminated and have a length field↵(quoting from the manual)
01:09:18FromDiscord<michaelb.eth> (edit) "manual)" => "Nim Manual)"
01:11:04FromDiscord<JJ> In reply to @mratsim "https://eli.thegreenplace.net/2016/the-expression-p": hey, that's a good read
01:38:59FromDiscord<arathanis> In reply to @Andreas "_Is Option[T] a Functor": i wish this worked. concepts are in a funky state right now
01:47:02FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4ymq
01:49:17FromDiscord<Elegantbeef> Hmph do wonder if stew's `when nimvm` is required in devel anymore...
01:49:36*disso-peach quit (Remote host closed the connection)
01:49:58*disso-peach joined #nim
01:51:30FromDiscord<Elegantbeef> Does seems to work now, yay!
02:13:20*azimut quit (Ping timeout: 240 seconds)
02:21:34*rockcavera quit (Remote host closed the connection)
02:40:29*rockcavera joined #nim
02:55:31FromDiscord<_gumbercules> You know what would be great?
02:56:07FromDiscord<_gumbercules> If I could build Nim without having to kill every every terminal and editor session I have running on my PC. Every time...
02:56:14FromDiscord<_gumbercules> Fucking nimsuggest
02:58:56FromDiscord<arathanis> that is so wild to me, are they ever going to fix it?
02:59:01FromDiscord<arathanis> ive never had it explode liken that
02:59:10FromDiscord<arathanis> but i know it does cause so many people talk about it
02:59:16FromDiscord<arathanis> (edit) "liken" => "like"
03:00:28FromDiscord<_gumbercules> Well it's not so much an explosion as it is the VSCode extension (I'm not sure how other editors behave) spawning instances of Nimsuggest and them not terminating and then Nim trying to touch nimsuggest.exe while `build_all.bat` is executing on Windows
03:00:40FromDiscord<_gumbercules> I'm sure this plauges other operating systems as well
03:00:43FromDiscord<arathanis> i use vscode too
03:00:53FromDiscord<_gumbercules> do you build Nim from source?
03:01:00FromDiscord<arathanis> only a handful of times
03:01:18FromDiscord<_gumbercules> well that's the thing - I am almost always developing against devel and building from source
03:01:30FromDiscord<arathanis> i usually use choosenim to load devel
03:01:45FromDiscord<_gumbercules> so when Nim's build script goes to build Nim tools it fails at nimsuggest
03:01:49FromDiscord<arathanis> but ive built specific builds of nim from source, like i said, a handful of times
03:01:53FromDiscord<_gumbercules> ah yeah I don't touch choosenim or Nimble
03:02:10FromDiscord<_gumbercules> or most of the things that dom wrote, because they tend not to work
03:02:20FromDiscord<arathanis> i do know sometimes the nim extension (the good 3rd party one that sees updates) takes an unfortunate amount of time to initialize
03:02:30FromDiscord<arathanis> then once its running it works ok but before that it basically does nothing
03:02:48FromDiscord<arathanis> i imagine this is from what everyone is complaining about
03:03:19FromDiscord<_gumbercules> I'm not sure - people complain about a lot when it comes to Nim's developer experience
03:04:16FromDiscord<arathanis> yeah the extension could be better
03:04:19FromDiscord<arathanis> i hope it improves
03:04:26FromDiscord<arathanis> things like rename symbol dont work
03:04:40FromDiscord<_gumbercules> I think the problem really lies in nimsuggest itself
03:04:41FromDiscord<arathanis> go to definition either doesnt work or is intermittent, i dont remember
03:04:57FromDiscord<arathanis> id love for the dev experience to be better
03:05:02FromDiscord<arathanis> its not the worst ive ever seen
03:05:11FromDiscord<arathanis> but it is certainly not the best
03:05:13FromDiscord<graveflo> you could just not compile nimsuggest if that makes life easier for you
03:05:43FromDiscord<arathanis> > You could just abandon tooling completely↵↵- Graveflo, 2023-06-15
03:05:46FromDiscord<arathanis> 😉
03:05:56FromDiscord<arathanis> (edit) "completely↵↵-" => "completely↵↵\-"
03:06:00FromDiscord<graveflo> LOL true tho
03:06:13FromDiscord<Elegantbeef> Gumber you could try gitnim instead of choosenim 😄
03:06:18FromDiscord<arathanis> WOAH, when did they add markdown for lists to discord? does it work for numbered lists?
03:06:29FromDiscord<arathanis> 1. does↵2. this↵3. do↵4. stuff?
03:06:34FromDiscord<arathanis> huh, it kind does
03:06:37FromDiscord<graveflo> but what I am saying is that if they are using the nim build script I assume they are compiling the nim executable often.. they can just compile nim and leave the nimsuggest executable alone
03:06:41FromDiscord<arathanis> wild this must be that last update
03:06:58FromDiscord<arathanis> In reply to @Elegantbeef "Gumber you could try": im still unsure about gitnim vs choosenim
03:07:21FromDiscord<arathanis> i wish there was some kind of full comparison that could show me how its better and/or different than choosenim and why i would use it over choosenim
03:07:21FromDiscord<Elegantbeef> Wait gumber uses windows so nevermind on gitnim
03:07:43FromDiscord<arathanis> oh is gitnim unix only? i need it to work on both platforms
03:08:19FromDiscord<_gumbercules> I think choosenim is not great because it's constantly breaking or doing bad things on various platforms
03:08:34FromDiscord<Elegantbeef> it uses libgit instead of using curl or similar, they're practically the same thing just one is a git executable
03:08:49FromDiscord<arathanis> In reply to @_gumbercules "I think choosenim is": the only issue ive ever had with choosenim is when nim 1.6.10 (i think?) was flagged by windows defender
03:08:57FromDiscord<_gumbercules> well that's probably not choosenim's fault
03:09:22FromDiscord<arathanis> and it wasnt choosenim's fault lol
03:11:50FromDiscord<_gumbercules> I think a lot of this depends on what you're doing and how you're doing it and what your expectations are regarding how the software should work
03:12:36FromDiscord<michaelb.eth> sent a long message, see http://ix.io/4ymL
03:13:41FromDiscord<michaelb.eth> occasionally it goes haywire and I need to quit vscode/emacs, possibly force-kill some nimsuggest processes, but that's become more and more infrequent, in my experience
03:13:43FromDiscord<arathanis> In reply to @michaelb.eth "I haven't had too": is there a nimlangserver?
03:13:52FromDiscord<arathanis> is there an extension for it? you got a link?
03:13:56FromDiscord<arathanis> id love to try alternatives
03:14:08FromDiscord<Elegantbeef> https://github.com/nim-lang/langserver
03:14:45FromDiscord<arathanis> In reply to @Elegantbeef "https://github.com/nim-lang/langserver": do i need to hook this up manually?
03:14:47FromDiscord<_gumbercules> hmm I might have to try out this mapping file thing
03:14:56FromDiscord<michaelb.eth> In reply to @_gumbercules "hmm I might have": works like a hose
03:14:58FromDiscord<Elegantbeef> "hook this up manually"
03:14:59FromDiscord<graveflo> In reply to @arathanis "do i need to": not in vscode. I had to in kate tho
03:15:06FromDiscord<_gumbercules> just install saem's vscode extension
03:15:15FromDiscord<_gumbercules> and it sounds like it's included
03:15:17FromDiscord<arathanis> In reply to @Elegantbeef ""hook this up manually"": did i stutter?
03:15:34FromDiscord<Elegantbeef> This isnt a 1940s switchboard
03:15:37FromDiscord<graveflo> Doesnt the lang server just use nimsuggest tho? I thought it was just for compat
03:15:50FromDiscord<arathanis> In reply to @Elegantbeef "This isnt a 1940s": and we are all thankful for that
03:15:54FromDiscord<graveflo> In reply to @Elegantbeef "This isnt a 1940s": your right its much more complicated with broken shit everywhere
03:15:57FromDiscord<Elegantbeef> It uses nimsuggest but it monitors it
03:16:15FromDiscord<Elegantbeef> It also uses v3 of nimsuggest which is supposed to be betterer
03:16:53FromDiscord<arathanis> 👀 nimsuggest 👀↵nimsuggest: eats the ram↵nimlangserver: 🔪
03:22:23FromDiscord<wrld> In reply to @arathanis "👀 nimsuggest 👀 nimsuggest:": wtf s nimsuggest
03:22:31FromDiscord<wrld> I have like 60 of those in my task manager and they eat up 500mb of ram each
03:22:45FromDiscord<odexine> the thing that gives you completions for nim
03:22:58FromDiscord<arathanis> In reply to @wrld "wtf s nimsuggest": its a nim program that is part of the nim toolchain that you run against code and it gives completion options and shit
03:23:06FromDiscord<wrld> nice
03:23:14FromDiscord<arathanis> its notoriously buggy and likes to pretend it's chrome and gobble RAM
03:26:13FromDiscord<Elegantbeef> Turns out neutering a compiler and making it not do silly things is hard
03:27:29FromDiscord<arathanis> In reply to @Elegantbeef "Turns out neutering a": nimsuggest is just a lobotomized compiler?
03:27:37FromDiscord<odexine> q yes
03:27:38FromDiscord<odexine> (edit) removed "q"
03:27:40FromDiscord<arathanis> lmao that is amazing
03:27:48FromDiscord<arathanis> everything makes so much sense
03:28:51FromDiscord<Elegantbeef> That's how most tooling is
03:29:04FromDiscord<Elegantbeef> You want to do compiler stuff, but slightly different
03:29:16FromDiscord<Elegantbeef> You arent going to rewrite a compiler but make it just do suggestions
03:41:25FromDiscord<_gumbercules> I think it depends on the complexity of the compiler, but Nim's compiler definitely trends towards being complex af
03:42:39FromDiscord<michaelb.eth> hard for it not to be, since it's targeting multiple backends with the targets having divergent semantics?
03:42:55FromDiscord<michaelb.eth> (edit) "be," => "be?"
03:43:13FromDiscord<Elegantbeef> Also macros 😄
03:43:22FromDiscord<_gumbercules> oh yeah I'm not tossing shade
03:43:35FromDiscord<_gumbercules> although I'm sure it could be written to be less complex - but Nim's a long running software project
03:43:44FromDiscord<_gumbercules> and we all know how those go in terms of being able to design and plan
03:44:01FromDiscord<_gumbercules> I do think Nim's compiler, esp the backend, is a bit hairier than it needs to be due to legacy cruft / half-baked features
03:44:11FromDiscord<_gumbercules> but untangling gand removing that stuff isn't trivial at this point so 🤷
03:44:15FromDiscord<michaelb.eth> not saying it's the better or correct approach but back in early 2010+, attempts to provide Clojure backends for JavaScript were spun out to separate repositories, and they've stayed that way ever since
03:44:17FromDiscord<_gumbercules> I guess that's why Nimskull is ia thing
03:44:33FromDiscord<_gumbercules> (edit) "ia thing" => "a thing, amongst other reasons"
03:44:43FromDiscord<michaelb.eth> it's then up to the maintainers of ClojureScript, etc. to keep pace with clojure.org
03:44:45FromDiscord<_gumbercules> https://github.com/pmetras/nim0 - I still want to dive into this at some point
03:45:04FromDiscord<_gumbercules> In reply to @michaelb.eth "it's then up to": yeah that's an interesting model
03:45:28FromDiscord<michaelb.eth> (edit) "not saying it's the better or correct approach but back in early 2010+, attempts to provide Clojure backends for JavaScript ... were" added "and `C#`"
03:45:30FromDiscord<_gumbercules> Nim benefits and at the same time suffers I think from trying to do too much with all of its backends
03:46:34FromDiscord<Elegantbeef> Well that's partially due to how much backend leaks into transf and earlier code 😄
03:47:14FromDiscord<_gumbercules> yeah - also I think it suffers from not having enough focus or direction - like all of the web stuff distracts from the systems programming stuff and vis versa
03:47:14FromDiscord<michaelb.eth> https://github.com/clojure/clojure-clr↵https://github.com/clojure/clojurescript↵↵note: their part of the same GH org, but otherwise separate codebases
03:47:24FromDiscord<michaelb.eth> (edit) "their" => "they're"
03:47:53FromDiscord<michaelb.eth> (edit) "https://github.com/clojure/clojure-clr↵https://github.com/clojure/clojurescript↵↵note:" => "https://github.com/clojure/clojure-clr↵https://github.com/clojure/clojurescript↵note:"
03:48:11FromDiscord<_gumbercules> like it'd be really nice to have hot code reloading for the C backend and it could be done right now, and Nim could have a repl
03:49:17FromDiscord<_gumbercules> and Nim could have taken that grant money back in the day and produced something usable but the focus and attention is always divided
03:49:44FromDiscord<_gumbercules> The advent of ARC/ORC was great and needed to provide an alternative to local GC'd heaps
03:50:05FromDiscord<_gumbercules> but there's always a lot of time wasted on bullshit experimental stuff that ends up sitting around and adding complexity and offering zero value
03:50:07FromDiscord<michaelb.eth> hindsight's 20/20 but you have a good point, maybe the community can propose a better way forward?
03:50:16FromDiscord<_gumbercules> another example - region GC
03:51:09FromDiscord<_gumbercules> well, the way forward would be to not allow something to be mainlined until it works beyond simple toy examples / adds actual value beyond looking or sounding cool in niche places
03:51:31*xet7 joined #nim
03:51:43FromDiscord<_gumbercules> I get that experimentation and ideation are necessary in moving things fowrard, but it shouldn't happen to the detriment of the compiler or stdlib
03:52:02FromDiscord<_gumbercules> which in the past it has - and yeah you're right it is 20/20 and I thankfully don't steer the ship that is Nim
03:52:13FromDiscord<_gumbercules> and I'm sure I'd probably do a much worse job at it than Andreas has
03:52:39FromDiscord<_gumbercules> at least re: hot code relaoding for C, it's easy enough to do in userland
03:53:08FromDiscord<michaelb.eth> right, but in likewise practical terms it could mean saying: "the canonical backend is C, the canonical backend is ORC/ARC", then plow forward with the implications of that, and alternative backends, GCs, etc. can deal with it, else die on the vine
03:53:14FromDiscord<Elegantbeef> gib views
03:53:17FromDiscord<michaelb.eth> (edit) "backend" => "GC"
03:53:45FromDiscord<michaelb.eth> In reply to @michaelb.eth "right, but in likewise": in their own repositories, I mean
03:54:09FromDiscord<_gumbercules> yeah - I think in hindsight this might have worked out better but who knows - it might have led to some kind of plugin design or architecture for the compiler
03:54:27FromDiscord<michaelb.eth> In reply to @_gumbercules "yeah - I think": not a bad thing?
03:54:31FromDiscord<_gumbercules> but Nim was first authored in Object Pascal I believe and shipped with a PHP backend
03:54:35FromDiscord<_gumbercules> at one point
03:54:51FromDiscord<_gumbercules> so things are quite different now than they were when the language was first being dessigned and implemented
03:55:14FromDiscord<_gumbercules> In reply to @michaelb.eth "not a bad thing?": no, just probably extremely difficult to do at this juncture
03:55:37FromDiscord<_gumbercules> maybe not - I'm not a compiler developer so 🤷
03:56:16FromDiscord<_gumbercules> I am trying to figure out what scripting language to use in this thing I'm making though. I have to keep pushing the idea of writing my own out of my head.
03:56:24FromDiscord<_gumbercules> Although I would like to try some things out....
03:56:44FromDiscord<Elegantbeef> You know my vote 😄
03:56:54FromDiscord<_gumbercules> Nimscript?
03:57:20FromDiscord<_gumbercules> or Wasm?
03:57:26FromDiscord<_gumbercules> I'm already compiling my Nim program to wasm
03:57:27FromDiscord<Elegantbeef> Of course not
03:57:28FromDiscord<Elegantbeef> Use wasm instead of a scripting language 😛
03:57:28FromDiscord<michaelb.eth> Lua (or TCL!) should have a low bar for that, as long the thing you're making is simple to interface to/from C
03:57:32FromDiscord<_gumbercules> maybe I should have it run wasm
03:57:36FromDiscord<_gumbercules> wasm in wasm
03:58:14FromDiscord<_gumbercules> I have this Elixir app which is hosting a Nim program compiled to wasm (via emscripten atm) in a phoenix live view
03:58:34FromDiscord<_gumbercules> it's also acting as the signaling server for the webrtc connections I'm establishing between the live view sessions
03:59:03FromDiscord<_gumbercules> which the Nim guest program will use for networking sockets (this is for game netcode btw)
03:59:23FromDiscord<_gumbercules> I want the Nim guest to really act as a sort of runtime for a fantasy console
03:59:54FromDiscord<_gumbercules> so it will expose an API which you'll be able to consume in some scripting language
04:00:07FromDiscord<_gumbercules> so you can write little games in - similar to a fantasy console or whatever
04:01:22FromDiscord<_gumbercules> In reply to @Elegantbeef "Use wasm instead of": What do you recommend for being able to execute wasm from a Nim host?
04:01:32FromDiscord<Elegantbeef> I have some bindings for wasm3
04:01:39FromDiscord<_gumbercules> I'm curious to see if I can get it working in my Nim guest program haha
04:01:53FromDiscord<_gumbercules> In reply to @Elegantbeef "I have some bindings": okay thanks - I'll check em out
04:02:01FromDiscord<Elegantbeef> Pure C like 17 functions and compiles without any external deps
04:03:00FromDiscord<Elegantbeef> I havent tried to compile it to wasm I imagine it works
04:07:55FromDiscord<wrld> im currently using a single json file as my DB for 17k users
04:08:03FromDiscord<wrld> when will it blow 💀
04:10:41FromDiscord<_gumbercules> time to partition it into multiple json files
04:12:41FromDiscord<_gumbercules> and then you could create some hooks in your program that unmarshal, update and marshal a b-tree so that you can lookup users faster
04:13:08FromDiscord<_gumbercules> when a user record in your json file is inserted updated or deleted
04:13:27FromDiscord<_gumbercules> json files excuse me, I forgot it was partitioned
04:17:00FromDiscord<michaelb.eth> been thinking about a Nim wrapper for CozoDB, could be fun/useful/interesting:↵https://github.com/cozodb/cozo
04:17:41FromDiscord<michaelb.eth> time travel in a db is a neat feature, got introduced to the idea re: Datomic some years ago
04:19:23FromDiscord<_gumbercules> Doesn't the whole vector thing make it only practical for AI?
04:19:35FromDiscord<_gumbercules> I don't even really know what a vector database is, I just know it has to do with AI and LLMs
04:19:45FromDiscord<michaelb.eth> the query language seems like it could be expressed/translated re: Nim's grammar, so you could write querys, etc. in plain Nim, i.e. without embedding them in `""" ... """`
04:21:08FromDiscord<_gumbercules> I always thought - https://apple.github.io/foundationdb looked interesting
04:22:58FromDiscord<_gumbercules> https://apple.github.io/foundationdb/design-recipes.html
04:23:40FromDiscord<_gumbercules> quite cool how you can simply add layers to add capabilities to your database model
04:24:24FromDiscord<_gumbercules> https://apple.github.io/foundationdb/api-c.html - there's a C API as well
04:31:49FromDiscord<odexine> In reply to @michaelb.eth "the query language *seems*": Seems possible but sounds like a pain
05:10:51*derpydoo quit (Ping timeout: 260 seconds)
06:25:25FromDiscord<JJ> In reply to @arathanis "nimsuggest is just a": a bunch of stuff nim does is weird because it did it early tbh
06:26:27FromDiscord<JJ> compiling to both c and javascript for coverage was fantastic but if you're writing a compiler today you want to target llvm and get backends for free
06:26:27FromDiscord<Elegantbeef> I still don't get how that's weird
06:27:05FromDiscord<JJ> similarly nimsuggest hit the scene before the language server protocol iirc
06:27:27FromDiscord<Elegantbeef> It did, but regardless the same logic needs to be used
06:27:39FromDiscord<JJ> eh it's not weird really it's just not what you would do today
06:27:45FromDiscord<JJ> yea
06:28:42FromDiscord<Elegantbeef> Well you replace nimsuggest's protocol with lsp, you'd still use the compiler's source 😄
06:29:52FromDiscord<Elegantbeef> I do wonder how rust analyzer is written
06:30:02*rockcavera quit (Remote host closed the connection)
06:49:02FromDiscord<huantian> https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/architecture.md
06:49:05FromDiscord<huantian> Might help
06:49:09FromDiscord<huantian> Haven’t read
06:50:59FromDiscord<huantian> Yeah it seems they use a custom “syntax tree” that they have libraries to parse rust code into
06:51:09FromDiscord<huantian> Instead of relying on the compiler
06:51:34FromDiscord<Elegantbeef> That doesnt make sense given that it has macros
06:51:59FromDiscord<huantian> Kinda like what I talked about with python concrete syntax trees in the past I’d assume
06:52:02FromDiscord<huantian> In reply to @Elegantbeef "That doesnt make sense": No idea
06:52:35FromDiscord<Elegantbeef> > Rustc can produce metadata files (--emit metadata). These metadata files are like header files for Rust crates. They’re internally a compiler-specific binary format and cannot be inspected.↵They do call `rust --emit=metadata` so wonder if that helps a bit
06:52:41FromDiscord<huantian> Maybe the syntax.md doc goes into more detail
06:55:15FromDiscord<huantian> > Syntax trees are lossless, or full fidelity. All comments and whitespace get preserved.↵> Syntax trees are semantic-less. They describe strictly the structure of a sequence of characters, they don't have hygiene, name resolution or type information attached.
06:55:24*PMunch joined #nim
06:56:28FromDiscord<huantian> Maybe they use a combination of stuff from rust compiler and the syntax tree thing?
06:57:24FromDiscord<Elegantbeef> Perhaps, just trying to figure out how they get any semantically checked code inside 😄
06:57:38FromDiscord<Elegantbeef> Seems they invoke rustc and it emits `.meta` which can be used
06:57:47FromDiscord<Elegantbeef> So in essence what IC will do
06:58:27FromDiscord<huantian> They stuff they talk about with salsa and ic in guide.md is kinda neat
06:59:25FromDiscord<czgchsz> Why hello elegant beef
07:00:04FromDiscord<czgchsz> What's salsa, I only know about salsa20 \:c
07:05:51FromDiscord<Elegantbeef> Hello whoever you are
07:21:42NimEventerNew Nimble package! hyperloglog - A HyperLogLog data structure implementation in Nim, see https://github.com/deNULL/hyperloglog
07:38:25*ntat joined #nim
07:40:29FromDiscord<mratsim> In reply to @_gumbercules "I think the problem": Not only. Only 1 nimsuggest instance is needed. And nimsuggest shouldn't choke on generics/statics/macros.
08:18:12*ntat quit (Quit: Leaving)
08:24:25FromDiscord<Andreas> In reply to @arathanis "i wish this worked.": i wished, too. I found this while searching for concept examples. Maybe somebd can remove it from the docs...
08:25:54FromDiscord<Andreas> (edit) "In reply to @arathanis "i wish this worked.": i wished, too. I found this while searching for concept examples. Maybe somebd can remove it from the docs... ... " added "And the nice Graph-example as well, throws an error `of` not supported"
08:37:42FromDiscord<mratsim> In reply to @Andreas "i wished, too. I": Open bugs with repro. Then they get in the anti-regression suite
08:38:12FromDiscord<mratsim> I have made hundreds of bugs on the typesystem re generics/static/concepts
08:39:06*xet7 quit (Quit: Leaving)
08:46:14FromDiscord<thesherwood> Is there any `perror` equivalent in nim?
08:49:16PMunchgetCurrentExceptionMsg() I guess is the closest
08:49:25PMunchApart from just calling perror of course
08:49:26FromDiscord<arathanis> In reply to @mratsim "Open bugs with repro.": how do you open a bug when the functionality just isnt describes correctly?
08:49:42FromDiscord<arathanis> (edit) "describes" => "described"
08:56:12FromDiscord<thesherwood> sent a code paste, see https://play.nim-lang.org/#ix=4ynw
08:58:28FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4yny
08:59:32FromDiscord<arathanis> (edit) "https://play.nim-lang.org/#ix=4yny" => "https://play.nim-lang.org/#ix=4ynz"
09:00:22FromDiscord<arathanis> oh the article taking about this was posted by @ringabout
09:00:41FromDiscord<arathanis> im assuming its the same one
09:00:43FromDiscord<arathanis> (edit) "one" => "person"
09:01:21FromDiscord<thesherwood> Thanks, I'll give that a go
09:03:34FromDiscord<thesherwood> That does the job
09:03:41FromDiscord<arathanis> slick
09:03:45FromDiscord<arathanis> good to know
09:03:58FromDiscord<arathanis> and glad it worked
09:05:10FromDiscord<thesherwood> yeah. me too. I would not have thought to try something like that. Am I right in thinking that `cstringConstImpl` is just an alias of `cstring`? Or is it narrower on account of the pragma?
09:05:58*ntat joined #nim
09:06:06FromDiscord<arathanis> so i dont really know
09:06:17FromDiscord<arathanis> my current assumption is that the importc teaches nim how to compile it to C
09:06:26FromDiscord<arathanis> setting it to cstring teaches Nim how to use it
09:06:42FromDiscord<arathanis> and making it distinct keeps it isolated so you can use it as its own type
09:07:34FromDiscord<arathanis> ive never combined importc with assignment before
09:07:48FromDiscord<leorize> since it's in the default-imported headers, you can use `{.importc, nodecl.}` or `{.importc, header: "<stdio.h>".}`↵(@thesherwood)
09:07:53FromDiscord<thesherwood> Okay. So the importc pragma is telling nim how to compile it and the `cstring` is telling nim that it can be used in the same places a `cstring` can?
09:08:37FromDiscord<arathanis> In reply to @thesherwood "Okay. So the importc": or at least to inherit the semantics, probably keeps garbace collection working and stuff
09:08:48FromDiscord<thesherwood> In reply to @leorize "since it's in the": Interesting, I'll try that too
09:09:16FromDiscord<thesherwood> In reply to @arathanis "or at least to": Gotcha. that makes sense
09:09:30FromDiscord<leorize> importc, surprisingly has little to do with c \:P
09:09:36FromDiscord<arathanis> also lets you do `"give me a const char ptr!".constCharPtr`
09:10:11FromDiscord<arathanis> In reply to @leorize "importc, surprisingly has little": its basically telling it how to represent it no whatever backend you choose, right?
09:10:25FromDiscord<leorize> so `importc` tells Nim that the implementation is in an external symbol using C's mangling (aka. no name mangling)
09:10:38FromDiscord<arathanis> there is also `importcpp` and `importjs` but they arent actually any different than `importc`
09:10:58FromDiscord<thesherwood> In reply to @leorize "so `importc` tells Nim": Oh. So that's why it is used with the js backend as well? just to prevent mangling?
09:11:05FromDiscord<leorize> it does not have an effect on how the function is called, how the parameters are interpreted, what calling convention should be used
09:11:06FromDiscord<leorize> yep
09:11:17FromDiscord<arathanis> In reply to @leorize "so `importc` tells Nim": unless you follow the importc with a string, in which case you are also showing it how to emit backend code
09:11:21FromDiscord<thesherwood> In reply to @arathanis "there is also `importcpp`": I did not realize that
09:11:21FromDiscord<leorize> `importjs` is an alias for `importc`
09:11:34FromDiscord<arathanis> In reply to @thesherwood "I did not realize": yeah
09:11:41FromDiscord<arathanis> importc used to be the only one that existed
09:11:49FromDiscord<arathanis> importcpp and importjs are just aliases for readability
09:11:50FromDiscord<leorize> if you follow `importc` with a string, you tell the compiler what the real external symbol name is, useful for names that are not valid Nim
09:12:12FromDiscord<leorize> `importcpp` does have some extra functions that affect codegen, mind you
09:12:42FromDiscord<leorize> in particular it supports a form of pattern substitution in the generated C++/JS code, mainly used for classes and/or namespaced symbols
09:12:52FromDiscord<thesherwood> Gotcha. Is objective-C also a backend or am I confusing that with some other language?
09:12:56FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4ynC
09:13:05FromDiscord<arathanis> In reply to @leorize "in particular it supports": oh yeah, it supports the template lib stuff
09:13:28FromDiscord<arathanis> In reply to @thesherwood "Gotcha. Is objective-C also": its another language
09:13:38FromDiscord<arathanis> its Apple's Pre-Swift language
09:13:41FromDiscord<arathanis> (edit) "Pre-Swift" => "pre-Swift"
09:13:43FromDiscord<leorize> yes it is but it's so under utilized I don't know if it even work these days↵(@thesherwood)
09:14:12FromDiscord<thesherwood> gotcha. that is good to know
09:15:25FromDiscord<leorize> while not very apparent, `cstring` is as unsafe as `ptr char` for C backend (since it's the same thing, with even less obvious unsafe markers)
09:15:40FromDiscord<thesherwood> So no gc for cstring?
09:15:52FromDiscord<leorize> yes
09:16:06FromDiscord<leorize> cstring is mainly used for "loaned" resources
09:16:30FromDiscord<arathanis> now i thougt cstrings were GCed? do you actually need to be freeing them?
09:16:37FromDiscord<arathanis> (edit) "thougt" => "thought"
09:16:45FromDiscord<leorize> say, a `cstring` coming from `string` is the physical character buffer of that `string`, and will be freed when the originating `string` is GC-ed
09:17:10FromDiscord<arathanis> but doing `cstring("some init string")` is not that way?
09:17:16PMuncharathanis, correct
09:17:30FromDiscord<arathanis> whats the proper way to clean up such a cstring?
09:17:36FromDiscord<arathanis> dealloc(var)?
09:17:43FromDiscord<arathanis> (edit) "dealloc(var)?" => "dealloc(identifer)?"
09:17:48FromDiscord<arathanis> (edit) "dealloc(identifer)?" => "`dealloc(identifer)`?"
09:17:53FromDiscord<leorize> in that case it's a static cstring where the buffer is stored within the executable area of the executable↵(@arathanis)
09:18:07FromDiscord<arathanis> In reply to @leorize "in that case it's": ehh i shoudl have guessed that lol
09:18:12FromDiscord<arathanis> (edit) "shoudl" => "should"
09:18:19FromDiscord<leorize> no memory is actually allocated on the heap, so no freeing needed
09:18:38FromDiscord<arathanis> im trying to think of a way that would init a cstring without an underlying nim string
09:18:43PMunchIf you actually wanted a heap allocated cstring you would need to get it memory somehow
09:18:49FromDiscord<arathanis> that isnt just a constant in the data block of the binary
09:18:51PMunchSo how to clear it out would depend on how you got it
09:19:09FromDiscord<leorize> `alloc()` -\> `cast[cstring]` is the usual route
09:19:17FromDiscord<arathanis> ahh got it
09:19:35FromDiscord<arathanis> i was wondering if there was some way to do it that didnt make it obvious you were allocating non-GCed memory
09:19:51FromDiscord<arathanis> like a gotcha to look out for
09:20:14FromDiscord<arathanis> so one particular risk is if you pass a cstring into a C function that is based on a nim string
09:20:22FromDiscord<arathanis> and that function actually hold onto and needs that cstring
09:20:25FromDiscord<arathanis> but the GC cleans it up
09:20:28FromDiscord<arathanis> gonna blow up in your face
09:20:34PMunch`var myHeapCstring = cast[cstring](alloc0(100)); dealloc(myHeapCstring)`
09:20:41FromDiscord<leorize> yep, luckily most C functions actually clone the string
09:20:52FromDiscord<arathanis> and unluckily most is not all
09:21:05FromDiscord<leorize> so you gotta read the docs \:P
09:21:07PMunchYeah, be sure to read the documentation for C libraries
09:21:11FromDiscord<arathanis> true
09:21:15FromDiscord<arathanis> docs are never innacurate 😎
09:21:19PMunch:P
09:21:38PMunchIt's unfortunately the best thing you've got in C, after looking at the impl of course
09:22:03PMunchYou could also do something silly like make a cstring from something allocated on your heap
09:22:10PMunch*on your stack
09:22:27PMunchThat would also blow up if the library tried to use it after your function returns
09:23:32PMunchOf course if it tries to realloc your cstring you'd likely run into issues as well
09:24:09FromDiscord<leorize> nim is pretty lackluster on the borrowing front
09:26:15*ntat quit (Quit: Leaving)
09:28:14FromDiscord<leorize> the easiest hidden bomb I can think of is loaning a `cstring` from `string` then you append into the `string`
09:28:49FromDiscord<leorize> the code will look pretty damn innocent and will work like 98% of the time too
09:28:51FromDiscord<arathanis> converting a string to cstring then apending to it?
09:29:14FromDiscord<leorize> like this\: `let cs = cstring(str); str.add "stuff"; use(cs)`
09:29:23FromDiscord<arathanis> ohhh cause if it decides to realloc in a new block instead of just extending the block then the cstring is unallocated pointer
09:29:34FromDiscord<arathanis> kablooey
09:29:51FromDiscord<arathanis> (edit) "ohhh cause if it decides to realloc in a new block instead of just extending the block then the cstring is ... unallocated" added "an"
09:30:45PMunchYup
09:30:56PMunchThat's actually a catcha I've never thought about..
09:31:35FromDiscord<mratsim> In reply to @arathanis "how do you open": you took examples from the manual and they don't work though right?
09:31:44FromDiscord<arathanis> In reply to @mratsim "you took examples from": yeah
09:31:50FromDiscord<arathanis> havent worked for a long while
09:31:55FromDiscord<mratsim> In reply to @arathanis "yeah": that's a bug
09:34:25FromDiscord<arathanis> In reply to @mratsim "that's a bug": work around, different syntax?
09:34:41FromDiscord<arathanis> cause some of the features of concepts just dont seem to work at all
09:34:47FromDiscord<arathanis> granted its been a while since i last looked
09:35:29FromDiscord<leorize> concepts not working and generics 🥪 are classical nim problems
09:35:57FromDiscord<arathanis> generics sandwhich? what is that haha
09:36:02FromDiscord<arathanis> concepts im familiar with
09:36:05FromDiscord<arathanis> its cool when it works
09:36:06FromDiscord<arathanis> when
09:36:13FromDiscord<arathanis> (edit) "concepts ... im" added "not working"
09:36:33FromDiscord<mratsim> In reply to @arathanis "work around, different syntax?": no, if an example in the manual doesn't work, it's a bug, either in the manual or in the compiler but it's a bug for sure
09:37:04FromDiscord<mratsim> In reply to @arathanis "generics sandwhich? what is": https://tenor.com/view/first-time-meme-movie-james-cameron-western-gif-17538858
09:37:35FromDiscord<arathanis> i guess it is, what is generics sandwich referring to?
09:37:37FromDiscord<mratsim> https://github.com/nim-lang/Nim/issues/11225
09:38:10FromDiscord<mratsim> Don't be fooled by the closed status, it's a whack-in-a-mole
09:38:34FromDiscord<mratsim> Probably related to this: https://github.com/nim-lang/Nim/issues/8677
09:39:50FromDiscord<leorize> basically if you try to use generics in a useful way to solve some complex problems, it jumps on you and you spend 2hrs debugging missing imports and/or binds or whatsnot
09:40:05FromDiscord<leorize> then you read about the 🥪 and contemplate switching languages
09:49:01FromDiscord<graveflo> that was very relatable
10:32:25*antranigv joined #nim
10:42:58PMunchHmm, how do people here deal with repeating code with only minor differences?
10:43:42PMunchLike I've written a procedure which takes a sequence of rectangles and moves them to the left edge of the screen 2048 style (but not on the same kind of grid as 2048)
10:44:22PMunchThen I copied that procedure and changed all the x's for y's and the w's for h's, works fine.
10:44:44NimEventerNew question by Miiao: black_box analogue in Nim, see https://stackoverflow.com/questions/76489400/black-box-analogue-in-nim
10:44:54PMunchThe algorithm is also pretty much exactly the same, just with some minor tweaks to move them to the right and bottom
10:45:07PMunchBut this has left me with 4 almost identical procedures
10:47:00FromDiscord<mratsim> sent a long message, see http://ix.io/4ynN
10:47:32FromDiscord<odexine> In reply to @mratsim "But what language would": theres no good alternative, which is pain xdddd
10:47:45FromDiscord<mratsim> In reply to @PMunch "But this has left": generics, template, factoring the same stuff in a proc or keeping those separate
10:48:33FromDiscord<mratsim> It really depends on the size of the code, how complex the program flow is, how buggy I expect that to be, how much rewrite I expect, the quality of the test suite
10:49:11FromDiscord<mratsim> Also there might be a mathematical name for what you did (applying a matrix?)
10:49:34FromDiscord<demotomohiro> @pmunch How about to add a enum param/static enum param and use `when`, or `case of` where code need to be changed.↵Or use template.
10:50:17FromDiscord<graveflo> lets not forget that mathematics leads itself to general algos too.. If you are just doing a type of transformation maybe you are just coding the procs logic wrong
10:53:40PMunchYeah I've refactored to a template, like this: https://play.nim-lang.org/#ix=4ynS
10:53:45PMunchBut it's not exactly pretty..
10:55:35PMunch`shuffleUp` would then be implemented as `shuffleSmall(y, x, h, w)`
10:55:42PMunchBut it's all pretty cryptic
10:56:32FromDiscord<graveflo> That is a monster if statement LOL
10:57:33FromDiscord<graveflo> you might want to join the larger sections of the if statement with `and` instead especially since the sub conditions are easily flippable
11:07:40PMunchHaha, yeah it's to check if there is another placed square which we would collide with. Basically just checks for overlay
11:08:29PMunchNot quite sure what you mean about joining the sections with `and`, that would change the logic of it..
11:11:57PMunchThen of course you have the shuffleBig variant which is almost exactly the same thing: https://play.nim-lang.org/#ix=4ynW
11:13:12PMunchBut I can't think of a good way to combine that which wouldn't just make them super hard to read
11:21:11FromDiscord<graveflo> no I was talking about demorgans law, flipping the inequalities and joining with `and` since its slightly faster.. Nevermind that though it doesn't really matter.
11:21:56FromDiscord<graveflo> having the members named things like `coord` and `dim` makes it pretty difficult to read the intent of that code
11:36:51PMunchYeah..
11:37:07PMunchIt was either x/y or w/h depending on which way you applied it
11:37:13PMunchNot sure how to make it clearer..
11:37:26PMunchI mean I could split that massive if into its own procedure :P
11:38:52PMunchAnd name things like `other.rect.y > square.rect.y + square.rect.h` something like `other.below(square)`
11:39:19PMunchOf course that makes it harder to put into a template..
11:39:29FromDiscord<graveflo> so what is it that this code is trying to do? It looks almost like collision detection. What does "shuffle" mean here?
11:42:19PMunchEh, shuffle is a very poor choice of name
11:42:40PMunchIt takes a list of rectangles, then it moves them to an edge of the screen
11:43:18PMunchBut they collide with each other like in Tetris or 2048
11:43:49FromDiscord<graveflo> oh so this is predicting the trajectory as opposed to doing that in real time I suppose?
11:44:55PMunchLike this: https://play.nim-lang.org/#ix=4yo2
11:46:31FromDiscord<graveflo> I see. If they are moving all in one direction and that direction is a straight line that sounds pretty manageable
11:48:41PMunchhttps://uploads.peterme.net/preshuffle.png -> https://uploads.peterme.net/shuffleright.png
11:49:04PMunchYeah it's nothing complicated
11:51:01FromDiscord<odexine> sounds more like slamming
11:51:36PMunchYeah..
11:51:45PMunchAs I said, shuffling is a terrible name :P
11:52:11PMunchIf you shuffle up after you shuffle right you would end up with this: https://uploads.peterme.net/shufflerightup.png
11:52:56FromDiscord<odexine> yeah sounds like slamming
12:01:14PMunchSure, but the name isn't the important part :P
12:04:23FromDiscord<odexine> smh its important to me
12:04:24FromDiscord<odexine> smh
12:05:47*azimut joined #nim
13:01:29FromDiscord<auxym> In reply to @odexine "yeah sounds like slamming": but then I'd confuse it with https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping
13:01:46FromDiscord<odexine> ah this ive dabbled in this a little
13:01:48FromDiscord<auxym> collision detection? Or packing maybe?
13:01:55FromDiscord<auxym> I'm only in it for the semantics
13:01:57FromDiscord<auxym> important stuff
13:02:18FromDiscord<auxym> I've been adjacent to people who SLAM
13:02:50*syl quit (Read error: Connection reset by peer)
13:02:59*syl_ joined #nim
13:09:53FromDiscord<odexine> In reply to @auxym "collision detection? Or packing": collision det.
13:10:03FromDiscord<odexine> its hard so i didnt pursue it further
13:11:29PMunchI'm doing it for packing
13:12:19PMunchCollision detection isn't too bad, just a bunch of bounds checks
13:39:02NimEventerNew thread by beckx: Neovim lsp setup: no autocompletion and suggestion, see https://forum.nim-lang.org/t/10276
13:47:48*ntat joined #nim
13:55:19FromDiscord<auxym> packing is good I think, though I think in the strict math definition it's usually "fit given shapes in the smallest possible area"
14:14:03NimEventerNew question by bugninja: Nim websocket client using threads instead of async, see https://stackoverflow.com/questions/76491029/nim-websocket-client-using-threads-instead-of-async
14:16:20*PMunch quit (Quit: Leaving)
14:19:20FromDiscord<odexine> oh you mean pmunch, i thoughjt you asked why i tried SLAM lol
14:39:35*rockcavera joined #nim
14:44:15FromDiscord<kumolonimbus> sent a long message, see https://paste.rs/ocwkB
14:44:32FromDiscord<kumolonimbus> (edit) "http://ix.io/4ypt" => "http://ix.io/4yps"
14:44:40*alapini joined #nim
14:45:01FromDiscord<kumolonimbus> (edit) "http://ix.io/4yps" => "http://ix.io/4ypu"
14:49:50*alapini quit (Quit: Client closed)
14:54:38FromDiscord<michaelb.eth> In reply to @kumolonimbus "Hey all, I am": to begin with, you can probably just rely on proc overloads
14:55:03FromDiscord<michaelb.eth> if you need runtime dispatch, you can consider using Nim's `method` facility
14:57:56*cnx quit (Remote host closed the connection)
14:58:07FromDiscord<kumolonimbus> Thanks, I don't need runtime dispatch thankfully, but I was also looking into overloads. I am just curious how I can explicity state 'these are the functions/types to be expected by a comms channel type'. I am mostly trying to think of communicating intention to contributors to make it easy to understand the necessary steps required to make a new comms channel.
14:58:13*cnx joined #nim
14:59:27FromDiscord<kumolonimbus> I coul just implement one (ex. HTTP) and state in docs somewhere 'overload all the functions in HTTP to make a new channel' but I was hoping for a generic of some sort
14:59:28FromDiscord<odexine> Concepts then
15:00:17FromDiscord<bostonboston> I'm attempting to use enums as a way to limit the options a user can input, later I need to convert the input to a byte to I have to do that explicitly everytime
15:01:47FromDiscord<bostonboston> (edit) "to" => "do"
15:04:26FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4ypJ
15:04:53FromDiscord<michaelb.eth> (edit) "https://play.nim-lang.org/#ix=4ypJ" => "https://play.nim-lang.org/#ix=4ypL"
15:06:39NimEventerNew thread by dwhall256: Embedded: svd2nim for read/write of ARM Cortex micros, see https://forum.nim-lang.org/t/10277
15:24:34*lucasta joined #nim
15:33:17FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4ypQ
15:45:41FromDiscord<Chronos [She/Her]> How would I make it so the Redis wrapper by Araq (In Nim rg) can use my custom cert and key?
15:46:57FromDiscord<Chronos [She/Her]> Might just use a diff lib
15:48:13FromDiscord<Chronos [She/Her]> If there even is one
15:50:52FromDiscord<bostonboston> In reply to @michaelb.eth "so, actually, this works": I tried annotating with the 'u8 suffix and that didn't work so I'll try the cast
15:55:24FromDiscord<bostonboston> Casting did not work
15:59:04FromDiscord<michaelb.eth> note that cast and conversion aren’t the same thing
16:13:18FromDiscord<bostonboston> So byte(x) is a conversion
16:21:32FromDiscord<odexine> Yes
16:34:15FromDiscord<bostonboston> Unfortunately (byte)x, x.byte and x'u8 did not work
16:58:13FromDiscord<michaelb.eth> In reply to @bostonboston "Unfortunately (byte)x, x.byte and": can you give a bit more context?
16:58:49FromDiscord<michaelb.eth> as for `x'u8`, the integer literal syntax only works with a literal
16:58:59FromDiscord<michaelb.eth> e.g. `123'u8`
17:02:06FromDiscord<bostonboston> sent a code paste, see https://play.nim-lang.org/#ix=4yqv
17:02:30FromDiscord<bostonboston> But I'm doing send[i] in a hundred places and don't want to cast every time
17:03:03FromDiscord<bostonboston> (edit) "https://play.nim-lang.org/#ix=4yqv" => "https://paste.rs/VqHQl"
17:11:45FromDiscord<michaelb.eth> sent a code paste, see https://play.nim-lang.org/#ix=4yqD
17:12:01FromDiscord<michaelb.eth> https://nim-lang.org/docs/manual.html#converters
17:34:20FromDiscord<verdagon> In reply to @omentic "so i'm putting together": if you're doing a comparison of memory models, i have an absolute _treasure trove_ i think youd be interested in
17:34:36FromDiscord<verdagon> by my count, there's something like 14 (!) different ways for languages to achieve memory safety
17:34:38FromDiscord<JJ> In reply to @verdagon "if you're doing a": ah, hi!
17:35:00FromDiscord<verdagon> ive been wanting to write a series on it for a while (titled "the memory safety grimoire") but ive been too busy with vale 😆
17:35:11FromDiscord<JJ> i'll take it 👀 the vale blog post list is also one of my reference links
17:35:26FromDiscord<verdagon> hah awesome, thats great to hear ^^
17:35:38FromDiscord<verdagon> i'll DM you what i have, it's not structured at all
18:15:08*lucasta quit (Remote host closed the connection)
18:23:25FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4yqU
18:23:52FromDiscord<bostonboston> In reply to @arathanis "casting the enum to": What I was doing in my example worked, I just didn't want to do it, a converter is the answer I was looking for
18:24:26FromDiscord<arathanis> In reply to @bostonboston "What I was doing": I;ve just been using `.byte` and it appears to worj
18:24:28FromDiscord<arathanis> (edit) "worj" => "work"
18:25:06FromDiscord<arathanis> https://media.discordapp.net/attachments/371759389889003532/1119331833214152796/image.png
18:26:08FromDiscord<bostonboston> Correct that works, I wanted an implicit conversion
18:26:25FromDiscord<arathanis> ahh, makes sense
18:26:36FromDiscord<arathanis> i always worry about blowing my own leg off doing that
18:27:07FromDiscord<arathanis> but it will make things cleaner, huh?
18:28:23FromDiscord<bostonboston> It makes things cleaner, and I'm using the enum itself as my safety. Since I'm defining the enum as long as I don't go over 255 I'll be okay (I can't go over 255 anyway)
18:30:59FromDiscord<bostonboston> Additionally I'm not going to the other way, anytime I'm reading a byte I will still explicitly cast it to the proper enum
18:31:36FromDiscord<arathanis> looks like converters don't work inside sequence initializations?
18:31:57FromDiscord<bostonboston> Not something I've tried
18:33:03FromDiscord<arathanis> sent a code paste, see https://paste.rs/d0ypk
19:25:23FromDiscord<Elegantbeef> you need a `seq[T]` converter @arathanis
19:25:37FromDiscord<Elegantbeef> Just cause two generic parameters match does not mean the data type is convertible
19:26:02FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4yr2
19:27:24*derpydoo joined #nim
19:28:34FromDiscord<Elegantbeef> `let s1 = @[byte fBar]` is just simpler
19:33:44FromDiscord<arathanis> In reply to @Elegantbeef "you need a `seq[T]`": a converter from seq[Foo] to seq[byte]?
19:34:07FromDiscord<Elegantbeef> Yes
19:35:58FromDiscord<arathanis> In reply to @Elegantbeef "Yes": cool: https://media.discordapp.net/attachments/371759389889003532/1119349666035798127/image.png
19:38:36FromDiscord<mratsim> converters are quite a pain for maintence, you rapidly get into ambiguous calls or them called in situations you don't wat, silently, because a proc exists for the converted type.
19:39:08FromDiscord<arathanis> yeah its cool to be able to enable implicit conversion but it is a common footgun
20:06:39*ntat quit (Quit: Leaving)
20:10:34*ced1 joined #nim
20:11:55*ced1 is now known as cedb
20:34:31*azimut_ joined #nim
20:36:56*azimut quit (Ping timeout: 240 seconds)
22:01:06FromDiscord<deech> sent a code paste, see https://play.nim-lang.org/#ix=4yrn
22:20:05*cm quit (Ping timeout: 240 seconds)
22:26:01*cm joined #nim
22:28:12*candlestick joined #nim
22:29:07*candlestick left #nim (#nim)
22:35:56*madprops_ joined #nim
22:36:09*madprops quit (Read error: Connection reset by peer)
22:36:49*madprops_ is now known as madprops
22:36:49*madprops quit (Changing host)
22:36:49*madprops joined #nim
23:26:18*derpydoo quit (Quit: derpydoo)