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:08 | FromDiscord | <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:17 | FromDiscord | <auxym> install nim? |
01:54:45 | * | beholders_eye quit (Ping timeout: 252 seconds) |
01:57:02 | * | termer joined #nim |
01:58:44 | FromDiscord | <MetuMortis> In reply to @auxym "install nim?": https://media.discordapp.net/attachments/371759389889003532/1074872287066607686/Screenshot_20230214_045837.png |
01:59:14 | FromDiscord | <MetuMortis> https://media.discordapp.net/attachments/371759389889003532/1074872413029928960/Screenshot_20230214_045907.png |
01:59:46 | FromDiscord | <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:37 | FromDiscord | <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:03 | FromDiscord | <MetuMortis> In reply to @ted__ "If you're starting intellij": yep that worked but why |
03:37:07 | FromDiscord | <MetuMortis> (edit) "In reply to @ted__ "If you're starting intellij": yep that worked ... but" added "wow" |
03:42:17 | FromDiscord | <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:31 | FromDiscord | <MetuMortis> In reply to @ted__ "the `$PATH` in your": here? https://media.discordapp.net/attachments/371759389889003532/1074899160014278728/Screenshot_20230214_064522.png |
03:47:34 | FromDiscord | <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:16 | FromDiscord | <ted__> you might be able to set it in /etc/profile, but that'd have to be tested |
03:48:23 | FromDiscord | <huantian> etc profile should work |
03:48:45 | * | Jjp137 quit (Quit: Leaving) |
03:48:53 | * | Jjp137 joined #nim |
03:49:59 | FromDiscord | <MetuMortis> I have /etc/profile.d directory |
03:50:17 | FromDiscord | <MetuMortis> and have sh files in it |
03:51:37 | FromDiscord | <huantian> make your own `.sh` file in that directory which exports the nim path |
03:51:57 | FromDiscord | <huantian> then log out and log back in, and it should 🤞 work |
03:52:55 | FromDiscord | <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:24 | FromDiscord | <ShalokShalom> I would report that and suggest for a hint in the description |
06:15:42 | FromDiscord | <ShalokShalom> The next person runs into the exact same issue, otherwise |
06:15:53 | FromDiscord | <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:16 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o03 |
09:17:32 | FromDiscord | <Rika> You shouldn’t, it’s private |
09:17:41 | FromDiscord | <Rika> What are your intentions in doing so |
09:23:19 | FromDiscord | <4zv4l> use `SetWindowHookEx` |
09:23:37 | FromDiscord | <4zv4l> and I need the main thread handle to not set the hook on the whole process |
09:27:25 | PMunch | @4zv4l, https://github.com/nim-lang/Nim/pull/17706 |
09:27:29 | FromDiscord | <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:30 | FromDiscord | <Rika> Yes |
09:27:36 | PMunch | `import osproc {.all.}` might do what you need |
09:27:48 | FromDiscord | <Rika> I thought you had to import something to get that |
09:27:50 | PMunch | Whether or not it's a good idea though is another question |
09:27:57 | FromDiscord | <Rika> Like private access or something I forget the name |
09:28:00 | FromDiscord | <Elegantbeef> Private access inside importutils |
09:29:04 | FromDiscord | <4zv4l> In reply to @PMunch "`import osproc {.all.}` might": doesn't seem to work |
09:29:08 | FromDiscord | <4zv4l> In reply to @Elegantbeef "Private access inside importutils": I'll check this |
09:37:10 | FromDiscord | <4zv4l> well actually I would need `dwThreadId` and it is not in the Process object, only the Process ID |
09:39:22 | FromDiscord | <Elegantbeef> So use `processId` and the windows api |
09:43:17 | FromDiscord | <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:45 | PMunch | Sounds like an oversight to me, when I say all I mean all |
10:03:30 | FromDiscord | <Phil> Ehhhh debatable |
10:03:53 | FromDiscord | <Phil> When I say all I mean "give me all symbols", not necessarily "give me all fields on types" |
10:04:22 | PMunch | Give. Me. EVERYTHING! :P |
10:04:29 | FromDiscord | <Phil> Though maybe I'm biased here because I knew importutils ahead of time |
10:04:40 | PMunch | Yeah I had never heard of importutils |
10:04:47 | PMunch | Seems like a weird distinction to make to me |
10:05:22 | FromDiscord | <Elegantbeef> all imports top level symbols |
10:05:30 | FromDiscord | <Elegantbeef> I mean both are awful timo |
10:05:46 | FromDiscord | <Elegantbeef> imo 😄 |
10:14:30 | FromDiscord | <Rika> The in my opinion |
10:28:21 | * | xet7 joined #nim |
10:38:26 | FromDiscord | <srozb> sent a code paste, see https://play.nim-lang.org/#ix=4o0h |
10:40:19 | FromDiscord | <Rika> Packed pragma I think |
10:40:29 | FromDiscord | <Rika> That would also move the field after that |
10:43:22 | FromDiscord | <srozb> wokred! thank you! |
10:50:40 | * | ltriant quit (Ping timeout: 252 seconds) |
11:10:28 | * | jmdaemon quit (Ping timeout: 252 seconds) |
12:05:45 | FromDiscord | <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:39 | FromDiscord | <4zv4l> are `cstring` automatically realloc ? |
12:09:57 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0M |
12:11:43 | FromDiscord | <ringabout> In reply to @Zoom "I think I have": I don't have access to this repo. |
12:12:04 | FromDiscord | <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:06 | FromDiscord | <enthus1ast> but it should work, if the cstring is \\0 terminated |
12:13:40 | FromDiscord | <enthus1ast> i think \:) |
12:14:18 | FromDiscord | <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:21 | FromDiscord | <enthus1ast> but the order of the arguments to copyMem is wrong |
12:15:25 | Amun-Ra | 4zv4l: no, cstring won't extend its size to fit the data |
12:15:52 | FromDiscord | <4zv4l> that's my function for now |
12:15:52 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0O |
12:15:55 | FromDiscord | <4zv4l> but it segfaults |
12:16:08 | FromDiscord | <4zv4l> In reply to @Amun-Ra "<@329196212282458112>: no, cstring won't": so I have to manually alloc ? |
12:16:24 | Amun-Ra | yes |
12:16:39 | Amun-Ra | or, just use $ and make string out of it |
12:16:56 | FromDiscord | <4zv4l> I'm so silly |
12:17:03 | FromDiscord | <4zv4l> I was copyMem in the wrong sense |
12:17:22 | FromDiscord | <auxym> `var str: cstring` yeah that's a null pointer |
12:17:31 | Amun-Ra | and as enthus1ast have said, you copy from dest to source |
12:17:31 | FromDiscord | <4zv4l> can I copy data to it with memCopy ? |
12:17:41 | FromDiscord | <4zv4l> In reply to @Amun-Ra "and as enthus1ast have": yeah yeah, was wrong |
12:17:49 | FromDiscord | <auxym> In reply to @4zv4l "can I copy data": no, doing anything with a null pointer is UB |
12:18:10 | Amun-Ra | len(cast[cstring](cptr)) does not return cstring length |
12:18:17 | Amun-Ra | hmm, sec |
12:18:30 | FromDiscord | <4zv4l> does changing `cstring` to `string` will change that and realloc automatically ? |
12:18:46 | Amun-Ra | 4zv4l: echo repr $cast[cstring](cptr[0].addr) |
12:18:54 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0R |
12:19:02 | Amun-Ra | I mean unsafeaddr or make cptr a var |
12:19:24 | FromDiscord | <4zv4l> I can use a string↵I was using cstring because I thought that would be easier to deal with copyMem |
12:19:45 | Amun-Ra | you usually convert to string as soon as possible |
12:19:45 | FromDiscord | <auxym> In reply to @4zv4l "does changing `cstring` to": you'll still need to specify length `newString(somelen)` |
12:19:48 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4o0S |
12:19:50 | FromDiscord | <enthus1ast> if the goal is to copy contents of the pointer to the cstring |
12:19:50 | FromDiscord | <enthus1ast> but then, no copy is needed at all |
12:19:51 | FromDiscord | <enthus1ast> if the goal is to acces the pointer as a cstring and not to copy it |
12:19:51 | FromDiscord | <enthus1ast> just a cast should do fine |
12:20:54 | Amun-Ra | 4zv4l: there are several problems with your approch, you are trying to copymem to an empty string (var str: string == "") |
12:22:01 | FromDiscord | <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:03 | Amun-Ra | 4zv4l: use $ to make a string with the data of cstring or make newString(some_initial_length) and copymem if you must |
12:22:05 | FromDiscord | <4zv4l> I just wanna copy the content of the clipboard |
12:22:35 | FromDiscord | <auxym> but you don't know its length? Are you sure its null terminated? |
12:22:53 | FromDiscord | <auxym> I mean in theory a clipboard could hold null bytes.... |
12:23:06 | FromDiscord | <auxym> what does that GlobalLock proc do? |
12:23:22 | * | ltriant joined #nim |
12:23:24 | Amun-Ra | 4zv4l: https://play.nim-lang.org/#ix=4o0T |
12:23:25 | FromDiscord | <4zv4l> it lock the memory to be sure another process doesn't write to it |
12:23:50 | Amun-Ra | 4zv4l: fixed: https://play.nim-lang.org/#ix=4o0U |
12:24:06 | FromDiscord | <auxym> ok but do you have any way of doing the length of the CB content? |
12:24:32 | FromDiscord | <auxym> knowing |
12:24:50 | Amun-Ra | that code assumes the data returned by GlobalLock is null terminated |
12:26:08 | FromDiscord | <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:59 | FromDiscord | <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:33 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4o0V |
12:27:35 | FromDiscord | <enthus1ast> soo |
12:28:02 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0W |
12:28:12 | FromDiscord | <4zv4l> In reply to @enthus1ast "i've done it like": I'll try this one |
12:28:33 | FromDiscord | <4zv4l> In reply to @enthus1ast "i've done it like": you did not lock the data ? |
12:28:37 | FromDiscord | <enthus1ast> but this is veeery old code \:) |
12:29:56 | FromDiscord | <enthus1ast> and it does not even error out when it cannot open... |
12:31:26 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0X |
12:31:29 | Amun-Ra | 4zv4l: have you tested my code sample? |
12:31:30 | FromDiscord | <4zv4l> at the `copyMem` line |
12:31:36 | FromDiscord | <4zv4l> yes I did |
12:33:07 | FromDiscord | <4zv4l> I'm trying to fix a casting error with it |
12:33:30 | Amun-Ra | what error? |
12:34:02 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o0Y |
12:34:22 | Amun-Ra | ah, replace == nil with == 0 |
12:34:30 | Amun-Ra | or comment it out for time being |
12:34:31 | FromDiscord | <4zv4l> yeah just did↵compiling |
12:34:47 | FromDiscord | <4zv4l> the laptop they gave me is super slow↵take 3 minutes to compile lol |
12:34:51 | FromDiscord | <4zv4l> (edit) "slow↵take" => "slow↵takes" |
12:36:38 | FromDiscord | <4zv4l> the last line also type error |
12:36:48 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o10 |
12:36:59 | FromDiscord | <4zv4l> ` $cast[cstring](cptr[0].zddr)` |
12:37:49 | FromDiscord | <4zv4l> `$(cast[cstring](cptr)[0].addr)` ? |
12:37:55 | FromDiscord | <4zv4l> (edit) "$cast[cstring](cptr[0].zddr)`" => "$cast[cstring](cptr[0].addr)`" |
12:38:05 | Amun-Ra | yes |
12:39:42 | FromDiscord | <4zv4l> the expression has no address, is telling me the compiler |
12:39:53 | Amun-Ra | have you set cptr to var? |
12:40:22 | FromDiscord | <4zv4l> what about this↵`$(cast[cstring](cptr))` |
12:40:35 | FromDiscord | <4zv4l> yes I took your code |
12:41:07 | Amun-Ra | post full compiler message |
12:41:50 | FromDiscord | <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:35 | Amun-Ra | ah, I see what type GlobalLock returns, you can't [] on it |
12:42:47 | Amun-Ra | $cast[cstring](cptr) is fine |
12:43:01 | * | Amun-Ra is not a huge fan of winapi |
12:44:15 | FromDiscord | <4zv4l> In reply to @4zv4l "what about this `$(cast[cstring](cptr))`": so this one ? |
12:44:56 | Amun-Ra | yes |
12:45:12 | Amun-Ra | LPVOID GlobalLock(HGLOBAL hMem); |
12:45:30 | Amun-Ra | it's LPVOID == opaque pointer |
12:45:45 | Amun-Ra | that's why [0] doesn't work |
12:49:17 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4o15 |
12:49:20 | FromDiscord | <4zv4l> my clipboard doesn't stop crashing lol |
12:54:27 | Amun-Ra | GetClipboardData may return NULL, GlobalLock may return NULL |
12:55:54 | Amun-Ra | other than that, it looks ok |
12:55:56 | Amun-Ra | ish |
12:56:30 | FromDiscord | <4zv4l> ok almost working ! |
12:56:47 | FromDiscord | <4zv4l> just some weird stuff when using `len(cstr)` I get the length - 1 |
12:56:54 | FromDiscord | <4zv4l> so I added `len(cstr) + 1` |
12:58:30 | Amun-Ra | I thought we're talking about my example ;> |
13:03:16 | FromDiscord | <4zv4l> yeah, the len(cstr) is for the `setClipboardData` |
13:03:25 | FromDiscord | <4zv4l> I took yours for `getClipboardData` |
13:08:04 | PMunch | Is there a way to get the current module? |
13:08:13 | PMunch | Like the name of it |
13:16:01 | Amun-Ra | yes, sec |
13:16:20 | Amun-Ra | I'll show you how I did that |
13:18:14 | Amun-Ra | PMunch: https://play.nim-lang.org/#ix=4o1j |
13:21:39 | PMunch | Yeah, that gives me the filename, which is better than nothing |
13:21:44 | Amun-Ra | it can be quite picky, if you omit const result it won't work |
13:22:04 | PMunch | But it won't help me distinguish between package1/mymodule and package2/mymodule |
13:22:14 | Amun-Ra | hmm |
13:22:26 | PMunch | Yeah instantiationInfo can be a bit tricky |
13:23:05 | Amun-Ra | so 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:30 | PMunch | Well I guess what you actually want is to scan upwards for a .nimble file |
13:23:52 | Amun-Ra | gimme sec |
13:23:58 | Amun-Ra | is there something that returns project dir? |
13:25:16 | Amun-Ra | I have na idea |
13:27:46 | * | derpydoo joined #nim |
13:31:40 | * | kenran quit (Remote host closed the connection) |
13:31:42 | Amun-Ra | PMunch: https://play.nim-lang.org/#ix=4o1t |
13:32:04 | Amun-Ra | src/foo/bar/baz.nim will return foo.bar.baz |
13:41:22 | PMunch | Still won't work if you specify a different srcDir in your nimble folder |
13:41:51 | Amun-Ra | I have a simpler use case |
13:42:23 | PMunch | We should really have a nimbleutils package |
13:44:44 | PMunch | I guess calling `nimble dump` and parsing it would do the trick |
13:50:07 | FromDiscord | <MetuMortis> sent a code paste, see https://play.nim-lang.org/#ix=4o1D |
13:50:46 | FromDiscord | <MetuMortis> but it does not change the directory at my shell |
13:50:59 | FromDiscord | <MetuMortis> https://media.discordapp.net/attachments/371759389889003532/1075051533219156008/Screenshot_20230214_165053.png |
13:53:33 | FromDiscord | <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:50 | FromDiscord | <Rika> chdir changes the pwd of the running process |
13:54:01 | FromDiscord | <Rika> https://pubs.opengroup.org/onlinepubs/009695299/functions/chdir.html |
13:54:04 | FromDiscord | <Rika> sent a code paste, see https://play.nim-lang.org/#ix=4o1F |
13:55:02 | FromDiscord | <MetuMortis> In reply to @Rika "`cd` is implemented by": does that mean it is not replicateable |
13:55:14 | FromDiscord | <Rika> i dont truly know, but i believe so |
13:55:19 | FromDiscord | <Rika> you will need to do more research |
13:55:28 | * | dropkick joined #nim |
14:01:52 | FromDiscord | <enthus1ast> https://forum.nim-lang.org/t/9889 |
14:02:06 | FromDiscord | <enthus1ast> ^ About "robots.txt and sitemap for the forum." |
14:02:35 | FromDiscord | <enthus1ast> today we discussed this in the offtopic channel |
14:04:37 | FromDiscord | <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:01 | FromDiscord | <auxym> or make a whole shell in Nim 😉 |
14:24:39 | PMunch | Hmm, 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:01 | FromDiscord | <enthus1ast> also for absolute and relative folders and files |
14:37:03 | FromDiscord | <Rika> so basuically nim pathlib |
15:23:18 | PMunch | Be the change you want to see in the world: https://github.com/PMunch/nimbleutils |
15:23:31 | PMunch | Come 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:52 | FromDiscord | <Phil> In reply to @PMunch "Be the change you": provide a getField macro and setField template for the macro uninitiated |
15:49:08 | FromDiscord | <Phil> Also a macro to unroll forloops of compile-time seqs or arrays |
15:49:15 | FromDiscord | <Phil> I got both of those ready to go |
15:58:17 | FromDiscord | <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:32 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3D |
17:02:39 | * | arkurious joined #nim |
17:04:18 | FromDiscord | <Rika> `func caddr(v: var (Vec2 or Vec3 or Vec4)): ptr float32 =` |
17:07:47 | FromDiscord | <sOkam!> @Rika tried that, and also writing var vec2 | var vec3 etc and it didn't work either |
17:08:09 | FromDiscord | <Rika> In reply to @Rika "`func caddr*(v: var (Vec2": this worked for me when i tried it |
17:08:36 | FromDiscord | <sOkam!> then the error is misleading as usual, but its failing for me |
17:09:17 | FromDiscord | <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:25 | FromDiscord | <ringabout> irrc, it seems to be an issue, you should use the verbose type. |
17:12:29 | FromDiscord | <Nerve> Your `[]` dereference probably needs a var version |
17:13:31 | FromDiscord | <sOkam!> the var version exists, but it also fails with that one |
17:13:58 | FromDiscord | <sOkam!> all of them resolve to non-var for some reason, or the error is failing to catch the actual error |
17:15:00 | FromDiscord | <sOkam!> @ringabout how do you use the verbose type? |
17:16:07 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3O |
17:17:18 | FromDiscord | <ringabout> `var Vec2|var Vec3| var Vec4` |
17:17:36 | FromDiscord | <sOkam!> i tried that, as i mentioned, but it fails the same way |
17:18:37 | FromDiscord | <ringabout> IS there a reproducible example |
17:18:50 | FromDiscord | <ringabout> (edit) "IS" => "Is" | "example" => "example?" |
17:19:28 | FromDiscord | <sOkam!> there isn't, but this is way beyond stuck, so i guess i should make one 😔 |
17:22:34 | FromDiscord | <Odi> sent a code paste, see https://play.nim-lang.org/#ix=4o3S |
17:22:58 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o3T |
17:23:27 | FromDiscord | <enthus1ast> @Odi\: zigcc is a workaround package you must install first |
17:23:59 | FromDiscord | <enthus1ast> https://github.com/enthus1ast/zigcc |
17:24:05 | FromDiscord | <enthus1ast> nimble install zigcc |
17:25:36 | FromDiscord | <enthus1ast> it works around the issue that the compiler cannot call "zig cc" in the correct way |
17:26:29 | FromDiscord | <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:47 | FromDiscord | <ringabout> sent a code paste, see https://play.nim-lang.org/#ix=4o3Y |
17:26:48 | FromDiscord | <ringabout> Works for me |
17:27:09 | FromDiscord | <ringabout> ? ptr -7.223747220528534e-27 |
17:27:14 | FromDiscord | <ringabout> (edit) "?" => ">" |
17:27:32 | FromDiscord | <sOkam!> In reply to @ringabout "The real problem is": why is it a template then? |
17:33:44 | FromDiscord | <sOkam!> @ringabout I copy/pasted your code and it fails the same way for me↵is my nim install broken or something? |
17:34:21 | FromDiscord | <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:39 | FromDiscord | <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:24 | FromDiscord | <sOkam!> oh, if I remove the multitypes it works? 🧩↵very lost in how that could make it break 🤷♂️ |
17:55:40 | FromDiscord | <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:38 | FromDiscord | <auxym> not clear exactly what you want to do |
18:00:03 | FromDiscord | <niguss_101-_-> Can I ask u guys about html |
18:04:19 | FromDiscord | <Phil> We got a webdev channel if it is just about html, should also be available on matrix to find |
18:05:02 | FromDiscord | <niguss_101-_-> There are a lots of matrix channels bro which one do u recommend me to join brother |
18:06:05 | FromDiscord | <enthus1ast> niguss\_101-\_-\: https://matrix.to/#/#nim-webdev:matrix.org |
18:06:15 | FromDiscord | <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:45 | FromDiscord | <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:53 | FromDiscord | <niguss_101-_-> Thank you sir |
18:12:21 | FromDiscord | <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:53 | FromDiscord | <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:47 | FromDiscord | <guttural666> In reply to @auxym "oh you want to": thank you!!! |
18:20:05 | FromDiscord | <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:46 | FromDiscord | <srozb> sent a code paste, see https://play.nim-lang.org/#ix=4o4C |
19:02:54 | FromDiscord | <srozb> oh, never mind, it worked |
19:05:12 | FromDiscord | <auxym> @srozb `{.size.}` pragma |
19:14:28 | FromDiscord | <pmunch> How are these related to Nimble?↵(@Phil) |
19:17:39 | FromDiscord | <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:27 | FromDiscord | <sOkam!> sent a long message, see http://ix.io/4o4K |
19:26:30 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4o4N |
19:45:01 | * | xet7 joined #nim |
19:52:15 | FromDiscord | <Phil> In reply to @sOkam! "<@696333749570371585> I find this": Configurability in what sense? |
19:52:40 | FromDiscord | <Phil> Like, what is it you'd want to configure that you couldn't do in separate nimble tasks? |
19:53:38 | FromDiscord | <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:59 | FromDiscord | <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:34 | FromDiscord | <Hourglass [She/Her]> Should a lexer parse `24.12` as `Number, Dot, Twelve` or `Number`? |
20:14:17 | FromDiscord | <Hourglass [She/Her]> (edit) "Twelve`" => "Number`" |
20:14:31 | FromDiscord | <enthus1ast> `Number, Dot, Number` or `Number` both can work |
20:15:57 | FromDiscord | <enthus1ast> it shifts complexity eiter to the lexer or the parser |
20:17:57 | FromDiscord | <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:01 | FromDiscord | <Hourglass [She/Her]> Hm... I think it'd be better to pass that to the parser than |
20:18:40 | FromDiscord | <enthus1ast> you can also have several parser passes |
20:18:42 | FromDiscord | <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:29 | FromDiscord | <enthus1ast> sent a long message, see http://ix.io/4o50 |
20:42:07 | FromDiscord | <T0lk1en> How to check if string contains substring? Tried strutils contains but that only deals w chars |
20:42:40 | FromDiscord | <T0lk1en> I also don’t want to return the string or the position. I want to return a book |
20:42:42 | FromDiscord | <T0lk1en> Bool |
20:44:28 | FromDiscord | <Yepoleb> there are two contains, one deals with strings |
20:44:44 | * | azimut quit (Ping timeout: 255 seconds) |
20:46:18 | FromDiscord | <sOkam!> @T0lk1en have you tried `in`, which is an alias for contains? |
20:49:54 | FromDiscord | <BobBBob> sent a code paste, see https://play.nim-lang.org/#ix=4o5b |
20:50:51 | FromDiscord | <T0lk1en> In reply to @Yepoleb "there are two contains,": What is the name of the string one |
20:51:13 | FromDiscord | <Yepoleb> also contains |
20:51:25 | FromDiscord | <Yepoleb> https://nim-lang.org/docs/strutils.html#contains%2Cstring%2Cstring |
20:52:29 | FromDiscord | <T0lk1en> on my mother that’s what I’m using |
20:53:36 | FromDiscord | <Yandall> Is there a proc to flat a seq like this one `[["a","b"],["c","d],["e"]]` |
20:53:41 | FromDiscord | <Yandall> (edit) "`[["a","b"],["c","d],["e"]]`" => "`[["a","b"],["c","d],["e"]]`?" |
20:54:39 | * | jmdaemon quit (Ping timeout: 255 seconds) |
20:56:24 | FromDiscord | <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:15 | FromDiscord | <T0lk1en> sent a code paste, see https://play.nim-lang.org/#ix=4o5f |
20:58:47 | FromDiscord | <T0lk1en> sent a code paste, see https://play.nim-lang.org/#ix=4o5g |
20:59:08 | FromDiscord | <T0lk1en> but im getting errors with contains. It wants a char. |
21:00:35 | FromDiscord | <BobBBob> Are you using the contains in the system module or the one in strutils? |
21:00:40 | FromDiscord | <T0lk1en> strutils |
21:00:54 | FromDiscord | <Yepoleb> did you import it? |
21:01:11 | FromDiscord | <T0lk1en> dude. Fuck me i didnt import strutils. Thank you |
21:01:18 | FromDiscord | <T0lk1en> lmaooo |
21:02:46 | FromDiscord | <Yepoleb> classic mistake |
21:02:58 | FromDiscord | <T0lk1en> I was sitting here banging my head like what? |
21:03:36 | FromDiscord | <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:00 | FromDiscord | <Yepoleb> i'd write a for loop instead of using map |
21:12:46 | * | xet7 quit (Remote host closed the connection) |
21:28:55 | FromDiscord | <Elegantbeef> Ideally a `seq[char]` `array[x, char]` and a `string` all can use the same operations |
21:29:12 | FromDiscord | <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:59 | FromDiscord | <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:43 | FromDiscord | <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:46 | FromDiscord | <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:30 | FromDiscord | <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) |