00:26:29 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:28:53 | FromDiscord | <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:51 | FromDiscord | <Rika> Replace “docs” with the version number in the url |
01:54:56 | FromDiscord | <Rika> https://nim-lang.org/1.0.6/strutils.html |
02:36:47 | FromDiscord | <! 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:03 | FromDiscord | <huantian> isn't vercel a web framework? |
02:39:08 | FromDiscord | <huantian> (edit) "isn't vercel a ... web" added "frontend" |
02:39:33 | FromDiscord | <huantian> uhhh nvm |
02:40:45 | FromDiscord | <huantian> well I clearly no nothing but I feel the answer is no? |
02:40:57 | FromDiscord | <Elegantbeef> know nothing\ |
02:41:15 | FromDiscord | <Elegantbeef> Too easy of a joke |
02:42:30 | FromDiscord | <Rika> Vercel I assume is only for JavaScript server side |
02:42:57 | FromDiscord | <Rika> Nim does have server side JavaScript “support” but not jester |
04:50:02 | NimEventer | New Nimble package! cssgrid - pure Nim CSS Grid layout engine, see https://github.com/elcritch/cssgrid |
05:15:27 | FromDiscord | <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:23 | FromDiscord | <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:37 | FromDiscord | <Elegantbeef> `all` |
06:17:02 | FromDiscord | <Girvo> Well that makes sense lol |
06:17:04 | FromDiscord | <Girvo> Cheers |
06:17:38 | FromDiscord | <Elegantbeef> My minor async knowledge helps! |
06:24:16 | FromDiscord | <Girvo> Where does `all` live in the docs? Not in `asyncdispatch` from what I can see, is it lower level than that? |
06:24:28 | FromDiscord | <Girvo> It works on an `openArray` of `Future`? |
06:24:36 | FromDiscord | <Girvo> `Future[T]` rather? |
06:25:29 | FromDiscord | <Elegantbeef> `varargs[Future[T]]` |
06:25:38 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/asyncfutures.html#all%2Cvarargs%5BFuture%5BT%5D%5D |
06:25:54 | FromDiscord | <Girvo> Perfect |
06:29:26 | FromDiscord | <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:08 | FromDiscord | <untoreh> does httpclient in stdlib leak fds? |
07:33:41 | FromDiscord | <Elegantbeef> It shouldnt if you close the clients |
07:36:42 | * | dnh joined #nim |
07:39:46 | FromDiscord | <ChocolettePalette> What's fds? |
07:39:47 | FromDiscord | <Elegantbeef> Filedescritprs i assume 😄 |
07:40:07 | FromDiscord | <Rika> Yes, if you spelled that right |
07:40:14 | FromDiscord | <ChocolettePalette> Ahh okay, I'm glad it doesn't |
07:40:15 | FromDiscord | <Rika> Descriptor by the way |
07:40:39 | FromDiscord | <Elegantbeef> Descriaptors you say? |
07:41:42 | FromDiscord | <Rika> Lol |
07:48:05 | * | m5zs7k quit (Ping timeout: 252 seconds) |
07:53:11 | * | m5zs7k joined #nim |
08:05:22 | FromDiscord | <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:14 | FromDiscord | <Elegantbeef> With the effect system it could be done but it'd be very very fun |
08:06:20 | FromDiscord | <Girvo> Yeahhhh haha |
08:06:35 | FromDiscord | <Girvo> I started sketching it out but man it seems like it'd go wayyy too deep for me to tackle 😛 |
08:07:09 | FromDiscord | <Elegantbeef> You'd basically need to have compiler support to say "any procedure marked with the 'unusedEffect |
08:07:17 | FromDiscord | <Girvo> Yeah |
08:07:27 | FromDiscord | <Girvo> Man it would be nice though. One can dream |
08:07:43 | FromDiscord | <Elegantbeef> Similar thing could be done for unsafe |
08:08:04 | FromDiscord | <Elegantbeef> Especially now that we have `forbid` effects |
08:08:37 | FromDiscord | <Girvo> Oh yeah, thats a good point |
08:09:28 | FromDiscord | <Elegantbeef> Effect systems are cool, just only to maniacs |
08:09:40 | FromDiscord | <Girvo> Good thing I'm nuts then 😄 |
08:10:15 | FromDiscord | <Elegantbeef> Yea i personally havent actually used effects aside from `raises` |
08:10:54 | FromDiscord | <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:02 | FromDiscord | <Girvo> Just haven't had time to dig into it yet sadly |
08:12:36 | FromDiscord | <Elegantbeef> Yea tags seem like something nice for more professional code than i write 😛 |
08:12:51 | FromDiscord | <Rika> Effects are cool |
08:13:48 | FromDiscord | <Girvo> @Rika You got any example code up on GitHub et al. with using them? |
08:14:02 | FromDiscord | <Rika> ;; I just said they cool |
08:14:06 | FromDiscord | <Girvo> haha |
08:14:06 | FromDiscord | <Rika> No I don’t lol |
08:14:08 | FromDiscord | <Girvo> damn all good |
08:14:11 | FromDiscord | <Girvo> I'm the same 😛 |
08:14:14 | FromDiscord | <Rika> It’s been a while since I’ve programmed in Nim |
08:14:18 | FromDiscord | <Girvo> I think they're super neat, but never used 'em in anger |
08:14:26 | FromDiscord | <Girvo> Whatcha developing in these days? |
08:14:31 | FromDiscord | <Rika> Elixir |
08:14:34 | FromDiscord | <Rika> Trying to at least |
08:14:42 | FromDiscord | <Girvo> Elixir is pretty nice |
08:14:50 | FromDiscord | <Girvo> The erlang runtime/vm is fantastic |
08:15:12 | FromDiscord | <Rika> I hear it is |
08:16:34 | FromDiscord | <Elegantbeef> Hmm using tags might be nice for my render api if i ever use multithreading 😄 |
08:17:18 | FromDiscord | <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:13 | FromDiscord | <srozb> sent a code paste, see https://play.nim-lang.org/#ix=4ck3 |
10:13:01 | FromDiscord | <ChocolettePalette> What's signer[].not\_before? |
10:21:49 | FromDiscord | <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:25 | FromDiscord | <untoreh> In reply to @untoreh "does httpclient in stdlib": it leaks when using proxies |
11:33:09 | FromDiscord | <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:11 | FromDiscord | <untoreh> yes I do close them, I tested with and without proxies, with proxies it seems to leak |
11:53:29 | FromDiscord | <untoreh> also it seems to consistently crash when the process surpasses 1k fd, but `ulimit -n` is much higher |
12:02:45 | FromDiscord | <Horizon [She/Her]> What's a simple library for making an android app with Nim? |
12:11:18 | FromDiscord | <n-1x> sent a code paste, see https://play.nim-lang.org/#ix=4ckE |
12:12:15 | FromDiscord | <n-1x> (edit) "https://play.nim-lang.org/#ix=4ckE" => "https://play.nim-lang.org/#ix=4ckG" |
12:19:58 | FromDiscord | <Horizon [She/Her]> Anyone know of up-to-date ndk bindings? |
12:23:52 | * | arkurious joined #nim |
12:26:34 | FromDiscord | <wiga> hum, help https://media.discordapp.net/attachments/371759389889003532/1027195091330277427/unknown.png |
12:26:45 | FromDiscord | <wiga> i cant even compile any codes anymore |
12:27:32 | FromDiscord | <Horizon [She/Her]> Is gcc installed? |
12:28:23 | FromDiscord | <wiga> yes |
12:28:28 | FromDiscord | <wiga> it was working fine yesterday |
12:28:45 | FromDiscord | <Yardanico> In reply to @wiga "hum, help": it should show the actual c compiler error above or below |
12:29:23 | FromDiscord | <wiga> wtf https://media.discordapp.net/attachments/371759389889003532/1027195798498312263/unknown.png |
12:31:18 | FromDiscord | <n-1x> I have seen that error before when you have the program running and you try to rerun it |
12:31:42 | FromDiscord | <n-1x> make sure to close the open program, then try nim r again |
12:31:46 | FromDiscord | <Yardanico> yes, n-1x is right |
12:31:59 | FromDiscord | <Yardanico> on windows it's like that, you can't modify the binary's file if it's running |
12:32:39 | FromDiscord | <wiga> it is not running bruh |
12:34:50 | FromDiscord | <n-1x> Try logging out and back in |
12:34:53 | FromDiscord | <n-1x> should close everything |
12:42:10 | FromDiscord | <albassort> doing stuff in python |
12:42:11 | FromDiscord | <albassort> i hate this |
12:42:30 | FromDiscord | <wiga> it worked ty |
13:15:09 | * | gsalazar joined #nim |
13:26:18 | FromDiscord | <! 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:07 | FromDiscord | <Phil> How did I read the value of a defined flag again? E.g. "--defined:5" I want to get the 5 |
16:14:11 | NimEventer | New thread by miran: This Month with Nim: September 2022, see https://forum.nim-lang.org/t/9507 |
16:14:36 | NimEventer | New Nimble package! authenticode - PE Authenticode parser based on libyara implementation, see ssh://[email protected]/srozb/authenticode |
16:16:47 | FromDiscord | <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:10 | FromDiscord | <Phil> Like, is there something like `--define:Bla:5` where I can fetch "Bla" and the associated value "5" ? |
16:18:52 | FromDiscord | <Yardanico> In reply to @Isofruit "Like, is there something": yes |
16:19:03 | FromDiscord | <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:46 | FromDiscord | <Phil> Is there such a thing is "stringdefine"? |
16:23:54 | FromDiscord | <Phil> To hand over a filepath? |
16:24:45 | FromDiscord | <Phil> I'm an idiot |
16:24:47 | FromDiscord | <Phil> nevermind |
16:24:50 | FromDiscord | <Phil> I literally can not read |
17:21:02 | FromDiscord | <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:31 | FromDiscord | <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:46 | strogon14 | Can 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:10 | strogon14 | (well, I can, but is it safe?) |
18:14:36 | FromDiscord | <RattleyCooper> Maybe a weird question but any clipboard libraries that are pure nim? I can’t seem to find any |
18:16:32 | FromDiscord | <RattleyCooper> I’m only worried about windows |
18:25:10 | FromDiscord | <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:27 | FromDiscord | <Generic> if the C++ code uses std::string_view then it would work |
19:17:53 | FromDiscord | <Generic> though it's the same problem you have with multiple C++ libraries with their own string implementation |
19:18:47 | FromDiscord | <Goel> sent a code paste, see https://play.nim-lang.org/#ix=4cmZ |
19:18:57 | * | jmdaemon joined #nim |
19:19:38 | FromDiscord | <Goel> (edit) "https://play.nim-lang.org/#ix=4cmZ" => "https://play.nim-lang.org/#ix=4cn0" |
19:20:20 | FromDiscord | <Takemichi Hanagaki> What is the advantage of compile Nim wih C++ backend instead C backend? |
19:21:31 | FromDiscord | <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:39 | FromDiscord | <matrix_help> sent a long message, see https://paste.rs/ZN6 |
19:32:44 | FromDiscord | <Tekk> In reply to @matrix_help "Win up to $1000": of all places, a discord server full of tech savvy people? |
19:34:54 | FromDiscord | <Ecorous> Anyone know how to make a single t |
19:35:07 | FromDiscord | <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:35 | FromDiscord | <Elegantbeef> Purely C++ interop↵(@Takemichi Hanagaki) |
20:22:28 | FromDiscord | <Generic> and C++ exceptions |
20:24:54 | FromDiscord | <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:58 | FromDiscord | <Generic> 2. sorted returns a sorted copy of an openArray |
20:27:20 | FromDiscord | <Generic> since it always does a copy, it should be avoided |
20:32:54 | FromDiscord | <Require Support> sent a code paste, see https://play.nim-lang.org/#ix=4cnk |
20:48:26 | FromDiscord | <demotomohiro> @Require Support `addr(buffer)` seems common mistake. It should be `addr(buffer[0])`. |
20:49:28 | FromDiscord | <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:22 | FromDiscord | <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:35 | FromDiscord | <Ecorous> I've tried reading nigui source and can't work it out |
20:57:43 | FromDiscord | <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:49 | FromDiscord | <demotomohiro> ? |
20:58:42 | FromDiscord | <Ecorous> In reply to @Ecorous "Worked this out, but": I mean get the current option |
20:59:21 | FromDiscord | <Ecorous> because it's pretty useless without being able to do so |
20:59:57 | FromDiscord | <Ecorous> oh .index? |
21:01:28 | FromDiscord | <Ecorous> yeah |
21:01:41 | FromDiscord | <Ecorous> combobox.options[combobox.index] |
21:02:57 | FromDiscord | <ShalokShalom> https://media.discordapp.net/attachments/371759389889003532/1027325042465460265/Screenshot_23.png |
21:04:00 | FromDiscord | <ShalokShalom> Those errors could really use links to documentation, examples and that like |
21:05:15 | FromDiscord | <Patitotective> well, its not that complicated, you just cant write variables without using or discarding them |
21:14:59 | FromDiscord | <ShalokShalom> I try to use it |
21:15:02 | FromDiscord | <ShalokShalom> Thats why I call it |
21:15:36 | FromDiscord | <ShalokShalom> The message shows me just, what to do. |
21:15:43 | FromDiscord | <ShalokShalom> (edit) "The message shows me just, what ... to" added "not" |
21:15:49 | FromDiscord | <ShalokShalom> Not, what I can do. 🙂 |
21:15:50 | FromDiscord | <Require Support> In reply to @demotomohiro "And you can write": Thanks |
21:40:03 | FromDiscord | <huantian> In reply to @ShalokShalom "I try to use": well you can't just use it |
21:40:26 | FromDiscord | <huantian> sent a code paste, see https://play.nim-lang.org/#ix=4cnz |
21:42:43 | FromDiscord | <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:46 | qwr | its in csources git - https://github.com/nim-lang/csources_v1 |
22:01:43 | qwr | and the comment at top says how to regenerate |
22:02:11 | qwr | try with koch? |
22:04:21 | qwr | and i guess, that it might depend on being in right directory to work - but i'm not sure |
22:10:05 | FromDiscord | <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:25 | FromDiscord | <zgasma> The actual usage is different from the comment. It requires an ini file...which I don't seem to have. |
22:10:43 | qwr | look at koch.nim at nim git root |
22:11:07 | qwr | there is imho example of running the same thing with arguments if look for csource string |
22:15:37 | qwr | though its using nim cc and not niminst |
22:15:37 | FromDiscord | <Arathanis> sent a code paste, see https://play.nim-lang.org/#ix=4cnY |
22:17:16 | FromDiscord | <Arathanis> (edit) "https://play.nim-lang.org/#ix=4cnY" => "https://play.nim-lang.org/#ix=4cnZ" |
22:17:18 | FromDiscord | <zgasma> Ah, well koch appears to be the magic. It's been running for a few minutes, now. |
22:17:29 | FromDiscord | <zgasma> I wrongly assumed it would behave the same way. |
22:17:31 | FromDiscord | <zgasma> Thanks! |
22:32:08 | FromDiscord | <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:31 | FromDiscord | <Generic> or use a config file |
22:56:39 | * | dnh quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:57:32 | FromDiscord | <Patitotective> sent a code paste, see https://play.nim-lang.org/#ix=4co9 |
23:01:20 | FromDiscord | <Patitotective> though i agree with using a configuration format ;] |
23:02:48 | FromDiscord | <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:49 | FromDiscord | <Arathanis> In reply to @Patitotective "this way it will": This is an interesting approach! |
23:55:00 | FromDiscord | <Arathanis> In reply to @Generic "I was specifically talking": Can you elaborate on that? |