<< 16-10-2024 >>

01:07:09FromDiscord<double_spiral> sent a code paste, see https://play.nim-lang.org/#pasty=NXYnAvbR
01:08:12FromDiscord<double_spiral> 🔥
01:11:17FromDiscord<Elegantbeef> Could also just `{.compile: "examples/lol/module.c".}`
01:12:35FromDiscord<double_spiral> Ill try to implement this tomorrow
01:13:46FromDiscord<double_spiral> Can i add args to that? I need to use -x c so gcc knows its a c file
01:13:57FromDiscord<Elegantbeef> yes
01:14:11FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compile-pragma
01:59:18*rockcavera quit (Remote host closed the connection)
02:07:14FromDiscord<random.visitor> sent a code paste, see https://play.nim-lang.org/#pasty=PVaNgpTZ
02:08:04FromDiscord<Elegantbeef> What are you trying to do?
02:08:09FromDiscord<Elegantbeef> Cause what you're currently trying to do makes little sense
02:16:22FromDiscord<random.visitor> well, at the end of the day - compile time construction for some binary + text protocol fields and create a byte array I can just send over the wire later on
02:17:09FromDiscord<Elegantbeef> So what's the bindsym really for? You want the type of `x`?
02:18:15FromDiscord<random.visitor> I want to get the string value of the constant value
02:18:32FromDiscord<Elegantbeef> Right, but why?
02:19:04FromDiscord<Elegantbeef> You can use `typed` instead of `untyped` on `blah`, but there is probably a better way to do what you're doing
02:19:21FromDiscord<random.visitor> sent a code paste, see https://play.nim-lang.org/#pasty=eMZaVudl
03:08:01*Lord_Nightmare quit (Ping timeout: 244 seconds)
03:38:28*Lord_Nightmare joined #nim
05:35:08*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
05:35:30*SchweinDeBurg joined #nim
06:26:31*PMunch joined #nim
10:01:31*disso-peach quit (Quit: Leaving)
11:03:04*ryuukk quit (Remote host closed the connection)
11:05:19*ryuukk joined #nim
11:36:07*ehmry quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
11:38:32*ehmry joined #nim
12:52:45*ntat joined #nim
12:53:48FromDiscord<lowlowcode_96272> Hello, I want to get a list of objects with differents type (Center, Extender etc) and I want to put them in the same list to call a method render() that they all have
12:56:51Amun-Rahmm, tagged union?
12:57:06FromDiscord<fabric.input_output> object variants
12:57:23FromDiscord<lowlowcode_96272> In reply to @Amun-Ra "hmm, tagged union?": do you have an example ?
12:57:28FromDiscord<ayex> iirc array and sequence need to be of homogenuous type, but maybe if you put them in a tuple?
12:57:53Amun-Ralowlowcode_96272: https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
12:58:59FromDiscord<lowlowcode_96272> I have a lot of objects
12:59:05FromDiscord<lowlowcode_96272> so its maybe a little bit complex
12:59:07FromDiscord<lowlowcode_96272> any idea ?
13:02:37Amun-Rahttps://play.nim-lang.org/#pasty=StYgiZqy
13:04:47FromDiscord<lowlowcode_96272> In reply to @Amun-Ra "https://play.nim-lang.org/#pasty=StYgiZqy": Thanks ! Can we add multiple fields after the case of
13:05:08FromDiscord<fabric.input_output> yes
13:05:24FromDiscord<fabric.input_output> the object can have fields outside the `case`
13:05:25Amun-Rasure: https://play.nim-lang.org/#pasty=WjiUtGIx
13:06:06Amun-Rathere's one limit: object members can't share the same name across different cases
13:06:32Amun-Raunless there was a recent change in nim
13:09:37FromDiscord<lowlowcode_96272> In reply to @Amun-Ra "there's one limit: object": Oh shit I need this :/
13:11:40Amun-Ralowlowcode_96272: you can have any number of common attributes sharing the same type
13:12:09Amun-Rayou can always use case obj.kind…
13:16:00FromDiscord<lowlowcode_96272> yes but for example I have Center(max_width=200),and Slider(max_width=300)
13:26:19FromDiscord<michaelb.eth> In reply to @lowlowcode_96272 "yes but for example": there are some libs that let you do that, but it’s syntactic sugar with macros, doesn’t change this naming restriction of Nim in a deep way
13:26:28*ehmry quit (Ping timeout: 244 seconds)
13:28:14FromDiscord<michaelb.eth> see for example: https://github.com/beef331/fungus
13:31:56Amun-Ralowlowcode_96272: how about something like this? https://play.nim-lang.org/#pasty=qTmZOxEM
14:34:13FromDiscord<double_spiral> sent a code paste, see https://play.nim-lang.org/#pasty=csRwUmsw
14:35:02FromDiscord<double_spiral> (edit) "https://play.nim-lang.org/#pasty=KlSBSTiP" => "https://play.nim-lang.org/#pasty=rgSOQmOl"
14:41:36*ryuukk quit (Remote host closed the connection)
14:43:16*ryuukk joined #nim
14:46:47*ntat quit (Ping timeout: 252 seconds)
14:47:56*ntat joined #nim
14:57:08*PMunch quit (Quit: Leaving)
15:31:06*ntat quit (Quit: Leaving)
15:34:22*ntat joined #nim
16:29:39*Jjp137 quit (Ping timeout: 260 seconds)
17:10:11*cornfeedhobo quit (Ping timeout: 255 seconds)
17:15:43*cornfeedhobo joined #nim
18:38:43*Jjp137 joined #nim
18:59:01*coldfeet joined #nim
19:25:28*coldfeet quit (Remote host closed the connection)
19:45:20*ntat quit (Quit: Leaving)
20:01:56*xet7 quit (Quit: Leaving)
20:48:52*rockcavera joined #nim
20:51:22FromDiscord<pmunch> In reply to @lowlowcode_96272 "yes but for example": You could store a sequence of closures
20:53:46FromDiscord<pmunch> sent a code paste, see https://play.nim-lang.org/#pasty=NMBafhZw
20:54:08FromDiscord<pmunch> On my phone by the way, so there might be typos and stuff in that snippet
22:04:05*pbsds3 quit (Ping timeout: 260 seconds)
22:09:03*pbsds3 joined #nim
22:21:56FromDiscord<frusadev> Hi!↵Does anyone know of an LSP for nim that doesn't nimsuggest?
22:22:02*Amun-Ra quit (Ping timeout: 255 seconds)
22:47:14FromDiscord<Elegantbeef> No cause that's the tooling it's all based upon
22:47:47FromDiscord<Elegantbeef> Jetbrains' Nim extension is built from the ground up but does not use the compiler so macros, templates will not compute and not inject symbols
23:05:21*Amun-Ra joined #nim