00:05:14 | * | beholders_eye quit (Ping timeout: 272 seconds) |
01:13:08 | FromDiscord | <janakali> In reply to @Elegantbeef "I love looking at": And here's a fresh grabnim binary compiled with zig for `x86_64-windows-gnu`: https://www.virustotal.com/gui/file/a210d9aaf501245ca32672e46b037a8e78f18ab07f3a336c86971a0f597bb4cc |
01:13:26 | FromDiscord | <janakali> 0/72 |
01:52:02 | FromDiscord | <janakali> s/zig/Nim 2.0.14 + Zig 0.13.0/ (yeah, I should probably update my podman container) |
01:56:16 | FromDiscord | <leorize> https://www.virustotal.com/gui/file/d40e959f22683f6e69c40ea68f2e388f568e1fafc55f2c2bc5405b9872ea28d9 |
01:56:25 | FromDiscord | <leorize> that's with clang |
01:56:43 | FromDiscord | <leorize> inb4 malware switch to compiling with clang/zigcc |
02:29:53 | * | Lord_Nightmare joined #nim |
02:42:43 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
02:46:48 | * | Lord_Nightmare joined #nim |
02:47:49 | * | Lord_Nightmare quit (Remote host closed the connection) |
02:50:38 | * | Lord_Nightmare joined #nim |
04:33:34 | * | nils` quit (Ping timeout: 268 seconds) |
05:02:14 | * | amadaluzia joined #nim |
05:19:37 | * | amadaluzia quit (Quit: ZNC 1.9.1 - https://znc.in) |
05:33:52 | * | nils` joined #nim |
06:01:21 | * | skippy8 joined #nim |
07:55:48 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=AzAQhxjl |
07:55:58 | FromDiscord | <.tokyovigilante> or is there another way to do something like this |
08:07:11 | FromDiscord | <janakali> @.tokyovigilante you can call task with `fooTask()`, e.g. `externalCompileTask()`: https://nim-lang.org/docs/nimscript.html#task.t%2Cuntyped%2Cstring%2Cuntyped |
08:07:47 | FromDiscord | <janakali> > For a task named foo, this template generates a proc named fooTask. This is useful if you need to call one task in another in your Nimscript. |
08:08:27 | FromDiscord | <janakali> (edit) "@.tokyovigilante you can call task ... with" added "`foo`" |
08:11:54 | FromDiscord | <devlop_gaming> Im trying to install futhark but I keep running into a build failed for the package: futhark error. I have clang installed so idk what's the problem. |
08:17:46 | * | beholders_eye joined #nim |
08:22:21 | FromDiscord | <nnsee> can you post the full error? |
08:28:57 | * | redj quit (Quit: No Ping reply in 180 seconds.) |
08:30:29 | * | redj joined #nim |
08:37:02 | FromDiscord | <devlop_gaming> In reply to @nnsee "can you post the": Nvm i had to pass in passNim. Im confused on how to use this tho. |
08:39:57 | FromDiscord | <devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=HxKeYsuI |
08:40:12 | FromDiscord | <devlop_gaming> It says it can't find lib.c |
08:41:25 | FromDiscord | <devlop_gaming> sent a long message, see https://pasty.ee/IOPCNfFZ |
09:05:04 | * | beholders_eye quit (Ping timeout: 260 seconds) |
09:15:25 | * | beholders_eye joined #nim |
09:32:04 | * | nils` quit (Ping timeout: 272 seconds) |
09:34:59 | * | beholders_eye quit (Ping timeout: 260 seconds) |
09:38:26 | * | m5zs7k quit (Ping timeout: 248 seconds) |
09:49:47 | * | m5zs7k joined #nim |
09:59:41 | * | nils` joined #nim |
10:05:57 | * | przmk4 quit (Quit: The Lounge - https://thelounge.chat) |
10:08:36 | * | przmk4 joined #nim |
10:31:00 | * | przmk40 joined #nim |
10:33:25 | * | przmk4 quit (Ping timeout: 276 seconds) |
10:33:25 | * | przmk40 is now known as przmk4 |
10:35:40 | FromDiscord | <griffith1deadly> In reply to @devlop_gaming "C:\Users\Dreca\.nimble\pkgs2\futhark-0.15.0-50ab2e4": opir is called at importc block |
10:35:50 | FromDiscord | <griffith1deadly> so it failed to parse your imgui.h |
10:36:05 | FromDiscord | <griffith1deadly> wrong path then or includes in it |
10:47:35 | * | beholders_eye joined #nim |
11:58:22 | * | end quit (Ping timeout: 272 seconds) |
11:58:22 | * | bcksl quit (Ping timeout: 272 seconds) |
12:02:59 | * | beholders_eye quit (Ping timeout: 260 seconds) |
12:19:20 | * | bcksl joined #nim |
12:26:25 | * | end joined #nim |
13:02:17 | * | beholders_eye joined #nim |
13:17:18 | * | beholders_eye quit (Ping timeout: 276 seconds) |
13:32:30 | FromDiscord | <arkanoid> what is the difference from `ptr UncheckedArray[cstring]` and `ptr UncheckedArray[ptr cstring]` ? |
13:36:29 | * | beholders_eye joined #nim |
13:49:26 | Amun-Ra | arkanoid: 1. array of cstrings, 2. array of pointers to cstring |
13:50:57 | * | beholders_eye quit (Ping timeout: 252 seconds) |
13:51:24 | FromDiscord | <arkanoid> is there a quick way to get that from a seq[string]? I see two problems here, ownership and null termination, but maybe nim has already tools in stdlib for this |
13:52:47 | Amun-Ra | seq[string] is not null-terminated |
13:53:07 | Amun-Ra | but I remember there was a func somewhere, let me check |
13:53:52 | Amun-Ra | arkanoid: https://nim-lang.org/docs/system.html#allocCStringArray%2CopenArray%5Bstring%5D |
13:54:30 | FromDiscord | <arkanoid> it returns a `ptr UncheckedArray[cstring]` not a `ptr UncheckedArray[ptr cstring]` |
13:54:59 | Amun-Ra | ah, if you need ptr cstring then you have to do it by hand |
13:56:16 | Amun-Ra | ptr UncheckedArray[ptr cstring] is pretty unorthodox, where have you found that? |
13:59:47 | FromDiscord | <arkanoid> unless I am counting number of indirection wrongly, `char` means `ptr UncheckedArray[ptr cstring]` |
14:01:38 | FromDiscord | <arkanoid> example usage https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c |
14:04:06 | Amun-Ra | arkanoid: do you have "argv" in mind? |
14:04:25 | Amun-Ra | if so, argv is a cstringArray == ptr UncheckedArray[cstring] |
14:04:46 | Amun-Ra | char *argv[] is an array of (char *) |
14:06:36 | Amun-Ra | and a string in C is of type "char *" |
14:06:52 | FromDiscord | <demotomohiro> C uses `T` for both pointer to single T and array of T.↵`char` can be `ptr char` or `cstring`.↵`char` can be `ptr cstring` or `ptr UncheckedArray[cstring]`.↵`char` can be `ptr ptr cstring`, `ptr ptr UncheckedArray[cstring]` or `ptr UncheckedArray[ptr UncheckedArray[cstring]`. |
14:07:05 | Amun-Ra | and every array of chars can't be passed to a C function as an array and is really a pointer to char |
14:08:09 | Amun-Ra | demotomohiro: or event just a "pointer" |
14:08:15 | Amun-Ra | depending on the usage |
14:08:42 | Amun-Ra | some types on the list above are fine, except when one needs to access the elements |
14:12:15 | Amun-Ra | …and I wrote alloc ptr cstring already… https://play.nim-lang.org/#pasty=AOxasHcR ;) |
14:30:16 | FromDiscord | <arkanoid> I mean you are casting, not converting, no null terminations are inserted |
14:51:33 | Amun-Ra | I am casting already null-terminated strings |
14:51:45 | Amun-Ra | and inserting null terminator at the end of the array |
14:57:42 | FromDiscord | <arkanoid> after some SIGSEGVs, I found out that that C function `gst_init (int argc, char argv)` really wants `allocCStringArray(argv).unsafeAddr` as second argument |
14:58:56 | FromDiscord | <arkanoid> so basically a `ptr ptr UncheckedArray[cstring]`, and not a `ptr UncheckedArray[ptr cstring]` |
14:59:18 | Amun-Ra | gst_init(int *argv, char **argv[]) |
14:59:39 | Amun-Ra | right, you need to pass cint.addr, and some_cstring_array.addr |
15:00:12 | Amun-Ra | but there's a catch… |
15:00:35 | Amun-Ra | this function is designed to modify original argv array |
15:01:06 | Amun-Ra | you should make a shallow copy of cstring array before calling gst_init or there will be possible leaks |
15:01:32 | Amun-Ra | hmm… is there a way in nim to access the real argv? |
15:01:44 | Amun-Ra | that'd be the best option |
15:04:02 | FromDiscord | <arkanoid> how do you know that it modifies the input? |
15:05:46 | Amun-Ra | it wouldn't require passing a pointer otherwise |
15:06:29 | Amun-Ra | I suspect it extracts its own options from the command line and leaves the rest of them for the user; many APIs work this way |
15:07:08 | Amun-Ra | arkanoid: do you really need to pass the options to GStreamer? |
15:07:21 | Amun-Ra | if not `gst_init(nil, nil)` would suffice |
15:07:51 | Amun-Ra | hmm, or will… |
15:09:16 | Amun-Ra | "do you really need to pass the options to GStreamer?" → "do you really need to pass the options from the user to GStreamer?" |
15:13:03 | FromDiscord | <arkanoid> yes, I can |
15:17:18 | Amun-Ra | the alternative way is to traverse the options on nim side and set the specific gst options via the specific api |
15:18:04 | Amun-Ra | s/specific api/dedicated api/ |
15:39:39 | * | ntat joined #nim |
16:01:39 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
16:36:29 | * | ntat quit (Quit: leaving) |
18:33:50 | FromDiscord | <devlop_gaming> In reply to @griffith1deadly "wrong path then or": What path is it supposed to be? My header is in imgui/imgui.h |
19:16:33 | * | beholders_eye joined #nim |
19:29:36 | FromDiscord | <griffith1deadly> In reply to @devlop_gaming "What path is it": try absolute? |
19:29:45 | FromDiscord | <griffith1deadly> or move header to src |
19:32:03 | FromDiscord | <devlop_gaming> Im confused. It's still not working. |
19:32:40 | FromDiscord | <devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=YUlwedAl |
19:41:23 | FromDiscord | <user2m> sent a long message, see https://pasty.ee/jdZEoRnL |
19:41:31 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=YLAsAWTj |
19:42:51 | FromDiscord | <Elegantbeef> Have you used -d\:useMalloc? |
19:44:16 | FromDiscord | <user2m> In reply to @Elegantbeef "Have you used -d\:useMalloc?": i think i tried that briefly but i think i read on a forum that it hsouldnt be needed anymore? |
19:44:41 | FromDiscord | <Elegantbeef> If Nim's allocator is still broken it'll be needed |
19:47:18 | FromDiscord | <user2m> In reply to @Elegantbeef "If Nim's allocator is": ok ill try that now |
19:52:24 | FromDiscord | <devlop_gaming> In reply to @griffith1deadly "try absolute?": importc only works on c code correct? |
19:52:38 | FromDiscord | <user2m> In reply to @devlop_gaming "importc only works on": works in js backend too |
19:52:47 | FromDiscord | <Elegantbeef> Futhark only supports C right now |
19:53:04 | FromDiscord | <devlop_gaming> I need imgui tho |
19:53:08 | FromDiscord | <Elegantbeef> `{.importc.}` works for C/C++/Js |
19:53:12 | FromDiscord | <Elegantbeef> Use cimgui |
19:53:26 | FromDiscord | <Elegantbeef> Or nuklear |
19:54:13 | FromDiscord | <devlop_gaming> nuklear? |
19:54:28 | FromDiscord | <Elegantbeef> It's another imgui library that's not dearimgui |
19:59:47 | FromDiscord | <devlop_gaming> oh i'm used to imgui |
19:59:53 | FromDiscord | <devlop_gaming> (edit) "oh i'm used to ... imgui" added "dear" |
20:00:08 | FromDiscord | <Elegantbeef> Cool then use cimgui |
20:15:30 | FromDiscord | <mr_rowboto> sent a long message, see https://pasty.ee/fabmdpqZ |
20:33:08 | FromDiscord | <devlop_gaming> In reply to @mr_rowboto "Hey, I have a": I recommend the nim docs over tutorials |
20:33:29 | FromDiscord | <devlop_gaming> https://media.discordapp.net/attachments/371759389889003532/1385719226223952074/message.txt?ex=68571718&is=6855c598&hm=03ef300af5dfed21802ce40314c394470362b104df7f4155d9a3d96f5a9477d1& |
20:33:46 | FromDiscord | <devlop_gaming> https://nim-lang.org/documentation.html |
20:34:00 | FromDiscord | <mr_rowboto> I SAW THAT |
20:34:03 | FromDiscord | <mr_rowboto> haha |
20:34:09 | FromDiscord | <mr_rowboto> In reply to @devlop_gaming "I recommend the nim": Thanks! |
20:34:52 | FromDiscord | <devlop_gaming> In reply to @mr_rowboto "I SAW THAT": Sorry lmao i'm testing a scripter atm to see if he good for that guy dev team and i forgot i had it copied |
20:34:59 | FromDiscord | <mr_rowboto> Happens all the time |
20:46:43 | FromDiscord | <Elegantbeef> Hunter2 |
20:53:01 | FromDiscord | <demotomohiro> In reply to @devlop_gaming "oh i'm used to": You can manually import C++ library if you know C++:↵https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-importcpp-pragma |
20:57:51 | FromDiscord | <devlop_gaming> In reply to @demotomohiro "You can manually import": I do but how do i import it? I know i can use importc and dynlib pragmas |
20:58:24 | FromDiscord | <devlop_gaming> dear imgui uses namespaces and idk how i would translate that to nim. If it was like sdl then i could do it. |
20:59:24 | FromDiscord | <mr_rowboto> In reply to @Elegantbeef "Hunter2": Beef revealing he’s way over 40 yo |
20:59:37 | FromDiscord | <Elegantbeef> Well I'm not so good try |
23:14:35 | * | skippy8 quit (Quit: WeeChat 4.6.3) |
23:45:16 | FromDiscord | <.tokyovigilante> In reply to @devlop_gaming "dear imgui uses namespaces": I've found great success with both cimgui and dcimgui, then just running Futhark on the C header - https://github.com/dearimgui/dear_bindings |
23:46:03 | FromDiscord | <.tokyovigilante> The backends have a small enough API that you could just hand-roll the relevant Nim wrapper for them |
23:49:54 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=phGTWchq |
23:50:28 | FromDiscord | <.tokyovigilante> (edit) "https://play.nim-lang.org/#pasty=UEGAvToj" => "https://play.nim-lang.org/#pasty=DZkSoCix" |
23:55:44 | FromDiscord | <.tokyovigilante> Then have a wee shim (equivalent of `cimgui`): |
23:57:09 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=ybauYbfL |
23:58:10 | FromDiscord | <.tokyovigilante> Imgui has a pretty basic namespacing (All `ImGui::`) and any state is internal to the backends so its pretty easy to use from the C FFI |
23:59:54 | * | beholders_eye quit (Ping timeout: 260 seconds) |