<< 14-02-2023 >>

00:44:52*beholders_eye joined #nim
01:03:39*derpydoo joined #nim
01:26:42*Jjp137 joined #nim
01:26:47*termer quit (Ping timeout: 255 seconds)
01:36:21*termer joined #nim
01:43:08FromDiscord<MetuMortis> anyone knows how to fix that https://media.discordapp.net/attachments/371759389889003532/1074868360262729798/Screenshot_20230214_044252.png
01:47:36*termer quit (Ping timeout: 255 seconds)
01:54:17FromDiscord<auxym> install nim?
01:54:45*beholders_eye quit (Ping timeout: 252 seconds)
01:57:02*termer joined #nim
01:58:44FromDiscord<MetuMortis> In reply to @auxym "install nim?": https://media.discordapp.net/attachments/371759389889003532/1074872287066607686/Screenshot_20230214_045837.png
01:59:14FromDiscord<MetuMortis> https://media.discordapp.net/attachments/371759389889003532/1074872413029928960/Screenshot_20230214_045907.png
01:59:46FromDiscord<auxym> then no idea. I haven't used intelliJ with nim personally (only java, bad memories)
02:17:00*Jjp137 quit (Ping timeout: 260 seconds)
02:17:19*Jjp137 joined #nim
02:40:36*azimut joined #nim
02:46:02*rockcavera quit (Remote host closed the connection)
02:46:37FromDiscord<ted__> If you're starting intellij from /Applications, it won't share the `$PATH` that is being set in your bashrc/zshrc. If you run it as `idea` from the command line in one of those shells, then it will share the `$PATH`
03:03:38*azimut quit (Ping timeout: 255 seconds)
03:07:56*GreaseMonkey quit (Quit: No Ping reply in 180 seconds.)
03:09:03*greaser|q joined #nim
03:15:08*arkurious quit (Quit: Leaving)
03:17:44*greaser|q quit (Changing host)
03:17:44*greaser|q joined #nim
03:17:50*greaser|q is now known as GreaseMonkey
03:37:03FromDiscord<MetuMortis> In reply to @ted__ "If you're starting intellij": yep that worked but why
03:37:07FromDiscord<MetuMortis> (edit) "In reply to @ted__ "If you're starting intellij": yep that worked ... but" added "wow"
03:42:17FromDiscord<ted__> In reply to @MetuMortis "yep that worked wow": the `$PATH` in your rc file is not a global path, it's only evaluated when you're running that shell. When IntelliJ is launched from `/Applications` it has no idea about your rc file. There are other options on OSX for setting a more global path, but they're all kind of clunky. There's a file at `/etc/paths` that can be used to set more "global" paths
03:45:31FromDiscord<MetuMortis> In reply to @ted__ "the `$PATH` in your": here? https://media.discordapp.net/attachments/371759389889003532/1074899160014278728/Screenshot_20230214_064522.png
03:47:34FromDiscord<ted__> In reply to @MetuMortis "here?": hmm... I'm not sure what mutipath is for but that isn't it. Oh, my mistake, I thought in the original screenshot you were running on OSX, but it looks like it's linux. I'm unsure where in your distro you'd set a global path, but it won't be the place I mentioned above, that's only for Macs
03:48:16FromDiscord<ted__> you might be able to set it in /etc/profile, but that'd have to be tested
03:48:23FromDiscord<huantian> etc profile should work
03:48:45*Jjp137 quit (Quit: Leaving)
03:48:53*Jjp137 joined #nim
03:49:59FromDiscord<MetuMortis> I have /etc/profile.d directory
03:50:17FromDiscord<MetuMortis> and have sh files in it
03:51:37FromDiscord<huantian> make your own `.sh` file in that directory which exports the nim path
03:51:57FromDiscord<huantian> then log out and log back in, and it should 🤞 work
03:52:55FromDiscord<MetuMortis> In reply to @MetuMortis "": I believe I should export PATH variable like in that ss (in a sh file at profile.d)
04:17:45*Jjp137 quit (Ping timeout: 260 seconds)
04:18:04*Jjp137 joined #nim
05:57:31*dropkick quit (Ping timeout: 252 seconds)
06:15:24FromDiscord<ShalokShalom> I would report that and suggest for a hint in the description
06:15:42FromDiscord<ShalokShalom> The next person runs into the exact same issue, otherwise
06:15:53FromDiscord<ShalokShalom> @MetuMortis
06:27:03*derpydoo quit (Ping timeout: 255 seconds)
07:04:48*advesperacit joined #nim
07:33:52*kenran joined #nim
07:43:16*PMunch joined #nim
09:08:03*LyndsySimon quit (Ping timeout: 255 seconds)
09:08:03*euantorano_ quit (Ping timeout: 255 seconds)
09:09:24*LyndsySimon joined #nim
09:09:30*euantorano_ joined #nim
09:09:51*GreaseMonkey quit (Ping timeout: 255 seconds)
09:10:13*greaser|q joined #nim
09:14:16FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o03
09:17:32FromDiscord<Rika> You shouldn’t, it’s private
09:17:41FromDiscord<Rika> What are your intentions in doing so
09:23:19FromDiscord<4zv4l> use `SetWindowHookEx`
09:23:37FromDiscord<4zv4l> and I need the main thread handle to not set the hook on the whole process
09:27:25PMunch@4zv4l, https://github.com/nim-lang/Nim/pull/17706
09:27:29FromDiscord<Rika> Likely you have to use another module to run processes (prolly one specific to windows) or you can use the unsafe module to
09:27:30FromDiscord<Rika> Yes
09:27:36PMunch`import osproc {.all.}` might do what you need
09:27:48FromDiscord<Rika> I thought you had to import something to get that
09:27:50PMunchWhether or not it's a good idea though is another question
09:27:57FromDiscord<Rika> Like private access or something I forget the name
09:28:00FromDiscord<Elegantbeef> Private access inside importutils
09:29:04FromDiscord<4zv4l> In reply to @PMunch "`import osproc {.all.}` might": doesn't seem to work
09:29:08FromDiscord<4zv4l> In reply to @Elegantbeef "Private access inside importutils": I'll check this
09:37:10FromDiscord<4zv4l> well actually I would need `dwThreadId` and it is not in the Process object, only the Process ID
09:39:22FromDiscord<Elegantbeef> So use `processId` and the windows api
09:43:17FromDiscord<ringabout> In reply to @PMunch "`import osproc {.all.}` might": `{.all.}` is designed for private symbols, it is not for private fields of objects.
09:46:45PMunchSounds like an oversight to me, when I say all I mean all
10:03:30FromDiscord<Phil> Ehhhh debatable
10:03:53FromDiscord<Phil> When I say all I mean "give me all symbols", not necessarily "give me all fields on types"
10:04:22PMunchGive. Me. EVERYTHING! :P
10:04:29FromDiscord<Phil> Though maybe I'm biased here because I knew importutils ahead of time
10:04:40PMunchYeah I had never heard of importutils
10:04:47PMunchSeems like a weird distinction to make to me
10:05:22FromDiscord<Elegantbeef> all imports top level symbols
10:05:30FromDiscord<Elegantbeef> I mean both are awful timo
10:05:46FromDiscord<Elegantbeef> imo 😄
10:14:30FromDiscord<Rika> The in my opinion
10:28:21*xet7 joined #nim
10:38:26FromDiscord<srozb> sent a code paste, see https://play.nim-lang.org/#ix=4o0h
10:40:19FromDiscord<Rika> Packed pragma I think
10:40:29FromDiscord<Rika> That would also move the field after that
10:43:22FromDiscord<srozb> wokred! thank you!
10:50:40*ltriant quit (Ping timeout: 252 seconds)
11:10:28*jmdaemon quit (Ping timeout: 252 seconds)
12:05:45FromDiscord<Zoom> I think I have a [deadlocked workflow](https://github.com/nim-lang/threading/actions/runs/4173282457) in Nim's GH actions. Ping @ringabout
12:09:39FromDiscord<4zv4l> are `cstring` automatically realloc ?
12:09:57FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0M
12:11:43FromDiscord<ringabout> In reply to @Zoom "I think I have": I don't have access to this repo.
12:12:04FromDiscord<auxym> I'm not sure what you mean by automatically realloc. But this part looks very suspicious to me `len(cast[cstring](cptr))`
12:13:06FromDiscord<enthus1ast> but it should work, if the cstring is \\0 terminated
12:13:40FromDiscord<enthus1ast> i think \:)
12:14:18FromDiscord<auxym> like strlen its unbounded and will just increment until it finds a null byte/ It's a recipe for memory corruption (or worse: see heartbleed). You'd have to been very, very sure about what that pointer is pointing to. And even then, good practice IMO would be to pass in a known length instead of using len (strlen)
12:14:21FromDiscord<enthus1ast> but the order of the arguments to copyMem is wrong
12:15:25Amun-Ra4zv4l: no, cstring won't extend its size to fit the data
12:15:52FromDiscord<4zv4l> that's my function for now
12:15:52FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0O
12:15:55FromDiscord<4zv4l> but it segfaults
12:16:08FromDiscord<4zv4l> In reply to @Amun-Ra "<@329196212282458112>: no, cstring won't": so I have to manually alloc ?
12:16:24Amun-Rayes
12:16:39Amun-Raor, just use $ and make string out of it
12:16:56FromDiscord<4zv4l> I'm so silly
12:17:03FromDiscord<4zv4l> I was copyMem in the wrong sense
12:17:22FromDiscord<auxym> `var str: cstring` yeah that's a null pointer
12:17:31Amun-Raand as enthus1ast have said, you copy from dest to source
12:17:31FromDiscord<4zv4l> can I copy data to it with memCopy ?
12:17:41FromDiscord<4zv4l> In reply to @Amun-Ra "and as enthus1ast have": yeah yeah, was wrong
12:17:49FromDiscord<auxym> In reply to @4zv4l "can I copy data": no, doing anything with a null pointer is UB
12:18:10Amun-Ralen(cast[cstring](cptr)) does not return cstring length
12:18:17Amun-Rahmm, sec
12:18:30FromDiscord<4zv4l> does changing `cstring` to `string` will change that and realloc automatically ?
12:18:46Amun-Ra4zv4l: echo repr $cast[cstring](cptr[0].addr)
12:18:54FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0R
12:19:02Amun-RaI mean unsafeaddr or make cptr a var
12:19:24FromDiscord<4zv4l> I can use a string↵I was using cstring because I thought that would be easier to deal with copyMem
12:19:45Amun-Rayou usually convert to string as soon as possible
12:19:45FromDiscord<auxym> In reply to @4zv4l "does changing `cstring` to": you'll still need to specify length `newString(somelen)`
12:19:48FromDiscord<amadan> sent a code paste, see https://play.nim-lang.org/#ix=4o0S
12:19:50FromDiscord<enthus1ast> if the goal is to copy contents of the pointer to the cstring
12:19:50FromDiscord<enthus1ast> but then, no copy is needed at all
12:19:51FromDiscord<enthus1ast> if the goal is to acces the pointer as a cstring and not to copy it
12:19:51FromDiscord<enthus1ast> just a cast should do fine
12:20:54Amun-Ra4zv4l: there are several problems with your approch, you are trying to copymem to an empty string (var str: string == "")
12:22:01FromDiscord<auxym> In reply to @auxym "you'll still need to": and then use `somelen` as the length in your copymem to ensure you don't write past the memory allocated to your string
12:22:03Amun-Ra4zv4l: use $ to make a string with the data of cstring or make newString(some_initial_length) and copymem if you must
12:22:05FromDiscord<4zv4l> I just wanna copy the content of the clipboard
12:22:35FromDiscord<auxym> but you don't know its length? Are you sure its null terminated?
12:22:53FromDiscord<auxym> I mean in theory a clipboard could hold null bytes....
12:23:06FromDiscord<auxym> what does that GlobalLock proc do?
12:23:22*ltriant joined #nim
12:23:24Amun-Ra4zv4l: https://play.nim-lang.org/#ix=4o0T
12:23:25FromDiscord<4zv4l> it lock the memory to be sure another process doesn't write to it
12:23:50Amun-Ra4zv4l: fixed: https://play.nim-lang.org/#ix=4o0U
12:24:06FromDiscord<auxym> ok but do you have any way of doing the length of the CB content?
12:24:32FromDiscord<auxym> knowing
12:24:50Amun-Rathat code assumes the data returned by GlobalLock is null terminated
12:26:08FromDiscord<4zv4l> well, I don't know if I have a way to know↵the data I put inside should be null terminated but if another process but data in the clipboard idk how to know if it is null terminated
12:26:59FromDiscord<auxym> yeah, that whole thing is memory corruption waiting to happen then. You need to find a way to get that length in a sure way
12:27:33FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4o0V
12:27:35FromDiscord<enthus1ast> soo
12:28:02FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0W
12:28:12FromDiscord<4zv4l> In reply to @enthus1ast "i've done it like": I'll try this one
12:28:33FromDiscord<4zv4l> In reply to @enthus1ast "i've done it like": you did not lock the data ?
12:28:37FromDiscord<enthus1ast> but this is veeery old code \:)
12:29:56FromDiscord<enthus1ast> and it does not even error out when it cannot open...
12:31:26FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0X
12:31:29Amun-Ra4zv4l: have you tested my code sample?
12:31:30FromDiscord<4zv4l> at the `copyMem` line
12:31:36FromDiscord<4zv4l> yes I did
12:33:07FromDiscord<4zv4l> I'm trying to fix a casting error with it
12:33:30Amun-Rawhat error?
12:34:02FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0Y
12:34:22Amun-Raah, replace == nil with == 0
12:34:30Amun-Raor comment it out for time being
12:34:31FromDiscord<4zv4l> yeah just did↵compiling
12:34:47FromDiscord<4zv4l> the laptop they gave me is super slow↵take 3 minutes to compile lol
12:34:51FromDiscord<4zv4l> (edit) "slow↵take" => "slow↵takes"
12:36:38FromDiscord<4zv4l> the last line also type error
12:36:48FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o10
12:36:59FromDiscord<4zv4l> ` $cast[cstring](cptr[0].zddr)`
12:37:49FromDiscord<4zv4l> `$(cast[cstring](cptr)[0].addr)` ?
12:37:55FromDiscord<4zv4l> (edit) "$cast[cstring](cptr[0].zddr)`" => "$cast[cstring](cptr[0].addr)`"
12:38:05Amun-Rayes
12:39:42FromDiscord<4zv4l> the expression has no address, is telling me the compiler
12:39:53Amun-Rahave you set cptr to var?
12:40:22FromDiscord<4zv4l> what about this↵`$(cast[cstring](cptr))`
12:40:35FromDiscord<4zv4l> yes I took your code
12:41:07Amun-Rapost full compiler message
12:41:50FromDiscord<4zv4l> In reply to @4zv4l "what about this `$(cast[cstring](cptr))`": with this I get no error↵and also with↵`$(cast[cstring](cptr)[0])`
12:42:35Amun-Raah, I see what type GlobalLock returns, you can't [] on it
12:42:47Amun-Ra$cast[cstring](cptr) is fine
12:43:01*Amun-Ra is not a huge fan of winapi
12:44:15FromDiscord<4zv4l> In reply to @4zv4l "what about this `$(cast[cstring](cptr))`": so this one ?
12:44:56Amun-Rayes
12:45:12Amun-RaLPVOID GlobalLock(HGLOBAL hMem);
12:45:30Amun-Rait's LPVOID == opaque pointer
12:45:45Amun-Rathat's why [0] doesn't work
12:49:17FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o15
12:49:20FromDiscord<4zv4l> my clipboard doesn't stop crashing lol
12:54:27Amun-RaGetClipboardData may return NULL, GlobalLock may return NULL
12:55:54Amun-Raother than that, it looks ok
12:55:56Amun-Raish
12:56:30FromDiscord<4zv4l> ok almost working !
12:56:47FromDiscord<4zv4l> just some weird stuff when using `len(cstr)` I get the length - 1
12:56:54FromDiscord<4zv4l> so I added `len(cstr) + 1`
12:58:30Amun-RaI thought we're talking about my example ;>
13:03:16FromDiscord<4zv4l> yeah, the len(cstr) is for the `setClipboardData`
13:03:25FromDiscord<4zv4l> I took yours for `getClipboardData`
13:08:04PMunchIs there a way to get the current module?
13:08:13PMunchLike the name of it
13:16:01Amun-Rayes, sec
13:16:20Amun-RaI'll show you how I did that
13:18:14Amun-RaPMunch: https://play.nim-lang.org/#ix=4o1j
13:21:39PMunchYeah, that gives me the filename, which is better than nothing
13:21:44Amun-Rait can be quite picky, if you omit const result it won't work
13:22:04PMunchBut it won't help me distinguish between package1/mymodule and package2/mymodule
13:22:14Amun-Rahmm
13:22:26PMunchYeah instantiationInfo can be a bit tricky
13:23:05Amun-Raso you don't need rsplit('/', 1) but something that will get not the file name but the filename along a part of the project path
13:23:30PMunchWell I guess what you actually want is to scan upwards for a .nimble file
13:23:52Amun-Ragimme sec
13:23:58Amun-Rais there something that returns project dir?
13:25:16Amun-RaI have na idea
13:27:46*derpydoo joined #nim
13:31:40*kenran quit (Remote host closed the connection)
13:31:42Amun-RaPMunch: https://play.nim-lang.org/#ix=4o1t
13:32:04Amun-Rasrc/foo/bar/baz.nim will return foo.bar.baz
13:41:22PMunchStill won't work if you specify a different srcDir in your nimble folder
13:41:51Amun-RaI have a simpler use case
13:42:23PMunchWe should really have a nimbleutils package
13:44:44PMunchI guess calling `nimble dump` and parsing it would do the trick
13:50:07FromDiscord<MetuMortis> sent a code paste, see https://play.nim-lang.org/#ix=4o1D
13:50:46FromDiscord<MetuMortis> but it does not change the directory at my shell
13:50:59FromDiscord<MetuMortis> https://media.discordapp.net/attachments/371759389889003532/1075051533219156008/Screenshot_20230214_165053.png
13:53:33FromDiscord<Rika> `cd` is implemented by the shell and is not a binary; i believe binaries cannot change the pwd of the shell without manipulating the shell somehow
13:53:50FromDiscord<Rika> chdir changes the pwd of the running process
13:54:01FromDiscord<Rika> https://pubs.opengroup.org/onlinepubs/009695299/functions/chdir.html
13:54:04FromDiscord<Rika> sent a code paste, see https://play.nim-lang.org/#ix=4o1F
13:55:02FromDiscord<MetuMortis> In reply to @Rika "`cd` is implemented by": does that mean it is not replicateable
13:55:14FromDiscord<Rika> i dont truly know, but i believe so
13:55:19FromDiscord<Rika> you will need to do more research
13:55:28*dropkick joined #nim
14:01:52FromDiscord<enthus1ast> https://forum.nim-lang.org/t/9889
14:02:06FromDiscord<enthus1ast> ^ About "robots.txt and sitemap for the forum."
14:02:35FromDiscord<enthus1ast> today we discussed this in the offtopic channel
14:04:37FromDiscord<auxym> In reply to @MetuMortis "does that mean it": pretty much yeah. cd is "intrinsic" to the shell. The only way it would be possible is if the shell offered some sort of API over IPC
14:05:01FromDiscord<auxym> or make a whole shell in Nim 😉
14:24:39PMunchHmm, why don't we have a type for File or Folder in Nim? If for nothing else to be able to return it from procs and overload other procs with them
14:29:01FromDiscord<enthus1ast> also for absolute and relative folders and files
14:37:03FromDiscord<Rika> so basuically nim pathlib
15:23:18PMunchBe the change you want to see in the world: https://github.com/PMunch/nimbleutils
15:23:31PMunchCome on, let's gather all the handy Nimble hacks in one place :)
15:23:39*PMunch quit (Quit: Leaving)
15:48:24*arkurious joined #nim
15:48:52FromDiscord<Phil> In reply to @PMunch "Be the change you": provide a getField macro and setField template for the macro uninitiated
15:49:08FromDiscord<Phil> Also a macro to unroll forloops of compile-time seqs or arrays
15:49:15FromDiscord<Phil> I got both of those ready to go
15:58:17FromDiscord<Phil> Well, more like I stole both of those
16:32:42*azimut joined #nim
16:39:17*systemdsucks quit (Ping timeout: 256 seconds)
16:39:25*systemdsucks joined #nim
16:49:18*arkurious quit (Ping timeout: 255 seconds)
16:52:54*greaser|q quit (Ping timeout: 255 seconds)
16:53:22*greaser|q joined #nim
16:54:34*rockcavera joined #nim
16:55:32FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3D
17:02:39*arkurious joined #nim
17:04:18FromDiscord<Rika> `func caddr(v: var (Vec2 or Vec3 or Vec4)): ptr float32 =`
17:07:47FromDiscord<sOkam!> @Rika tried that, and also writing var vec2 | var vec3 etc and it didn't work either
17:08:09FromDiscord<Rika> In reply to @Rika "`func caddr*(v: var (Vec2": this worked for me when i tried it
17:08:36FromDiscord<sOkam!> then the error is misleading as usual, but its failing for me
17:09:17FromDiscord<sOkam!> i had to change vmath from template to proc to reach this error at all, it was just blindly failing somewhere before
17:12:25FromDiscord<ringabout> irrc, it seems to be an issue, you should use the verbose type.
17:12:29FromDiscord<Nerve> Your `[]` dereference probably needs a var version
17:13:31FromDiscord<sOkam!> the var version exists, but it also fails with that one
17:13:58FromDiscord<sOkam!> all of them resolve to non-var for some reason, or the error is failing to catch the actual error
17:15:00FromDiscord<sOkam!> @ringabout how do you use the verbose type?
17:16:07FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3O
17:17:18FromDiscord<ringabout> `var Vec2|var Vec3| var Vec4`
17:17:36FromDiscord<sOkam!> i tried that, as i mentioned, but it fails the same way
17:18:37FromDiscord<ringabout> IS there a reproducible example
17:18:50FromDiscord<ringabout> (edit) "IS" => "Is" | "example" => "example?"
17:19:28FromDiscord<sOkam!> there isn't, but this is way beyond stuck, so i guess i should make one 😔
17:22:34FromDiscord<Odi> sent a code paste, see https://play.nim-lang.org/#ix=4o3S
17:22:58FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3T
17:23:27FromDiscord<enthus1ast> @Odi\: zigcc is a workaround package you must install first
17:23:59FromDiscord<enthus1ast> https://github.com/enthus1ast/zigcc
17:24:05FromDiscord<enthus1ast> nimble install zigcc
17:25:36FromDiscord<enthus1ast> it works around the issue that the compiler cannot call "zig cc" in the correct way
17:26:29FromDiscord<ringabout> In reply to @sOkam! "<@658563905425244160> well that was": The real problem is that `arr` is a private field. You cannot access it from the other modules.
17:26:47FromDiscord<ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4o3Y
17:26:48FromDiscord<ringabout> Works for me
17:27:09FromDiscord<ringabout> ? ptr -7.223747220528534e-27
17:27:14FromDiscord<ringabout> (edit) "?" => ">"
17:27:32FromDiscord<sOkam!> In reply to @ringabout "The real problem is": why is it a template then?
17:33:44FromDiscord<sOkam!> @ringabout I copy/pasted your code and it fails the same way for me↵is my nim install broken or something?
17:34:21FromDiscord<guttural666> any way to get Bands from Band at compile time? searching for something that is similar to comptime returning of types as values in Zig https://media.discordapp.net/attachments/371759389889003532/1075107743523942470/image.png
17:34:25*xet7 quit (Remote host closed the connection)
17:35:39FromDiscord<guttural666> (edit) "any way to get Bands from Band at compile time? searching for something that is similar to comptime returning of types as values in Zig ... https://media.discordapp.net/attachments/371759389889003532/1075107743523942470/image.png" added "(or just say, learn macros, then I will do that 😄 )"
17:39:24FromDiscord<sOkam!> oh, if I remove the multitypes it works? 🧩↵very lost in how that could make it break 🤷‍♂️
17:55:40FromDiscord<auxym> In reply to @guttural666 "any way to get": not 100% sure but I can you could do something like `bindSym("Bands").getImpl` or similar. Or directly pass in `Bands` as a typed node... or if all you have is the `Band` ident (untyped) then `bindSym($id & "s")`
17:59:38FromDiscord<auxym> not clear exactly what you want to do
18:00:03FromDiscord<niguss_101-_-> Can I ask u guys about html
18:04:19FromDiscord<Phil> We got a webdev channel if it is just about html, should also be available on matrix to find
18:05:02FromDiscord<niguss_101-_-> There are a lots of matrix channels bro which one do u recommend me to join brother
18:06:05FromDiscord<enthus1ast> niguss\_101-\_-\: https://matrix.to/#/#nim-webdev:matrix.org
18:06:15FromDiscord<guttural666> In reply to @auxym "not 100% sure but": I want to just type in a type, "normal" OOP style and let the compiler generate my SOA for me
18:06:45FromDiscord<guttural666> (edit) "In reply to @auxym "not 100% sure but": I want to just type in a type, "normal" OOP style and let the compiler generate my SOA for me ... " added "(least invasive way you know of)"
18:06:53FromDiscord<niguss_101-_-> Thank you sir
18:12:21FromDiscord<auxym> In reply to @guttural666 "I want to just": oh you want to generate the type? then yeah pass in `Band` as a typed node, use `getImpl` to introspect it and the build the object def AST as you wish
18:12:53FromDiscord<auxym> beef's macro tutorial is a pretty good intro I think: https://dev.to/beef331/demystification-of-macros-in-nim-13n8
18:14:03*greaser|q quit (Changing host)
18:14:03*greaser|q joined #nim
18:14:05*greaser|q is now known as GreaseMonkey
18:19:47FromDiscord<guttural666> In reply to @auxym "oh you want to": thank you!!!
18:20:05FromDiscord<guttural666> (edit) "In reply to @auxym "oh you want to": thank you!!! ... " added "just the hint I needed, that is why I love this channel"
18:32:20*arkurious quit (Ping timeout: 260 seconds)
18:45:39*arkurious joined #nim
19:01:46FromDiscord<srozb> sent a code paste, see https://play.nim-lang.org/#ix=4o4C
19:02:54FromDiscord<srozb> oh, never mind, it worked
19:05:12FromDiscord<auxym> @srozb `{.size.}` pragma
19:14:28FromDiscord<pmunch> How are these related to Nimble?↵(@Phil)
19:17:39FromDiscord<Phil> In reply to @pmunch "How are these related": I've just cursory seen utils and you mentioning nim hacks and kinda overread the "ble" part, I'll be honest... and tired ^^'
19:24:27FromDiscord<sOkam!> sent a long message, see http://ix.io/4o4K
19:26:30FromDiscord<sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o4N
19:45:01*xet7 joined #nim
19:52:15FromDiscord<Phil> In reply to @sOkam! "<@696333749570371585> I find this": Configurability in what sense?
19:52:40FromDiscord<Phil> Like, what is it you'd want to configure that you couldn't do in separate nimble tasks?
19:53:38FromDiscord<guttural666> In reply to @guttural666 "any way to get": I think a name search array of i32 would also be great for performance right? cache friendly stuff?
19:53:59FromDiscord<guttural666> (edit) "In reply to @guttural666 "any way to get": I think a name search array of i32 ... would" added " for the name"
19:57:16*jmdaemon joined #nim
20:13:34FromDiscord<Hourglass [She/Her]> Should a lexer parse `24.12` as `Number, Dot, Twelve` or `Number`?
20:14:17FromDiscord<Hourglass [She/Her]> (edit) "Twelve`" => "Number`"
20:14:31FromDiscord<enthus1ast> `Number, Dot, Number` or `Number` both can work
20:15:57FromDiscord<enthus1ast> it shifts complexity eiter to the lexer or the parser
20:17:57FromDiscord<sOkam!> In reply to @Isofruit "Like, what is it": the temporality of the task is what's powerful about it↵it doesn't store anything, it builds the file and then deletes it↵you could change nim c to nimble c, but the task would be the same in essence
20:18:01FromDiscord<Hourglass [She/Her]> Hm... I think it'd be better to pass that to the parser than
20:18:40FromDiscord<enthus1ast> you can also have several parser passes
20:18:42FromDiscord<sOkam!> (edit) "essence" => "essence↵you cannot do that with nim commands separately, unless you make a specific task for it (which is what the any task does)"
20:20:29FromDiscord<enthus1ast> sent a long message, see http://ix.io/4o50
20:42:07FromDiscord<T0lk1en> How to check if string contains substring? Tried strutils contains but that only deals w chars
20:42:40FromDiscord<T0lk1en> I also don’t want to return the string or the position. I want to return a book
20:42:42FromDiscord<T0lk1en> Bool
20:44:28FromDiscord<Yepoleb> there are two contains, one deals with strings
20:44:44*azimut quit (Ping timeout: 255 seconds)
20:46:18FromDiscord<sOkam!> @T0lk1en have you tried `in`, which is an alias for contains?
20:49:54FromDiscord<BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4o5b
20:50:51FromDiscord<T0lk1en> In reply to @Yepoleb "there are two contains,": What is the name of the string one
20:51:13FromDiscord<Yepoleb> also contains
20:51:25FromDiscord<Yepoleb> https://nim-lang.org/docs/strutils.html#contains%2Cstring%2Cstring
20:52:29FromDiscord<T0lk1en> on my mother that’s what I’m using
20:53:36FromDiscord<Yandall> Is there a proc to flat a seq like this one `[["a","b"],["c","d],["e"]]`
20:53:41FromDiscord<Yandall> (edit) "`[["a","b"],["c","d],["e"]]`" => "`[["a","b"],["c","d],["e"]]`?"
20:54:39*jmdaemon quit (Ping timeout: 255 seconds)
20:56:24FromDiscord<Yepoleb> In reply to @BobBBob "What's the right way": unfortunately there is no pretty way to convert a seq to string, the efficient way would be to copyMem into a preallocated string
20:58:15FromDiscord<T0lk1en> sent a code paste, see https://play.nim-lang.org/#ix=4o5f
20:58:47FromDiscord<T0lk1en> sent a code paste, see https://play.nim-lang.org/#ix=4o5g
20:59:08FromDiscord<T0lk1en> but im getting errors with contains. It wants a char.
21:00:35FromDiscord<BobBBob> Are you using the contains in the system module or the one in strutils?
21:00:40FromDiscord<T0lk1en> strutils
21:00:54FromDiscord<Yepoleb> did you import it?
21:01:11FromDiscord<T0lk1en> dude. Fuck me i didnt import strutils. Thank you
21:01:18FromDiscord<T0lk1en> lmaooo
21:02:46FromDiscord<Yepoleb> classic mistake
21:02:58FromDiscord<T0lk1en> I was sitting here banging my head like what?
21:03:36FromDiscord<BobBBob> In reply to @Yepoleb "unfortunately there is no": feel like that should be in std, so there's no better way to apply a map to a string? Maybe I should use regex instead
21:04:00FromDiscord<Yepoleb> i'd write a for loop instead of using map
21:12:46*xet7 quit (Remote host closed the connection)
21:28:55FromDiscord<Elegantbeef> Ideally a `seq[char]` `array[x, char]` and a `string` all can use the same operations
21:29:12FromDiscord<Elegantbeef> It's a tinge annoying having any procedure work with `string`
21:35:45*beholders_eye joined #nim
21:42:15*beholders_eye quit (Ping timeout: 260 seconds)
21:51:48*advesperacit quit ()
21:51:59FromDiscord<PMunch> In reply to @sOkam! "<@696333749570371585> I find this": Not exactly what I had in mind, but definitely fits! I'll add it in
21:54:43FromDiscord<PMunch> In reply to @Yepoleb "unfortunately there is no": The most efficient is simply `cast[string](myCharSeq)`, they are the same type under the hood
21:56:46FromDiscord<Elegantbeef> Well that only works if you never accidently use them as `cstring`
22:03:27*jmdaemon joined #nim
22:25:55*onetwo5 joined #nim
22:26:37*onetwo quit (Read error: Connection reset by peer)
22:26:38*onetwo5 is now known as onetwo
22:28:02*luis_ quit (Quit: luis_)
22:32:30FromDiscord<Yepoleb> In reply to @PMunch "The most efficient is": That's too far into implementation defined behavior for me
23:06:00*tiorock joined #nim
23:06:00*tiorock quit (Changing host)
23:06:00*tiorock joined #nim
23:06:00*rockcavera is now known as Guest7036
23:06:00*tiorock is now known as rockcavera
23:09:25*Guest7036 quit (Ping timeout: 260 seconds)
23:56:02*qwestion quit (Ping timeout: 265 seconds)
23:57:42*jmdaemon quit (Ping timeout: 255 seconds)