00:03:41 | FromDiscord | <Elegantbeef> You did load the script as a module? |
00:03:45 | * | cfa left #nim (#nim) |
00:04:13 | FromDiscord | <Elegantbeef> like `createInterpeter("exposed"` |
00:08:28 | FromDiscord | <jmgomez> hmm no, Im just pointing to a file |
00:09:21 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimscripter/blob/master/src/nimscripter.nim#L81-L90 |
00:09:21 | FromDiscord | <Elegantbeef> might help |
00:11:18 | FromDiscord | <jmgomez> ok, I was doing it wrong what gets override is the whole module I thought it was per proc basis |
00:11:33 | FromDiscord | <jmgomez> Nice, will definitely take a look |
00:15:29 | FromDiscord | <jmgomez> hmm got a `Error: deref unsupported ptr type: ("ptr TestType", tyPtr)` is deref not supported? |
00:16:16 | FromDiscord | <Elegantbeef> The VM doesnt support the entire Nim language so yea likely |
00:17:20 | FromDiscord | <jmgomez> hmm, ok |
00:17:46 | FromDiscord | <Elegantbeef> If you think you're going to be capable of sending a Nim pointer to the VM and dereferencing it you're dead wrong |
00:17:58 | FromDiscord | <Elegantbeef> NimVM objects are PNodes |
00:18:39 | FromDiscord | <Elegantbeef> So to the NimVm a `ptr object` is an address to a `Pnode` |
00:19:52 | FromDiscord | <Elegantbeef> If curious the way that Nimscripter does interop is to deep copy all types |
00:20:31 | FromDiscord | <Elegantbeef> And for slightly obvious reasons it does not support `ptr T` by default |
00:21:00 | FromDiscord | <Elegantbeef> Insert your crying here 😛 |
00:22:16 | arkanoid | how can I read a larger list of "trending packages" in https://nimble.directory/ ? I'm tend to come and go to nim, and often I find myself out of the loop when I come back. A refresh of whats new, and what is old but now is much stronger and relevant, would be good |
00:22:54 | FromDiscord | <jmgomez> xD |
00:23:26 | FromDiscord | <Elegantbeef> write your own code that queries the Nim package registry and gets the growth rate, preferably in Nim |
00:24:46 | FromDiscord | <hotdog> In reply to @arkanoid "how can I read": GitHub advanced search can probably get you something vaguely similar. It won’t get you packages that aren’t on GitHub though |
00:25:16 | FromDiscord | <Elegantbeef> It is just using the package registry, sort by most recently update, then store in a list |
00:25:18 | FromDiscord | <hotdog> Search for nim lang repos that have updates in the last month, ordered by stars. Something like that |
00:27:04 | FromDiscord | <jmgomez> Im just poking around to see where the limitations are. Was able to pseudo pass the type by deref it to a primitive one. I know that's not taking me too far anyways, let's see if I end up using that or something else if I want scripting.. comp times are quite fast though < 4/5 for minor changes so this is mostly driven by curiosity |
00:27:49 | FromDiscord | <Elegantbeef> Yea the limitations will mostly be that it's a nigh impossible to do 0 cost interop |
00:28:23 | FromDiscord | <Elegantbeef> Nim VM is quite a limited VM, but also it stores objects in a specific way, so to do this interop you need to do something like Nimscripter |
00:28:33 | FromDiscord | <jmgomez> I dont really care much about the cost though, not planing to ship anything in NimScript |
00:28:56 | FromDiscord | <Elegantbeef> On the plus side my interop is written in a way that is purely modularized and generic |
00:28:56 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimscripter/blob/master/src/nimscripter/vmconversion.nim |
00:29:09 | FromDiscord | <Elegantbeef> This means you can relatively easily do interop even if you do not use nimscripter's frontend |
00:30:53 | FromDiscord | <jmgomez> Nice, I may end up using it anyways, I just want to understand the "raw" vm before using something on top of it |
00:31:25 | FromDiscord | <Elegantbeef> Yea there are limitations though with nimscripter, presently i do not allow implementing more than one module |
00:31:52 | FromDiscord | <Elegantbeef> Also my `parseObject` macro is awful 😄 |
00:34:12 | FromDiscord | <Elegantbeef> Speaking of issues @elcritch still waiting for a min repro on std/pegs |
00:36:08 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4pJR |
00:36:31 | FromDiscord | <Elegantbeef> It's impossible to |
00:36:46 | FromDiscord | <Elegantbeef> I say impossible, but i mean it's night impossible 😄 |
00:36:54 | FromDiscord | <Elegantbeef> The VM does not operate on actual binary data |
00:38:17 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4pJU |
00:39:18 | FromDiscord | <Elegantbeef> A `ptr TestType` is actually a `nkNodeAddr` which is the address of a `PNode` |
00:39:28 | FromDiscord | <Elegantbeef> I guess it's a `rkNodeAddr` |
00:39:57 | FromDiscord | <Elegantbeef> The NimVm is not written in a way for this stuff, I know the nimskull VM has been changed, but do not know if it addresses this either |
00:40:00 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4pJV |
00:40:59 | arkanoid | elegantbeef, surely, but it's not sufficient to get something like https://lib.rs/std |
00:41:03 | FromDiscord | <Elegantbeef> What type is `c`? |
00:41:11 | FromDiscord | <jmgomez> (edit) "https://play.nim-lang.org/#ix=4pJV" => "https://play.nim-lang.org/#ix=4pJW" |
00:41:21 | FromDiscord | <jmgomez> just update the snippet, `ptr int ` |
00:42:21 | FromDiscord | <jmgomez> Im just passing the direction of A to the VM and resolving it inside and the values are ok |
00:44:04 | FromDiscord | <hotdog> In reply to @arkanoid "<@145405730571288577>, surely, but it's": They track downloads, nimble doesn’t |
01:10:07 | * | azimut_ joined #nim |
01:10:41 | * | azimut quit (Ping timeout: 255 seconds) |
01:18:28 | FromDiscord | <Elegantbeef> I mean isnt that just like awesome nim or whatever |
01:18:31 | FromDiscord | <Elegantbeef> I believe pointers to primitives are actually just pointers to primitives |
01:18:31 | FromDiscord | <Elegantbeef> Pointers to objects are pointers to Pnodes |
01:25:50 | FromDiscord | <jmgomez> haha I know, I know, just trying to understand what can be done and actually it can be enough like that |
01:28:08 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4pK0 |
01:28:59 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4pK1 |
01:31:08 | FromDiscord | <ringabout> on the devel branch, is not supported fro better performance. |
01:31:21 | FromDiscord | <ringabout> (edit) "fro" => "for" |
01:31:45 | FromDiscord | <ringabout> You should add a nimble file and specify its package name. |
01:32:23 | FromDiscord | <ringabout> In reply to @ringabout "on the devel branch,": From O(n) to O(1) for per registered rountine, |
01:35:02 | FromDiscord | <jmgomez> ok, like one file for all? that should be fine |
01:36:57 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4pK3 |
01:38:47 | FromDiscord | <Elegantbeef> wait does this mean I now need to emit a nimble file for nimscripter?! |
01:40:41 | FromDiscord | <ringabout> probably, it requires a package name. |
01:41:37 | FromDiscord | <Elegantbeef> Well that's a bitch |
02:02:22 | * | User11 joined #nim |
02:40:09 | * | User11 quit (Quit: WeeChat 3.8) |
02:41:45 | * | onetwo quit (Read error: Connection reset by peer) |
02:44:27 | * | onetwo joined #nim |
03:50:16 | * | derpydoo joined #nim |
04:53:14 | * | rockcavera quit (Remote host closed the connection) |
04:56:26 | * | arkurious quit (Quit: Leaving) |
06:47:45 | * | nyeaa492842301 joined #nim |
06:48:10 | * | attah_ joined #nim |
06:49:04 | * | ltriant_ joined #nim |
06:50:10 | * | ltriant quit (Ping timeout: 260 seconds) |
06:53:33 | FromDiscord | <ringabout> Hey beef, My PR keeps the passes for backward compatibility => https://github.com/nim-lang/Nim/pull/21444?notification_referrer_id=NT_kwDOApCZSbM1NzIyNTU5NDM2OjQzMDMwODU3¬ifications_query=is%3Aunread#discussion_r1123918235 |
06:54:10 | FromDiscord | <Elegantbeef> Yea i was just curious if it completely ruined tooling or if one can still use the compiler as a library |
06:54:34 | FromDiscord | <Elegantbeef> So I guess I await what nimsuggest and friends do |
06:55:07 | FromDiscord | <ringabout> nimsuggest can reuse the new API because it only needs semantic checking. |
06:55:17 | * | derpydoo quit (*.net *.split) |
06:55:17 | * | jmdaemon quit (*.net *.split) |
06:55:18 | * | nyeaa49284230 quit (*.net *.split) |
06:55:18 | * | cornfeedhobo quit (*.net *.split) |
06:55:18 | * | attah quit (*.net *.split) |
06:55:18 | * | madprops quit (*.net *.split) |
06:55:18 | * | Ekho quit (*.net *.split) |
06:55:18 | * | krydos quit (*.net *.split) |
06:55:18 | FromDiscord | <ringabout> Since I haven't figured out how to interface with the new API from external libraries. Until then, I keep them. |
06:55:23 | * | attah_ is now known as attah |
06:55:37 | FromDiscord | <Elegantbeef> Well that's what my silly C header generator will need |
06:55:37 | FromDiscord | <ringabout> Probably I need to store the final node somehwere like what ic does. |
06:55:52 | FromDiscord | <Elegantbeef> Perhaps it needs the transformed code |
06:55:57 | FromDiscord | <Elegantbeef> Hmmm doesnt really matter though |
06:56:43 | FromDiscord | <ringabout> That's glad to hear. |
06:56:53 | * | derpydoo joined #nim |
06:56:53 | * | jmdaemon joined #nim |
06:56:53 | * | cornfeedhobo joined #nim |
06:56:53 | * | Ekho joined #nim |
06:56:53 | * | madprops joined #nim |
06:56:53 | * | krydos joined #nim |
06:57:56 | FromDiscord | <ringabout> I'm working on community building these few days. It works pretty well. The workflow of packages will be improved since the mod team has grown. |
07:14:10 | * | Notxor joined #nim |
07:20:42 | FromDiscord | <Phil> I just realized I'm now affected as one of the guys using the compiler as a library |
07:21:18 | FromDiscord | <Phil> Damn, stuff just happens when you use nimble as a lib |
07:21:59 | FromDiscord | <ringabout> In reply to @Isofruit "I just realized I'm": Which parts are you using? |
07:22:02 | * | Notxor quit (Quit: Leaving) |
07:22:34 | FromDiscord | <Phil> only really what interacts with nimble |
07:22:50 | FromDiscord | <Phil> I'd need to check for specifics later (can't atm, I'm at work) |
07:22:53 | FromDiscord | <ringabout> nimble is not a part of the compiler api. |
07:23:06 | FromDiscord | <Phil> Nimble for some reason requires the compiler as lib though |
07:23:35 | FromDiscord | <Phil> Not in its nimble file, but at least when I tried working with it and importing stuff from it I suddenly needed to also import the compiler.↵I'll check that again later |
07:25:04 | FromDiscord | <ringabout> Yeah, confirmed. But I would say that nimble pollutes the compiler 😜 |
07:25:34 | FromDiscord | <Phil> I haven't worked in the nimble codebase, I wouldn't kow xP |
07:26:12 | * | advesperacit joined #nim |
07:39:11 | * | kenran joined #nim |
07:39:12 | * | derpydoo quit (Ping timeout: 248 seconds) |
07:40:18 | * | Notxor joined #nim |
07:41:36 | * | Notxor quit (Client Quit) |
07:42:40 | * | kenran quit (Remote host closed the connection) |
08:07:10 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pL8 |
08:16:24 | * | xet7 quit (Quit: Leaving) |
08:23:35 | * | azimut_ quit (Ping timeout: 255 seconds) |
08:34:29 | FromDiscord | <Phil> Best I can say that it appears to not be finding the header file of your imgui lib |
08:34:37 | FromDiscord | <Phil> (edit) "Best I can say ... that" added "is" |
08:34:55 | FromDiscord | <Phil> (edit) "the" => "the/a" |
08:35:08 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "Best I can say": I indicated the path https://media.discordapp.net/attachments/371759389889003532/1081132637822918656/image.png |
08:35:41 | FromDiscord | <ShalokShalom> In reply to @jtv "That's certainly more intuitive.": The whole Internet thinks, opposed to you, that Javascript is a weakly typed language↵↵And also by the standard that you agree on, that strongly typed means "to be able to enforce real constrains on the type level" is JavaScript not strongly typed |
08:35:46 | FromDiscord | <ShalokShalom> https://www.bing.com/search?q=javascript%20weakly%20typed&pc=MOZB&form=MOZMBA |
08:35:54 | FromDiscord | <Phil> And you're a thousand percent sure that this relative path is correct and also relative to the place that you think it is relative to? |
08:36:23 | FromDiscord | <System64 ~ Flandre Scarlet> It's relative to the file |
08:43:30 | * | filcuc joined #nim |
08:43:54 | filcuc | what GC_ref /unref are supposed to do with nim gc orc/arc ? |
08:44:11 | FromDiscord | <Elegantbeef> The same they do in refc, increment/decrement the ref count |
08:44:32 | FromDiscord | <ringabout> except it doesn't sypport strings/seqs |
08:44:36 | filcuc | thanks |
08:44:37 | FromDiscord | <ringabout> (edit) "sypport" => "support" |
08:46:56 | filcuc | in some of the NimQml base classes i've marked methods with LockLevel unknown...since i don't know the final client implementation. However if a client implement some of them without any lock level i still get Warning: method has lock level 0, but another method has <unknown> [LockLevel] |
08:53:44 | * | NimBot joined #nim |
08:54:27 | filcuc | ok i'm spamming but what's the best way for turning off unused hints from a block...basically i would like to leave some procs in a module because i could need that code but i don't want to warn users about them |
08:54:42 | filcuc | something like maybe_unused of C++ |
08:56:24 | FromDiscord | <ringabout> `push` might work. |
08:59:51 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @ringabout "except it doesn't support": So it can't be GC'ed? |
09:07:11 | * | filcuc_ joined #nim |
09:09:44 | * | filcuc quit (Ping timeout: 252 seconds) |
09:09:44 | * | filcuc_ is now known as filcuc |
09:36:54 | * | ixmpp joined #nim |
10:02:57 | * | filcuc_ joined #nim |
10:05:56 | * | filcuc quit (Ping timeout: 260 seconds) |
10:05:56 | * | filcuc_ is now known as filcuc |
10:07:45 | * | kenran joined #nim |
10:23:19 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Isofruit "And you're a thousand": path is relative to the file I compile or relative to the file? |
10:23:27 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "file?" => "file that includes the header??" |
10:27:24 | FromDiscord | <Phil> In reply to @System64 "path is relative to": I am not sure, could be that, could be that it is relative to the root-file you're compiling |
10:28:06 | FromDiscord | <Phil> I'm not insanely knowledgeable, but in terms of path's I'd start playing around or seeing if you can somehow get any kind of guarantee how path-fetching works, write minimal examples or the like |
10:28:18 | FromDiscord | <Phil> And once you know, write a self answered SO question to share this knowledge with the world! |
10:28:35 | FromDiscord | <Phil> @demotomohiro May also know though, he is pretty knowledgeable about C-interop |
10:28:59 | FromDiscord | <System64 ~ Flandre Scarlet> Good to know↵My code only imports the module |
10:37:05 | * | filcuc quit (Ping timeout: 260 seconds) |
10:48:22 | FromDiscord | <firasuke> sent a code paste, see https://play.nim-lang.org/#ix=4pMq |
10:54:33 | FromDiscord | <Rika> Hard to tell what kind of data structure is best fitting without knowing how you use it |
10:54:41 | FromDiscord | <Rika> Other than appending, what else is needed |
10:56:32 | * | jmdaemon quit (Ping timeout: 248 seconds) |
10:57:04 | FromDiscord | <firasuke> it's for dependency resolving |
10:57:34 | FromDiscord | <firasuke> values on the left are names, values on the right are an array of dependencies as strings |
10:59:13 | FromDiscord | <Rika> So a graph |
11:00:45 | NimEventer | New thread by pp: Help with a simple gstreamer application, see https://forum.nim-lang.org/t/9966 |
11:02:20 | FromDiscord | <firasuke> In reply to @Rika "So a graph": oh it's called a graph, ok, yeah that's what it is |
11:03:57 | FromDiscord | <firasuke> so how do you append to a graph? |
11:07:50 | FromDiscord | <demotomohiro> In reply to @System64 "path is relative to": If I remember correctly, path is relative to the file that includes the header. |
11:10:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "If I remember correctly,": Ah alright, so why it isn't working in my case? |
11:11:01 | FromDiscord | <Rika> In reply to @firasuke "oh it's called a": It’s more of that you want to represent a graph into a data structure; there are many ways to do so↵Appending to your current structure is essentially adding an edge between nodes for a graph (to aid in your searching) |
11:11:44 | FromDiscord | <demotomohiro> In reply to @System64 "Ah alright, so why": Are you sure these header files actually exists? |
11:15:41 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Are you sure these": yes |
11:16:05 | FromDiscord | <System64 ~ Flandre Scarlet> https://github.com/system64MC/SysNimgl↵This is what I try to use |
11:25:55 | FromDiscord | <firasuke> In reply to @Rika "It’s more of that": oh ok thanks, any pseudocode I can refer to that is relevant to my example above? |
11:27:09 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pME |
11:27:53 | FromDiscord | <demotomohiro> In reply to @System64 "yes": I tried to compile your code but got error. It seems this path is wrong https://github.com/system64MC/SysNimgl/blob/61ebe90d3df8d580ed000f4d7d187ad545d22f51/src/nimgl/imnodes.nim#L22 |
11:28:22 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "I tried to compile": Did you cloned with --recursive? |
11:28:27 | FromDiscord | <demotomohiro> yes |
11:29:26 | FromDiscord | <System64 ~ Flandre Scarlet> Wait a second |
11:31:19 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "yes": Just commited, does it work now? |
11:34:42 | FromDiscord | <demotomohiro> I got same compile error you posted. |
11:35:04 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pMG |
11:35:48 | FromDiscord | <demotomohiro> yes |
11:36:29 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "yes": I have no idea how to solve this↵I tried relative paths and so on, nothing work |
11:49:24 | * | filcuc joined #nim |
11:52:08 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4pMJ |
11:52:53 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "Adding include dir to": So I need to put this code? |
11:55:14 | FromDiscord | <demotomohiro> yes |
11:55:54 | FromDiscord | <System64 ~ Flandre Scarlet> seems it removed one fatal error |
11:58:06 | FromDiscord | <demotomohiro> These .cpp files include files in imgui and imnodes repo has a copy of imgui source code.↵These -I compile flags adds include directory `private/cimnodes/imnodes/dependencies/imgui-1.84.2` so that .cpp files can find header files in imgui. |
11:58:48 | FromDiscord | <System64 ~ Flandre Scarlet> Oh alright↵But why do I still have 2 errors? |
12:02:56 | FromDiscord | <demotomohiro> In reply to @System64 "Oh alright But why": `nimgl/private/ncimnodes.h` includes header files in other directory. |
12:03:56 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "`nimgl/private/ncimnodes.h` includes header files": And this is what causes the errors? |
12:04:15 | FromDiscord | <demotomohiro> I think so |
12:06:33 | * | ltriant_ quit (Ping timeout: 268 seconds) |
12:06:43 | NimEventer | New post on r/nim by thindil: [Nim Blog] This Month with Nim: February 2023, see https://reddit.com/r/nim/comments/11gz246/nim_blog_this_month_with_nim_february_2023/ |
12:07:53 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pMT |
12:13:43 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4pMW |
12:15:05 | FromDiscord | <System64 ~ Flandre Scarlet> So I need to add this in the Nim file ? |
12:17:19 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It seems `./private/cimnodes/imnodes/dependencies/i": This is weird, because it's already added in the Nim file |
12:18:42 | FromDiscord | <demotomohiro> sent a code paste, see https://paste.rs/wyJ |
12:20:03 | FromDiscord | <System64 ~ Flandre Scarlet> This is what I did |
12:20:07 | FromDiscord | <demotomohiro> Second parameter of compile pragma is only used to compiling .cpp file in first parameter. |
12:20:30 | FromDiscord | <System64 ~ Flandre Scarlet> I did it, but still have the errors |
12:21:21 | * | filcuc quit (Ping timeout: 268 seconds) |
12:22:23 | FromDiscord | <demotomohiro> According to your compile error message, `private/cimnodes/imnodes/dependencies/imgui-1.84.2` is not in compile options. |
12:24:46 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pN2 |
12:28:17 | FromDiscord | <demotomohiro> Please read source source code that generate that compile error |
12:31:03 | FromDiscord | <demotomohiro> Did you read readme in https://github.com/cimgui/cimnodes/tree/bf28b4d00878a9d81a9b9dc8c2d2a8412482f9de↵? |
12:32:07 | FromDiscord | <demotomohiro> It seems `-DIMNODES_NAMESPACE=imnodes` need to be added to `{.compile("private/cimnodes/cimnodes.cpp"` |
12:32:33 | FromDiscord | <System64 ~ Flandre Scarlet> Oooh alright, will try it |
12:33:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "It seems `-DIMNODES_NAMESPACE=imnodes` need": So I just need to add this as string in the arguments? |
12:33:33 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4pN9 |
12:34:15 | FromDiscord | <Rika> there are better representations for directed graphs than this though, but it takes a while to write the abstraction yourself |
12:34:17 | FromDiscord | <demotomohiro> In reply to @System64 "So I just need": yes |
12:34:19 | FromDiscord | <Rika> this one is simple |
12:35:02 | FromDiscord | <firasuke> In reply to @Rika "it's likely better to": thanks! |
12:39:34 | * | ltriant joined #nim |
12:47:14 | FromDiscord | <jtv> sent a long message, see http://ix.io/4pNa |
12:49:34 | FromDiscord | <jtv> sent a long message, see http://ix.io/4pNb |
13:01:07 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pNi |
13:02:23 | FromDiscord | <System64 ~ Flandre Scarlet> Oh nice... https://media.discordapp.net/attachments/371759389889003532/1081199893747609610/message.txt |
13:07:48 | * | xet7 joined #nim |
13:12:30 | * | azimut joined #nim |
13:13:42 | * | azimut quit (Remote host closed the connection) |
13:14:16 | * | azimut joined #nim |
13:18:22 | * | xet7 quit (Remote host closed the connection) |
13:19:49 | FromDiscord | <System64 ~ Flandre Scarlet> @demotomohiro Do you know how I can solve this please? |
13:22:20 | FromDiscord | <demotomohiro> In reply to @System64 "<@288750616510201856> Do you know": You need to find .cpp/.c files that define these functions and add them with compile pragma. |
13:24:09 | FromDiscord | <System64 ~ Flandre Scarlet> This file I think https://media.discordapp.net/attachments/371759389889003532/1081205370841743440/image.png |
13:24:26 | FromDiscord | <demotomohiro> Probably `-DIMNODES_NAMESPACE=imnodes` is also need to be added to `private/cimnodes/imnodes/imnodes.cpp`. |
13:25:18 | FromDiscord | <demotomohiro> https://github.com/Nelarius/imnodes/blob/e563371cee49eb42da08cca1e0209d30d452c665/imnodes.h#L10 |
13:25:21 | FromDiscord | <System64 ~ Flandre Scarlet> It compiled!! |
13:25:34 | FromDiscord | <demotomohiro> congrats! |
13:26:16 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @demotomohiro "congrats!": But I Have that, should I be worried? https://media.discordapp.net/attachments/371759389889003532/1081205902335549460/message.txt |
13:28:34 | FromDiscord | <demotomohiro> If your program use OpenGL, these libraries need to be linked. |
13:28:54 | FromDiscord | <demotomohiro> But I don't know why you get these errors. |
13:29:10 | FromDiscord | <System64 ~ Flandre Scarlet> The program runs without problems↵And there is no errors since it compiles... And run |
13:29:50 | FromDiscord | <demotomohiro> Then, probably you dont need to care. |
13:30:09 | FromDiscord | <System64 ~ Flandre Scarlet> Who care about warning anyways |
13:30:13 | FromDiscord | <System64 ~ Flandre Scarlet> (edit) "warning" => "warnings" |
13:42:36 | * | rockcavera joined #nim |
13:50:02 | * | filcuc joined #nim |
14:14:26 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pNF |
14:15:26 | * | filcuc quit (Ping timeout: 268 seconds) |
14:37:31 | * | kenran quit (Remote host closed the connection) |
14:47:54 | * | junaid_ joined #nim |
14:52:18 | * | kenran joined #nim |
14:58:53 | * | junaid_ quit (Remote host closed the connection) |
15:12:21 | FromDiscord | <auxym> yeah, Nim's DCE probably removed the header includes if you weren't calling the functions |
15:12:42 | FromDiscord | <auxym> Now you'll need to find that header and make sure it's in gcc's search path |
15:19:58 | FromDiscord | <Nerve> How much of a rabbit hole is it to switch over to musl for static compilation and cross-compilation? |
15:20:07 | * | jmdaemon joined #nim |
15:20:29 | FromDiscord | <Nerve> I need to build an executable for Linux and Windows, and I need compatibility with libzip and libbrotli |
15:20:46 | FromDiscord | <Nerve> (edit) "compatibility with" => "to statically link" |
15:29:00 | FromDiscord | <jtv> It's a PITA |
15:29:49 | FromDiscord | <jtv> A pretty hard, long slog. We started, decided it wasn't worth it |
15:29:55 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "Now you'll need to": I found the header, but I think it's in search path |
15:33:19 | * | jmdaemon quit (Ping timeout: 252 seconds) |
15:57:37 | * | arkurious joined #nim |
15:58:39 | * | kenran quit (Remote host closed the connection) |
16:04:21 | FromDiscord | <Phil> ? What's hard about it ?↵Is static linking singificantly harder than dynamic linking to musl? |
16:04:43 | FromDiscord | <jtv> There are all sorts of places where musl is not actually compatible with glibc |
16:04:45 | FromDiscord | <Phil> I'm mostly asking from the perspective of webdev running the application in an alpine container which contains musl |
16:05:14 | FromDiscord | <Phil> Ah, so the issues likely arise from low level direct interactions with glibc? |
16:05:19 | FromDiscord | <jtv> Yes |
16:06:15 | FromDiscord | <Phil> Check, that's why I encountered little difficulty, at least 2 abstraction levels away from the places that could cause problems |
16:10:25 | FromDiscord | <0xRar> sent a code paste, see https://play.nim-lang.org/#ix=4pOo |
16:16:00 | FromDiscord | <Yepoleb> either set the headers variable of your client instance or use request with headers= |
16:16:44 | FromDiscord | <Yepoleb> you can create a headers object with httpcore's newHttpHeaders |
16:18:07 | * | derpydoo joined #nim |
16:18:49 | FromDiscord | <0xRar> can i get an example ? |
16:37:51 | FromDiscord | <0xRar> this compiled fine but, it seems to have a problem with Bearer .... https://media.discordapp.net/attachments/371759389889003532/1081254117625843852/image.png |
16:41:15 | FromDiscord | <exelotl> try `"Bearer " & client_secret` ? |
16:42:28 | FromDiscord | <0xRar> In reply to @exelotl "try `"Bearer " &": ! ty https://media.discordapp.net/attachments/371759389889003532/1081255280676966420/image.png |
16:42:39 | FromDiscord | <exelotl> 🎉 |
16:44:22 | * | filcuc joined #nim |
16:45:17 | FromDiscord | <auxym> In reply to @System64 "I found the header,": you think? you can use `--verbosity:2` to see which include dir (`-I...`) nim is passing to gcc. If needed you can add extra include dirs via `--cincludes:DIR` |
16:57:50 | FromDiscord | <Ecorous> In the nimble build file, how can I insert the `version` value into another string? |
16:59:59 | FromDiscord | <Ecorous> For example, I'm using a task to build it with other options, and I want to customise the `--out` to include the version |
17:00:19 | FromDiscord | <Ecorous> (edit) "it" => "my project" |
17:19:22 | FromDiscord | <Phil> In reply to @Ecorous "In the nimble build": In the nimble build file and in tasks you're using nimscript and get access to all corresponding utilities |
17:19:24 | FromDiscord | <Phil> Including: https://nim-lang.org/docs/nimscript.html#version |
17:20:02 | FromDiscord | <Phil> inserting version then works like in normal nim, use string concat, or fmt or whatever you want |
17:20:20 | * | derpydoo quit (Ping timeout: 252 seconds) |
17:21:21 | FromDiscord | <Ecorous> I worked it out |
17:21:24 | FromDiscord | <Ecorous> `switch("out", "build/mpcreater_" & version & "_windows_release.exe")` |
17:21:42 | FromDiscord | <Ecorous> I just saw that type |
17:21:49 | FromDiscord | <Ecorous> (edit) "type" => "typo" |
17:22:12 | FromDiscord | <Ecorous> ``--out:"build/mpcreator_" & version & "_windows_release.exe"` didn't work |
17:23:19 | FromDiscord | <Ecorous> ignore the ``` at the start |
17:23:23 | FromDiscord | <Ecorous> huh |
17:23:28 | FromDiscord | <Ecorous> ``` |
17:23:30 | FromDiscord | <Ecorous> that |
17:45:35 | FromDiscord | <iffy (Matt Haggard)> What `--dynlibOverride` value would I pass to statically link this\: `{.dynlib: "libsodium.so(.18|.23)".}`? I've tried "libsodium", and "sodium", but `objdump` still reports the executable is dynamically linked to `libsodium.so.23` |
17:48:21 | * | filcuc quit (Ping timeout: 255 seconds) |
17:51:02 | FromDiscord | <iffy (Matt Haggard)> derp... I guess I need to actually `passL:libsodium.a` |
18:04:56 | FromDiscord | <Hourglass [She/Her]> I should make that bug report |
18:21:01 | FromDiscord | <Hourglass [She/Her]> #github-events and #community-events are the same what |
18:21:16 | * | cm quit (Quit: Bye.) |
18:27:06 | * | cm joined #nim |
18:34:10 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "you think? you can": This is in the nim compile arguments right? |
18:41:19 | FromDiscord | <firasuke> is it possible to pass tables as parameters? I have a recursive function that needs to access a table and update its contents accordingly, |
18:44:34 | FromDiscord | <Rika> Yes it is, you have to mark it as var to change the contents |
18:48:21 | FromDiscord | <firasuke> oh ok thanks |
18:55:03 | * | jmdaemon joined #nim |
18:58:46 | FromDiscord | <Nerve> If I were to make module-level globals using `let`, are those allocated on the heap? |
18:59:02 | FromDiscord | <Nerve> These are `JsonNode` values which can't be compile-time `const` |
19:00:04 | FromDiscord | <ShalokShalom> In reply to @jtv "No, as was discussed": I would simply see strong and weak on a spectrum |
19:12:23 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "you think? you can": It says that https://media.discordapp.net/attachments/371759389889003532/1081293008131084378/message.txt |
19:32:56 | * | filcuc joined #nim |
19:35:57 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=4pP7 |
19:36:21 | FromDiscord | <guttural666> (edit) "https://play.nim-lang.org/#ix=4pP7" => "https://play.nim-lang.org/#ix=4pP8" |
19:40:01 | FromDiscord | <Rika> That’s not how you make a reference |
19:40:17 | FromDiscord | <Rika> And that’s not really possible even if it was |
19:40:56 | FromDiscord | <guttural666> my goal is to give the caller a pointer to an array element really |
19:40:58 | FromDiscord | <guttural666> to read it |
19:41:09 | FromDiscord | <Rika> Can’t be a reference in that case |
19:41:11 | FromDiscord | <guttural666> and I don't want to make a copy, which a return value would I guess |
19:41:22 | FromDiscord | <Rika> Either your array has to store references as elements or you use pointers |
19:42:28 | FromDiscord | <guttural666> changing ref to ptr / addr doesn't work either, at least as a return value |
19:42:45 | FromDiscord | <guttural666> expression has no address, maybe use unsafeAddr^^ |
19:43:22 | FromDiscord | <Rika> Use that then, since you’re using a non var parameter |
19:44:08 | FromDiscord | <guttural666> yep, just realized it has to be var |
19:44:12 | FromDiscord | <guttural666> var works, thanks! |
19:44:32 | FromDiscord | <guttural666> (edit) "var ... works," added "+ ptr/addr" |
19:58:55 | * | filcuc quit (Ping timeout: 268 seconds) |
20:36:22 | FromDiscord | <guttural666> has any of you tried chatGPT, absolutely insane to help learn stuff |
20:38:50 | * | uics joined #nim |
20:41:46 | FromDiscord | <Yepoleb> wtf is a chatgpt |
20:42:32 | om3ga | It generates wrong code lol |
20:44:11 | FromDiscord | <Yepoleb> i can just go on github for that |
20:47:53 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4pPq |
20:48:17 | FromDiscord | <Yepoleb> g++.exe looks funny |
20:49:36 | * | jmdaemon quit (Ping timeout: 248 seconds) |
20:53:35 | * | Notxor joined #nim |
20:57:14 | FromDiscord | <sOkam!> In rough terms, how does the process of compiling a nim app on windows look like?↵Is the user expected to install mingw on its own, or does nimc know how to handle that? |
21:02:49 | FromDiscord | <⚶ Zeno> In reply to @sOkam! "In rough terms, how": can you reword your question ? |
21:03:05 | FromDiscord | <sOkam!> in which way? |
21:03:33 | FromDiscord | <⚶ Zeno> how do you want me to answer the "how does process of compiling a nim app look like in windows" ? |
21:03:39 | FromDiscord | <⚶ Zeno> like in general or ? |
21:04:27 | FromDiscord | <sOkam!> sent a long message, see http://ix.io/4pPx |
21:04:37 | FromDiscord | <sOkam!> afaik nim needs gcc installed, but i don't remember |
21:04:42 | FromDiscord | <sOkam!> i had it installed before |
21:04:58 | FromDiscord | <sOkam!> but i don't know how its usually done in windows, hence the Q |
21:05:08 | FromDiscord | <⚶ Zeno> us as windows user just download mingw then download nim (same stuff as mingw, if u downloaded x64 mingw you download nim x64) from website↵↵and then we just add to path for both and then nim c blabla |
21:05:30 | FromDiscord | <sOkam!> so you build from mingw console? |
21:05:34 | FromDiscord | <⚶ Zeno> atleast thats how i downloaded it |
21:05:51 | FromDiscord | <⚶ Zeno> myself i didnt build, i just got prebuilt binaries |
21:06:21 | FromDiscord | <sOkam!> you build your project from mingw console, or on windows console directly? |
21:06:29 | FromDiscord | <⚶ Zeno> ahi |
21:06:35 | FromDiscord | <⚶ Zeno> windows console |
21:06:44 | FromDiscord | <sOkam!> k so then nimc knows how to resolve mingw |
21:06:48 | FromDiscord | <⚶ Zeno> (edit) "ahi" => "ah" |
21:06:58 | FromDiscord | <⚶ Zeno> ye |
21:07:01 | FromDiscord | <sOkam!> thats not the case in every buildsystem, so that's why i asked |
21:07:08 | FromDiscord | <sOkam!> ty that explains it ✍️ |
21:07:14 | FromDiscord | <⚶ Zeno> np |
21:10:40 | FromDiscord | <guttural666> In reply to @om3ga "It generates wrong code": not really about that, it's about throwing ideas around and getting answers that help you solve your problem |
21:12:26 | om3ga | guttural666 it's still not the AI, but yeah, I agree, huge step forward |
21:13:17 | om3ga | I mean not AI since in my opinion Intelligence means Intellect, that's what such complicated neural networks lacking |
21:13:32 | om3ga | we don't know what the Intellect is |
21:14:59 | FromDiscord | <sOkam!> In reply to @guttural666 "not really about that,": for learning general purpose things that you know literally nothing about, chatgpt is absurdly insane |
21:15:16 | FromDiscord | <sOkam!> because you can guide it to teach you what you lack and dont know how to answer |
21:15:29 | FromDiscord | <guttural666> In reply to @sOkam! "for learning general purpose": yeah, using it for programming ideas, how would you do xy in Nim or any other language |
21:15:34 | FromDiscord | <guttural666> really mind blowing |
21:15:35 | FromDiscord | <sOkam!> people get nitpicky in the details... but that's just the early nature of it. its gonna be huge |
21:15:37 | om3ga | it's good tool for finding information |
21:15:44 | om3ga | and for explanation |
21:15:54 | FromDiscord | <sOkam!> yep, exactly |
21:16:09 | FromDiscord | <guttural666> In reply to @sOkam! "people get nitpicky in": totally agree, my mind was blown today, it's just helping me write my program it's super crazy |
21:16:22 | om3ga | Imagine who will be automated and replaced in future? |
21:16:24 | FromDiscord | <sOkam!> for generating implementation specific, efficient, or overall good code... its definitely lacking. but the overall idea is there, and then you start working from there |
21:16:26 | FromDiscord | <sOkam!> its just insane |
21:16:55 | FromDiscord | <guttural666> In reply to @om3ga "Imagine who will be": gonna take some time for that, sure writing super generic stuff will be automated |
21:17:16 | FromDiscord | <guttural666> look at Squarespace, same trend |
21:17:34 | FromDiscord | <sOkam!> its like a boosted mindmap generator, where it guides you in finding ideas that you might be missing↵it won't develop the ideas for you good enough.... but it can create the branches of the mindmap tree for you to start working on them |
21:17:57 | om3ga | guttural666 , no, teachers will be automated |
21:18:21 | om3ga | software development requires intellect, that tool cant replace good programmer |
21:18:25 | FromDiscord | <guttural666> In reply to @om3ga "<@375727321958580228> , no, teachers": yeah, maybe |
21:18:39 | FromDiscord | <sOkam!> teaching requires intellect |
21:18:42 | FromDiscord | <sOkam!> same thing |
21:18:49 | FromDiscord | <sOkam!> but... for the basics, sure |
21:18:55 | om3ga | not really, I mean not in all cases |
21:19:07 | FromDiscord | <sOkam!> dude, you know nothing about teaching with such a statement |
21:19:16 | om3ga | they have program, and teachers follow that program |
21:19:19 | FromDiscord | <sOkam!> its just as complex as programming |
21:19:28 | FromDiscord | <sOkam!> In reply to @om3ga "they have program, and": that's not good teaching |
21:19:34 | om3ga | who don't want to study will not learn anything |
21:19:41 | FromDiscord | <sOkam!> thats mindless teaching. mindless programming is already achieved by the ai |
21:19:41 | FromDiscord | <guttural666> explaining basics really bogs down efficiency, this is gonna boost that immediately, I see how people are annoyed at my stupid questions about Nim haha |
21:19:50 | om3ga | sOkam! yes, but this is our reality |
21:20:10 | FromDiscord | <guttural666> allows us to focus on the more interesting and complex stuff |
21:20:11 | om3ga | I think in future we will have more non educated consumers |
21:20:26 | FromDiscord | <sOkam!> In reply to @guttural666 "explaining basics really bogs": yeah thats the biggest strength of the ai. spamming it with stupid dumb questions |
21:20:39 | FromDiscord | <sOkam!> nobody can stand that flow of rapid questions |
21:20:43 | FromDiscord | <sOkam!> but an ai can no biggie |
21:20:57 | FromDiscord | <guttural666> In reply to @sOkam! "yeah thats the biggest": and it's so happy to help and apologizes if its knowledge about a Nim lib is out of date and I kindly tell it hahahaha |
21:21:00 | om3ga | sOkam! impossible to teach person how to have analytic thinking |
21:21:00 | FromDiscord | <sOkam!> not because its not doable by a human, but because human time is expensive |
21:21:22 | om3ga | the person should already have motivation to develop it |
21:21:43 | FromDiscord | <sOkam!> In reply to @guttural666 "and it's so happy": that part acually annoys me a lot. cant wait until you can teach them. its literally the very first thing I will remove from my conversations 🙈 |
21:22:06 | FromDiscord | <guttural666> yeah, same haha |
21:22:07 | FromDiscord | <sOkam!> In reply to @om3ga "sOkam! impossible to teach": hard disagree |
21:22:28 | FromDiscord | <sOkam!> give the person the right tools, and they will develop analytical thinking without issues |
21:23:31 | FromDiscord | <guttural666> hahaha, this is just insane https://media.discordapp.net/attachments/371759389889003532/1081326008382271631/image.png |
21:23:53 | FromDiscord | <guttural666> this is just sooo cool |
21:24:08 | om3ga | sOkam! I mean if person don't want to study, teacher will not help him |
21:24:27 | om3ga | or in case if he is unable to study for other different reasons |
21:24:35 | FromDiscord | <Elegantbeef> This is where i mock 'no, teachers will be automated' by saying "Look we already have chatgpt and it's confidently incorrect aswell!" |
21:25:44 | om3ga | sOkam! what I think, our progress (I mean whole our civilization), brings degradation too into masses |
21:26:22 | om3ga | scientists should study better that moments to gave more balanced ability for development into the masses |
21:26:52 | om3ga | *to give |
21:26:55 | FromDiscord | <guttural666> difference between humans and AIs is that humans will be cunts about being proven wrong, the AI will say "thank you for your kind words good sir, I will learn from my mistakes" 😄 |
21:27:09 | om3ga | lol |
21:27:24 | FromDiscord | <Elegantbeef> Humans can be cunts about being wrong, AI will say you're wrong and it's 2022 when you asked a question 10 minutes ago |
21:27:37 | om3ga | also what I found, it says "yes it is possible" almost on anything |
21:27:52 | FromDiscord | <Elegantbeef> I do not think you can replace a teacher with AI, you can replace a lecturer with AI |
21:28:04 | FromDiscord | <Elegantbeef> Teachers do more than just read a script explaining concepts |
21:28:04 | FromDiscord | <guttural666> deep |
21:28:49 | om3ga | Elegantbeef all teachers what I had even not tried to explain properly the stuff |
21:28:49 | FromDiscord | <auxym> sent a long message, see http://ix.io/4pPH |
21:29:03 | FromDiscord | <guttural666> reading Dan Simmons Hyperion rn and it's funny how chatGPT reminds me of the ship AI in the last book |
21:29:10 | FromDiscord | <Elegantbeef> Cool but that's not all teachers |
21:29:17 | om3ga | Elegantbeef except two or three really good teachers |
21:29:39 | FromDiscord | <Elegantbeef> That's my point, a good teacher is not replaceable by an AI |
21:29:44 | om3ga | but you know, when you're child, after you loose the trust |
21:29:53 | FromDiscord | <Elegantbeef> A bad teacher is cause, purely cause they do the bare minimum |
21:30:09 | FromDiscord | <sOkam!> In reply to @auxym "FYI, nimc uses the": helpful, ty ✍️ |
21:30:10 | om3ga | Elegantbeef of course, such tools will not replace anybody |
21:30:25 | om3ga | at least in near future |
21:30:39 | FromDiscord | <Elegantbeef> But i'm also a luddite and hate all this new "AI is taking over the world" |
21:30:51 | om3ga | whan I said teachers will be replaced, I mean after couple hundred years |
21:31:05 | FromDiscord | <Elegantbeef> Assuming we as a society last that long |
21:31:25 | FromDiscord | <sOkam!> lol that went negative fast 🙈 |
21:31:27 | FromDiscord | <guttural666> yeah, nuclear holocaust seems a more likely outcome |
21:31:41 | * | jmdaemon joined #nim |
21:31:46 | FromDiscord | <guttural666> should ask chatGPT about that |
21:31:51 | FromDiscord | <Elegantbeef> Bleh not even nuclear |
21:31:56 | om3ga | Elegantbeef in 1999 my neighbor told me, specialists already created program that writes code itself, why you studying the programming then? |
21:31:58 | om3ga | lol |
21:32:13 | om3ga | now is 2023, and I read similar textst online |
21:32:27 | FromDiscord | <guttural666> you mean the preprocessor? lwl |
21:32:32 | om3ga | "soon programmers will be replaced with new AI" |
21:32:37 | FromDiscord | <Elegantbeef> Jeez in 1999 I pooped and peed on myself |
21:32:37 | FromDiscord | <Elegantbeef> Now it rarely happens |
21:32:54 | om3ga | Elegantbeef I'm not very old lol |
21:33:08 | FromDiscord | <⚶ Zeno> In reply to @sOkam! "lol that went negative": ✨ perfection ✨ |
21:33:13 | FromDiscord | <Elegantbeef> Hey i love chatgpt being exclaimed as a programmer replacement, one day people will learn predictive models do not have general intelligence |
21:33:56 | om3ga | guttural666 the fun fact, that program was Linter and autocomplition tool for IDE |
21:34:25 | FromDiscord | <Elegantbeef> Sokam of course it's negative fast, have you seen the geopolitical situation?! 😛 |
21:34:31 | FromDiscord | <guttural666> In reply to @om3ga "guttural666 the fun fact,": well it's all just automation in the end |
21:34:49 | FromDiscord | <guttural666> outsourcing of thinking that is boring and tedious |
21:34:58 | om3ga | guttural666 yes, and that's how journalists presented that |
21:35:08 | om3ga | "new program that will replace coders" |
21:35:46 | om3ga | it was borland compiler era |
21:35:49 | FromDiscord | <guttural666> well programs are replacing programmers all the time arent they, what is metaprogramming other than letting our silicone friends do tedious things ^^ |
21:36:02 | om3ga | only I cannot remeber what the program was exactly |
21:36:11 | FromDiscord | <Elegantbeef> To be fair adding good tooling could replace compiler developer |
21:36:19 | FromDiscord | <Elegantbeef> 😛 |
21:36:42 | om3ga | not when new architecture will arrive |
21:37:12 | om3ga | I want to have custom arch cpu |
21:37:26 | om3ga | with signed zero |
21:38:16 | FromDiscord | <Hourglass [She/Her]> People forget that ChatGPT can be confidently wrong |
21:38:28 | FromDiscord | <Hourglass [She/Her]> But because it sounds smart, people think it is |
21:38:38 | FromDiscord | <Elegantbeef> Hey people listen to me and I cannot prove i'm not a predictive model |
21:39:06 | FromDiscord | <Hourglass [She/Her]> Lol |
21:39:28 | FromDiscord | <Hourglass [She/Her]> I should work on Nimberite but the fact my plugin system idea fell flat because of a bug has discouraged me |
21:39:38 | FromDiscord | <Hourglass [She/Her]> I still need to upload the bug report |
21:40:25 | FromDiscord | <Hourglass [She/Her]> Hey Beef, you're a pro at macros, right? Is it possible to get all defined functions in a module? |
21:40:36 | FromDiscord | <Elegantbeef> No it's not |
21:40:57 | om3ga | Hourglass that's what I said, it generates wrong answers frequently |
21:41:37 | FromDiscord | <Elegantbeef> Hey do not call me "it" |
21:41:39 | om3ga | I used it to check if it can optimize my code |
21:41:48 | om3ga | lol |
21:41:53 | om3ga | I mean chatGPT |
21:41:53 | FromDiscord | <Elegantbeef> Can you share that minimisation again? |
21:42:42 | om3ga | Elegantbeef I should check if it was saved in history |
21:42:56 | om3ga | what it did, inserted inline calculations |
21:43:07 | om3ga | swapped types to open arrays |
21:43:21 | om3ga | name[start..] <--why?! |
21:43:37 | FromDiscord | <Elegantbeef> Oooh chatgpt knows openarray is cooler |
21:43:43 | om3ga | the frequent error was using let for vars |
21:43:52 | om3ga | Elegantbeef it knows nim pretty well |
21:44:27 | FromDiscord | <Hourglass [She/Her]> In reply to @Elegantbeef "No it's not": Rip... |
21:44:48 | om3ga | I don't like to use heavy lib stuff, I prefer to write my own functions |
21:46:02 | om3ga | but it started to suggesting to use algorithm, bitswap (or how it called), and all the code chatgpt printed consisted with such errors |
21:46:22 | * | filcuc joined #nim |
21:46:41 | FromDiscord | <etra> what's the best way to handle bitflags in nim? plain enums? |
21:46:57 | om3ga | also fun example. : if a < b.smth: for a in someObj |
21:47:10 | om3ga | was something similar in Nim? |
21:47:48 | om3ga | or seems it literally translates from some other language to Nim's equivalents |
21:48:13 | FromDiscord | <Elegantbeef> Yes etra `set[MyEnum]` |
21:48:35 | FromDiscord | <Elegantbeef> Omega seems it thinks Nim is python |
21:48:59 | om3ga | Elegantbeef yes, that's also what I thought |
21:50:36 | FromDiscord | <guttural666> In reply to @Hourglass, When the Hour Strikes "People forget that ChatGPT": you will learn that as soon as you compile or look at the docs, but that's not the point, what you are getting out of that is throwing ideas around and getting inspired |
21:51:17 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pPK |
21:51:49 | FromDiscord | <etra> if I use int, it's 6 |
21:51:53 | FromDiscord | <etra> which should be raw | br? |
21:52:22 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4pPL |
21:52:52 | * | Notxor quit (Quit: Leaving) |
21:53:14 | FromDiscord | <Elegantbeef> Also you probably should do `camera_mode: var CameraModeFlags` |
21:53:37 | * | filcuc quit (Ping timeout: 268 seconds) |
21:53:47 | FromDiscord | <etra> brrrp, works now! `Opening camera... Complete features: {Raw, Br}` thanks :p |
21:54:10 | FromDiscord | <etra> In reply to @Elegantbeef "Also you probably should": can I do that if I'm interacting with non nim code (i.e. dll?) |
21:54:48 | FromDiscord | <Elegantbeef> Of course |
21:55:09 | FromDiscord | <Elegantbeef> `var` in Nim is just a `ptr T` hididen |
21:55:11 | FromDiscord | <Elegantbeef> hidden\ |
21:55:17 | FromDiscord | <Elegantbeef> The benefit is it does not require silly `addr` and friends |
21:57:18 | FromDiscord | <etra> cool |
21:57:26 | FromDiscord | <Elegantbeef> https://www.jasonbeetham.com/pointerexplanation.html might explain some things |
21:57:38 | FromDiscord | <Elegantbeef> It explains some basic concepts and also some Nim things |
22:03:09 | * | uics left #nim (#nim) |
22:04:43 | FromDiscord | <Hourglass [She/Her]> https://github.com/nim-lang/Nim/issues/21464 bug report done |
22:05:36 | FromDiscord | <Elegantbeef> Did you test just calling an async proc across the dynlib barrier? |
22:08:03 | FromDiscord | <Hourglass [She/Her]> I did, methods like `sleepAsync` work, even `AsyncScket.recv` works |
22:08:22 | FromDiscord | <Hourglass [She/Her]> Only issue I found (with our fairly limited testing) was sending data to the socket |
22:08:36 | FromDiscord | <Hourglass [She/Her]> This issue might exist with sync sockets... I'll try that now actually |
22:11:44 | FromDiscord | <etra> is there a quick way to print a struct full of char arrays on a more readable format? without needing to handroll my own `$`? |
22:12:29 | FromDiscord | <Elegantbeef> Nope |
22:13:31 | FromDiscord | <etra> sadge |
22:20:12 | FromDiscord | <guttural666> In reply to @etra "sadge": this is what chatGPT says (could be wrong) 😄 https://media.discordapp.net/attachments/371759389889003532/1081340272115466371/image.png |
22:20:52 | FromDiscord | <guttural666> sent a code paste, see https://play.nim-lang.org/#ix=4pPQ |
22:23:54 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pPR |
22:24:51 | FromDiscord | <guttural666> np, just cost our AI friend some 10s of Watts |
22:26:12 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pPU |
22:26:40 | FromDiscord | <etra> (edit) "https://play.nim-lang.org/#ix=4pPU" => "https://play.nim-lang.org/#ix=4pPV" |
22:27:47 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pPW |
22:27:58 | FromDiscord | <etra> they're null terminated so I'm assuming I'm good (? |
22:36:38 | * | advesperacit quit () |
22:37:56 | om3ga | string and csting if I'm not mistaken are not the same thing |
22:38:07 | om3ga | I clearly remember the warning |
22:39:15 | om3ga | if this can be the problem in future, I think better to create new string in that proc, copy content of the cstring in it, and return the string |
22:40:14 | om3ga | yes it can slowdown, but will be safe |
22:40:44 | FromDiscord | <etra> yes, that's what I'm doing, `di.Vendor` is a char array (null terminated), so I'm getting the address of that and casting it to `cstring`, which is compatible with `char`, then `$` converts the cstring to string |
22:41:08 | om3ga | cstring is array of chars |
22:41:28 | FromDiscord | <guttural666> what are you working on @etra , I'm curious |
22:42:01 | FromDiscord | <etra> In reply to @guttural666 "what are you working": I found an SDK for fujifilm cameras, I'm writing the necessary bindings to create a tool to sideload custom profiles, because afaik there's no official tool to do that |
22:42:40 | FromDiscord | <guttural666> haha, the true beauty of open source |
22:42:49 | FromDiscord | <etra> I'd rather write nim bindings than using C and write my own debug functions to just print stuff |
22:43:01 | FromDiscord | <guttural666> word |
22:43:21 | FromDiscord | <etra> In reply to @guttural666 "haha, the true beauty": I mean https://media.discordapp.net/attachments/371759389889003532/1081346095956897922/image.png |
22:43:32 | FromDiscord | <etra> but they're out in the open so I'm not comitting crimes |
22:43:45 | FromDiscord | <guttural666> hackerman is on it again |
22:50:05 | FromDiscord | <Elegantbeef> Cstring and string are not the same thing indeed but Nim strings are compatible to cstring |
22:50:23 | FromDiscord | <Elegantbeef> Hence the warning, that it's technically unsafe to pass a string as a cstring unless you know the lifetime the function has |
22:50:58 | om3ga | etra: https://play.nim-lang.org/#ix=4pQ1 |
22:51:27 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4pQ2 |
22:51:45 | om3ga | not the best solution, I don't know what will be if the cstring will not be properly terminated, but worth trying |
22:52:03 | FromDiscord | <Elegantbeef> If a cstring is not terminated you have massive problems |
22:52:15 | om3ga | it may lead to overflow. but we can check that |
22:52:20 | FromDiscord | <jmgomez> hey beef, FYI could test the approach that I told you yesterday about passing pointers as int around with the host and the VM and works just fine for NimForUE. I think it's gonna take me far.↵ One thing thouhg, is that when a script is not 100% correct I get a hard crash from evalScript, the error hook doesnt seem to do much there. Did you get around it with nimscripter? |
22:52:43 | om3ga | or etra, you should pass from your C stuff the exact length |
22:52:53 | FromDiscord | <Elegantbeef> What do you mean hardcrash? |
22:53:05 | om3ga | or you should know and be sure 100% the time that proc gets cstring of exact length |
22:53:17 | om3ga | to not trigger the owerflow read |
22:53:23 | om3ga | *overflow |
22:53:47 | FromDiscord | <jmgomez> the host crashes, try doesnt capture it and the dll makes the whole UE editor to crash too |
22:53:51 | om3ga | yes, read access to the not allowed address may lead to the problems |
22:54:02 | FromDiscord | <Elegantbeef> Yea but how does it crash |
22:54:06 | FromDiscord | <Elegantbeef> Is it an issue inside the VM or host? |
22:54:37 | FromDiscord | <jmgomez> VM, lke if yo call a func thats not defined or you have errors on the actual code |
22:54:49 | FromDiscord | <jmgomez> (edit) "lke" => "like" | "yo" => "you" |
22:55:00 | FromDiscord | <Elegantbeef> The errorhook should work |
22:55:35 | FromDiscord | <Elegantbeef> https://github.com/beef331/nimscripter/blob/master/src/nimscripter.nim#L30-L37 mixed with https://github.com/beef331/nimscripter/blob/master/src/nimscripter.nim#L97-L104 |
22:59:10 | * | derpydoo joined #nim |
23:00:26 | FromDiscord | <jmgomez> I dont see anything fundamentally different of what I was doign which is basically try/except around evalScript and hook into the error |
23:01:39 | FromDiscord | <Elegantbeef> Are you sure the error resides in the VM and not in host code? |
23:02:04 | FromDiscord | <jmgomez> 100% like a I see it working and then I introduce a type |
23:02:06 | FromDiscord | <jmgomez> typo |
23:02:25 | FromDiscord | <Elegantbeef> Well I can only say something seems setup wrong |
23:02:48 | FromDiscord | <etra> In reply to @om3ga "<@329819426000076801>: https://play.nim-lang.org/#i": The problem was more something like this: https://play.nim-lang.org/#ix=4pQa |
23:02:57 | FromDiscord | <Elegantbeef> you do use `registerErrorHook` riiiiight? 😄 |
23:03:07 | FromDiscord | <jmgomez> Will try to reproduce outside UE |
23:03:10 | FromDiscord | <jmgomez> yeah xD |
23:03:22 | FromDiscord | <jmgomez> (edit) "Will try to reproduce ... outside" added "it" |
23:03:27 | FromDiscord | <etra> In reply to @om3ga "or etra, you should": I don't control the other side of the api, but I do know they're null terminated by docs so I'm ok with using unsafeAddr. |
23:03:30 | FromDiscord | <etra> (edit) "unsafeAddr." => "unsafeAddr, I think" |
23:05:20 | FromDiscord | <jmgomez> aghh it's what I was afraid out, something related with ue.. outside it works just fine |
23:06:01 | FromDiscord | <jmgomez> well outside it and in an exe which I dont think will make a diff |
23:06:23 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pQf |
23:06:47 | FromDiscord | <Elegantbeef> We can do better, but would require more code |
23:07:20 | * | zgasma joined #nim |
23:07:28 | FromDiscord | <jmgomez> Do you know if goto exceptions should work with cpp? |
23:07:38 | * | zgasma quit (Client Quit) |
23:07:44 | FromDiscord | <Elegantbeef> They probably should |
23:08:03 | FromDiscord | <etra> In reply to @Elegantbeef "We can do better,": it's ok, beef, you can be disappointed |
23:08:41 | FromDiscord | <etra> I'm surprised this works, at all, my camera is not even listed in the support :p, can't wait to break it, lol |
23:10:40 | om3ga | etra: https://play.nim-lang.org/#ix=4pQh |
23:11:55 | FromDiscord | <etra> In reply to @om3ga "<@329819426000076801>: https://play.nim-lang.org/#i": I am not sure what's the point of this if by api spec I know they're null terminated, the string convertion detects the length with that |
23:12:17 | * | zgasma joined #nim |
23:12:35 | om3ga | but I had many times problems, so I don't rely on stlen, or similar even in C. I always try to work with known length of arrays, and initialize their first index at least with zero |
23:12:47 | om3ga | etra, overflow happens.... |
23:13:21 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4pQk |
23:13:22 | om3ga | and underflow is worse, leads to unpredicted behavior |
23:14:20 | FromDiscord | <jmgomez> I think it may be a compiler option, let me see if Im in luck and it's one of those no pch dependant |
23:14:29 | FromDiscord | <Elegantbeef> https://play.nim-lang.org/#ix=4pQl etra if you want to see funky code |
23:15:17 | FromDiscord | <Elegantbeef> Do you have `--panics:on` jm? |
23:16:01 | FromDiscord | <jmgomez> no |
23:16:41 | FromDiscord | <Elegantbeef> Hmph |
23:16:47 | FromDiscord | <jmgomez> I mostly do the actual compiler options directly because they are specific to the platform and need to match for the most part the ue ones and or play nice with it |
23:17:15 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4pQm |
23:17:36 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix=4pQn |
23:17:44 | FromDiscord | <Elegantbeef> It's a generic |
23:17:53 | FromDiscord | <jmgomez> it seems there is a `\za` enabled that causes it but Im not enabling it explicitly not sure if its pulled from somewhere else |
23:17:59 | FromDiscord | <Elegantbeef> Not that it really matters it's likely to get inlined |
23:18:09 | FromDiscord | <etra> true :p |
23:19:01 | FromDiscord | <etra> sent a code paste, see https://play.nim-lang.org/#ix= |
23:19:12 | FromDiscord | <Elegantbeef> It's not needed |
23:19:16 | FromDiscord | <Elegantbeef> I was dumbly fighting a different bug |
23:19:23 | FromDiscord | <Elegantbeef> `fStr.distinctBas()[slice] = val` will work |
23:20:24 | FromDiscord | <Elegantbeef> I guess technically one should do `fStr.distinctBase[slice.b + 1] = '\0'` |
23:20:27 | FromDiscord | <Elegantbeef> And a check should be implemented inside the `$` |
23:20:29 | FromDiscord | <Elegantbeef> In the case it fills the buffer |
23:21:12 | om3ga | Elegantbeef +1 can't cause overflow? |
23:21:36 | om3ga | in case if the string not terminated |
23:21:50 | FromDiscord | <Elegantbeef> I mean you obviously should check this stuff |
23:22:24 | FromDiscord | <etra> is `type Foo = object` a zero sized type? |
23:22:30 | om3ga | the problem with cstrings is that we not always know their length |
23:22:30 | FromDiscord | <etra> I'd just like to hook it a destructor to something |
23:22:36 | FromDiscord | <Elegantbeef> Nope |
23:22:37 | FromDiscord | <Elegantbeef> It's sized of `1` cause Nim isnt dumb 😄 |
23:22:59 | * | jmdaemon quit (Ping timeout: 260 seconds) |
23:23:26 | FromDiscord | <Hourglass [She/Her]> I should really work on Nim JVM again |
23:23:44 | om3ga | nim jvM? |
23:24:09 | om3ga | own implementaton of java virtual machine written in nim? |
23:25:07 | FromDiscord | <jmgomez> aghh I think to get around need to actually enable it but it conflicts with another. What other exception mechanism would you recommend next? (other than cpp and goto?) I think I saw some issues in quirky in the past |
23:27:00 | FromDiscord | <Hourglass [She/Her]> In reply to @om3ga "nim jvM?": Nope, Nim compiling to JVM bytecode |
23:27:14 | FromDiscord | <Hourglass [She/Her]> I was working on that ages ago but did too much too fast and got burnt out aha |
23:28:15 | FromDiscord | <Elegantbeef> Omega this should resolve all your issues https://play.nim-lang.org/#ix=4pQq |
23:29:32 | FromDiscord | <jmgomez> In reply to @jmgomez "aghh I think to": setjmp produces other errors.. on losing qualifiersd (volatible wtf is that now😅 ) |
23:31:31 | FromDiscord | <Hourglass [She/Her]> Is the csources just the generated C code from compiling the Nim compiler? |
23:32:23 | om3ga | Hourglass, not easy task sure |
23:33:35 | om3ga | Elegantbeef, good, but it was not my problems :) |
23:35:13 | om3ga | I think this example can be optimized also |
23:39:21 | FromDiscord | <Hourglass [She/Her]> In reply to @om3ga "Hourglass, not easy task": Definitely not aha, I was so confused on how to even begin |
23:41:55 | om3ga | Elegantbeef the problem of that stuff is in the source, some cstrings returned by using dll can be shorter than expected. But this is different story |
23:42:12 | om3ga | and not terminated also |
23:42:13 | om3ga | lol |
23:42:17 | om3ga | bugs are everywhere |
23:42:25 | FromDiscord | <Elegantbeef> Yea but we're looking at a subset of cstrings |
23:42:43 | FromDiscord | <Elegantbeef> This subset of cstrings uses a stack allocated array, and is always null terminated unless it fills the buffer |
23:43:50 | * | azimut quit (Ping timeout: 255 seconds) |
23:44:02 | om3ga | sure, I just discuss general problems |
23:44:17 | om3ga | dunno what is the real use case |
23:44:48 | FromDiscord | <Elegantbeef> The present use case is a struct that has a bunch of fixed length arrays |
23:45:09 | FromDiscord | <Elegantbeef> They want to easily print out their struct with nice strings per field |
23:45:13 | * | azimut joined #nim |
23:45:15 | om3ga | that should be initialized allways? |
23:45:20 | FromDiscord | <Elegantbeef> Hence the custom array type |
23:45:43 | om3ga | aah, ok |
23:46:15 | om3ga | I hate formatting the text |
23:46:18 | FromDiscord | <Elegantbeef> Since this is a fixed array cstring we know that there are only two states, the array is full or the array is not full and has a \\0 |
23:46:40 | FromDiscord | <Elegantbeef> If it has a \\0 we can treat it like a cstring, if it doesnt have a \\0 we need to treat it like an array and copy it to the string |
23:46:45 | om3ga | sure |
23:47:30 | FromDiscord | <Elegantbeef> An optimisation is to just iterate over the array adding it to the result and breaking on a `\0` |
23:47:31 | om3ga | so if sting is not empty we can only check values of each index that not equal to '\0' |
23:47:37 | om3ga | right |
23:47:38 | FromDiscord | <Elegantbeef> But i'm also daft and just was writing the code |
23:48:07 | FromDiscord | <Elegantbeef> Hey do not agree with me being daft! |
23:48:22 | om3ga | if the speed mattersm numbers of vars can be reduced |
23:48:45 | om3ga | Elegantbeef sometimes I write very non optimal code, it's ok |
23:48:58 | FromDiscord | <Elegantbeef> Something tells me etra is in another castle now |
23:48:59 | om3ga | especially when the work should be done very fast |
23:49:38 | om3ga | many others will disagree, but the cost of the function matters |
23:50:29 | om3ga | why spent resources of the computer with non needed operations |
23:50:57 | om3ga | python folks like the argument "who cares will it be faster on 1ms or not " :) |
23:52:02 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @auxym "can you just pass": does it need extra arguments? |
23:55:36 | FromDiscord | <jmgomez> the root of the issue with default cpp exceptions seems to be that UE is compiled with `/EHsc` the c means no extern exceptions |
23:55:44 | om3ga | Is here anybody who had deep experience with x11 programming? |
23:58:44 | om3ga | what you think, is it possible to create very basic UI for linux? or such project is overkill for the small group of programmers? |
23:59:41 | FromDiscord | <auxym> In reply to @System64 "does it need extra": just the path you want to add to the include search paths, eg https://github.com/mratsim/Arraymancer/blob/master/nim.cfg#L14 |