<< 16-12-2024 >>

01:03:27*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
01:48:40*tokyovigilante joined #nim
02:35:42*SchweinDeBurg joined #nim
03:19:37*rockcavera quit (Remote host closed the connection)
03:24:34*krux02 quit (Quit: Leaving)
06:27:07*coldfeet joined #nim
06:39:24*coldfeet quit (Quit: Lost terminal)
08:46:21*nils` quit (Ping timeout: 246 seconds)
09:16:38*capocasa joined #nim
09:18:51capocasaHello!
09:18:51capocasaI'm writing a macro and I need to expand multiple nested macro calls in order to process the result of all of those.
09:18:52capocasaIt appears to me that I need to use a typed macro in order to perform those expansions. This has the downside that I need to work with the different typed AST. Do I need to go down this route, or is there another way? Recursively look for macro calls and call getAST on them, or similar, so I can work with untyped ast from the nested macros?
09:18:52capocasaThanks!
09:27:35FromDiscord<4zv4l> How can I check the backup type for an enum ?↵What if I want the enum to be represented by an `uint8` ?
09:28:02Amun-Ratype Foo {.size: sizeof(byte).}: enum = …
09:29:21FromDiscord<4zv4l> thanks !
09:46:53FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=mnAeuyca
09:51:12FromDiscord<nnsee> sent a code paste, see https://play.nim-lang.org/#pasty=UIGwZxTq
09:53:56FromDiscord<4zv4l> ooooh silly mistake
09:53:57FromDiscord<4zv4l> xD
09:54:02FromDiscord<4zv4l> thanks xD
09:54:36FromDiscord<4zv4l> indeed, works better xD
10:00:02*nils` joined #nim
10:01:50FromDiscord<Elegantbeef> That is better done with a bitset
10:01:55FromDiscord<Elegantbeef> Instead of using C style flags
10:05:09FromDiscord<lozercaustic> sent a code paste, see https://play.nim-lang.org/#pasty=kBQuNsGT
10:06:13FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=pmTxoFGx
10:06:44FromDiscord<Elegantbeef> Why don't you expect the `echo bar` to work
10:09:54FromDiscord<lozercaustic> I take a look at the implement of the with macro, it just handle nnkAsgn, nnkExprEqExpr or if a call, it will append to the first params↵https://github.com/nim-lang/Nim/blob/devel/lib/std/private/underscored_calls.nim#L42
10:10:26FromDiscord<lozercaustic> So I dont know where is handle that
10:10:27FromDiscord<Elegantbeef> It injects templates for the object/tuple's fields
10:11:44FromDiscord<lozercaustic> Thank you @ElegantBeef , can you give me the docs of this or the source implement this
10:12:16FromDiscord<Elegantbeef> Are you sure you're using `std/with`?
10:12:55FromDiscord<Elegantbeef> Cause you're clearly using `pkg/with` and it's probably https://github.com/zevv/with/blob/master/with.nim
10:12:58FromDiscord<lozercaustic> yes, i use with std/with
10:13:07FromDiscord<lozercaustic> (edit) "yes, i use with ... std/with" added "from"
10:14:10FromDiscord<Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=VMCTtTWR
10:14:12FromDiscord<Elegantbeef> Why you lying
10:14:19FromDiscord<lozercaustic> ah, just import with, you're right, this is come from another with marco
10:14:21FromDiscord<lozercaustic> my bad
10:15:52FromDiscord<lozercaustic> thank you
10:21:27FromDiscord<4zv4l> In reply to @Elegantbeef "That is better done": how can I make a bitset ? the doc seems a bit lacking
10:21:36FromDiscord<Elegantbeef> I just showed you
10:21:46FromDiscord<Elegantbeef> `set[T]` is a bitset
10:22:02FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-set-type
10:25:13*capocasa quit (Quit: Client closed)
10:35:03FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=PLtkjXEC
10:57:38Amun-Rabtw, enum/set bitfields don't work on js target
11:35:36*nils` quit (Ping timeout: 276 seconds)
13:56:44*nils` joined #nim
14:06:20FromDiscord<arm_3_d> why I keep getting "Error: unhandled exception: The filename or extension is too long." whth --cc:vcc but completely fine if I compile using mingw? Long filenames setting is turned on on win machine.
14:09:18FromDiscord<arm_3_d> In reply to @arm_3_d "why I keep getting": nim 2.2.0 btw, win11 64bit.
14:15:45*nils` quit (Ping timeout: 248 seconds)
14:32:15Amun-Raisn't windows still have 256 character path limit?
14:47:36FromDiscord<arm_3_d> it is by default, but there is a registry option to enable long names
14:48:11FromDiscord<arm_3_d> and mingw linker does not complain btw
15:01:06Amun-RaI mean total length of the path, not path directory/file names
15:01:18Amun-Ra"C:/foo/bar/baz/etc"
15:17:46FromDiscord<arm_3_d> sent a code paste, see https://play.nim-lang.org/#pasty=VwhBIumB
15:19:27*ntat joined #nim
15:20:22*nils` joined #nim
15:33:00*shrikant joined #nim
15:35:52shrikantHello! Recently found this awesome language and started experiments. Got an error, which i can't understand with my Python-script-kiddie-based brains: https://play.nim-lang.org/#pasty=TeWkNDwO . What's the problem?
15:41:10FromDiscord<tsoj> I think you need to pass con as mutable, i.e. `connect(con: var IRCConnection)`
15:41:16FromDiscord<tsoj> <https://nim-lang.org/docs/tut1.html#procedures-parameters>
15:41:30FromDiscord<tsoj> See this for more info ^
15:42:49FromDiscord<tsoj> Be careful though, if you use `ref` objects then the behaviour might be unexpected: <https://forum.nim-lang.org/t/3374>
16:03:44shrikanttsoj, thank you! Passed con as mutable, and everything started work.
16:58:56*valms19901 joined #nim
17:28:17*valms19901 quit (Quit: Leaving.)
17:28:37*valms19901 joined #nim
17:44:46*krux02 joined #nim
17:46:05*cnx_ joined #nim
17:46:34*om3ga_ joined #nim
17:46:39*flynn4 joined #nim
17:47:11*krux02 quit (Client Quit)
17:54:00*om3ga quit (*.net *.split)
17:54:00*marcus quit (*.net *.split)
17:54:02*flynn quit (*.net *.split)
17:54:02*cnx quit (*.net *.split)
17:54:04*cnx_ is now known as cnx
17:54:04*flynn4 is now known as flynn
17:55:07*Guest30 joined #nim
18:00:41*marcus joined #nim
18:04:40*Guest30 quit (Ping timeout: 240 seconds)
18:13:46*nils` quit (Ping timeout: 252 seconds)
18:19:15FromDiscord<marioboi3112> is anyone else encountering problems related to install cpython
18:21:56FromDiscord<marioboi3112> i tried both through `nimble install cpython` and through `nimble install <git_link>`
18:22:22FromDiscord<marioboi3112> https://media.discordapp.net/attachments/371759389889003532/1318282085068181674/image.png?ex=6761c15d&is=67606fdd&hm=37a51e0e458d76db99038647b62edf65093edc84fe138d20bbc91f6388946108&
18:35:16FromDiscord<janakali> @marioboi3112 git can have issues cloning relatively big repos, try to [increase http buffer](https://stackoverflow.com/questions/6842687/the-remote-end-hung-up-unexpectedly-while-git-cloning)
18:42:48FromDiscord<marioboi3112> thanks, that actually worked
19:08:15*nils` joined #nim
19:23:01*ntat quit (Ping timeout: 244 seconds)
19:24:09*ntat joined #nim
20:01:54*shrikant quit (Quit: shrikant)
20:48:25*coldfeet joined #nim
21:01:32FromDiscord<.throwstar> Anyone know why my TAU has an extra 5 in the generated output? (and if it even matters?) https://media.discordapp.net/attachments/371759389889003532/1318322138540670976/image.png?ex=6761e6ab&is=6760952b&hm=0ed751b3d2509b54f36f9fc852646590819699a733578e9c3ce37782ec7bbd54&
21:01:44FromDiscord<.throwstar> btw `sin( float32(TAU) t )`
21:03:45FromDiscord<Elegantbeef> "An extra 5"?
21:04:12FromDiscord<Elegantbeef> Oh it's supposed to be a 3
21:04:33FromDiscord<Elegantbeef> Just FP32 precision issue
21:45:19*rockcavera joined #nim
22:06:24*ntat quit (Quit: Leaving)
22:37:29FromDiscord<System64 ~ Flandre Scarlet> In reply to @marioboi3112 "": I guess it's Python in Nim?
22:44:38*coldfeet quit (Quit: Lost terminal)
22:45:43*tokyovigilante quit (Remote host closed the connection)
22:47:50*tokyovigilante joined #nim
23:41:22FromDiscord<demotomohiro> In reply to @.throwstar "Anyone know why my": You can learn how float (ieee754) works: https://en.m.wikipedia.org/wiki/IEEE_754↵32bit float has only 7 digits accuracy.
23:49:54*tiorock joined #nim
23:49:54*rockcavera is now known as Guest7329
23:49:54*tiorock is now known as rockcavera
23:49:55*tiorock joined #nim
23:49:55*tiorock quit (Changing host)
23:49:55*tiorock joined #nim
23:49:55*rockcavera quit (Killed (copper.libera.chat (Nickname regained by services)))
23:49:55*tiorock is now known as rockcavera
23:49:56*Guest7329 quit (Ping timeout: 265 seconds)