00:01:23 | FromDiscord | <sOkam!> tru |
00:01:51 | FromDiscord | <arne> @sOkam! all nimble related issues are solved by not using nimble anymore and instead put all dependencies in submodules and manually add them to the path |
00:03:09 | FromDiscord | <sOkam!> that sounds like hell |
00:03:21 | FromDiscord | <sOkam!> submodules are a gigantic PITA |
00:04:27 | FromDiscord | <sOkam!> I will never understand the nimble hate. Conversation should be about improving it, not bitching about it đ€·ââïž |
00:14:44 | FromDiscord | <Elegantbeef> @arne\: seems easier to just use atlas at that rate |
00:15:42 | FromDiscord | <auxym> git submodules are sort of workable once you wrap your head around it... but dear god, the reason I'm not using C is because I don't want to go back to that sort of dependency management. nimble isn't perfect but let's improve it. (or maybe atlas, should have a look at it sometime) |
00:26:49 | * | progranner joined #nim |
00:29:18 | FromDiscord | <auxym> on another note... is this the perfect name for an endians lib or what? https://github.com/auxym/bight |
00:32:07 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzzâŠ) |
00:32:33 | * | progranner joined #nim |
00:37:23 | * | progranner quit (Client Quit) |
00:37:49 | * | progranner joined #nim |
00:40:19 | * | progranner quit (Client Quit) |
00:47:38 | * | progranner joined #nim |
00:51:10 | * | Guest63 joined #nim |
00:51:37 | * | Guest63 quit (Client Quit) |
00:56:30 | * | progranner quit (Ping timeout: 250 seconds) |
00:58:10 | * | derpydoo joined #nim |
00:58:29 | * | progranner joined #nim |
01:01:26 | * | progranner quit (Client Quit) |
01:01:51 | * | progranner joined #nim |
01:08:41 | * | progranner quit (Ping timeout: 256 seconds) |
01:53:55 | * | rockcavera quit (Remote host closed the connection) |
02:19:42 | * | lumo_e joined #nim |
02:21:57 | * | nanxiao joined #nim |
02:28:34 | FromDiscord | <michaelb.eth> In reply to @auxym "on another note... is": nice! |
02:42:45 | * | lumo_e quit (Ping timeout: 256 seconds) |
02:48:19 | * | lumo_e joined #nim |
02:50:46 | FromDiscord | <Elegantbeef> @auxym\: cmon `bigib` would've been better |
02:51:46 | * | derpydoo quit (Ping timeout: 250 seconds) |
02:53:20 | FromDiscord | <Elegantbeef> As a sorta aside, all 3 BE cpus alive are angry that you do not compile time abstract this |
02:57:46 | NimEventer | New post on r/nim by AbbreviationsJust336: Any Documentation on Winim?, see https://reddit.com/r/nim/comments/13cddjt/any_documentation_on_winim/ |
03:07:53 | * | nanxiao quit (Quit: Client closed) |
03:21:51 | * | lumo_e quit (Ping timeout: 256 seconds) |
03:31:20 | * | azimut quit (Ping timeout: 240 seconds) |
03:32:03 | * | om3ga quit (Ping timeout: 256 seconds) |
03:49:26 | * | nanxiao joined #nim |
04:27:51 | * | nanxiao quit (Quit: Client closed) |
05:32:19 | * | nanxiao joined #nim |
05:47:34 | * | advesperacit joined #nim |
06:04:11 | * | nanxiao quit (Quit: Client closed) |
06:16:08 | * | nanxiao joined #nim |
06:42:45 | FromDiscord | <arne> In reply to @sOkam! "I will never understand": It took me a long time to get where I am. But I was all for improving nimble ... 4 years ago |
06:59:10 | FromDiscord | <Girvo> Anyone know of any implementations of a readers-writer lock that I can take a look at? Also known as single-writer or push locks |
07:02:19 | * | PMunch joined #nim |
07:10:34 | FromDiscord | <Girvo> In reply to @Elegantbeef "As a sorta aside,": Man I _wish_ there was only 3 BE CPUs. sobs in Modbus forcing me to deal with endianness in all kinds of bullshit ways |
07:12:05 | FromDiscord | <Elegantbeef> Right there's 4 sorry |
07:14:15 | FromDiscord | <Girvo> To answer my own question: https://github.com/tdely/nim-rwlocks that is all I've found. |
07:15:22 | FromDiscord | <Elegantbeef> It seems like a relatively simple algo |
07:18:16 | FromDiscord | <Girvo> Yeah it is. I guess the broader question I have, is would it be possible to get `guard:` like semantics around a different mutex implementation? Such that I could write my own `withLock` proc that also included a timeout? |
07:19:22 | FromDiscord | <Elegantbeef> Remember that you just need a `{.lock[lockHere].}: ...` |
07:20:16 | FromDiscord | <Girvo> In the context of the `withLock` block? |
07:20:24 | FromDiscord | <Girvo> Ah I think I'm remembering now yeah |
07:20:39 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-1-6/lib/core/locks.nim#L81 |
07:21:13 | FromDiscord | <Girvo> Okay yeah sweet. Should be feasible to write my own but around FreeRTOS's Semaphore/Mutexes then |
07:21:39 | FromDiscord | <arnetheduck> In reply to @arne "<@186489007247589376> all nimble related": https://github.com/status-im/nimbus-build-system |
07:22:40 | FromDiscord | <Girvo> `withLock(someLock, 1000.Ticks):` will be quite nice in allowing me to work around some possible dead-locks. Gotta work out the right way of handling the "it timed out" block too, but I'll deal with that when I get to it |
07:24:36 | FromDiscord | <Elegantbeef> Yea it's a surprisingly reusable system |
07:26:12 | FromDiscord | <Girvo> Pretty straightforward interface too. And yeah neat, nim-rwlocks does something similar. Has it's own `withReadLock(l: RwLock)` template |
07:28:55 | FromDiscord | <Girvo> Oh I could easily do my own RW Lock via `xSemaphoreCreateCounting` too for the reader lock, I think. |
07:49:33 | FromDiscord | <4zv4l> is it possible to redirect stderr to a file ?â”like if the program panic, to write the message somewhere else than on the terminal ? |
07:59:07 | FromDiscord | <Girvo> `./example 2>example-err`? |
08:18:21 | PMunch | Hmm, valgrind is complaining about atomics in threads |
08:19:29 | FromDiscord | <4zv4l> In reply to @Girvo "`./example 2>example-err`?": it's on Windowsâ”I simply added a boolean 'hide' in the config so we can check the terminal window for debugging even if that's not the best |
08:19:48 | FromDiscord | <Girvo> I've not done STDERR stuff on Windows in yonks |
08:20:17 | FromDiscord | <Girvo> Oh. Lol. @4zv4l its the same command in Windows too |
08:20:21 | FromDiscord | <Girvo> https://www.rushis.com/windows-command-prompt-redirecting-stdoutstderr/ |
08:21:31 | FromDiscord | <Girvo> Sending it to stdout/stderr and using the built in shells redirection is the way to go, IMO, coz it means it plays nicely with other tools "for free" đ |
08:24:08 | * | pharonix71 quit (Ping timeout: 240 seconds) |
08:24:45 | * | pharonix71 joined #nim |
08:26:04 | FromDiscord | <4zv4l> well the program is ran using Image File Execution Options and I am not sure the registry key accepts redirection xDâ”but for debugging yeah could just run it in the command line and redirect stderrâ”thanks for the info ! |
08:31:43 | NimEventer | New thread by Araq: Unique refs > `isolate`, see https://forum.nim-lang.org/t/10185 |
08:35:08 | * | pharonix71 quit (Remote host closed the connection) |
08:37:10 | * | nanxiao quit (Quit: Client closed) |
08:37:36 | * | pharonix71 joined #nim |
08:49:20 | * | om3ga joined #nim |
08:57:44 | om3ga | Hi! I was not into this relatively new methods for http backend services. What is really async in this web server: std/asynchttpserver? I understand that browser can send simultaneously multiple requests, but in case if it not utilizes http pipelining, how async being achieved in that case? |
08:58:57 | om3ga | or how requests being served in parallel, since there is one connection to the reverse proxy |
09:02:47 | om3ga | I read explanations on stack overflow, but still not very clear: https://i.stack.imgur.com/QCmEE.jpg |
09:04:10 | om3ga | for example my backends do the same and return to the client results by portions, while during processing the data my modules really do that in parallel |
09:04:52 | NimEventer | New thread by hunterbr: Is there a way to see the NIM version in an NIM executable (binary) ? , see https://forum.nim-lang.org/t/10186 |
09:06:07 | FromDiscord | <4zv4l> am I the only one getting this with `nimlsp` on neovim ? https://media.discordapp.net/attachments/371759389889003532/1105420421349773342/nimlsp.txt |
09:07:23 | * | pharonix71 quit (Remote host closed the connection) |
09:08:00 | * | pharonix71 joined #nim |
09:17:58 | * | nanxiao joined #nim |
09:21:49 | om3ga | please ignore my question |
09:22:05 | om3ga | :) I found better explanation |
09:28:33 | * | pharonix71 quit (Remote host closed the connection) |
09:29:04 | * | pharonix71 joined #nim |
09:53:22 | * | nanxiao quit (Quit: Client closed) |
10:03:14 | * | Notxor joined #nim |
10:43:50 | FromDiscord | <Ras> sent a code paste, see https://play.nim-lang.org/#ix=4vvW |
10:44:21 | FromDiscord | <Ras> i'm probably missing something fairly obvious |
10:44:57 | FromDiscord | <Rika> Nim or Nim script? |
10:45:24 | FromDiscord | <Ras> nim, but i'm using it in a compile time context too if that's what you're asking |
10:48:30 | FromDiscord | <Ras> should i just not do that? |
10:48:30 | * | Notxor quit (Read error: Connection reset by peer) |
10:49:06 | * | Notxor joined #nim |
10:49:56 | FromDiscord | <Ras> indeed, moving it to runtime fixed the cast |
10:51:32 | FromDiscord | <Rika> Compile time context canât do much of cast iirc |
10:51:35 | FromDiscord | <Rika> Only limited cases |
10:51:36 | FromDiscord | <Sim> Welp, I fixed it by reinstalling the driver đ€·ââïž It was working fine everywhere else though, so I guess it's some Windows shenanigans... |
10:56:25 | * | beholders_eye joined #nim |
11:43:18 | * | rockcavera joined #nim |
11:46:10 | * | lumo_e joined #nim |
11:49:49 | FromDiscord | <mratsim> In reply to @Girvo "To answer my own": The Art of multiprocessor Programming, by Herlihy and Shavit, chapter 8.3 |
11:50:58 | FromDiscord | <mratsim> In reply to @Elegantbeef "It seems like a": It gets complex easily if you want to avoid starvation (i.e. locking a writer out of writing if there are too many readers) |
12:12:42 | * | fredrikhr joined #nim |
12:46:54 | * | PMunch quit (Quit: Leaving) |
12:53:52 | * | beholders_eye quit (Ping timeout: 248 seconds) |
12:54:20 | * | lumo_e quit (Quit: Quit) |
13:17:26 | * | rockcavera quit (Remote host closed the connection) |
13:21:14 | * | azimut joined #nim |
13:27:15 | FromDiscord | <&Makarov/0> hello friends , m really struggling to choose between nim and Rust ! |
13:27:30 | FromDiscord | <&Makarov/0> m interessted in knowing the limitation of nim đ„č |
13:27:35 | FromDiscord | <&Makarov/0> and where nim can beat rust |
13:28:05 | FromDiscord | <&Makarov/0> cause i actually hate rust syntax , i just find it exhaustive , i tryed nim for a bit i found it good enough and fun to use |
13:28:28 | FromDiscord | <&Makarov/0> specially when i start implementing the pipe operator using the template constructs đ |
13:28:35 | FromDiscord | <&Makarov/0> but i still dont know how to choose |
13:28:36 | FromDiscord | <voidwalker> well then you just answered your dillema |
13:28:47 | FromDiscord | <&Makarov/0> In reply to @voidwalker "well then you just": it IIIIIIIIIIIIIIIIIIIIIIIIIS A DILLEMA đ |
13:29:01 | FromDiscord | <&Makarov/0> but still not convinced |
13:29:01 | FromDiscord | <voidwalker> For me it was simple, I decided I'm too stupid for rust |
13:29:21 | FromDiscord | <voidwalker> not coming from a solid programming background |
13:29:51 | FromDiscord | <&Makarov/0> hahaha |
13:30:12 | FromDiscord | <voidwalker> I decided that I will give rust a go though, when I upgrade my iq with a few points, after learning nim well |
13:30:13 | FromDiscord | <&Makarov/0> i understand , for m coming from a elixir ! đ„č |
13:31:46 | FromDiscord | <voidwalker> Limitations of nim, libraries, while we have a lot, are still lacking. for example, there's no ipfs client lib, no torrent library or wrapper, no dht |
13:32:07 | FromDiscord | <voidwalker> gui libs are much more immature vs what you have in rust |
13:33:49 | FromDiscord | <Rika> Most libraries are immature compared to Rust |
13:33:50 | FromDiscord | <voidwalker> but the language is super easy to learn, so you won't be wasting much time learning it, and see how you like it |
13:34:36 | FromDiscord | <voidwalker> Depends what you want to use it for. Some people love it for malware development : D |
13:34:46 | FromDiscord | <Rika> In reply to @&Makarov/0 "i understand , for": Do you use it often? You might miss a lot of elixir features |
13:40:16 | FromDiscord | <choltreppe> does macro expansion not work inside a concept def? |
13:50:13 | FromDiscord | <michaelb.eth> In reply to @voidwalker "Limitations of nim, libraries,": while there's no ipfs client per se, you might be interested in nim-libp2p, or parts of it |
13:50:29 | FromDiscord | <michaelb.eth> https://github.com/status-im/nim-libp2p |
13:51:19 | FromDiscord | <voidwalker> yeah, i know of it.. the parts that interested me are tied to chronos and some ethereum specific libs unfortunately |
13:51:37 | FromDiscord | <voidwalker> dht and uTP respectively |
13:54:53 | FromDiscord | <mratsim> In reply to @voidwalker "Limitations of nim, libraries,": if you can find that lib: https://github.com/ipfs/ipfs/issues/300 |
13:55:40 | FromDiscord | <mratsim> also gogolxdong had an IPFS video demo somewhere |
14:00:19 | * | Nerve joined #nim |
14:01:08 | FromDiscord | <mratsim> In reply to @voidwalker "yeah, i know of": But they have been audited, and are battle tested with billions in prod. |
14:01:29 | FromDiscord | <mratsim> and the DHT and UTP is used in libp2p which is not Ethereum specific |
14:01:53 | FromDiscord | <mratsim> UTP is separate from libp2p actually: https://github.com/status-im/nim-eth/blob/master/eth/utp/utp_protocol.nim |
14:02:42 | Nerve | Question: I'm linking brotli statically. On Linux, I can generate a single .a, but right now on Windows I have three: libbrotlicommon, libbrotlienc, and libbrotlidec. The functions I've written signatures for are in enc and dec, but depend on some stuff in common. Nim/GCC are complaining that they can't find the functions in common even though I've included all three static lib files with --passL. |
14:02:43 | Nerve | Any ideas? |
14:04:12 | Nerve | basically, how do I ensure that functions from a lib file that I'm not directly writing FFI signatures from get properly linked and are available to other library files? |
14:06:03 | FromDiscord | <mratsim> In reply to @Nerve "basically, how do I": static library should appear last in the gcc calls so it might be easier to write a nim.cfg or a nimble script like here: https://github.com/mratsim/constantine/blob/master/constantine.nimble#L214-L215 |
14:06:09 | FromDiscord | <mratsim> (edit) "library" => "libraries" |
14:10:12 | Nerve | Wait, does nim do --passL in order? Do I need to put common first (or last)? |
14:10:47 | Nerve | Holy crap putting it last may have worked |
14:11:33 | Nerve | Okay it appears it worked |
14:15:27 | FromDiscord | <mratsim> =} |
14:19:18 | Nerve | So note for future: If anyone is linking against libbrotli statically on Windows, just: |
14:19:31 | Nerve | 1) Use cmake-gui with default flags, then run make |
14:20:01 | Nerve | 2) Link against the -static.a library files in order with --passL flags: enc, dec, common. |
14:20:22 | Nerve | This all assuming MinGW, of course. |
14:22:00 | Nerve | The cmake part is for building libbrotli, I should clarify. |
14:22:14 | * | Nerve quit (Remote host closed the connection) |
14:28:46 | FromDiscord | <Nerve> Back on Linux, whew. Windows is the dark realm. |
14:31:12 | FromDiscord | <Rika> welcome back |
14:56:05 | FromDiscord | <SirOlaf> sent a code paste, see https://play.nim-lang.org/#ix=4vws |
14:57:23 | FromDiscord | <SirOlaf> Trips me up every time I use generics |
15:02:35 | FromDiscord | <Rika> because it's not from RHS to LHS |
15:02:59 | FromDiscord | <Rika> stuff like that is generally called "reverse inference" iirc |
15:05:31 | FromDiscord | <SirOlaf> Seems like it would be trivial to support though, so I thought that it's not wanted for some reason |
15:06:13 | FromDiscord | <Rika> well, is it trivial to support? |
15:06:26 | FromDiscord | <SirOlaf> No idea, seems like it would be |
15:07:48 | FromDiscord | <SirOlaf> But no point looking into it if araq or someone already clarified why it's not a thing |
15:09:16 | FromDiscord | <Rika> i have no idea if its trivial and i would say it doesnt seem trivial at all to support but eh |
15:13:59 | FromDiscord | <SirOlaf> I say it's trivial because when generic argument list is missing you could check if lhs is specified and use that instead, but there's lots of deceptively simple things in the compiler so I could be very wrong |
15:14:28 | FromDiscord | <SirOlaf> https://forum.nim-lang.org/t/3025#19018 only thing on it I could find is this, but making an exception for generics makes sense in my mind |
15:52:14 | * | demetera quit (Remote host closed the connection) |
15:53:09 | * | demetera joined #nim |
15:57:33 | * | beholders_eye joined #nim |
16:09:10 | * | progranner joined #nim |
16:24:15 | FromDiscord | <jtv> Uh, "reverse inference"? That's a new one. Traditional hindley-milner unification-based type inferencing will update type info about the variable as it goes along, and that info can cascade. So it's easy to infer no matter which way you parse the expression, but it's clear that Nim's doing something else there |
16:27:59 | * | Ekho quit (Quit: CORE ERROR, SYSTEM HALTED.) |
16:37:11 | FromDiscord | <Rika> reverse inference has been mentioned in this very server before |
16:37:43 | FromDiscord | <Rika> nim does not use HM type system because of something related to overloading, at least from what i recall araq saying |
16:41:03 | * | rockcavera joined #nim |
17:12:57 | FromDiscord | <jtv> Hindley Milner is super old (early 70's), there's been plenty of work based on it with unification-based systems. It's really about the type rules you apply around it, tbh. |
17:14:44 | FromDiscord | <jmgomez> In reply to @jtv "Hindley Milner is super": Not so long ago that was discussed in the forums, the summary is that you either have good overloading or HM like inference cause both together are NP-complete |
17:16:32 | FromDiscord | <jtv> If you want full inclusion polymorphism, you can't do full HM, but you can absolutely apply it in many situations where you aren't going to have dynamic binding |
17:16:54 | FromDiscord | <jtv> It's not a binary thing, there is lots of space in between |
17:17:16 | FromDiscord | <jmgomez> @pietroppeter linked this paper http://web.cs.ucla.edu/~palsberg/paper/dedicated-to-kozen12.pdf if you want to do more |
17:17:20 | * | Ekho joined #nim |
17:18:35 | FromDiscord | <jtv> I know the literature and have implemented more than a few type systems in my career |
17:18:39 | FromDiscord | <jmgomez> Yeah I guess to some extend you are right but at the core of it there is that. But if you feel like it, you can always do a pr and improve it |
17:18:49 | FromDiscord | <jtv> I even wrote a paper with Jens |
17:19:07 | FromDiscord | <jtv> (The author of that paper) |
17:25:15 | * | beholders_eye quit (Ping timeout: 260 seconds) |
17:25:21 | FromDiscord | <jtv> In general, when we talk about NP Hard problems, thatâs worst case, but there are not a lot of hard instances. This is why public key cryptography doesnât use NP hard problems at the moment |
17:26:02 | FromDiscord | <jtv> It doesnât preclude approximations or constraints that are very practical. |
17:27:07 | FromDiscord | <jtv> Take 3SAT as an example, there are some pretty good solvers and they work really well for small even medium problems |
17:40:51 | * | rockcavera quit (Ping timeout: 268 seconds) |
17:47:42 | * | rockcavera joined #nim |
17:47:42 | * | rockcavera quit (Changing host) |
17:47:42 | * | rockcavera joined #nim |
17:50:33 | * | beholders_eye joined #nim |
18:03:16 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzzâŠ) |
18:14:45 | * | progranner joined #nim |
18:23:34 | FromDiscord | <pietroppeter> In reply to @jmgomez "<@588390287810887693> linked this paper": This is the thread for context: https://forum.nim-lang.org/t/10072#66447 |
18:24:20 | FromDiscord | <pietroppeter> Note that I know next to nothing about type theory, just used Google to find that out and seemed relevant |
18:57:35 | FromDiscord | <jtv> sent a long message, see http://ix.io/4vxp |
18:59:19 | FromDiscord | <jtv> Thereâs also the option to make it a dynamic type check instead, tho I have never loved that option |
19:42:52 | FromDiscord | <Elegantbeef> Oh hey it's the forum post where I needlessly rambled for quite some time |
19:52:27 | FromDiscord | <deech> One unexpectedly useful feature of Haskell's overloading (via typeclasses) is return type polymorphism which means that when dispatching looks at the function name, argument types and also the return type, eg. `proc p(s:string):int` is distinct from `proc p(s:string):bool`. |
19:52:44 | FromDiscord | <deech> (edit) "One unexpectedly useful feature of Haskell's overloading (via typeclasses) is return type polymorphism which means that when dispatching ... looks" added "it" |
19:53:46 | FromDiscord | <jtv> Yeah, I agree, have also found it useful |
19:54:17 | FromDiscord | <sazk07> that's interesting |
19:54:29 | FromDiscord | <jtv> Beef, if that's the only post you've ever rambled in, I'd be shocked đ |
19:54:38 | FromDiscord | <Elegantbeef> It's not |
19:54:49 | FromDiscord | <Elegantbeef> But it's the one I've rambled in the most |
19:55:06 | FromDiscord | <jtv> If that's you rambling the most, you're doing quite well |
19:57:41 | FromDiscord | <deech> For further reading on co/contravariance and type inference I highly recommend Stephan Dolan's thesis (https://www.cs.tufts.edu/~nr/cs257/archive/stephen-dolan/thesis.pdf). I'm not a type theorist but found sections of it readable. I'm also not aware of any industry language that has implemented it. |
19:58:24 | FromDiscord | <Elegantbeef> I can barely read what I write and you're sending a thesis |
19:59:19 | FromDiscord | <deech> As an aside Stephan Dolan is an absolutely outstanding writer, the stuff I understood was due to him not my knowledge. |
20:00:30 | FromDiscord | <jtv> Overloading and objects are the two places where you generally need to start requiring types. I think for objects, people should use them sparingly anyway, and if they want to use them, then go ahead and declare all your types... even if you do you'll tend to have way too much unneeded run time checking |
20:03:42 | NimEventer | New thread by arnetheduck: Intops - core primtives for working with integers efficiently, see https://forum.nim-lang.org/t/10187 |
20:09:50 | FromDiscord | <Nerve> In reply to @jtv "Overloading and objects are": Objects as in Nim objects, like records/structs? Or objects in the class+instanced sense? |
20:15:01 | FromDiscord | <jtv> objects in the OO sense, meaning dynamic dispatch, and usually overloading |
20:21:47 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzzâŠ) |
20:23:47 | FromDiscord | <Elegantbeef> @jtv\: do you mean people should generally try to use concepts/generics only and use objects when it's a specialisation? |
20:27:55 | * | progranner joined #nim |
20:32:25 | FromDiscord | <ieltan> sent a code paste, see https://paste.rs/Kbz |
20:32:42 | FromDiscord | <Elegantbeef> `WaitableEvent[T]`.... `Future[T]` |
20:32:51 | FromDiscord | <Elegantbeef> Concepts are not runtime values they're constraints |
20:33:35 | FromDiscord | <ieltan> Well, alright but then this doesnt work:â”`var dispatchListener = initTable[string, WaitableEvent[T]]` |
20:33:49 | FromDiscord | <ieltan> I have to replace T by the event in question |
20:33:57 | FromDiscord | <Elegantbeef> Yes |
20:34:07 | FromDiscord | <Elegantbeef> Concepts are not runtime values |
20:34:08 | FromDiscord | <Elegantbeef> You either want an object variant or to use inheritance |
20:34:08 | FromDiscord | <ieltan> .. and create a table for each event |
20:34:09 | FromDiscord | <jtv> Yeah, more or less. |
20:35:59 | FromDiscord | <ieltan> my goal is to have a table that can hold multiple value type (events whose values are known), what can i do to acheive that without making a dozen tables ? |
20:36:21 | FromDiscord | <ieltan> (edit) "values" => "types" |
20:36:52 | FromDiscord | <Elegantbeef> Object variants, inheritance, ... |
20:37:11 | FromDiscord | <Elegantbeef> https://internet-of-tomohiro.netlify.app/nim/faq.en.html#type-how-to-store-different-types-in-seqqmark |
20:38:24 | FromDiscord | <ieltan> I tried object variant but not being able to set the same argument name for each type lead me to a deadend |
20:38:32 | FromDiscord | <ieltan> I'll try inheritance, thanks ! |
20:38:40 | FromDiscord | <Elegantbeef> Or try fungus |
20:38:47 | FromDiscord | <Elegantbeef> Fungus allows shared name fields due to using tuples |
20:38:51 | FromDiscord | <ieltan> what's that ? |
20:39:11 | FromDiscord | <ieltan> Can I get a link please ? |
20:39:18 | FromDiscord | <ieltan> oh wait nvlm |
20:39:24 | FromDiscord | <Elegantbeef> I literally just gave you a link that had a link |
20:39:27 | FromDiscord | <ieltan> its in the link you sent me |
20:39:27 | FromDiscord | <ieltan> yeah |
20:39:30 | FromDiscord | <ieltan> thanks đ |
20:41:54 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzzâŠ) |
20:43:07 | * | progranner joined #nim |
21:00:53 | * | demetera quit (Remote host closed the connection) |
21:01:39 | * | demetera joined #nim |
21:10:00 | * | demetera quit (Remote host closed the connection) |
21:20:47 | FromDiscord | <Arathanis> why do I sometimes see a `:` prefix in a template/generic instantiation? |
21:21:21 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4vxR |
21:21:22 | FromDiscord | <Arathanis> w/o the ":" it will not compile. |
21:22:58 | FromDiscord | <Elegantbeef> Cause you left out that it's a method call |
21:23:16 | FromDiscord | <Elegantbeef> `a.b[: T]()` requires `:` to disambiguate whether it's a method call or `[]` |
21:24:14 | FromDiscord | <Arathanis> wouldn't that be defined as `method authenticate` rather than `proc authenticate` though? |
21:24:32 | FromDiscord | <Arathanis> oh wait, i follow you now |
21:24:55 | FromDiscord | <Arathanis> this section of the manual: https://media.discordapp.net/attachments/371759389889003532/1105606349116678215/image.png |
21:46:40 | * | advesperacit quit () |
21:47:13 | * | progranner quit (Quit: My Mac has gone to sleep. ZZZzzzâŠ) |
21:54:56 | * | progranner joined #nim |
21:57:17 | * | myrix joined #nim |
21:57:33 | myrix | @ |
21:57:34 | * | myrix quit (Remote host closed the connection) |
21:57:54 | * | myrix joined #nim |
21:58:11 | FromDiscord | <BoomBang> For some reason |
21:58:16 | FromDiscord | <Elegantbeef> @ |
21:58:23 | FromDiscord | <BoomBang> oh wrong time |
21:58:27 | myrix | @e |
21:58:33 | FromDiscord | <Elegantbeef> It's never the wrong time |
21:58:39 | FromDiscord | <BoomBang> Ok |
21:58:42 | FromDiscord | <BoomBang> so |
21:58:48 | FromDiscord | <BoomBang> every time I run my code |
21:58:59 | FromDiscord | <BoomBang> I get this error, for example: |
22:00:23 | FromDiscord | <BoomBang> sent a code paste, see https://play.nim-lang.org/#ix=4vy0 |
22:00:33 | FromDiscord | <BoomBang> (edit) |
22:00:55 | FromDiscord | <Elegantbeef> Did you import the `[]` operator for your type? |
22:01:11 | FromDiscord | <BoomBang> In reply to @Elegantbeef "Did you import the": How do you do that? |
22:01:45 | FromDiscord | <Elegantbeef> put an export marker on your `[]` procv |
22:01:50 | FromDiscord | <Elegantbeef> proc\ |
22:02:35 | FromDiscord | <BoomBang> In reply to @Elegantbeef "put an export marker": oh yeah |
22:02:50 | FromDiscord | <BoomBang> `last_asts` is a seq |
22:03:07 | FromDiscord | <BoomBang> that's what made me confused for the most part |
22:03:18 | FromDiscord | <Elegantbeef> is `body` a seq? |
22:03:28 | FromDiscord | <BoomBang> In reply to @Elegantbeef "is `body` a seq?": yeah |
22:03:44 | * | progranner quit (Ping timeout: 248 seconds) |
22:04:12 | FromDiscord | <Elegantbeef> Well you're missing a `[]` somewhere |
22:04:20 | FromDiscord | <Elegantbeef> Or calling `[]` on something that doesnt accept it |
22:05:21 | FromDiscord | <BoomBang> Oh yeah |
22:05:36 | FromDiscord | <BoomBang> it just doesn |
22:05:44 | FromDiscord | <BoomBang> (edit) "doesn" => "doesn't let me do `delete()`" |
22:06:26 | FromDiscord | <BoomBang> in some specific yet (imho seemingly) arbitrary cases |
22:07:05 | FromDiscord | <Elegantbeef> Well without full code it's hard to say |
22:07:35 | FromDiscord | <BoomBang> I have the full code in a github i think |
22:09:06 | FromDiscord | <BoomBang> https://github.com/BoomBangYeeted/Artii |
22:10:36 | FromDiscord | <Elegantbeef> Compiles fine here so you didnt push your changes |
22:13:43 | * | myrix quit (Remote host closed the connection) |
22:22:07 | * | Notxor quit (Remote host closed the connection) |
22:27:35 | FromDiscord | <BoomBang> In reply to @Elegantbeef "Compiles fine here so": phew... |
22:27:44 | FromDiscord | <BoomBang> at least i didn't commit the code |
22:34:02 | FromDiscord | <jtv> That's what branches are for |
22:34:15 | FromDiscord | <jtv> Work in a branch, push the branch, someone can look at it |
22:34:15 | FromDiscord | <Elegantbeef> Indeed |
22:34:41 | FromDiscord | <jtv> `git checkout -b buggy` |
22:43:51 | * | lucasta joined #nim |
22:47:02 | FromDiscord | <BoomBang> In reply to @jtv "That's what branches are": yup |
22:47:07 | FromDiscord | <BoomBang> i just forgot to commit |
22:47:19 | FromDiscord | <BoomBang> but my new code didn't work so at least it still will |
22:56:20 | NimEventer | New Nimble package! gamepad - Cross-platform gamepad driver, see https://github.com/konsumer/nim-gamepad |
23:31:14 | FromDiscord | <Nlits (Ping on reply)> Anyone have a pathfinding algo implementation in nim that I can modify for my own use? |
23:34:29 | FromDiscord | <Nlits (Ping on reply)> oh https://github.com/Nycto/AStarNim |
23:39:30 | * | lucasta quit (Remote host closed the connection) |
23:43:59 | * | lucasta joined #nim |