<< 14-09-2022 >>

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