<< 20-06-2025 >>

00:05:14*beholders_eye quit (Ping timeout: 272 seconds)
01:13:08FromDiscord<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:26FromDiscord<janakali> 0/72
01:52:02FromDiscord<janakali> s/zig/Nim 2.0.14 + Zig 0.13.0/ (yeah, I should probably update my podman container)
01:56:16FromDiscord<leorize> https://www.virustotal.com/gui/file/d40e959f22683f6e69c40ea68f2e388f568e1fafc55f2c2bc5405b9872ea28d9
01:56:25FromDiscord<leorize> that's with clang
01:56:43FromDiscord<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:48FromDiscord<.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=AzAQhxjl
07:55:58FromDiscord<.tokyovigilante> or is there another way to do something like this
08:07:11FromDiscord<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:47FromDiscord<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:27FromDiscord<janakali> (edit) "@.tokyovigilante you can call task ... with" added "`foo`"
08:11:54FromDiscord<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:21FromDiscord<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:02FromDiscord<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:57FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=HxKeYsuI
08:40:12FromDiscord<devlop_gaming> It says it can't find lib.c
08:41:25FromDiscord<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:40FromDiscord<griffith1deadly> In reply to @devlop_gaming "C:\Users\Dreca\.nimble\pkgs2\futhark-0.15.0-50ab2e4": opir is called at importc block
10:35:50FromDiscord<griffith1deadly> so it failed to parse your imgui.h
10:36:05FromDiscord<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:30FromDiscord<arkanoid> what is the difference from `ptr UncheckedArray[cstring]` and `ptr UncheckedArray[ptr cstring]` ?
13:36:29*beholders_eye joined #nim
13:49:26Amun-Raarkanoid: 1. array of cstrings, 2. array of pointers to cstring
13:50:57*beholders_eye quit (Ping timeout: 252 seconds)
13:51:24FromDiscord<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:47Amun-Raseq[string] is not null-terminated
13:53:07Amun-Rabut I remember there was a func somewhere, let me check
13:53:52Amun-Raarkanoid: https://nim-lang.org/docs/system.html#allocCStringArray%2CopenArray%5Bstring%5D
13:54:30FromDiscord<arkanoid> it returns a `ptr UncheckedArray[cstring]` not a `ptr UncheckedArray[ptr cstring]`
13:54:59Amun-Raah, if you need ptr cstring then you have to do it by hand
13:56:16Amun-Raptr UncheckedArray[ptr cstring] is pretty unorthodox, where have you found that?
13:59:47FromDiscord<arkanoid> unless I am counting number of indirection wrongly, `char` means `ptr UncheckedArray[ptr cstring]`
14:01:38FromDiscord<arkanoid> example usage https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
14:04:06Amun-Raarkanoid: do you have "argv" in mind?
14:04:25Amun-Raif so, argv is a cstringArray == ptr UncheckedArray[cstring]
14:04:46Amun-Rachar *argv[] is an array of (char *)
14:06:36Amun-Raand a string in C is of type "char *"
14:06:52FromDiscord<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:05Amun-Raand every array of chars can't be passed to a C function as an array and is really a pointer to char
14:08:09Amun-Rademotomohiro: or event just a "pointer"
14:08:15Amun-Radepending on the usage
14:08:42Amun-Rasome types on the list above are fine, except when one needs to access the elements
14:12:15Amun-Ra…and I wrote alloc ptr cstring already… https://play.nim-lang.org/#pasty=AOxasHcR ;)
14:30:16FromDiscord<arkanoid> I mean you are casting, not converting, no null terminations are inserted
14:51:33Amun-RaI am casting already null-terminated strings
14:51:45Amun-Raand inserting null terminator at the end of the array
14:57:42FromDiscord<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:56FromDiscord<arkanoid> so basically a `ptr ptr UncheckedArray[cstring]`, and not a `ptr UncheckedArray[ptr cstring]`
14:59:18Amun-Ragst_init(int *argv, char **argv[])
14:59:39Amun-Raright, you need to pass cint.addr, and some_cstring_array.addr
15:00:12Amun-Rabut there's a catch…
15:00:35Amun-Rathis function is designed to modify original argv array
15:01:06Amun-Rayou should make a shallow copy of cstring array before calling gst_init or there will be possible leaks
15:01:32Amun-Rahmm… is there a way in nim to access the real argv?
15:01:44Amun-Rathat'd be the best option
15:04:02FromDiscord<arkanoid> how do you know that it modifies the input?
15:05:46Amun-Rait wouldn't require passing a pointer otherwise
15:06:29Amun-RaI 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:08Amun-Raarkanoid: do you really need to pass the options to GStreamer?
15:07:21Amun-Raif not `gst_init(nil, nil)` would suffice
15:07:51Amun-Rahmm, or will…
15:09:16Amun-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:03FromDiscord<arkanoid> yes, I can
15:17:18Amun-Rathe alternative way is to traverse the options on nim side and set the specific gst options via the specific api
15:18:04Amun-Ras/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:50FromDiscord<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:36FromDiscord<griffith1deadly> In reply to @devlop_gaming "What path is it": try absolute?
19:29:45FromDiscord<griffith1deadly> or move header to src
19:32:03FromDiscord<devlop_gaming> Im confused. It's still not working.
19:32:40FromDiscord<devlop_gaming> sent a code paste, see https://play.nim-lang.org/#pasty=YUlwedAl
19:41:23FromDiscord<user2m> sent a long message, see https://pasty.ee/jdZEoRnL
19:41:31FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=YLAsAWTj
19:42:51FromDiscord<Elegantbeef> Have you used -d\:useMalloc?
19:44:16FromDiscord<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:41FromDiscord<Elegantbeef> If Nim's allocator is still broken it'll be needed
19:47:18FromDiscord<user2m> In reply to @Elegantbeef "If Nim's allocator is": ok ill try that now
19:52:24FromDiscord<devlop_gaming> In reply to @griffith1deadly "try absolute?": importc only works on c code correct?
19:52:38FromDiscord<user2m> In reply to @devlop_gaming "importc only works on": works in js backend too
19:52:47FromDiscord<Elegantbeef> Futhark only supports C right now
19:53:04FromDiscord<devlop_gaming> I need imgui tho
19:53:08FromDiscord<Elegantbeef> `{.importc.}` works for C/C++/Js
19:53:12FromDiscord<Elegantbeef> Use cimgui
19:53:26FromDiscord<Elegantbeef> Or nuklear
19:54:13FromDiscord<devlop_gaming> nuklear?
19:54:28FromDiscord<Elegantbeef> It's another imgui library that's not dearimgui
19:59:47FromDiscord<devlop_gaming> oh i'm used to imgui
19:59:53FromDiscord<devlop_gaming> (edit) "oh i'm used to ... imgui" added "dear"
20:00:08FromDiscord<Elegantbeef> Cool then use cimgui
20:15:30FromDiscord<mr_rowboto> sent a long message, see https://pasty.ee/fabmdpqZ
20:33:08FromDiscord<devlop_gaming> In reply to @mr_rowboto "Hey, I have a": I recommend the nim docs over tutorials
20:33:29FromDiscord<devlop_gaming> https://media.discordapp.net/attachments/371759389889003532/1385719226223952074/message.txt?ex=68571718&is=6855c598&hm=03ef300af5dfed21802ce40314c394470362b104df7f4155d9a3d96f5a9477d1&
20:33:46FromDiscord<devlop_gaming> https://nim-lang.org/documentation.html
20:34:00FromDiscord<mr_rowboto> I SAW THAT
20:34:03FromDiscord<mr_rowboto> haha
20:34:09FromDiscord<mr_rowboto> In reply to @devlop_gaming "I recommend the nim": Thanks!
20:34:52FromDiscord<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:59FromDiscord<mr_rowboto> Happens all the time
20:46:43FromDiscord<Elegantbeef> Hunter2
20:53:01FromDiscord<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:51FromDiscord<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:24FromDiscord<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:24FromDiscord<mr_rowboto> In reply to @Elegantbeef "Hunter2": Beef revealing he’s way over 40 yo
20:59:37FromDiscord<Elegantbeef> Well I'm not so good try
23:14:35*skippy8 quit (Quit: WeeChat 4.6.3)
23:45:16FromDiscord<.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:03FromDiscord<.tokyovigilante> The backends have a small enough API that you could just hand-roll the relevant Nim wrapper for them
23:49:54FromDiscord<.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=phGTWchq
23:50:28FromDiscord<.tokyovigilante> (edit) "https://play.nim-lang.org/#pasty=UEGAvToj" => "https://play.nim-lang.org/#pasty=DZkSoCix"
23:55:44FromDiscord<.tokyovigilante> Then have a wee shim (equivalent of `cimgui`):
23:57:09FromDiscord<.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=ybauYbfL
23:58:10FromDiscord<.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)