00:14:07 | * | xtr00 quit (Ping timeout: 244 seconds) |
00:29:39 | * | beholders_eye quit (Ping timeout: 276 seconds) |
00:31:20 | * | xtr00 joined #nim |
01:11:24 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
01:16:28 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=gMOsTpHX |
01:17:24 | FromDiscord | <Elegantbeef> If they're not getting the value set, nor have `{.importc.}` the value isn't going to populate |
01:26:06 | FromDiscord | <.tokyovigilante> I'm compiling `volk.c` which ultimately includes `vulkan_core.h` (which has both declaration and definition as above) as part of my build, but do I still need to have `{.importc.}` in the generated Nim wrapper? |
01:26:56 | FromDiscord | <Elegantbeef> It does if you're not getting a `var a = b` |
01:28:06 | FromDiscord | <.tokyovigilante> It does need an `importc` you mean? I'm not sure if this is how it should work, but looking at that C include, I'd hope Futhark would generate `const VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR: VkPipelineStageFlagBits2 = 0x00000400.uint64`. |
01:37:06 | FromDiscord | <.tokyovigilante> sent a code paste, see https://play.nim-lang.org/#pasty=bIuhgbsj |
01:37:21 | FromDiscord | <.tokyovigilante> with a `{.importc.}` so I may have bigger problems. |
01:40:09 | FromDiscord | <.tokyovigilante> Also relevant - https://github.com/PMunch/futhark/issues/144 |
01:40:20 | FromDiscord | <Elegantbeef> I said it does not |
01:40:21 | FromDiscord | <Elegantbeef> It's either or |
01:40:35 | FromDiscord | <Elegantbeef> It's supposed to generate `cosnt name = value` |
01:50:45 | * | xtr00 quit (Read error: Connection reset by peer) |
01:56:41 | * | xtr00 joined #nim |
02:13:06 | * | thunder quit (Remote host closed the connection) |
02:13:40 | * | thunder joined #nim |
02:17:57 | FromDiscord | <.tokyovigilante> Sorry I don't follow, but I feel like we're agreeing this is a Futhark bug? |
02:18:04 | FromDiscord | <Elegantbeef> Yes |
03:31:27 | * | Goodbye_Vincent1 joined #nim |
03:48:30 | * | rockcavera quit (Remote host closed the connection) |
04:36:24 | * | thunder quit (Killed (NickServ (GHOST command used by metasintactic))) |
04:36:31 | * | thunder joined #nim |
04:45:31 | * | thunder quit (Ping timeout: 244 seconds) |
04:47:48 | * | amadaluzia quit (Quit: ZNC 1.10.0 - https://znc.in) |
04:52:56 | * | thunder joined #nim |
04:59:59 | * | thunder quit (Ping timeout: 244 seconds) |
06:06:17 | * | skippy8 joined #nim |
06:10:01 | * | nils` quit (Quit: nils`) |
06:28:51 | * | alexdaguy joined #nim |
06:31:13 | * | derpydoo joined #nim |
07:19:44 | * | FromDiscord quit (Ping timeout: 265 seconds) |
07:20:13 | * | FromDiscord joined #nim |
07:30:03 | * | thunder joined #nim |
07:52:18 | * | thunder quit (Remote host closed the connection) |
07:53:14 | * | thunder joined #nim |
07:53:31 | * | thunder quit (Client Quit) |
07:59:06 | * | derpydoo quit (Quit: derpydoo) |
08:13:39 | * | lucerne quit (Ping timeout: 260 seconds) |
08:21:55 | * | lucerne joined #nim |
08:30:26 | * | beholders_eye joined #nim |
08:39:59 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=dQkeXfat |
08:43:59 | * | tokyovigilante quit (Read error: Connection reset by peer) |
08:44:14 | * | tokyovigilante joined #nim |
08:45:53 | Amun-Ra | tauruuuuuus: he can't use it in that case |
08:46:10 | Amun-Ra | (uint32) |
08:46:58 | Amun-Ra | hmm, would HashSet counterpart work in that case? |
08:48:42 | FromDiscord | <TӨMΛ ☠> In reply to @tauruuuuuus "FYI nim supports bitfields": Oooh, that can be handy, thank you 🙏 |
08:50:16 | Amun-Ra | it works with types of size up to 16-bits |
08:50:29 | Amun-Ra | and it won't work on JS target |
08:50:40 | FromDiscord | <TӨMΛ ☠> Oh shoot, somewhat missed that response |
08:50:55 | FromDiscord | <TӨMΛ ☠> I target C, but it still sucks kind of |
08:51:03 | Amun-Ra | you may test it with HashSet from std/sets |
08:51:38 | FromDiscord | <TӨMΛ ☠> I will try 🫡 |
08:51:49 | Amun-Ra | :> |
08:59:05 | FromDiscord | <tauruuuuuus> sent a code paste, see https://play.nim-lang.org/#pasty=NjpbLSOs |
09:00:03 | * | xet7 joined #nim |
09:00:11 | Amun-Ra | tauruuuuuus: set a value of > 0xffff |
09:00:57 | Amun-Ra | tauruuuuuus: https://play.nim-lang.org/#pasty=liRsIcif |
09:06:26 | FromDiscord | <tauruuuuuus> TIL |
09:07:19 | Amun-Ra | been there before ;) |
09:07:21 | FromDiscord | <tauruuuuuus> But this is not a issue if using plain enums and set bitfields instead of assigning pow 2 values to the enum entrie itself, that was my point |
09:07:38 | FromDiscord | <tauruuuuuus> (edit) "entrie itself," => "entries themselves," |
09:07:55 | Amun-Ra | true, but in this case it has to have specific values |
09:07:58 | FromDiscord | <lainlaylie> dont we just need the set to fit in a uint32, i.e. ensure the enum has 32 elements or fewer, which is the case here? |
09:14:19 | Amun-Ra | I usually do that using distinct integer, as in: https://play.nim-lang.org/#pasty=bSPLpoKI |
09:17:02 | Amun-Ra | bugfixed* https://play.nim-lang.org/#pasty=sVbatAti |
09:17:44 | Amun-Ra | I have to have specific flag values, as defined in a given format I parse |
09:22:48 | Amun-Ra | hmm, I can use `in` instead of just `and`, it's prettier: https://play.nim-lang.org/#pasty=ZsgGPRpF |
09:35:18 | * | jjido joined #nim |
09:58:20 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
10:55:04 | * | jjido joined #nim |
11:41:41 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
11:52:10 | * | jjido joined #nim |
11:52:39 | * | beholders_eye quit (Ping timeout: 244 seconds) |
12:00:30 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
12:21:47 | * | fallback quit (Quit: IRCNow and Forever!) |
12:38:07 | * | fallback joined #nim |
12:50:24 | * | beholders_eye joined #nim |
13:23:43 | * | nils` joined #nim |
13:39:58 | * | beholders_eye quit (Ping timeout: 276 seconds) |
13:53:52 | FromDiscord | <alehander92> > generic methods are deprecated |
13:54:00 | FromDiscord | <alehander92> is this valid for nim 2 as well? |
13:54:12 | FromDiscord | <alehander92> how do people workaround it, or is it just in some problematic cases? |
14:28:56 | * | amadaluzia joined #nim |
14:29:47 | * | amadaluzia quit (Client Quit) |
14:30:55 | * | amadaluzia joined #nim |
14:31:59 | * | jjido joined #nim |
14:43:20 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
14:52:07 | * | jjido joined #nim |
15:15:44 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
15:30:07 | * | przmk4 quit (Quit: The Lounge - https://thelounge.chat) |
15:30:45 | * | przmk4 joined #nim |
15:31:02 | FromDiscord | <Phil> In reply to @alehander92 "> generic methods are": By not having generic methods. ↵In rxnim where I provided the base implementation for subjects and observables I assign a closure to a field on the object. ↵↵That was the only time I ever needed generic methods, other patterns usually work better |
15:31:53 | * | alexdaguy quit (Quit: w) |
16:08:29 | FromDiscord | <alehander92> i wanted to impl mediator pattern |
16:08:44 | FromDiscord | <alehander92> e.g. things like `method emit[T](kind: Event, value: T, ..) = ..` |
16:08:52 | FromDiscord | <alehander92> which can be overriden eventually |
16:09:16 | FromDiscord | <alehander92> for now indeed i decided not to mix them, and just have a single type with all the fields/flags needed currently |
16:09:52 | FromDiscord | <alehander92> but for some other types i need inheritance because e.g. i need some types to have different fields which are available only in some cases (with different logic) |
16:10:00 | FromDiscord | <alehander92> (edit) "cases" => "cases/environments" |
16:10:23 | FromDiscord | <alehander92> for now in the other cases, i made them non-generic (using `JsObject` for the values) |
16:10:48 | FromDiscord | <alehander92> but if i need generic-ness i wonder about using e.g. conditional compilation instead and replacing the type itself |
16:11:07 | FromDiscord | <alehander92> (edit) "itself" => "and some of the procs(methods) instead" |
16:11:29 | FromDiscord | <alehander92> i do think there are valid usecases, even if i usually try to not use inheritance as well |
16:12:02 | FromDiscord | <alehander92> maybe a generic closure as a field is also ok, but this means the whole object must become generic |
16:12:20 | FromDiscord | <alehander92> and if you have various possible methods/ways to call it, it wouldn't be ok |
16:13:39 | FromDiscord | <alehander92> ( reply to @Phil thanks for the rxnim example ) |
16:19:32 | * | beholders_eye joined #nim |
17:20:57 | * | nils` quit (Quit: nils`) |
17:25:10 | * | xet7 quit (Remote host closed the connection) |
17:31:01 | * | beholders_eye quit (Ping timeout: 248 seconds) |
17:43:38 | * | nils` joined #nim |
18:03:45 | * | jjido joined #nim |
19:29:04 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
19:30:42 | * | thunder joined #nim |
20:18:02 | * | jjido joined #nim |
20:27:21 | FromDiscord | <morgan (ping with reply)> sent a code paste, see https://play.nim-lang.org/#pasty=NrvXyVva |
20:34:16 | FromDiscord | <leorize> because converters are a buggy mess with no defined semantics |
20:34:31 | FromDiscord | <leorize> it is matched wherever it pleases |
20:35:14 | FromDiscord | <leorize> I'd recommend not using converters and especially not exporting them if possible |
20:35:19 | FromDiscord | <Elegantbeef> Hey the semantics are fine here |
20:35:31 | FromDiscord | <Elegantbeef> Converters are not fired for converters |
20:35:47 | FromDiscord | <Elegantbeef> openarray requires a converter so you need another converter |
20:38:20 | FromDiscord | <Elegantbeef> Just make a `ByteMapping.init(oa: openArray[int])` and call it a day |
20:56:22 | FromDiscord | <morgan (ping with reply)> interesting |
20:58:20 | FromDiscord | <morgan (ping with reply)> i had initially coded this with arrays and had bytemapping be generic, but decided that was going to be more of a problem than a benefit and today converted their code all over to uncheckedarrays and seqs |
20:58:54 | FromDiscord | <morgan (ping with reply)> having to take in a seq specifically for this way of constructing one is fine |
21:12:45 | * | xet7 joined #nim |
21:14:35 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:17:46 | * | thunder quit (Killed (NickServ (GHOST command used by metasintactic))) |
21:17:46 | * | metasintactic joined #nim |
21:28:05 | * | metasintactic is now known as thunder |
21:37:14 | * | beholders_eye joined #nim |
21:46:59 | * | xet7 quit (Remote host closed the connection) |
21:58:42 | * | beholders_eye quit (Ping timeout: 248 seconds) |
21:59:27 | * | skippy8 quit (Ping timeout: 252 seconds) |
22:17:00 | * | jjido joined #nim |
22:24:51 | FromDiscord | <demotomohiro> In reply to @alehander92 "> generic methods are": It seems generic methods are hard to implement correctly.↵Even C++ give up supporting virtual template function (C++ feature similar to Nim's generic methods).↵https://stackoverflow.com/questions/2354210/can-a-class-member-function-template-be-virtual |
23:36:46 | FromDiscord | <alehander92> In reply to @demotomohiro "It seems generic methods": Interesting thanks |