<< 19-06-2021 >>

00:05:10FromDiscord<shadow.> In reply to @shadow. "what's the best way": ok nvm i figured it out
00:40:14*arkurious quit (Quit: Leaving)
00:57:21*Gustavo6046 quit (Ping timeout: 272 seconds)
00:57:26*Gustavo6046_ joined #nim
00:59:42*Gustavo6046_ is now known as Gustavo6046
01:34:24FromDiscord<Elegant Beef> I can now talk to myself, the future of tech here
01:35:22FromDiscord<ElegantBeef> @dom96 also might want to change the discord description channel descriptions 😄
02:24:37FromDiscord<ajusa> anyone know how I could make a static executable with something like https://github.com/genotrance/nimbass
02:25:12FromDiscord<ajusa> It dynamically links to the shared library in the same directory as the executable
02:26:36*vicfred joined #nim
02:29:00FromDiscord<Elegant Beef> It uses nimterop so you'd have to pass whatever it needs to statically link it afaik
02:30:03FromDiscord<ajusa> correct me if I'm wrong but if I made a package that uses this library as is as a "binary" nimble package, `nimble install` wouldn't actually work right? Since it would always be missing the shared libraries?
02:30:35FromDiscord<Elegant Beef> Nimterop fetches the binaries required, so it should afaik
02:31:00FromDiscord<ajusa> well I guess I could just test this out
02:31:51FromDiscord<ajusa> sent a code paste, see https://play.nim-lang.org/#ix=3qoY
02:34:24FromDiscord<ajusa> interestingly it seems to look for the shared libraries in the `cwd` rather than the directory where the binary is in
02:39:03FromDiscord<Elegant Beef> Yea i havent used nimterop ever so i'm completely blind when it comes to using it for anything
02:41:07FromDiscord<gogolxdong (liuxiaodong)> Anyone know this error?
02:42:15FromDiscord<Rika> what error?
02:42:36FromDiscord<Elegant Beef> It's a phantom error apparently \:P
02:42:48FromDiscord<ajusa> this(
02:43:56FromDiscord<Rika> i cant believe beef has abandoned us
02:45:03FromDiscord<Elegant Beef> Indeed
02:45:04FromDiscord<Elegant Beef> He's a dick
02:45:18FromDiscord<Rika> now i cant block your messages 😦
02:45:34FromDiscord<Elegant Beef> Aw hell yea down with censorship!
02:45:41FromDiscord<exelotl> Honestly the new discord colours are so bad they make me want to switch to matrix too xD
02:45:58FromDiscord<Rika> ill switch to matrix when everyone i talk to moves to matrix
02:46:07FromDiscord<ajusa> https://forum.nim-lang.org/t/6181 seems like there is no way to have nimble include any shared libraries in the same directory as the binary 😢
02:46:19FromDiscord<Rika> isnt there a foreignrequires thing in nimb;e
02:46:32FromDiscord<Elegant Beef> I still just want channelled voip then matrix is perfect
02:46:44FromDiscord<Rika> i dont give much of a fuck about voip
02:46:55FromDiscord<Rika> i probably chat 1000x more than i talk in voip
02:47:46FromDiscord<Elegant Beef> I talk to my friends a lot in voip, like almost am always in voip if it's past 6pm
02:47:52FromDiscord<ajusa> In reply to @Rika "isnt there a foreignrequires": so this almost works for me, except that libbass isn't packaged for most distros, and nimbass always sets the dynamic library loading path to be the same directory as the binary itself
02:47:55FromDiscord<Elegant Beef> As such conference call voip suck
02:47:55FromDiscord<Rika> ok social boy
02:48:32FromDiscord<Rika> In reply to @ajusa "so this almost works": sounds like its time for static libraries
02:48:46FromDiscord<Varriount> In reply to @ajusa "so this almost works": I believe the compiler has something to override that. A more permanent solution would be to fix nimbass. Why is it loading from a path at all though?
02:49:06FromDiscord<ajusa> In reply to @Varriount "I believe the compiler": what do you mean? aren't all dynamic libraries loaded from a path?
02:51:09FromDiscord<Varriount> In reply to @ajusa "what do you mean?": Yes, but usually, rather than something like `loadLibrary("path/to/library.so")` it's `loadLibrary("library.so")`, which, afaik, loads from PATH on Windows and... LD_LIBRARY_PATH on Linux.
02:51:39FromDiscord<Varriount> (edit) "from" => "looks in the paths contained in the" | "looks in the paths contained in thePATH ... on" added "environment variable"
02:51:56FromDiscord<Elegant Beef> I dont know if that changes anything in this example though does it, since the binary is built and stored in the nimble directory
02:52:27FromDiscord<ajusa> https://github.com/genotrance/nimbass/blob/master/nimbass/bass.nim#L59 sets the rpath to be the same directory as the binary. I could fork and change that though...
02:53:45FromDiscord<Varriount> In reply to @ajusa "https://github.com/genotrance/nimbass/blob/master/n": Just curious, is libbass in your LD_LIBRARY_PATH environment variable (or rather, the directory it's in)?
02:54:22FromDiscord<ajusa> it shouldn't be since I've never actually installed it
02:54:50FromDiscord<ajusa> nimterop downloads the shared library itself
03:06:14FromDiscord<ajusa> also after reading through nimterop's documentation it should be statically linking since nimbass doesn't use the dynlib flag
03:06:53FromDiscord<Elegant Beef> So seems you just need to get the build to point at the right path?
03:08:47FromDiscord<ajusa> maybe?
03:09:59FromDiscord<ajusa> idk it's late here I'll need to take another look tomorrow but I think that either statically building it or making sure that the shared libraries are copied over is the right way to proceed
03:13:54FromDiscord<Varriount> Hrm. Why does Nimble require my home directory to be in my PATH variable?
03:14:37FromDiscord<Zachary Carter> weird
03:14:51FromDiscord<Varriount> > Error: ''/mnt/c/Users/Clay' not in PATH.
03:15:57FromDiscord<j-james> What's that error's context?
03:16:20FromDiscord<Varriount> I was attempting to install NPeg
03:16:24*TakinOver joined #nim
03:17:18FromDiscord<Varriount> Ah! I bet I know.
03:17:44FromDiscord<Varriount> It's something to do with the fact that my home directory has a space in it.
03:34:40FromDiscord<Zachary Carter> is it possible to forward declare a proc in module A and implement in module B and invoke it in module C?
03:36:33FromDiscord<Rika> why do you need the forward declaration in module a if its never used in such module
03:36:48FromDiscord<Rika> just import b from c and you can use it?
03:36:55FromDiscord<Rika> if a imports it then export it
03:42:30FromDiscord<Varriount> @Zachary Carter No.
03:42:58FromDiscord<Varriount> https://github.com/nim-lang/nimble/blob/686555cd347badfe6c48c4ac49afade1ef8409ad/src/nimblepkg/tools.nim#L13↵Why does Nimble handle commands as strings, rather than sequences of strings? 🤦‍♂️
03:44:21FromDiscord<Zachary Carter> In reply to @Rika "why do you need": it's a pretty common pattern in C - you have a header file defining an interface and an implementation file and then as long as the symbols in the implementation are linked, the compiler doesn't care if the implementation isn't present in the file the forward decl is in
03:44:32FromDiscord<Rika> probably because sometimes spaces arent desired as the separator in your application?
03:44:40FromDiscord<Zachary Carter> so I can avoid a tight coupling between modules
03:44:46FromDiscord<Rika> In reply to @Zachary Carter "it's a pretty common": thisisntc.txt
03:44:50FromDiscord<Zachary Carter> and potentially avoid circular dependencies down the road
03:44:56FromDiscord<Zachary Carter> yeah well it's close enough
03:44:59FromDiscord<Varriount> @Zachary Carter Sounds like something `include` is supposed to be for.
03:45:07FromDiscord<Zachary Carter> @Varriount possibly
03:45:16FromDiscord<Zachary Carter> I don't like the Nim isn't C argument
03:45:18FromDiscord<Zachary Carter> of course it's not C
03:45:38FromDiscord<Zachary Carter> but it compiles to C and you can basically treat Nim as C if you want to in most aspects
03:45:48FromDiscord<Rika> the language does not behave the same
03:46:03FromDiscord<Rika> do not expect things to map cleanly from c into nim
03:46:09FromDiscord<Rika> even if "it compiles into i"
03:46:10FromDiscord<Rika> (edit) "i"" => "it""
03:46:30FromDiscord<Zachary Carter> I've been programming in Nim for close to 4 years now, I know these things
03:46:43FromDiscord<Zachary Carter> I'm just wondering if forward declarations like I'm describing are possible
03:46:53FromDiscord<Zachary Carter> if not, no sweat
03:46:58FromDiscord<Rika> well then i will say no
03:48:05FromDiscord<Elegant Beef> You could do something silly with a macro but yea no proper forward declare, symbol wouldnt be bound until "implemented" in module b
03:48:53FromDiscord<Elegant Beef> Any elaboration for what you're doing?
03:52:44FromDiscord<Zachary Carter> sent a long message, see http://ix.io/3qp8
04:04:47FromDiscord<Elegant Beef> You might be able to use the macro cache to get the symbol before implemented, which then can be retrieved
04:05:45FromDiscord<Zachary Carter> eh, it's not that big of a deal at the moment, but if it comes to that, I'll give it a shot 🙂 thanks for the idea!
04:06:58FromDiscord<Rika> man macrocache is so nice innit
04:07:07FromDiscord<Rika> when was it added?
04:07:34FromDiscord<Elegant Beef> 1.4.X i think maybe 1.2.X
04:07:48FromDiscord<Elegant Beef> Preemptive for IC support
04:10:24FromDiscord<Rika> what's the hot stuff for database libraries in nim nowadays? i'd like one that isnt an ORM but just a raw-ish db lib
04:10:57FromDiscord<Rika> preparing to rewrite a behemoth of a backend
04:21:30*SebastianM joined #nim
04:21:36*SebastianM quit (Client Quit)
04:38:24FromDiscord<gogolxdong (liuxiaodong)> how to convert seq[byte] to string
04:40:21FromDiscord<Elegant Beef> you can simply `cast[string](yourByte)`
04:45:42FromDiscord<amadan> @Rika might be a bit too ORMish but https://github.com/itsumura-h/nim-allographer is kinda rawish
04:47:18FromDiscord<Rika> Hm, I’m not sure, maybe I’ll fork it and change the whole syntax lol
04:48:13FromDiscord<leorize> that's actually dangerous
04:48:14FromDiscord<Rika> It’s just a bit strange
04:49:07FromDiscord<Elegant Beef> Well isnt that completely fine if you dont leave Nim leorize?
04:49:08FromDiscord<gogolxdong (liuxiaodong)> vice versa?
04:49:08FromDiscord<leorize> yea but how can you know that it won't leave nim?
04:50:15FromDiscord<Elegant Beef> Fine, we'll use copymem
04:50:17FromDiscord<leorize> you really just need a `toString` for `openArray[char]`
04:50:30FromDiscord<leorize> I'm surprised that it doesn't exist in the stdlib
04:50:48FromDiscord<Elegant Beef> Same
04:51:31FromDiscord<Elegant Beef> well you mean `openarray[byte]` no?
04:51:44FromDiscord<flywind> there is a feature request anyway
04:51:46FromDiscord<flywind> https://github.com/nim-lang/Nim/issues/14810
04:51:49FromDiscord<leorize> I don't see why both can't exist
04:53:05FromDiscord<Elegant Beef> Well here is a proper impl 😛 https://play.nim-lang.org/#ix=3qpk
04:55:12FromDiscord<codic> beautiful
04:55:17FromDiscord<codic> integer literal syntax is so nice
04:55:42FromDiscord<codic> but why do you need 50u8, why doesn't it assume byte = uint8?
04:55:56FromDiscord<Rika> because thats how the current type system works
04:56:37FromDiscord<Elegant Beef> without `u8` it'd be a `int` since there is no information that it shouldnt be
04:56:45FromDiscord<leorize> because matching works based on what the type of the expression is
04:57:14FromDiscord<Elegant Beef> `50u8` tells it that you want this to be an array of bytes
04:57:14FromDiscord<Elegant Beef> or uint8 if you prefer
04:57:15FromDiscord<leorize> coercing based on possible overloads is not impossible (it already exists in a way), just not implemented
04:57:28FromDiscord<Rika> it may make sense at a glance that "of course it would be a u8 theres no other way it couldnt be" but what if there were more toString procs?
04:57:30FromDiscord<Rika> what then?
04:58:11FromDiscord<Rika> its probably going to be somewhat confusing if it was allowed, coercing based on function signature
04:58:17FromDiscord<Elegant Beef> Yea it being in the MCS means that you dont have the right hand information yet since Nim is a left to right inference language atm afaik
04:58:39FromDiscord<Elegant Beef> Though i guess it gets rewritten so that might not be an issue
04:58:44FromDiscord<leorize> you are reading too much into the implementation
04:59:26FromDiscord<Elegant Beef> Hey i implemented silly type inference for enums so i'm like a type god! 😛
04:59:38FromDiscord<leorize> lol
04:59:49FromDiscord<Elegant Beef> I am not a type god, i'm barely a type mortal
05:00:11FromDiscord<leorize> I think I heard somewhere that haskell have this kind of inference
05:00:24FromDiscord<Rika> yes it does i believe
05:00:29FromDiscord<Rika> so does rust too i believe
05:00:42FromDiscord<Elegant Beef> Yea rust does have reverse inference
05:00:42FromDiscord<Rika> i guess its not actually that confusing now that i thought more about it
05:00:47FromDiscord<leorize> ever the less arguments for why nim shouldn't have it \:P
05:01:01FromDiscord<Rika> so when are we getting it
05:01:02FromDiscord<Rika> smh
05:01:28FromDiscord<Elegant Beef> Leorize just volunteered to add it, you seen it right rika? 😛
05:02:02FromDiscord<Rika> nim boutta have a hybrid HM and (whatever the current type system is) type system?
05:02:07FromDiscord<leorize> it's gonna be awhile before I touch the compiler again, so keep waiting \:P
05:02:23FromDiscord<Rika> ill just run at light speed, then itll be finished in no time
05:03:18FromDiscord<Elegant Beef> I kind want to try that enum stuff "properly" but ugh actually adding stuff, that's how I spend forever trying to understand the compiler
05:03:18FromDiscord<leorize> it's a lost cause
05:03:24FromDiscord<leorize> don't even try unless you really have to
05:04:16FromDiscord<Elegant Beef> Well i'd like the smarter enums to be in, so only partial "have to"
05:04:16FromDiscord<leorize> smarter enums?
05:04:30FromDiscord<Rika> yeah he wants his enums to cook for him
05:05:00FromDiscord<Elegant Beef> Enums based off context so `let a: Align = left` works even if there are multiple `left`s
05:05:18FromDiscord<leorize> doesn't that already exist with `{.pure.}`?
05:05:33FromDiscord<leorize> at least it seems to be for cps
05:05:34FromDiscord<Elegant Beef> No you have to do `Align.left`
05:06:29FromDiscord<Elegant Beef> If you have multiple enums with the same name you have to specify where the symbol comes from, the idea is that since the type information is there there isnt any point
05:06:29FromDiscord<leorize> so currently it's kinda like how module resolution work
05:06:39FromDiscord<leorize> you gotta spell it out, correct?
05:07:30FromDiscord<Elegant Beef> Yea
05:07:30FromDiscord<Elegant Beef> My RFC/PR made it so the enums could be inferred from the value in the case it was unambigious
05:07:31FromDiscord<leorize> sounds good to me
05:08:48FromDiscord<Elegant Beef> https://github.com/nim-lang/RFCs/issues/373 if you want to read about it
05:08:49FromDiscord<Elegant Beef> But it's mostly just me drowning on
05:08:49FromDiscord<Elegant Beef> Droning, draining, or some other word that makes sense
05:08:49FromDiscord<leorize> most language features don't make it to nim unless you write it yourself or the implementation is simple enough
05:09:20FromDiscord<Rika> droning
05:09:50FromDiscord<Elegant Beef> I know rika i wasnt sincerely asking, i was mocking myself, cmon get with the system
05:10:05FromDiscord<Rika> you know?
05:10:14FromDiscord<Rika> surprising
05:10:26FromDiscord<Elegant Beef> Indeed
05:42:00FromDiscord<Varriount> In reply to @leorize "most language features don't": And an unfortunate prerequisite of that is understanding the compiler...
05:48:07FromDiscord<codic> In reply to @Rika "it may make sense": i think you should specify the type if there's more than one overload but otherwise it should auto coerce; plus, something like this↵`proc toString(x: openArray[uint8])`↵`proc toString(x: openArray[uint16])` if you pass it `6_900` it should call the second overload without needing a u16 prefix because it can't fit in a uint8
05:49:12FromDiscord<Elegant Beef> Except the issue isnt on the calling end presently, it's on the parsing end
05:50:16FromDiscord<Elegant Beef> when you do `[10, 20, 30]` it's an `array[0..3, int]` so `toString([10, 20, 30])` isnt valid
05:50:17FromDiscord<rainbowasteroids> what gui library do y'all prefer?
05:54:53FromDiscord<Rika> In reply to @codic "i think you should": read below
05:54:57FromDiscord<Rika> below the message
05:56:36FromDiscord<Elegant Beef> Oh discord replies dont work on matrix
06:02:03FromDiscord<codic> eh i dont think its that confusing
06:02:06FromDiscord<codic> oh nvm you said that
06:36:47FromDiscord<Bung> @haxscramper does hmisc requires nim >= 1.4 neccessary ?
06:38:04FromDiscord<Bung> am trying to use my slim to a project requires nim > 1.2
06:56:19*Epsilon quit (Remote host closed the connection)
06:56:35*Epsilon joined #nim
07:03:33FromDiscord<haxscramper> Yes, I only support latest nim
07:03:35FromDiscord<Bung> I validate , namedBin need nimble bundled with nim 1.2.2 std/enumerate need 1.3 which is devel
07:10:06FromDiscord<haxscramper> I'm not sure if I understand the question. I can just `require nim >= 1.2.whatewher` in `hmisc.nimble`, it is not an issue, but I won't give any guarantees stuff will be working
07:10:11FromDiscord<haxscramper> On this version
07:10:38FromDiscord<haxscramper> Though I would prefer to `require` version above of what I actually support
07:12:30FromDiscord<Bung> it will not work , it requires 1.4
07:13:59FromDiscord<Bung> unless I deploy my slim as binary, it will not be alternative tool for nimble on lower nim version
07:15:49FromDiscord<haxscramper> So basically `hmisc` being availabe for `1.2.X` would allow you to make `slim` work for `1.2.X` as well?
07:17:16FromDiscord<haxscramper> Okay, I will quick-patch things now
07:17:28FromDiscord<Bung> your nimble file `namedBin` can parsed by bundled nimble nim > 1.2.2
07:17:51FromDiscord<Bung> your dependency `std/enumerate` since `1.3`
07:18:37FromDiscord<Bung> and push pop inline to func also an error on 1.2
07:21:43FromDiscord<Bung> it's better to support lower nim version , am not sure your ast lib how widely used will be, maybe workth or not
07:22:18FromDiscord<Bung> worth
07:22:47FromDiscord<haxscramper> Most nim users are working with latest nim version
07:23:06FromDiscord<haxscramper> https://media.discordapp.net/attachments/371759389889003532/855709255407632384/09.png
07:25:13FromDiscord<haxscramper> And honestly I don't really care, it takes time to provide backports and fixes and make sure everything works on all versions
07:27:51FromDiscord<haxscramper> sent a code paste, see https://paste.rs/xKa
07:29:31FromDiscord<Bung> let me check the project nim version first
07:30:16*neceve joined #nim
07:31:00FromDiscord<haxscramper> No, after quick look on what is broken for 1.2.2 I would say I can't backport for older nim versions, at least not easily
07:31:18FromDiscord<haxscramper> Because there are too many backwards-incompatible changes in APIs, parsing etc
07:31:55FromDiscord<haxscramper> I fixed `namedBin` thing though
07:37:35FromDiscord<Bung> okay , it use 1.5.1 , weird
07:58:34FromDiscord<haxscramper> Though you can make a PR with all the necessary fixes
08:00:20FromDiscord<Bung> guess just it use a ci cached with older nim version
08:00:34FromDiscord<Bung> 1.4 requirement is fine
08:29:57*jkl joined #nim
08:49:20FromDiscord<whisperdev> Does anyone know if nimarchive/libarchive can do RAR?
09:16:52FromDiscord<Rika> I believe RAR is proprietary
09:38:35*jkl quit (Ping timeout: 272 seconds)
10:33:38FromDiscord<whisperdev> Looks like it can do some but it fails on one rar archive i have :/
10:40:33*iortega joined #nim
11:16:42FromDiscord<Lefl> Any idea how I could store a DOM element inside a Table?
11:17:18FromDiscord<Lefl> I'm basically trying to implement something like jquery's `hide` and `show`
11:30:56FromDiscord<Bung> use style display: block , none
11:49:24FromDiscord<tandy> does anyone have a more complex example of the json unmarshaling using `to`?
11:50:22FromDiscord<tandy> the example in the docs is quite simple
11:56:51FromDiscord<planetis> well bc there is not much to it \:P
11:58:16FromDiscord<planetis> https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tjsonmacro.nim
12:09:06*SebastianM joined #nim
12:11:02FromDiscord<tandy> what about types in types?
12:11:26FromDiscord<Lefl> In reply to @Bung "use style display: block": But what if it's a flex element 🤔
12:11:41FromDiscord<tandy> sorry for the spam
12:11:43FromDiscord<tandy> sent a long message, see http://ix.io/3qrm
12:11:45FromDiscord<tandy> but something like this
12:13:52*iortega left #nim ( )
12:16:07*arkurious joined #nim
12:24:55FromDiscord<Zachary Carter> In reply to @Lefl "But what if it's": probably better to ask these questions in #webdev
12:25:10FromDiscord<Lefl> Oh thanks, that eluded me haha
12:25:14FromDiscord<Zachary Carter> I'm already confused by your question - I don't know if you're referring to a Nim table or a HTML table
12:25:28FromDiscord<Zachary Carter> but yeah - more people will be able to help you out there I'm guessing 🙂
12:25:40FromDiscord<Lefl> Yeah I'll be a bit more specific
12:26:40FromDiscord<Zachary Carter> In reply to @tandy "{ ": Yeah best to use gist or some similar service for snippets like these. What problem are you having with the `to` macro? Also from what I understand Nim's stdlib JSON de/serialization is not the fastest
12:27:26FromDiscord<Zachary Carter> but there are some more performant implementations in the form of third party libraries if you don't need all the features of the stdlib's JSON module
12:30:12FromDiscord<tandy> not having problems just yet, just was curious about how powerful it was
12:30:18FromDiscord<tandy> thank you for the advice tho
12:30:24FromDiscord<Zachary Carter> Yeah! No problem!
12:30:47FromDiscord<Zachary Carter> If you have any specific questions, feel free to ask! I know that the de/serialization has some limits, but I think nested objects should be fine 🙂
12:34:38FromDiscord<Rika> nim std json `to` can do al ot of stuff i believe
12:34:48FromDiscord<Rika> dont worry about it until you get issues lol
12:34:53FromDiscord<deech> How do I specify a generic in an anonymous function? This doesn't work `let f = proc [t](thing: T) = ...`.
12:35:04FromDiscord<deech> (edit) "[t](thing:" => "[T](thing:"
12:35:16FromDiscord<Rika> probably use an implicit generic `let f = proc (thing: any) = ` or something, i think will work
12:36:27FromDiscord<Rika> acutally
12:36:41FromDiscord<Rika> no i dont think you can store generics in a variable
12:37:47FromDiscord<Zachary Carter> I have a strong feeling the answer is no, but is there any way to capture a static int from the left hand side of an assignment operation, and use it as a generic parameter?
12:38:09FromDiscord<Zachary Carter> I have a converter that takes a string and converts it to a character array
12:38:27FromDiscord<Zachary Carter> via copymem
12:38:35FromDiscord<Rika> wait wait sorry i didnt get that
12:38:40FromDiscord<Zachary Carter> but I have to pass in the size of the result array as a generic parameter
12:38:41FromDiscord<Rika> mind writing an example
12:38:43FromDiscord<Zachary Carter> yeah one sec
12:39:39FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3qrr
12:39:48FromDiscord<Zachary Carter> I'm trying to avoid having to do `len(defaultName)` when calling the converter
12:39:50FromDiscord<Rika> i assume this is replacing len
12:39:51FromDiscord<Rika> yeah
12:40:12FromDiscord<Rika> okay ill think, maybe `defaultName.typeof.N`???
12:40:19FromDiscord<Rika> kinda sounds strange
12:40:34FromDiscord<Rika> let me see the typetraits module again, might have an answer
12:40:38FromDiscord<Zachary Carter> sweet thank you
12:40:51FromDiscord<Rika> does the eval bot work now or is it still kaput
12:41:17FromDiscord<Zachary Carter> ihasnoidea
12:41:19FromDiscord<Rika> its not N, its I
12:41:53FromDiscord<Zachary Carter> hmm let me try that
12:43:24FromDiscord<Rika> OH OH i found it
12:43:29FromDiscord<Rika> https://nim-lang.org/docs/typetraits.html#genericParams.t%2Ctypedesc
12:43:40FromDiscord<Zachary Carter> haha I was just actually reading that
12:43:50FromDiscord<Zachary Carter> thanks! this should work!
12:43:53FromDiscord<Rika> smh
12:43:54FromDiscord<Rika> 😦
12:44:13FromDiscord<Rika> well your next problem is somehow unwrapping `StaticParam`
12:44:36FromDiscord<Zachary Carter> ugh yeah
12:46:21*SebastianM quit (Quit: Bye)
12:47:07FromDiscord<Rika> ah wait `# NOTE: For the builtin array type, the index generic param will always become a range type after it's bound to a variable.`
12:47:15FromDiscord<Rika> i guess thats helpful for you
12:47:43FromDiscord<Zachary Carter> yup! I'm just now figuring out how to get the max extent of the range and I think I'm g2g
12:51:21FromDiscord<Rika> uh its probably .high
12:51:22FromDiscord<Zachary Carter> `toCharArray[high(genericParams(typeof(defaultName)).get(0))](name)` produces `illformed AST` 😦
12:51:33FromDiscord<Rika> strange
12:51:41FromDiscord<Rika> probably remove the typeof i think?
12:52:01FromDiscord<Zachary Carter> I think len(defaultName) is going to be easier xD
12:52:08FromDiscord<Zachary Carter> In reply to @Rika "probably remove the typeof": compiler did not like that
12:52:22FromDiscord<Rika> its because genericparams is a macro whos betting 😛
12:52:31FromDiscord<Zachary Carter> probs
12:52:50FromDiscord<Zachary Carter> it's not but `genericParamsImpl` is 🙂
12:55:04FromDiscord<Rika> basically the same
12:55:54FromDiscord<Zachary Carter> yup
12:56:14FromDiscord<Zachary Carter> well thanks for helping even if `len` was the best option
13:00:19*lucerne quit (Quit: Bye)
13:01:30FromDiscord<hamidb80> hey
13:01:38*lucerne joined #nim
13:02:39FromDiscord<Rika> hello
13:02:40FromDiscord<Rika> whats up
13:05:45FromDiscord<hamidb80> not much, you?
13:06:24FromDiscord<Rika> well im just doing nothing, waiting for anyone to ask something here lol
13:08:49FromDiscord<hamidb80> i have a question
13:09:12FromDiscord<hamidb80> why does `nre.findIter` doesn't work with `mapIt`?
13:09:12FromDiscord<hamidb80> https://play.nim-lang.org/#ix=3qrz
13:10:12FromDiscord<hamidb80> i don't see any problem with it
13:10:15FromDiscord<Rika> i havent used nre much
13:10:18FromDiscord<Rika> ill look into it a bit
13:10:51FromDiscord<Rika> oh
13:10:55FromDiscord<Rika> this is a bit obvious
13:10:59FromDiscord<Rika> findIter is an iterator
13:11:03FromDiscord<Rika> mapIt takes a seq
13:11:19FromDiscord<hamidb80> no mapIt takes `typed`
13:11:22FromDiscord<Rika> no
13:11:30FromDiscord<Rika> its from sequtils
13:11:31FromDiscord<Zachary Carter> `typed` isn't a real type
13:11:51FromDiscord<hamidb80> `template mapIt(s: typed, op: untyped): untyped =`
13:11:55FromDiscord<Zachary Carter> yes
13:12:00FromDiscord<Zachary Carter> `typed` is not a real type
13:12:04FromDiscord<Zachary Carter> that's a template
13:12:33FromDiscord<Zachary Carter> which means that the compiler will treat s as a `typed` instance of an object, meaning if you pass an `int` into the template the compiler will respect the fact that it's an `int`
13:12:58FromDiscord<Zachary Carter> so the implementation of `mapIt` right probably expects that `s` is a sequence and is probably doing things like subscripting the sequence
13:13:30FromDiscord<Zachary Carter> notice `op` is untyped - this means that the compiler isn't going to complain wtf you pass into that parameter
13:13:48FromDiscord<hamidb80> https://media.discordapp.net/attachments/371759389889003532/855797514594549800/unknown.png
13:14:11FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=3qrB
13:14:16FromDiscord<hamidb80> but according to the implementation it should accept iterators too
13:14:33FromDiscord<Rika> but it doesnt
13:14:39FromDiscord<Rika> because iterators do not have `len`
13:14:43FromDiscord<hamidb80> oh
13:14:44FromDiscord<Zachary Carter> just call `toSeq` on the iterator and be done 🙂
13:14:55*Vladar joined #nim
13:15:04FromDiscord<Zachary Carter> or don't use sequtils
13:15:12FromDiscord<Rika> and iterators do not compile given the pattern `let _ = s`
13:15:32FromDiscord<Zachary Carter> because honestly, it's probably slower and performing more allocations than you really need
13:15:38FromDiscord<Rika> yes
13:15:40FromDiscord<Zachary Carter> but it's "functional" so
13:15:40FromDiscord<Rika> it is
13:15:57FromDiscord<Zachary Carter> if you care about these sorts of things, maybe it's a more attractive option to you
13:16:21FromDiscord<hamidb80> thank you both
13:16:29FromDiscord<Zachary Carter> yeah - and by functional I mean no side efffects
13:16:31FromDiscord<Zachary Carter> its' a pure function
13:16:40FromDiscord<Zachary Carter> so it's not going to mutate the arguments passed to it or any global state
13:16:51FromDiscord<Zachary Carter> in case you weren't sure as to what I was referring to 🙂
13:34:22FromDiscord<haxscramper> In reply to @dom96 "no one answered lol": Most of the activity in the tg chat happens when someone asks a question, otherwise nothing really happens. It can be several days where just new forum thread auto-updater posts things, sometimes spliced with another spambot
13:36:30FromDiscord<haxscramper> And there are even fewer people who can definitely answer this "I want it" or "I don't want it" (from those who are not already on both platofrms like me/yardanico/juancarlospaco and to lesser extent mratsim)
13:39:26FromDiscord<haxscramper> And I've seen a lot of times replies like "idk probably, it is better to ask on IRC/discord because <reason>"
13:43:24FromDiscord<leorize> then I suppose we should bridge?
13:46:34FromDiscord<haxscramper> Well, yes. I mean if people are dissatisfied with this we can revert it, right?
13:47:01FromDiscord<Rika> i dont see why people would be dissatisfied with it though
13:47:41FromDiscord<haxscramper> Maybe at the start when we merge two not very small chats together it might cause some confusion, but otherwise it should fine
13:48:39FromDiscord<Telegram Bridge> Hello, I'm a Telegram bridge bot. Use `!tg help` for help.
13:48:48FromDiscord<Rika> that was fuckin quick
13:49:04FromDiscord<leorize> we need a telegram mod
13:49:09FromDiscord<leorize> are you one @haxscramper ?
13:49:40FromDiscord<haxscramper> no, I'm not a mod. @dom96 is a tg chat owner, @Yardanico is an admin
13:50:06FromDiscord<leorize> then we need either one of them to show up
13:50:37FromDiscord<vindaar> also @mratsim and miran are mods apparently
13:51:33*federico3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
13:52:11*federico3 joined #nim
13:52:22FromDiscord<leorize> it would work if they authorize too
13:52:31FromDiscord<leorize> but again, we need them here \:p
13:52:40FromDiscord<haxscramper> @mratsim
14:04:55FromDiscord<jorjun_gitlab (jorjun)> How do I confirm my email in the Nim forum... I can't post and I can't see a way to do it. Nor have I ever received any emails..
14:06:00FromDiscord<jorjun_gitlab (jorjun)> please let me into this gang
14:07:26FromDiscord<lyiriyah> In reply to @jorjun_gitlab (jorjun) "How do I confirm": It works for me... try a different email?
14:07:45FromDiscord<lyiriyah> Maybe the email is caught in your spam filter
14:08:44FromDiscord<jorjun_gitlab (jorjun)> You mean sign up again under a different email? I was going to try that next. Do you see an account option to send an email? Curious
14:09:04FromDiscord<lyiriyah> I think you can change the email in the settings
14:10:11FromDiscord<lyiriyah> And I don't see an option to send an email
14:11:11FromDiscord<jorjun_gitlab (jorjun)> Any idea how to get to the settings, plz/ I see no menu options at all in my view
14:12:29*Vladar quit (Remote host closed the connection)
14:13:35FromDiscord<lyiriyah> There should be an icon in the top right corner. Click on that and select "My profile" from the dropdown. From there, there should be two tabs, Overview and Settings. Select Settings.
14:31:22*lyiriyah joined #nim
14:38:29*lyiriyah quit (Quit: Lost terminal)
14:53:23FromDiscord<dom96> nah, don't sign up again
14:53:31FromDiscord<dom96> just tell a mod your profile nick and we can activate for you
14:53:46FromDiscord<dom96> (if you delete your account you won't be able to recreate it under the same name)
14:54:21FromDiscord<dom96> @haxscramper the thing about telegram I see is that people love to post memes there
14:54:28FromDiscord<dom96> so not sure bridging here will work culture-wise
14:55:32FromDiscord<pointystick> Hi Dom, I registered on the forums a while back but the email never arrived for me either. My account is pointystick
14:56:28FromDiscord<dom96> @pointystick confirmed
14:56:50FromDiscord<pointystick> Thanks!
15:05:09FromDiscord<haxscramper> In reply to @dom96 "<@!608382355454951435> the thing about": Yeah, they also do post questions that are hanging unanswered unless someone (most of the time from people I already mentioned) and answers them. And there is not that much memes, except for this guy with cat gifs, but I I'd you ask me I would restrict him sending media anyway if I had a say in this
15:05:30FromDiscord<haxscramper> (edit) "I I'd" => "if"
15:06:40FromDiscord<haxscramper> So I'm short yes, I partially agree with you but it does not seem like a reason why we should keep them restricted from all other bridges
15:06:59FromDiscord<dom96> fair enough, if we can moderate it then questions being unanswered is reason enough to bridge IMO
15:07:22FromDiscord<dom96> but we can see how it goes
15:07:27FromDiscord<dom96> !tg help
15:07:37FromDiscord<Telegram Bridge> sent a long message, see http://ix.io/3qsf
15:11:13FromDiscord<dom96> my biggest concern tbh is that t2bot.io dies
15:12:30FromDiscord<dom96> !tg bridge -1001156039454
15:12:51FromDiscord<dom96> hmmm
15:12:57FromDiscord<Telegram Bridge> You do not have the permissions to bridge This room.
15:13:26FromDiscord<dom96> I mean... if I don't then who does
15:13:29FromDiscord<dom96> !tg bridge -1001156039454
15:13:30FromDiscord<Telegram Bridge> You do not have the permissions to bridge This room.
15:14:49FromDiscord<dom96> !tg bridge 1001156039454
15:14:49FromDiscord<Telegram Bridge> You do not have the permissions to bridge This room.
15:15:02FromDiscord<haxscramper> Maybe it must be [leorize](https://matrix.to/#/@leorize:envs.net) on the matrix side?
15:15:07FromDiscord<dom96> oh wait
15:15:09FromDiscord<dom96> dug
15:15:11FromDiscord<dom96> (edit) "dug" => "duh"
15:15:24FromDiscord<dom96> !tg bridge -1001156039454
15:15:25FromDiscord<Telegram Bridge> That Telegram chat has no existing portal. To confirm bridging the chat to this room, use `!tg continue`
15:15:50FromDiscord<dom96> no idea what that means
15:16:01FromDiscord<leorize> even if t2bot.io dies, you can still run your own bridge
15:16:08FromDiscord<leorize> just do `!tg continue`
15:16:27FromDiscord<dom96> !tg continue
15:16:28FromDiscord<leorize> what it meant is that no one created a portal room with that telegram yet
15:16:54FromDiscord<dom96> hmm, did that work?
15:16:58FromDiscord<Telegram Bridge> Bridging complete. Portal synchronization should begin momentarily.
15:17:02FromDiscord<davide. φ> Cool
15:17:08FromDiscord<dom96> yep, works
15:17:09FromDiscord<davide. φ> Cool, yeah
15:17:21FromDiscord<leorize> test
15:17:24FromDiscord<davide. φ> Can you see edited messages/replies?
15:17:30FromDiscord<dom96> that will be significantly more work
15:17:54FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Reply is visible on the discord side
15:17:58FromDiscord<davide. φ> Nice
15:18:11FromDiscord<Dominik Picheta (dom96)> The matrix messages could be shown in a nicer way here
15:18:18FromDiscord<Dominik Picheta (dom96)> I guess Telegram offers no API for that though
15:18:21FromDiscord<Sebastian> crazy
15:18:36FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> telegram test
15:18:37FromDiscord<haxscramper> discord test
15:18:39FromDiscord<haxscramper> matrix test
15:19:13FromDiscord<Rika> how are we supposed to identify if something comes from matrix or telegram
15:19:15FromDiscord<davide. φ> There are ways to achieve that like webpage previrw
15:19:17FromDiscord<davide. φ> There are ways to achieve that like webpage preview
15:19:26FromDiscord<davide. φ> What happens if someone sends a photo on matrix?
15:19:35FromDiscord<leorize> g4459.png https://media.discordapp.net/attachments/371759389889003532/855829172572127232/g4459.png
15:19:40FromDiscord<vindaar> image.png https://media.discordapp.net/attachments/371759389889003532/855829193187131422/image.png
15:19:40FromDiscord<davide. φ> Nice, works
15:19:48FromDiscord<dom96> In reply to @Rika "how are we supposed": yeah, that sucks a bit
15:19:51FromDiscord<haxscramper> In reply to @Rika "how are we supposed": Differentiating between matrix and telegram or just checking whether it is non-discord user?
15:20:00FromDiscord<dom96> and replies in Telegram are not synced
15:20:40FromDiscord<dom96> actually, they're not synced to Matrix either \:/
15:20:55FromDiscord<Sebastian> Yep, doesn't appear, does it?
15:20:59FromDiscord<vindaar> now it does
15:21:08FromDiscord<LucaTheHacker [Antenna 5G]> Noice
15:21:14FromDiscord<LucaTheHacker [Antenna 5G]> but if someone floods what happens?
15:21:24FromDiscord<Daniele> Hm
15:21:43FromDiscord<Rika> In reply to @haxscramper "Differentiating between matrix and": former
15:22:33FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Same as when we got IRC floods - someone on the correct bridge must be available online and ban
15:22:53FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> Same as when we got IRC floods - for example someone on the correct bridge must be available online and ban
15:23:09FromDiscord<leorize> administration is possible from both discord and tg I think
15:23:13FromDiscord<dom96> !tg help
15:23:20FromDiscord<Telegram Bridge> sent a long message, see http://ix.io/3qsj
15:23:29FromDiscord<dom96> doesn't look like you can ban via !tg
15:23:33FromDiscord<dom96> !matrix
15:23:35FromDiscord<matrix-appservice-discord-t2bot> sent a long message, see http://ix.io/3qay
15:23:39FromDiscord<dom96> via !matrix you can
15:23:49FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> !eval echo 12
15:23:51NimBot12
15:24:06FromDiscord<𝖍𝖆𝖝𝖘𝖈𝖗𝖆𝖒𝖕𝖊𝖗> god no
15:24:07FromDiscord<davide. φ> lol nice↵(<@709044657232936960_=4eim=42ot=5b=49=52=43=5d>)
15:24:11FromDiscord<Dominik Picheta (dom96)> hahaha
15:24:17FromDiscord<Daniele> What is happening
15:24:25FromDiscord<davide. φ> Which is matrix room link?
15:24:28FromDiscord<davide. φ> This chat has been bridged with the matrix one
15:24:40FromDiscord<Daniele> yes i know that but the eval bot
15:24:48FromDiscord<davide. φ> It&#x27;s the discord one
15:24:57FromDiscord<leorize> !eval echo "test"
15:24:59NimBottest
15:25:02FromDiscord<dom96> looks like it cannot handle colours?
15:25:14FromDiscord<davide. φ> Telegram doesn&#x27;t support colors in messages
15:25:15FromDiscord<Daniele> It&#x27;s from irc
15:25:40FromDiscord<Daniele> image.jpeg https://media.discordapp.net/attachments/371759389889003532/855830701769359360/image.jpeg
15:25:42FromDiscord<dom96> yes I know, not sure how else it arrived at such a weird name
15:26:09FromDiscord<leorize> @dom96\: if you want to ban/kick from either discord or telegram, make the bots moderators
15:26:12FromDiscord<haxscramper> IRC is directly bridged to discord, correct?
15:26:13FromDiscord<dom96> but colours don't make it through to Discord actually
15:26:20FromDiscord<dom96> so that can't be it
15:26:29FromDiscord<haxscramper> So nim bot has to go through two bridgest to get to telegram
15:26:33FromDiscord<haxscramper> Actually three
15:26:40FromDiscord<dom96> @leorize I don't see banning as a command in `!tg`
15:27:08FromDiscord<leorize> I meant from tg/discord
15:27:33FromDiscord<leorize> for kicking from matrix side you just... kick people and they're off the bridge
15:27:45FromDiscord<leorize> not sure how that would be synchronized to telegram though
15:27:49FromDiscord<dom96> In Gitter: https://media.discordapp.net/attachments/371759389889003532/855831240825372672/unknown.png
15:28:10FromDiscord<dom96> leorize: not sure what you mean
15:28:16FromDiscord<whatamidoing> What a mess ahah↵(@dom96)
15:28:30FromDiscord<dom96> For `!matrix help` I see a ban command listed, for `!tg help` I don't
15:28:38FromDiscord<dom96> !tg help
15:28:40FromDiscord<Telegram Bridge> sent a long message, see http://ix.io/3qsj
15:28:40FromDiscord<leorize> apparently it couldn't decode NimBot name \:P
15:28:59FromDiscord<leorize> apparently the ban function is discord -\@dom96)
15:29:10FromDiscord<leorize> https://github.com/tulir/mautrix-telegram/issues/357
15:29:51dom96test
15:30:10FromDiscord<davide. φ> What about stickers?
15:30:14FromDiscord<davide. φ> https://media.discordapp.net/attachments/371759389889003532/855831849799778304/pile_of_poo.png
15:30:21FromDiscord<davide. φ> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/855831833773342730): What about stickers? test
15:30:21dom96so why is my nick fine?
15:30:30*dom96 is now known as test_test_unique
15:30:31test_test_uniquetest
15:30:33*test_test_unique is now known as dom96
15:31:51FromDiscord<leorize> not sure, try renaming nimbot?
15:32:39*NimBot_ joined #nim
15:32:41NimBot_test
15:33:01*NimBot_ is now known as FooBot
15:33:02FooBottest
15:33:26*FooBot is now known as AnyBot
15:33:27AnyBottest
15:33:34FromDiscord<Rika> BotBot
15:33:36FromDiscord<leorize> weird, maybe [Yardanico 👑](https://matrix.to/#/@telegram_993214420:t2bot.io) or someone that is familiar with discord webhooks can help
15:33:47FromDiscord<davide. φ> Not sure whether bridging this chat was a good idea, it became spammy
15:34:01*AnyBot is now known as AnyAny
15:34:02AnyAnytest
15:34:28FromDiscord<dom96> so anything that has `Bot` in the name breaks it? lol
15:34:57FromDiscord<leorize> lol
15:35:27FromDiscord<leorize> try renaming your discord nick to something with Bot and see if that's the case
15:35:59FromDiscord<dom96Bot> test
15:36:15FromDiscord<dankey> yikes
15:36:33FromDiscord<leorize> now I have no idea who come from where
15:36:34FromDiscord<dom96> well...
15:36:34FromDiscord<dom96> I'm still dom96 lol
15:36:43FromDiscord<dom96> don't think you can easily change nicks on discord
15:36:46FromDiscord<leorize> great bridges \:P
15:37:46FromDiscord<dom96> does t2bot.io have an issue tracker?
15:38:24FromDiscord<davide. φ> https://github.com/t2bot/mautrix-telegram↵(@dom96Bot)
15:38:53FromDiscord<davide. φ> https://github.com/t2bot/mautrix-telegram.↵https://github.com/tulir/mautrix-telegram↵maybe
15:38:58FromDiscord<davide. φ> https://github.com/t2bot/mautrix-telegram↵https://github.com/tulir/mautrix-telegram↵maybe
15:40:29FromDiscord<leorize> https://t2bot.io/ \<- they linked several support rooms here
15:42:36FromDiscord<dom96> well, I'll leave this to you guys 🙂
15:47:37FromDiscord<dom96> another thing is why are embeds shown in Discord for this bot
15:49:08FromDiscord<dom96> https://t2bot.io/ test
15:49:12FromDiscord<dom96> ughhh
15:51:39FromDiscord<dom96> https://t2bot.io/ test
15:51:58FromDiscord<dom96> well I'm out of ideas, I got rid of the Embed Links permission from the role that the bot has
15:54:45FromDiscord<dom96> https://t2bot.io/ hopefully last test
15:55:12FromDiscord<dom96> :'/
15:59:23FromDiscord<Rika> they probably dont apply to webhooks?
16:00:15*mikess quit (Ping timeout: 268 seconds)
16:01:01FromDiscord<dom96> https://support.discord.com/hc/en-us/community/posts/360057841792-Disabling-auto-embed-links-in-Webhooks
16:01:05FromDiscord<dom96> judging by this we're screwed
16:02:22dom96does FromIRC also have this problem? https://t2bot.io/
16:02:27FromDiscord<dom96> yep
16:04:58FromDiscord<dom96> honestly tempting to write a bot that removes all embeds in a channel on each message
16:07:13FromDiscord<davide. φ> Time to make a nim discord bots library ^\_^↵(@dom96Bot)
16:07:38FromDiscord<haxscramper> https://github.com/krisppurg/dimscord
16:08:39FromDiscord<haxscramper> In reply to @davide. φ "Time to make a": IIRC some bots here are written using this library
16:08:49FromDiscord<dom96> Yeah, the Discord-IRC bridge uses it
16:08:52FromDiscord<davide. φ> Nice↵(@haxscramper)
16:09:04FromDiscord<dom96> also would be tempted to fix the way replies show up from matrix lol
16:09:10FromDiscord<dom96> just a bot that fixes Discord
16:33:08FromDiscord<Juan_Carlos.nim> https://media.discordapp.net/attachments/371759389889003532/855847684422238218/cat_face_with_wry_smile.png
16:35:38FromDiscord<Dominik Picheta (dom96)> now that this is bridged to our main channel, please don&#x27;t post any memes in here \:)
16:39:24*SebastianM joined #nim
16:41:29*mikess joined #nim
16:43:09FromDiscord<jorjun_gitlab (jorjun)> @telegram\_155106411\:t2bot.io forum account confirm handle\: jorjun\_arch
16:44:07FromDiscord<dom96> confirmed
16:45:04FromDiscord<jorjun_gitlab (jorjun)> tvm cheers
16:58:19FromDiscord<j.dupaon> Hello World
16:59:52FromDiscord<dom96> hello
17:00:09FromDiscord<j.dupaon> New 2 Nim. Where could I find interesting snippets.
17:00:17FromDiscord<j.dupaon> Thanks.
17:00:33FromDiscord<haxscramper> https://nim-by-example.github.io/
17:01:13FromDiscord<haxscramper> Rosetta code has lots of nim implementations, and there is also https://github.com/sergiotapia/nimlings
17:01:46FromDiscord<j.dupaon> thanks a lot.
17:01:52FromDiscord<davide. φ> http://rosettacode.org/wiki/Category:Nim↵(@haxscramper)
17:02:15FromDiscord<j.dupaon> +1 davide
17:46:24*SebastianM quit (Quit: Bye)
18:26:05*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
18:37:15*SaemasIeverwas[m is now known as saem[m]
18:47:37*SebastianM joined #nim
18:50:01*Gustavo6046 joined #nim
18:51:29FromDiscord<Bung> how can i get module full path through the module name symbol
18:52:54*SebastianM quit (Quit: Bye)
18:58:22FromDiscord<haxscramper> `hnimast/compiler_aux/getFilePath(ModuleGraph, PSym)
18:58:24FromDiscord<haxscramper> (edit) "PSym)" => "PSym)`"
18:59:00FromDiscord<haxscramper> `PSym` has `.info` field that contains index of the file that you need to look up in graph config file infos
19:01:01FromDiscord<gavr> sent a code paste, see https://play.nim-lang.org/#ix=3qtC
19:01:25FromDiscord<Bung> the problem is where is module graph comming from ?
19:02:40FromDiscord<gavr> instead of nil there may be callback when its done, same for copy and move, but its callbacks get 2 params, bytes done and bytes remained, so its easy to create loading bar
19:03:21FromDiscord<haxscramper> @Bung if you are working with file module symbols you need to have module graph
19:03:46FromDiscord<haxscramper> So you create module graph, register custom pass and then `compileProject`
19:03:49FromDiscord<Bung> I want parse a module while I get module name
19:04:14FromDiscord<haxscramper> Then keep track of paths yourself
19:04:27FromDiscord<haxscramper> parser does not have enough information to resolve module from name alone
19:05:21FromDiscord<haxscramper> In reply to @Bung "how can i get": Are you talking `PSym` for module name or just string identifier like `"os"`
19:05:30FromDiscord<haxscramper> Those are two completely different thigns
19:05:33FromDiscord<haxscramper> (edit) "thigns" => "things"
19:05:49FromDiscord<haxscramper> Well, not entirely different but you need to know which is which
19:05:55FromDiscord<Bung> I'd like to do import moduleA ; dosth(moduleA)
19:06:50FromDiscord<haxscramper> You want to do it where/how? Last time you were trying to get all exported procs for a module
19:07:04FromDiscord<Bung> dont know how to get module graph when I just get moduleA, the graph need module path right ?
19:07:24FromDiscord<Bung> conf.projectFull = file↵ var graph = newModuleGraph(cache, conf)
19:08:29FromDiscord<Bung> If I need track path then that need parse the current nim file imports
19:09:36FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtF
19:10:36FromDiscord<idf> i think you can group matrix rooms in like communities. So Nim and Nim science would be in the same community
19:10:44FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtG
19:11:00FromDiscord<haxscramper> Isn't it done already?
19:11:07FromDiscord<dom96> yep, it is
19:11:13FromDiscord<haxscramper> There is a nim room/space
19:11:13FromDiscord<dom96> https://matrix.to/#/#nim:envs.net
19:12:23FromDiscord<Bung> well, I dont like manual get the module path
19:13:09FromDiscord<Bung> I attempt to provide api to end user , let user do import moduleA; dosth(moduleA); that's all
19:13:52FromDiscord<haxscramper> And? like I don't quite understand where do you plan to write this code to begin with This is some custom DSL or a configuration file
19:13:55FromDiscord<haxscramper> Or what
19:15:22FromDiscord<Bung> it's like var router = new Router();router.mount(theModule);newWebApp(router);
19:15:41FromDiscord<haxscramper> You would have to write a custom compiled frontend for this
19:15:47FromDiscord<haxscramper> compiler
19:15:59FromDiscord<haxscramper> And make users compile your code with this compiler
19:16:46FromDiscord<haxscramper> Otherwise it could be done via https://github.com/nim-lang/Nim/pull/9560
19:19:13FromDiscord<haxscramper> But Idk if it would be merged at some point or not
19:21:16FromDiscord<Bung> that's sad
19:22:28FromDiscord<leorize> you can build a macro to create a map for you
19:22:57FromDiscord<haxscramper> yeah, common approach is to build a custom pragma
19:23:21FromDiscord<haxscramper> And then ask user to `{.push.` it (I think you can push custom pragmas, but I'm not sure)
19:24:00FromDiscord<leorize> or you can just put the module body under the macro
19:24:09FromDiscord<leorize> lol you're typing on both matrix and discord?
19:24:21FromDiscord<haxscramper> In reply to @gavr "If anybody need this\:": btw telegram -> discord messages are related with `<br>` lines, but discord -> telegram is working fine
19:24:32FromDiscord<haxscramper> multiline code pastes
19:24:40FromDiscord<leorize> weird
19:24:54FromDiscord<Bung> hmm , push pop seems friendly
19:26:16FromDiscord<Bung> but in that case , it does not have router information
19:27:05FromDiscord<@bracketmaster-5a708063d73408ce4> Like I mentioned before, I'm writing a POWERPC emulator in Nim. My emulator can load multiple binaries, and to stop the emulator, sometimes you have to press ctrl-c if for whatever reason, the emulated CPU becomes unresponsive. I need to make sure that any opened files are correctly closed. I can put try/except around main, but then I have to also put f.close in the except block which means I have to keep track of
19:27:11FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtK
19:27:34FromDiscord<@bracketmaster-5a708063d73408ce4> Is there a better solution than this? For example, python has a destructor that always gets called even during exceptions
19:28:13FromDiscord<leorize> [BracketMaster (Yehowshua Immanuel)](https://matrix.to/#/@bracketmaster-5a708063d73408ce4f8ad7ee:gitter.im)\: try-finally
19:28:22FromDiscord<leorize> or `defer`
19:28:30FromDiscord<haxscramper> Does it handle ctrl-C though?
19:30:11FromDiscord<leorize> alternatively you use a type with `=destroy` defined to store your files (`nim-sys` has one, but it doesn't have filesystem api yet)
19:30:22FromDiscord<@bracketmaster-5a708063d73408ce4> actually - it appears nim has destroy which may work for my purposes
19:30:45FromDiscord<haxscramper> Doesn't seem like that. But you can raise in https://nim-lang.org/docs/system.html#setControlCHook%2Cproc%29
19:30:59FromDiscord<Bung> maybe create global router when call custom pragma then merge that module's router to current router
19:31:00FromDiscord<haxscramper> sent a code paste, see https://paste.rs/ImO
19:35:28*nerthus left #nim (Leaving)
19:36:10FromDiscord<haxscramper> I personally would opt for a more explicit API where user annotates things that participate in routing using either `{.push` or manual pragma
19:36:38FromDiscord<haxscramper> And it would make the job of collecting routed procs easier
19:37:39FromDiscord<Bung> I have custom pragma but it only for one proc
19:37:57FromDiscord<Bung> it used like `r.addRoute(handler)`
19:40:01FromDiscord<Bung> like you suggested, I'd implement a macro `routes`: let user put all procs inside it, and create a global router or map, then merge current app router with that global exported variable.
19:40:56FromDiscord<Bung> think unless tim's pr get merged , no perfect solution.
19:49:42FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtQ
19:50:11FromDiscord<haxscramper> Seems like you can't `push` custom pragma after all, or at least no in this confguration
19:50:46FromDiscord<haxscramper> But it creates a local compiletime list of routed procs, allows the user to register it, and then provides a way to finalize implementation.
19:51:52FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtR
19:52:00*SebastianM joined #nim
19:52:28FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3qtS
19:52:42FromDiscord<haxscramper> Module only exposes `initForModule` proc that fills in available routing procs
19:54:12FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qtT
19:54:31FromDiscord<mlokis> yes but i em generating code with macro
19:54:57FromDiscord<mlokis> i ll show output code
19:56:04FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3qtV
19:56:06FromDiscord<mlokis> and the exted mentod:
19:56:38FromDiscord<mlokis> sent a code paste, see https://play.nim-lang.org/#ix=3qtY
19:57:15FromDiscord<mlokis> i have to try this outside of macro
19:57:22FromDiscord<Bung> @haxscramper oh, yes, no need extro block.
19:58:05FromDiscord<haxscramper> sent a code paste, see https://play.nim-lang.org/#ix=3qu2
19:58:09FromDiscord<mlokis> yes
19:58:14FromDiscord<mlokis> wait
19:58:16FromDiscord<mlokis> no
19:58:19FromDiscord<mlokis> thenx
19:58:35FromDiscord<mlokis> i though i don need ref if Content is ref
19:59:25FromDiscord<haxscramper> I don't remember how it works, but parent being `ref object of` does not automatically make all derived objects ref as well
19:59:28FromDiscord<mlokis> it worked
19:59:56FromDiscord<mlokis> i assumed as always and got fucked again
20:00:04FromDiscord<mlokis> ty
20:03:17FromDiscord<dom96> There we go: https://nim-lang.org/blog/2021/06/19/new-community-home.html
20:03:19*SebastianM quit (Quit: Bye)
20:03:27FromDiscord<Zachary Carter> Oh, I forgot about this forum post I made, but - https://forum.nim-lang.org/t/7921#51451
20:04:48FromDiscord<Zachary Carter> Would be really nice to have some kind of calendar where nim related events could be posted
20:05:07federico3+1 !
20:05:12FromDiscord<Zachary Carter> Since it now seems that meetups and conferences will at least be an annual thing
20:05:43FromDiscord<dom96> agree, should be doable with a public G calendar maybe?
20:05:47FromDiscord<dom96> Wanna create one? 😄
20:06:08federico3or just put an ical file on the website
20:06:18FromDiscord<Zachary Carter> yeah that might be the best option
20:08:20*Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in)
20:13:42*Gustavo6046 joined #nim
20:14:51FromDiscord<Elegant Beef> Is there a matrix community setup yet?
20:15:15FromDiscord<dom96> yep
20:15:21FromDiscord<dom96> read my post above lol
20:15:42FromDiscord<Elegant Beef> It doesnt mention the community
20:16:43FromDiscord<Elegant Beef> At least on element communities are groupings of channels
20:17:05FromDiscord<Elegant Beef> I figure it's apart of the protocol though 😛
20:20:11FromDiscord<Casey.McMahon> sent a code paste, see https://play.nim-lang.org/#ix=3qu6
20:21:31FromDiscord<planetis> no word about the talks yet?
20:21:57FromDiscord<dom96> In reply to @Elegant Beef "It doesnt mention the": There is a link to matrix in there
20:32:37*max22- joined #nim
20:35:27FromDiscord<Elegant Beef> Ah so i was on an old version of element which didnt support spaces \:D
20:36:06FromDiscord<lyiriyah> Yes, Spaces are nightly only I think
20:41:11FromDiscord<planetis> That link at the end was a good read
20:42:53FromDiscord<planetis> you need to opt in to spaces beta
20:43:09FromDiscord<Elegant Beef> Yea i've got it
20:43:28FromDiscord<Elegant Beef> Old version of element due to updating my distro, caused vast confusion
20:47:56FromDiscord<dom96> In reply to @planetis "That link at the": Yay. Glad you enjoyed it. It is quite inspirational
20:58:03FromDiscord<lyiriyah> About the calendar, maybe something like AgenDAV would work
20:58:29FromDiscord<lyiriyah> https://github.com/agendav/agendav
20:59:08*neceve quit (Ping timeout: 252 seconds)
21:03:28FromDiscord<Varriount> @dom96Bot Is it known that Nimble won't work when the Nim compiler is in a path that contains spaces?
21:06:19FromDiscord<Varriount> Also, why does Nimble check whether a binary is in the path before executing it? Why not just attempt to execute it?
21:07:45FromDiscord<Casey.McMahon> sent a code paste, see https://play.nim-lang.org/#ix=3quk
21:10:57FromDiscord<Bung> sent a code paste, see https://play.nim-lang.org/#ix=3qul
21:11:19FromDiscord<Bung> when i attach this pragma multiple times `Error: ambiguous call;`
21:11:58FromDiscord<Bung> if I don't comment when not declared(`mount`), then Error: internal error: expr: var not init
21:13:26FromDiscord<Bung> router is var `router` {.compileTime.}: seq[NimNode]
21:15:42FromDiscord<dom96> In reply to @Varriount "<@!132595483838251008> Is it known": I recall seeing similar issues. But this would be a bug in Nim’s stdlib I think
21:16:34FromDiscord<Kermithos> hi, I tried todo a post request via the httpclient but the response looks like it didnt got decoded or something, in python it works just fine. Any idea how I can fix that? https://media.discordapp.net/attachments/371759389889003532/855919004334161991/unknown.png
21:18:34FromDiscord<Elegant Beef> What are you trying to post?
21:19:01FromDiscord<Kermithos> multipart
21:19:32FromDiscord<Kermithos> sent a code paste, see https://play.nim-lang.org/#ix=
21:19:47FromDiscord<Bung> do u use gzip ?
21:19:56FromDiscord<Kermithos> no
21:21:19FromDiscord<Bung> maybe the server side reponse gzip that you dont aware
21:21:44FromDiscord<Kermithos> hm, but why does python encode it properly
21:22:19FromDiscord<Kermithos> 'Content-Encoding': 'gzip'}
21:22:22FromDiscord<Bung> python lib can handle gzip and respect content encoding
21:22:23FromDiscord<Kermithos> looks like you are right
21:22:33FromDiscord<Kermithos> is there a way todo this in nim?
21:22:33FromDiscord<Bung> well , httpclient dont
21:23:45FromDiscord<Bung> you can get raw body , use zippy lib decode yourself
21:24:06FromDiscord<Kermithos> aight, will try that. thanks
21:24:23FromDiscord<Elegant Beef> You also can use puppy https://github.com/treeform/puppy
21:24:32FromDiscord<Elegant Beef> It supports gzip directly out of the http request
21:30:32*Gustavo6046_ joined #nim
21:31:09*Gustavo6046 quit (Ping timeout: 265 seconds)
21:32:50*Gustavo6046_ is now known as Gustavo6046
21:37:51FromDiscord<Bung> https://github.com/bung87/scorper/blob/mount/src/scorper/http/routermacros.nim
21:38:01FromDiscord<Bung> please help me with this
21:45:10*max22- quit (Quit: Leaving)
21:47:15FromDiscord<dom96> In reply to @Kermithos "hm, but why does": Have you tried using the Accept-Encoding header?
21:48:48FromDiscord<dom96> If it works we should make httpclient send it
21:59:35*Torr joined #nim
22:00:25*Torr left #nim (#nim)
22:10:14FromDiscord<Varriount> In reply to @dom96 "I recall seeing similar": Nope: https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/tools.nim#L9↵If the path where Nim is located contains a space, then that procedure will cut it off. Quotes can't be used in this case, because the path is normally derived from the PATH environment variable, where quotes are treated as part of the actual path components.
22:11:19FromDiscord<Varriount> In this case, rather than using single strings to represent the commands to be run, Nimble should really be using string sequences.
22:16:27FromDiscord<Varriount> Anyone know what happens if an exception is thrown in a `defer` block? Do the other `defer`s run?
22:30:06FromDiscord<Elegant Beef> Hmm no way to get all types that inherit from a given type is there?
22:32:45FromDiscord<Bung> only one level inherit right?
22:33:46FromDiscord<Bung> oh multi level.
22:34:02FromDiscord<Avahe> Hmm irc bridge not working, again
22:35:24FromDiscord<dom96> In reply to @Avahe "Hmm irc bridge not": How so?
22:36:32FromDiscord<Avahe> I don't see any messages in irc since this morning
22:37:13FromDiscord<dom96> Oh. You’re in freenode?
22:37:26FromDiscord<dom96> In reply to @dom96 "There we go: https://nim-lang.org/blog/2021/06/19/n": See this
22:39:32FromDiscord<Avahe> Yeah I'm on freenode. We not bridging there anymore?
22:42:34FromDiscord<dom96> In reply to @Avahe "Yeah I'm on freenode.": https://nim-lang.org/blog/2021/06/19/new-community-home.html
22:43:30FromDiscord<Avahe> Saw that, still wondering if we're stopping the bridge to freenode
22:43:45FromDiscord<Avahe> Or if it's just down again
22:43:53FromDiscord<dom96> We are.
22:44:09FromDiscord<dom96> I moved it to Liberia
22:44:14FromDiscord<dom96> (edit) "Liberia" => "Libera"
22:44:35FromDiscord<Avahe> Any objection to me making a bridge between the two irc channels?
22:45:47FromDiscord<dom96> I don’t see why we should bother tbh
22:46:30FromDiscord<Avahe> I'm going to be on freenode, along with some other folks. And I really dislike using discord
22:46:42FromDiscord<dom96> Why not move to libera?
22:47:26FromDiscord<Avahe> Many reasons, but I don't think that matters here. Just trying to maintain communication with to community
22:47:36FromDiscord<Avahe> (edit) "to" => "the"
22:50:10FromDiscord<dom96> Well I’d like to know since we’ve moved to Libera. Is there something about Freenode I missed?
22:51:20FromDiscord<Avahe> People (like myself) will be on freenode and not on Libera. Will you ban a relay bot if I set it up between the two networks?
22:53:53FromDiscord<dom96> I just don't understand why you're so intent on sticking to Freenode
22:54:03FromDiscord<Zachary Carter> There are two sides to every story
22:54:17FromDiscord<Zachary Carter> and maybe some of the communities they are a part of decided to stay put
22:54:35FromDiscord<dom96> I would be really interested to hear the other side of the story
22:54:46FromDiscord<Zachary Carter> It's there on the internet
22:54:46FromDiscord<dom96> We spent a long time waiting to see this develop before taking a decision
22:55:22FromDiscord<dom96> And have actually moved comparatively late to other communities
22:55:48FromDiscord<Avahe> My reason for staying on freenode is going to change your answer about a relay bot?
22:56:35FromDiscord<dom96> No, feel free to set one up
22:56:40FromDiscord<Avahe> Thanks
22:56:46FromDiscord<dom96> I still want to know though
22:57:04FromDiscord<dom96> Again, the reason is because I want to make sure we didn't make a mistake moving to Libera
22:57:18FromDiscord<dom96> I want to know what I missed
22:58:03FromDiscord<Zachary Carter> I don't know Avahe's reason, I just have read both sides of the story from both sets of parties involved. If their reasoning has anything to do with it 🙂
22:58:08FromDiscord<Avahe> I read both sides and don't agree with the decision to create a new network, it just split the freenode community. I didn't see a real reason that warranted the decision
22:58:10FromDiscord<Zachary Carter> by it I mean the dispute
22:58:40FromDiscord<davide. φ> https://linux.chat/linux-on-freenode/
22:59:28FromDiscord<Avahe> Headline is sensationalized, people haven't been reading or paying attention
22:59:46FromDiscord<dom96> Starting fresh on Freenode's part already was far worse than splitting into a separate network.
23:00:01FromDiscord<Avahe> I disagree completely
23:00:05FromDiscord<dom96> And I know it happened afterwards
23:00:13FromDiscord<dom96> but that is what forced me to take action
23:00:33FromDiscord<Zachary Carter> My problem with all of this is the lack of logs / screenshots of verifiable interactions
23:00:33FromDiscord<dom96> since they literally kicked NimBot off
23:00:57FromDiscord<dom96> @Zachary Carter honestly, all you need to do is read some of the comment exchanges that are public on HN or otherwise
23:01:03FromDiscord<Zachary Carter> I've read through all of that
23:01:09FromDiscord<Zachary Carter> there's too much heresay
23:01:21FromDiscord<Avahe> ^
23:02:16FromDiscord<Zachary Carter> there's this actor, this chick that sold freenode and supposedly freenode wasn't able to be sold for whatever reason, but because she needed money she did it without telling anyone
23:02:35FromDiscord<Zachary Carter> then there's the dude that bought it, andrew or whatever, who decided that the thing he paid money for should be run differently
23:02:50FromDiscord<dom96> Forget all the hearsay, there are two verifiable actions: taking over accounts, starting fresh
23:03:05FromDiscord<Zachary Carter> I mean, the guy legitimately owns the thing
23:03:09FromDiscord<Zachary Carter> they can do whatever they want with it
23:03:31FromDiscord<zidsal> Ofc they can, but it doesn't mean we are obliged to stick around
23:03:38FromDiscord<Zachary Carter> it seemed most people, instead of trying to figure out what was going on and work with this owner, decided instead to get majorly butt hurt and instantaneously react
23:03:50FromDiscord<Zachary Carter> I'm not saying andrew acted properly or responsibly either
23:04:17FromDiscord<Zachary Carter> but generally cooler heads prevail, and no one was cool in this situation and splitting freenode in two wasn't the answer IMO
23:04:39FromDiscord<tandy> people should just use matrix instead of irc \:-)
23:05:03FromDiscord<Zachary Carter> without knowing exactly who said and did what, it's pretty difficult to get an accurate account of events
23:05:24FromDiscord<Zachary Carter> and that accurate, verified, account should have been established before anyone did anything
23:05:41FromDiscord<Zachary Carter> instead we have a bunch of screenshots of scattered chat logs and staff writing exit letters that could, as far as we know, be entirely full of bullshit
23:05:43FromDiscord<dom96> Yeah, I don't particularly care what the original drama is about tbh
23:05:46FromDiscord<Zachary Carter> so could andrew's blog post
23:05:46FromDiscord<Zachary Carter> who knows
23:06:09FromDiscord<dom96> What I care is about material things that happened to me and other users
23:06:12FromDiscord<Zachary Carter> I don't care about the original drama either, but knowing about it helps contextualize what played out
23:06:34FromDiscord<dom96> And from that perspective I cannot understand how you can give the new Freenode owner the benefit of the doubt
23:06:43FromDiscord<Zachary Carter> I don't give him the benefit of the doubt
23:06:49FromDiscord<Zachary Carter> but I don't judge them and their actions based on heresay either
23:06:56FromDiscord<Zachary Carter> or the ex-staff
23:07:02FromDiscord<Zachary Carter> I'm impartial
23:07:06FromDiscord<dom96> I'm not specifically talking about you
23:07:07FromDiscord<Zachary Carter> I know the answer wasn't libera
23:07:10FromDiscord<Zachary Carter> sure
23:07:16FromDiscord<dom96> Staying on Freenode to me is giving the benefit of the doubt
23:08:11FromDiscord<Zachary Carter> I can see that
23:08:38FromDiscord<Zachary Carter> again as long as the decision was based on what went down, and not just because all your frenz are still there:)
23:08:39FromDiscord<Zachary Carter> (edit) "there:)" => "there 🙂"
23:09:24FromDiscord<dom96> I barely use IRC nowadays so no friend-influence was had
23:09:53FromDiscord<dom96> Although I did notice a few folks asking for the migration
23:09:57FromDiscord<Zachary Carter> I'd like to use it more, but discord is much more convenient on mobile
23:10:18FromDiscord<dom96> But really, I would have kept it as-is for longer if it wasn't for Freenode literally killing NimBot
23:10:45FromDiscord<Zachary Carter> yeah I don't understand the decision making process with all of that
23:11:56FromDiscord<Zachary Carter> lolol
23:12:00FromDiscord<Zachary Carter> I was just looking at freenode's homepage
23:12:13FromDiscord<Zachary Carter> andrew announced the creation of some jobs page
23:12:15FromDiscord<Zachary Carter> https://jobs.freenode.net/hire.html
23:12:19FromDiscord<Zachary Carter> the first job sounds really fun
23:12:50FromDiscord<Zachary Carter> one of the other three jobs is from andrew and the third one seems to be a test posting
23:13:00FromDiscord<dom96> lol what
23:14:01FromDiscord<Zachary Carter> this paragraph is also included
23:14:06FromDiscord<dom96> @Avahe so do you have any explanation for the takeover of channels and starting the network fresh? Why are you giving them the benefit of the doubt?
23:14:12FromDiscord<Zachary Carter> sent a code paste, see https://play.nim-lang.org/#ix=3quL
23:14:16*mrgaturus joined #nim
23:14:40FromDiscord<Zachary Carter> so freenode is becoming the parler of the FOSS world?
23:14:45FromDiscord<dom96> sent a code paste, see https://play.nim-lang.org/#ix=3quM
23:14:46FromDiscord<Zachary Carter> on freenode's homepage
23:15:04*mrgaturus quit (Client Quit)
23:15:44FromDiscord<dom96> yeah, that tells me all I need to know
23:16:27FromDiscord<dom96> Also, interesting: https://github.com/realrasengan/anonbot. idlework is one of the contributors, I recall them being active in Nim community a while back
23:16:36FromDiscord<Avahe> In reply to @dom96 "<@!778498877464117248> so do you": Channels that were moving to libera were given a time period for the move, then freenode staff would take the channels. It was announced a few weeks in advance
23:16:52*jkl joined #nim
23:17:16FromDiscord<Zachary Carter> idlework is still active I think. I saw them chatting the other day
23:17:29FromDiscord<Avahe> Yeah he is
23:17:38FromDiscord<dom96> actually ldlework, the `i` is an `l`
23:17:46FromDiscord<Zachary Carter> oh heh
23:18:31FromDiscord<dom96> yep: https://irclogs.nim-lang.org/14-06-2021.html#04:08:47
23:18:36FromDiscord<Varriount> Your totally free to express your views. Just as other people are free to disagree with you, and judge you based on those views.
23:19:08FromDiscord<dom96> and now ldlework is a Freenode staffer
23:19:19FromDiscord<Varriount> (edit) "Your" => "You're"
23:19:21FromDiscord<Zachary Carter> the plot thickens
23:19:34FromDiscord<Zachary Carter> https://tenor.com/view/thriller-michael-jackson-eating-popcorn-watching-gif-5577709
23:19:39FromDiscord<Zachary Carter> oh wtf
23:19:46FromDiscord<Zachary Carter> 🍿
23:20:24FromDiscord<Zachary Carter> I think Nim is already one of the edgier communities tbh
23:20:48FromDiscord<Zachary Carter> a lot of shit has flown here that wouldn't in a lot of communities, and we don't even have a CoC
23:21:10FromDiscord<Varriount> > Now you can share thoughts and views without fear of being canceled.↵I would love a definition of what "cancelled" means in this context.
23:21:13FromDiscord<dom96> oh yeah? You think so? Do you have some examples?
23:22:45FromDiscord<Zachary Carter> In reply to @dom96 "oh yeah? You think": I'm not going to spend time digging through logs for them, but I know that there have been instances of people saying some less than desirable things about cultures / ethnic groups and also some comments about transgender acceptance
23:23:14FromDiscord<Zachary Carter> In reply to @Varriount "> Now you can": Probably means you can be a racist, misogynistic, homophobic, transphobic asshole
23:23:28FromDiscord<Zachary Carter> (edit) removed ""
23:24:07FromDiscord<Zachary Carter> and I guess cancelled would mean being banned from a community or sever for that type of behavior
23:24:12FromDiscord<Zachary Carter> or doxxed
23:24:55FromDiscord<Zachary Carter> hell I got doxxed for assuming someone's gender on here, without any ill intent on my part, but I think this person was really just looking for some attention / trying to stir things up
23:25:18FromDiscord<dom96> In reply to @Zachary Carter "I'm not going to": If you do ever see this again or find past instances do let me know. That is definitely not okay in this community.
23:26:03FromDiscord<Zachary Carter> I'm a mod so I've taken corrective action when I've seen it. I haven't banned anyone for it but stern warnings have been issued, and I know who the offender(s) are 🙂
23:26:22FromDiscord<Zachary Carter> If you want to talk about it more in mod chan we can or in PMs
23:27:44FromDiscord<dom96> In reply to @Zachary Carter "hell I got doxxed": yeah, that was a really horrible situation :/
23:29:02FromDiscord<@bracketmaster-5a708063d73408ce4> `=destroy` and `try/finally` don't really seem to catch ctrl-c
23:31:49FromDiscord<Elegant Beef> Well that's probably cause it kills the process instantly, override the chook and kill the program gracefully
23:32:08FromDiscord<@bracketmaster-5a708063d73408ce4> how can you kill gracefully?
23:32:31FromDiscord<@bracketmaster-5a708063d73408ce4> quit(0) for example isn't graceful
23:32:42FromDiscord<Elegant Beef> Set a bool that causes the program to exit the flow it's stuck in
23:33:18FromDiscord<@bracketmaster-5a708063d73408ce4> what I'm trying to do is get the files that are open properly closed
23:33:30FromDiscord<@bracketmaster-5a708063d73408ce4> what does nim call right before a program ends?
23:33:36FromDiscord<@bracketmaster-5a708063d73408ce4> Can I call that?
23:36:34FromDiscord<leorize> note that you don't have to close them if you're just exiting
23:36:49FromDiscord<leorize> the C library will usually do the runtime cleanup for files
23:37:00FromDiscord<leorize> and the os will collect any open resources
23:37:47FromDiscord<Varriount> Hrm. Nim should really better in this respect. As far as I can tell, `setControlCHook` just sets the SIGINT signal handler. I feel that a better approach would be what Python does - raise an exception.
23:38:10FromDiscord<Varriount> (edit) "Hrm. Nim should really ... better" added "do"
23:38:30FromDiscord<Elegant Beef> Otherwise you probably want to do something like https://play.nim-lang.org/#ix=3quO
23:38:31FromDiscord<leorize> a random exception in the middle of the body is not the best idea, optimization wise
23:38:32FromDiscord<Varriount> Or, at the very least, allow registering multiple signal handlers.
23:38:56FromDiscord<Elegant Beef> enter `exitprocs`!
23:39:16FromDiscord<Varriount> In reply to @leorize "a random exception in": Hm, fair point. How do other languages (aside from C and C++) go about this?
23:39:26FromDiscord<dom96> execCmd("yourProc"); #perform cleanup 😉
23:40:32FromDiscord<leorize> set an exit thingy for global state cleanup (ie. state stored outside of the program)↵(@Varriount)
23:42:52FromDiscord<leorize> the best practice for cleaning those kinds of state (ie. lock files) up is to not have to
23:44:27FromDiscord<Zachary Carter> just don't use exceptions 🙂
23:44:41FromDiscord<leorize> eh, exceptions are cool
23:44:58FromDiscord<Zachary Carter> I haven't found much of a need for them in my work
23:45:03FromDiscord<Zachary Carter> work work yes
23:45:05FromDiscord<Zachary Carter> game dev no
23:46:01FromDiscord<leorize> it really depends on your domain
23:46:31FromDiscord<Zachary Carter> true
23:47:53FromDiscord<Zachary Carter> couldn't you just use destructors and then not worry about any of this?
23:47:59FromDiscord<Zachary Carter> @bracketmaster
23:48:28FromDiscord<leorize> btw you wanna join the cps club? \:) we haven't seen you for awhile
23:49:56FromDiscord<Varriount> In reply to @Zachary Carter "couldn't you just use": Destructors don't run on program exit.
23:50:34FromDiscord<Zachary Carter> In reply to @leorize "btw you wanna join": me? oh boy um probably will bow out of that one. life is super busy right now and the only spare time I really have I'm dedicating to working on my game project
23:50:35FromDiscord<Varriount> In reply to @leorize "btw you wanna join": How is CPS going so far? I know mratsim mentioned working on it, but that's all I've heard.
23:50:48FromDiscord<Zachary Carter> but I'm excited to see how it turns out and understand more how to use it
23:51:03FromDiscord<Varriount> I'm currently working on an actually usable subprocess library for Nim.
23:51:06FromDiscord<Zachary Carter> In reply to @Varriount "Destructors don't run on": oh this is an exceptional exit, I see
23:51:14FromDiscord<leorize> it's near the finish line, features wise
23:51:17FromDiscord<leorize> https://github.com/disruptek/cps
23:51:49FromDiscord<Varriount> How about performance wise? How does it compare?
23:52:16FromDiscord<leorize> there's some advert for that in that readme \:p
23:53:06FromDiscord<leorize> nice, have you seen the api i planned for nim-sys?↵(@Varriount)
23:53:11FromDiscord<Varriount> My bet was (and still is) that an actually complete, finished implementation will be slower than an equivalent async implementation (not necessarily the standard library's async though).
23:53:41FromDiscord<Varriount> "complete" and "finished" being the adjectives that people always seem to skip over.
23:53:53FromDiscord<leorize> read the readme, really
23:54:38FromDiscord<dom96> Does anyone have use cases where async was too slow for them?
23:55:41FromDiscord<leorize> but performance is really a small part of the story
23:56:01FromDiscord<leorize> the programming model this enables is what makes it attractive
23:57:22FromDiscord<Varriount> In reply to @dom96 "Does anyone have use": I doubt it. But that's not the point. "performance" is held up as a key attribute, and still tends to attract people, regardless of whether it's a big concern.↵Just look at how the quality of `able to handle "big data"` is/was viewed.
23:57:39FromDiscord<leorize> but if you worry about performance then yes we do benchmark them, against closure iterators and httpbeast
23:58:07FromDiscord<Varriount> leorize: The readme doesn't mention performance or benchmarks. I might be missing something though.
23:58:34FromDiscord<leorize> it mentions being 5-15% faster than closure iterators \:)
23:58:54FromDiscord<Varriount> > and a mom pointer to any parent continuation↵Aww.