<< 18-08-2022 >>

00:01:31FromDiscord<Elegantbeef> you'd abuse `importc` to get it
00:02:00FromDiscord<Elegantbeef> If you search const pointer in discord's search you'll probably find a response from flywind iirc
00:22:23FromDiscord<!Patitotective> In reply to @dom96 "The first one is": too detailed i would say, the cute ones look nice, maybe without color fading
00:51:49termerIs there an async version of walkDir?
00:51:51termerI can't seem to find one
00:52:16FromDiscord<Elegantbeef> There isnt
00:52:43FromDiscord<Elegantbeef> Walkdir is mostly system calls afaik so async isnt exactly going to make it any faster
00:52:54termerthey hit the disk
00:52:59termeris there some alternative method to read the contents of a dir that's async
00:53:07termerthe point of async isn't to be faster, it's to avoid blocking the thread
00:54:35termerif I'm forced to use normal walkDir then that's ok, I'd just prefer async
00:54:58FromDiscord<Elegantbeef> I think you are
00:55:07FromDiscord<Elegantbeef> Unless you make your own async variant
00:56:17termera shame but not the end of the world
01:06:00*wallabra joined #nim
02:36:42FromDiscord<Freakwill (William Song)> But It could be defined as `var e={1}` directly. What should I do if I could use `d={1}` without the suffix.↵(@Rika)
02:38:07FromDiscord<Elegantbeef> You can just do `var d = {1u8}`
02:38:25FromDiscord<Elegantbeef> `{1}` is invalid as Nim's builtin set cannot have integer sized values
02:44:24*arkurious quit (Quit: Leaving)
02:51:47FromDiscord<SaAnd> is there any reason to separate cfloat and float32, or cdouble and float64? like dont they both follow the same specification?
02:52:14FromDiscord<Elegantbeef> Think the C types are soon to be deprecated, though might be wrong
02:52:25FromDiscord<Elegantbeef> There really isnt much reason for them
02:53:02FromDiscord<SaAnd> nice, it was a question ive had for a while
03:19:05*_________ quit (Ping timeout: 268 seconds)
03:40:17FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=47Ul
03:40:29FromDiscord<flywind> gives `Error: cannot use symbol of kind 'proc' as a 'field'`
03:40:34FromDiscord<flywind> works with procs.
03:41:28FromDiscord<flywind> The second case branch has the same name as the outer procs.
03:43:37FromDiscord<Elegantbeef> does `case name {.inject.}` change anything?
03:43:39FromDiscord<flywind> found it => https://github.com/nim-lang/Nim/issues/19552
03:43:47FromDiscord<Elegantbeef> Or if you annotate it a `{.dirty.}`
03:43:59FromDiscord<flywind> Yeah
03:47:45FromDiscord<flywind> Annotating it with `{.dirty.}` works.
04:15:30FromDiscord<Bung> the microsoft webview2 documented code are all c++ , does this means if I want develop nim program base on it , I should compiles to c++ backend ?
04:17:38FromDiscord<Bung> or find c bindings to those dlls ?
04:21:37*_________ joined #nim
05:12:26FromDiscord<TechnoRazor> sent a code paste, see https://play.nim-lang.org/#ix=47Uy
05:13:11FromDiscord<TechnoRazor> (edit) "https://play.nim-lang.org/#ix=47Uy" => "https://play.nim-lang.org/#ix=47Uz"
05:13:54FromDiscord<Elegantbeef> Mixin takes consideration of the symbols in the instantiation scope
05:14:11FromDiscord<Elegantbeef> `result = doThing` is what's wrong
05:14:21FromDiscord<TechnoRazor> what's wrong with it?
05:14:22FromDiscord<Elegantbeef> Actually nvm i cant read
05:14:50FromDiscord<Elegantbeef> Also mixin doesnt have to exist before the dummy proc
05:15:08FromDiscord<TechnoRazor> i mean the dummy proc has to exist before the generic proc
05:15:17FromDiscord<Elegantbeef> It doesnt
05:15:22FromDiscord<Elegantbeef> That's the entire point of mixin
05:15:48FromDiscord<TechnoRazor> really? i thought i got compiler errors when there's no symbol named "doThing" at definition
05:16:02FromDiscord<Elegantbeef> No that's for non mixin'd
05:16:14FromDiscord<Elegantbeef> If you `bind` it's an issue, but since you mixin it's not an issue
05:17:55FromDiscord<Elegantbeef> This works fine
05:17:57FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47UD
05:18:07FromDiscord<TechnoRazor> interesting, i could've sworn that didn't copile for me
05:18:13FromDiscord<TechnoRazor> (edit) "copile" => "compile"
05:19:44FromDiscord<TechnoRazor> sent a code paste, see https://play.nim-lang.org/#ix=47UE
05:21:27FromDiscord<creikey> how do I do this loop taking a mutable reference to i? https://media.discordapp.net/attachments/371759389889003532/1009693484795576390/unknown.png
05:21:29FromDiscord<creikey> without using ref
05:21:31FromDiscord<creikey> (edit) "without using ref ... " added "object"
05:21:54FromDiscord<Elegantbeef> `for i in images.mitems`
05:22:03FromDiscord<creikey> I saw that online I thought it was just for arrays of strings
05:22:04FromDiscord<creikey> lol
05:22:06FromDiscord<Elegantbeef> No it shouldnt break techno
05:22:51FromDiscord<TechnoRazor> so do i file an issue now or what?
05:23:26FromDiscord<Elegantbeef> If you cannot find another
05:26:06FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47UG
05:27:32FromDiscord<Elegantbeef> Though i dont really get why you have a `getDoThing` 😄
05:28:21FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47UH
05:33:25FromDiscord<TechnoRazor> sent a code paste, see https://play.nim-lang.org/#ix=47UK
05:33:46FromDiscord<TechnoRazor> (edit) "https://play.nim-lang.org/#ix=47UK" => "https://play.nim-lang.org/#ix=47UL"
05:35:28FromDiscord<TechnoRazor> wait im stupid
05:35:46FromDiscord<TechnoRazor> it's past 1 AM here, i need sleep
05:36:04FromDiscord<TechnoRazor> the code i gave doesn't have an error
05:37:41FromDiscord<TechnoRazor> yeah i have no clue when or why i was getting an error, it's likely i just forgot `mixin doThing`
05:37:49FromDiscord<TechnoRazor> sorry im gonna read your message now
05:38:00FromDiscord<Elegantbeef> Ok
05:38:28FromDiscord<TechnoRazor> yeah that really isn't ideal
05:41:38FromDiscord<TechnoRazor> i guess ill just use `dynamicBindSym`
05:49:55FromDiscord<TechnoRazor> In reply to @TechnoRazor "ah, but if a": well i can't find an issue for this but i don't have the capacity to write one up
05:53:03FromDiscord<Elegantbeef> "Odd mixin bug" then provide the above
06:03:44FromDiscord<Phil> Hmm does anyone here have naming conventions for modules whose primary concern is providing procs to instantiate objects (in potentially complex ways) ?
06:04:23FromDiscord<Rika> C programmers would probably name it ctors
06:04:35FromDiscord<Phil> Ah what now?
06:04:45FromDiscord<Phil> Let me google htat
06:04:52FromDiscord<Rika> C[onstruc]tors
06:05:23FromDiscord<Phil> ... that's... a way to shorten that
06:05:46FromDiscord<Rika> Lol ya dont gotta tell me xd
06:05:49FromDiscord<Rika> Not my idea
06:08:25FromDiscord<Phil> so if it's about constructors specifically for a point object, it would be point.ctor.nim? point_ctor.nim?
06:08:35FromDiscord<Phil> for example
06:09:43FromDiscord<Rika> Underscore, period is not allowed
06:10:05FromDiscord<Rika> And sure but I don’t know, there isn’t really a standard for module naming
06:10:52FromDiscord<Phil> You're saying we're at a place where the xkcd about standards does not yet exist and we can have one to be the catalyst to get 50? Perfect!
06:11:00FromDiscord<Phil> (edit) "exist" => "apply"
06:14:25FromDiscord<Rika> I mean there’s no standard that everyone follows
06:14:44FromDiscord<Rika> There are definitely lots of standards everyone follows individually
06:21:57*NimEventer quit (Ping timeout: 252 seconds)
06:22:23*NimEventer joined #nim
06:43:42*PMunch joined #nim
06:48:38FromDiscord<proton> How to present 1 or 0 of 1bit in Nim
06:50:48PMunch0b1?
06:50:59PMunchOr of course true and false
06:53:18FromDiscord<Elegantbeef> `on` or `off` 😛
06:54:52PMunchOh yeah, that is also an option
06:59:17FromDiscord<proton> `enable` bit(1) NOT NULL, one field of mysql table, how to write the variable meeting the type and length requirement?
06:59:44PMunchDepends on the ORM I guess
07:00:40FromDiscord<proton> sent a code paste, see https://play.nim-lang.org/#ix=47V4
07:00:48PMunchBut an object with `enable: uint {.bitsize: 1.}` would be a field with a single bit
07:01:11PMunchIf you add two such fields to an object the entire object would still be 8 bits long (because it can't be smaller than that)
07:01:16FromDiscord<proton> (edit) "https://play.nim-lang.org/#ix=47V4" => "https://play.nim-lang.org/#ix="
07:02:40FromDiscord<Rika> Yes, this doesn’t change anything if you’re storing one enable but only
07:02:43FromDiscord<Rika> Bit
07:06:41FromDiscord<proton> so what can I do
07:08:06FromDiscord<Rika> Don’t mind the extra 7 bits in memory and just convert between? I’m not sure what you actually want
07:09:43FromDiscord<proton> To pass the right type and length variable to the sql which requires bit(1) to have it work at first.
07:12:21FromDiscord<Rika> What is the type and length requirement
07:14:33FromDiscord<proton> bit(1)
07:15:56FromDiscord<proton> Error: unhandled exception: Data too long for column 'enable_comment' at row 1
07:16:25FromDiscord<proton> `enable_comment` bit(1) DEFAULT NULL
07:19:34PMunchWhich ORM?
07:19:59PMunchOr rather how are you communicating with the database?
07:23:29FromDiscord<proton> db_mysql
07:24:04FromDiscord<voidwalker> maybe TRUE/FALSE ?
07:28:37FromDiscord<proton> tried, too long
07:29:19PMunchThis looks like it might be a bug in db_mysql
07:31:08FromDiscord<Rika> You can’t exactly pass a single bit as a parameter to a function, the minimum is pretty much 8; I’m not sure how the length stuff works so it’s hard to say
07:31:41FromDiscord<srozb> sent a code paste, see https://play.nim-lang.org/#ix=47V7
07:33:08PMunchYeah that's why it smells like a bug to me
07:33:43PMunch@srozb, I don't think types can be imported from a dynamic library like that
07:34:06FromDiscord<srozb> actually doesn't matter, same error with procs
07:34:40FromDiscord<srozb> oh wait!
07:34:42FromDiscord<srozb> 😄 thank you
07:43:44FromDiscord<Phil> In reply to @proton "tried, too long": what happens if you hard-code the boolean into the SQL? I'm curious
07:45:19FromDiscord<Phil> Just to give you a momentary workaround that allows you to progress, you could make enableCommentValStr = if enableComment: "TRUE" else: "FALSE" and insert that into the SQL.↵Trying with hard-coded SQL also ensures that you don't potentially have a column-definition issue
07:45:48FromDiscord<Phil> (edit) "make enableCommentValStr" => "make:↵`enableCommentValStr" | ""FALSE"" => ""FALSE"`"
07:58:21FromDiscord<Freakwill (William Song)> sent a long message, see http://ix.io/47Vb
08:02:35PMunchFreakwill_(William_Song), did you forget to import the `random` module where you try to call that?
08:07:35*rockcavera quit (Ping timeout: 256 seconds)
08:15:31FromDiscord<Freakwill (William Song)> No. otherwise It will report that `rand` is undefined↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
08:17:10*rockcavera joined #nim
08:17:11*rockcavera quit (Changing host)
08:17:11*rockcavera joined #nim
08:18:36*nyeaa4 joined #nim
08:23:13*nyeaa4 quit (Client Quit)
08:25:36FromDiscord<domosokrat> sent a code paste, see https://play.nim-lang.org/#ix=47Vk
08:25:42FromDiscord<proton> @Phil Thanks for you suggestion, thought of this, and will try later.
08:26:31FromDiscord<domosokrat> The compiler compains about the result of the template
08:27:10*nyeaa4 joined #nim
08:34:51NimEventerNew thread by Bung: Looking for windows webview2 binding, see https://forum.nim-lang.org/t/9385
08:57:56*Jjp137 quit (Ping timeout: 255 seconds)
08:58:14*Jjp137 joined #nim
09:28:39FromDiscord<Freakwill (William Song)> It is the same error, I just truncated it.
09:29:01FromDiscord<Elegantbeef> The issue is your template doesnt have a return type
09:29:05FromDiscord<Elegantbeef> Wait nevermind
09:29:28FromDiscord<Elegantbeef> you need to do `result` at the end
09:29:43FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=47VG
09:35:45*rockcavera quit (Remote host closed the connection)
09:36:50FromDiscord<voidwalker> Uh, what is the purpose of the Nim plugin for Qt Creator ? I cannot seem to use it to design a gui
09:44:17FromDiscord<Freakwill (William Song)> any idea?
09:45:49FromDiscord<Freakwill (William Song)> thanks a lot!
10:01:33*arkurious joined #nim
10:09:17*PMunch quit (Ping timeout: 252 seconds)
10:09:23*wallabra_ joined #nim
10:10:23*wallabra quit (Ping timeout: 252 seconds)
10:11:30*PMunch joined #nim
10:11:31*wallabra_ is now known as wallabra
10:21:01*CyberTailor joined #nim
12:14:17FromDiscord<Yardanico> In reply to @voidwalker "Uh, what is the": it's just a general IDE-like plugin with nimsuggest suport
12:14:19FromDiscord<Yardanico> (edit) "suport" => "support"
12:14:33FromDiscord<Yardanico> since Qt Creator also poses itself as a more-or-less general IDE, not exclusively for Qt development
12:32:35FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47Wy
12:37:12FromDiscord<Rika> : typedesc[a] =
12:37:17FromDiscord<Rika> Similarly with the other
12:37:49FromDiscord<Phil> You can even make your life easier by making it generic
12:38:14FromDiscord<Nalmyth> In reply to @Isofruit "You can even make": Preferred over polymorphism?
12:38:25FromDiscord<Rika> In Nim yes
12:40:52FromDiscord<Phil> That's a programming style choice.↵If you want to do OOP and thus polymorphism, then not necessarily.↵However, if you code procedurally as many do in nim, then yes
12:41:38FromDiscord<Phil> Personally I don't touch OOP with any of my codebases atm, however my projects are generally webdev which is generally more suited towards procedural coding
12:42:18FromDiscord<Phil> At least in regards to backend servers who need to interact with databases
12:42:28FromDiscord<Nalmyth> Thank you both! 🙂
12:42:58FromDiscord<Rika> Nim support of OOP is that “it works” but don’t expect anything to the likes of Java
12:43:50FromDiscord<Phil> Yeah, I think it is there and gets you jut far enough that you can abstract away your problem with OOP for domains suited to it.
12:43:56FromDiscord<Phil> (edit) "jut" => "just"
12:44:22FromDiscord<Phil> If the problem isn't well suited for OOP aka feels weird to code with OOP then just go procedural
12:44:34PMunchHmm, I think I've managed to busy-loop the C compiler
12:44:46PMunchThrough some Nim code
12:45:16FromDiscord<Phil> ~~Though that's a tall order, I'm still trying to build up the proper feeling for when OOP is a good choice and when not... mostly because I have not yet coded enough scenarios where it is a good choice~~
12:45:48FromDiscord<Phil> PMunch munching away at a poor compiler's sanity
12:46:57FromDiscord<Rika> The best fuzzers are human
12:47:02FromDiscord<Rika> I’m joking of course
12:47:40PMunchHmm, it just seems to go all the way through Nim compilation, spawns the compiler, then just stops while one core is pegged at 100%
12:56:52PMunchHonestly I've got no idea what chokes it..
12:57:34FromDiscord<Rika> Debugging a C compiler sounds like hell
13:01:39PMunchI mean how am I even supposed to fix this..
13:01:46FromDiscord<voidwalker> trying to use https://github.com/filcuc/nimqml - when running it says `could not load: libDOtherSide.so.0.(9|8)` I have installed that doOtherSide thingie, it is in /usr/local/lib, copied it to /usr/lib as well as the path of the program. Added /usr/local/lib to path.. blah
13:02:03FromDiscord<voidwalker> `libDOtherSide.so.0.9`
13:13:16PMunchHuh, the issue was that imlib2-config didn't exist apparently
13:14:06FromDiscord<exelotl> In reply to @Isofruit "If the problem isn't": the problem is when you have Java brain, nothing feels weird to code with OOP 😅
13:14:30PMunchWell, it manages to build with clang now, but gcc still chokes..
13:14:59FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47WM
13:18:16FromDiscord<Phil> I'd argue that actually not a massive amount of people can code proper OO and think proper OO in the first place and just write procedural java
13:18:20FromDiscord<Phil> @exelotl
13:18:44FromDiscord<Nalmyth> sent a code paste, see https://paste.rs/kRW
13:19:09FromDiscord<Nalmyth> (edit) "https://play.nim-lang.org/#ix=47WP" => "https://play.nim-lang.org/#ix=47WO"
13:19:21FromDiscord<exelotl> maybe the `a.SecondType(...)` syntax for object construction isn't supported?
13:19:40FromDiscord<exelotl> I've never seen anyone use it before, it kind of threw me off to look at it x)
13:20:08FromDiscord<Phil> ... what is a.FirstType supposed to evaluate to? I don't think I've ever seen that used
13:20:16FromDiscord<Phil> Like, what's the intent to express here?
13:20:30FromDiscord<Nalmyth> In reply to @exelotl "maybe the `a.SecondType(...)` syntax": Hmm, seems to be. I see it used in other areas of the codebase `SecondType(...)`
13:20:34FromDiscord<Rika> I assume a is a module
13:20:47FromDiscord<Phil> Earlier a was a type, that's why I'm not sure it is
13:20:51FromDiscord<Nalmyth> In reply to @Isofruit "Like, what's the intent": It's an object inside a module.↵↵`vehicles.Car()` for example
13:21:07FromDiscord<Nalmyth> (edit) "In reply to @Isofruit "Like, what's the intent": It's an object ... inside" added "description"
13:21:09FromDiscord<Phil> so `a` module with a type `FirstType` inside of it?
13:21:18FromDiscord<Nalmyth> Yep, `FirstType` and `SecondType`
13:21:25FromDiscord<Phil> Ahhh check
13:23:04FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47WR
13:23:34FromDiscord<Nalmyth> So strange 🤔 I haven't been able to reproduce it in a smaller sample either
13:26:02FromDiscord<Phil> Just tried it, it works for me without issue
13:26:35FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=47WT
13:26:49FromDiscord<Phil> You can just name them a.nim and b.nim, I just already had the files there for copy pasting
13:27:36FromDiscord<Phil> I would like to point out though that the code for `test` doesn't make much sense
13:27:58FromDiscord<Phil> You're passing in a parameter you don't need to make a static comparison.↵I assume this is mostly for learning purposes?
13:28:09FromDiscord<Phil> (edit) "comparison.↵I" => "comparison at runtime.↵I"
13:28:10FromDiscord<voidwalker> sent a code paste, see https://play.nim-lang.org/#ix=47WV
13:29:05FromDiscord<voidwalker> I have some qt5-quickcontrols and qt5-quickcontrols2 installed.. not sure what's up, or where is that module version supposed to be ?
13:29:42FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47WW
13:30:09FromDiscord<Phil> sent a code paste, see https://paste.rs/BxK
13:30:17FromDiscord<Nalmyth> (edit) "https://play.nim-lang.org/#ix=47WW" => "https://play.nim-lang.org/#ix=47WX"
13:30:35FromDiscord<Phil> is that thumbsup a confirmation that you have or that you will :-p ?
13:30:48FromDiscord<Nalmyth> In reply to @Isofruit "Question, did you take": Yes I've looked over OOP in nim, this project is not using any method specs 🤔
13:30:54FromDiscord<Nalmyth> only proc and func
13:31:11FromDiscord<Phil> The main reason I'm asking is because I'm seeing inheritance in the future and since you mentioned polymorphism I thought that might be where you want to be heading
13:31:18FromDiscord<enthus1ast> most of the oop needs are handled by nims uniform call syntax anyway....
13:32:46FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47WZ
13:32:54FromDiscord<Nalmyth> Although it's already clarified 🤔
13:33:08FromDiscord<Phil> sent a code paste, see https://play.nim-lang.org/#ix=47X0
13:33:40FromDiscord<Phil> But other than that , what is "default" ?
13:33:56FromDiscord<Nalmyth> In reply to @Isofruit "I maintain my stance": `nim default` returns the default value for a type
13:34:13FromDiscord<Nalmyth> In reply to @Isofruit "I maintain my stance": Hmm, and then use something like `t == default(t.VehicleBody())`
13:34:35FromDiscord<nocturn9x> is it possible to disable the GC on a module-level?
13:34:44FromDiscord<nocturn9x> I need nim's GC to stop interfering with my own :/
13:34:58FromDiscord<Phil> In reply to @Nalmyth "Hmm, and then use": Ah, check. Alright, next question, which part of the code you're compiling aren't you showing us since there's somewhere in your code where you are using an unclarified VehicleBody 😄
13:35:03FromDiscord<nocturn9x> For a language that supports manual memory management, it sure is hell to actually use it
13:35:21FromDiscord<exelotl> if you use ARC then it shouldn't interfere at all
13:35:27FromDiscord<nocturn9x> wrong
13:35:27FromDiscord<Nalmyth> In reply to @Isofruit "Ah, check. Alright, next": That could well be it, so somewhere there's a template calling a proc or something?
13:35:32FromDiscord<nocturn9x> ARC makes the program just crash, lol
13:35:40FromDiscord<nocturn9x> not even an error message or anything
13:35:42FromDiscord<nocturn9x> it just dies
13:36:02FromDiscord<nocturn9x> I just need to disable the GC for a single module
13:36:04FromDiscord<Phil> In reply to @Nalmyth "That could well be": Depends. I'd go CTRL + F and search through your usages of `VehicleBody` and see which are unclarified
13:36:08FromDiscord<nocturn9x> should I try compiling it as a dll?
13:36:30FromDiscord<nocturn9x> that sounds incredibly annoying though
13:36:39FromDiscord<exelotl> try running the program through valgrind or gdb to see where it's going wrong?
13:36:55FromDiscord<nocturn9x> it's like 5000+ lines of nim code
13:37:01FromDiscord<nocturn9x> and a lot more lines of C code
13:37:09FromDiscord<nocturn9x> I don't exactly have eons to debug nim's GC
13:37:14FromDiscord<nocturn9x> I just want to turn it off
13:38:01FromDiscord<exelotl> you can't selectively turn it off per-module but you can simply not invoke it, mostly by avoiding `ref` types and closures.
13:38:12FromDiscord<Nalmyth> In reply to @Isofruit "Depends. I'd go CTRL": Thank you! I will take a look 🙂
13:38:41FromDiscord<nocturn9x> In reply to @exelotl "you can't selectively turn": I use objects or `ptr`s
13:38:46FromDiscord<nocturn9x> not sure why it's messing things up tbh
13:38:54FromDiscord<Nalmyth> Is there some way to find out which control flow is trying to call that function?↵I only see one line of output in the result
13:39:04FromDiscord<nocturn9x> In reply to @Nalmyth "Is there some way": GDB
13:39:04FromDiscord<Nalmyth> (edit) "Is there some way to find out ... which" added "at compile time"
13:39:05FromDiscord<dom96> @nocturn9x maybe this would help? https://nim-lang.org/docs/system.html#GC_disable
13:39:16FromDiscord<Nalmyth> In reply to @nocturn9x "GDB": I mean a compile time error
13:39:21FromDiscord<nocturn9x> In reply to @dom96 "<@523555920265871380> maybe this would": That is exactly what I'm looking for
13:39:26FromDiscord<nocturn9x> In reply to @Nalmyth "I mean a compile": oh, my bad
13:39:26FromDiscord<Nalmyth> (edit) "In reply to @nocturn9x "GDB": ... I" added "Sorry"
13:39:33FromDiscord<nocturn9x> although I'm confused
13:39:37FromDiscord<nocturn9x> arc seems to work now?!
13:39:43FromDiscord<nocturn9x> it would straight up crash before
13:40:13FromDiscord<Phil> magic.gif
13:40:13FromDiscord<nocturn9x> huh, weird https://media.discordapp.net/attachments/371759389889003532/1009819006938660945/unknown.png
13:40:42FromDiscord<nocturn9x> ok I'm genuinely confused
13:40:57FromDiscord<nocturn9x> didn't even need to bonk it for it to work again 😂
13:41:21FromDiscord<Phil> You mentally bonked it
13:41:30FromDiscord<Phil> Nim is so advanced it doesn't need to physical love tap
13:41:34FromDiscord<Phil> A mental one suffices
13:41:40FromDiscord<nocturn9x> yeah I mean
13:41:45FromDiscord<nocturn9x> I was confused as to why ARC would crush
13:41:53FromDiscord<nocturn9x> it's RAII after all
13:42:02FromDiscord<nocturn9x> and my pointers live just as long as my objects so like
13:42:03FromDiscord<nocturn9x> 🤷
13:42:09FromDiscord<nocturn9x> (edit) "crush" => "crash"
13:43:01FromDiscord<Phil> For the uninitiated, RAII = "If I get the memory I instantiate the object"?
13:43:17FromDiscord<Phil> Skimming through the wiki and not getting a firm grasp on the meaning for the acronym
13:43:39FromDiscord<Nerve> Unsure where else to post this, avoiding #internals since I figure that's for discussion of existing source. Has anyone looked at Vale's approach to automatic memory, generational references? They're a fascinating concept.↵https://verdagon.dev/blog/generational-references
13:44:11FromDiscord<Nerve> Nim has two reference counters so I figured this would be of interest to you guys
13:44:23FromDiscord<Phil> Ah, no, RAII = "This object lives after the constructor has finished and dies when the destructor has finished"?
13:44:41FromDiscord<flywind> In reply to @Nerve "Unsure where else to": It was discussed if you search the history.
13:44:52FromDiscord<Nerve> Hmm, I searched but didn't find much
13:44:56FromDiscord<nocturn9x> In reply to @Isofruit "Ah, no, RAII =": well
13:44:57FromDiscord<Nerve> Lemme try again
13:45:04FromDiscord<Rika> RAII is “when you make the object a(n abstract) resource is consumed in some way” I believe
13:45:10FromDiscord<nocturn9x> RAII stands for Resource Acquisition is Initialization
13:45:21FromDiscord<nocturn9x> whenever you start using it, there's a call to malloc
13:45:29FromDiscord<nocturn9x> when it goes out of scope, it's destroyed/dealloced
13:45:46FromDiscord<nocturn9x> it's basically as if you had manual memory management in C, but it can't catch cycles
13:47:12FromDiscord<Rika> It’s almost just ARC pretty much, if we conflate hard enough xd
13:47:58FromDiscord<flywind> In reply to @Nerve "Lemme try again": keywords are "vale" and "generational reference".
13:48:37FromDiscord<Phil> As someone with no low-level knowledge, malloc is basically acquiring the memory you need to store the object you want to create in, right?↵So it leads to the language calling malloc for you when you instantiate the object and dealloc when it goes out of scope?
13:50:26FromDiscord<exelotl> sent a long message, see http://ix.io/47X5
13:51:42FromDiscord<huantian> I always thought RAII was also about the freeing of resources, like closing a file when the object goes out of scope
13:54:50FromDiscord<Rika> It is about that
13:55:03FromDiscord<Rika> At least that’s my impression of it
13:55:08FromDiscord<Phil> In reply to @exelotl "idk, there's the classic": I mean, if the classes are all small, then that's OOP as intended: Lots of small and simple classes that you can easily reason about coming together to do complex things.
13:55:33FromDiscord<Phil> But doing object instantiation "Just because" seems definitely like a bad design smell
13:57:28FromDiscord<Nerve> In reply to @exelotl "idk, there's the classic": This precise phenomena, the kraken-like tentacles of OOP "best practices" has grinded my gears for years. All taken for granted, with no consideration for the amount of pain it's causing and money it's wasting. In rare cases, with full understanding that yes we want that because it employs people, justifying middle management and perpetual contracts.
13:58:46FromDiscord<Nerve> I feel like there's an updated version of the "Lisp curse" brewing in my head to polemically attack this new age of graft.
13:58:48FromDiscord<Rika> You could say that it pinched your… nerves
13:58:57FromDiscord<Phil> badum ts
13:58:58FromDiscord<Nerve> (edit) "the "Lisp curse"" => ""The Lisp Curse""
14:00:25FromDiscord<Nalmyth> sent a code paste, see https://play.nim-lang.org/#ix=47X9
14:00:52FromDiscord<Phil> In reply to @Nalmyth "Finally I had a": Ohhhhh I feel your pain, that kind of crap is impossible to spot
14:08:51*oddish quit (Quit: nyaa~)
14:13:10FromDiscord<dom96> wat
14:13:31FromDiscord<dom96> what was the error for those extra `()`?
14:15:04FromDiscord<flywind> What about the `nim check`? The useful error message can probably be hidden.
14:22:04FromDiscord<nocturn9x> well
14:22:07FromDiscord<nocturn9x> I crashed the compiler
14:22:12FromDiscord<nocturn9x> and there's no error messages whatsoever
14:22:25FromDiscord<nocturn9x> it just stops compiling and exits silently
14:23:11FromDiscord<nocturn9x> _why_ 😭
14:24:08FromDiscord<flywind> Using `./koch temp c -r yournimfile.nim`, you can probably get the traceback.
14:24:20FromDiscord<nocturn9x> Where do I get koch though
14:25:32FromDiscord<dom96> In reply to @nocturn9x "it just stops compiling": oh, definitely report that as an issue then
14:25:45FromDiscord<nocturn9x> heh https://media.discordapp.net/attachments/371759389889003532/1009830468369260544/unknown.png
14:25:54FromDiscord<nocturn9x> In reply to @dom96 "oh, definitely report that": dunno if I can create a small example for it
14:26:12FromDiscord<flywind> sent a code paste, see https://paste.rs/HuU
14:26:30FromDiscord<flywind> (edit) "https://play.nim-lang.org/#ix=47Xe" => "https://play.nim-lang.org/#ix=47Xf"
14:27:03FromDiscord<flywind> Looks like an endless loop in the compiler though.
14:28:24FromDiscord<ezquerra> Today I used choosenim to install nim on a new windows machine. I ran it from a non administrator console. The installation process showed a lot of warnings. I tried again from an admin console and the installation ran cleanly
14:28:40FromDiscord<flywind> (edit) "Looks like an endless loop in the compiler though. ... " added "Probably a recursive type definition, anyway I hope it work with the devel."
14:28:52FromDiscord<ezquerra> However, the nim was not added to the path. Is that normal?
14:29:20*PMunch quit (Quit: Leaving)
14:29:39FromDiscord<ezquerra> Also, I thin llamo it would be a good idea if choosenim copied itself into the bin folder so that you could use choosenim from anywhere as well
14:30:06FromDiscord<dom96> choosenim doesn't add to your path automatically
14:30:19FromDiscord<dom96> didn't you see a message in the output telling you to add it to your path?
14:30:27FromDiscord<nocturn9x> how can I detect like
14:30:33FromDiscord<nocturn9x> when different mm strategies are being used at the same time
14:30:44FromDiscord<nocturn9x> so like `when arc:` `when refc` etc.
14:30:51FromDiscord<dom96> also, it does copy itself to the bin folder
14:30:59FromDiscord<nocturn9x> `when compileOption("arc")` doesn't work
14:31:04FromDiscord<nocturn9x> (edit) "work" => "work, says invalid option"
14:31:08FromDiscord<dom96> sounds like you maybe installed it wrong, did you run the bat file?
14:31:32FromDiscord<nocturn9x> (edit) "the same" => "compile"
14:31:55FromDiscord<ezquerra> There was no bat file. I downloaded the .exe that I found on the releases page
14:32:19FromDiscord<ezquerra> There was also a zip file but I figured I could use either of them
14:32:54FromDiscord<flywind> In reply to @nocturn9x "`when compileOption("arc")` doesn't work,": when defined(gcArc)
14:33:12FromDiscord<nocturn9x> I had also found `when compileOption("gc", "arc")`
14:33:16FromDiscord<nocturn9x> but that sounds better
14:33:41FromDiscord<dom96> In reply to @ezquerra "There was also a": nope: https://github.com/dom96/choosenim#windows
14:34:02FromDiscord<dom96> I guess I need to hide the .exe
14:34:41FromDiscord<dom96> but that requires a change in choosenim :/
14:35:32FromDiscord<dom96> or maybe just renaming the zip would work
14:35:34FromDiscord<ezquerra> This is as far as I read:↵> Download the latest Windows version from the releases page😅
14:36:05FromDiscord<dom96> yeah.. I can't blame you
14:37:06FromDiscord<dom96> if I rename the zip to "choosenim-installer-0.8.4_windows_amd64.zip" will that be easier to pick then? :)
14:37:51FromDiscord<dom96> or should I make it "choosenim-0.8.4_windows_amd64-download-this-not-the-exe.zip"? :D
14:38:01FromDiscord<ezquerra> Lol
14:38:28FromDiscord<ezquerra> I think it’d be best if there was no exe on the download page. Avoid any ambiguity
14:38:48FromDiscord<dom96> yes, but I cannot do that because `choosenim self update` downloads that exe
14:38:55FromDiscord<dom96> and the url is hardcoded
14:41:36FromDiscord<ezquerra> What if there was a generic (or not numbered) installer executable that downloaded the zip and ran it for you? Then you could link to it from the installation instructions
14:42:11FromDiscord<domosokrat> What about choosenim-0.8.4\_windows\_amd64-self-update-only.exe
14:42:26FromDiscord<domosokrat> and hardcode that
14:42:29FromDiscord<dom96> In reply to @ezquerra "What if there was": sure, that could be an option too. People will still end up on the releases page without reading the readme though
14:42:45FromDiscord<dom96> In reply to @domosokrat "and hardcode that": yeah, that would require a change in choosenim though which means older versions would start failing to self update
14:42:45*rockcavera joined #nim
14:42:45*rockcavera quit (Changing host)
14:42:45*rockcavera joined #nim
14:43:11FromDiscord<domosokrat> ahh, yes
14:43:17*rockcavera quit (Remote host closed the connection)
14:43:23FromDiscord<dom96> I think a GUI installer for Windows would be cool
14:43:41FromDiscord<dom96> even a simple one-window one
14:43:59FromDiscord<dom96> it could also then do the PATH setting
14:44:07*rockcavera joined #nim
14:44:08*rockcavera quit (Changing host)
14:44:08*rockcavera joined #nim
14:44:12FromDiscord<dom96> if someone makes that I'll put it in the readme :)
14:44:23FromDiscord<dom96> for now I'll rename the zip
14:44:43FromDiscord<ezquerra> Yes. And you could place this “generic choosenim installer” in a different download place which you could link from the instructions
14:46:03FromDiscord<dom96> For real though, anyone interested? it would be a fun project, I'd do it but I have too many projects to maintain :)
14:46:18FromDiscord<dom96> Happy to help steer folks in the right direction though
14:49:12FromDiscord<auxym> GUI installer for nim? or choosenim?
14:50:00FromDiscord<dom96> choosenim
14:52:31FromDiscord<auxym> I sort of know my way around MSI, probably not too hard with wix. I could try a prototype since I have some free time these days but I also probably won't be able to maintain it going forward so... heh.
14:53:04FromDiscord<auxym> (or at least, I sort of did, 4 years ago when I used installshield at work for a couple months)
14:53:05FromDiscord<flywind> Writing a GUI installer for Nim is appreciated too.
14:53:12FromDiscord<dom96> I was thinking of writing it in Nim tbh
14:53:19FromDiscord<auxym> doesn't nim already have it though?
14:53:34FromDiscord<dom96> Nim has had various GUI installers over the years: NSIS/Inno
14:55:25FromDiscord<dom96> now we've got finish.exe which I guess makes maintenance easy but sucks for UX
14:55:42FromDiscord<auxym> msi is nice though. it's the modern(ish) way for installers in windows, to my understanding, vs old-style executables that just do whatever. They also allow for easy automated installs and updates on build servers and whatnot. inno makes an msi, no? Maybe wrapped in a exe launcher?
14:57:35FromDiscord<dom96> for choosenim all the installer would have to do is download zip, extract it and execute the batch script. Then maybe add ~/.nimble/bin to PATH as well. So pretty easy.
14:57:48FromDiscord<dom96> for Nim it would be far more involved
14:58:02FromDiscord<dom96> well, maybe not
14:58:12FromDiscord<dom96> but having choosenim is nice anyway :)
14:58:18FromDiscord<auxym> In reply to @auxym "msi is nice though.": apparently innosetup does not in fact build MSIs
14:58:24FromDiscord<Prestige> Why does it need a GUI installer for Windows?
14:58:38FromDiscord<dom96> it doesn't, but it would be nice
14:58:51FromDiscord<dom96> Windows users are used to installers
14:58:56FromDiscord<dom96> even developers
14:59:10FromDiscord<Prestige> Hmm
14:59:21FromDiscord<auxym> windows users like GUIs 🙂 but then again, users of nim and choosenim would have to be comfortable in the terminal to actually use the software.
15:00:11FromDiscord<auxym> maybe choosenim or nim could even be packaged for the windows appstore. No idea how much effort that is, though.
15:00:12FromDiscord<dom96> users of choosenim yes, but users of Nim could get away without a terminal
15:00:17FromDiscord<dom96> if VS code does the building for them
15:00:23FromDiscord<auxym> oh yeah
15:00:45FromDiscord<dom96> hm, Windows App store might be a good idea actually
15:01:17FromDiscord<auxym> does nim have a code signing cert? that might be a requirement for the appstore
15:01:46FromDiscord<dom96> nope
15:01:55FromDiscord<dom96> but getting one could also improve the antivirus situation
15:02:02FromDiscord<auxym> yeah
15:06:14FromDiscord<auxym> apparently (https://www.advancedinstaller.com/msix-publish-microsoft-store.html) the app is signed automatically when you upload it to the store, no need for a separate cert (or to setup signing in CI). Getting a developer account is a one time fee (19$ individual or 99$ company).
15:07:30FromDiscord<auxym> btw what does finish.exe do exactly? never looked in to it. just setup PATH?
15:08:00FromDiscord<dom96> it downloads some dependencies too iirc, not certain myself
15:09:26FromDiscord<gibson> There's a PR in progress for puppy that adds progress indication to the native win file downloading without external libs. That would make writing the installer even easier. If there's a better option I'd selfishly like to know the solution!
15:10:58FromDiscord<flywind> If Nim is in the Ms store, users can probably install the Nim in the limited working environment regardless of false postives.
15:11:24FromDiscord<flywind> Sounds like a good option.
15:13:29FromDiscord<auxym> In reply to @gibson "There's a PR in": like I said, my experience with installers is mostly MSI (https://en.wikipedia.org/wiki/Windows_Installer). MSI is basically a bunch of sql-style tables that contain all the data (files to be installed,reg keys, etc) and metadata (file paths, versions to handle upgrades,etc). Then windows has a built-in GUI that walks you through installing an MSI file (including progress bars IIRC).
15:13:56FromDiscord<auxym> wix (https://wixtoolset.org/) is an open-source toolchain to build MSIs, though I don't have experience with that.
15:15:43FromDiscord<gibson> Sounds like the best option.
15:18:30FromDiscord<auxym> apparently the newest way is MSIX https://docs.microsoft.com/en-us/windows/msix/overview but no idea about that
15:18:57FromDiscord<dom96> In reply to @gibson "There's a PR in": yeah, that's what I was thinking. We have a lot of awesome libraries that make creating a dependency-free exe which downloads some stuff and installs it really easy.
15:19:37FromDiscord<dom96> I've often also thought about creating a framework for installers ala NSIS/Inno in Nim because of that. I wonder if that could be a killer framework.
15:22:02FromDiscord<Rainbow Asteroids> In reply to @Nerve "Unsure where else to": iirc, Nim's ARC static, so it has no runtime cost compared to generational references, which branches on a dereference, so in theory, shouldn't Nim's ARC be faster than Vale's MM?
15:26:05FromDiscord<nocturn9x> this is what I was talking about https://media.discordapp.net/attachments/371759389889003532/1009845651984617543/unknown.png
15:26:18FromDiscord<nocturn9x> ARC just straight up crashes my code and gives me literally zero insight into what happened
15:27:54FromDiscord<dom96> run it with gdb to see where it crashes
15:27:54*rockcavera quit (Remote host closed the connection)
15:32:10FromDiscord<nocturn9x> not really too helpful https://media.discordapp.net/attachments/371759389889003532/1009847179302682684/unknown.png
15:33:02FromDiscord<nocturn9x> with refc: https://media.discordapp.net/attachments/371759389889003532/1009847398161457242/unknown.png
15:33:22FromDiscord<nocturn9x> the thing is why does it not crash for 487584756 iterations and does it crash only with one
15:35:28FromDiscord<nocturn9x> I even imported `std/segfaults` to try and catch it
15:35:36FromDiscord<nocturn9x> but nope, doesn't even trigger the catch block
15:39:49FromDiscord<nocturn9x> I guess I'll go and try to debug with `--gc:none` to rule out nim's memory management
16:01:54FromDiscord<nocturn9x> grrr why does nim disallow deleting elements from seqs during iteration
16:01:58FromDiscord<nocturn9x> it's so fricking annoying
16:03:07FromDiscord<auxym> In reply to @dom96 "I've often also thought": eh, just my opinion but doubt it. Besides the fact that traditional desktop apps lost a huge amount of popularity to the web (to my great sadness), my understanding is that "custom" installers like nsis, inno are sort of deprecated (or not preferred) in windows compares to standardization of msi (/msix). Even installshield, which sells licenses in the 4-5 fig range, creates MSIs last I used it
16:03:46FromDiscord<auxym> Now some sort of GUI msi-maker, competing with IS? Maybe. Huge undertaking though.
16:05:31FromDiscord<auxym> to my knowledge the only OSS option for MSI is wix, which is just CLI tools that take XMLs as input. and IS is crazy expensive.
16:10:33FromDiscord<nocturn9x> DEAR GOD I FIXED IT
16:10:37FromDiscord<nocturn9x> I hate managing memory.
16:10:53FromDiscord<nocturn9x> Good thing I just fixed the program that supposedly will do it for me in the future
16:12:38FromDiscord<auxym> `mitems` ? To iterate and modify elems
16:12:54FromDiscord<auxym> and yes managing memory does suck, which is why I like nim 😉
16:13:04FromDiscord<nocturn9x> In reply to @auxym "`mitems` ? To iterate": wait
16:13:08FromDiscord<nocturn9x> I'm a fucking idiot
16:13:16FromDiscord<nocturn9x> _you're right I wanna die AAAAAA_
16:13:23FromDiscord<nocturn9x> Well, I guess I learned something today.
16:13:36FromDiscord<nocturn9x> In reply to @auxym "and yes managing memory": there is only one thing I dislike about nim
16:13:41FromDiscord<nocturn9x> which is sadly core to its design
16:13:58FromDiscord<nocturn9x> the way _everything_ is a template: generics, in particular, are pretty nasty
16:14:10FromDiscord<nocturn9x> they're super cool... until they break
16:14:45FromDiscord<nocturn9x> just out of curiosity I wanna try using mitems instead
16:15:07FromDiscord<nocturn9x> does `mitems` allow me to _remove_ the element though?
16:15:14FromDiscord<nocturn9x> cuz that's what I need to do
16:15:14FromDiscord<auxym> prolly not
16:15:25FromDiscord<nocturn9x> yeah because iirc iterators are desugared to while loops
16:15:26FromDiscord<auxym> not sure, try it...
16:15:57FromDiscord<auxym> for or while, not sure, but yes they are expanded to a plain C loop
16:16:25FromDiscord<nocturn9x> mpairs
16:16:30FromDiscord<nocturn9x> it says m[index] can be modified
16:16:35FromDiscord<nocturn9x> let's see if that includes deletion
16:17:33FromDiscord<nocturn9x> hmm, nope, segfaults
16:18:10FromDiscord<auxym> what is deletion to you though? copying all the elems in a seq down one index over the index you are deleting? multiple copies so it might actually be more efficient to copy the elems you want to keep to a new seq (ie do a filter)
16:18:30FromDiscord<nocturn9x> to me it means basically pop and shift all the elements by 1
16:18:45FromDiscord<nocturn9x> I should probably try using a deque actually
16:18:54FromDiscord<auxym> yeah. why not use filter? Are you memory limited?
16:19:00FromDiscord<auxym> or deque yeah
16:19:02FromDiscord<nocturn9x> In reply to @auxym "yeah. why not use": well this is my GC
16:19:07FromDiscord<nocturn9x> if the GC runs out of memory...
16:19:18FromDiscord<nocturn9x> it's game over
16:19:20FromDiscord<auxym> oh. writing gcs is way out of my league lol.
16:19:29FromDiscord<nocturn9x> this gc is stupid simple actually
16:19:37FromDiscord<Rainbow Asteroids> In reply to @nocturn9x "it's so fricking annoying": What are you trying to do? It make make more sense to use `sequtils.filterIt` instead.
16:19:37FromDiscord<nocturn9x> I'm not smart enough for anything more complex
16:19:47FromDiscord<nocturn9x> In reply to @Rainbow Asteroids "What are you trying": yes but that creates a copy
16:20:08FromDiscord<nocturn9x> although it may be more efficient now that I think about it
16:20:18FromDiscord<nocturn9x> because a pop in the middle is still copying everything over, right?
16:20:28FromDiscord<auxym> but doing shift by one a bunch of times is probably slow. consider using a sentinel value to mark deletions, or another DS like a slot table or tree or something
16:20:35FromDiscord<leorize> `keepIt` do in-place modification if you don't like allocating more memory
16:20:53FromDiscord<nocturn9x> what I need to do is simple
16:20:56FromDiscord<nocturn9x> go through a seq
16:21:02FromDiscord<nocturn9x> see if any object there has a field set
16:21:08FromDiscord<nocturn9x> if it doesn't, dealloc() it
16:21:11FromDiscord<nocturn9x> otherwise leave it there
16:21:23FromDiscord<auxym> In reply to @nocturn9x "although it may be": yes, single copy is likely more CPU-efficient than a bunch of copies (one shift for every elem). you're just temporarily using twice the memory
16:21:32FromDiscord<nocturn9x> yeah you're right
16:21:35FromDiscord<nocturn9x> as I said I'm an idiot
16:21:36FromDiscord<nocturn9x> brb
16:22:32FromDiscord<nocturn9x> can I pass extra arguments to the filter function
16:22:33FromDiscord<auxym> In reply to @leorize "`keepIt` do in-place modification": TIL, didn't know keepit. does it do a bunch of shifts?
16:22:36FromDiscord<nocturn9x> without creating a closure
16:22:41FromDiscord<nocturn9x> (edit) "closure" => "closure?"
16:22:48FromDiscord<nocturn9x> cuz a closure would probably make the GC angry
16:22:51FromDiscord<nocturn9x> (nim's GC)
16:22:51FromDiscord<leorize> it does, it uses `delete` internally↵(@auxym)
16:23:04FromDiscord<nocturn9x> In reply to @leorize "it does, it uses": ok well then maybe filterIt is better?
16:23:09FromDiscord<nocturn9x> because it does just one big copy
16:23:25FromDiscord<auxym> In reply to @nocturn9x "can I pass extra": filterIt is a template so no need to create a closure, just pass any body block
16:23:25FromDiscord<leorize> the `It` variants are inlined and does not use closures, if you want to avoid those
16:23:31FromDiscord<nocturn9x> thx
16:24:05*Jovan joined #nim
16:24:08FromDiscord<EyeCon> In reply to @leorize "`keepIt` do in-place modification": TIL, thanks!
16:24:09FromDiscord<leorize> that stuff never worked btw↵(@nocturn9x)
16:24:16FromDiscord<nocturn9x> oh no it works now
16:24:21FromDiscord<nocturn9x> idk why it didn't work before
16:24:25FromDiscord<nocturn9x> changed some code and it's ok now
16:24:30FromDiscord<nocturn9x> no idea what I did or why though
16:25:27FromDiscord<nocturn9x> so what I could do is `self.objects = self.objects.filterIt(it.marked)`
16:26:16FromDiscord<nocturn9x> but I also need to pass `it` to another function
16:26:20FromDiscord<nocturn9x> I have an idea
16:26:32FromDiscord<EyeCon> Isn't ithis just `self.objects.keepItIf(it.marked)`?
16:26:43FromDiscord<EyeCon> (edit) "ithis" => "this"
16:27:17FromDiscord<nocturn9x> I guess
16:27:38FromDiscord<leorize> if you have a bool like that you can avoid deletion by just moving it to an another seq and use it to figure out if an entry is "empty"
16:28:50FromDiscord<Rainbow Asteroids> sent a code paste, see https://play.nim-lang.org/#ix=47Y4
16:28:54FromDiscord<nocturn9x> lemme try
16:30:46FromDiscord<nocturn9x> seems like it, yea
16:33:38FromDiscord<nocturn9x> sent a code paste, see https://play.nim-lang.org/#ix=47Y5
16:33:56FromDiscord<nocturn9x> (edit) "https://play.nim-lang.org/#ix=47Y5" => "https://play.nim-lang.org/#ix=47Y6"
17:07:41*rockcavera joined #nim
17:07:41*rockcavera quit (Changing host)
17:07:41*rockcavera joined #nim
17:23:06NimEventerNew thread by Jasonfi: How to allocate a channel and return a ptr?, see https://forum.nim-lang.org/t/9387
17:30:59*pro joined #nim
17:42:17*pro quit (Quit: pro)
18:01:11NimEventerNew thread by EyeCon: Anti-virus at work prevents the use of Nim binaries, see https://forum.nim-lang.org/t/9388
18:10:46*xet7 joined #nim
18:17:41FromDiscord<Gabben> sent a code paste, see https://play.nim-lang.org/#ix=47Yv
18:18:45FromDiscord<Gabben> (edit) "https://play.nim-lang.org/#ix=47Yv" => "https://play.nim-lang.org/#ix=47Yw"
18:44:03FromDiscord<EyeCon> There was some utility function to manually join with a separator, like it would only apply if an index has exceeded some value
18:44:17FromDiscord<EyeCon> Can someone remind me? I realize that it's a terrible description
18:49:57*xet7 quit (Ping timeout: 252 seconds)
18:50:09FromDiscord<iAmNotAfraidofSpiders> sent a code paste, see https://play.nim-lang.org/#ix=47YB
18:54:06FromDiscord<EyeCon> In reply to @EyeCon "There was some utility": Found it after searching for countless different keywords. For posteriority: https://nim-lang.org/docs/strutils.html#addSep%2Cstring%2Cstring%2CNatural (`addSep`)
18:57:15FromDiscord<Phil> In reply to @iAmNotAfraidofSpiders "I'm new to nim,": That looks like you have a typo in the import somewhere, or the file asyncdocker.nim does.↵Could you show your code to allow replication?
18:59:40FromDiscord<Phil> In reply to @iAmNotAfraidofSpiders "I'm new to nim,": never mind, managed to replicate the issue with a simple import
18:59:51FromDiscord<iAmNotAfraidofSpiders> sent a code paste, see https://play.nim-lang.org/#ix=47YF
18:59:54FromDiscord<iAmNotAfraidofSpiders> Yeah, that's all I had 🙂
19:01:07FromDiscord<Phil> Your problem here is that the package is from 2016, which IIRC was pre nim 1.0, I'm pretty sure there were a bunch of lib changes made since then that would render it incompatible. ↵You may notice for example that there is no std/asynchttpclient nowadays if you check the list of libs in nim's std lib section:↵https://nim-lang.org/docs/lib.html
19:02:17*xet7 joined #nim
19:02:31FromDiscord<Phil> 6 years is a pretty long time for a lib to go without updates
19:03:57FromDiscord<iAmNotAfraidofSpiders> That's what I thought, just wanted to double check as I'm still new 🙂
19:04:21FromDiscord<Phil> No worries and happy to help
19:10:35*disso_peach quit (Ping timeout: 256 seconds)
19:11:18FromDiscord<iAmNotAfraidofSpiders> I was just playing around, going to see if I could capture results of docker `docker ps` , looking at the docs, I think I can probably run `gorgeEx` to capture the output of running that command. I'm not doing anything particularly important, just learning things.
19:15:13*disso_peach joined #nim
19:20:09*xet7 quit (Quit: Leaving)
19:21:38FromDiscord<dom96> asynchttpclient was never a thing in the stdlib
19:22:40FromDiscord<Phil> There's no nimble package for it though, that's why I thought it to be from std originally
19:25:32FromDiscord<dom96> sure, I don't blame you for thinking that
19:25:45FromDiscord<dom96> definitely lots of stuff got deprecated in the stdlib
19:49:33FromDiscord<Bung> In reply to @Isofruit "There's no nimble package": try puppy or https://github.com/juancarlospaco/harpoon
19:53:35*d4rckh joined #nim
19:53:44d4rckhhello!
19:56:16FromDiscord<Phil> In reply to @Bung "try puppy or https://github.com/juancarlospaco/harp": Generally solid advice, but I don't really have a usecase myself, was ore in regards to the asyncdocker package iAmNotAfraidOfSpiders found
19:56:25FromDiscord<Phil> In reply to @d4rckh "hello!": Heya
19:59:22*d4rckh quit ()
20:20:30FromDiscord<answer> how do i run `nim check` with a specific backend like `js`? i can't seem to figure out the flag
20:23:28FromDiscord<domosokrat> try `nim check --backend:js`
20:24:04FromDiscord<answer> yep that worked thanks
20:47:24FromDiscord<enthus1ast> does one know if the the nim.tmLanguage syntax hightlighter is hand crafted?
20:47:33FromDiscord<enthus1ast> or is there a tool i could use to streamline
20:47:38FromDiscord<enthus1ast> @Varriount\: maybe?
20:48:08FromDiscord<Varriount> What do you mean by hand-crafted?
20:48:21FromDiscord<Varriount> It's not generated by the Nim compiler, if that's what you're asking.
20:48:35FromDiscord<Varriount> (edit) "compiler," => "compiler (or any other tool),"
20:48:38FromDiscord<enthus1ast> i meant, so its fully written by hand?
20:48:40FromDiscord<enthus1ast> ah ok
20:48:59FromDiscord<enthus1ast> oh boy
21:02:30*alice joined #nim
22:10:22*vicecea quit (Remote host closed the connection)
22:10:53*vicecea joined #nim
22:27:01*Lord_Nightmare quit (Quit: ZNC - http://znc.in)
22:31:17*Lord_Nightmare joined #nim
22:38:17FromDiscord<m4ul3r> In reply to @iAmNotAfraidofSpiders "Yeah, that's all I": Were you ever able to get async docker working? ↵It hasn't been updated in a few years, and I tried making changes to get it working by no dice
23:20:28NimEventerNew thread by Xioren: Need some direction on macros., see https://forum.nim-lang.org/t/9389