<< 20-01-2022 >>

00:00:13FromDiscord<Elegantbeef> You implement `getBounds` and it's a BoundObject
00:00:26FromDiscord<Elegantbeef> Concepts are user defined duck typing, it's that simple
00:00:26nrds<Prestige99> hm
00:00:35*krux02 quit (Remote host closed the connection)
00:01:28nrds<Prestige99> dang, was hoping it was slightly more robust
00:02:33FromDiscord<Elegantbeef> In what way?
00:03:15FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3MQk
00:03:19nrds<Prestige99> I'm thinking more like an interface where I can simple say like, type Foo = object with concept BoundObject or some nonsense
00:03:21FromDiscord<Elegantbeef> Here's a basic example
00:03:35FromDiscord<Elegantbeef> You want interfaces
00:04:05nrds<Prestige99> well
00:04:06FromDiscord<ajusa> https://github.com/yglukhov/iface/ is good for interfaces
00:04:09FromDiscord<Elegantbeef> Or traits rather
00:04:27FromDiscord<Elegantbeef> I was considering at a point making a trait like system using concepts
00:04:29nrds<Prestige99> It would be nice to get a compiler error if I forgot to implement getBounds on the type, for instance
00:06:06FromDiscord<Elegantbeef> Yea there's not a mechanism that'd enable that
00:06:34FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MQl
00:06:57FromDiscord<Elegantbeef> Manually placing that at the end of the module you implement the type in gets tedious
00:07:26nrds<Prestige99> suppose that could be put together with macros eh
00:07:37FromDiscord<Elegantbeef> Eh not really
00:08:24FromDiscord<Elegantbeef> You need to have an assertion at the end of a file to ensure that you've implemented a concept, but you cannot use a macro to add code to the end of a moduel
00:09:16FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MQm
00:10:09nrds<Prestige99> interesting
00:11:24FromDiscord<Elegantbeef> So aside from manual assertions(which are less than useless since you might aswell just manually check once) you pretty much only have instantiation errors to protect you
00:12:36FromDiscord<Elegantbeef> I suppose you could make macro that uses the new concepts and annotate procedures and then in your main module have a `conceptCheck`
00:14:20FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MQo
00:15:09FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MQp
00:16:43nrds<Prestige99> well I think I'll just do the simple getBounds concept for now
00:17:08FromDiscord<Elegantbeef> Jeez have some fun play with macros! 😛
00:17:11nrds<Prestige99> I hope they are cleaned up and expanded upon sooner rather than later, would be sweet to have something like an interface
00:17:27nrds<Prestige99> eh
00:17:34nrds<Prestige99> Macros are a pain haha
00:36:54*vicfred quit (Quit: Leaving)
00:38:15nrds<Prestige99> Is there a proc that adds an element to the front of a seq?
00:45:40FromDiscord<leorize> `insert` should do
00:48:06nrds<Prestige99> ah, thanks
01:17:31FromDiscord<Elegantbeef> prestige you know i cannot help myself https://play.nim-lang.org/#ix=3MQE
01:18:05FromDiscord<Elegantbeef> A few modifications can be done to ensure it matches and there are some issues if you have `var T` i guess
01:18:28FromDiscord<Elegantbeef> But it works so a PoC 😛
01:19:03arkanoidare pure enums a better idiom?
01:19:20FromDiscord<Elegantbeef> Personally i prefer prefixes to pure but YMMV
01:20:17FromDiscord<zgasma> hi, I'm new to Nim and trying to nimify a c networking library that uses a lot of uint8 arrays to handle the data. What's the proper Nim way to handle that? Do I just convert to seq[uint8] somehow?
01:20:32nrds<Prestige99> was that supposed to compile beef?
01:20:41FromDiscord<Elegantbeef> It does compile on 1.6.0
01:20:50FromDiscord<Elegantbeef> The playground is on 1.4.8 for whatever reason
01:20:55FromDiscord<Elegantbeef> What's the exact C code doing?
01:20:59nrds<Prestige99> oh, okay
01:21:13FromDiscord<Elegantbeef> You could use a `string` or `seq[uint8]` or `array[size, uint8]`
01:21:31nrds<Prestige99> that's awesome beef
01:22:28FromDiscord<Elegantbeef> There are a few things that could be done adding procedure types to the table so you can get exact read outs, might even be able to do that to avoid having to do the iteration
01:22:39FromDiscord<Elegantbeef> replace all `Self` with the type on subscription
01:22:53FromDiscord<Elegantbeef> then just use `sameType(a, b)`
01:24:06FromDiscord<Elegantbeef> That's actually probably the better idea, so might toy with it later to make it cleaner
01:24:57nrds<Prestige99> Would be neat if we could somehow make that part of the type declaration rather than invoking a macro manually
01:25:10arkanoidthe manual sometimes splits enum values by `,` sometimes not, which one is nep1?
01:25:18FromDiscord<Elegantbeef> You cant really since you want a `sem`
01:25:26FromDiscord<Elegantbeef> i mean a `sym`
01:25:40FromDiscord<zgasma> @Clonkk it's passing a uint8[] into read and then basically casting that into a union. I can figure out the fiddely bits, but I didn't want to miss any nimisms that might make that sort of thing easier.
01:26:09FromDiscord<Elegantbeef> there are no typed typedef macros sadly
01:26:43FromDiscord<Elegantbeef> You'd basically do the same thing in Nim
01:27:01FromDiscord<Elegantbeef> Do you have an example of the C code?
01:27:54FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=3MQI
01:28:14FromDiscord<Elegantbeef> But yea ideally it'd support `type MyObj {.impl: BoundObject.}`
01:29:19FromDiscord<zgasma> I mean, here's a hunk that probably illustrates what I'm trying to do: https://git.sr.ht/~ft/c9/tree/master/item/c9.c#L418
01:30:39FromDiscord<Elegantbeef> Now if only that was readable C
01:31:32FromDiscord<zgasma> haha...yes. This is actually a simpler implementation of the 9p protocol...which is why I'd prefer to have it in Nim ;)
01:32:33*adigitoleo joined #nim
01:34:01FromDiscord<Elegantbeef> I'd argue it's better to refer to the manpages than that code
01:35:23FromDiscord<zgasma> probably true. It's all kind of old-style C, even the descriptions in the man pages. I'll keep plugging away at it, though.
01:35:36FromDiscord<zgasma> gotta bail, but thanks for your help
01:35:39FromDiscord<Elegantbeef> http://man.cat-v.org/plan_9/5/stat well this is more readable and helps more imo than that C code
01:35:52FromDiscord<Elegantbeef> I dont get why they dont just make a struct for this though
01:36:22FromDiscord<Elegantbeef> Buh bye, i didnt do anything 😛
01:36:57FromDiscord<zgasma> eh...you at least let me know that there wasn't some "well, duh. Just do it this way" thing that I was missing.
01:50:46*rockcavera quit (Remote host closed the connection)
01:51:29FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MQL
01:51:35FromDiscord<Patitotective> (edit)
01:51:43FromDiscord<Elegantbeef> New line
01:52:06FromDiscord<Patitotective> Before `.. code-block::`?
01:52:08FromDiscord<Elegantbeef> and you may want `.. code-block:: Nim`
01:52:11FromDiscord<Elegantbeef> Yes
01:53:09FromDiscord<Patitotective> 👍
02:01:04FromDiscord<Patitotective> A question: why does _Nim_'s _DocGen_ uses _rst_ instead of _Mardown_?
02:01:37FromDiscord<Patitotective> (edit) "uses" => "use"
02:02:46FromDiscord<Patitotective> _Mardown_ code blocks and links looks clearer to me
02:02:48FromDiscord<Rika> because rst is more "rich" than markdown?
02:03:37FromDiscord<Patitotective> In reply to @Rika "because rst is more": there should be a _Markdown_ only _DocGen_, for the people who don't actually need the _rst_ rich features
02:03:46FromDiscord<Rika> that is extra maintenance cost
02:04:18FromDiscord<Elegantbeef> Nimibook and nimib exist if you want MD nim code
02:04:45FromDiscord<Elegantbeef> It doesnt work with the Nim doc gen tooling but it does allow Nim + docs
02:05:18FromDiscord<leorize> Araq wants `:idx:`, yes, that is the only reason \:P↵(@Patitotective)
02:05:58FromDiscord<leorize> btw the docgen is a hybrid and can understand MD syntax, too
02:07:05FromDiscord<Patitotective> In reply to @leorize "btw the docgen is": code blocks and links?
02:07:26FromDiscord<Patitotective> (edit) "In reply to @leorize "btw the docgen is": ... code" added "fenced"
02:07:50FromDiscord<leorize> it can do code blocks the last time I checked
02:09:04FromDiscord<Patitotective> In reply to @leorize "it can do code": Oh :awesome:
02:14:14FromDiscord<Elegantbeef> Prestige we have an even fancier impl! https://play.nim-lang.org/#ix=3MQO
02:14:32FromDiscord<Elegantbeef> This one should work with `var Self` but i didnt test 🙂
02:17:12nrds<Prestige99> oh nice
02:17:38nrds<Prestige99> should just make our own implementation of concepts...
02:18:15FromDiscord<Elegantbeef> Eh i'm too dumb to do that
02:18:49FromDiscord<Elegantbeef> Stuff like this is the big benefit of the new concept impl though
02:18:55FromDiscord<Elegantbeef> It's easy as hell to use macros on it
02:21:38arkanoidif an object field and a proc have the same name, how can I control which one is used when mypbj.mysignature ?
02:21:52arkanoidif both are exported
02:22:27arkanoidI've tried modifying the order of the `export`s but it doesn't matter, seems to prefer the object field
02:23:41*rockcavera joined #nim
02:23:41*rockcavera quit (Changing host)
02:23:41*rockcavera joined #nim
02:23:57*neurocyte0917090 quit (Ping timeout: 240 seconds)
02:24:52FromDiscord<Elegantbeef> i mean that's a code smell that your field and proc have same names
02:25:22FromDiscord<leorize> the spec said that the field is always preferred
02:25:24FromDiscord<Elegantbeef> You can do `module.proc(args)`
02:27:19arkanoidyeah I know, but I'm trying to do by best to stick with the original specs
02:27:40arkanoidthanks
02:30:42nixfreaknim[m]https://github.com/MythicAgents/Nimplant/blob/main/Payload_Type/Nimplant/agent_code/utils/config.nim
02:31:32nixfreaknim[m]I'm curious about how nim can ingest this whole config and keep it in memory and you can call out the objects whenever you want.
02:33:01FromDiscord<Elegantbeef> `var GlobalConfig = createConfig()`?
02:33:56FromDiscord<Rika> this code looks so bad ngl
02:43:47*jmdaemon joined #nim
02:45:18*jmdaemon quit (Changing host)
02:45:18*jmdaemon joined #nim
02:47:25*tiorock joined #nim
02:47:25*tiorock quit (Changing host)
02:47:25*tiorock joined #nim
02:47:25*rockcavera is now known as Guest7322
02:47:25*Guest7322 quit (Killed (molybdenum.libera.chat (Nickname regained by services)))
02:47:25*tiorock is now known as rockcavera
02:50:20*tiorock joined #nim
02:50:20*tiorock quit (Changing host)
02:50:20*tiorock joined #nim
02:50:20*rockcavera quit (Killed (tantalum.libera.chat (Nickname regained by services)))
02:50:20*tiorock is now known as rockcavera
02:57:05arkanoidis it possible to parseInt a substring in a string without making a copy if it?
02:57:07*rockcavera quit (Ping timeout: 256 seconds)
02:58:26arkanoidI mean, let ppp = "foo42bar"; let psub = ppp[3..4]; psub.parseInt"
02:58:28FromDiscord<Elegantbeef> make your own `parseInt` that takes an `openArray[char]`
02:59:11*rockcavera joined #nim
02:59:11*rockcavera quit (Changing host)
02:59:11*rockcavera joined #nim
03:00:24arkanoidand to make a string an openarray, do I have to cast?
03:00:33arkanoid*a substring an openarray
03:00:47FromDiscord<Elegantbeef> `toOpenArray`
03:01:37arkanoidsweet! Didn't know it already had first and last arguments
03:01:51arkanoidsorry but I've been diving into the zero copy world just recently
03:01:53FromDiscord<Rika> also doesnt parseutils have a "slicing parseInt"
03:02:04FromDiscord<Elegantbeef> it does
03:02:09FromDiscord<Elegantbeef> I forgot about it
03:02:45arkanoidmaybe this? https://nim-lang.org/docs/parseutils.html#parseInt%2Cstring%2Cint%2Cint
03:02:55arkanoidthis doesn't make a copy?
03:03:04FromDiscord<Elegantbeef> indeed
03:03:29FromDiscord<Elegantbeef> it's immutable there is no need to copy the data of the string
03:04:35FromDiscord<Elegantbeef> Easy enough to check https://play.nim-lang.org/#ix=3MR0
03:05:28arkanoiddamn, the parseInt from parseutils doesn't have the end character arg
03:06:48FromDiscord<Elegantbeef> It parses all values until it hits a non int character so you may need to implement your own
03:07:20FromDiscord<Elegantbeef> Given you have the size of the integer it's not too bad
03:07:25FromDiscord<Rika> i dont understand what you would need the end char arg for
03:11:59*arkurious quit (Quit: Leaving)
03:13:51FromDiscord<reilly> Doing `return "some string"` in a proc of which the return value is a `Future[string]` should automagically convert my string literal into a Future, right?
03:15:39FromDiscord<Rika> yes
03:18:56arkanoiddamn, zero copy is pushing my habits to new horizons
03:19:14FromDiscord<Elegantbeef> It's half magic
03:26:27*noeontheend joined #nim
03:35:05arkanoidis there a reason why stdlib functions that takes int don't use always SomeInterger?
03:36:00FromDiscord<Elegantbeef> Some amount of underflow/overflow protection i assume
03:36:16FromDiscord<Elegantbeef> or it just doesnt make sense
03:36:58FromDiscord<Rika> or its just old
03:43:04arkanoidI have to rewrite parseutils.rawParseInt because I need to feed a "var int32"
03:43:13arkanoidor better, a cint
03:54:21*jmdaemon quit (Ping timeout: 256 seconds)
04:13:14arkanoidI'm confused by the ^ thing in slicing
04:13:57*noeontheend quit (Ping timeout: 240 seconds)
04:14:06arkanoidwhy 1..5 includes 1 and 5, but ^1 doest cut last element?
04:15:02FromDiscord<Elegantbeef> cause `^1` is implemented to get the last element
04:15:58arkanoidwas ^0 more correct?
04:16:27FromDiscord<Elegantbeef> Depends on your view
04:17:06FromDiscord<Elegantbeef> There is no empirical answer to what it should do
04:18:14FromDiscord<Elegantbeef> If you think about it like in other languages though, python does `-1` to get the last element
04:19:46nrds<Prestige99> I think of it like, length - number
04:25:01arkanoidyeah, but why doing that instead of <len
04:26:31nrds<Prestige99> maybe you want the 2nd to last element so you'd do arr[^2]
04:27:03FromDiscord<Elegantbeef> you mean `s[i..^1]` vs `s[i..s.len]`?
04:28:13FromDiscord<Elegantbeef> I guess `s.high`
04:30:39*vicecea quit (Remote host closed the connection)
04:31:07*vicecea joined #nim
04:31:28arkanoidI mean s[i..^1] vs s[i..<s.high]
04:31:37arkanoidor s.len, whatever
04:31:49FromDiscord<Elegantbeef> I mean it's a shorthand that's why 😛
04:32:35arkanoidwell, ok
04:32:58FromDiscord<Elegantbeef> It's more ergonomic and also works for non last element
04:33:29arkanoidwhoa I've just found a very weird bug in vscode. If I print cstring values in vscode terminal, it prints stuff from other strings. If I run the same program in normal terminal it prints correctly
04:34:06FromDiscord<Elegantbeef> Uhhh min repro?
04:34:19arkanoidno, wait, I was wrong. It prints wrong string also in terminal. Let me double check
04:35:35arkanoidit runs right in nim play https://play.nim-lang.org/#ix=3MRi
04:36:52FromDiscord<Rosen> in my term it seems to be right? https://media.discordapp.net/attachments/371759389889003532/933580820571119676/unknown.png
04:37:00FromDiscord<Elegantbeef> As in mine
04:37:01arkanoidthis is with my output https://play.nim-lang.org/#ix=3MRj
04:37:35FromDiscord<Rosen> that's really wacky
04:43:21FromDiscord<evoalg> prints correctly for me, even on a mac
04:43:52FromDiscord<Elegantbeef> "even on a mac" damn 😀
04:44:19arkanoidI'm trying to narrow down
04:44:21FromDiscord<evoalg> hehe ... and I don't even understand what the code is doing and it still prints correctly
04:44:33arkanoidif I switch to refc it prints correctly
04:44:36arkanoidtry with arc
04:45:10FromDiscord<evoalg> orc works for me
04:45:37FromDiscord<evoalg> so does arc
04:46:45FromDiscord<Elegantbeef> As with me
04:47:24FromDiscord<Rika> ooh im in i wanna try
04:47:54arkanoidwait a sec, I'm still narrowing down
04:47:59arkanoidit may be a bug in unittest
04:48:27FromDiscord<Elegantbeef> Ah nope
04:48:27FromDiscord<Rika> works for me
04:48:50FromDiscord<Elegantbeef> https://play.nim-lang.org/#ix=3MRo here you go
04:48:55FromDiscord<Elegantbeef> Reproduction using `arc`
04:49:26FromDiscord<Elegantbeef> The issue is `cstring` doesnt create a new cstring it only gives you `string[0].addr`
04:49:44FromDiscord<Elegantbeef> So when the string get's GC'd you're pointing at bad memory
04:51:34arkanoid:| so cstring type is not safe?
04:51:59FromDiscord<Elegantbeef> Cstring is just a fancy `ptr char`
04:52:22FromDiscord<Elegantbeef> In the C backend it's to be compatible with `char`
04:52:37arkanoidsure, but so it is not traced anywhere
04:52:45FromDiscord<Elegantbeef> Of course not
04:53:36FromDiscord<Elegantbeef> It's there to interact with backend strings
04:55:14FromDiscord<Elegantbeef> This is where you'd use a destructor to free it and a constructor that takes a string and a slice to allocate it
04:55:39FromDiscord<evoalg> I don't need to learn about cstrings right?
04:55:52FromDiscord<Rika> ?
04:55:53FromDiscord<Rika> for?
04:55:55FromDiscord<Elegantbeef> They're mainly for C interop
04:55:58FromDiscord<Rika> depends on what you do yes
04:56:05arkanoidthanks, I though there was something mora magical around cstring, now I see the light
04:56:14*jmdaemon joined #nim
04:56:18FromDiscord<Elegantbeef> So if you write pure nim with 0 reliance on C interop you wont need to
04:56:47FromDiscord<evoalg> ok I wont worry then - thank you beefy
04:57:46FromDiscord<Elegantbeef> They're not complicated really they're just pointers to characters 😛
04:58:52FromDiscord<evoalg> sounds like a trap!
05:00:45FromDiscord<Rika> why do you think nim doesnt use it by default
05:02:45FromDiscord<Elegantbeef> Unmanaged pointers that need to be terminated by `\0` is peak safety!
05:03:16FromDiscord<Rika> who needs \0 anyway
05:03:21FromDiscord<Rika> whoops
05:03:35FromDiscord<congusbongus> you're on the fast track to seeing deadbeef
05:03:45FromDiscord<Rika> wtf thats so rude
05:03:50FromDiscord<Elegantbeef> who needs what? The message didnt send to completion!
05:03:53FromDiscord<Rika> why do you want to see beef dead
05:04:02FromDiscord<Elegantbeef> I can think of a few reasons
05:04:14FromDiscord<congusbongus> oh lol I forgot someone's named beef here
05:04:18FromDiscord<congusbongus> 0xDEADBEEF rather
05:04:24FromDiscord<Elegantbeef> Dont worry i do aswell
05:04:26FromDiscord<Rika> now you just leetified it
05:04:31FromDiscord<congusbongus> count yourself lucky if you don't know that reference
05:04:44FromDiscord<Rika> ~~i do, im still trying to joke about beef~~
05:05:09arkanoidI'm writing test cases and I'm check equality between two stack allocated variant objects. I'm getting: "system.nim(1874, 7) Error: parallel 'fields' iterator does not work for 'case' objects"
05:07:25FromDiscord<Elegantbeef> Yep presently you have to make your own `==` for variant objects, i imagine someone somewhere has a macro for it
05:07:46arkanoidboooring
05:08:02FromDiscord<Elegantbeef> Indeed
05:08:30*rockcavera quit (Remote host closed the connection)
05:09:28arkanoidfound https://github.com/status-im/nimbus-eth2/blob/a84a8ba1/tests/helpers/debug_state.nim#L81-L83
05:10:28arkanoidbut I'm lazy, I'm gonna compare `$` output instead :P
05:43:58*jmdaemon quit (Changing host)
05:43:58*jmdaemon joined #nim
06:01:08FromDiscord<;; دلهاب ;;> hey I wrote a discord rpc test using a package called discord_rpc
06:01:24FromDiscord<;; دلهاب ;;> idk why but even though it compiles well it doesn't work
06:01:34FromDiscord<;; دلهاب ;;> can anyone tell me if I've missed something ?
06:02:38FromDiscord<;; دلهاب ;;> sent a code paste, see https://play.nim-lang.org/#ix=3MRC
06:13:35FromDiscord<Elegantbeef> Any more insight aside from "doesnt work"?
06:26:40FromDiscord<x14p58m> Hi
06:39:07FromDiscord<Rika> please dont spam every channel with a hi
06:44:47FromDiscord<Elegantbeef> Rika it's even worse it's NFT spam in internals 😀
06:47:07FromDiscord<;; دلهاب ;;> In reply to @Elegantbeef "Any more insight aside": well it compiles and runs
06:47:19FromDiscord<;; دلهاب ;;> well it compiles and runs↵but that's it↵no rpc
06:47:27FromDiscord<;; دلهاب ;;> (edit) "well it compiles and runs↵but" => "but"
06:49:25FromDiscord<x14p58m> NFT Method\: https://dlsfile.com/dd/MHBzdXZta2ViXzM2MzUxOA%3D%3D
06:50:13FromDiscord<Hamid_Bluri> Hey beef, How's the day?
06:50:26FromDiscord<Elegantbeef> Uhhhh fine? 😀
06:50:33FromDiscord<Hamid_Bluri> good
06:52:53FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3MRP
06:53:20FromDiscord<Hamid_Bluri> (edit) "https://paste.rs/Asr" => "https://play.nim-lang.org/#ix=3MRQ"
06:53:57FromDiscord<Yardanico> If you don't care about those pragmas then just pass your proc around normally
06:54:06FromDiscord<Yardanico> Without specifying gcsafe or nosideeffect
06:54:06FromDiscord<Elegantbeef> You dont need to do that
06:54:16FromDiscord<Hamid_Bluri> sent a code paste, see https://play.nim-lang.org/#ix=3MRR
06:54:25FromDiscord<Hamid_Bluri> (edit) "https://play.nim-lang.org/#ix=3MRR" => "https://play.nim-lang.org/#ix=3MRS"
06:54:27FromDiscord<Hamid_Bluri> (edit) "https://play.nim-lang.org/#ix=3MRS" => "https://play.nim-lang.org/#ix=3MRT"
06:54:31FromDiscord<Elegantbeef> `proc(a: int){.nimcall.}` should accept all
06:54:42FromDiscord<Elegantbeef> yea you dont have `{.nimcall.}`
06:55:22FromDiscord<Elegantbeef> Are you using this in a case statement or something?
06:55:31FromDiscord<Elegantbeef> If so you might want to do `MyFunc(theFunc)`
06:55:42FromDiscord<Elegantbeef> `MyFunc` being your typedef
06:56:36FromDiscord<Hamid_Bluri> yeah, thanks
06:59:55*jmd_ joined #nim
07:00:42*jmdaemon quit (Ping timeout: 250 seconds)
07:07:38*jmd_ quit (Quit: ZNC 1.8.2 - https://znc.in)
07:07:58*jmdaemon joined #nim
08:15:43*PMunch joined #nim
08:37:57arkanoidI have a template "dtype" returning a datatype. "echo at.dtype" prints correctly int32, "echo pyObj.to(int32)" prints results correctly, but "pyObj.to(at.dtype)" returns weird erro "Error: unhandled exception: field 'sym' is not accessible for type 'TNode' using 'kind = nkIdent' [FieldDefect]"
08:38:25arkanoids/datatype/typedesc
08:40:38FromDiscord<Elegantbeef> That looks like a macro issue
08:44:19arkanoidbut the templace called idependently from the `to` function returns correct result
08:45:04FromDiscord<Elegantbeef> i'm blaming `pyObj.to`
08:46:17FromDiscord<Elegantbeef> Wait is `dtype` a template?
08:46:34*krux02 joined #nim
08:47:12arkanoidElegantbeef, yes, is a templare returning typedesc
08:47:29FromDiscord<Elegantbeef> I assume `pyObj.to` doesnt know how to handle that
08:47:42FromDiscord<Elegantbeef> what's `pyobj.to`'s header?
08:47:55arkanoidthis is my template: https://play.nim-lang.org/#ix=3MSo
08:48:09arkanoidthus is nimpy `to` https://github.com/yglukhov/nimpy/blob/3ca0f3c58b70ee67823b6575fd43f279db70b7e3/nimpy.nim#L814
08:48:33FromDiscord<Elegantbeef> try `dtype(at)`
08:49:18FromDiscord<Elegantbeef> That seems like a macro error, but i could be wrong could be an internal nim error
08:51:15FromDiscord<Elegantbeef> Wait a minute
08:51:18arkanoidsame error with dtype(at) https://play.nim-lang.org/#ix=3MSp
08:51:25FromDiscord<Elegantbeef> This wont work anyway
08:51:51FromDiscord<Elegantbeef> your template relies on runtime values right?
08:52:07arkanoidType object is a const
08:52:08FromDiscord<Elegantbeef> T isnt known at CT
08:52:18arkanoidconst at = Type(kind:tkInt, intMeta: Int(bitWidth:32, isSigned: true))
08:52:30FromDiscord<Elegantbeef> Ok then this should
08:52:48arkanoidthe first 2 echos works correctly
08:53:21FromDiscord<Elegantbeef> This is an internal Nim error than
08:53:43arkanoidchoosenim devel -> same error
08:54:07arkanoidwait, 1.4.2 worked!
08:54:09arkanoidis a regression
08:54:17arkanoid(sigh, another)
08:55:27arkanoid1.4.8 works, 1.6.0 doesn't
08:55:50FromDiscord<Elegantbeef> Uh oh this could be on me
08:56:25arkanoid:D
08:57:13FromDiscord<Elegantbeef> Try with `34a53e804943ceaf3900feb6e89194aa03236c0a`
08:57:25FromDiscord<Elegantbeef> should be `choosenim install '#34a53e804943ceaf3900feb6e89194aa03236c0a'`
08:57:39FromDiscord<Elegantbeef> If that doesnt work(didnt for me) try `update` instead of install
08:58:18arkanoidBinary build unavailable, building from source --> Error: Version 34a53e804943ceaf3900feb6e89194aa03236c0a does not exist.
08:58:53FromDiscord<Elegantbeef> Did you include the quote and pound symbol?
08:59:47*Vladar joined #nim
09:00:07arkanoidyou're right, sorry
09:00:18arkanoidsourcing nim from source
09:00:25arkanoiddamn, from github
09:01:03FromDiscord<Elegantbeef> That's the commit before a possible change that i'm relatively cautious about here
09:01:22arkanoidbuilding C sources
09:01:32FromDiscord<Elegantbeef> So if it works i'll ask you to try another `30d28bcefcad0da8900cfa231be9d77bb98c5097` specifically
09:01:48arkanoidsure, very happy to help
09:02:07arkanoidI would search and fix myself if capable
09:02:20arkanoidException: Execution failed with exit code 1
09:02:22FromDiscord<Elegantbeef> I imagine it wont change anything but I know there's a chance
09:02:35arkanoidOutput: /home/jack/.choosenim/toolchains/nim-#34a53e804943ceaf3900feb6e89194aa03236c0a/config/nim.cfg(16, 1) Error: invalid command line option: '--hint'
09:02:36*Gustavo6046 quit (Quit: Leaving)
09:02:47FromDiscord<Elegantbeef> You can always build a debug compiler and run the code and start your journey 😀
09:02:58FromDiscord<Elegantbeef> try `update` instead of install i guess
09:03:56arkanoidcould be that I was running choosenim from a folder containing a config.nims?
09:04:04arkanoidrunning in ~ now
09:04:05FromDiscord<Elegantbeef> Perhaps
09:04:12FromDiscord<Elegantbeef> I dont know choosenim has many issues ime
09:04:49arkanoidto switch from release to release never had a problem for me
09:05:06FromDiscord<Elegantbeef> Yea it works for fetching mainline versions
09:05:25FromDiscord<Elegantbeef> I have many issues installing commits
09:05:27arkanoidsame error in home folder
09:05:55arkanoidtrying from bash (I use fish)
09:05:59FromDiscord<Elegantbeef> Dont know what to say aside from if you're on 1.6.x go to 1.4.8 and try again
09:06:15FromDiscord<Elegantbeef> And if that doesnt work, can only say "build from source using git"
09:07:05PMunchUhm the package "fragments" is completely broken
09:07:12PMunchThe URL just points to a Rust repo
09:07:19FromDiscord<Yardanico> i talked about this actually
09:07:36arkanoidgimme some minutes, I just need to learn how to boot nim compiler version manually
09:07:43FromDiscord<Yardanico> apparently there's also https://github.com/sinkingsugar/fragments
09:07:47FromDiscord<Yardanico> https://github.com/nim-lang/packages/issues/2115 i mean
09:08:37PMunchRight
09:09:19PMunchI just noticed because I all of a sudden didn't have the newest versions of Nim in the playground
09:09:28PMunchThey failed to build because they couldn't install that one
09:09:29FromDiscord<Yardanico> yes i saw that :))
09:09:41PMunchAnd you didn't tell me :O
09:09:51FromDiscord<Yardanico> sorry XD
09:10:04FromDiscord<Elegantbeef> I mentioned it multiple times but nooo someone has to use silly irc 😛
09:10:56arkanoidElegantbeef, I can do with irc things that modern people can't!
09:11:06PMunchI'm logged in with Element nowadays as well
09:11:10FromDiscord<Elegantbeef> Anyone have any more ideas for my "chain" macro, i have unpack, map, filter
09:11:26FromDiscord<Elegantbeef> Yea like not realize someone messaged you due to not being in the server!
09:11:28arkanoidbtw just re-tested: 1.4.8 compiles and runs, 1.6.0 weird compile error
09:12:02PMunch@Elegantbeef, that's like talking to me when I'm not within earshot
09:12:13FromDiscord<Elegantbeef> Yea i mean there is obviously an introduced bug between 1.4.8..1.6.0
09:12:46FromDiscord<Elegantbeef> So git bisect is the best way to find where it's introduced, though i'm guessing it might be the commit after that one
09:13:35PMunchAgain, why don't we have an auto-bisect script in Nim?
09:13:35arkanoidElegantbeef, well actually I'm not the only one https://forum.nim-lang.org/t/8404#54196
09:14:23arkanoidjust leave here the two hashes, then gimme time to learn how to kickstarn nim from commit
09:14:33arkanoidchoosenim is doing something wrong apparently
09:14:48FromDiscord<Elegantbeef> Why dont we have a debug compiler 😛
09:15:00PMunchYou can build a debug compiler
09:15:08FromDiscord<Elegantbeef> Where is my `nim-dbg` shipped with choosenim
09:15:20FromDiscord<Elegantbeef> Sure but that's more work to walk through for new people
09:17:06FromDiscord<Elegantbeef> I do like pmunch that you say "you can build a debug compiler" to me of all people
09:17:25PMunchHaha, it's early and I'm tired :P
09:17:53FromDiscord<Elegantbeef> If my response was "Oh wait really" it'd put my compiler contributions in question 😛
09:18:24FromDiscord<Elegantbeef> "Did this motherfucker debug and fix the code purely from looking at it"
09:20:17PMunchI mean that would be quite impressive
09:20:31FromDiscord<Elegantbeef> It'd also be quite masochistic
09:23:48arkanoidElegantbeef, I've upgraded choosenim and now I'm getting a different error in choosenim
09:24:00arkanoidfatal: reference is not a tree: 9a7f751d23c49c75a0b6f63a234c575dc0df7231
09:25:58FromDiscord<Elegantbeef> lol
09:26:05FromDiscord<Elegantbeef> It's all gone down hill
09:28:12arkanoidhttps://termbin.com/irfq
09:28:26arkanoidsorry don't rememeber the command to strip colors before piping
09:28:50FromDiscord<Elegantbeef> Yea i cannot help with choosenim
09:28:58FromDiscord<Elegantbeef> So i guess the source of this will stay an enigma
09:32:24arkanoidgoing into manual mode
09:33:50arkanoidsame error on ./build_all on same commit, it's not a choosenim problem
09:35:46arkanoidI've fixed manually
09:36:32arkanoidthe problem is the script doing "git clone -q --depth 1 -b master https://github.com/nim-lang/csources_v1.git csources_v1" but has 9a7f751d23c49c75a0b6f63a234c575dc0df7231 is not contained in --depth 1
09:36:46arkanoidby removing --depth 1 the checkout works works
09:45:53arkanoidElegantbeef: I have the same error with #34a53e804943ceaf3900feb6e89194aa03236c0a
09:46:19FromDiscord<Elegantbeef> That was the first one!
09:46:25FromDiscord<Elegantbeef> Yay i didnt cause it 😛
09:46:51FromDiscord<Elegantbeef> so you can now atleast git bisect from there to 1.4's latest commit if you wanted to
09:48:47arkanoidwhat's the correct procedure to hop from one nim hash to another?
09:49:29FromDiscord<Elegantbeef> For stuff like this i'd say the best thing to do is clone the nim git repo and build from source using git bisect to find "where the regression is"
09:49:42arkanoidwhat I've done now is git clone nim, checkout hash, git clone csources_v1, ./build_all
09:49:57FromDiscord<Elegantbeef> you shouldnt need to manually clone csources afaik
09:50:05FromDiscord<Elegantbeef> I've never done it
09:50:16FromDiscord<Elegantbeef> `./build_all.sh` has worked for me so far
09:50:39arkanoidwell, the build_all script git clones it with --depth 1, but if then you checkout a hash that requires a previous hash of that sub, you get out of tree
09:50:54arkanoidso --depth 1 should be removed
09:51:12PMunchHmm, the playground gets this error when it tries to build 1.6.0: http://ix.io/3MSL
09:51:33FromDiscord<Yardanico> how are you building 1.6.0?
09:51:48PMunchLike this: https://github.com/PMunch/nim-playground/blob/master/docker/Dockerfile
09:52:05PMunchthe file `curtag` just includes the version, like v1.6.0
09:52:42PMunchThat container is able to build every version from v0.13.0 to v1.6.2, but not 1.6.0
09:54:15arkanoidElegantbeef: this is the problem that causes build to fails due to wrong clone of csources_v1 https://github.com/nim-lang/Nim/search?q=%22--depth+1%22
09:54:57PMunchThat link was totally broken on IRC :P
09:55:25PMunchHmm, that container is built for the old csources with the tags
09:55:48PMunchNot sure why we created a new one instead of creating more tags in the old one..
10:02:00arkanoidElegantbeef: bisecting between your hash and v1.4.8
10:02:50arkanoiddo I have to clean or something after each checkout (bisect) and ./build_all?
10:04:04FromDiscord<evoalg> why are multiple versions built on playground? ... are we able to swap between them?
10:04:51FromDiscord<Yardanico> In reply to @evoalg "why are multiple versions": of course
10:05:00FromDiscord<evoalg> I didn't know
10:05:00FromDiscord<Yardanico> did you not see this dropdown? :P https://media.discordapp.net/attachments/371759389889003532/933663392789561354/unknown.png
10:05:04FromDiscord<Elegantbeef> top right corner
10:05:07FromDiscord<evoalg> oh I'm blind
10:05:29FromDiscord<Elegantbeef> Still need to get `gc` options aswell, but i never got around to ti
10:05:56FromDiscord<Yardanico> or maybe just a generic way to input compiler arguments
10:05:56FromDiscord<evoalg> you built playground?
10:05:58FromDiscord<Yardanico> like wandbox
10:06:05FromDiscord<Elegantbeef> No i did not
10:07:19FromDiscord<Elegantbeef> Pmunch runs it and i think forked it from someone
10:08:06FromDiscord<evoalg> I tried to join matrix on element but the curse of the ol' this isn't supported on your version of os x
10:08:29FromDiscord<Elegantbeef> Cant you just force it with rosetta?
10:08:55FromDiscord<evoalg> I dunno what that is
10:09:30FromDiscord<evoalg> hang on I'm trying something...
10:09:52FromDiscord<Elegantbeef> Rosetta is the x86 -\> arm emulation that apple has
10:10:58FromDiscord<evoalg> I downloaded it ... downloaded it from the site instead of the apple play store
10:15:09FromDiscord<Elegantbeef> Wow a new matrix user!
10:15:09FromDiscord<evoalg> gosh
10:16:44FromDiscord<mratsim> 0.13.0?
10:16:53FromDiscord<mratsim> wow, that version must be older than me
10:20:22arkanoidI don't understand git bisect. I told git that #34a53e804943ceaf3900feb6e89194aa03236c0a is bad and v1.4.8 is good, but now asked me to build and test 1.3.7
10:20:48PMunch@Elegantbeef, I'm working on re-designing the entire playground so that it will be easier to extend with new buttons and such
10:21:24PMunchThe custom CSS it uses now is just way too brittle
10:21:54FromDiscord<mratsim> probably less brittle than the CSS in Arraymancer doc
10:23:01arkanoiddamn, I tried many times to read the Arraymancer docs on smartphone, the top menu was my enemy
10:23:55PMuncharkanoid, you might've had leftover state?
10:24:40arkanoidwhat do you mean?
10:28:57PMunch@evoalg, I forked a broken version from Zacharycarter and rewrote the whole thing while maintaining it since then
10:29:08PMuncharkanoid, if you had messed around with git bisect before
10:29:34PMunchOr maybe you did the commands wrong somehow?
10:32:02arkanoidno, I've done bisect before (not for tracking problem in nim compiler). I've tagged 1.4.8 as good, and an hash given by elegantbeef in between 1.4.8 and 1.6.0 as bad, the bisect went testing 1.3.7: https://play.nim-lang.org/#ix=3MT0
10:32:56arkanoidbtw I'm down to 5 more steps to identify the culprit
10:34:14*jmdaemon quit (Changing host)
10:34:14*jmdaemon joined #nim
10:35:00FromDiscord<Yardanico> In reply to @arkanoid "no, I've done bisect": yes, that's expected
10:35:15FromDiscord<Yardanico> the proper way to bisect (afaik) is to build the nim compiler from csources_v1
10:35:18FromDiscord<Yardanico> and then start the actual bisect
10:35:34FromDiscord<Yardanico> so all intermediate compiler versions (that are run with ./koch temp from git bisect) are compiled using the v1 csources compiler
10:36:10arkanoidI'm not used to manually build nim compiler. I'm using ./build_all after each bisect
10:36:30FromDiscord<Yardanico> nonoon!
10:36:34FromDiscord<Yardanico> that's not how you do it :P
10:36:53FromDiscord<Yardanico> you just build the v1 compiler and then run git bisect on ./koch temp compiling your nim file
10:37:03FromDiscord<Yardanico> it can even run automatically as koch temp gives correct exit codes to git bisect
10:37:26PMunchAnd this is why we need an auto-bisect script in the Nim repo..
10:37:48arkanoidwhat is the "v1 compiler"?
10:38:14FromDiscord<Yardanico> if the issue you want to check is compilation failure then you just compile the v1 csources, then do `git bisect start` and `git bisect run ./koch temp c /path/to/nim/file.nim`
10:38:18FromDiscord<Yardanico> In reply to @arkanoid "what is the "v1": csources_v1 compiler
10:38:51FromDiscord<Yardanico> just `cd csources_v1` and `./build.sh`
10:39:08FromDiscord<Yardanico> `sh build.sh` i mean
10:39:16FromDiscord<Yardanico> so the total process is something like:
10:40:08FromDiscord<Yardanico> `cd csources_v1` > `sh build.sh` > `cd ..` > `git bisect start` > `git bisect bad v1.4.8` > `git bisect good v1.6.0` > `git bisect run ./koch temp c /path/to/nim/file.nim`
10:40:18FromDiscord<Yardanico> just don't forget to reset your nim repo to a clean state before this
10:41:22FromDiscord<Yardanico> oh right in your case v1.4.8 is good and v1.6.0 is bad
10:41:26FromDiscord<Yardanico> sorry, messed that up a bit :P
10:42:52arkanoidlol, my iteration is: git clone nim, git bisect start, git good bad 1.4.8, git bisect bad 1.6.0, ./build_all, rm ~/.nimble, git bisect <good if nim c else bad>, ./build_all, ...
10:43:11FromDiscord<Yardanico> XD
10:43:17FromDiscord<Yardanico> yeah that's a bit too complex :)
10:46:40arkanoidso what is csources_v1? is the C output of nim compiler that compiled itself?
10:47:04FromDiscord<Yardanico> yes, that's how nim bootstraps itself
10:47:14FromDiscord<Yardanico> csources_v1 contains the compiled C code for a lot of platforms and architectures for the nim compiler
10:47:28FromDiscord<Yardanico> so you only need a C compiler to bootstrap the nim compiler, and then you compile the nim compiler with nim
10:47:47FromDiscord<Yardanico> and you don't really need to care about the bootstrap process for bisecting, so koch temp is enough (it just builds a debug compiler)
10:47:48arkanoidin the meantime, in my slowpoke attitude: Bisecting: 2 revisions left to test after this (roughly 2 steps)
10:49:15arkanoidso kock is this nim compiler compiled from C sources?
10:50:53FromDiscord<Yardanico> no, koch is kind of a small build system
10:51:11FromDiscord<Yardanico> it can builds the nim compiler, build docs, do CI, etc
10:51:20FromDiscord<Yardanico> https://github.com/nim-lang/Nim/blob/devel/koch.nim
10:53:40FromDiscord<dom96> In reply to @Elegantbeef "I dont know choosenim": bruh
10:54:13FromDiscord<dom96> issue reports welcome 😉
10:55:32arkanoidElegantbeef: here's the git bisect log and the culprit https://play.nim-lang.org/#ix=3MT5
10:57:50FromDiscord<Yardanico> ???
10:57:57FromDiscord<Yardanico> wait why did you enter commits manually?
10:58:37FromDiscord<Yardanico> with bisect you basically do `git bisect start` and then do your stuff, then if the result is good you do `git bisect good`, otherwise `git bisect bad`
10:58:54arkanoidthat's what I've done
10:58:55FromDiscord<Yardanico> also can you show a standalone example of the bug you're getting?
10:59:15arkanoidyou see a manual hash as start because @Elegantbeef gave me a hash to start with
10:59:38arkanoidbut the issue is was indeed between 1.4.8 and 1.6.0
11:00:15FromDiscord<dom96> you'd have a much easier time narrowing down by versions first using choosenim
11:01:02arkanoiddom96, I tried, it failed. Actually it was not due to choosenim, but how csouces_v1 is cloned by build_all
11:01:35FromDiscord<dom96> if you installed specific versions you'd get nightlies (unless you're on macos)
11:01:58arkanoidbuild_all clones csources_v1 repository with "--depth 1" git option, and because of this it failed to checkout the required hash for csources_v1
11:03:11arkanoiddom96: yes, choosenim works when checking out tag or devel, but fails with hash. As the problem is somewhere between 1.4.8 and 1.6.0 I had no other choice than bisect
11:03:42FromDiscord<dom96> ahh, so you already knew the versions it was between
11:07:23arkanoidyes
11:08:41arkanoidYardanico, I'd like to provide example, but it's tricky
11:10:57arkanoidtrying
11:33:45arkanoidok, I might have found a way to reproduce this in a smaller example
11:34:33*yassernasc joined #nim
11:38:34*TheDarkMode joined #nim
11:45:10*TheDarkMode quit (Quit: Client closed)
11:51:47arkanoid@Elegantbeef, @Yardanico Success! I've reproduced a minimal example. Here the play, bisect result included: https://play.nim-lang.org/#ix=3MTf
11:52:38FromDiscord<Rika> ? What’s wrong
11:54:18*Vladar quit (Quit: Leaving)
11:54:27arkanoidRika, found a regression
11:55:58arkanoiddo you think it is work posting this as issue?
11:56:02arkanoid*worth
12:18:51arkanoidposted as issue https://github.com/nim-lang/Nim/issues/19426
12:25:30NimEventerNew thread by Inv2004: Discussion: Why Static Languages Suffer From Complexity, see https://forum.nim-lang.org/t/8833
12:30:31*adigitoleo quit (Remote host closed the connection)
12:31:13*adigitoleo joined #nim
12:45:57*jmdaemon quit (Ping timeout: 240 seconds)
12:48:14*jmdaemon joined #nim
12:56:50*jmdaemon quit (Ping timeout: 256 seconds)
13:07:50*adigitoleo quit (Remote host closed the connection)
13:08:32*adigitoleo joined #nim
13:25:16*rockcavera joined #nim
13:25:16*rockcavera quit (Changing host)
13:25:16*rockcavera joined #nim
13:37:19FromDiscord<mratsim> In reply to @arkanoid "posted as issue https://github.com/nim-lang/Nim/iss": pretty sure it's a duplicate, I had this so often I would be surprised if it wasn't already reported, I'll look
13:37:29FromDiscord<mratsim> for example it would 100% break status-libs
13:38:03FromDiscord<mratsim> https://github.com/status-im/nim-stint/blob/master/stint/private/datatypes.nim#L104-L110
13:41:40*adigitoleo quit (Remote host closed the connection)
13:42:22*adigitoleo joined #nim
13:46:39FromDiscord<Clonkk> Anybody knows if it's possible to use `hasCustomPRagmas` with a generic type
13:47:16FromDiscord<Clonkk> Is it normal to disalloc this or is it just a poor implementation ?
14:01:45*adigitoleo quit (Remote host closed the connection)
14:02:27*adigitoleo joined #nim
14:22:04*vicecea quit (Remote host closed the connection)
14:22:55*vicecea joined #nim
14:30:43*yassernasc quit (Ping timeout: 256 seconds)
14:30:59FromDiscord<sOkam!> How does one extend a C application with some nim code?↵The nim code will be the core that will be compiled, and everything C will be called from it↵- Does the C code need to be compiled? ↵- or do I just create my new main function and call whatever the app C procedures from there with a wrapper?
14:31:27nixfreaknim[m]Since nim is a multi-paradigm language and doesn't really have a real programming struture, when it be fair to say start with types first then create your procs ?
14:31:44nixfreaknim[m]I am looking for a struture
14:32:08arkanoidnixfreaknim[m]: procedural programming
14:32:10FromDiscord<Clonkk> You can ask Nim to compile (with `{.compile.}` pragmas) a C file and then `importc` whan you need from it. See the manual https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-pragma↵(@sOkam!)
14:33:26*adigitoleo_ joined #nim
14:34:07*adigitoleo quit (Ping timeout: 250 seconds)
14:34:12*yassernasc joined #nim
14:34:16*arkurious joined #nim
14:37:18*yassernasc quit (Remote host closed the connection)
14:43:07FromDiscord<mratsim> In reply to @Clonkk "Anybody knows if it's": is your macro untyped? if it's typed, it's possible that early symbol resolution pass is stripping the pragmas.
14:47:24FromDiscord<sOkam!> In reply to @Clonkk "You can ask Nim": so, if I ask nim to compile a C file, does it also compile its dependencies automatically?
14:47:43FromDiscord<Clonkk> I actually went inside the rabbit's nest and it's even more basic than that \: `customPragmas` impelmentation fro std/macros doesn't handle nnkBracketExpr↵(@mratsim)
14:49:44FromDiscord<Clonkk> Issue was open here https://github.com/nim-lang/Nim/issues/11932. Should have been fixed in a refactor here https://github.com/nim-lang/Nim/pull/11526/files# that got reverted later here https://github.com/nim-lang/Nim/pull/18601 and was also fixed in that commit https://github.com/nim-lang/Nim/commit/5da931fe811717a45f2dd272ea6281979c3e8f0b that never got merged because another PR was prefered
14:50:31FromDiscord<Clonkk> No it won't. If you have a large project, I suggest compiling your C files into a shared library and linking as you would any lib↵(@sOkam!)
14:51:26FromDiscord<Clonkk> Alternatively, you can setup your whole compilation chain in Nim but you'd probably have to be exhaustive
14:51:47FromDiscord<sOkam!> In reply to @Clonkk "No it won't. If": Its a game engine, so yes its quite extensive
14:52:20FromDiscord<sOkam!> In reply to @Clonkk "Alternatively, you can setup": How would one do that? any pointers?
14:52:43FromDiscord<Clonkk> So I would keep the original compile chain, make a static / shared library and link that to your Nim code.↵(@sOkam!)
14:53:32FromDiscord<sOkam!> In reply to @Clonkk "So I would keep": how do you make the second step, the static/shared library?
14:53:33FromDiscord<Clonkk> If you have 'clean' headers for the public interface you can try to use c2nim or https://github.com/PMunch/futhark for automatic bindings creation
14:53:38FromDiscord<mratsim> In reply to @sOkam! "so, if I ask": yes
14:53:58PMunch@Clonkk, who said anything about clean?
14:54:04FromDiscord<mratsim> but the Nim compiler caches lib
14:54:16PMunchFuthark should be able to gobble up just about anything
14:54:27FromDiscord<Clonkk> The clean part was referring to c2nim /D↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
14:54:48FromDiscord<sOkam!> In reply to @Clonkk "If you have 'clean'": I don't want to bind the functions. i just need to call whatever C does at main, and go from there
14:55:12FromDiscord<mratsim> sent a long message, see http://ix.io/3MUn
14:55:17FromDiscord<mratsim> without headers
14:56:15FromDiscord<mratsim> And you can replace Make / Cmake and build a shared or static lib like this: https://github.com/numforge/agent-smith/blob/master/third_party/ale_build.nim
14:56:15FromDiscord<Clonkk> Yeah but you're cheating by `#include "file.c"`↵(@mratsim)
14:56:25FromDiscord<Clonkk> So eventually you do have to list C file exhaustively
14:56:29FromDiscord<sOkam!> As in, I will be still using the C engine as it is. Just that I want to create a new main function and handle the default behavior from there (if thats possible in some way)
14:56:41FromDiscord<mratsim> In reply to @Clonkk "So eventually you do": see second example, you can use .c
14:58:00FromDiscord<Clonkk> Ah okay I didn't know `compile` was supporting wildcard↵(@mratsim)
14:58:01FromDiscord<Clonkk> My bad
14:58:12FromDiscord<Clonkk> That should probably be something written in the manual
14:58:39FromDiscord<mratsim> it's written somewhere
14:58:50FromDiscord<mratsim> took me a couple hours to hunt
14:59:09FromDiscord<mratsim> would be nice to have this working though: https://github.com/nim-lang/Nim/issues/9370
14:59:17FromDiscord<Clonkk> The documentation is as good as it's searchable. When I search for \`\`{.compile.} I land on https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-pragma
15:02:11PMunchHmm, I have a timestamp that looks like this: 2022-01-20T15:00:25.9072345+00:00, how would I go about parsing that?
15:02:42PMunchI tried "yyyy-MM-dd'T'HH:mm:ss'.'fffzzz" and all the other ffff variants but none of them worked
15:08:54FromDiscord<mratsim> use `proc take(a: Arrow, i: InTheKnee): bool`
15:09:31FromDiscord<Clonkk> Why ? Is he getting married \:D ?↵(@mratsim)
15:12:42PMunch@Clonkk, arrow in the knee is a Skyrim meme
15:14:40FromDiscord<Clonkk> I know, but it's also (supposedly) an old expression that means getting married↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
15:21:55FromDiscord<mratsim> PMunch is an adventurer and needs to retire
15:22:19PMunchAh right, that's what you meant :P
15:22:32FromDiscord<mratsim> Skyrim is 10 btw. I never finished it ...
15:22:46PMunchNever tried it
15:22:52PMunchPlayed Morrowind and Redguard as a kid
15:23:04PMunchBut Obsidian and Skyrim where to expensive for me to bother
15:23:24PMunchI wanted to try Skyrim, but it's still expensive, despite being 10 years old..
15:26:21FromDiscord<mratsim> I played Morrowind but I was more into Baldur's Gate.↵I found a bug in Morrowind that somehow let me duplicate boosts and one of the instance could be kept forever. And there was some magic resistance boost ....
15:27:26FromDiscord<mratsim> (anyway offtopic)
15:27:40FromDiscord<Clonkk> Define "finishing it". Finishing the main quest can be actualyl quite fast if you're not a completionist↵(@mratsim)
15:30:29FromDiscord<mratsim> In reply to @Clonkk "Define "finishing it". Finishing": --> #offtopic
15:33:17FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MUT
15:33:35FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3MUT" => "https://play.nim-lang.org/#ix=3MUU"
15:40:27FromDiscord<leorize> nope, unless you write your own
15:42:37*kenran joined #nim
16:02:45FromDiscord<Patitotective> sent a code paste, see https://paste.rs/QzP
16:03:08FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MV9
16:03:14FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3MV9" => "https://play.nim-lang.org/#ix=3MVa"
16:03:18FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3MVa" => "https://play.nim-lang.org/#ix=3MVb"
16:04:04FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MVc
16:04:49FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MVe
16:04:51FromDiscord<Patitotective> (edit)
16:14:57FromDiscord<Patitotective> oh nvm, i was using `:` instead of `=`
16:14:58FromDiscord<Patitotective> LOL
16:30:05nixfreaknim[m]has anyone seen this ? http://web.mit.edu/nim-lang_v0.16.0/.nim-0.16.0.amd64_ubuntu1404/examples/cross_calculator/lazarus/readme.txt
16:30:15nixfreaknim[m]using lazarus and nim ?
16:36:52FromDiscord<eyecon> Wow, seems like an interesting idea
16:41:16nixfreaknim[m]Yeah that's what I said
16:41:33nixfreaknim[m]lazarus are pretty nice components
16:42:08nixfreaknim[m]s/lazarus are pretty nice components/lazarus components are pretty nice to use/
16:43:15nixfreaknim[m]Ok I found it https://github.com/zah/grip-lang/tree/master/examples/cross_calculator/lazarus
16:56:28*vicfred joined #nim
16:59:53FromDiscord<Patitotective> Is there an `eval` procedure like in python?
17:00:33FromDiscord<Rika> Kinda but not really
17:00:38FromDiscord<Rika> Ah
17:00:54FromDiscord<Rika> Nvm, yeah, kinda but not really
17:01:28FromDiscord<Patitotective> hmm
17:01:58FromDiscord<Patitotective> I want to parse an string, so I can finally convert `\\n` to `\n` hehe
17:02:12FromDiscord<Rika> That’s just crazy
17:02:21FromDiscord<enthus1ast> yes \:)
17:02:23FromDiscord<Rika> Why can’t you just manually do it lol
17:02:30FromDiscord<Rika> It’s not a large table isn’t it
17:02:33FromDiscord<enthus1ast> why do you got these in the first place btw?
17:02:36*kenran quit (Quit: WeeChat info:version)
17:02:51FromDiscord<Rika> You’re spending more time finding “easier” ways to solve something than to actually just solve it
17:03:21FromDiscord<Patitotective> In reply to @enthus1ast "why do you got": I'm parsing a file, and there are strings in there
17:03:28FromDiscord<Patitotective> (edit) "there" => "there, but I got them raw"
17:03:58FromDiscord<Patitotective> ok thanks 🙃
17:06:34PMunchI have the weirdest freaking bug in my Arduino code
17:06:42PMunchIt all works exactly as I want it to
17:06:59PMunchBut the LED on the board blinks dimmer when I run the Nim code vs. the equivalent C code..
17:07:07FromDiscord<Rika> What
17:07:12FromDiscord<Rika> LMFAO what
17:08:07FromDiscord<Clonkk> PWM rounding issue ?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
17:08:33PMunchI mean I just write bits into the port to set a pin to high
17:09:01FromDiscord<ajusa> Nah nah he's got to use -d:undimBackport1.6
17:09:20FromDiscord<Rika> nimPreviewNoDimLed
17:10:46FromDiscord<enthus1ast> what i meant is that maybe during an "on sicle" you also set it to off, then on again very fast (i have no clue about such stuff actually \:) )
17:10:55FromDiscord<enthus1ast> cycle omg
17:11:06nrds<Prestige99> could there be more power draw due to the generated c code @PMunch ?
17:11:32PMunchWhat generated C code.. My binary is 180 bytes big..
17:12:09nrds<Prestige99> The nim -> c code?
17:12:25PMunchOkay, I just emit-ed the C code into my main function and it's still dim..
17:12:42nrds<Prestige99> that's odd
17:12:47PMunchYup..
17:14:06nrds<Prestige99> am I not following something though? Like aren't you compiling nim -> c -> a binary, then running it? Curious how nim's generated c code could differ from the "equivalent c code" you mentioned
17:15:02PMunchI doubt that that is the problem
17:15:13PMunchI have used the same system to build my entire keyboard firmware
17:15:27nrds<Prestige99> idk what it would be, if not the software
17:15:33PMunchAnd I can blink an LED on the Teensy just fine
17:17:55FromDiscord<Rika> Perhaps the Arduino code does something else undocumented or whatever
17:18:20PMunchWait, I've been an idiot and recompiling my .nim -> binary but not copying my binary -> hex before uploading the hex file..
17:18:48PMunch@Rika, I'm not comparing it to Arduino code, I'm comparing it to the C code that Nim *should* be spitting out
17:19:28FromDiscord<Rika> Ah okay
17:19:39PMunchNow everything just works..
17:19:45PMunchNo idea what the old hex file was doing :P
17:19:50FromDiscord<Rika> Perhaps I should log off for now
17:23:20PMunchRight, so it turns out it was the first thing I thought off and fixed..
17:23:29PMunchThe pin wasn't set up to be an output
17:23:57PMunchAfter fixing that (and uploading the correct file...) it all works fine
17:24:10PMunchI've been chasing this bug for like an hour
17:24:25PMunchAnd it was all just me uploading the same wrong file over and over..
17:24:48PMunchThis is why I need better tools for this..
17:40:47*jjido joined #nim
18:39:21*Gustavo6046 joined #nim
18:47:00*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
19:02:38*jjido joined #nim
19:20:28FromDiscord<Isofruit> sent a code paste, see https://play.nim-lang.org/#ix=3MWh
19:20:44*neurocyte0917090 joined #nim
19:21:02FromDiscord<Isofruit> (edit) "https://play.nim-lang.org/#ix=3MWh" => "https://play.nim-lang.org/#ix=3MWi"
19:21:22FromDiscord<Isofruit> (edit) "https://play.nim-lang.org/#ix=3MWi" => "https://play.nim-lang.org/#ix=3MWj"
19:39:38PMunchCorrect
19:39:43PMunchIt is a global variable
19:39:53PMunchAnd global variables are assumed to last for the duration of the program
19:46:58FromDiscord<JSONBash> could you do that if multithreaded?
19:55:15FromDiscord<Isofruit> Pretty much where I'm going with this. I'm trying to figure out if I can add locks to the seq above and then just use that in a multithreaded context
19:55:35FromDiscord<Isofruit> (edit) "Pretty much where I'm going with this. I'm trying to figure out if I can add locks to the seq above ... and" added "(so you can only pop/add one after another)"
20:05:29*jjido quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
20:09:33PMunchSure, as long as you lock it before accessing you can use it across threads (as long as you use ARC)
20:09:58PMunchThe problem is the things you put into your seq, but I think you should be fine if you use ARC
20:14:16FromDiscord<Patitotective> In reply to @Rika "You’re spending more time": If you look at https://nim-lang.org/docs/manual.html#lexical-analysis-string-literals↵There is an escaped sequence that says `\` '0'..'9'+, is there a limit? Because I cannot create a table for infinite decimal characters (¡)
20:14:18FromDiscord<Patitotective> (edit) "(¡)" => "(?)"
20:17:17FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=3MWE
20:17:32FromDiscord<Patitotective> (edit) "https://play.nim-lang.org/#ix=3MWE" => "https://play.nim-lang.org/#ix=3MWF"
20:18:23FromDiscord<Isofruit> In reply to @PMunch "Sure, as long as": In my case that'll be database connections established through db_sqlite... which appear to have so many non-gc-safe methods that my stuff doesn't compile with the thread support flag turned on, gnaaaa
20:18:34FromDiscord<Isofruit> (edit) removed "support"
20:18:49FromDiscord<Isofruit> (edit) "db_sqlite..." => "db_sqlite std-lib..."
20:18:58PMunchHmm
20:19:09PMunchWhy do you keep a pool of DB connections?
20:20:02FromDiscord<Isofruit> Because creating a new connection to the database every single time I do anything on it seems incredibly wasteful
20:21:16FromDiscord<Isofruit> And given that this is in part also a learning project, I'd prefer learning to do database access the "right" way, which is through connection pooling to avoid the unnecessary constant creation and deletion of connections
20:21:23FromDiscord<enthus1ast> @Patitotective\: yeah if you want decimal den have a counter
20:21:26FromDiscord<enthus1ast> then
20:24:28*noeontheend joined #nim
20:34:55*yassernasc joined #nim
20:36:31*yassernasc quit (Remote host closed the connection)
20:50:27FromDiscord<enthus1ast> working with types in macros is no fun, i see now
20:52:32FromDiscord<Isofruit> ... how exactly are you supposed to use prologue with sqlite and multiple threads if the individual database operations (insert, delete etc.) are all not gc-safe and the compiler screams at you for using them? just `{.cast(gcsafe).}` and tell the compiler to shut up?
20:52:44FromDiscord<Isofruit> (edit) "... how exactly are you supposed to use prologue with sqlite and multiple threads if the individual database operations (insert, delete etc.) ... are" added "using an sqlite connection"
20:53:19FromDiscord<Isofruit> (edit) "multiple threads" => "the `--threads:on` flag"
20:54:02FromDiscord<enthus1ast> @Isofruit\: what might work is when you create a sqlite connection per thread maybe in a threadvar
20:55:01FromDiscord<enthus1ast> but where is the question i guess
20:57:00FromDiscord<Isofruit> sent a code paste, see https://play.nim-lang.org/#ix=3MWR
20:57:36FromDiscord<Isofruit> > /home/isofruit/dev/nimstoryfont/src/applications/base_generics/genericArticleRepository.nim(155, 6) Error: 'deleteEntry' is not GC-safe as it calls 'delete'
20:58:43FromDiscord<Isofruit> delete Entry has to be gc-safe though, because the explicit functions that get created through it need to be gc-safe, because the procs in which they are called need to be gc-safe to be able to be associated with a route in prologue
21:00:09FromDiscord<Isofruit> sent a code paste, see https://paste.rs/HZk
21:01:56FromDiscord<Isofruit> (edit) "https://play.nim-lang.org/#ix=3MWX" => "https://play.nim-lang.org/#ix=3MWW"
21:02:10FromDiscord<Isofruit> Which doesn't explode in your face while multi-threading is turned off, but very much does while it is
21:22:08FromDiscord<enthus1ast> i feel you and always ask me the same
21:22:52FromDiscord<Elegantbeef> Well in the case the compiler thinks it knows more than you, you need to think about if you know more than it
21:23:10FromDiscord<Elegantbeef> is `delete` going to cause race conditions?
21:24:11FromDiscord<Isofruit> Only if I were to send the delete command twice, which would mean I receive 2 HTTP-Delete requests in short succession
21:24:28FromDiscord<Isofruit> At which point I might get a DbError, something I catch in the Controller
21:25:33FromDiscord<Elegantbeef> What if something is attempting to query the `entryId` at the same time you delete it?
21:25:57FromDiscord<Isofruit> So the answer is "yes" I guess, unlikely but if the API is used inappropriately, it will
21:26:32FromDiscord<enthus1ast> afaik sqlite serializes queries internally
21:26:33FromDiscord<Isofruit> The sqlite db locks up on a write command afaik, so it would first handle the deletion (if it comes in), make the other connection wait that wants to read from the database and then lets the other thingy read
21:27:09FromDiscord<Elegantbeef> Yea i know nothing of the DBs 😀
21:27:30FromDiscord<enthus1ast> sent a long message, see http://ix.io/3MX6
21:28:30FromDiscord<Isofruit> And I do use the default here, so serialized it is.
21:28:35FromDiscord<Elegantbeef> Then if that's the case it sounds like you know better than the compiler
21:29:17FromDiscord<Isofruit> I am surprised there is no voodoo hidden gotcha somewhere
21:29:38FromDiscord<enthus1ast> i could imagine that it is slower
21:30:12FromDiscord<Isofruit> Oh, you mean serialize mode?
21:30:15FromDiscord<Elegantbeef> Yea mutexes probably going to slow stuff down
21:30:19FromDiscord<enthus1ast> yes
21:31:23FromDiscord<Isofruit> I mean, sure, though I already used it that way and my queries are already well below 100ms (they're around 5-25ms), so my learning efforts take precedence here! Which will pay off greatly if I ever pay for more than one cpu core on my Linode
21:31:37FromDiscord<enthus1ast> i run all my production sites with sqlite (not nim unfortunately) no performance impact whatsoever
21:31:49FromDiscord<enthus1ast> noticable at least for reading
21:32:02FromDiscord<Isofruit> Given I am a cheap guy, I think learning effort is the excuse I'll go with for doing multi-threading to myself
21:33:43FromDiscord<enthus1ast> there also still is caching (nginx?) if you often would read the same the application would also not hit the db that often
21:34:32FromDiscord<Isofruit> My coded frontend is a PWA, so strictly speaking you can add another layer of caching to that, which is the service worker in the user's browser
21:35:08FromDiscord<Isofruit> And I'm using apache atm, but I haven't bothered looking into how to actually deploy the nim binary I'll get out of this project
21:35:28FromDiscord<Isofruit> I'll likely use this opportunity to also swap to nginx
21:36:28FromDiscord<enthus1ast> think both are the same -\> reverse proxy
21:36:56FromDiscord<Isofruit> In the end, yeah, though Nginx is said (?) to have better parallelization than Apache and thus can handle more requests per second
21:37:26FromDiscord<Isofruit> Nothing noticeable for me anyway, but useful since we do use nginx as a reverse proxy at work and I have no clue as to how to configure an nginx server
21:37:32FromDiscord<Isofruit> (edit) "Nothing noticeable for me anyway, but useful since we do use nginx as a reverse proxy at work and I have no clue as to how to configure an nginx server ... " added "atm"
21:41:59*GreaseMonkey quit (Quit: No Ping reply in 180 seconds.)
21:42:06*greaser|q joined #nim
21:42:46FromDiscord<enthus1ast> sent a code paste, see https://play.nim-lang.org/#ix=3MX8
21:43:04FromDiscord<enthus1ast> and all the proxy\_set\_header stuff is not really needet
21:43:17FromDiscord<enthus1ast> only of you need to know the requester
21:44:05FromDiscord<enthus1ast> i also can highly recomment to use nginx's certbot plugin, then even ssl is are just 2-3 times enter
21:46:03FromDiscord<enthus1ast> good practice imho is also to let nginx deliver your static assets, not your nim application server
21:46:56FromDiscord<Isofruit> Yeh, pretty much planned to do that
21:47:41FromDiscord<Isofruit> I'm pretty much trying to recreate what I currently have.↵Which is a Django App Server which only handles the dynamic content stuff, while the Apache in front of it using HTTP 2 just serves all the static and media assets
21:48:06FromDiscord<Isofruit> (edit) "I'm pretty much trying to recreate what I currently have.↵Which is a Django App Server which only handles the dynamic content stuff, while the Apache in front of it using HTTP 2 just serves all the static and media assets ... " added "(that being user-uploaded images and mp3 recordings)"
21:48:26FromDiscord<enthus1ast> if you need a template engine i can recommend nimja (shameless plug \:D )
21:48:42FromDiscord<Isofruit> Nah, REST Api, my frontend is Angular, thanks for the recommendation though!
21:49:11FromDiscord<Isofruit> chances are I'll want to build myself a backend-admin interface at one point or another since Django's admin interface won't be there anymore
21:49:27FromDiscord<Isofruit> (edit) "anymore" => "anymore, so at that point a template engine will likely be necessary"
21:49:44FromDiscord<enthus1ast> since years i think of a bolt cms but in nim
21:49:57FromDiscord<enthus1ast> i even have starten playing around how to do this properly
21:50:20FromDiscord<enthus1ast> and lately i also though of use an ecs (entity component system) for web stuff
21:51:25*sagax quit (Ping timeout: 240 seconds)
21:51:37FromDiscord<Isofruit> I don't think I have a mental image of ecs atm, let me google that one
21:52:16FromDiscord<enthus1ast> you have Entities (integer) , you assign Components to it (Objects)
21:52:33FromDiscord<enthus1ast> then you have systems that operate on the Components
21:52:50FromDiscord<Isofruit> So components as a bundle of entities
21:52:58FromDiscord<Isofruit> Isn't that sort of what objects in nim are?
21:53:13FromDiscord<enthus1ast> no components are the objects
21:53:39FromDiscord<Isofruit> Check, oh wow my brain really does not compute well atm
21:53:41FromDiscord<Elegantbeef> Systems in ECS query your data base for all entities with specific components then act on those components
21:53:43FromDiscord<enthus1ast> in a game a component could be eg\: Health / Mana
21:53:52FromDiscord<Elegantbeef> Components in ECS are data buckets
21:54:17FromDiscord<Elegantbeef> Entities are IDs which allow you to fetch components specifically when you need to
21:54:53FromDiscord<enthus1ast> i can imagine that it would be easy to store ecs in a db for web purpose
21:54:58FromDiscord<Isofruit> `SELECT FROM my_large_multi_table_view WHERE id = ?` ?
21:55:22FromDiscord<enthus1ast> select \ from health where id = ?
21:55:36FromDiscord<Isofruit> Sounds like database indices and queries to me
21:55:54FromDiscord<Isofruit> I might not have the who is what in that analogy correct right now but the mental mapping seems to fit
21:57:02FromDiscord<enthus1ast> yeah thing that fits quite good. one benefit is that you can model complex entities that are hard to do with inheritance
21:58:22FromDiscord<enthus1ast> eg\: a car that takes fuel, has a trunk, and can be picked up to your players inventory
21:59:35FromDiscord<enthus1ast> should it inherit from a InventoryItem or a WorldItem or a FuelConsumer or a Inventory
22:26:26*PMunch quit (Quit: leaving)
22:42:26*jmdaemon joined #nim
22:51:37*jmdaemon quit (Ping timeout: 240 seconds)
23:18:42FromDiscord<ajusa> Is incremental compilation official yet? I see GitHub issues related to it but was under the impression that it was still heavy WIP
23:22:48FromDiscord<Elegantbeef> It's still in progress i think you can try it with `--ic:on`
23:26:31FromDiscord<ajusa> `nim-#devel/lib/core/macros.nim(173, 55) Error: '[]' can only be used in compile-time context` yup still WIP looks like
23:27:00FromDiscord<hmmm> ic is going to be super huge
23:27:07FromDiscord<hmmm> I'm very excited
23:27:10FromDiscord<ajusa> `Error: unhandled exception: index 62 not in 0 .. 58 [IndexDefect]` when I do it again, so something's clearly happening incrementally, I'll be super happy when it drops
23:27:35FromDiscord<Elegantbeef> Assuming IC ever gets released 😛
23:27:43FromDiscord<hmmm> beeeeeeef
23:27:52FromDiscord<hmmm> of course it's going to!
23:28:59FromDiscord<ajusa> https://github.com/nim-lang/Nim/commit/61fb83ecbb4c691c03d500f6c71499e59a67cef2 > three years ago, but looks like it's more a priority now so I'm hopeful
23:29:10FromDiscord<ajusa> (edit) "https://github.com/nim-lang/Nim/commit/61fb83ecbb4c691c03d500f6c71499e59a67cef2 > three years ago, but looks like it's more ... a" added "of"
23:30:04FromDiscord<Elegantbeef> Personally i just want fewer bugs
23:30:24FromDiscord<hmmm> well you are the compiler dev so get to work 🤔
23:30:28FromDiscord<Elegantbeef> Or things that should work working
23:30:35FromDiscord<Elegantbeef> I'm "the compiler dev"
23:31:20FromDiscord<Elegantbeef> I fix bugs that I see I can fix, or as i prefer to call it "Make things that should work but dont work"
23:32:27FromDiscord<hmmm> well if it can make you sleep any easier there is an entire class of people (me) that operate at a lower level that rarely hit bugs 😃
23:34:52FromDiscord<Elegantbeef> I mean there have been many issues i've seen in here
23:35:09FromDiscord<Elegantbeef> This chat is one place I get problems to fix!
23:35:39FromDiscord<hmmm> I'm very happy with nim, the only thing I miss is that my programs usually want to do a lot of creative stuff with user input and nim wants to know the types in advance and so it's always a struggle, doesn't help that I'm also still at baby level with macros
23:37:23FromDiscord<Elegantbeef> is reminded he needs to expand his macro tutorial more
23:37:29FromDiscord<hmmm> yes please!
23:37:39FromDiscord<hmmm> I enjoyed the mystifying series
23:37:58FromDiscord<Elegantbeef> I did add some to it removing the constructor macro cause it was pointles
23:38:16FromDiscord<hmmm> if I give you an example of simple macro to tutorial would you consider it?
23:39:44FromDiscord<Elegantbeef> Uhhh
23:40:29FromDiscord<hmmm> pft, never trust compiler devs
23:40:37FromDiscord<Elegantbeef> I'm not a compiler dev
23:40:42*greaser|q quit (Changing host)
23:40:42*greaser|q joined #nim
23:40:50FromDiscord<hmmm> compiler mechanic?
23:40:53*greaser|q is now known as GreaseMonkey
23:41:44*adigitoleo_ is now known as adigitoleo
23:41:48FromDiscord<Elegantbeef> Compiler fixer uper erer
23:41:56FromDiscord<Elegantbeef> What's the macro anyway?
23:42:01FromDiscord<Elegantbeef> Also do me a favour and read https://dev.to/beef331/demystification-of-macros-in-nim-13n8#untyped-vs-typed-macros
23:42:29FromDiscord<hmmm> again? I already read it. I stopped before the constructor
23:42:47FromDiscord<Elegantbeef> Not again
23:42:50FromDiscord<Elegantbeef> I added stuff t oit
23:43:11FromDiscord<Elegantbeef> It's actually more explanitive
23:44:05FromDiscord<hmmm> anyway first thing I would modify is "walrus operator" mention since belive it or not there is people that don't know wtf is it and get intimidated, also iirc it was only tangentially related to the matter at hand 🧐
23:44:37FromDiscord<Elegantbeef> What?
23:45:01FromDiscord<hmmm> hehe
23:45:05FromDiscord<Elegantbeef> I explain what it does in Go so saying "walrus operator" or "`:=`" is the same thing
23:46:07FromDiscord<hmmm> hmm I never used Go and today at 00:45 is the first time I see :=, so assume lower level IQ 😃
23:46:45FromDiscord<Elegantbeef> Anyway i was talking abour reading the new typed vs untyped section
23:48:01FromDiscord<hmmm> nu I'm nitpicking the first sentences lol. I was also confused on why you used the backticks now that I remember it
23:48:23FromDiscord<hmmm> something related to overloading? you can explain it in the article 🤔
23:48:28FromDiscord<Elegantbeef> That's how Nim does operators, it's not teaching Nim it's teaching operators 😛
23:48:39FromDiscord<Elegantbeef> it's teaching macros\
23:49:08FromDiscord<hmmm> yea I know but keep in mind that most novices are curious about macros so you might consider lowering the barrier
23:49:19FromDiscord<hmmm> so they might see how powerful they are
23:49:58FromDiscord<Elegantbeef> If you dont know how to use Nim i dont see how you expect to use macros
23:51:02FromDiscord<hmmm> hmm it's more like, people that are learning nim are probably also curious about macros and your article is something they will probably see 😛
23:51:51FromDiscord<hmmm> anyway dumptree at the start is supergood, teaching the fisher how to fish
23:53:09FromDiscord<hmmm> oh you added typed vs untyped