00:52:00 | * | wallabra quit (Ping timeout: 264 seconds) |
01:07:10 | * | monkeybusiness quit (Remote host closed the connection) |
01:16:17 | FromDiscord | <Prestige> Is there a MaxHeap data type in Nim? |
01:16:23 | FromDiscord | <Prestige> I found HeapQueue but it's a min heap |
01:25:41 | FromDiscord | <Prestige> Speaking of HeapQueue, any reason why I'm getting `Error: attempting to call undeclared routine: 'push'` when trying to add a float to the queue? |
01:26:27 | FromDiscord | <huantian> Just redefine < as > :P |
01:26:29 | FromDiscord | <Elegantbeef> Did you forget to import it? |
01:26:34 | FromDiscord | <Prestige> It's imported |
01:26:47 | FromDiscord | <Elegantbeef> Code? |
01:27:38 | FromDiscord | <Prestige> It's a bit of code inside a template, and this template is being used in another file that imports this file |
01:27:45 | FromDiscord | <Prestige> Maybe something weird with module resolution? |
01:28:17 | FromDiscord | <Elegantbeef> `bind push` |
01:28:20 | FromDiscord | <Elegantbeef> or `mixin push` |
01:29:05 | FromDiscord | <Prestige> No difference |
01:29:33 | FromDiscord | <Prestige> https://media.discordapp.net/attachments/371759389889003532/1019419601802645535/unknown.png |
01:29:43 | FromDiscord | <Prestige> Left file imports the right file and uses the template |
01:30:40 | FromDiscord | <Prestige> Hm it was because I was only importing the one function |
01:30:50 | FromDiscord | <Elegantbeef> and you `mixin push` inside the template? |
01:31:05 | FromDiscord | <Prestige> no |
01:31:15 | FromDiscord | <Elegantbeef> Well do that |
01:31:23 | FromDiscord | <Elegantbeef> Either mixin or bind should resolve it |
01:31:27 | FromDiscord | <Prestige> mixin inside the template works |
01:31:37 | FromDiscord | <Prestige> I feel like this should have been resolved by the compiler 🤔 |
01:32:36 | FromDiscord | <Elegantbeef> It's a generic type inside a template, they're a bit odd |
01:33:00 | FromDiscord | <Elegantbeef> Why are you even using a template here |
01:33:01 | FromDiscord | <Elegantbeef> The arguments do not need to be a template |
01:33:05 | FromDiscord | <Elegantbeef> You arent passing code or anything there |
01:33:08 | FromDiscord | <Elegantbeef> This is just a procedure |
01:54:41 | FromDiscord | <SaAnd> is the playground down again? |
01:55:50 | FromDiscord | <Prestige> Yep |
01:56:05 | FromDiscord | <Prestige> or still, perhaps |
01:56:15 | FromDiscord | <Prestige> Elegantbeef I wanted my code to be inlined |
01:56:49 | FromDiscord | <Elegantbeef> Cause yea the costly part is totally the procedure call |
01:57:27 | FromDiscord | <Prestige> There is an overhead yes |
01:57:48 | FromDiscord | <Elegantbeef> The overhead of the call is negligible to the logic in the code |
01:59:37 | FromDiscord | <Prestige> Sure but calling a procedure isn't going to make the code faster to compensate |
01:59:50 | FromDiscord | <Elegantbeef> It's also not going to make it measurably slower |
02:00:21 | FromDiscord | <Prestige> I basically just wanted to break down a massive function into smaller ones but could keep the code inlined |
02:00:30 | FromDiscord | <Prestige> Don't think there's an issue with using a template |
02:00:46 | FromDiscord | <Prestige> Other than editor support being garbage |
02:01:03 | FromDiscord | <Elegantbeef> I'd argue there is, but I'm an idiot pretending to know anything |
02:01:30 | FromDiscord | <Prestige> What's wrong with using a template? |
02:02:38 | FromDiscord | <Elegantbeef> It's not needed |
02:03:41 | FromDiscord | <Prestige> I mean templates could basically not exist at all in this language, they aren't needed |
02:03:53 | FromDiscord | <Prestige> Could use procedures and macros for everything |
02:03:55 | FromDiscord | <Elegantbeef> To the contrary |
02:04:13 | FromDiscord | <Elegantbeef> templates are cheaper than macros to use |
02:04:13 | FromDiscord | <Elegantbeef> They dont run on the Vm |
02:04:28 | FromDiscord | <Prestige> I mean use procs instead of templates |
02:04:36 | FromDiscord | <Elegantbeef> Procs and templates dont share semantics |
02:05:05 | FromDiscord | <Elegantbeef> Templates and macros share some semantics but templates dont run on the VM so are faster and more ergonomic |
02:05:16 | FromDiscord | <Prestige> But you could get away with never using templates |
02:05:19 | FromDiscord | <Prestige> by using procs |
02:05:24 | FromDiscord | <Elegantbeef> no you cannot |
02:05:41 | FromDiscord | <Prestige> Are you sure? |
02:05:44 | FromDiscord | <Rika> Yes |
02:06:00 | FromDiscord | <Prestige> I haven't seen any cases where that's true, at least |
02:09:09 | FromDiscord | <Elegantbeef> Do that with a proc |
02:09:11 | FromDiscord | <Elegantbeef> Yes you can do that with a macro, but like i said macros run on the VM so you're slowing your code down |
02:09:11 | FromDiscord | <Elegantbeef> templates are needed imo |
02:09:11 | FromDiscord | <Elegantbeef> But in this case an inline annotated procedure is the sane solution |
02:09:13 | FromDiscord | <Elegantbeef> Templates have different semantic which open you up to possible bugs |
02:09:13 | FromDiscord | <Elegantbeef> mratsim or arne did indicate that inline is generally respected in a release build |
02:09:13 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4aqV |
02:09:15 | FromDiscord | <Elegantbeef> I get using templates for when you want things certainly inlined, but in this case you're just breaking code apart into procedures and using templates to pretend it's a single procedure, it reduces code reuse |
02:09:15 | FromDiscord | <Elegantbeef> But it's ultimately your code so you obviously can say "shut up beef" and carry on |
02:10:04 | FromDiscord | <Prestige> Couldn't you just write that out with procs? I mean that's basically what the template is doing |
02:12:33 | FromDiscord | <Rika> Okay, how? |
02:13:34 | FromDiscord | <Prestige> I'm not entirely sure what this is doing, but isn't it like `proc get(a: char): char = a` ? or something |
02:13:41 | FromDiscord | <Rika> No |
02:13:46 | FromDiscord | <Prestige> What is it then? |
02:14:06 | FromDiscord | <Rika> proc getChar(a: char): char = a |
02:14:18 | FromDiscord | <Prestige> cool, well there you go |
02:14:22 | FromDiscord | <Prestige> You just did it with a proc |
02:14:25 | FromDiscord | <Rika> Nope |
02:14:29 | FromDiscord | <Prestige> Nope what? |
02:14:35 | FromDiscord | <Rika> Copy paste isnt "with a proc" |
02:14:40 | FromDiscord | <Prestige> uh |
02:14:43 | FromDiscord | <Prestige> you wrote a proc |
02:14:49 | FromDiscord | <Rika> It doesn’t make the template |
02:14:57 | FromDiscord | <Rika> It “is the template’s body” |
02:15:02 | FromDiscord | <Prestige> Yes |
02:15:11 | FromDiscord | <Prestige> You can still get the same end result without a template |
02:15:17 | FromDiscord | <Rika> Sure of course |
02:15:22 | FromDiscord | <Prestige> That's my point |
02:15:22 | FromDiscord | <Rika> You can do things without macros too |
02:15:36 | FromDiscord | <Rika> You can do things without procs too, lets go back to assembly shall we? |
02:15:45 | FromDiscord | <Rika> I don’t know what your point is |
02:15:49 | FromDiscord | <Prestige> You can write assembly in Nim? |
02:15:53 | FromDiscord | <Rika> Of course you don’t need templayes |
02:15:56 | FromDiscord | <Elegantbeef> Templates are for templating code, so of course you can do it manually |
02:16:01 | FromDiscord | <Prestige> My point was that you can get away without using templates |
02:16:07 | FromDiscord | <Rika> (edit) "templayes" => "templates" |
02:16:13 | FromDiscord | <Elegantbeef> If you arent templating code you're making a routine or as Nim calls it a proceudre |
02:16:36 | FromDiscord | <Elegantbeef> You can get away without templates or macros or Nim |
02:17:09 | FromDiscord | <Elegantbeef> Like it's such a reductionist view |
02:18:32 | FromDiscord | <Prestige> I don't know what your point is, I was just saying you can do stuff in nim without using templates if you wanted to |
02:19:34 | FromDiscord | <huantian> yes you can do the same stuff with templates with macros technically |
02:19:45 | FromDiscord | <huantian> it's just nicer to be able to use templates |
02:20:38 | * | jmdaemon joined #nim |
02:20:47 | FromDiscord | <Elegantbeef> My point is you dont use a truck to drive in a finishing nail |
02:20:53 | FromDiscord | <Elegantbeef> You use the tool that is applicable |
02:21:03 | FromDiscord | <Elegantbeef> You're making routines, so use a procedure |
02:24:54 | FromDiscord | <Elegantbeef> In the end we're all just armchair programming so i'll go find a bikeshed to put my bike in |
02:26:43 | NimEventer | New thread by oyster: Question on use GUIPlus on windows 10 64bits, see https://forum.nim-lang.org/t/9464 |
02:27:25 | NimEventer | New Nimble package! ezscr - Portable and easy Nimscript runner. Nim compiler not needed, see https://github.com/thisago/ezscr |
02:28:33 | FromDiscord | <Elegantbeef> Oh cook it depends on nimscript |
02:28:36 | FromDiscord | <Elegantbeef> cool even |
02:29:05 | FromDiscord | <Elegantbeef> nimscripter even |
02:29:08 | FromDiscord | <Rika> Cool |
02:30:06 | FromDiscord | <Elegantbeef> Lol i'm fairly certain they dont pack a stdlib |
02:39:54 | FromDiscord | <miriandavidson> Thank me later https://t.me/+UI7SZ3fhpUkyMjg8 |
02:50:54 | FromDiscord | <huantian> <@&371760044473319454> |
02:53:18 | FromDiscord | <Rika> Why can’t I thank you now |
02:55:06 | FromDiscord | <Elegantbeef> Cause they left matrix |
02:55:07 | FromDiscord | <huantian> you have to thank them later |
03:02:47 | * | CyberTailor joined #nim |
03:08:29 | FromDiscord | <Elegantbeef> Oh boy i think the matrix bots finally started spamming people |
04:01:27 | FromDiscord | <ravinder387> proc add[T](a: T, b:T) = return a + b |
04:01:40 | FromDiscord | <Elegantbeef> No return type |
04:01:44 | FromDiscord | <ravinder387> how to this same things by Templates or macro |
04:02:08 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ar6 |
04:02:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ar7 |
04:06:45 | FromDiscord | <ravinder387> add(2,3) # i can call like that both template , macro |
04:07:38 | FromDiscord | <ravinder387> nim playground not loading for past few 4 days |
04:07:47 | FromDiscord | <Yardanico> In reply to @ravinder387 "nim playground not loading": use wandbox or tio |
04:07:56 | FromDiscord | <Yardanico> or replit (although idk if they have updated their nim version) |
04:08:12 | * | jmdaemon quit (Ping timeout: 264 seconds) |
04:15:24 | FromDiscord | <Girvo> sent a code paste, see https://play.nim-lang.org/#ix=4ar9 |
04:16:27 | FromDiscord | <Elegantbeef> Is it not just extern? |
04:16:29 | FromDiscord | <Girvo> `id` here is `IP_EVENT`, but can I do an `extern`? I guess I could just define it as a `var` that binds to `IP_EVENT` via `importc` in this case, with a type `esp_event_base_t`? |
04:16:38 | FromDiscord | <Girvo> Yeah it is pretty much |
04:16:43 | FromDiscord | <Elegantbeef> Yea if you need more you can make a template |
04:16:50 | * | jmdaemon joined #nim |
04:17:06 | FromDiscord | <Girvo> Probably will need to eventually, its not the only event handling stuff in ESP-IDF I'd like to bind |
04:17:15 | FromDiscord | <Girvo> I know elcritch bound some of it, I might have a look in Nesper |
04:17:23 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4ara |
04:17:30 | FromDiscord | <Girvo> Oh lol I had no idea there was an extern pragma |
04:17:33 | FromDiscord | <Girvo> Champion ❤️ |
04:17:51 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/manual.html#foreign-function-interface-extern-pragma |
04:17:51 | FromDiscord | <Elegantbeef> Yea no clue if it does what you need 😄 |
04:19:10 | FromDiscord | <Elegantbeef> I've found the worst part about wasm now |
04:19:11 | FromDiscord | <Elegantbeef> Reasoning the abi |
04:19:22 | FromDiscord | <Elegantbeef> mismatching type sizes fails silently 😄 |
04:19:48 | FromDiscord | <Elegantbeef> So this means to be sane you need a `getMyTypeSize` in the wasm to ensure no ABI incompatibilities |
04:22:26 | FromDiscord | <Girvo> oh god lol |
04:25:28 | FromDiscord | <Girvo> https://github.com/espressif/esp-idf/blob/master/components/esp_netif/include/esp_netif_defaults.h |
04:25:32 | FromDiscord | <Girvo> Ugh binding this is going to be painful |
04:27:49 | FromDiscord | <Girvo> I cannot for the life of me find the type/struct definition for `esp_netif_netstack_config_t` lol |
04:28:28 | * | CyberTailor left #nim (Konversation terminated!) |
04:32:16 | FromDiscord | <Girvo> https://github.com/espressif/esp-idf/blob/349d6555ea8f0557cd3cb05853493f1f355e38d0/components/esp_netif/include/lwip/esp_netif_net_stack.h↵↵Found it, finally. Though man their constant typedefs and defines and such make this so annoying |
04:33:10 | FromDiscord | <Girvo> I really don't understand that `err_t` and `void` typedef lol |
04:42:06 | * | jmdaemon quit (Quit: ZNC 1.8.2 - https://znc.in) |
04:42:20 | FromDiscord | <Girvo> Wrapping a C api that wraps a C++ api is an exercise in pain it seems |
05:04:13 | FromDiscord | <ravinder387> let c = quote do:↵ 1 + 1 this is unevaluated expression how to evaluate it |
05:04:26 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4arh |
05:11:28 | * | jmdaemon joined #nim |
05:29:13 | NimEventer | New thread by KerryC: One lookup table indexed by multiple enums, see https://forum.nim-lang.org/t/9465 |
05:29:27 | FromDiscord | <ravinder387> sent a code paste, see https://paste.rs/tg8 |
05:29:52 | FromDiscord | <ravinder387> this macro generate AST now to how to reach to eval/execution part |
05:30:35 | FromDiscord | <ravinder387> myAssert(a != b) -- create abstract synatx tree only |
05:31:28 | FromDiscord | <ravinder387> can i use parseStmt |
05:37:48 | FromDiscord | <Elegantbeef> You cannot evaluate teh AST no |
05:38:05 | FromDiscord | <Elegantbeef> if you want to evaluate the output of a macro do `static: myMacro()` |
05:49:21 | FromDiscord | <ravinder387> cannot eval at compile time https://media.discordapp.net/attachments/371759389889003532/1019484979350224896/2022-09-14.png |
05:49:34 | FromDiscord | <Elegantbeef> Of course not |
05:49:47 | FromDiscord | <Elegantbeef> `let` is a runtime value |
05:57:12 | FromDiscord | <ravinder387> ok how to eval at runtime then |
05:57:45 | FromDiscord | <Elegantbeef> A macro call is placed where you call it |
05:57:49 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4arr |
05:57:59 | FromDiscord | <ravinder387> a b ---- generate code let b = 0 |
05:58:14 | FromDiscord | <Elegantbeef> Correct, now you just write code |
06:01:05 | FromDiscord | <ravinder387> thanks |
06:08:44 | FromDiscord | <PyryTheBurger> When i have seq of a base type that contains types inheriting from that base type, how do I get them as the inheriting type without having to convert them? |
06:09:08 | FromDiscord | <Elegantbeef> Aside from using dynamic dispatch? |
06:24:59 | FromDiscord | <PyryTheBurger> What |
06:25:20 | FromDiscord | <Elegantbeef> You can only use methods or manual conversions here |
06:30:15 | FromDiscord | <PyryTheBurger> Oh so i ned to use methods |
06:30:27 | FromDiscord | <CSwine> any statistics on nim vs c++ vs rust performance? |
06:30:32 | FromDiscord | <PyryTheBurger> But how do i get then from the seq without manual conversion |
06:33:43 | FromDiscord | <Elegantbeef> They're the same↵(@CSwine) |
06:34:03 | FromDiscord | <Elegantbeef> Cause you have to use manual conversions to go from Parent -\> Child |
06:34:04 | FromDiscord | <Elegantbeef> what are you trying to do↵(@PyryTheBurger) |
06:34:09 | FromDiscord | <Elegantbeef> It's apart of the type system |
07:07:36 | * | m5zs7k quit (Ping timeout: 265 seconds) |
07:07:46 | * | rockcavera quit (Remote host closed the connection) |
07:08:39 | * | m5zs7k joined #nim |
07:11:36 | FromDiscord | <Rika> In reply to @CSwine "any statistics on nim": In what sense? Performance depends a lot more on how the code is written than the language |
07:15:45 | FromDiscord | <CSwine> thats true. Im mostly looking for a bunch of benchmarks for nim, c++ and rust projects of the same "type". Like a web framework benchmark for example |
07:16:12 | FromDiscord | <Rika> Well that’s more dependent on the web server implementation, yet again |
07:18:30 | FromDiscord | <Rika> Anyway I don’t remember the websites which offer a comparison sorry |
07:24:39 | FromDiscord | <Elegantbeef> https://www.techempower.com i think is one |
07:25:06 | FromDiscord | <Elegantbeef> Whoops https://www.techempower.com/benchmarks |
07:46:27 | FromDiscord | <CSwine> n. 426 |
07:46:32 | FromDiscord | <CSwine> well not a bad start i guess |
07:49:55 | NimEventer | New post on r/nim by CanMyPro: Reading from output stream of a process, "hangs", see https://reddit.com/r/nim/comments/xdvro5/reading_from_output_stream_of_a_process_hangs/ |
08:25:48 | FromDiscord | <PyryTheBurger> sent a code paste, see https://play.nim-lang.org/#ix=4asr |
08:25:56 | FromDiscord | <Elegantbeef> Yea use methods |
08:27:00 | FromDiscord | <PyryTheBurger> In reply to @Elegantbeef "Yea use methods": But does it know what the type of the thing ia in the seq? Or doesnt it convert the Lol2 into a Lol when adding |
08:27:14 | FromDiscord | <Rika> latter yers |
08:27:15 | FromDiscord | <Rika> (edit) "yers" => "yes" |
08:27:38 | FromDiscord | <Rika> it becomes a Lol in struct shape but the info that its a Lol2 is still there and is checked when using methods |
08:27:49 | FromDiscord | <PyryTheBurger> Ohh |
08:27:53 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4asw |
08:28:04 | FromDiscord | <PyryTheBurger> Why i need .baae. |
08:28:38 | FromDiscord | <Rika> idk how to explain that , beef pls |
08:29:03 | FromDiscord | <Elegantbeef> Base is required cause you need to say "This is a base method so when call this unfold all children types" |
08:29:19 | FromDiscord | <Elegantbeef> Nim doesnt use vtables so base is required to unpack the type information and generate the flow control |
08:29:35 | FromDiscord | <Elegantbeef> Atleast i imagine that's why |
08:30:16 | FromDiscord | <PyryTheBurger> But why do procs dont work? |
08:30:31 | FromDiscord | <Elegantbeef> Procs are statically dispatched |
08:30:43 | FromDiscord | <Elegantbeef> They are dispatched at compile time, methods are dispatched at runtime |
08:31:07 | FromDiscord | <Elegantbeef> Which basically means methods implement the aforementioned generation to check the type |
08:31:29 | FromDiscord | <PyryTheBurger> So thats why inheriting types works? |
08:31:56 | FromDiscord | <Elegantbeef> Yes methods are only for runtime dispatch using inheritance |
08:32:09 | FromDiscord | <PyryTheBurger> But when looping, doesnt the method think its a normal Lol because the seq converts them |
08:32:45 | FromDiscord | <Elegantbeef> No cause methods unpack types |
08:32:46 | FromDiscord | <Elegantbeef> That's the entire point |
08:32:55 | FromDiscord | <Elegantbeef> Methods allow you to override behaviour for subtypes |
08:33:00 | FromDiscord | <PyryTheBurger> Okay sorry now i got it |
08:35:18 | FromDiscord | <PyryTheBurger> That actually helps me a lot |
08:35:41 | * | clemens3 left #nim (WeeChat 2.7) |
08:38:45 | FromDiscord | <PyryTheBurger> Can the base method have some arguments and then those arguments be on the inheriting methods? |
08:39:00 | FromDiscord | <Elegantbeef> Of course |
09:34:11 | FromDiscord | <AmjadHD> sent a code paste, see https://play.nim-lang.org/#ix=4asK |
09:50:08 | * | wallabra joined #nim |
10:04:12 | * | jjido joined #nim |
10:16:51 | * | mahlon quit (Ping timeout: 252 seconds) |
10:35:44 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
10:47:51 | * | xet7 joined #nim |
10:56:44 | * | jmdaemon quit (Ping timeout: 244 seconds) |
11:05:54 | * | xet7 quit (Quit: Leaving) |
11:20:55 | * | mahlon joined #nim |
11:41:34 | FromDiscord | <ShalokShalom (ShalokShalom)> Where do you see the biggest limitation of Nim, Elegant? |
11:41:36 | FromDiscord | <ShalokShalom (ShalokShalom)> Also, hi \:) |
11:47:40 | FromDiscord | <Rika> Hello |
11:55:45 | FromDiscord | <jan0809> hi |
12:21:19 | * | cakir joined #nim |
12:38:21 | FromDiscord | <TheOctoberSurprise> good morning |
12:45:39 | * | arkurious joined #nim |
12:51:02 | FromDiscord | <retkid> In reply to @ShalokShalom (ShalokShalom) "Where do you see": for me, there is no fully featured interpreted mode, which is just me fishing for problems |
12:55:24 | * | cakir quit (Quit: Leaving) |
13:16:12 | FromDiscord | <PyryTheBurger> help me i have completely broken my nim installation, produces exes that dont run and intellisense is completely gone |
13:17:45 | FromDiscord | <PyryTheBurger> and my .nimble folder doesnt contain a bin folder |
13:26:09 | FromDiscord | <PyryTheBurger> god damn it right when i start getting motivation for nim, everything breaks |
13:27:28 | FromDiscord | <PyryTheBurger> some problem with packages |
13:30:29 | * | yolo joined #nim |
13:39:21 | FromDiscord | <ezquerra> In reply to @ShalokShalom (ShalokShalom) "Where do you see": IMHO, the biggest limitations are the problems with false antivirus detections on Windows and the relatively poor state of _some_ of the tooling (particularly debugger support and the VS Code plugin which is pretty bare bones). Also compilation time is not bad but could be improved |
13:48:34 | FromDiscord | <PyryTheBurger> wait how do i configure the mingw compiler path |
13:48:43 | FromDiscord | <PyryTheBurger> cuz its the wrong path its trying to call |
13:54:37 | FromDiscord | <PyryTheBurger> YESSSSSSSSSSSSSSS i FIXED ITTTTTTTTT |
13:59:12 | * | wallabra quit (Ping timeout: 264 seconds) |
13:59:56 | FromDiscord | <huantian> Nice |
14:40:55 | * | jjido joined #nim |
14:43:09 | FromDiscord | <@thatrandomperson5-6310e3b26da03> How would i get the parent of a xmlNode in XmlTree |
14:53:42 | FromDiscord | <Tanguy> You can't |
14:56:09 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
14:56:45 | FromDiscord | <Tanguy> sent a code paste, see https://play.nim-lang.org/#ix=4atV |
15:10:50 | FromDiscord | <Bung> @ElegantBeef https://github.com/nim-lang/Nim/issues/19882 can the message point out which generic param, I dunno where the info stored |
15:15:09 | * | rockcavera joined #nim |
15:15:09 | * | rockcavera quit (Changing host) |
15:15:09 | * | rockcavera joined #nim |
15:33:35 | FromDiscord | <Bung> nvm , found just need fall through subsequent proc |
15:34:47 | * | wallabra joined #nim |
15:51:35 | FromDiscord | <@thatrandomperson5-6310e3b26da03> sent a code paste, see https://play.nim-lang.org/#ix=4auj |
16:14:59 | * | fallback quit (Ping timeout: 268 seconds) |
16:22:34 | sforman | yo |
16:22:49 | sforman | (oops wrong window sorry) |
16:22:50 | FromDiscord | <Rika> oy |
16:22:58 | FromDiscord | <Rika> ? |
16:40:55 | FromDiscord | <matrix_coinbase> Click and thank me later ↵👇👇👇👇👇👇↵http://t.me/Stevecoldham001 |
16:41:17 | FromDiscord | <auxym> <@&371760044473319454> |
16:46:31 | FromDiscord | <flywind> What vscode did to my file with Unicode characters? Why I got => https://github.com/nim-lang/Nim/blob/49d2fe4295493a46027dcb6b36a76fe77e47fd44/tests/stdlib/tjsontestsuite.nim#L22 |
16:46:44 | FromDiscord | <flywind> (edit) "What ... vscodedo" added "did" | "did" => "do" |
16:54:13 | FromDiscord | <vestel> In reply to @Elegantbeef "Base is required cause": Doesn't it work like `virtual void x() = 0;` in C++? |
17:03:39 | FromDiscord | <flywind> In reply to @flywind "What did vscode do": I had to revert a single, fortunately it works. |
17:03:44 | FromDiscord | <flywind> (edit) "single," => "single file," |
17:32:48 | * | jjido joined #nim |
17:33:57 | * | fallback joined #nim |
17:52:00 | FromDiscord | <Phil> sent a long message, see http://ix.io/4auZ |
17:52:27 | FromDiscord | <Rika> That’s kind of a strange way to split compilation |
17:52:46 | FromDiscord | <Phil> What would another one be? |
17:53:23 | FromDiscord | <Phil> Ah, they're also doing it from a C perspective since obviously there's not gonna be nim material on that out there, but I assume the principles are highly similar |
17:54:18 | * | wallabra quit (Ping timeout: 265 seconds) |
17:54:38 | FromDiscord | <Rika> Preprocessing really only matters for C |
17:54:47 | FromDiscord | <Rika> Since they actually have a preprocessor |
17:55:10 | FromDiscord | <Rika> Nim doesn’t, macro evaluation would go under compilation |
17:56:13 | FromDiscord | <Phil> They grouped "removing comments" also as part of pre-processing but I get your point that what happens where is significantly shifted in nim |
17:56:24 | FromDiscord | <Rika> Linking is part of the external compiler part of Nim |
18:00:01 | FromDiscord | <Phil> On linux the external compiler is gcc, what is actually handed to gcc?↵Actual C code or the parsed AST from normal source code + templates + macros? |
18:00:55 | FromDiscord | <enthus1ast> the c code that is in your nimcache folder |
18:01:42 | FromDiscord | <Rika> GCC doesn’t understand Nim code in any form |
18:03:59 | FromDiscord | <enthus1ast> when you compile your nim app with --genScript the compiler will generate a script where you see how the c compiler is invoked |
18:04:34 | FromDiscord | <enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=4av2 |
18:11:20 | NimEventer | New post on r/nim by Ok_World__: Announcing qwatcher version 0.2.0, see https://reddit.com/r/nim/comments/xe8xds/announcing_qwatcher_version_020/ |
18:15:53 | * | kenran joined #nim |
18:16:08 | * | kenran quit (Client Quit) |
18:16:25 | * | kenran joined #nim |
18:36:08 | * | kenran quit (Quit: WeeChat info:version) |
18:43:48 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
18:50:03 | * | jjido joined #nim |
18:56:17 | * | xigoi joined #nim |
18:56:44 | xigoi | What's the difference between nim doc and nim doc2? |
19:07:22 | FromDiscord | <Varriount> @Araq Have you ever looked at Groovy's concept of `delegate` for its closures? It allows for some pretty interesting stuff to be done with regards to DSLs and the like: https://docs.groovy-lang.org/latest/html/documentation/#_delegate_of_a_closure |
19:25:53 | * | yolo quit (Quit: Client closed) |
19:58:27 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=4avo |
19:58:37 | FromDiscord | <dain> I can loop over a count->islice chain. but I can't convert it to a seq |
19:59:17 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=4avp |
19:59:38 | NimEventer | New thread by Wys: Nim for embedded sytems documentation is unclear, see https://forum.nim-lang.org/t/9466 |
20:20:01 | * | wallabra joined #nim |
20:21:31 | FromDiscord | <@thatrandomperson5-6310e3b26da03> How would i dump xml tag that I created indented |
20:23:08 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=4avw |
20:37:04 | FromDiscord | <dain> ??????????????? |
20:37:06 | FromDiscord | <dain> sent a code paste, see https://play.nim-lang.org/#ix=4avA |
20:38:10 | FromDiscord | <dain> hm it's a ufcs thing, works when i do normal function call syntax |
20:38:52 | FromDiscord | <dain> i'm starting to despair of ever understanding iteration in nim |
20:42:00 | * | jmdaemon joined #nim |
20:43:13 | * | LuxuryMode joined #nim |
20:52:05 | FromDiscord | <@thatrandomperson5-6310e3b26da03> How would i gzip a string in nim using the zip lib? |
20:58:31 | FromDiscord | <Elegantbeef> Possibly, you probably need to look into handleGenerics or w/e it's called↵(@Bung) |
21:01:19 | FromDiscord | <Bung> In reply to @Elegantbeef "Possibly, you probably need": I let it fallthrough to next call , see https://github.com/nim-lang/Nim/pull/20356/files |
21:06:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4avE |
21:10:53 | FromDiscord | <Bung> it handled somewhere, it produced `Error: object constructor needs an object type [genericBody declared in t19882.nim(5, 6)]` |
21:11:10 | FromDiscord | <Elegantbeef> Ok so it doesnt |
21:11:58 | FromDiscord | <Bung> yeah, need specific error message also |
21:16:02 | FromDiscord | <B L Â D É> In reply to @halc "oh yeah, I noticed": https://github.com/Yardanico/mimalloc_nim↵Hey just discovered this try it! |
21:16:58 | FromDiscord | <B L Â D É> Now u don't get a perf hit |
21:17:03 | FromDiscord | <B L Â D É> When turning on threads |
21:17:13 | FromDiscord | <halc> In reply to @B L Â D É "https://github.com/Yardanico/mimalloc_nim Hey just ": yeah I know, somebody linked it just bellow my message |
21:17:38 | FromDiscord | <B L Â D É> In reply to @halc "yeah I know, somebody": Oh ok i saw it and remembered u |
21:47:39 | FromDiscord | <! Nilts> In reply to @@thatrandomperson5-6310e3b26da03 "How would i gzip": does anyone know? |
21:54:55 | FromDiscord | <auxym> In reply to @not logged in "does anyone know?": there's some examples in the readme here: https://github.com/nim-lang/zip |
21:55:20 | FromDiscord | <! Nilts> In reply to @auxym "there's some examples in": ik, but i can't make any sense of them |
21:57:00 | FromDiscord | <auxym> https://github.com/nim-lang/zip/blob/master/zip/zlib.nim#L284 |
21:57:15 | FromDiscord | <auxym> looks like it simply takes a string input and outputs a string? |
21:57:22 | FromDiscord | <Bung> In reply to @Elegantbeef "Ok so it doesnt": I've done it https://github.com/nim-lang/Nim/pull/20358 |
22:15:17 | FromDiscord | <! Nilts> In reply to @auxym "looks like it simply": I get that but i don't get the whole stream thing |
22:16:23 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4avT |
22:16:33 | FromDiscord | <auxym> if you want a gzip file, just use GZIP_STREAM |
22:17:59 | FromDiscord | <Elegantbeef> Cant zippy do this? |
22:18:23 | FromDiscord | <! Nilts> In reply to @Elegantbeef "Cant zippy do this?": idk |
22:18:59 | FromDiscord | <auxym> iirc zippy only deals with zip (pkzip) files and not gzip but I might be wrong |
22:19:16 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1019734100128563220/image.png |
22:19:20 | FromDiscord | <Elegantbeef> I dont know |
22:20:06 | FromDiscord | <auxym> yeah I was wrong zippy does have gzip |
22:37:15 | * | yolo joined #nim |
22:40:26 | * | monkeybusiness joined #nim |
22:58:13 | * | dtomato quit (Quit: The Lounge - https://thelounge.chat) |
23:01:00 | FromDiscord | <! Nilts> How would i decode html in nim. |
23:01:12 | FromDiscord | <! Nilts> (edit) "html" => "html/js" |
23:02:17 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4avY |
23:02:24 | * | dtomato joined #nim |
23:08:52 | FromDiscord | <! Nilts> nvm i realized that won't work |
23:09:05 | FromDiscord | <! Nilts> I need to not get the sketchy js in the first place |
23:09:11 | FromDiscord | <! Nilts> btw im using httpclient |
23:33:29 | * | jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
23:42:08 | FromDiscord | <Girvo> That reminds me, I need to enable mimalloc for the server-side of this project lol. Its heavily threaded |
23:48:04 | FromDiscord | <Girvo> I do need to work out how we should handle different ESP-IDF versions internally. How do other libraries handle binding to seperate versions of some C library? Just a large set of `when defined(LIBRARY_V4_4)` stuff? Is there a nicer way? I guess I could use `intdefine` or `stringdefine` pragma and parse it somehow? Ideally I'd like to check "when the version is greater than v4.3, define the types/procs as this instead" |
23:49:03 | FromDiscord | <Elegantbeef> Yea you basically gave all the options |
23:49:29 | FromDiscord | <Elegantbeef> Seperate modules you import/export dependant on the flags |
23:50:46 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4aw2 |
23:51:37 | FromDiscord | <Girvo> Yeah that might be the way to go for some of the modules as they have pretty different types/binings |
23:51:41 | FromDiscord | <Girvo> bindings even |
23:53:53 | FromDiscord | <Girvo> As an aside, can a nimble `requires` expression take a particular URL? Or just a version. It'd be nice to tell nimble to stop trying to download the wrong version of nesper lol |
23:54:04 | FromDiscord | <Girvo> As my project needs my fork at the moment |
23:54:42 | FromDiscord | <Elegantbeef> you can use a giturl |
23:55:02 | FromDiscord | <Elegantbeef> Nimble works with giturls and hg urls(not that anyone even uses hg) 😄 |
23:55:10 | FromDiscord | <Girvo> Oh sweet 😄 |
23:55:20 | FromDiscord | <Girvo> giturl for the version part or the package name? |
23:55:37 | FromDiscord | <Elegantbeef> The entire thing |
23:55:59 | FromDiscord | <Girvo> Sweet |
23:56:27 | FromDiscord | <Girvo> Does it accept the same `@#devel` branch bit that `nimble install` does? |
23:56:35 | FromDiscord | <Elegantbeef> `requires "yourGitUrlHere#yourGitHashIfwantedHereOtherwiseIts#Head"` |
23:56:41 | FromDiscord | <Girvo> perfect |
23:56:43 | FromDiscord | <Girvo> cheers! |
23:56:59 | FromDiscord | <Girvo> `requires "https://github.com/VenturiTechnology/nesper.git@#devel"` |