<< 17-09-2024 >>

00:15:59*nyeaa49284230101 quit (Quit: The Lounge - https://thelounge.chat)
03:44:47*SchweinDeBurg joined #nim
03:52:08FromDiscord<bubblie> Does nim and docker work well
03:53:41*tc424 quit (Ping timeout: 255 seconds)
03:54:46FromDiscord<nnsee> In reply to @bubblie "Does nim and docker": define "well" and what exactly you want to do
03:55:22FromDiscord<nnsee> interface with the docker daemon itself or just run nim programs in docker containers?
03:55:34FromDiscord<nnsee> if it's the latter, works as well as anything else
03:57:51*SchweinDeBurg quit (Ping timeout: 246 seconds)
03:59:44FromDiscord<bubblie> In reply to @nnsee "if it's the latter,": its the latter and thank you
04:00:00*SchweinDeBurg joined #nim
04:05:32*xet7 quit (Remote host closed the connection)
04:16:43*rockcavera quit (Remote host closed the connection)
05:25:49*ntat joined #nim
05:39:25*lumidify quit (Quit: leaving)
05:41:10*lumidify joined #nim
06:06:55*PMunch joined #nim
07:04:54*ntat quit (Quit: Leaving)
07:21:30FromDiscord<chrisecker_46384> I am trying to interface c++ code. In the c++ side a reference to my nim object is stored. Is this a problem for nim's garbage collector (I believe so) and what is the proper way to handle it?
07:24:11FromDiscord<Elegantbeef> Call the `=destroy` inside the C++ destructor, assuming this you are not using the Nim builtin C++ FFI
07:26:06*ntat joined #nim
07:30:13FromDiscord<chrisecker_46384> The problem I am seeing is that there is an additional reference to my nim object which the nim runtime is not aware of.
07:30:23*deadmarshal_ quit (Remote host closed the connection)
07:30:46FromDiscord<Elegantbeef> So then call the Nim `=copy`
07:31:00FromDiscord<Elegantbeef> You need to use move semantics to continue life times
07:31:38FromDiscord<Elegantbeef> So if you're wrapping this across a library interface you need to make `a = b` call an exposed version of your type's `=copy`
07:32:16FromDiscord<Elegantbeef> When a C++ object is destroyed it has to also call the Nim `=destroy` which needs to be exposed
07:32:22FromDiscord<Elegantbeef> So forth
07:35:55*mfg joined #nim
07:36:23FromDiscord<chrisecker_46384> Will try. Thanks.
08:01:32*deadmarshal_ joined #nim
08:47:35*ntat quit (Quit: Leaving)
09:17:59*ryuukk_ quit (Remote host closed the connection)
10:23:20*ryuukk joined #nim
10:32:58*jjido joined #nim
10:48:01*nyeaa49284230101 joined #nim
10:52:04*lucasta joined #nim
10:57:30*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
12:27:15FromDiscord<enthus1ast.> In reply to @bubblie "Does nim and docker": I rather just create a systems service lock it down and just run it bare bone, I find it much easier than docker, but it works well (but it's very bloaty)
12:27:25FromDiscord<enthus1ast.> (edit) "systems" => "systemd"
12:27:47FromDiscord<enthus1ast.> (edit) "docker," => "docker." | "it" => "docker"
12:32:35*SchweinDeBurg quit (Ping timeout: 260 seconds)
12:36:25*ntat joined #nim
12:41:55*SchweinDeBurg joined #nim
12:55:48*xet7 joined #nim
13:28:52*beholders_eye joined #nim
13:48:59*mfg quit (Ping timeout: 260 seconds)
14:48:13FromDiscord<Unisoft> I like the `fg` and `bg` color types↵I want to control the colors from the Command Line Enviroment Variablesis it possible to provide such functions? \:↵`getFgColor(string: name): color =`↵so i can get color from `COLOR="red"` colorname a color...
14:49:26FromDiscord<Unisoft> I like the `fg` and `bg` color types↵I want to control the colors from the Command Line Enviroment Variablesis it possible to provide such functions? \:↵`getFgColor(string: name): color =`↵so i can get color with `COLOR="red"` via `getFgColor("red")` ...
15:09:57FromDiscord<enthus1ast.> The enum values are int, so parseEnum would not work for eg "red" so I think the easiest way would be to just build your own case and return the correct enum
15:11:53FromDiscord<enthus1ast.> When you mean the https://nim-lang.org/docs/terminal.html#BackgroundColor
15:12:03FromDiscord<enthus1ast.> Enums
15:18:31*rstrz joined #nim
15:22:17FromDiscord<Unisoft> thanks, i thought about it, but nim is new to me, so better to ask how people are doing that here 😄
15:26:49rstrzhi i'm new to Nim and noticed that in the dom96/snake example, it's targetting JavaScript and also building server as well. Is it possible to write Nim to output JS files or is it more common to write everything in Nim and encapsulate it in a single binary?
15:39:35rstrzoh I see in the Compiler documentation that it can compile a project to JavaScript. I think that answers my question! Looks like the wiki also has some good documentation on Nim for TS Programmers too
15:41:39FromDiscord<Array 🇵🇸🇸🇩🇸🇾🇨🇩> btw nim can target frontend js as well as node.js↵(<@709044657232936960_rstrz=5b=49=52=43=5d>)
15:42:10FromDiscord<Array 🇵🇸🇸🇩🇸🇾🇨🇩> btw nim can target frontend browser js as well as node.js
16:24:38*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
16:28:12*SchweinDeBurg joined #nim
16:46:33*lucasta quit (Remote host closed the connection)
16:56:38Amun-Rabut not node's io etc.
16:59:07*SchweinDeBurg quit (Quit: WeeChat 4.5.0-dev)
17:15:21*beholders_eye quit (Read error: Connection reset by peer)
17:20:55*beholders_eye joined #nim
17:26:52FromDiscord<double_spiral> Is returning a proc pointer to call outside of the func considered a side effect
17:31:39Amun-RaI'd say no
17:48:00*beholders_eye quit (Read error: Connection reset by peer)
17:53:43*beholders_eye joined #nim
18:06:34*xet7 quit (Remote host closed the connection)
18:35:12FromDiscord<Elegantbeef> @double_spiral if for the same inputs the same thing happens it's generally side effect free
18:47:27*xet7 joined #nim
18:53:42FromDiscord<Unisoft> I want to write in stderr, can i use it?
18:54:29FromDiscord<Unisoft> or there a function for it? such as `error`, `perror()` or `err()`
18:55:21FromDiscord<Unisoft> or there is a function for it? such as `error`, `perror()` or `err()`
18:56:24FromDiscord<Unisoft> I've found it a `stderr.write` right?
18:56:38FromDiscord<Elegantbeef> Sure
18:56:47FromDiscord<Unisoft> [Edit](https://discord.com/channels/371759389889003530/371759389889003532/1285675743317065839): I've found... it's a `stderr.write` right?
18:57:39FromDiscord<Unisoft> Simple as a rocket↵Nimple
19:28:14*jjido joined #nim
19:40:58*marcus quit (Remote host closed the connection)
19:42:59*marcus joined #nim
19:55:18*ntat quit (Quit: Leaving)
20:05:37FromDiscord<Phil> In reply to @bubblie "Does nim and docker": It's just putting a binary in a container like any other. ↵Nothing really specific to Nim about that. ↵I wrote guides on how to deploy prologue binaries with docker for example
20:55:12*xet7 quit (Remote host closed the connection)
21:42:55*rockcavera joined #nim
22:18:15*rstrz quit (Ping timeout: 246 seconds)
22:25:47*beholders_eye quit (Ping timeout: 265 seconds)
23:06:09*jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…)
23:20:52*rstrz joined #nim
23:21:52FromDiscord<a a> Hi
23:22:33FromDiscord<Vipi> Hi