<< 05-10-2022 >>

00:26:29*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:28:53FromDiscord<auxym> are the nim docs for older versions hosted anywhere?
00:54:04*arkurious joined #nim
01:32:12*arkurious quit (Quit: Leaving)
01:54:51FromDiscord<Rika> Replace “docs” with the version number in the url
01:54:56FromDiscord<Rika> https://nim-lang.org/1.0.6/strutils.html
02:36:47FromDiscord<! Nilts> Does anyone know if i can host my jester website with vercel, if i can't what should i host it with?
02:39:03FromDiscord<huantian> isn't vercel a web framework?
02:39:08FromDiscord<huantian> (edit) "isn't vercel a ... web" added "frontend"
02:39:33FromDiscord<huantian> uhhh nvm
02:40:45FromDiscord<huantian> well I clearly no nothing but I feel the answer is no?
02:40:57FromDiscord<Elegantbeef> know nothing\
02:41:15FromDiscord<Elegantbeef> Too easy of a joke
02:42:30FromDiscord<Rika> Vercel I assume is only for JavaScript server side
02:42:57FromDiscord<Rika> Nim does have server side JavaScript “support” but not jester
04:50:02NimEventerNew Nimble package! cssgrid - pure Nim CSS Grid layout engine, see https://github.com/elcritch/cssgrid
05:15:27FromDiscord<Elegantbeef> @elcritch\: damn you, i'm now starring at your code going "Hmmm can one make this work with anyone's vector/rect type"
05:34:15*rockcavera quit (Remote host closed the connection)
06:05:40*kenran joined #nim
06:16:23FromDiscord<Girvo> Is there such a thing as `Promise.all` in terms of `await` for Nim? Ideally, somewhat "parallel" for a series of `await` calls?
06:16:37FromDiscord<Elegantbeef> `all`
06:17:02FromDiscord<Girvo> Well that makes sense lol
06:17:04FromDiscord<Girvo> Cheers
06:17:38FromDiscord<Elegantbeef> My minor async knowledge helps!
06:24:16FromDiscord<Girvo> Where does `all` live in the docs? Not in `asyncdispatch` from what I can see, is it lower level than that?
06:24:28FromDiscord<Girvo> It works on an `openArray` of `Future`?
06:24:36FromDiscord<Girvo> `Future[T]` rather?
06:25:29FromDiscord<Elegantbeef> `varargs[Future[T]]`
06:25:38FromDiscord<Elegantbeef> https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D
06:25:54FromDiscord<Girvo> Perfect
06:29:26FromDiscord<Girvo> sent a code paste, see https://play.nim-lang.org/#ix=4cjs
06:50:43*wallabra quit (Ping timeout: 248 seconds)
06:51:13*wallabra joined #nim
07:33:08FromDiscord<untoreh> does httpclient in stdlib leak fds?
07:33:41FromDiscord<Elegantbeef> It shouldnt if you close the clients
07:36:42*dnh joined #nim
07:39:46FromDiscord<ChocolettePalette> What's fds?
07:39:47FromDiscord<Elegantbeef> Filedescritprs i assume 😄
07:40:07FromDiscord<Rika> Yes, if you spelled that right
07:40:14FromDiscord<ChocolettePalette> Ahh okay, I'm glad it doesn't
07:40:15FromDiscord<Rika> Descriptor by the way
07:40:39FromDiscord<Elegantbeef> Descriaptors you say?
07:41:42FromDiscord<Rika> Lol
07:48:05*m5zs7k quit (Ping timeout: 252 seconds)
07:53:11*m5zs7k joined #nim
08:05:22FromDiscord<Girvo> Dumb question: would it even be possible to mark some function as "not" using a variable it takes in, lol↵Basically, I had a logic error where variable was unused in the actual _logic_, but the "unused" warning didn't catch it, because I was logging/printing it out sigh↵I don't imagine thats possible, but man it would be nice
08:06:14FromDiscord<Elegantbeef> With the effect system it could be done but it'd be very very fun
08:06:20FromDiscord<Girvo> Yeahhhh haha
08:06:35FromDiscord<Girvo> I started sketching it out but man it seems like it'd go wayyy too deep for me to tackle 😛
08:07:09FromDiscord<Elegantbeef> You'd basically need to have compiler support to say "any procedure marked with the 'unusedEffect
08:07:17FromDiscord<Girvo> Yeah
08:07:27FromDiscord<Girvo> Man it would be nice though. One can dream
08:07:43FromDiscord<Elegantbeef> Similar thing could be done for unsafe
08:08:04FromDiscord<Elegantbeef> Especially now that we have `forbid` effects
08:08:37FromDiscord<Girvo> Oh yeah, thats a good point
08:09:28FromDiscord<Elegantbeef> Effect systems are cool, just only to maniacs
08:09:40FromDiscord<Girvo> Good thing I'm nuts then 😄
08:10:15FromDiscord<Elegantbeef> Yea i personally havent actually used effects aside from `raises`
08:10:54FromDiscord<Girvo> Me either, but I have some ideas. I think they're going to be super useful for some of the logic traps/errors that crop up in the firmware stuff we're doing
08:11:02FromDiscord<Girvo> Just haven't had time to dig into it yet sadly
08:12:36FromDiscord<Elegantbeef> Yea tags seem like something nice for more professional code than i write 😛
08:12:51FromDiscord<Rika> Effects are cool
08:13:48FromDiscord<Girvo> @Rika You got any example code up on GitHub et al. with using them?
08:14:02FromDiscord<Rika> ;; I just said they cool
08:14:06FromDiscord<Girvo> haha
08:14:06FromDiscord<Rika> No I don’t lol
08:14:08FromDiscord<Girvo> damn all good
08:14:11FromDiscord<Girvo> I'm the same 😛
08:14:14FromDiscord<Rika> It’s been a while since I’ve programmed in Nim
08:14:18FromDiscord<Girvo> I think they're super neat, but never used 'em in anger
08:14:26FromDiscord<Girvo> Whatcha developing in these days?
08:14:31FromDiscord<Rika> Elixir
08:14:34FromDiscord<Rika> Trying to at least
08:14:42FromDiscord<Girvo> Elixir is pretty nice
08:14:50FromDiscord<Girvo> The erlang runtime/vm is fantastic
08:15:12FromDiscord<Rika> I hear it is
08:16:34FromDiscord<Elegantbeef> Hmm using tags might be nice for my render api if i ever use multithreading 😄
08:17:18FromDiscord<Elegantbeef> Disallow calling any render API from a secondary thread as the good compiler lord intended
09:06:16*vicecea quit (Remote host closed the connection)
09:07:51*vicecea joined #nim
09:09:21*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:42:23*dnh joined #nim
10:06:14*kenran quit (Remote host closed the connection)
10:09:13FromDiscord<srozb> sent a code paste, see https://play.nim-lang.org/#ix=4ck3
10:13:01FromDiscord<ChocolettePalette> What's signer[].not\_before?
10:21:49FromDiscord<Rika> It might be a type named the same but from a different module
10:46:00*kenran joined #nim
10:58:07*jmdaemon quit (Ping timeout: 268 seconds)
11:16:25FromDiscord<untoreh> In reply to @untoreh "does httpclient in stdlib": it leaks when using proxies
11:33:09FromDiscord<Yardanico> In reply to @untoreh "it leaks when using": sorry for a question like that, but are you closing httpclients? that said, I didn't use httpclient proxies so maybe they do leak FDs
11:37:11FromDiscord<untoreh> yes I do close them, I tested with and without proxies, with proxies it seems to leak
11:53:29FromDiscord<untoreh> also it seems to consistently crash when the process surpasses 1k fd, but `ulimit -n` is much higher
12:02:45FromDiscord<Horizon [She/Her]> What's a simple library for making an android app with Nim?
12:11:18FromDiscord<n-1x> sent a code paste, see https://play.nim-lang.org/#ix=4ckE
12:12:15FromDiscord<n-1x> (edit) "https://play.nim-lang.org/#ix=4ckE" => "https://play.nim-lang.org/#ix=4ckG"
12:19:58FromDiscord<Horizon [She/Her]> Anyone know of up-to-date ndk bindings?
12:23:52*arkurious joined #nim
12:26:34FromDiscord<wiga> hum, help https://media.discordapp.net/attachments/371759389889003532/1027195091330277427/unknown.png
12:26:45FromDiscord<wiga> i cant even compile any codes anymore
12:27:32FromDiscord<Horizon [She/Her]> Is gcc installed?
12:28:23FromDiscord<wiga> yes
12:28:28FromDiscord<wiga> it was working fine yesterday
12:28:45FromDiscord<Yardanico> In reply to @wiga "hum, help": it should show the actual c compiler error above or below
12:29:23FromDiscord<wiga> wtf https://media.discordapp.net/attachments/371759389889003532/1027195798498312263/unknown.png
12:31:18FromDiscord<n-1x> I have seen that error before when you have the program running and you try to rerun it
12:31:42FromDiscord<n-1x> make sure to close the open program, then try nim r again
12:31:46FromDiscord<Yardanico> yes, n-1x is right
12:31:59FromDiscord<Yardanico> on windows it's like that, you can't modify the binary's file if it's running
12:32:39FromDiscord<wiga> it is not running bruh
12:34:50FromDiscord<n-1x> Try logging out and back in
12:34:53FromDiscord<n-1x> should close everything
12:42:10FromDiscord<albassort> doing stuff in python
12:42:11FromDiscord<albassort> i hate this
12:42:30FromDiscord<wiga> it worked ty
13:15:09*gsalazar joined #nim
13:26:18FromDiscord<! Nilts> In reply to @Rika "Vercel I assume is": it supports js, python, go and ruby
13:29:53*derpydoo joined #nim
13:58:09*dtomato quit (Ping timeout: 268 seconds)
13:59:37*gsalazar quit (Remote host closed the connection)
14:50:38*rockcavera joined #nim
14:50:38*rockcavera quit (Changing host)
14:50:38*rockcavera joined #nim
15:28:49*pro joined #nim
15:45:56*kenran quit (Remote host closed the connection)
15:46:40*rez joined #nim
15:53:45*pro quit (Quit: pro)
16:11:54*oddish joined #nim
16:14:07FromDiscord<Phil> How did I read the value of a defined flag again? E.g. "--defined:5" I want to get the 5
16:14:11NimEventerNew thread by miran: This Month with Nim: September 2022, see https://forum.nim-lang.org/t/9507
16:14:36NimEventerNew Nimble package! authenticode - PE Authenticode parser based on libyara implementation, see ssh://[email protected]/srozb/authenticode
16:16:47FromDiscord<Phil> Can I hand over a value via compile time flag?↵I know its super hacky, but for now its the only solution I got for a temporary workaround
16:17:10FromDiscord<Phil> Like, is there something like `--define:Bla:5` where I can fetch "Bla" and the associated value "5" ?
16:18:52FromDiscord<Yardanico> In reply to @Isofruit "Like, is there something": yes
16:19:03FromDiscord<Yardanico> https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-compileminustime-define-pragmas
16:21:42*derpydoo quit (Ping timeout: 264 seconds)
16:23:46FromDiscord<Phil> Is there such a thing is "stringdefine"?
16:23:54FromDiscord<Phil> To hand over a filepath?
16:24:45FromDiscord<Phil> I'm an idiot
16:24:47FromDiscord<Phil> nevermind
16:24:50FromDiscord<Phil> I literally can not read
17:21:02FromDiscord<gibson> Is it true that there's no way to hand over a nim string in any form to an external C++ function for mutable manipulation? I'm trying to incrementally wrap a bunch of c++ code, but a number of the functions rely on the speed conferred from reference passing of the strings. This means there's a big constraint on what "incremental" means for me, instead of doing 1 function at a time. Just wondering if there's a way.
17:21:31FromDiscord<gibson> (edit) "Is it true that there's no way to hand over a nim string in any form to an external C++ function for mutable manipulation? I'm trying to incrementally wrap a bunch of c++ code, but a number of the functions rely on the speed conferred from reference passing of the strings. This means there's a big constraint on what "incremental" means for me, instead of doing 1 function at a time. Just wondering if there's a way. ... " added
17:46:56*wallabra quit (Ping timeout: 260 seconds)
17:52:31*wallabra joined #nim
17:52:37*wallabra quit (Remote host closed the connection)
17:53:07*wallabra joined #nim
18:00:38*kenran joined #nim
18:03:07*kenran` joined #nim
18:05:56*kenran` quit (Remote host closed the connection)
18:09:53*rez quit (Quit: much snoozes...)
18:11:33*strogon14 joined #nim
18:12:46strogon14Can I pass a nim enum (declared with {.size: sizeof(cint).}) to a C function, which expects a pointer to an enum as an output parameter?
18:13:10strogon14(well, I can, but is it safe?)
18:14:36FromDiscord<RattleyCooper> Maybe a weird question but any clipboard libraries that are pure nim? I can’t seem to find any
18:16:32FromDiscord<RattleyCooper> I’m only worried about windows
18:25:10FromDiscord<gibson> @gibson The best answer right now may be to use nim-cppstl to create strings and then pass those to the external functions, and for each function replaced, make it work with normal nim strings as well, if possible. Hopefully this doesn't fork the code paths in each function. I guess the nim std string functions would need to be implemented for nim-cppstl (I don't know if this is not the case).
18:39:05*kenran quit (Remote host closed the connection)
19:13:57*pro joined #nim
19:17:27FromDiscord<Generic> if the C++ code uses std::string_view then it would work
19:17:53FromDiscord<Generic> though it's the same problem you have with multiple C++ libraries with their own string implementation
19:18:47FromDiscord<Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cmZ
19:18:57*jmdaemon joined #nim
19:19:38FromDiscord<Goel> (edit) "https://play.nim-lang.org/#ix=4cmZ" => "https://play.nim-lang.org/#ix=4cn0"
19:20:20FromDiscord<Takemichi Hanagaki> What is the advantage of compile Nim wih C++ backend instead C backend?
19:21:31FromDiscord<Takemichi Hanagaki> In reply to @Takemichi Hanagaki "What is the advantage": I know that for use some libraries written in C++, I must to use C++ backend.
19:25:39FromDiscord<matrix_help> sent a long message, see https://paste.rs/ZN6
19:32:44FromDiscord<Tekk> In reply to @matrix_help "Win up to $1000": of all places, a discord server full of tech savvy people?
19:34:54FromDiscord<Ecorous> Anyone know how to make a single t
19:35:07FromDiscord<Ecorous> (edit) "t" => "line text input in nigui?"
19:40:05*wallabra_ joined #nim
19:42:09*wallabra quit (Ping timeout: 268 seconds)
19:42:10*wallabra_ is now known as wallabra
19:52:33*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:01:15*dnh joined #nim
20:09:32*pro quit (Quit: pro)
20:21:35FromDiscord<Elegantbeef> Purely C++ interop↵(@Takemichi Hanagaki)
20:22:28FromDiscord<Generic> and C++ exceptions
20:24:54FromDiscord<Generic> In reply to @Goel "What if i have": 1. if the order of the elements doesn't matter than it's probably better to use a HashSet instead of a seq
20:25:58FromDiscord<Generic> 2. sorted returns a sorted copy of an openArray
20:27:20FromDiscord<Generic> since it always does a copy, it should be avoided
20:32:54FromDiscord<Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4cnk
20:48:26FromDiscord<demotomohiro> @Require Support `addr(buffer)` seems common mistake. It should be `addr(buffer[0])`.
20:49:28FromDiscord<demotomohiro> And you can write `var buffer = newSeq[char](128000)`.
20:53:54*wallabra_ joined #nim
20:56:13*wallabra quit (Ping timeout: 268 seconds)
20:56:14*wallabra_ is now known as wallabra
20:57:22FromDiscord<Ecorous> In reply to @Ecorous "Anyone know how to": Worked this out, but I need to get the text from a ComboBox, how would I do that?
20:57:35FromDiscord<Ecorous> I've tried reading nigui source and can't work it out
20:57:43FromDiscord<demotomohiro> Adding a proc like `proc getContentAddr[T](s: seq[T]): ptr[T] = addr s[0]` to system module prevents people writing a code like `addr(buffer)`.
20:57:49FromDiscord<demotomohiro> ?
20:58:42FromDiscord<Ecorous> In reply to @Ecorous "Worked this out, but": I mean get the current option
20:59:21FromDiscord<Ecorous> because it's pretty useless without being able to do so
20:59:57FromDiscord<Ecorous> oh .index?
21:01:28FromDiscord<Ecorous> yeah
21:01:41FromDiscord<Ecorous> combobox.options[combobox.index]
21:02:57FromDiscord<ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/1027325042465460265/Screenshot_23.png
21:04:00FromDiscord<ShalokShalom> Those errors could really use links to documentation, examples and that like
21:05:15FromDiscord<Patitotective> well, its not that complicated, you just cant write variables without using or discarding them
21:14:59FromDiscord<ShalokShalom> I try to use it
21:15:02FromDiscord<ShalokShalom> Thats why I call it
21:15:36FromDiscord<ShalokShalom> The message shows me just, what to do.
21:15:43FromDiscord<ShalokShalom> (edit) "The message shows me just, what ... to" added "not"
21:15:49FromDiscord<ShalokShalom> Not, what I can do. 🙂
21:15:50FromDiscord<Require Support> In reply to @demotomohiro "And you can write": Thanks
21:40:03FromDiscord<huantian> In reply to @ShalokShalom "I try to use": well you can't just use it
21:40:26FromDiscord<huantian> sent a code paste, see https://play.nim-lang.org/#ix=4cnz
21:42:43FromDiscord<zgasma> What's the magic to regenerate `makefile`? I tried `niminst csource`, but it wants an `ini-file`. The only ini file in the tree is `compiler/installer.ini`, but then it beefs about no `compiler/installer.nim` file. I'm not sure what it wants.
22:00:46qwrits in csources git - https://github.com/nim-lang/csources_v1
22:01:43qwrand the comment at top says how to regenerate
22:02:11qwrtry with koch?
22:04:21qwrand i guess, that it might depend on being in right directory to work - but i'm not sure
22:10:05FromDiscord<zgasma> hmm...yeah, that doesn't seem like it has what I need. For more context, I'm experimenting with tweaking niminst to generate a mkfile for compiling on plan9. I've made what I _think_ are reasonable changes, but can't get niminst to actually run.
22:10:25FromDiscord<zgasma> The actual usage is different from the comment. It requires an ini file...which I don't seem to have.
22:10:43qwrlook at koch.nim at nim git root
22:11:07qwrthere is imho example of running the same thing with arguments if look for csource string
22:15:37qwrthough its using nim cc and not niminst
22:15:37FromDiscord<Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4cnY
22:17:16FromDiscord<Arathanis> (edit) "https://play.nim-lang.org/#ix=4cnY" => "https://play.nim-lang.org/#ix=4cnZ"
22:17:18FromDiscord<zgasma> Ah, well koch appears to be the magic. It's been running for a few minutes, now.
22:17:29FromDiscord<zgasma> I wrongly assumed it would behave the same way.
22:17:31FromDiscord<zgasma> Thanks!
22:32:08FromDiscord<huantian> In reply to @Arathanis "If I, for example,": I’d probably just pass in a valid value when testing, or make a debug flag that skips the fatal and assigns a debug value
22:51:31FromDiscord<Generic> or use a config file
22:56:39*dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:57:32FromDiscord<Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4co9
23:01:20FromDiscord<Patitotective> though i agree with using a configuration format ;]
23:02:48FromDiscord<Generic> I was specifically talking about Nim config files
23:14:20*arkurious quit (Quit: Leaving)
23:34:56*wallabra quit (Quit: ZNC 1.8.2 - https://znc.in)
23:35:13*wallabra joined #nim
23:54:49FromDiscord<Arathanis> In reply to @Patitotective "this way it will": This is an interesting approach!
23:55:00FromDiscord<Arathanis> In reply to @Generic "I was specifically talking": Can you elaborate on that?