<< 15-07-2023 >>

00:24:37FromDiscord<m4ul3r> I'm storing bytes in a pointer from `alloc0`, how would echo those bytes out and read that's at the pointer?
00:25:22FromDiscord<Elegantbeef> `cast[ptr UncheckedArray[byte]](myPtr).toOpenArray(0, dataLen)`
01:39:59*jkl quit (Quit: Gone.)
01:41:45*jkl joined #nim
02:31:36FromDiscord<m4ul3r> sent a long message, see http://ix.io/4ACk
02:31:55FromDiscord<Elegantbeef> `T` is bounded to the same type
02:33:27FromDiscord<m4ul3r> Is this possible to make them different types? ↵I don't know the size of inArray or output until they are passed into the function, but they both are of type string and byte
02:33:30FromDiscord<m4ul3r> (edit) "Is this possible to make them different types? ↵I don't know the size of inArray or output until they are passed into the function, but they both are of type string and byte ... " added "respectively"
02:34:27FromDiscord<Elegantbeef> `[I, T, Y](inArr: var array[I, T], output: var array[I, Y])`
02:34:46FromDiscord<Elegantbeef> if the length is different you also need a parameter there
02:37:31FromDiscord<m4ul3r> I see, That works. Looks like it can get a little ugly if I have a lot of different generics - thanks
02:47:51FromDiscord<huantian> It’s not too bad if you use names like `Iin` `Tin`
03:00:16FromDiscord<graveflo> In reply to @m4ul3r "I see, That works.": if you are not using the type variable `T` as a variable, as in : `proc p[T](x: T): T` and instead are just trying to use a generic you can say something like `proc p(x: auto)` or `proc p[I](x: array[I, auto])`
03:01:16FromDiscord<demotomohiro> Using single upper case alphabet for generic parameter seems convention inherit from C++ lang.↵You can name generic parameters freely like variable name.
03:01:27FromDiscord<graveflo> It's weird to be that you can make the number in the `array` parameter a type variable but you cannot use `auto` or just use `array` as a typeclass in the parameter. I'm going to think about that one more, but I'm guessing this is just an oversight
03:01:36*cyraxjoe quit (Ping timeout: 272 seconds)
03:01:54*cyraxjoe joined #nim
03:04:47FromDiscord<demotomohiro> You can create arrays without number like `array[char, int]` or `array[MyEnumType, int]`.
03:06:31FromDiscord<graveflo> good point. It seems like Nim is at odds with wanting to verify that the parameter is numeric and allowing an unconstrained `T`. I guess that means that there is an argument that `T` and `auto` should not be permitted, but I would argue against that personally
03:07:08FromDiscord<graveflo> (edit) "good point. It seems like Nim is at odds with wanting to verify that the parameter is numeric and allowing an unconstrained `T`. I guess that means that there is an argument that ... `T`" added "both"
03:12:14FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/zuLLz
03:13:10FromDiscord<Elegantbeef> Anywho the proper thing to do is `proc doThing[T, Y](a: var openArray[T], b: var openArray[Y])`
03:13:42FromDiscord<Elegantbeef> sent a code paste, see https://paste.rs/Y2Tru
03:14:58FromDiscord<graveflo> hmm.. yea that is odd.. but I think it might be important. Thanks for sharing
03:15:39FromDiscord<graveflo> I have a couple other snippets sitting around that do weird things to the type analysis too. I want to try and fix these
03:15:58FromDiscord<demotomohiro> If you use such `Array` concept or `openArray` you cannot force same length array arguments.
03:17:13FromDiscord<Elegantbeef> Right
03:17:14FromDiscord<Elegantbeef> Well you can technically with the concept
03:17:14FromDiscord<Elegantbeef> but with an ugly `when a.len != b.len: {.error: "bleh".}`
03:18:21FromDiscord<demotomohiro> I didnt know error pragma can be used in concept.
03:18:48FromDiscord<graveflo> I think he is saying that you would have to use it in client procs to make sure it doesnt get misaligned
03:20:10FromDiscord<graveflo> that would be interesting if you could implement constraint comparability on concepts though
03:20:24FromDiscord<Elegantbeef> Well you can just add a static value if you really wanted to
03:20:27FromDiscord<graveflo> (edit) "comparability" => "compatibility "
03:20:29FromDiscord<Elegantbeef> But it'd likely explode like the array
03:22:49FromDiscord<graveflo> sent a code paste, see https://play.nim-lang.org/#ix=4ACw
03:23:12FromDiscord<Elegantbeef> No
03:30:35FromDiscord<wannabelokesh> sent a long message, see http://ix.io/4ACx
03:35:04FromDiscord<xtrayambak> In reply to @wannabelokesh "I just learned some": You don't really need to know C all that much to learn Nim or others well, unless you want to bind libraries.
03:35:32FromDiscord<Elegantbeef> Well that's the entire point, all system languages approach the same knowledge
03:36:01FromDiscord<Elegantbeef> Whether you write, Nim, Rust, Zig, C, C++, Odin. You're going to get the same knowledge if you use them as a system language
03:36:37FromDiscord<demotomohiro> When you use C libraries/windows API/system calls from Nim, learning C lang would helps you to write safer code and reading official documents that are written for c programmer.
03:40:03FromDiscord<graveflo> if you're looking to get a job doing that though you might want to know C. Unless Nim pops off (which I would like to see). Knowing math is always going to be a good thing especially in these fields but you could get by with the math that you learn in school so just don't fail that. You do need to know all about bitwise operations in order to work on drivers and systems programming. There is no way around that. It's easy though. If you
03:41:55*azimut quit (Remote host closed the connection)
03:47:53FromDiscord<takemichihanagaki3129> sent a long message, see https://paste.rs/6YMZt
03:55:15FromDiscord<takemichihanagaki3129> sent a long message, see https://paste.rs/3E5oF
03:55:19*azimut joined #nim
03:55:51FromDiscord<Elegantbeef> I mean the C way of error handling is generally a sentinel value, not just Null
03:56:03FromDiscord<Elegantbeef> but then there is also `errono`
03:57:33FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "I mean the C": I particularly use more sentinel than NULL.↵Just a preference tho.
03:57:34FromDiscord<graveflo> yep and we are talking about a design pattern when we are discussing these things in C because it's not a language feature like it is in these newer langs. Understanding which pattern to implement and why other people have implemented their patterns gets a lot easier when you know how the computer works. Don't forget those fundamentals!
04:00:25FromDiscord<takemichihanagaki3129> In reply to @graveflo "yep and we are": Yes, IDK what are your opinions guys, but I don't think that a forced OOP-like way to create interfaces in C is the best approach. I mean, a struct with function pointers inside...↵↵(But, you can use it)
04:02:13FromDiscord<takemichihanagaki3129> (edit) "In reply to @graveflo "yep and we are": Yes, ... IDK" added "for example,"
04:02:48FromDiscord<graveflo> I didn't grow up without langs that had purpose built OOP features so I never used C for anything like that
04:03:05FromDiscord<Elegantbeef> Hey pointer procs are rad 😛
04:03:45FromDiscord<.bobbbob> I thought the C way of handling errors was just prayer
04:04:16FromDiscord<Elegantbeef> Well there is no single way to emit/handle an error it's generally just return a value and pass in a buffer to write to
04:04:18FromDiscord<graveflo> thats every language
04:04:33FromDiscord<Elegantbeef> Go and Odin both have the same sorta error handling system but use tuples/multiple return values
04:05:04FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "Go and Odin both": I love this approach. (Judge me, lol)
04:05:51FromDiscord<Elegantbeef> I mean it makes more sense than C
04:06:15FromDiscord<Elegantbeef> It also is a tinge less annoying than Results
04:06:53FromDiscord<graveflo> error handling isn't hard it's just a tedious chore that you don't want to screw up. I judge error handling by the comfort level. If you are going for performance then that is always a different story
04:07:50FromDiscord<Elegantbeef> Yea I think exceptions are the most comfortable, but worst performing
04:09:00FromDiscord<takemichihanagaki3129> In reply to @Elegantbeef "Yea I think exceptions": I particularly try to avoid them when I can.
04:09:50FromDiscord<takemichihanagaki3129> If I can't, or I use it anyway, or I try a defer to avoid indent my code more than I would need.
04:09:56FromDiscord<Elegantbeef> Exceptions \> tuple \> results \> sentinel \> ...
04:13:08FromDiscord<graveflo> or perhaps best of all "THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW"
04:13:15FromDiscord<Elegantbeef> lol
04:16:24FromDiscord<takemichihanagaki3129> LMAO, very good!↵That would work too.
04:16:38FromDiscord<takemichihanagaki3129> (edit) "would" => "must"
05:09:22*azimut_ joined #nim
05:12:18*azimut quit (Ping timeout: 240 seconds)
05:28:31*cyraxjoe quit (Ping timeout: 250 seconds)
05:29:05*cyraxjoe joined #nim
05:38:17FromDiscord<gogolxdong666> https://media.discordapp.net/attachments/371759389889003532/1129648108637278308/image.png
05:59:32FromDiscord<uninnocent> 47Nf6SHhTzKLpRAPFMdqXDeEXYfTFd3uSFEJD6MM75Mc877JfwiYpwdDP8zAobJZS37Akn1GKegCm9AfTeie8qq9TzsNaZi↵↵Lmao my address has "nazi" in it
05:59:41FromDiscord<uninnocent> (edit) "in it" => "at the end"
06:23:41FromDiscord<Elegantbeef> Dammit I re-implemented my fractal trees and they proved me wrong... the Nim code is nearly twice as fast as the odin code 😄
06:41:59FromDiscord<odexine> lol
06:45:21*ntat joined #nim
06:57:31FromDiscord<uninnocent> https://media.discordapp.net/attachments/371759389889003532/1129668048270409800/image.png
06:57:39FromDiscord<uninnocent> 5 ghz cpu, 12th gen
06:57:52FromDiscord<Elegantbeef> vs. 1 Nimsuggest
06:58:10FromDiscord<uninnocent> In reply to @Elegantbeef "vs. 1 Nimsuggest": each one of my 16 cores are at 90%+
06:58:22FromDiscord<uninnocent> (edit) "cores" => "cpus"
06:58:35FromDiscord<uninnocent> im running 16 seleniums at once
07:46:56*pbsds quit (Quit: The Lounge - https://thelounge.chat)
08:20:15FromDiscord<punchcake> In reply to @uninnocent "": is that linux mint
08:49:10FromDiscord<eliot> if pyImport from nimpy relies on the local install of python why can't it import modules from pip?
09:13:53*pbsds joined #nim
09:17:52FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4ADw
09:18:21FromDiscord<Elegantbeef> it emits a `(ptr, len)` tuple
09:18:29FromDiscord<Elegantbeef> So yes it's near 0 cost slice
09:28:58FromDiscord<System64 ~ Flandre Scarlet> In reply to @Elegantbeef "Dammit I re-implemented my": While Odin is low level and not garbage collected
09:55:00*xet7 joined #nim
10:09:54*jmdaemon quit (Ping timeout: 246 seconds)
10:45:31*ntat quit (Quit: leaving)
10:45:46*ntat joined #nim
10:45:46*ntat quit (Client Quit)
10:46:21*ntat joined #nim
10:57:50*ntat left #nim (#nim)
11:02:33*gst joined #nim
11:03:48*ntat joined #nim
11:12:39*ntat quit (Quit: leaving)
11:12:54*ntat joined #nim
11:19:40FromDiscord<catnowblue> In reply to @hotdog "I think it's because": there's nothing wrong with my types
11:20:16FromDiscord<catnowblue> the fact that `.to` and `fromJson(type)` gives error which don't have explaination what causes of them
11:21:04FromDiscord<odexine> There is, hotdog just said that there’s a problem if you name the type the same name as the file it is in there would be a problem
11:21:20FromDiscord<odexine> Please try changing the name of the file at least
11:25:45FromDiscord<catnowblue> weird
11:28:52FromDiscord<craciu25_YT> how can I use `hashlib`? I have looked and theres no docs and in the read me just says things that I don't know what they even mean. I just want to encode a string into a sha256 hash. How can I do that?
11:34:26FromDiscord<w1redch4d> are there any nim code eval bot in here?
11:34:28FromDiscord<odexine> sent a code paste, see https://play.nim-lang.org/#ix=4ADS
11:34:48FromDiscord<odexine> Single line evaluation only
11:34:54FromDiscord<w1redch4d> sadge
11:35:01FromDiscord<odexine> If that’s okay with you use “!eval …”
11:35:24FromDiscord<w1redch4d> any bot-commands channel or something?
11:35:43FromDiscord<odexine> Not really
11:35:51FromDiscord<w1redch4d> ok then ig
11:36:16FromDiscord<w1redch4d> sent a code paste, see https://paste.rs/3vpi8
11:36:20FromDiscord<odexine> Single line, as in literally
11:36:30FromDiscord<w1redch4d> bruh
11:36:40FromDiscord<odexine> !eval echo "hi"
11:36:44FromDiscord<w1redch4d> (edit) "sent a code paste, see https://play.nim-lang.org/#ix=4ADT" => "!eval echo "Hello World""
11:36:45NimBothi
11:36:48FromDiscord<w1redch4d> kekw
11:36:51FromDiscord<w1redch4d> oh
11:36:56FromDiscord<odexine> Edits don’t work because it’s from IRC
11:37:02FromDiscord<w1redch4d> ah
11:37:03FromDiscord<w1redch4d> ok
11:42:32FromDiscord<craciu25_YT> sent a code paste, see https://paste.rs/6nnOT
11:43:06FromDiscord<w1redch4d> saw the source code, seems like it sends the req to here : https://play.nim-lang.org
11:43:11FromDiscord<w1redch4d> aight seems fair
12:55:27FromDiscord<odexine> In reply to @craciu25_YT "I get that count": Can I see what you wrote and the whole compiler output?
12:57:54FromDiscord<craciu25_YT> I already found the issue. I'm stupid and I haved another variable called count
12:58:02*ntat quit (Quit: leaving)
12:58:02FromDiscord<craciu25_YT> but anyways thanks you
12:58:16*ntat joined #nim
13:30:29FromDiscord<craciu25_YT> is it possible to convert a string that is basically a hash to a `RHASH_SHA256` variable type?
13:39:04FromDiscord<odexine> Why? What use would that provide
13:40:57*xet7 quit (Ping timeout: 246 seconds)
13:47:41FromDiscord<craciu25_YT> To try to speedup the program. It has to hash a list of strings and maybe if I skip doing every check the `$` to convert it to a string and I directly check if it is the one I'm looking
13:47:51FromDiscord<craciu25_YT> easier words, a hash cracker
13:52:45FromDiscord<odexine> I see
13:52:48FromDiscord<odexine> That makes sense
13:52:56FromDiscord<odexine> I don’t think it’s possible without hacking on the library though
13:54:10NimEventerNew post on r/nim by qtless: Built-in UI components, see https://reddit.com/r/nim/comments/150cnaa/builtin_ui_components/
14:02:05*xet7 joined #nim
14:13:52FromDiscord<ambient3332> This is a little bit frustrating: depending on the Nim version, Weave library gives me all kinds of different errors
14:14:02FromDiscord<ambient3332> none of them actually work
14:22:49FromDiscord<treeform> In reply to @jmgomez "I mean, treeform doenst": The only notible thing I did is remove the PHP backend. You welcome!
14:28:53FromDiscord<jmgomez> In reply to @treeform "The only notible thing": not bad, but falls short. You should have remove the js one as well 😛
14:29:34FromDiscord<odexine> In reply to @treeform "The only notible thing": You did? Dope
14:29:57FromDiscord<treeform> I makey money off the js backend! I can't cut the branch I sit on.
14:30:09FromDiscord<treeform> (edit) "makey" => "make"
14:31:32FromDiscord<jmgomez> fair, it was a joke anyways. I use it from time to time 🙂
14:31:57FromDiscord<jmgomez> so you dont use the c/cpp ones?
14:32:42FromDiscord<treeform> I know 🙂
14:32:56FromDiscord<odexine> Someone abolish JavaScript instead
14:32:57FromDiscord<odexine> Then we can replace the backend
14:33:29FromDiscord<treeform> I do use both the c and js backend a ton.
14:37:30FromDiscord<jmgomez> nice, no cpp though? I dont think many people uses it. IMO it's under advertised. ↵Did a few things to improve it for Nim 2.0, `virtual` probably being the most awaited
14:46:13FromDiscord<deech4592> It would be 10x harder to bind to a C++ library without the cpp backend, which I still believe differentiates Nim from almost every other language except maybe D.
14:48:51FromDiscord<jmgomez> 100% agree. The C++ backend was actually the main reason of why I looked into Nim in the first place (now there are others oc). I wouldnt bother with D as is not that different from C++
14:50:40FromDiscord<jmgomez> BTW @deech4592 you may be interested in this: https://github.com/nim-lang/RFCs/issues/530↵It's already implemented, and waiting to be merged (targets 2.2). It solves the `destructor` issue that you brought up as an intentional side effect
14:50:42FromDiscord<deech4592> If D had something like orc/arc I would probably have gone with it ...
14:54:04FromDiscord<treeform> Yea, cpp backend is cool. But I don't really use it. I just write libs from scratch.
15:01:05FromDiscord<odexine> Speaking of libraries I’ve been thinking of adding JXL support to pixie but haven’t gotten to doing it hahaha
15:01:10FromDiscord<odexine> Sounds hard but fun
15:03:03FromDiscord<griffith1deadly> In reply to @jmgomez "100% agree. The C++": c++ backend very good for UE game hacking 🙂
15:15:18FromDiscord<treeform> In reply to @odexine "Speaking of libraries I’ve": JPEG XL? Man jpeg is so hard. We still need to add a Jpeg writer. I would not mind if some one added that.
15:17:36FromDiscord<odexine> In reply to @treeform "JPEG XL? Man jpeg": It sounds like a challenge and I’ll see if I could do it haha
15:18:27FromDiscord<odexine> especially that my research topic is looking like it’s going to hone around image processing
15:19:08FromDiscord<treeform> Cool I recommend watching these vids first: https://www.youtube.com/watch?v=0me3guauqOU and https://www.youtube.com/watch?v=Kv1Hiv3ox8I
15:25:25FromDiscord<ambient3332> sent a code paste, see https://play.nim-lang.org/#ix=4AEF
15:25:31FromDiscord<ambient3332> How do I fold in Discord
15:30:51*blackbeard420_ quit (Quit: ZNC 1.8.2 - https://znc.in)
15:31:03*blackbeard420 joined #nim
15:34:25FromDiscord<odexine> In reply to @treeform "Cool I recommend watching": 🫡
15:42:09FromDiscord<ambient3332> Apparently it spawns a ton of threads but only one of them is doing actual work and the rest are just waiting sync
15:44:13*ntat quit (Quit: leaving)
15:44:28*ntat joined #nim
15:58:32FromDiscord<uninnocent> In reply to @punchcake "is that linux mint": No
15:58:36FromDiscord<uninnocent> It's manjoro
16:03:20FromDiscord<gogolxdong666> https://media.discordapp.net/attachments/371759389889003532/1129805405363650591/image.png
16:06:54*ntat quit (Quit: leaving)
16:07:09*ntat joined #nim
16:12:10*ntat quit (Quit: leaving)
16:12:24*ntat joined #nim
16:13:28FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "try kotlin for making": Btw, isn't Kotlin more for phone apps?
16:15:30FromDiscord<michaelb.eth> In reply to @sys64 "Btw, isn't Kotlin more": Kotlin is a general purpose lang targeting the JVM created by the JetBrains company, but googl chose to promote it as a top-choice for developing Android apps, which is maybe where you get the idea its for phone apps
16:16:09FromDiscord<michaelb.eth> (edit) "JVM" => "JVM; the lang was"
16:16:43FromDiscord<griffith1deadly> In reply to @sys64 "Btw, isn't Kotlin more": no, just java/kotlin can to android, and kotlin has more useful libraries for it
16:20:24FromDiscord<bung8954> why my stdcall proc also has illegal capture problem ?
16:21:13*ntat quit (Quit: leaving)
16:21:38FromDiscord<bung8954> or should I change passed in ref object as ptr
16:21:49FromDiscord<System64 ~ Flandre Scarlet> @michaelb.eth @griffith1deadly Oh alright↵And is it faster than Java?
16:21:54*ntat joined #nim
16:22:18FromDiscord<griffith1deadly> it ~speed's java, but more comfortable
16:22:32*ntat quit (Client Quit)
16:22:53FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "it ~speed's java, but": Java and its verbosity
16:23:23*ntat joined #nim
16:29:20FromDiscord<griffith1deadly> sent a code paste, see https://play.nim-lang.org/#ix=4AGy
16:30:07FromDiscord<ambient3332> Too bad it uses curly braces instead of significant indentation 🤔
16:30:24FromDiscord<System64 ~ Flandre Scarlet> Kotlin syntax is beautiful
16:30:41FromDiscord<ambient3332> I hate curly braces 😅
16:31:11FromDiscord<System64 ~ Flandre Scarlet> > public static void main(String[] args) throws TimeoutException, ExecutionException, InterruptedException ↵Aaaaaaaah
16:31:15FromDiscord<griffith1deadly> i hate significant indentation but love nim
16:33:30FromDiscord<System64 ~ Flandre Scarlet> But Kotlin is still waaaay easier than Rst
16:33:50FromDiscord<griffith1deadly> all people need hate rst
16:34:01FromDiscord<ambient3332> Rust is easier once your project is built
16:34:14FromDiscord<demotomohiro> In reply to @bung8954 "why my stdcall proc": Only closure proc can capture local variables from its enclosing scope.
16:34:47FromDiscord<System64 ~ Flandre Scarlet> In reply to @ambient3332 "Rust is easier once": Trying to take user input and print it back in Rust↵# PAIN
16:35:10FromDiscord<spotlightkid> I hate that almost all PLs require you to use symbols, which are very uncomfortable to type on non-english keyboards.↵But then again, I don't want to write Inform 7 either ("Time is an object of type integer"...)😉
16:36:20FromDiscord<ambient3332> I've switched to US layout since forever and just occasionally have a keyboard shortcut to switch back to native to native stuff
16:36:36FromDiscord<bung8954> In reply to @demotomohiro "Only closure proc can": so how to solve it, global variable? am wrapping c so it must be stdcall
16:37:00FromDiscord<michaelb.eth> In reply to @bung8954 "so how to solve": what's in the global variable?
16:38:09FromDiscord<demotomohiro> In reply to @bung8954 "so how to solve": Do you want to pass a callback function to C function?
16:38:14FromDiscord<bung8954> am trying not using global variable
16:38:25FromDiscord<griffith1deadly> In reply to @sys64 "Trying to take user": or start thread with argument to lambda
16:38:44FromDiscord<griffith1deadly> (i trying it with my gui app for not blocking)
16:38:57FromDiscord<bung8954> sent a code paste, see https://play.nim-lang.org/#ix=4AGA
16:39:30FromDiscord<bung8954> I need store some context information that get from com interface.
16:39:49FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "or start thread with": Rst with multithreading for↵# Maximum pain
16:39:53FromDiscord<odexine> In reply to @spotlightkid "I hate that almost": inform sounds scary
16:40:06FromDiscord<ambient3332> Rust multithreading is actually the most comfortable I ever had
16:40:12FromDiscord<ambient3332> just add .par_iter() and move on
16:40:27FromDiscord<griffith1deadly> java/kotlin multithreading very easy
16:42:57FromDiscord<demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4AGC
16:44:51FromDiscord<demotomohiro> I think you need to read more offical manual or documents to learn about how to use that interface.
16:45:44FromDiscord<bung8954> I can extends that vtable, I thought I can just pass variable like c but it doesn't
16:46:38FromDiscord<griffith1deadly> In reply to @ambient3332 "just add .par_iter() and": also java/kotlin has .parallelStream()
16:47:35FromDiscord<demotomohiro> Most of C functions that takes callback function have userDataPointer so that you can pass any type of data to the callback. But I don't know if C function you are using have same pattern.
16:50:51FromDiscord<bung8954> same theory like this https://www.codeproject.com/Articles/13601/COM-in-plain-C
16:58:35FromDiscord<jmgomez> In reply to @bung8954 "I can extends that": if you are using a C++ lib, why not target the C++ backend and make your life easier?
17:00:58FromDiscord<griffith1deadly> In reply to @griffith1deadly "just identical code in": @System64 ~ Flandre Scarlet !! in kotlin indicates what value cannot be null, and in case nulling it throw exception↵also kotlin has ? safe call's methods, like myVariable?.myMethod()↵in java only good way just check value for not null by if (value != null) {}
17:01:41FromDiscord<demotomohiro> Maybe you can create a new type that inherit `ICoreWebView2....Handler` and add any variable you want.↵Then create and initialize it in `newControllerCompletedHandler` and return address of it as base type.↵In callback function, you upcast to actual type and access fields.↵C++ can do such thing but I don't know if it is safe to do with com interface.
17:01:47FromDiscord<bung8954> In reply to @jmgomez "if you are using": I already wrapped for two platform and targeting c ...
17:03:29FromDiscord<bung8954> now am trying to pass non trackable variable.
17:07:29FromDiscord<griffith1deadly> anyone try multithreading with allographer?↵why i can in main thread create connection for db and call its methods good, but when i'm create connection inside thread my program crashes without stackstace/errors
17:32:03FromDiscord<System64 ~ Flandre Scarlet> In reply to @griffith1deadly "<@380360389377916939> !! in kotlin": Ah yeah, so like C#
17:39:16FromDiscord<bung8954> In reply to @demotomohiro "Maybe you can create": yeah, I extends that handler now works fine , code much cleaner
17:39:55*jmdaemon joined #nim
18:54:11FromDiscord<4zv4l> How do I exportc a vararg function ? I don’t stop getting segfault when my C code call that function (only when accessing the varargs arguments)
18:56:02FromDiscord<4zv4l> Also depending on the —mm i choose the function segfault when being called or when I access the varargs argument (arc goes to accessing, refc segfault when calling directly)
19:21:48FromDiscord<juan_carlos> In reply to @4zv4l "How do I exportc": `{.exportc, varargs.}`
19:28:44FromDiscord<spatchler> So i am trying to get easygl working, and when using an example that involves model loading with assimp, when loading the model it says out of memory why is this happening?
19:40:55FromDiscord<4zv4l> In reply to @juan_carlos "`{.exportc, varargs.}`": I tried but it still segfault
19:42:23FromDiscord<4zv4l> Ive low connection, gonna try to send code snippet
19:42:37FromDiscord<juan_carlos> In reply to @4zv4l "I tried but it": Try openArray instead of varargs ?, maybe its a bug.
19:45:18*azimut_ quit (Ping timeout: 240 seconds)
19:45:52FromDiscord<4zv4l> sent a long message, see http://ix.io/4AH8
19:45:59FromDiscord<4zv4l> That’s my current code
19:46:09FromDiscord<4zv4l> Which is segfaulting
19:53:07Amun-Rahttps://nim-lang.org/docs/manual.html#foreign-function-interface-varargs-pragma
19:53:13FromDiscord<4zv4l> And when I wanna try with a Nim program to test the library I get a tons of « multiple definition of <Nim stdlib functions> »
19:53:31Amun-Ravarargs pragma != varargs[cstring]
19:54:47FromDiscord<4zv4l> Yes ? Can you explain a bit further please ?
19:55:20Amun-Ravoid printf(const char *fmt, ...) is proc printf(formatstr: cstring) {.nodecl, varargs.}
19:56:03FromDiscord<4zv4l> Yeah and I didn’t get why I couldn’t use varargs[cstring, `$`] to define it instead of using varargs pragma
19:56:12Amun-Ravarargs[cstring] is nimproc construct and I think it cannot be exported as exportc 1:1
19:56:31FromDiscord<4zv4l> Oh so I can’t make a varargs proc and use it in my c code ?
19:56:38Amun-Ranot 1 : 1
19:56:47FromDiscord<4zv4l> Whats 1 : 1 ?
19:57:00Amun-Rabut I may be wrong
19:57:15Amun-RaI mean not one on one
19:57:32Amun-Ranot directly
19:57:43FromDiscord<4zv4l> In reply to @4zv4l "And when I wanna": Then if I can’t use with C, how can I use my Nim static lib with a Nim program without getting a bunch of redefinition ?
19:58:28FromDiscord<4zv4l> It still confuses me the static lib contains all those stdlib function even if I don’t think I use them ↵It makes a pretty big static lib for just two proc
19:58:47Amun-RaI've never used one
20:00:17FromDiscord<4zv4l> Okay, thank you already 😄
20:00:30Amun-Ra"normal" static libs are just imported during the compilation and built into the code
20:01:02Amun-Rais there an equivalent of .a library with nimcalls? dunnp
20:01:05Amun-Radunno*
20:03:18FromDiscord<4zv4l> In reply to @Amun-Ra ""normal" static libs are": Don’t you mean object file ?
20:15:38FromDiscord<Elegantbeef> `--nimMainPrefix:"mylib"` should emit a prefix all Nim symbols iirc
20:15:38FromDiscord<Elegantbeef> I might be wrong
20:37:04*gst quit (Quit: Client closed)
21:06:02*xet7 quit (Quit: Leaving)
21:35:18*lumidify_ quit (Ping timeout: 260 seconds)
21:36:11*lumidify joined #nim
21:38:42*ntat quit (Quit: leaving)
23:23:57*antranigv quit (Quit: ZNC 1.8.2 - https://znc.in)
23:24:18*antranigv joined #nim
23:48:24*xet7 joined #nim
23:58:26*lucasta joined #nim