00:10:38 | * | rockcavera quit (Remote host closed the connection) |
00:43:42 | termer | Elegantbeef Talking shit about me once again |
00:44:05 | termer | How do the likely/unlikely hints generate worse code |
00:44:16 | termer | when I use them, I know that those things are more or less likely |
00:48:12 | FromDiscord | <Elegantbeef> Hey I was mostly jesting about the throwing them in 😄 |
00:48:33 | FromDiscord | <Elegantbeef> But likely and unlikely need to be on the branch that is known to be slowed down by the predictor |
00:52:05 | FromDiscord | <Elegantbeef> So it might not actually slow down code and I might've been silly, but throwing likely around without benchmarking is just pollution! |
01:04:28 | * | Mister_Magister quit (Quit: bye) |
01:06:21 | * | Mister_Magister joined #nim |
01:10:54 | termer | You already know how much I like to overdecorate things |
01:10:57 | termer | I only care if it slows things down |
01:11:28 | termer | like I said on the forum, I don't trust compilers so I have to help them |
01:11:34 | termer | with my stunning knowledge |
01:51:00 | * | rockcavera joined #nim |
01:58:23 | FromDiscord | <zumi.dxy> how does tcc generate faster code than gcc? less libc overhead? |
01:59:36 | FromDiscord | <Elegantbeef> Faster compiler not faster runtime |
02:02:00 | FromDiscord | <zumi.dxy> ohhh↵right↵i got those mixed up |
02:07:32 | FromDiscord | <im__cynical> sent a code paste, see https://play.nim-lang.org/#pasty=RbzXUQThXIaJ |
02:09:29 | FromDiscord | <Elegantbeef> `sizeof(fRename) + sizeof(lpwStream)` seems like the cause to me |
02:30:50 | NimEventer | New question by b4ddev: How to fix this error : simple run error with the library faster_than_requests, see https://stackoverflow.com/questions/78058395/how-to-fix-this-error-simple-run-error-with-the-library-faster-than-requests |
03:16:25 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
03:16:49 | * | SchweinDeBurg joined #nim |
03:18:18 | * | def- quit (Quit: -) |
03:33:25 | FromDiscord | <ipumpbuh4> @room |
03:33:32 | FromDiscord | <ipumpbuh4> How can I get nim installed on proxmox |
03:35:09 | FromDiscord | <leorize> you can just use choosenim but proxmox is probably not the best environment to install nim on |
03:35:42 | FromDiscord | <ipumpbuh4> But I use proxmox on my server and I code on my server so I need it |
03:35:47 | FromDiscord | <ipumpbuh4> Whats choosenim |
03:37:19 | * | def- joined #nim |
03:48:22 | * | def- quit (Quit: -) |
03:49:19 | * | def- joined #nim |
04:02:55 | termer | choosenim is a program that installs nim |
04:40:39 | * | rockcavera quit (Remote host closed the connection) |
04:47:17 | FromDiscord | <im__cynical> how do I get hardware info |
04:47:31 | FromDiscord | <im__cynical> like the CPU name (i7, i3, i9, i5, whatever), ram amnt, etc |
04:47:33 | FromDiscord | <im__cynical> on windows |
04:53:13 | termer | Check out the winim project https://github.com/khchen/winim |
04:53:25 | termer | the info may also be available in the stdlib winlean module |
04:53:48 | termer | make sure you add `when defined(windows):` to make your windows code conditional, unless your program only runs on Windows to begin with |
04:55:48 | arkanoid | what are the right switches to statically compile libssl ? |
04:56:26 | arkanoid | I'm trying with dynlibOverride ssl but it complains "Error: undeclared identifier: 'newContext'" |
04:57:31 | arkanoid | it compiles with switch("d","ssl"), it doesnt with switch("dynlibOverride", "ssl"). If I enable both, it seems to ignore switch("dynlibOverride", "ssl") |
04:59:24 | FromDiscord | <␀ Array 🇵🇸 🍉> which distro are u using inside the vm/lxc? you can use your package manager to install nim. otherwise the choosenim script can be used on all distros |
05:04:39 | FromDiscord | <Elegantbeef> Arkanoid `nim c -r -d:ssl --dynlibOverride:"ssl" --passL:$(pkg-config --static --libs libssl) ./test.nim` works here |
05:05:05 | arkanoid | Elegantbeef, are you using std/net newContext in your test? |
05:05:11 | FromDiscord | <Elegantbeef> Yes |
05:05:35 | FromDiscord | <Elegantbeef> `import std/net; var a = newContext()` is my entire code |
05:06:30 | FromDiscord | <Elegantbeef> No one asked, but pkg-config is amazing 😄 |
05:06:49 | arkanoid | sure, it is |
05:09:39 | FromDiscord | <ipumpbuh4> I use proxmox |
05:10:17 | FromDiscord | <Elegantbeef> Though arkanoid I don't know if the above properly statically linked it |
05:10:50 | FromDiscord | <Elegantbeef> The procs are there but so is `dlopen` and `dlsym` |
05:11:10 | arkanoid | Elegantbeef, it's not: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory |
05:11:37 | arkanoid | I feel -ssl is not compatible with dynlibOverride |
05:11:40 | arkanoid | for some reason |
05:11:47 | FromDiscord | <Elegantbeef> It has to be |
05:12:01 | FromDiscord | <Elegantbeef> dynlib override is a compiler feature `ssl` is in userspace |
05:12:25 | FromDiscord | <Elegantbeef> The stdlib uses the dynlib pragma not std/dynlib |
05:13:35 | arkanoid | I've tried your compilation line, but I was using this config.nims originally https://termbin.com/fsqz |
05:14:19 | FromDiscord | <Elegantbeef> Got an easy way to test this? Don't know how aside from writing a program that uses seccomp 😄 |
05:15:19 | FromDiscord | <Elegantbeef> https://github.com/nim-lang/Nim/blob/version-2-0/lib/wrappers/openssl.nim#L283 yea there is even a static link check |
05:15:46 | FromDiscord | <Elegantbeef> Oh I was wrong they do use dynlib in this module |
05:16:31 | arkanoid | mmm I might have found a way |
05:16:36 | arkanoid | but it spits warnings |
05:18:20 | * | def- quit (Quit: -) |
05:18:32 | arkanoid | this one is truly static: https://termbin.com/m2if |
05:19:25 | * | def- joined #nim |
05:21:27 | FromDiscord | <Elegantbeef> Now just use pkg-config for style points 😛 |
05:21:32 | FromDiscord | <Elegantbeef> I joked cause apparently it does not remove duplicates |
05:21:48 | FromDiscord | <Elegantbeef> `pkg-config --static --libs libssl libcrypto` emits `-lssl -lcrypto -ldl -pthread -lcrypto -ldl -pthread` |
05:23:37 | arkanoid | what is missing with pkg-info is --static |
05:24:16 | arkanoid | nim wants --passL:"-static" but "pkg-config --static ..." strips it |
05:31:36 | * | def- quit (Quit: -) |
05:38:48 | arkanoid | I confirm that it does work |
05:39:04 | arkanoid | but I wonder why pkg-config is ignoring --static |
05:39:39 | FromDiscord | <Elegantbeef> I don't think it is |
05:40:03 | FromDiscord | <Elegantbeef> I just think it expects you to do `-static $(pkg-config --static --libs libssl libcrypto)` |
05:50:56 | * | def- joined #nim |
06:04:32 | * | azimut quit (Ping timeout: 255 seconds) |
07:10:28 | * | advesperacit joined #nim |
07:29:02 | * | junaid_ joined #nim |
07:58:00 | * | tc424 quit (Ping timeout: 260 seconds) |
08:22:26 | * | tc424 joined #nim |
08:33:40 | * | ntat joined #nim |
08:43:59 | * | tc424 quit (Ping timeout: 260 seconds) |
09:40:15 | * | jmdaemon quit (Ping timeout: 268 seconds) |
10:20:36 | * | ntat quit (Quit: Leaving) |
10:53:57 | * | tc424 joined #nim |
11:39:06 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=lOOAVUNWRxkS |
11:51:22 | FromDiscord | <demotomohiro> You probably need to use Windows APIs.↵So you need to read documents about it written by microsoft employees.↵You will find them by googling or duckduckgoing with an api function/constant/type name. |
11:53:10 | FromDiscord | <girvo> yeah, was just hoping there was something higher level than walking the root\cimv2 namespace via COM GetObject etc. calls -- there's a fair bit of Windows automation stuff I can see on Nimble, but nothing USB specific. Hoped I'd missed something |
11:53:36 | FromDiscord | <girvo> Probably just gonna cheat and run a 500ms timer to just scan some output of a command and use that instead for now |
12:33:19 | * | attah quit (Ping timeout: 255 seconds) |
12:34:07 | * | attah joined #nim |
12:35:27 | * | azimut joined #nim |
12:36:08 | * | xet7 quit (Ping timeout: 260 seconds) |
12:51:52 | * | attah_ joined #nim |
12:52:01 | * | attah quit (Ping timeout: 272 seconds) |
12:52:27 | * | attah_ is now known as attah |
13:06:14 | * | junaid_ quit (Remote host closed the connection) |
13:13:11 | * | junaid_ joined #nim |
13:19:12 | * | rockcavera joined #nim |
13:26:54 | FromDiscord | <maker_of_mischief> is there a library that lets me generate images with plain rgb and arrays like pillow in python? |
13:27:21 | FromDiscord | <maker_of_mischief> sent a code paste, see https://play.nim-lang.org/#pasty=GsvkrfyFIgFZ |
13:27:40 | FromDiscord | <maker_of_mischief> (edit) "https://play.nim-lang.org/#pasty=zzGNpRxeGPOL" => "https://play.nim-lang.org/#pasty=SsZgxaOaRCZk" |
13:28:15 | FromDiscord | <maker_of_mischief> (edit) "https://play.nim-lang.org/#pasty=lIRASeojxbcs" => "https://play.nim-lang.org/#pasty=aznrjGUTCagb" |
13:28:22 | FromDiscord | <maker_of_mischief> (edit) "is there a library that lets me generate images with plain rgb and ... arrays" added "2d" |
13:30:19 | FromDiscord | <maker_of_mischief> nvm i found a really good one, Angluca/tigr-nim |
13:30:56 | * | junaid_ quit (Remote host closed the connection) |
13:36:04 | FromDiscord | <odexine> does pixie not allow you to do this? |
14:22:48 | * | xet7 joined #nim |
14:25:54 | NimEventer | New thread by DMisener: Can ref variables reference non-ref variables?, see https://forum.nim-lang.org/t/11091 |
14:55:30 | * | emery_ joined #nim |
14:55:43 | * | ehmry quit (Read error: Connection reset by peer) |
15:00:23 | * | ntat joined #nim |
15:30:35 | * | emery_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
15:31:01 | * | ehmry joined #nim |
15:38:26 | * | rockcavera quit (Remote host closed the connection) |
16:46:18 | * | rockcavera joined #nim |
17:31:26 | * | rockcavera quit (Remote host closed the connection) |
17:44:22 | * | ntat quit (Quit: Leaving) |
17:47:10 | * | ntat joined #nim |
17:48:41 | * | jmdaemon joined #nim |
18:06:47 | * | SchweinD1 joined #nim |
18:11:19 | * | SchweinDeBurg quit (*.net *.split) |
18:50:11 | * | junaid_ joined #nim |
19:02:41 | FromDiscord | <Robyn [She/Her]> Wish I understood the code behind httpleast |
19:03:13 | FromDiscord | <Robyn [She/Her]> Kinda wanna see if I can use cps to implement a simple http server but I'm lost |
19:20:04 | FromDiscord | <leorize> i mean you can ask \:p |
19:24:31 | FromDiscord | <Robyn [She/Her]> I can! But I don't understand any of httpleast's code lmao |
19:24:51 | FromDiscord | <Robyn [She/Her]> I think I'm gonna try implementing a HTTP server using nim-sys and cps, and just see how it goes |
19:25:17 | FromDiscord | <leorize> for starters you can look at httpleast.nim and only that file |
19:25:28 | FromDiscord | <leorize> focus only on the stuff that said `leastQueue == "nim-sys"` |
19:26:05 | FromDiscord | <Robyn [She/Her]> Alright! |
19:29:03 | FromDiscord | <Robyn [She/Her]> Does httpleast only support posix OSes? |
19:30:00 | FromDiscord | <Robyn [She/Her]> And does posix include Windows?- |
19:30:24 | FromDiscord | <Robyn [She/Her]> It's in this weird state of being semi posix-compliant, I think? |
19:31:41 | FromDiscord | <griffith1deadly> nim-sys support windows as i knot |
19:31:46 | FromDiscord | <griffith1deadly> (edit) "knot" => "know" |
19:33:07 | FromDiscord | <leorize> httpleast only support posix when used in MT mode |
19:33:14 | FromDiscord | <leorize> the code to shard sockets isn't ported to windows yet |
19:35:36 | * | xutaxkamay_ joined #nim |
19:37:16 | * | xutaxkamay quit (Ping timeout: 246 seconds) |
19:37:16 | * | xutaxkamay_ is now known as xutaxkamay |
19:38:00 | * | ntat quit (Quit: Leaving) |
19:40:37 | FromDiscord | <Robyn [She/Her]> In reply to @leorize "httpleast only support posix": Ah, I think I understand? What posix specific code is it using though? |
19:40:59 | FromDiscord | <leorize> `fcntl` to duplicate sockets |
19:42:13 | FromDiscord | <Robyn [She/Her]> Ah okay |
20:23:46 | termer | Robyn If you want, I can show you my code that implements and HTTP server with CPS using leorize's nim-sys lib |
20:24:09 | termer | *implements an |
20:31:47 | FromDiscord | <Robyn [She/Her]> Ooh, perhaps! But I wanna try and figure it out myself, first |
20:44:56 | * | Guest70 joined #nim |
20:49:08 | * | Guest70 quit (Client Quit) |
21:06:40 | * | junaid_ quit (Remote host closed the connection) |
21:15:35 | termer | Look in the tests for sockets and you'll find some code you can reference for how to make a server with sys |
21:15:46 | termer | That's how I got started |
21:19:28 | FromDiscord | <Robyn [She/Her]> Thanks for the tip! |
21:30:07 | FromDiscord | <djazz> playing with closure callbacks, passing ref to C library. `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` thank you nim very helpful error |
21:30:32 | FromDiscord | <Elegantbeef> I feel like that's hard to improve on |
21:30:44 | FromDiscord | <djazz> probably because generic kind on type |
21:30:46 | FromDiscord | <Elegantbeef> As soon as you leave the confines of Nim it's down to the library 😄 |
21:30:51 | FromDiscord | <Robyn [She/Her]> Seems that the reference was freed before it was accessed, seems like a pretty useful error :P |
21:31:04 | FromDiscord | <Elegantbeef> Unless that's a compiler error |
21:31:04 | FromDiscord | <djazz> this is when compiling nim ,not runtime |
21:31:10 | FromDiscord | <djazz> (edit) "this is when compiling ... nim" added "with" |
21:31:22 | FromDiscord | <Robyn [She/Her]> Ah |
21:31:33 | FromDiscord | <Robyn [She/Her]> I'm lost then |
21:31:41 | FromDiscord | <djazz> i got further with GC_ref() |
21:31:55 | FromDiscord | <Elegantbeef> It's a nil ref error due to some funkyness |
21:32:10 | FromDiscord | <djazz> type: `Socket[kind: static[SocketType]] = object` |
21:32:10 | FromDiscord | <Elegantbeef> Compile with a debug compiler to figure out how to work around it |
21:32:36 | FromDiscord | <djazz> parent proc sig: `proc connect(self: ref Socket[SOCK_STREAM]; ipaddr: ptr IpAddrT; port: Port; callback: SocketConnectCb): bool =` |
21:32:48 | FromDiscord | <Elegantbeef> `SocketType`? |
21:33:01 | FromDiscord | <djazz> (edit) "ref Socket[SOCK_STREAM]; ipaddr: ptr IpAddrT;" => "SocketAny; host: string;" |
21:33:03 | FromDiscord | <Elegantbeef> Ah the one in std/net |
21:33:05 | FromDiscord | <djazz> an enum |
21:33:07 | FromDiscord | <djazz> no |
21:33:14 | FromDiscord | <djazz> this is custom |
21:33:25 | FromDiscord | <Elegantbeef> `SocketAny` is what `Socket`? |
21:33:36 | FromDiscord | <djazz> `SocketAny = ref Socket[SOCK_STREAM] | ref Socket[SOCK_DGRAM] | ref Socket[SOCK_RAW]` |
21:33:46 | FromDiscord | <Elegantbeef> Ugh |
21:33:57 | FromDiscord | <Elegantbeef> Are those the three instances of sockets? |
21:34:01 | FromDiscord | <Elegantbeef> Or are there more enums |
21:34:20 | FromDiscord | <djazz> SocketType is an enum |
21:34:34 | FromDiscord | <Elegantbeef> I know |
21:34:41 | FromDiscord | <djazz> sent a code paste, see https://play.nim-lang.org/#pasty=SCMJPekjHGcw |
21:34:50 | FromDiscord | <Elegantbeef> But do you only have 3 values for the enum? |
21:34:55 | FromDiscord | <djazz> yeah |
21:35:13 | FromDiscord | <Elegantbeef> well `ref Socket` is the same as that |
21:35:35 | FromDiscord | <Elegantbeef> Using generics without parameters is an implicit typeclass |
21:35:48 | NimEventer | New thread by arnetheduck: [arnetheduck] `nph` opinionated formatter v0.5, see https://forum.nim-lang.org/t/11093 |
21:37:32 | FromDiscord | <Elegantbeef> I do wonder how that typeclass is parsed it might be parsed as `ref (Socket[X] | ref (Socket[Y] or ref Socket[Z]))` |
21:38:09 | FromDiscord | <Elegantbeef> Whether that's causing the error is another thing 😄 |
21:40:13 | FromDiscord | <djazz> sent a code paste, see https://play.nim-lang.org/#pasty=hKUahyUupHsL |
21:40:26 | FromDiscord | <djazz> last line in that code |
21:41:14 | FromDiscord | <djazz> if i remove [kind] i still get nil |
21:41:26 | FromDiscord | <djazz> so i need SocketAny combined type |
21:41:28 | FromDiscord | <Elegantbeef> In that cause you probably want `ref distinct Socket` 😄 |
21:41:42 | FromDiscord | <Elegantbeef> Typeclasses are bound to the same symbol inside a proc without that `distinct` |
21:42:17 | FromDiscord | <Elegantbeef> Do you use that enum for anything else? |
21:42:26 | * | xet7 quit (Remote host closed the connection) |
21:42:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=ZNsbRJWTcieu |
21:43:00 | FromDiscord | <djazz> only as a allocator↵`proc newSocket(kind: static[SocketType]; ...): owned ref Socket[kind] =` |
21:43:25 | FromDiscord | <djazz> and callbacks for specific socket types |
21:43:37 | FromDiscord | <djazz> connect function for udp : `proc connect(self: ref Socket[SOCK_DGRAM]; ipaddr: IpAddrT; port: Port): bool =` |
21:43:55 | FromDiscord | <djazz> this worked great with var and without callbacks (: |
21:44:02 | FromDiscord | <Elegantbeef> Right that'd just be `ref Socket[UdpPcb]` 😄 |
21:44:18 | FromDiscord | <djazz> Right |
21:44:24 | FromDiscord | <Elegantbeef> Wait a minute callbacks are these generic callbacks that expect a socket type? |
21:44:39 | FromDiscord | <djazz> yeah |
21:44:47 | FromDiscord | <Elegantbeef> Are you just forgeting to take in a `[Kind: static SocketType]` inside your callbacks? |
21:44:54 | * | xet7 joined #nim |
21:46:10 | FromDiscord | <Elegantbeef> Atleast I assume the socket callback is presently `proc(_: ref Socket, ...): ...` |
21:46:32 | FromDiscord | <Elegantbeef> Whereas it needs to be `proc[Kind: static socketType(_: ref Socket[Kind], ...): ....` |
21:46:37 | FromDiscord | <djazz> this generic function has a inner closure that then calls a callback, depending on the kind |
21:46:54 | FromDiscord | <Elegantbeef> So it's type erased? |
21:46:59 | FromDiscord | <djazz> probably |
21:48:57 | FromDiscord | <Elegantbeef> How much code is there? |
21:49:09 | FromDiscord | <Elegantbeef> Would I be daft to ask to see the entire code? |
21:50:24 | FromDiscord | <djazz> in a moment |
21:54:26 | FromDiscord | <Robyn [She/Her]> sent a code paste, see https://play.nim-lang.org/#pasty=lnndWOuzhABM |
21:54:52 | FromDiscord | <djazz> In reply to @Elegantbeef "Would I be daft": here is a working closure callback, no generics <https://github.com/daniel-j/picostdlib/blob/feature-async-socket/src/picostdlib/net/dns.nim> |
21:55:04 | FromDiscord | <Robyn [She/Her]> By type, I mean a 'struct' when compiled to C code |
21:55:26 | FromDiscord | <Robyn [She/Her]> Nvm, got the answer |
21:56:19 | FromDiscord | <djazz> In reply to @Elegantbeef "Would I be daft": entire code, currently working because im forcing the type from a pointer https://github.com/daniel-j/picostdlib/blob/feature-async-socket/src/picostdlib/net/picosocket.nim |
21:56:38 | FromDiscord | <djazz> line 511 |
21:57:21 | FromDiscord | <djazz> I should try create a minimal example |
21:57:34 | FromDiscord | <djazz> not now its 11 pm heh |
22:02:18 | * | fallback quit (Read error: Connection reset by peer) |
22:12:34 | FromDiscord | <Elegantbeef> @Robyn [She/Her] Nim generics are monomorphic which means every usage generates an instance |
22:17:39 | FromDiscord | <Robyn [She/Her]> Thanks! |
22:29:43 | FromDiscord | <starkiller1493> how do I skip the mext iteration of a loop? in c you just do i++ |
22:29:48 | FromDiscord | <starkiller1493> (edit) "mext" => "next" |
22:30:05 | FromDiscord | <Elegantbeef> Use a while loop, or use a condition with continue |
22:31:13 | FromDiscord | <starkiller1493> In reply to @Elegantbeef "Use a while loop,": oh right, i can just use a while loop. i'm dumb. thanks |
22:31:34 | FromDiscord | <Elegantbeef> You can also use your own iterator using a hack |
22:32:24 | FromDiscord | <Elegantbeef> But we won't talk about that |
22:32:35 | FromDiscord | <starkiller1493> that would be an overkill anyway |
22:36:47 | FromDiscord | <djazz> Elegantbeef: updated code, now http request works again |
22:37:02 | FromDiscord | <djazz> still needing the deref and reref hack |
22:37:14 | FromDiscord | <djazz> would getting rid of generics solve it ? |
22:37:34 | FromDiscord | <Elegantbeef> Hard to say I havent compiled the code |
22:38:13 | FromDiscord | <djazz> seems like it still fails |
22:40:13 | FromDiscord | <Elegantbeef> Where is "getHostByName" defined? |
22:40:21 | FromDiscord | <djazz> dns.nim |
22:40:52 | FromDiscord | <djazz> in same dir as picosocket.nim |
22:41:13 | FromDiscord | <Elegantbeef> No it's not that one does not take a proc |
22:41:27 | * | fallback joined #nim |
22:41:33 | FromDiscord | <djazz> refresh? |
22:41:56 | FromDiscord | <djazz> i posted the link earlier before i pushed code |
22:44:54 | FromDiscord | <Elegantbeef> Possibly worth noting I don't think you need the `dnsGetHostByNameCb` |
22:45:09 | FromDiscord | <Elegantbeef> you should be able to do `callBack.rawProc` and `callBack.rawEnv` |
22:46:09 | FromDiscord | <Elegantbeef> If `getHostByName` is empty does the code still explode? |
22:47:08 | FromDiscord | <djazz> i saw some about rawProc/rawEnv but found no examples |
22:47:35 | FromDiscord | <Elegantbeef> `rawProc` should be `proc(..., env: pointer)` |
22:48:13 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/intern.html#code-generation-for-closures |
22:49:35 | FromDiscord | <Elegantbeef> As such it's interoperable with your code assuming you do `cstring, ptr IpAddrT, arg: pointer` |
22:49:55 | FromDiscord | <Elegantbeef> Though you can actually do `arg: DnsCbState` |
22:50:01 | FromDiscord | <Elegantbeef> Wait that's wrong |
22:50:31 | FromDiscord | <Elegantbeef> Anyway I don't see anything that stands out as explosively bad |
22:54:37 | FromDiscord | <djazz> hmm |
22:55:20 | FromDiscord | <djazz> atleast i got it running async now |
22:55:47 | FromDiscord | <djazz> the tls stuff still freezes everything, since its not actually multithreaded |
22:55:58 | FromDiscord | <djazz> its interrupt driven |
22:56:30 | FromDiscord | <djazz> so https makes it freeze on connect for 3 secs, then its smooth and led is blinking while doing the fetching |
22:56:45 | FromDiscord | <djazz> the blocking io bothered me haha |
22:57:44 | FromDiscord | <djazz> from pico sdk docs `async_context_threadsafe_background provides an implementation of async_context that handles asynchronous work in a low priority IRQ, and there is no need for the user to poll for work.` |
22:58:22 | FromDiscord | <djazz> the alternative is manual polling or using FreeRTOS |
23:00:45 | FromDiscord | <djazz> night |
23:13:09 | * | advesperacit quit () |
23:21:29 | * | rockcavera joined #nim |
23:54:00 | FromDiscord | <girvo> I’m working on some FreeRTOS specific bindings and a nicer Nim API around them @djazz — you might find it useful. I’m implementing a replacement for Channel with FreeRTOS’s primitives so that I can do a channel recv with a timeout |