<< 28-06-2023 >>

00:00:33FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/0IhmF
00:04:32FromDiscord<that_dude.> Ah
00:06:43FromDiscord<demotomohiro> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-how-to-store-different-types-in-seqqmark↵How to store different types in seq? That is frequently asked here but do people really use such a seq?
00:26:05*flouer__ joined #nim
00:33:04FromDiscord<lucidrains> ah, worth following or no?↵(@willyboar)
01:14:59*jmdaemon quit (Ping timeout: 264 seconds)
01:32:01FromDiscord<takemichihanagaki3129> In reply to @demotomohiro "https://internet-of-tomohiro.netlify.app/nim/faq.en": Impressive! My first guess would be "use an union", but, DAMN, it is 20000% better and idiomatic.
01:32:17FromDiscord<takemichihanagaki3129> (edit) "it" => "that"
01:32:26FromDiscord<takemichihanagaki3129> I absolutely loved it!
01:35:39FromDiscord<Elegantbeef> I mean a union is the proper solution 😄
01:36:24*derpydoo quit (Ping timeout: 250 seconds)
02:20:00*flouer__ quit (Ping timeout: 260 seconds)
02:22:19*disso-peach joined #nim
02:45:33FromDiscord<heysokam> In reply to @demotomohiro "https://internet-of-tomohiro.netlify.app/nim/faq.en": yes.↵https://github.com/heysokam/ngpu/blob/f039a1b0289ce0035a9af1bb7415d38d461f1ebf/examples/e17_multimesh.nim#L179C1-L179C1
02:48:28FromDiscord<Elegantbeef> That's not different types though, that's a tuple
02:48:40FromDiscord<heysokam> which is made of different types
02:48:52FromDiscord<heysokam> arbitrary types, in fact
02:49:02FromDiscord<Elegantbeef> When people want to have different types they want each instance to be a different type not shared fields
02:49:19FromDiscord<heysokam> what are shared fields?
02:49:38FromDiscord<Elegantbeef> In your api you have two fields that are not overlapping
02:50:32FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zi3
02:50:54FromDiscord<heysokam> why? not following 🤔
02:51:18FromDiscord<Elegantbeef> Cause they do not want to have a tuple they want to have different types in a collection
02:51:31FromDiscord<Elegantbeef> so `@[10, "h", 'a', 30f, MyObject()]`
02:51:36FromDiscord<Elegantbeef> Using a tuple doesnt express that
02:51:55FromDiscord<heysokam> i was recommended here to use a tuple
02:52:19FromDiscord<heysokam> whats the way to actually pass different types as a sequence?
02:52:25FromDiscord<Elegantbeef> You arent trying to make a heterogenous collection
02:52:44FromDiscord<heysokam> ?
02:52:51FromDiscord<heysokam> they are different types
02:53:01FromDiscord<heysokam> is that not heterogeneous?
02:53:24FromDiscord<Elegantbeef> You're making a key value pair
02:53:25FromDiscord<Elegantbeef> Or object variants as they're called
02:53:25FromDiscord<Elegantbeef> You use tagged unions
02:53:41FromDiscord<Elegantbeef> They're the same type of `(Uniform, Renderer)`
02:54:26FromDiscord<heysokam> In reply to @Elegantbeef "Or object variants as": are object variants allowed to be different from each other in kind?
02:54:41FromDiscord<heysokam> (edit) "kind?" => "kind, when stored in a seq?"
02:55:35FromDiscord<Elegantbeef> They are overlaped and ensure you only access a specific branch when it's valid
02:55:58FromDiscord<heysokam> i don't know what that means
02:56:59FromDiscord<Elegantbeef> The size of an object variant is the size of the largest branch, the size of a tuple is the size of all fields
02:57:01FromDiscord<Elegantbeef> An object variant is only allowed to be in on state at a time
02:57:01FromDiscord<Elegantbeef> one state\
02:58:19FromDiscord<heysokam> but can two variant objects have different states and be in the same sequence?
02:58:27FromDiscord<Elegantbeef> Yes
02:58:32FromDiscord<heysokam> i thought the kind was a type diferentiator
02:59:46FromDiscord<heysokam> wait... the types are [T].. does that also limit the variant?
03:00:00FromDiscord<Elegantbeef> Yes
03:00:05FromDiscord<heysokam> how is the variant object going to know that it needs to cover every single T?
03:00:16FromDiscord<heysokam> automatically, and implied by its contents?
03:00:26FromDiscord<Elegantbeef> Object variants are not automatic
03:00:28FromDiscord<Elegantbeef> rtfm here
03:00:38FromDiscord<heysokam> so then a tuple is the solution
03:01:13*lucasta quit (Remote host closed the connection)
03:01:16FromDiscord<Elegantbeef> For your problem yes
03:01:30FromDiscord<Elegantbeef> Generally speaking you do not want to support arbitrary types and do not want to box data
03:01:38FromDiscord<heysokam> because its not `(Uniform, Texture, Uniform)` its `Uniform[SomeType], Texture, Uniform[OtherType]`
03:02:18FromDiscord<heysokam> In reply to @Elegantbeef "Generally speaking you do": yeah but you were just saying right now that i was doing it wrong, and you recommended me to use a tuple a while ago... so... its mixed information, and i don't have the knowledge to understand why
03:02:24FromDiscord<heysokam> if you say its bad, i trust it
03:02:32FromDiscord<heysokam> but if you say both.... what do i pick? 🙈
03:02:48FromDiscord<heysokam> but yeah, worrying for no reason
03:03:32FromDiscord<Elegantbeef> I didnt say you're doing it wrong
03:03:36FromDiscord<Elegantbeef> I'm saying you're solving a different problem
03:03:57*lucasta joined #nim
03:04:14FromDiscord<heysokam> In reply to @Elegantbeef "They're the same type": this omits the generic, which implies that a variant is correct, which implies that i was doing it wrong by inference
03:04:32FromDiscord<Elegantbeef> No it doesnt
03:04:58FromDiscord<Elegantbeef> A sequence of mixed objects needs a variant
03:05:09FromDiscord<heysokam> but you omitted the T
03:05:11FromDiscord<demotomohiro> seq can add/remove objects at runtime but tuple cannot.↵seq allows randrom access with runtime value but you can access a element of tuple only with compile time int.
03:05:35FromDiscord<heysokam> well, nvm. its useless arguing
03:05:59FromDiscord<Elegantbeef> "omited the T"?
03:06:04FromDiscord<Elegantbeef> There was no T
03:06:16FromDiscord<heysokam> RenderData[Uniforms] is a T
03:06:18FromDiscord<Elegantbeef> In a statically typed programming language tuples are statically typed heterogeneous product types, and sequences are a collection of a homogenous type
03:06:28FromDiscord<Elegantbeef> If you want to dynamically store a group of values you cannot do it inside a tuple
03:08:17FromDiscord<Elegantbeef> If you wanted to store an int and a float inside of a sequence using a tuple is not the correct solution has it has 0 type information
03:18:39FromDiscord<JJ> how do you create a reference to an existing type?
03:18:53FromDiscord<Elegantbeef> `new MyType`
03:18:59FromDiscord<Elegantbeef> `(ref MyType)(...))`
03:19:43FromDiscord<JJ> er, an existing object
03:19:57FromDiscord<JJ> i have a `Stack` that i would like a pointer to
03:20:53FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/V4odL
03:21:02FromDiscord<Elegantbeef> You cannot create a `ref` of stack type
03:21:09FromDiscord<Elegantbeef> you can only take the addr
03:21:59FromDiscord<demotomohiro> `ref` types always refers to heap.
03:22:26FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4xfc
03:22:32FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4zi8
03:22:37FromDiscord<Elegantbeef> why not use a bool + template?
03:23:27FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/cXptf
03:23:54FromDiscord<demotomohiro> In reply to @omentic "like, i've got this": In that case, both `ws` and `rs` need to be `ref Stack` or use bool + template as Elegantbeef says.
03:24:01FromDiscord<JJ> rust-style reference semantics were the first thing that came to mind
03:24:52FromDiscord<JJ> In reply to @Elegantbeef "You cannot create a": oh. right
03:25:18FromDiscord<demotomohiro> ref in Nim is bit different from reference in rust.
03:25:45FromDiscord<demotomohiro> https://nim-lang.org/docs/manual_experimental.html#view-types↵This is more similar to rust's reference.
03:25:56FromDiscord<Elegantbeef> Don't use views they're broken 😄
03:31:09FromDiscord<JJ> bluh. that reminds me, i don't know how sinks work
03:31:23FromDiscord<JJ> iirc they were not enforced or something weird
03:31:45FromDiscord<Elegantbeef> The compiler copies if required to make the code compile
03:34:55FromDiscord<bostonboston> But you can still forbid copy's can't you
03:35:03FromDiscord<Elegantbeef> Yea
03:35:03FromDiscord<bostonboston> Or will that cause too many problems
03:35:08FromDiscord<Elegantbeef> You can make `=copy` error
03:35:24FromDiscord<JeysonFlores> sent a long message, see http://ix.io/4zie
03:35:44FromDiscord<Elegantbeef> Use a macro
03:38:12FromDiscord<demotomohiro> In reply to @bostonboston "Or will that cause": I tried to make `=copy` error and tested with seq: https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-can-i-use-object-types-for-seq-even-if-copying-is-disabledqmark
03:39:25FromDiscord<Elegantbeef> It does exactly what it does in rust by default
03:39:29FromDiscord<Elegantbeef> But it also makes it amazing
03:39:30FromDiscord<Elegantbeef> annoying\
03:46:21FromDiscord<demotomohiro> In reply to @JeysonFlores "how can I catch": Custom pragma is applied to where procedure is defined, not to procedure call site.
03:47:17*lucasta quit (Quit: Leaving)
03:53:12*disso-peach quit (Quit: Leaving)
04:09:21FromDiscord<willyboar> In reply to @lucidrains "ah, worth following or": I guess you don't lose something to do it. They do a lot of stuff but I don't know how usable is at the moment. If you want to contribute to the project go for it.
04:14:27*disso-peach joined #nim
04:16:30FromDiscord<uninnocent> How can I get the ram size?
04:16:41FromDiscord<uninnocent> Like how many gbs of ram a device has
04:26:37FromDiscord<demotomohiro> !eval import sequtils; echo "/proc/meminfo".lines.toSeq[0]
04:27:37NimBotCompile failed: <no output>
04:29:19*disso-peach quit (Quit: Leaving)
04:29:22FromDiscord<huantian> Where’s the template to get the first value of an iterator haha
04:36:59FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4ziq
04:40:46FromDiscord<uninnocent> is it possible to compile nim without having nim installed?
04:40:55FromDiscord<uninnocent> like have a nim executable compile another nim executable
04:41:13FromDiscord<uninnocent> !eval import sequtils; echo "/proc/meminfo".lines.toSeq[0]
04:42:11FromDiscord<uninnocent> In reply to @demotomohiro "!eval import sequtils; echo": Error: unhandled exception: cannot open: /proc/meminfo [IOError]
04:42:13NimBotCompile failed: <no output>
04:46:41FromDiscord<demotomohiro> In reply to @uninnocent "is it possible to": You can compile Nim compiler using gcc without Nim:↵https://github.com/nim-lang/Nim#compiling
04:47:07FromDiscord<uninnocent> In reply to @demotomohiro "You can compile Nim": Alright, and what about that memory thing?
04:47:15FromDiscord<uninnocent> it didn't seem to run correctly
04:47:16FromDiscord<demotomohiro> In reply to @uninnocent "Error: unhandled exception: cannot": It works only on linux.
04:47:25FromDiscord<uninnocent> Ah, well I need a solution for windows.
04:48:28FromDiscord<demotomohiro> You probably need to find out the windows API that tells total ram amount.
04:49:18FromDiscord<uninnocent> BOOL GetPhysicallyInstalledSystemMemory(↵ [out] PULONGLONG TotalMemoryInKilobytes↵);
04:49:22FromDiscord<uninnocent> and how would I use this with nimlang?
04:49:28FromDiscord<uninnocent> Just import winim and run that function + echo it?
04:50:32FromDiscord<uninnocent> Apparently not
04:50:42FromDiscord<uninnocent> sent a code paste, see https://play.nim-lang.org/#ix=4zir
04:51:37FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zis
04:52:07FromDiscord<demotomohiro> I dont has windows and that code is not tested.=
04:53:37FromDiscord<uninnocent> You mipelt it, but otherwise it works fine
04:55:57FromDiscord<heysokam> In reply to @uninnocent "is it possible to": you could have a binary that downloads the source code of nim, a correct zigcc for the system, and builds the nim compiler with zigcc... so essentially you don't even need gcc if you go that route. only a tool to download and call for the other requirements locally
05:21:29FromDiscord<Elegantbeef> Drop the first one
05:21:31FromDiscord<emanresu3> sent a code paste, see https://paste.rs/wdKoz
05:22:12FromDiscord<emanresu3> but then a call with a seq wouldn't work
05:22:13FromDiscord<Elegantbeef> Yea it does
05:22:16FromDiscord<Elegantbeef> `seq`, `array` and `openArray` implicitly convert to `varargs`
05:22:33FromDiscord<arathanis> wow i had that totally backwards lol
05:22:45FromDiscord<arathanis> oh wait i think i know what you mean now
05:22:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ziz
05:23:22FromDiscord<emanresu3> you're right, I didn't realize, thanks
05:23:29FromDiscord<Elegantbeef> No problem
05:23:35FromDiscord<Elegantbeef> What did you have backwards arath?
05:24:30FromDiscord<arathanis> oh i thought about how varargs is transformed into an array, but you were talking about implicit conversion before that happens i believe
05:24:52FromDiscord<arathanis> or maybe in lieu of that happening?
05:24:56FromDiscord<Elegantbeef> Only `myCall(a, b, c, d, e)` is converted into an array
05:25:12FromDiscord<arathanis> with myCall having varargs right?
05:25:36FromDiscord<arathanis> but really varargs is like a special version of openarray? or is that not quite right?
05:25:55FromDiscord<Elegantbeef> `varargs` also accepts `seq`, `array`, `openArray` since it's pretty much an alias to the latter
05:26:07FromDiscord<Elegantbeef> It's pretty much a special openarray
05:26:36FromDiscord<arathanis> so its basically an openarray with special syntax for procedure calls
05:26:55FromDiscord<Elegantbeef> Yes
05:27:33FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#types-varargs↵> A varargs parameter is an openarray parameter that additionally allows to pass a variable number of arguments to a procedure. The compiler converts the list of arguments to an array implicitly:
05:27:41FromDiscord<arathanis> well hey there it is
05:27:46FromDiscord<arathanis> https://media.discordapp.net/attachments/371759389889003532/1123484865740947486/image.png
05:27:55FromDiscord<Elegantbeef> rtfm is too hard 😄
05:28:02FromDiscord<arathanis> the manual lies
05:28:10FromDiscord<Elegantbeef> How?
05:28:30FromDiscord<Elegantbeef> The manual is the closest thing we have to a spec, so if it lies, someone needs to fix it or the compiler
05:28:44FromDiscord<arathanis> it says "manual" when so many things in nim are automatic and free
05:28:47FromDiscord<arathanis> 😉
05:28:55FromDiscord<Elegantbeef> lol
05:30:44FromDiscord<arathanis> `varargs[typed]` is the spooky magic
05:30:56FromDiscord<Elegantbeef> It's not that spooky
05:31:02FromDiscord<arathanis> i know lol
05:31:10FromDiscord<arathanis> its for echo
05:31:14FromDiscord<arathanis> and abuse
05:31:55FromDiscord<arathanis> its mostly just slightly different than normal varargs in that normal varargs wont nest implicit arrays
05:32:01FromDiscord<arathanis> but varargs[typed] will
05:32:06FromDiscord<arathanis> according to the manual
05:32:14FromDiscord<Elegantbeef> It's not even for echo
05:32:14FromDiscord<Elegantbeef> Echo uses it, but I don't think it needs to
05:32:41FromDiscord<arathanis> well the manual says its "required so that the builtin echo proc does what is expected"
05:33:47FromDiscord<arathanis> looks like its so `echo @[1, 2, 3]` prints the string repr of the seq and not `123` if it was used like openarray
05:34:47FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ziB
05:36:20FromDiscord<Elegantbeef> Maybe it was required in the past? Cause I do not think so any further
05:37:01FromDiscord<arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4ziC
05:37:04FromDiscord<arathanis> this makes it not behave like you expect
05:37:08FromDiscord<Elegantbeef> Right
06:07:20FromDiscord<JJ> In reply to @Elegantbeef "The compiler copies if": hmm. i wish it would provide a warning when it does so.
06:07:59FromDiscord<Elegantbeef> `--hint[Performance]: on`
06:08:04FromDiscord<JJ> that'd make `sink` and `lent` annotations very nice to work with for performance
06:08:15FromDiscord<JJ> 😮 😮 😮
06:08:34FromDiscord<Elegantbeef> Could even turn it into an error disallowing any implicit copies
06:08:45FromDiscord<JJ> okay wow i will try that out
06:09:16om3gaplay.nim-lang.org opens at your side?
06:09:31FromDiscord<JJ> In reply to @Elegantbeef "Could even turn it": i'd just love it if those hints were turned on by default, it'd make nim particularly more appealing to rust folks imo
06:09:36FromDiscord<Elegantbeef> I know I do not write any performance sensitive code, but I really do not get why people are so scared of the implicit copies
06:09:49FromDiscord<Elegantbeef> If you have a large object you likely will error the copy anyway
06:10:00FromDiscord<Elegantbeef> Or the object will be a `ref` for whatever reason
06:10:25FromDiscord<JJ> well making `=copy` an error takes effort
06:10:49FromDiscord<Elegantbeef> Sure but many people write code with implicit copies
06:12:09FromDiscord<Elegantbeef> If that errored by default you've made the barrier to the language much higher
06:12:12FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/wWE6v
06:12:26FromDiscord<Elegantbeef> Nim trusts the programmer's intentions
06:12:37FromDiscord<Elegantbeef> If you say you want to use a after it was supposedly used it trusts that you wanted to copy
06:13:15FromDiscord<Elegantbeef> the benefit is that you can do like `echo myVar` anywhere in code and get information temporarily, yes I'm promoting echo debugging 😄
06:13:57FromDiscord<Elegantbeef> You can also disable implicit copies inside any function by using pragmas to enable erroring on Performance
06:14:42FromDiscord<Elegantbeef> I don't know I just find trusting the programmer about these things the better solution, probably biased due to Nim
06:16:30om3gahmm, what means "trusting programmer"
06:17:05FromDiscord<Elegantbeef> The compiler/language assumes what the programmer said to do is what it is desired
06:17:16FromDiscord<Elegantbeef> Rust doesnt trust the programmer so a use after move is an error
06:17:28om3gaaah rust...
06:17:28FromDiscord<Elegantbeef> Nim trust's the programmer so a use after move causes a copy where the use was supposed to be
06:17:56FromDiscord<Elegantbeef> "where the move was supposed to be"
06:18:39om3gadid you know, rust don't has uninitialized array declaration of fixed size?
06:18:53FromDiscord<Elegantbeef> I do not know what that means
06:19:13FromDiscord<Elegantbeef> you mean like `var a {.noinit.}: array[10, int]`?
06:19:31om3gayou cannot declare array with size of 100 elements without initializing it
06:19:46FromDiscord<Elegantbeef> Sure you technically cannot in Nim without doing it either 😛
06:19:47om3gawhat means if will zero terminate, or fill with some def. values
06:20:33FromDiscord<JJ> In reply to @Elegantbeef "If that errored by": yeah, i agree: that's why i think `--hint[Performance]: on` by default would be cool
06:21:02FromDiscord<Elegantbeef> `let array: [i32; 3] = [0; 3];` seems to be valid so idk what you mean
06:22:03FromDiscord<Elegantbeef> Well PRs welcome 2.0 is out soon 😄
06:22:05om3gaElegantbeef no, I mean: var a: array[10,char] VS var b: array[10,char] = '\0'
06:22:52FromDiscord<Elegantbeef> I'm confused cant you do `let a: [char, 10] = ['\0'];`?
06:23:05FromDiscord<Elegantbeef> I do not know Rust and only looked at arrays due to you, so I'm guessing
06:23:16om3gaI mean when I don't want to do it, rust not allows
06:23:38FromDiscord<Elegantbeef> I do not get what you mean, so I'll shush
06:23:40om3gait's not about me, more about my co-worker who studies rust
06:25:11om3gahmm, ok. maybe my english sucks, but code example pretty informative what I mean
06:26:22om3garust does var b variant in any case, by assigning to array some value, and it takes a lot of time
06:27:05FromDiscord<Elegantbeef> Couldnt you do `[]` then intialize it the same way you would in Nim
06:27:54om3gain C is the same, char a[10] < uninitialized arr
06:28:20om3gaElegantbeef, the problem is that rust not allows you to have uninitialized array
06:28:32om3gait has no trust to programmer, as you said
06:28:51FromDiscord<Elegantbeef> Oh shit `[]` fails
06:32:21FromDiscord<gogolxdong666> Is there any way to sync nimbus-eth2 with geth which has a different chainId?
06:32:34FromDiscord<Elegantbeef> Oh god it's "init 3 elements with value 0"
06:32:37FromDiscord<Elegantbeef> Cause that's better than just `[0..]` or something similar 😄
06:33:40FromDiscord<gentk> am I perhaps missing some std function to turn a tuple to a string array? e.g. (4, "str", 12.3) to ["4", "str", "12.3"]
06:34:05om3gaalso it's not clear how rust uses arrays in stack
06:34:27FromDiscord<Elegantbeef> I doubt that function exists gentk, it's pretty simple though
06:34:40om3gait can be like they're not in stack at all
06:34:52FromDiscord<gogolxdong666> `build/nimbus_beacon_node --el=http://149.28.74.252:8545`
06:35:30FromDiscord<uninnocent> is there any way to run an executable in memory without using shellcode?
06:35:55om3gagentk , tuple is a typed array of fixed size, you can read values and assign to a string
06:36:44FromDiscord<Elegantbeef> There's a `fields` iterator which you'll want to use for this
06:37:21om3gain Nim if I not mistaken, tuple is in stack
06:37:33FromDiscord<Elegantbeef> It's a value type yes
06:38:48om3gaplayground dead :(
06:39:47FromDiscord<gentk> yes I found the fields iterator, but building a fixed length array you then need both an index and iterating over values
06:40:02FromDiscord<gentk> so the code didn't seem that elegant, so checked if I'm missing something
06:40:08FromDiscord<gentk> (edit) "so the code didn't seem that elegant, so checked if I'm missing something ... " added "obvious"
06:40:20FromDiscord<gentk> (edit) "values" => "fields"
06:40:59FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ziR
06:41:28FromDiscord<gentk> ah didn't know about enumerate
06:41:46FromDiscord<Elegantbeef> `enumerate t.fields`\
06:42:25FromDiscord<gentk> thanks, that's convenient
06:48:53FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4ziT
06:49:25FromDiscord<Elegantbeef> I think the compiler knows you didnt actually sink it
06:50:08FromDiscord<gentk> sent a code paste, see https://play.nim-lang.org/#ix=4ziU
06:50:19FromDiscord<Elegantbeef> Right cause `[]` on a tuple has to be static
06:50:33FromDiscord<gentk> (edit) "https://play.nim-lang.org/#ix=4ziU" => "https://play.nim-lang.org/#ix=4ziV"
06:50:54FromDiscord<Elegantbeef> Oh JJ this is a global variable aswell
06:53:00FromDiscord<Elegantbeef> Or i'm missing something
06:54:13om3gaplay.nim-lang.org works? I get timeout error
06:54:26FromDiscord<Elegantbeef> No it doesnt
06:54:29FromDiscord<Elegantbeef> It's down right now
06:54:35FromDiscord<Elegantbeef> Move to a modern platform if you want to see code blocks 😄
06:54:52om3gaaah, thanks, you posted links, that's why I'm asking
06:55:27FromDiscord<Elegantbeef> We didnt
06:55:32FromDiscord<Elegantbeef> We posted code blocks 😛
06:55:59om3gahmm, I need more coffee
07:00:20FromDiscord<JJ> In reply to @Elegantbeef "Oh JJ this is": hmm. i still can't get it to trigger.
07:00:33FromDiscord<Elegantbeef> Yea I'm too tired to catch why it's not triggering atm
07:10:35FromDiscord<Elegantbeef> Oh @JJ it's cause `LargeStruct` is unsinkable anyway
07:11:33FromDiscord<Elegantbeef> The hint is only made where it makes sense, a large type that is unsinkable doesnt make to warning when it's copied
07:12:04FromDiscord<Elegantbeef> As soon as you add some heap memory with `seq` or `string` it creates the hint
07:13:15FromDiscord<Elegantbeef> It's not like it could do much else given `sink LargeObject` is just "copy this object"
07:16:31FromDiscord<JJ> oh, duh, that makes sense
07:16:52FromDiscord<JJ> for some reason i was thinking "hmm i need a large type. i shall make something big on the stack"
07:17:10FromDiscord<JJ> ignoring that the stack literally elides all memory management and does its own thing
07:19:01FromDiscord<JJ> although... i still can't seem to produce the hint
07:19:15FromDiscord<Elegantbeef> Add a seq field
07:19:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zj1
07:20:35FromDiscord<Elegantbeef> It also works top level, but move semantics can be funny top level
07:21:23FromDiscord<JJ> still not getting it. previously tried with `ref object` too
07:21:26FromDiscord<JJ> `nim c --hint[Performance]:on`?
07:21:44FromDiscord<JJ> oh what the hey it's that `var`
07:22:18FromDiscord<Elegantbeef> cannot sink memory that's immutable so copy is required anyway
07:22:28FromDiscord<Elegantbeef> Same logic as array
07:22:40FromDiscord<JJ> really? hmm
07:22:43FromDiscord<JJ> why is that the case?
07:23:24FromDiscord<Elegantbeef> `move` takes a `var T`
07:24:22FromDiscord<Elegantbeef> Perhaps due to copy elison/cursor semantics, though idk
07:25:14FromDiscord<Elegantbeef> It's quite easy to just error the copy if you really care about this stuff, or even make it write stack traces in a debug build
07:27:44FromDiscord<JJ> huh. i feel like you could escape scope by writing to a global or smth though, and i'd think sink would be helpful there
07:27:47FromDiscord<JJ> if that makes sense
07:28:05FromDiscord<JJ> also wait do you mean any array? so any fixed memory allocation even if it's mutable?
07:29:01FromDiscord<Elegantbeef> What?
07:29:16FromDiscord<JJ> In reply to @Elegantbeef "Same logic as array": what'd you mean here?
07:29:45FromDiscord<Elegantbeef> It's not the same logic as arrays
07:30:03FromDiscord<Elegantbeef> It's just that `let` does not guarantee you own the resources, so you cannot `sink` it I assume
07:31:58FromDiscord<JJ> hmm. that's interesting.
07:33:06FromDiscord<Elegantbeef> Copy elison means `let` does not always own resources
07:33:11FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/8CIdq
07:35:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4zj4
07:35:53FromDiscord<JJ> how'd you get the expanded arc? also the code block broke across the bridge
07:36:05FromDiscord<Elegantbeef> `--expandArc: main`
07:36:26FromDiscord<Elegantbeef> https://hatebin.com/zichyypved
07:40:15FromDiscord<Elegantbeef> Can one move an immutable object in Rust?
07:41:03FromDiscord<JJ> yes, you do so by default
07:41:37FromDiscord<JJ> but references in rust are at the level of types which is... interesting (a poor design decision)
07:43:08FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4zj8
07:43:59FromDiscord<JJ> or, i may be still thinking about it wrong, actually.
07:46:03FromDiscord<JJ> yeah i really don't understand this. you're freeing the memory associated with a: but then you're setting the fields of a once again? and saying a was moved?
07:46:54om3gamy colleague seems will stop to continue learning rust
07:46:56FromDiscord<JJ> hmm. going to read through this again in the morn
08:02:19*ntat joined #nim
08:10:07*PMunch joined #nim
08:42:50FromDiscord<Elegantbeef> @JJ\: you do not know what was in the memory before so you destroy it, then you disarm the destructor with `wasMoved` then you set the fields
08:48:08*azimut_ quit (Ping timeout: 240 seconds)
09:02:29om3ga[email protected]@[email protected]:1134:9: warning: ‘free’ called on a pointer to an unallocated object ‘-8B’ [-Wfree-nonheap-object]
09:04:48om3ga--d:release causes this
09:07:49FromDiscord<jvlenprzz> I need help
09:07:51FromDiscord<jvlenprzz> i cant install nimble
09:07:55FromDiscord<jvlenprzz> ERROR: Failed building wheel for nimble-install↵Failed to build nimble-install↵ERROR: Could not build wheels for nimble-install, which is required to install pyproject.toml-based projects
09:08:07FromDiscord<jvlenprzz> Can someone help me?
09:08:25FromDiscord<jvlenprzz> wheel
09:08:40om3gagcc compiler, while clang not reports this warning (what ofc not means absence of problem)
09:09:50FromDiscord<jvlenprzz> do u know how
09:10:59*m5zs7k quit (Ping timeout: 246 seconds)
09:11:14FromDiscord<Elegantbeef> This is a chat for the Nim programming language not a python library
09:11:41FromDiscord<jvlenprzz> Yes but since i want to install Nim into python and i cant
09:11:42FromDiscord<jvlenprzz> you should help me
09:12:03PMunchInstall Nim into Python?
09:12:06PMunchWhat does that even mean?
09:12:14om3gawhat?
09:12:45*m5zs7k joined #nim
09:13:07PMunchI guess this thing? https://github.com/juancarlospaco/nimble_install
09:14:10*ntat quit (Read error: Connection reset by peer)
09:14:13FromDiscord<Elegantbeef> People make the oddest packages
09:14:32FromDiscord<jvlenprzz> want to install this https://pypi.org/project/nimble-install/
09:14:41Amun-Ra"Install Nim packages directly from Python PIP" but why?
09:15:00PMunchIn case you have a Python library which uses a Nim-built package on the side
09:15:03PMunchI guess
09:15:13Amun-Rahmm
09:15:26PMunchjvlenprzz, that's not a package you install on its own. It's used to install Nimble packages with pip
09:15:32om3gaI allways had problems with installing python packages. It almost never works as it should
09:15:37FromDiscord<jvlenprzz> Yes and thats what i want to do
09:15:47FromDiscord<jvlenprzz> Install Nimble packages with pip
09:15:53FromDiscord<jvlenprzz> But how am i supossed to use it
09:16:31PMunchIf you read the documentation at the link I sent you I think you will figure it out
09:16:42PMunchYou need to give it a `--install-option` parameter
09:16:56FromDiscord<jvlenprzz> I mean ill start from zero, i want to install a python thing which just works with nim and nim.cfg files so i deduced its nimble cause it doesnt have any setup py
09:17:01FromDiscord<jvlenprzz> no such option: --install-option
09:17:07FromDiscord<jvlenprzz> Thats what it says kekw
09:17:12PMunchHmm
09:17:26PMunchMaybe this nimble-install package is not the same as nimble_install..
09:18:39PMunchTry with `--nimble=`
09:20:08PMunchHmm, its @juancarlospaco which has made the package
09:20:12PMunchMaybe they're online?
09:20:26FromDiscord<jvlenprzz> I mean
09:20:30FromDiscord<jvlenprzz> .nim is a nimble file right
09:20:34PMunchNo
09:20:44FromDiscord<jvlenprzz> fml
09:20:45PMunch.nim is a Nim file, Nimble is Nims package manager
09:20:58PMunchSo Python -> Nim, Pip -> Nimble
09:21:07FromDiscord<JJ> In reply to @Elegantbeef "<@572634810917322773>\: you do not": hmm. okay that makes sense: but then, why isn't the source marked as no longer usable, and how does this avoid copying memory?
09:21:13om3gathis is python package integration with nim
09:21:14PMunchBut you would use Nimble to install Nim projects
09:21:20om3ganot related directly to nim
09:21:50PMunchTrue, but we talk about unrelated stuff here all the time :P
09:22:10FromDiscord<jvlenprzz> So in order to install a ZIP which all it has is .nim archives, no setup.py what should i do
09:22:42om3gasure, I don't see any problem here too. But what happens in this python kitchen, who knows? :)
09:22:44PMunchDo you have a link to it?
09:23:10FromDiscord<jvlenprzz> Ye sure
09:23:12FromDiscord<jvlenprzz> i need to install this
09:23:18FromDiscord<jvlenprzz> https://github.com/qb-0/pyMeow
09:23:36NimEventerNew thread by Oecophylla: Undeclared field - Unrecognized proc, see https://forum.nim-lang.org/t/10308
09:24:20PMunchI assume what you did was run the suggested `pip install pyMeow*.zip` command?
09:25:09FromDiscord<jvlenprzz> Okey i did pip install pyMeow-master.zip
09:25:14PMunchAah
09:25:17FromDiscord<jvlenprzz> Cause the file name is not pyMeow
09:25:19PMunchThat's your problem
09:25:32PMunchYou just grabbed a zip-ed version of the repository
09:25:52PMunchAnd not one of the release zip files (like it told you in the line above)
09:26:24FromDiscord<jvlenprzz> Okey
09:26:26FromDiscord<jvlenprzz> its time to kill myself
09:26:28FromDiscord<jvlenprzz> ty for the help xd
09:26:36FromDiscord<jvlenprzz> And sorry for disturbing
09:26:37PMunchIf you follow that "Release Section" link you will find a zip file called something like pyMeow-1.43.25.zip
09:26:44PMunchThat is the actual Python package
09:27:01PMunchProbably built from a GitHub action or something
09:27:17PMunchSo yeah, just grab that and the install should work fine
09:28:05PMunchNo problem, hope you didn't spend too long trying to debug this :P
09:28:22PMunchOh, and cheats are lame.. Just to get that out there
09:28:35PMunchUnless you play single player only of course, then by all means
09:30:13PMunchHonestly pretty cool how Nim can be shipped as a Python package this easily though
09:35:00PMunchUnfortunately they don't have their packaging pipeline in the repository :(
09:36:41*ntat joined #nim
09:39:58FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4zjt
09:44:30FromDiscord<Chronos [She/Her]> In reply to @heysokam "is there a way": I think you'd use a block there
09:44:31PMunchHmm, I don't think so
09:44:50FromDiscord<Chronos [She/Her]> In reply to @heysokam "is there a way": Doesn't seem doable, couldn't you just use an else statement there!
09:44:52FromDiscord<Chronos [She/Her]> ?
09:44:58FromDiscord<Chronos [She/Her]> Or when not defined(release)
09:45:06PMunchI'm guessing they want to avoid the indentation
09:45:32PMunchHaving your entire module indented can be a bit annoying
09:45:56FromDiscord<Chronos [She/Her]> True but I see no other solution
09:46:05PMunchWhat you could do is place your actual code in a different file, and then have `when defined(someswitch): include actualImplementation`
09:46:19FromDiscord<Chronos [She/Her]> i was about to say that xD
09:51:53FromDiscord<heysokam> In reply to @yu.vitaqua.fer.chronos "I think you'd use": its the literal opposite of a block
09:52:15FromDiscord<heysokam> In reply to @PMunch "I'm guessing they want": exactly
09:52:37FromDiscord<heysokam> In reply to @PMunch "What you could do": ahh true, it actually makes sense in this case even. good idea
09:52:51FromDiscord<heysokam> (edit) "even." => "even, since its an entire file that is being ruled out."
09:54:36PMunchIt's a bit annoying to have these tiny stub files though
09:54:43PMunchEspecially if you're looking for code
09:54:55FromDiscord<heysokam> sent a code paste, see https://play.nim-lang.org/#ix=4zjz
09:59:00FromDiscord<Chronos [She/Her]> I meant because you can do `break label`
09:59:55*ntat quit (Ping timeout: 250 seconds)
10:01:19FromDiscord<heysokam> ah i see what you mean
10:01:35FromDiscord<heysokam> yeah, but that would break out of the block, not the file 🙂
10:02:01FromDiscord<heysokam> (edit) "file 🙂" => "file. 🙂↵so, essentially the same as a when block 🤷‍♂️"
10:02:18PMunchMaybe you could create an RFC to make the module an implicit block. So you could `break moduleName`
10:02:38FromDiscord<heysokam> whats an rfc?
10:02:59PMunchRequest For Comment, the official process of getting changes into Nim
10:03:24FromDiscord<heysokam> ah ic
10:06:56*ntat joined #nim
10:22:41FromDiscord<heysokam> Does adding: `{.dynlib: "libassimp.so".}` implicitly make the compiler say `--passL:"-lassimp"`? 🤔
10:25:20FromDiscord<yepoleb> No, it generates code to load the symbol when the program is started, but it does not use the regular linker
10:26:27FromDiscord<yepoleb> If you want to dynamically link in the C way you have to omit the dynlib pragma and instead pass -lassimp
10:32:48FromDiscord<heysokam> In reply to @yepoleb "If you want to": oh! so -l is not needed?↵so it would be like doing `-l` but then create a proc to load the symbols directly or something? 🤔
10:33:53FromDiscord<yepoleb> -l is not needed. It uses the dynlib module instead of the system linker.
10:34:55om3gaand when exe cant find dynlib, it will throw error if you add --d:nimDebugDlOpen
10:35:30om3gain windows all dlls should be placed next to the binary
10:37:23FromDiscord<heysokam> yeah, thats why i prefer static linking. but the compiler setup is crashing on double definition issue, so i figured I could just use dynamic for now like the other bindings were doing
10:37:42FromDiscord<heysokam> In reply to @yepoleb "-l is not needed.": oh great to know. thx!
10:38:29om3gayou should specify sources of the lib that you want to compile statically
10:38:54om3gabind them manually, and include in your code
10:39:27om3gabtw not all libs can be statically compiled/linked
10:59:27FromDiscord<jviega> What architecture? I have a hack for that problem that works very well, but I don't do Windows 🙂
11:00:32FromDiscord<Chronos [She/Her]> In reply to @PMunch "Maybe you could create": I feel like this is somewhat niche tbh
11:10:50FromDiscord<heysokam> In reply to @om3ga "bind them manually, and": yeah, they are. but they are double defining for some reason
11:47:32PMunchHmm, does anyone have a better image search than Google Lens?
11:48:12PMunchI'm looking for something I believe is a sensor, and I have a couple images of it from different angles, but Google Lens doesn't give me anything useful..
12:07:18FromDiscord<auxym> inaturalist seek is pretty good for plants and animals, but I don't think that'll help you 😛
12:13:20FromDiscord<Benjamin> Have you tried reverse image search, e.g., TinEye? It's best for exact matches AFAIK, but might be worth a try
12:33:23PMunchTrying TinEye now
12:33:29PMunchHmm, 0 matches
12:36:07PMunchHmm, here are the images I'm using by the way. If anyone else want to try (or recognise it :P) https://uploads.peterme.net/thing1.png https://uploads.peterme.net/thing2.png https://uploads.peterme.net/thing3.png
12:42:36FromDiscord<auxym> you could always try r/whatisthisthing (unless they are still on strike/blackout)
12:45:30PMunchTrue, but I'm trying to stay away from Reddit myself
12:48:16FromDiscord<odexine> whats it described to do
12:48:42PMunchWell that's what I'm trying to figure out
12:49:15FromDiscord<yepoleb> Is there any additional context?
12:49:19PMunchI thought it might've been a temperature sensor initially, but it's missing any sort of air hole as far as I can tell
12:50:21PMunchWells it's attached to a sensor/unit attached to powerlines
12:50:36PMunchHmm, it might be an antenna
13:01:07PMunchIt's pointing down though
13:11:42*Arthur1 joined #nim
13:13:11*Arthur quit (Ping timeout: 250 seconds)
13:13:12*Arthur1 is now known as Arthur
13:21:40FromDiscord<Zoom> Points down you say? 100% 5G cancer-emitter.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
13:21:54PMunchHaha :P
13:22:58FromDiscord<Zoom> Oops, thought this is #nim-offtopic
13:23:13*FromDiscord quit (Remote host closed the connection)
13:23:26*FromDiscord joined #nim
13:23:35*FromDiscord quit (Remote host closed the connection)
13:23:48*FromDiscord joined #nim
13:24:31*FromDiscord quit (Remote host closed the connection)
13:24:39PMunchNo worries, the question was off-topic to begin with :P
13:24:44*FromDiscord joined #nim
13:33:20FromDiscord<gamedroit> Is there a site that cites best practices for writing code in Nim?
13:33:35PMunchWe have the NEP-1
13:33:50PMunchAnd Status wrote a style guide, but it's a bit conservative for my liking
13:34:27FromDiscord<gamedroit> sure
13:37:10FromDiscord<gamedroit> 1.6.14 in the bugfixed ``Fixed “Use of _ (as var placeholder) inside a template causes XDeclaredButNotUsed hints”`` appears twice https://media.discordapp.net/attachments/371759389889003532/1123608029657567312/image.png
13:37:17FromDiscord<gamedroit> (edit) "bugfixed" => "bugfixes"
13:39:17*void09 quit (Server closed connection)
13:39:32*void09 joined #nim
13:50:45PMunchHmm, slight annoyance. `var (x, _) = tupleReturner()` works, but redefining only `x` later like this doesn't `(x, _) = tupleReturner()`.
13:57:50*PMunch quit (Quit: Leaving)
14:35:01FromDiscord<gamedroit> lol nim 1.6.14, i tried to run and my anti-virus neutralized it https://media.discordapp.net/attachments/371759389889003532/1123622586320945152/image.png
14:39:15*GoldLeader87 joined #nim
14:42:24FromDiscord<nervecenter> windows, yuk
14:47:46FromDiscord<djazz> > `doAssert TEST_PLAIN_DOUBLE_1 == 123.cdouble`↵> These tests are a bit problematic, will work fine on 64-bit machines, but on architectures where the default float size is not 64-bits these will fail..↵PMunch: hmm, how would it fail?
14:48:08FromDiscord<djazz> the exact type isnt stored in opir output, just the value in json
14:48:48FromDiscord<djazz> or would the types cdouble and clongdouble not exist on those platforms?
14:51:48FromDiscord<djazz> `const Testplaindouble1 = 123.0`
14:51:55FromDiscord<djazz> is whats generated
15:12:19*GoldLeader87 quit (Quit: GoldLeader87)
15:44:19om3gaPMunch hall sensor?
15:46:18FromDiscord<odexine> if it were a hall sensor what would it be for
15:47:13om3gameasuring current
15:53:54FromDiscord<djazz> @pmunch can you bump nimbleutils version to include my fix for freertos please? futhark broke now cuz i have 0.3.0 installed in nimble pkgs2 xD
15:56:37FromDiscord<pmunch> Right, the nimble 2.0 system is a mess..
15:56:48FromDiscord<pmunch> Can't bump it right now
16:01:36FromDiscord<djazz> yeah i was testing nim devel
16:02:28FromDiscord<choltreppe> does someone know what could cause a `out of memmory` error, or has a tip on how to go about finding the problem?
16:04:45*jkl quit (Quit: Gone.)
16:07:00FromDiscord<Zoom> Something fails to allocate. Do you mean get an OutOfMemDefect/OutOfMemError exception?
16:07:01FromDiscord<Zoom> Something fails to allocate. Do you mean you get an OutOfMemDefect/OutOfMemError exception?
16:09:45FromDiscord<choltreppe> I think so. its an runtime error. but I dont get any stacktrace
16:11:37FromDiscord<choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4zkB
16:20:55*azimut joined #nim
16:26:01*FromDiscord quit (Ping timeout: 250 seconds)
16:26:21*FromDiscord joined #nim
16:46:08*azimut quit (Ping timeout: 240 seconds)
17:15:03*flouer__ joined #nim
17:16:07*jkl joined #nim
17:42:55FromDiscord<that_dude.> Did you make sure to use the right flags for valgrind? I know there's issues with the defaults
17:45:48*azimut joined #nim
17:55:27FromDiscord<Andreas> what is ??? https://media.discordapp.net/attachments/371759389889003532/1123673026874056714/std_collection.png
17:55:41FromDiscord<Andreas> (edit) "what is ... ???" added "yellow"
17:56:25FromDiscord<Andreas> (edit) "what is yellow ??? ... https://media.discordapp.net/attachments/371759389889003532/1123673026874056714/std_collection.png" added "and blows everything out of the water.."
18:06:22FromDiscord<JJ> can i directly substitute something out conditionally with a template? or do i have to use a macro
18:08:17FromDiscord<JJ> sent a code paste, see https://play.nim-lang.org/#ix=4zl7
18:15:11*junaid_ joined #nim
18:34:16*xet7 joined #nim
18:36:36FromDiscord<.alea.> @elegantbeef is your fungus package published to nimble?
18:42:38FromDiscord<.alea.> hmm? https://media.discordapp.net/attachments/371759389889003532/1123684900793491596/image.png
18:42:55FromDiscord<.alea.> isn't 1.6.14 the latest release?
18:45:17FromDiscord<Andreas> In reply to @.alea. "isn't 1.6.14 the latest": yes, but there is a 2.0 around the corner. 1.6.4. is latest stable
18:45:39FromDiscord<Andreas> (edit) "stable" => "stable↵and fungus is afaik not on nimble.."
18:45:47FromDiscord<.alea.> what's the 1.9.1 being referenced then?
18:45:55FromDiscord<.alea.> A mistake?
18:46:42FromDiscord<Andreas> In reply to @.alea. "what's the 1.9.1 being": hmm, well, i'd guess thats the pre-2.0 numbering
18:46:56FromDiscord<Andreas> (edit) "In reply to @.alea. "what's the 1.9.1 being": hmm, well, i'd guess thats the pre-2.0 numbering ... " added "for devel"
18:48:06*xet7 quit (Quit: Leaving)
18:49:25*flouer__ quit (Ping timeout: 240 seconds)
18:50:26FromDiscord<Andreas> fungus et friends https://github.com/beef331?tab=repositories&q=&type=&language=nim&sort=
18:56:19*junaid_ quit (Remote host closed the connection)
19:03:35FromDiscord<JJ> yeah devel is 1.9.5 rn
19:13:46FromDiscord<Elegantbeef> 1.9.1 was the name of devel at the time of writing fungus
19:13:53FromDiscord<Elegantbeef> It does require a devel compiler otherwise I'd use stable
19:28:56*ntat quit (Quit: Leaving)
19:38:31NimEventerNew thread by basilajith: Why is a Nim enthusiast/programmer called a "Nimmer"?, see https://forum.nim-lang.org/t/10309
19:45:18*flouer__ joined #nim
20:07:55*gshumway quit (Server closed connection)
20:13:37*gshumway joined #nim
20:14:23*flouer__ quit (Ping timeout: 250 seconds)
20:40:27*flouer__ joined #nim
21:11:11FromDiscord<_alkamist_> sent a code paste, see https://paste.rs/Gz7K4
21:13:05FromDiscord<_alkamist_> I'm in this position where having a user proc after named arguments would be ergonomic but writing overloads for every case would be a real drag.
21:15:10FromDiscord<Elegantbeef> is `userProc = (proc() = echo "user Proc")` too much? 😄
21:19:31FromDiscord<_alkamist_> In reply to @Elegantbeef "is `userProc = (proc()": I suppose that works. Is there a way to default `userProc` to a proc that does nothing?
21:19:42FromDiscord<_alkamist_> The compiler complains at me about a bunch of pragmas when I try
21:19:45FromDiscord<Elegantbeef> `userProc = (proc() = discard)`
21:20:27FromDiscord<_alkamist_> This doesn't work
21:20:27FromDiscord<_alkamist_> sent a code paste, see https://play.nim-lang.org/#ix=4zlK
21:20:44FromDiscord<_alkamist_> Error: type mismatch: got <int literal(1), userProc: proc (){.gcsafe, locks: 0.}>
21:21:51FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zlL
21:22:16FromDiscord<Elegantbeef> The issue is that the proc likely got no side effect and assumed all procs had no side effect
21:22:33FromDiscord<Elegantbeef> by annotating the type you tell it it's supposed to have no side effects
21:22:50FromDiscord<_alkamist_> sent a code paste, see https://play.nim-lang.org/#ix=4zlM
21:23:02FromDiscord<Elegantbeef> You could also just have a nil and then check that of course
21:23:52FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4zlN
21:24:33FromDiscord<Elegantbeef> Sure but nimcall can upcast to closure
21:24:46FromDiscord<_alkamist_> In reply to @Elegantbeef "You could also just": Hmmm, I think I like the idea of having it nil and checking.
21:24:54FromDiscord<Elegantbeef> If i actually implemented my PR all procs could, but alas it causes issues and I don't know why
22:06:52*flouer__ quit (Ping timeout: 240 seconds)
23:48:31*flouer joined #nim