00:24:20 | * | azimut_ quit (Ping timeout: 255 seconds) |
01:03:48 | FromDiscord | <jos> i just made a few changes and got an internal compiler error i think |
01:03:56 | FromDiscord | <jos> sent a code paste, see https://paste.rs/SmN |
01:04:20 | FromDiscord | <jos> not sure what caused it but is this generally a problem with nim? |
01:07:12 | FromDiscord | <Elegantbeef> Sometimes compiler errors happen |
01:07:20 | FromDiscord | <Elegantbeef> Compiling your project directly might help find where the issue is |
01:07:58 | FromDiscord | <jos> how do i do that? |
01:08:31 | FromDiscord | <Elegantbeef> `nim c myProject.nim` |
01:08:50 | FromDiscord | <Elegantbeef> Have you been developing your project using nimble to run it for you |
01:08:54 | FromDiscord | <Elegantbeef> You poor poor soul |
01:09:00 | FromDiscord | <jos> ya |
01:09:01 | FromDiscord | <jos> why is that bad |
01:09:16 | FromDiscord | <Elegantbeef> Nimble is quite slow to actually get to the nim compiler |
01:09:36 | FromDiscord | <jos> i get the same error 😦 |
01:09:43 | FromDiscord | <Elegantbeef> Of course |
01:09:46 | FromDiscord | <jos> i can't figure out how to get more info |
01:09:48 | FromDiscord | <jos> o |
01:09:51 | FromDiscord | <Elegantbeef> But now you should know what file |
01:09:53 | FromDiscord | <jos> well i don't see a verbose flag |
01:10:14 | FromDiscord | <jos> sent a code paste, see https://play.nim-lang.org/#ix=4krW |
01:10:15 | FromDiscord | <jos> it's the same error |
01:10:21 | FromDiscord | <Elegantbeef> `--processing: filenames` |
01:10:22 | FromDiscord | <Elegantbeef> Sorry forgot default is `dots` |
01:10:44 | FromDiscord | <jos> oh interesting |
01:11:55 | FromDiscord | <Elegantbeef> That should tell you the file that's the cause |
01:12:10 | FromDiscord | <Elegantbeef> and we see `t.destructor != nil` which means something in that module is not getting a destructor |
01:15:32 | FromDiscord | <jos> i think |
01:15:33 | FromDiscord | <jos> it's this |
01:15:43 | FromDiscord | <jos> sent a code paste, see https://play.nim-lang.org/#ix=4krY |
01:15:49 | FromDiscord | <jos> the bare typedesc-- |
01:16:11 | FromDiscord | <Elegantbeef> Yep there you go typedesc cannot exist in a object |
01:16:15 | FromDiscord | <Elegantbeef> Typedescs are parameters only |
01:16:18 | FromDiscord | <jos> i figured i coulk do that as like.. an opaque pointer to any typedesc[T] |
01:16:23 | FromDiscord | <jos> and hte ncast it later |
01:16:26 | FromDiscord | <jos> (edit) "hte ncast" => "then cast" |
01:16:29 | FromDiscord | <Elegantbeef> Typedesc do not exist at runtime |
01:16:39 | FromDiscord | <jos> i just want some metadata from it |
01:16:46 | FromDiscord | <jos> like an opaque ID or something |
01:16:59 | FromDiscord | <Elegantbeef> They dont exist at runtime so you can want in one hand and shit in another, one will be filled first |
01:17:00 | FromDiscord | <jos> can i use like an int32 and get an id from a typedesc at build time? |
01:17:04 | FromDiscord | <Elegantbeef> You might want to use `typeInfo` |
01:17:04 | FromDiscord | <jos> is what i'm saying |
01:17:19 | FromDiscord | <Elegantbeef> Nope not that i know of |
01:17:42 | FromDiscord | <Elegantbeef> Nim doesnt have any mechanism to statically query the type information afaik |
01:18:05 | FromDiscord | <Elegantbeef> You can only do it at runtime with an instance using the typeinfo module or https://nim-lang.org/docs/system.html#getTypeInfo%2CT |
01:18:23 | FromDiscord | <jos> hmm that seems surprising to me |
01:18:43 | FromDiscord | <jos> like i mean i could use a macro, and then i'd at least have the name |
01:18:54 | FromDiscord | <jos> but if there's collisions between different imports etc stuff like that, it wouldn't work |
01:18:55 | FromDiscord | <Elegantbeef> Well with macros you generally dont need RTTI |
01:19:00 | FromDiscord | <Elegantbeef> Most things can be done statically |
01:19:17 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/macros.html#signatureHash%2CNimNode exists |
01:19:22 | FromDiscord | <Elegantbeef> That removes the collision |
01:19:30 | FromDiscord | <jos> oh wow |
01:19:36 | FromDiscord | <jos> so that's actually an id for the symbol in the symbol table? |
01:19:50 | FromDiscord | <jos> how do aliases work |
01:20:00 | FromDiscord | <Elegantbeef> It'd have it's own symbol |
01:20:09 | FromDiscord | <Elegantbeef> You'd have to skip it before calling signatureHash |
01:20:26 | FromDiscord | <Elegantbeef> `getType` and `getTypeKind` with `getTypeImpl` and friends |
01:20:30 | FromDiscord | <jos> is there a way to know if a type is just an alias |
01:20:34 | FromDiscord | <jos> like its the same declaration i guess |
01:20:58 | FromDiscord | <jos> how does the compiler know the difference between an alias and just another "type" declaration |
01:21:00 | FromDiscord | <Elegantbeef> Yes like i said |
01:21:07 | FromDiscord | <Elegantbeef> you do `getType` then check the `typeKind` |
01:21:18 | FromDiscord | <jos> ohhh i see |
01:21:21 | FromDiscord | <Elegantbeef> `ntyAlias` is a type |
01:21:31 | FromDiscord | <jos> but like the keyword type i mean |
01:21:37 | FromDiscord | <jos> like when does something get tagged as an alias? |
01:21:45 | FromDiscord | <jos> it's the same keyword, like there's no "alias" keyword it's just "type" |
01:22:09 | FromDiscord | <Elegantbeef> It gets tagged as an alias when the right side is a type |
01:22:16 | FromDiscord | <Elegantbeef> If the right side isnt a type it's not an alias |
01:22:43 | FromDiscord | <jos> what about like if it specializes a generic param? |
01:22:53 | FromDiscord | <jos> sorry this is all actually relevant to what i'm trying to do i swear |
01:22:55 | FromDiscord | <jos> lol |
01:23:14 | FromDiscord | <jos> is type Component = GenericComponent[Entity] an alias |
01:23:16 | FromDiscord | <Elegantbeef> What do you mean? |
01:23:23 | FromDiscord | <Elegantbeef> `type A[T] = T` is an alias |
01:23:40 | FromDiscord | <Elegantbeef> `type A[T] = anything that's not a declaration` |
01:23:42 | FromDiscord | <Elegantbeef> Is an alias |
01:23:46 | FromDiscord | <Elegantbeef> It's a very simple thing |
01:23:58 | FromDiscord | <jos> noo i just mean |
01:23:59 | FromDiscord | <Elegantbeef> If the right side is not `object `ref object` `distinct\` it's an alias |
01:24:06 | FromDiscord | <Elegantbeef> Fuuuuck 😄 |
01:24:20 | FromDiscord | <jos> the example i gave before though feels different somehow |
01:24:26 | FromDiscord | <jos> type Component = GenericComponent[Entity] |
01:24:32 | FromDiscord | <Elegantbeef> It's not any different |
01:24:38 | FromDiscord | <jos> like GenericComponent[Entity] is kind of like an expression no |
01:24:42 | FromDiscord | <Elegantbeef> The right side is a type not a declaration |
01:24:48 | FromDiscord | <Elegantbeef> It's an alias |
01:24:55 | FromDiscord | <jos> ok |
01:24:59 | FromDiscord | <jos> yea that makes sense |
01:25:01 | FromDiscord | <jos> thanks |
01:25:21 | FromDiscord | <Elegantbeef> It literally doesnt matter if the right side is an expression since you can even have templates/macros on the right side and they expand 😛 |
01:26:01 | FromDiscord | <jos> nim is pretty cool |
01:28:03 | FromDiscord | <jos> this actually explains one of the things i disliked about nim when i first started using it |
01:28:05 | FromDiscord | <jos> i think |
01:28:28 | FromDiscord | <jos> like sometimes i would call functions and it seemed like i would pass types as generics sometimes, and as parameters other times |
01:28:43 | FromDiscord | <jos> i guess the ones that took types as params were templates or macros |
01:28:54 | FromDiscord | <Elegantbeef> Even procs can take types as params |
01:29:11 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4krZ |
01:29:17 | FromDiscord | <jos> can tempaltes or macros take symbols from generic args? |
01:29:43 | FromDiscord | <Elegantbeef> Limitedly |
01:29:58 | FromDiscord | <Elegantbeef> templtaes/macros cannot technically be generic |
01:30:59 | FromDiscord | <jos> can u at least get like an ID from them |
01:31:07 | FromDiscord | <jos> so a nimnode would be good enough |
01:31:52 | FromDiscord | <Elegantbeef> Like i said the closes you can do is use the signature hash |
01:34:20 | FromDiscord | <jos> ok i get it-- so i should be able to just yoink it out of the invocation inside the AST in a macro |
01:34:50 | FromDiscord | <Elegantbeef> Yep you can make a macro that takes a type and returns the signaturehash |
01:34:55 | FromDiscord | <jos> wait how much of the AST does a macro have access to? |
01:35:03 | FromDiscord | <jos> like can i walk back up it all the way to the root .nim file? |
01:35:11 | FromDiscord | <Elegantbeef> nope |
01:35:24 | FromDiscord | <Elegantbeef> It only has access to the tree you give it |
01:35:31 | FromDiscord | <Elegantbeef> You cannot query module symbols or iterate them |
01:36:08 | FromDiscord | <jos> nim is wild bro |
02:16:26 | * | LuxuryMode joined #nim |
02:52:29 | FromDiscord | <Leastrio> sent a code paste, see https://play.nim-lang.org/#ix=4ksa |
02:53:50 | FromDiscord | <Leastrio> sent a code paste, see https://play.nim-lang.org/#ix=4ksb |
02:54:02 | FromDiscord | <Leastrio> https://media.discordapp.net/attachments/371759389889003532/1060753080817307689/code.nim |
02:54:07 | FromDiscord | <Leastrio> This is my code so far |
02:59:46 | FromDiscord | <demotomohiro> I guess you need to use cstring type. |
03:04:47 | FromDiscord | <Leastrio> Like i should return a cstring from that function or what? |
03:05:21 | FromDiscord | <Leastrio> Ah i got it |
03:05:34 | FromDiscord | <Leastrio> using \`$` function was what i shouldve used |
03:05:36 | FromDiscord | <Leastrio> not repr |
03:20:29 | FromDiscord | <scruz> does anyone know if a Nim library that's equivalent to BeautifuSoup4 for Python? |
03:20:34 | FromDiscord | <scruz> (edit) "if" => "of" |
03:20:42 | FromDiscord | <scruz> (edit) "BeautifuSoup4" => "BeautifulSoup4" |
03:21:01 | FromDiscord | <scruz> https://www.crummy.com/software/BeautifulSoup/bs4/doc/ |
03:24:10 | FromDiscord | <scruz> Nvm found it: https://github.com/GULPF/nimquery |
03:35:00 | FromDiscord | <jos> any idea why |
03:35:01 | FromDiscord | <jos> this |
03:35:01 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1060763394505965648/image.png |
03:35:07 | FromDiscord | <jos> this is the signaturehash thing from before |
03:35:26 | FromDiscord | <jos> the node is an nnkIdent |
03:35:41 | FromDiscord | <Rika> i assume it has to be typed |
03:36:22 | FromDiscord | <jos> wdym |
03:36:41 | FromDiscord | <Rika> i: typed |
03:37:37 | FromDiscord | <jos> oh that makes sense |
03:37:40 | FromDiscord | <jos> how does that work anyway |
03:38:06 | FromDiscord | <jos> it retains all the type info? idk |
03:38:12 | FromDiscord | <jos> why would u ever want one or the other |
04:05:31 | FromDiscord | <Rika> In reply to @jos "it retains all the": Variables within a body contain their type so even if they’re not specified in the code then it’s no problem to get the type (an example) |
04:05:50 | FromDiscord | <Rika> (edit) "code then" => "code," |
04:20:41 | * | arkurious quit (Quit: Leaving) |
04:43:02 | FromDiscord | <ElegantBeef> `untyped` gets non semantically checked ast so it's straight from the parser |
04:43:16 | FromDiscord | <ElegantBeef> `typed` gets semantically checked so it's parsed and checked for soundness and has to be valid Nim code |
04:44:29 | FromDiscord | <ElegantBeef> @jos |
05:16:21 | FromDiscord | <jos> ty |
05:16:22 | FromDiscord | <jos> https://media.discordapp.net/attachments/371759389889003532/1060788900412543026/image.png |
05:16:29 | FromDiscord | <jos> this works fine with the default gc |
05:16:34 | FromDiscord | <jos> when i specify gc:orc i get an error |
05:16:45 | FromDiscord | <jos> `Error: expression cannot be cast to RootRef=ref RootObj` |
05:17:05 | FromDiscord | <jos> on the line `let z = cast[Test](y)` |
05:17:09 | FromDiscord | <jos> any ideas 😦 |
05:18:20 | FromDiscord | <Rika> Cast is an unsafe operation, so weird behaviours like this is what I’d assume to be normal |
05:20:30 | FromDiscord | <jos> why is cast unsafe? |
05:20:55 | FromDiscord | <jos> i mean this should be a valid cast |
05:21:05 | FromDiscord | <jos> sure you can make invalid casts by just doing stupid stuff, but this is just a normal upcast |
05:22:55 | FromDiscord | <amadan> sent a code paste, see https://play.nim-lang.org/#ix=4ksp |
05:24:32 | FromDiscord | <Rika> In reply to @jos "why is cast unsafe?": All casts are unsafe |
05:24:37 | FromDiscord | <jos> oh ok |
05:24:43 | FromDiscord | <jos> i didn't know you needed to inherit rootref for that |
05:26:03 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
05:37:22 | * | jvinet quit (Ping timeout: 272 seconds) |
05:39:04 | * | jvinet joined #nim |
05:44:02 | FromDiscord | <Bung> you can cast from derived type to parent type |
05:44:28 | FromDiscord | <Bung> not the reverse way. |
05:51:23 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#statements-and-expressions-type-casts↵Nim manual says casts are inherently unsafe.↵You should avoid using it if possible. |
05:51:48 | FromDiscord | <m4ul3r> how would i replicate a C sockaddr struct in nim? |
05:52:35 | FromDiscord | <m4ul3r> nvm, probably a dumb question because i can just import it from the header |
05:53:41 | FromDiscord | <m4ul3r> (edit) "header" => "header↵edit: looks like it’s in std/posix 🙃" |
06:11:05 | * | ltriant quit (Ping timeout: 268 seconds) |
06:28:53 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4ksA |
06:37:11 | FromDiscord | <ElegantBeef> `echo sockAddr.sa_data`? |
06:37:25 | FromDiscord | <ElegantBeef> Also you can do `'\0'` and `'\210'` 😄 |
06:39:11 | FromDiscord | <m4ul3r> that’s much cleaner than char()↵i can print the values, but why doesn’t it display from the actual struct? |
06:41:29 | FromDiscord | <ElegantBeef> how about `echo sockAddr[]`? |
06:42:22 | FromDiscord | <m4ul3r> that works, i was trying it without [] |
06:42:35 | FromDiscord | <m4ul3r> i need [] because it is an object? |
06:42:49 | FromDiscord | <ElegantBeef> Cause it's a ref |
06:43:17 | FromDiscord | <ElegantBeef> Did you mean `SockAddr()` instead of `new(...)` |
06:45:18 | FromDiscord | <m4ul3r> i probably need that instead of a reference, thanks! |
06:47:28 | * | rockcavera quit (Remote host closed the connection) |
07:48:17 | * | PMunch joined #nim |
07:51:35 | * | pro joined #nim |
08:10:06 | FromDiscord | <Leastrio> sent a code paste, see https://play.nim-lang.org/#ix=4ksU |
08:38:32 | * | jjido joined #nim |
08:38:44 | * | pro quit (Quit: pro) |
08:49:34 | * | kenran joined #nim |
08:52:16 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
09:17:01 | * | azimut joined #nim |
09:19:31 | * | ltriant joined #nim |
10:13:16 | * | kenran quit (Remote host closed the connection) |
10:35:35 | * | pro joined #nim |
10:47:26 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4ktm |
10:49:19 | FromDiscord | <m4ul3r> make sure to compiled with ssl too |
10:55:56 | * | jmdaemon quit (Ping timeout: 272 seconds) |
11:05:53 | * | pro quit (Quit: pro) |
11:20:25 | * | PMunch quit (Ping timeout: 252 seconds) |
11:35:27 | * | oddish quit (Quit: nyaa~) |
12:32:51 | * | PMunch joined #nim |
13:19:04 | * | pro joined #nim |
13:20:15 | * | pro quit (Client Quit) |
14:19:10 | * | pro joined #nim |
14:19:13 | FromDiscord | <Leastrio> In reply to @m4ul3r "in newContext, try setting": doesnt that just disable ssl checking overall though ? |
14:20:24 | * | pro quit (Client Quit) |
14:22:46 | FromDiscord | <chri> hi how can i view emitted c from godbolt? |
14:23:08 | FromDiscord | <chri> i have no nim compiler locally but i need to see how nim generates stack trace |
14:43:19 | * | jjido joined #nim |
14:52:58 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
15:00:46 | * | PMunch quit (Quit: Leaving) |
15:05:17 | FromDiscord | <Gumbercules> In reply to @chri "hi how can i": I don't think you can? |
15:13:58 | FromDiscord | <choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4kuy |
15:21:05 | * | byanka_ joined #nim |
15:23:12 | * | byanka quit (Ping timeout: 272 seconds) |
15:37:24 | FromDiscord | <iffy (Matt Haggard)> What am I not understanding that forbids defining `=destroy` on a ref object (only objects work)? |
15:53:39 | * | arkurious joined #nim |
16:02:28 | * | jmdaemon joined #nim |
16:15:53 | * | jmdaemon quit (Ping timeout: 260 seconds) |
16:20:43 | FromDiscord | <Nimion #ඞ> Does nim put strings on the stack or heap? |
16:22:47 | FromDiscord | <Phil> Heap iirc |
16:25:42 | * | jmdaemon joined #nim |
16:36:42 | * | rockcavera joined #nim |
16:59:49 | * | jmdaemon quit (Ping timeout: 268 seconds) |
17:02:51 | * | systemdsucks quit (Remote host closed the connection) |
17:05:57 | * | systemdsucks joined #nim |
17:11:34 | FromDiscord | <Gumbercules> Nim's mascot should be an imp wearing a crown I've decided |
17:12:04 | FromDiscord | <qb> sent a code paste, see https://play.nim-lang.org/#ix=4kuZ |
17:12:06 | FromDiscord | <Gumbercules> And I like nimion above all other stupid names people have come up with for Nim developers |
17:12:24 | FromDiscord | <Gumbercules> In reply to @qb "I'm trying to wrap": You don't do that |
17:12:51 | FromDiscord | <Gumbercules> You passC -I include_dir |
17:13:12 | FromDiscord | <Gumbercules> Or use the header pragma alongside your importc pragma |
17:15:03 | * | pro joined #nim |
17:15:45 | * | pro quit (Client Quit) |
17:24:46 | FromDiscord | <m4ul3r> In reply to @Leastrio "doesnt that just disable": i’m not sure, i was away from a machine and briefly looked at the docs. ↵Where you able to solve the issue? |
17:47:21 | * | jjido joined #nim |
17:52:56 | FromDiscord | <jmgomez> sent a code paste, see https://play.nim-lang.org/#ix=4kv7 |
17:54:35 | FromDiscord | <Leastrio> In reply to @m4ul3r "i’m not sure, i": well i tried your solution already and it had worked, but by the name of the arg its not exactly what i want |
18:03:40 | * | PMunch joined #nim |
18:20:44 | FromDiscord | <m4ul3r> In reply to @Leastrio "well i tried your": yeah, it probably isn’t since it’s not checking integrity with server. wish i could be of more help |
18:21:13 | FromDiscord | <jmgomez> In reply to @jmgomez "Im manually compiling some": nvm, was an UE thing where it puts all the cpps in one big file "to speed up compilation" |
18:48:15 | FromDiscord | <Leastrio> In reply to @m4ul3r "yeah, it probably isn’t": its fine ! i appreciate you trying |
18:53:03 | * | pro joined #nim |
19:03:43 | * | leastrio joined #nim |
19:07:13 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
19:26:34 | Zevv | PMunch: FOSDEM this year? |
19:28:25 | * | pro left #nim (#nim) |
19:32:09 | PMunch | Zevv, I was really planning on it. But my mother turns 60 and has invited the whole family here that exact weekend.. |
19:32:12 | PMunch | So not entirely sure |
19:32:39 | PMunch | I was actually about to ask you the same just before I realised |
19:32:49 | Zevv | ah well, family things. |
19:32:52 | Zevv | I'll be attending, yes |
19:33:08 | Zevv | I hated the last time I went though |
19:33:18 | Zevv | standing in line and not getting into a room kind of sucks |
19:35:18 | Zevv | I did like the beers and I do like brussels, so I might end up drinking beers in Brussels, mostly |
19:36:01 | Zevv | well, looking forward to see you again, in case you still end up going there! |
19:36:41 | PMunch | Haha, I was actually thinking about just going the weekend after for the beer and Brussels part of it |
19:37:02 | PMunch | But yeah, if you go to popular talks and can't get in it kind of sucks.. |
19:37:41 | PMunch | I've had some fun discussions at the booths though |
19:37:49 | PMunch | And with other attendees of course |
19:39:12 | Zevv | Yeah, we'll see how it goes this year. Other reason I'm going is to meet up with Disruptek. We decided we need so proper physical fighting to properly sort things out between us. |
19:41:14 | PMunch | Haha :P |
19:41:27 | PMunch | Some things are just easier to settle in person |
19:42:08 | Zevv | we've had some interesting projects over the last few weeks, so lots to talk about |
19:42:30 | Zevv | i kind-of got back to nim, it seems |
19:43:08 | PMunch | Oooh, interesting Nim projects? Do tell! |
19:44:47 | Zevv | well, variation on the old theme actually; I had this little forum discussion with Araq some time ago about nim 2.0 not needing atomic RCs because it allows moving of memory. I think we maybe talked about this already? |
19:45:19 | Zevv | Anyway, as a proof of concept I have been building some kidn of actor system on nim; it's a bit like goroutines or elixir processes. |
19:45:29 | Zevv | You can spawn a million 'processes' on a handful of threads |
19:45:59 | Zevv | it handles both IO- and CPU-heavy work |
19:46:21 | Zevv | allows for non-blocking I/O, golang-like |
19:47:03 | Zevv | disruptek is also making something related to that, but our projects are different enough that we decided to go our own way. Both rely heavily on CPS of course. |
19:47:52 | Zevv | The moving of memory allows us to run continuations on arbitrary threads, and my particular implementation has tight integration with erlang-like mailboxes to make it a real 'actor' system. |
19:48:23 | Zevv | but it has been *hell* to get this to work reliably. ARC is not at all helpful, and going ORC is a solid way to get blood on the walls. |
19:48:55 | Zevv | I feel Nim is not quite ready to do this tricky kind of stuff; every time I don't look there's some other nimDecRef() popping up and throwing some data race |
19:49:54 | Zevv | so the idea is to put the complexity for that in the actor system and hide it from the user of the lib; on top of that it should be possible to write happy threading apps without the usual threading headaches. |
19:50:28 | PMunch | Oh yeah, I was a part of that forum post |
19:50:32 | PMunch | Or thread rather |
19:50:57 | Zevv | Indeed; that was kind of what started this little project. |
19:51:44 | PMunch | Oh wow, that system sounds really cool though! |
19:51:50 | PMunch | Exactly what I've been wanting |
19:52:39 | PMunch | Have you gotten around the issues of non-atomic moves though? |
19:54:09 | Zevv | well, it's finicky and fragile. The problem is that Nim can not make proper guarentees for moves |
19:54:32 | Zevv | If you want something taht is safe to move, you can have only one ref to the thing |
19:54:43 | Zevv | and if the thing has refs to other things, these should be the only refs |
19:55:02 | Zevv | That can be enforced with `isolated`, but that's a huge PITA to work with |
19:55:40 | Zevv | so I take the middle ground; I assume the programmer knows what they are doing, and will take care that what is being moved is isolated |
19:56:00 | Zevv | there is a simple recursive check on isolation, at run time, by checking the RC of the thing and the things it refs |
19:56:09 | Zevv | if RC > 0, I just bail out with an exception |
19:56:15 | Zevv | if it's the only ref, the move is safe. |
19:56:27 | FromDiscord | <nixfreak> does nim script not work with stdin? |
19:57:03 | Zevv | Then the move itself is still kind of complicated because of the RC itself; you have to take proper care to make sure sender and receiver do not touch the refs RC at the wrong time |
19:57:57 | Zevv | on Orc, memory is basically not movable because the refs are bound to thread locals; things go boom |
20:03:35 | PMunch | Right, that doesn't sound fun.. |
20:03:53 | PMunch | So wait, you can't have any ORC memory at all? Or are you just not able to move cycles? |
20:04:12 | Zevv | not at all. On orc, what has been allocated by thread A can not be freed by thread B. |
20:04:41 | Zevv | well, disruptek seems to have a kind of workaround, but I'm not sure how that scales |
20:05:33 | Zevv | The end goal of this all is to hide all the gory details below the surface. At the app level I write code that does not have to care about any of this. |
20:05:55 | Zevv | There are a few primitives: spawn a new process, sending stuff and receiving stuff using pattern matching. That's it. |
20:07:11 | Zevv | During my nim hiatus I spent some time doing go and elixir; once you go threading actors, you never want to go back to locks and semaphores and wait conditions; let alone mixing threads and I/O, which is a pain in itself. |
20:11:15 | PMunch | I know! I've been wanting something like this in Nim ever since I found it |
20:11:39 | Zevv | Same here. One of the reasons I left nim behind 2 years ago. |
20:11:48 | Zevv | Nim simply has no good threading story. |
20:13:09 | PMunch | Is isolated a Nim primitive? |
20:13:14 | Zevv | stdlib |
20:13:26 | Zevv | it's basically just a wrapper with `=copy` throwing .error. |
20:13:35 | PMunch | Right, but it's just implemented using "normal" logic, there's nothing magic |
20:13:39 | PMunch | Ah, right |
20:14:01 | Zevv | the problem is, you need to put something in isolated from the moment you construct it |
20:14:24 | PMunch | Well I guess you could copy something into an isolated construct |
20:14:47 | Zevv | what if it has two refs and you isolate it |
20:15:07 | Zevv | or what if it refs something else that is reffed by someone else as well |
20:15:23 | Zevv | the promise isolated makes is that the thing it wraps is isolated, including everything that's reffed by it |
20:15:26 | Zevv | the whole tree |
20:15:47 | Zevv | there is `unsafeISolate[T]()`, which just puts in in there but doesn't check or complain if it isn't |
20:15:54 | Zevv | things go boom |
20:16:22 | Zevv | so I made this little thing that verifies if something is really isolated, by walking the tree and peeking at the RC in memory in front of the objectt |
20:16:34 | Zevv | that works, kind of, sometimes |
20:16:47 | PMunch | Haha, why does it only work sometimes? |
20:17:30 | Zevv | so, these procs are built on CPS, so we have basically only one type of data structure to move around, which is the continuation. As long as the actors lib is the only thing handling these continuations, we can take care to keep the isolation promise and move things over threads |
20:18:00 | Zevv | but the language is not helping; there is no infrastructure to enforce or check the isolatedness. |
20:18:16 | Zevv | So we rely heavily on valgrind, asan and tsan and a hundred tests. |
20:18:25 | PMunch | Hmm, that's not a great situation to be in |
20:18:58 | Zevv | it's not. but it's the best I can do at this time. I was afraid I just did not understand how to do it, but from the forum thread with araq I think I *do* understand, and this is just the state things are in. |
20:19:00 | PMunch | Any plans to push for getting Nim better at this? |
20:19:22 | Zevv | That is one of the reasons to meet at FOSDEM with disruptek |
20:19:30 | PMunch | Yeah that's the same feeling I got in that thread |
20:19:38 | Zevv | We know the solution. |
20:19:49 | Zevv | We have that working, but it's not what people want to hear. |
20:19:54 | Zevv | Make Nim RCs atomic. |
20:19:58 | PMunch | Atomic RCs? |
20:20:01 | PMunch | Yeah.. |
20:20:04 | Zevv | Yeah.. |
20:20:25 | PMunch | Is that really the only way? |
20:20:26 | Zevv | Or go full ponylang, which is not going to make anyone happy |
20:20:36 | PMunch | Haha, what does ponylang do? |
20:21:03 | Zevv | They have more than a handful of different ref types with different semantics, and rules about how to convert between those. |
20:21:39 | Zevv | But honestly, I think there are two ways: Atomic RCs, or copy. |
20:22:05 | PMunch | Hmm, not great |
20:22:08 | Zevv | elixir/erlang have it easy, everything there is immutable. So everyting is safe to send wherever, no one can ever mutate so there will be no data races |
20:22:48 | Zevv | so, in my actors there are two types of things being moved: the continutions, and the messages/signals that processes send around |
20:23:14 | Zevv | I contain the CPS handling to the actors lib; while still fragile, I have control over that part and the user never touches it. So ocne that's safe and stable, ti should be good to go |
20:23:38 | Zevv | The messages come from user land though; that "works" now with moving, as long as the user sticks to the rules. |
20:24:04 | Zevv | If you try to send something that's not isolated, it's caught at run time and we raise. |
20:25:19 | PMunch | That's still pretty good |
20:25:36 | PMunch | Why doesn't it always work to scan the objects RCs by the way? |
20:25:38 | Zevv | We kind of considered doing a flash talk of something at fosdem, but not sure if that will happen. |
20:25:50 | PMunch | A flash talk? |
20:25:52 | * | azimut quit (Quit: ZNC - https://znc.in) |
20:25:59 | Zevv | whatsitcalled. This 15-minutes quicky |
20:26:03 | * | azimut_ joined #nim |
20:26:06 | PMunch | Ah, lightning talk |
20:26:08 | Zevv | that one |
20:26:24 | Zevv | yeah, the problem with walking the tree is inherited types |
20:26:32 | PMunch | I thought this was some kind of flash mob variant where you just walked innocuously through a crowd and then suddenly got up on a table and held a talk |
20:26:35 | Zevv | If I have ref object A of B |
20:26:46 | Zevv | and convert it back to an A before sending - a common operation |
20:26:56 | Zevv | the runtime check does not know it should inspect it as a B |
20:27:30 | PMunch | Aah I see |
20:27:38 | Zevv | `fieldPairs()` doesn't know |
20:27:39 | Zevv | can't know |
20:27:57 | PMunch | But can't you inspect the type on compile-time and figure out what it inherits from? |
20:28:43 | Zevv | It might, but I'll have to look into that again. |
20:29:02 | Zevv | The current implementation is pretty trivial: 740970 |
20:29:06 | Zevv | https://github.com/zevv/actors/blob/master/actors/isisolated.nim#L64-L70 |
20:35:37 | Zevv | anyhow, I got angry with nim and github CI so stopped working on all this two weeks ago. If I find the courage I'll pick it up again one of these days. If you feel couragous and patient, feel free to ping me if you feel like giving this a spin to see what it is about. |
20:35:56 | Zevv | Lot of design decisions are still open, so any input is valuable and appreciated. |
20:37:39 | PMunch | I'd definitely want to check it out |
20:41:22 | Zevv | I'll start writing some docs I guess |
21:04:21 | * | krux02 joined #nim |
21:05:42 | krux02 | Zevv, how did you become angry at Nim? |
21:06:15 | Zevv | well, tired mostly |
21:06:22 | Zevv | trying to mix refs and threads |
21:06:39 | Zevv | which was kind of the point of the excercise |
21:07:17 | Zevv | I have always been unhappy with the threading story in nim: share nothing, or ptr |
21:07:21 | Zevv | I can also use C for that |
21:07:39 | Zevv | so I was happy with the stuff happening over the last year; arc, shared heap and all |
21:07:42 | krux02 | well, Nim has a lot to offer over C |
21:07:58 | Zevv | yeah, sure, I know. But I don't want to fall back to ptrs when I want to thread. |
21:08:04 | Zevv | it's just a hassle |
21:08:12 | Zevv | and there were nice promises in nim 2.0 |
21:08:18 | ixmpp | wow, actual people |
21:08:22 | ixmpp | hi |
21:08:29 | Zevv | one of the ideas behind arc and all was of course the fact that stuff should be movable |
21:08:34 | Zevv | that was always the promise of arc |
21:08:40 | Zevv | but moving is *hard* |
21:08:49 | Zevv | arc does not help, it's actually in the way |
21:09:07 | FromDiscord | <djazz> PMunch: Hej! Did you see my Futhark PR? 🙂 |
21:09:09 | krux02 | but to be fair, a good threading model with allocators, memory pool, may even optional garbage collection is still an open/unsolved problem. |
21:09:24 | Zevv | i know, i know |
21:09:36 | Zevv | so what I'm trying to do now is making the best of it |
21:09:39 | krux02 | The think is, it is hard to do research on this, because it requires to build an entirely new language for every experiment. |
21:09:41 | Zevv | see how far I can get with the current model |
21:09:58 | krux02 | and then build actual software, not toy programs, in these languages |
21:10:03 | Zevv | well, I feel ponylang knows how to do it. but ponylang is no fun. |
21:10:18 | Zevv | it's just too hard. |
21:10:43 | Zevv | So what I have now; the 'goroutines' and channels but with an erlang process semantics |
21:10:47 | Zevv | makes me kind of happy |
21:10:57 | Zevv | I'm at the point where I can actually start building stuff on top of thos |
21:10:58 | Zevv | this |
21:11:04 | krux02 | well, the way I see pony is, a nice playground for many new ideas, but nothing I actually want to use for software development. Great to have it, but I don't want to use it. |
21:11:05 | PMunch | @djazz, yes I did! |
21:11:15 | Zevv | krux02: exaclty |
21:11:20 | PMunch | I'm going to try it out tomorrow and merge it if everything works fine |
21:11:39 | FromDiscord | <djazz> Nice, let me know if you need anything changed |
21:11:45 | ixmpp | this is the most messages i've ever seen from people that aren't inside the discord bridge |
21:11:55 | Zevv | and honestly, after decades of suffering, doing hefty threading with go or elixir really opened my eyes |
21:12:00 | FromDiscord | <djazz> maybe removing the futhark.nims i added, it doesnt do anything |
21:12:53 | krux02 | well, go (I don't know elixir enough to say anything) is actually a really good language. |
21:13:01 | ixmpp | Zevv: what kind of language are you aiming for nim's use as? |
21:13:16 | PMunch | @djazz, yeah I was going to ask about that :P |
21:13:19 | krux02 | Unfortunately, a guy whose name shall not be said really hates go. |
21:13:33 | PMunch | ixmpp, all the old guard have decided to show up it appears |
21:13:41 | Zevv | krux02: golang is hard to hate, and hard to love. I adore the stdlib and runtime, but the lamguage is meh |
21:13:45 | ixmpp | nice :) |
21:13:56 | PMunch | Zevv, ditto |
21:13:58 | krux02 | lamguage? |
21:14:02 | Zevv | ixmpp: Well, for the language, I aim at Nim - it's still unique in how frictionless it is to write in this language |
21:14:22 | Zevv | But I'm looking for a runtime that will let me do threading without all the pain and suffering and blood |
21:14:49 | Zevv | I have decided 20 years ago that I am simply not smart enough to handle mutexes and semaphores and all that shit |
21:14:53 | krux02 | well, I see threading in Nim still as an unsolved thing. |
21:14:54 | Zevv | I just can not do it. |
21:14:58 | PMunch | Nim: "There's little friction, just a bit of suffering and blood" - Zevv |
21:15:14 | ixmpp | :D |
21:15:25 | Zevv | krux02: I know, right. But that is really a shame. This is 2022. I have 12 ARM cores in my 5 year old phne |
21:15:32 | Zevv | oh wait it's 2023 |
21:15:39 | krux02 | :P |
21:15:46 | PMunch | I like the fact that it's even possible to do things like this in Nim without really messing around with the compiler |
21:15:48 | Zevv | mixing async and threading is another total hell |
21:15:52 | krux02 | btw, nice to see IRC is still very active |
21:15:59 | ixmpp | exactly |
21:16:17 | PMunch | Still quite a bit fewer of us here now than there used to be though |
21:16:23 | krux02 | but by now I have discord open anyway, because so many things require discord now. |
21:16:45 | Zevv | So this I "solved" in my thing as well; I can handle both CPU load and block IO |
21:16:49 | PMunch | I installed a script in my IRC client which hides the FromDiscord stuff and just replaces it with the name of the user. Makes it look like everyone is on IRC |
21:16:51 | krux02 | one of them is midjourney |
21:16:55 | ixmpp | honestly i've been thinking of nim as more of a scripting lang anyway, but even for that it's incredible |
21:17:12 | krux02 | PMunch, that is nice |
21:17:15 | ixmpp | PMunch: been meaning to do that |
21:17:24 | PMunch | It's fascinating how many people think of Nim like that, it's one of the things I could never really get used to using Nim for |
21:17:36 | krux02 | but on irc I don't have access to all the channels, and people posting code on discord is ugly |
21:17:47 | Zevv | I never come to #nim anymore :( |
21:17:56 | Zevv | well, it's open in a tab and bips when someone types 'npeg' or 'zevv' |
21:17:58 | Zevv | that's about it |
21:18:01 | krux02 | but you are now an #nim? |
21:18:03 | Zevv | I just wanted to talk to PMunch :) |
21:18:06 | ixmpp | well, i'm no python fan, honestly, and nim is a pretty nice dropin for python |
21:18:09 | krux02 | btw I am also rarely on #nim |
21:18:15 | krux02 | happy new year btw |
21:18:19 | Zevv | same same |
21:18:35 | Zevv | Since the dropout some folks moved to another channel, that's where I mostly reside these days |
21:18:39 | ixmpp | (long live irc) |
21:18:41 | FromDiscord | <djazz> PMunch: can I remap return types from wrapped function? e.g. from cint to an enum I defined |
21:18:48 | FromDiscord | <djazz> in futhark |
21:18:53 | krux02 | Zevv, what dropout? |
21:19:03 | FromDiscord | <djazz> only saw retyping of object fields |
21:19:18 | Zevv | krux02: when disruptek got kicked out, I also left |
21:19:38 | krux02 | yea, I also got banned |
21:19:45 | Zevv | really, wow |
21:19:46 | Zevv | didn't know |
21:19:48 | krux02 | I am banned to this day on Nim github |
21:19:57 | krux02 | can't open issues |
21:20:02 | Zevv | nice. |
21:20:15 | Zevv | disruptek and me are doing FOSDEM in feb |
21:20:32 | krux02 | cool, where will you be? |
21:20:41 | Zevv | as in, lodgings? |
21:20:56 | Zevv | well, not sure if we are allowd in the nim room anyway |
21:20:57 | PMunch | @djazz, sure |
21:21:00 | krux02 | doing FOSDEM sounds like you will have a presentation |
21:21:12 | Zevv | nah, just attending :) |
21:21:18 | krux02 | ok |
21:21:22 | ixmpp | what exactly happened? |
21:21:23 | ixmpp | drama..? |
21:21:31 | Zevv | oh, stuff, in the past |
21:21:31 | PMunch | Zevv, there is no Nim room this year :( |
21:21:34 | Zevv | ikr |
21:21:39 | ixmpp | im reasonably new to nim |
21:21:50 | krux02 | I dared to criticise the guy whose name shall not be said (don't wake sleeping dragons) |
21:21:52 | PMunch | And as long as I'm helping with the organization you'll always be welcome |
21:22:18 | krux02 | nice to hear |
21:22:33 | Zevv | absolutely :) |
21:22:39 | FromDiscord | <djazz> PMunch: how? using renameCallback? |
21:23:13 | PMunch | Well you could just write the proc definition yourself before calling Futhark |
21:23:32 | FromDiscord | <djazz> but before you dont have the other types defined by futhark |
21:23:39 | PMunch | Ah right.. |
21:23:51 | PMunch | Then I guess you're back to using renameCallback |
21:25:27 | Zevv | krux02: are you at fosdem as well? |
21:25:34 | PMunch | Or just define a template afterwards |
21:25:40 | * | rockcavera quit (Remote host closed the connection) |
21:26:03 | krux02 | Zevv, I didn't plan to go, but technically speaking, it isn't too much effort for me to actually go there. |
21:26:09 | Zevv | we can all sit at a table on the other side of the room and stare |
21:26:14 | Zevv | at the other guys |
21:26:34 | krux02 | nice, I just don't know how you guys look like. |
21:26:41 | Zevv | krux02: yeah, for me it's also no problem. I got a two way 1st class train ride for 80 euros. |
21:27:06 | Zevv | we met at '20, briefly, i think |
21:27:12 | krux02 | If I am there, I am the super tall guy with long hair. |
21:27:17 | Zevv | dreads, right |
21:27:21 | krux02 | no |
21:27:24 | Zevv | oh. other guy :) |
21:27:26 | krux02 | just long hair |
21:27:32 | Zevv | same here :) |
21:27:51 | krux02 | but I was at fosdem twice already |
21:28:15 | Zevv | yeah, I know. I went there only in '20, and actually didnt like it that much because of the crowd |
21:28:18 | Zevv | but will try again |
21:28:39 | krux02 | I think it was 2020 before the pandemic and 2019? Maybe? I don't know |
21:29:03 | krux02 | I was a bit shocked when I was at fosdem. |
21:29:19 | Zevv | how so |
21:31:28 | krux02 | I was (neutral) surprised that there were so many gender unidentified (probably trans people). But that was totally fine to me I was just not expecting it. What actually shocked me was, that there were attendies actually smelling like they don't know what a shower is. |
21:32:00 | krux02 | certainly not a majority, but some |
21:32:15 | ixmpp | that sounds exactly like what i'd expect tbh |
21:32:19 | Zevv | oh definately. smelling hackers galore |
21:32:21 | ixmpp | on both counts |
21:32:37 | Zevv | i've attended these hacker camps in .nl for yeras |
21:32:41 | Zevv | same kind of people. |
21:32:44 | Zevv | you learn to cope with it |
21:33:07 | Zevv | it fits the venue. |
21:33:28 | Zevv | That campus is also crumbly, old, smelly, humid and decaying |
21:33:40 | krux02 | well, it is free |
21:33:45 | krux02 | you get what you pay for? |
21:33:46 | PMunch | It's not *that* bad |
21:33:47 | Zevv | :) |
21:33:57 | krux02 | honestly, I had no problem with the campus. |
21:33:59 | Zevv | I'm not complaining. Just stating facts. (opiions?) |
21:34:09 | Zevv | Oh, I had no problems. You should see my house. |
21:35:31 | krux02 | I wouldn't have a problem if fosdem is held at literal ruins, as long as they get their presentations etc. It's not like I have to live or study there. |
21:35:35 | FromDiscord | <Gumbercules> isn't every software conference full of sweaty nerds that don't shower? |
21:36:04 | krux02 | I don't know, I am not at that many software conferences. |
21:36:09 | FromDiscord | <Gumbercules> well especially open source ones |
21:36:20 | FromDiscord | <Gumbercules> commercial / enterprise ones I imagine much less so |
21:36:23 | Zevv | well, the more professional conferences tend to invite better grooming and personal hygiene |
21:36:26 | FromDiscord | <Elegantbeef> I dont know why the nerdy collective decided to now shower or wear deodorant but alas |
21:36:51 | FromDiscord | <Elegantbeef> It seems like any congregation of nerdy individuals is |
21:36:51 | Zevv | I otoh; I spent a long evening with Eric S Raymond some years ago. |
21:36:54 | krux02 | I was at gamescom a lot, and for gamers there exists the prejudice, but I didn't experience smelly people there. They were all pretty cool people (and much younger than me) |
21:36:56 | FromDiscord | <Elegantbeef> It's a meme for software, anime, and any other convention |
21:37:01 | Zevv | He was also distinct |
21:37:17 | FromDiscord | <Gumbercules> every hobby shop I walk into that lets people play DND / Warhammer / Whatever table top or card game |
21:37:22 | FromDiscord | <Gumbercules> smells like an armpit |
21:37:39 | ixmpp | krux02: the gamers you see are the ones that do, the ones you don't see... |
21:37:47 | krux02 | but I am not into DND/Warhammer/Tabletop |
21:37:55 | PMunch | My girlfriend is reading this chat and just proposed we all turn up in tweed coats and top hats to shift the tide |
21:38:02 | krux02 | I play board games, and PC games. |
21:38:06 | ixmpp | also the ones at cons are probably trying to get laid |
21:38:23 | FromDiscord | <Gumbercules> esp the furry cons |
21:38:23 | krux02 | tweed coats? |
21:38:24 | Zevv | PMunch: I'll wear my fedora instead |
21:38:26 | ixmpp | hey i do have a top hat |
21:38:46 | ixmpp | or, some kind of hat |
21:38:50 | FromDiscord | <Elegantbeef> Pmunch the real thing to do is bring a portable shower, towels, and deoderant |
21:39:13 | FromDiscord | <Elegantbeef> "We'll pay you to take a shower" |
21:39:18 | krux02 | and a portable washing mashine and dryer |
21:39:21 | Zevv | anyhow, nice to talk to you ppl again, I'm off to make some Zzzs |
21:39:35 | PMunch | Free and open source shower |
21:39:39 | krux02 | good n8 |
21:39:40 | FromDiscord | <ambient> or... just disguise a shipping container as a game room and when they enter, ship them to another country |
21:39:48 | PMunch | ZZzzzevv |
21:39:52 | PMunch | Good niht |
21:39:58 | FromDiscord | <Phil> In reply to @Gumbercules "commercial / enterprise ones": Given what I experienced at "We are Developers" conf in 2019, I'd say a solid "so so" |
21:40:23 | FromDiscord | <Phil> wavy hand motions |
21:40:33 | krux02 | @ambient: but the gamers aren't the smelly people. I was at gamescom, no problem there. |
21:40:38 | ixmpp | and then there was discord |
21:41:19 | PMunch | Discord has smell now as well? |
21:41:31 | FromDiscord | <Elegantbeef> Always has |
21:42:02 | krux02 | discord is Tencent |
21:42:03 | FromDiscord | <michaelb.eth> Using `#version-2-0` installed via choosenim, if I have `NIMBLE_DIR` set in my shell environment, `nim c` is unable to correctly locate installed packages in `${NIMBLE_DIR}/pkgs2/`. In my shell, if I `unset NIMBLE_DIR` then `nim c` works correctly.↵↵With previous versions of nim/nimble, `nim c` finds the packages in `${NIMBLE_DIR}/pkgs/` no problem. |
21:42:13 | krux02 | Tencent smells to the roof. |
21:42:34 | FromDiscord | <michaelb.eth> In reply to @PMunch "Discord has smell now": scratch 'n sniff |
21:42:35 | FromDiscord | <Elegantbeef> discord isnt tencent |
21:42:43 | PMunch | What? |
21:42:56 | PMunch | Isn't tencent a Chinese games company? |
21:43:08 | FromDiscord | <Phil> Unrelated Sidenote: Webcord as an alternative client works pretty well |
21:43:08 | krux02 | @Elegantbeef: discord is tencent |
21:43:08 | FromDiscord | <Elegantbeef> No clue about the nimble issue |
21:43:08 | FromDiscord | <Elegantbeef> Yes tencent owns a shit load of western media |
21:43:13 | FromDiscord | <Elegantbeef> They've given funding to discord but do not own it |
21:44:09 | FromDiscord | <Elegantbeef> I still dislike discord to be fair 😛 |
21:44:41 | krux02 | but to be fair, IRC isn't particularly amazing either. |
21:44:44 | ixmpp | so what exactly were nim team thinking when they decided to base the community chat on chinese spyware 🤔 |
21:44:56 | ixmpp | even matrix would be nicer |
21:45:07 | ixmpp | bridges better to irc too |
21:45:15 | FromDiscord | <Elegantbeef> We went from discord is funded to it's chinese spyware |
21:45:16 | FromDiscord | <Elegantbeef> It's very much not chinese spyware |
21:45:16 | FromDiscord | <Elegantbeef> It's american spyware |
21:45:24 | krux02 | It is nice that it still works, still has users behind it, but honestly, for what it is actually used for, way too complicated |
21:45:24 | FromDiscord | <Elegantbeef> Well i'm presently on matrix |
21:45:26 | FromDiscord | <Elegantbeef> So.... |
21:45:48 | krux02 | @Elegantbeef: that is why you are marked as bot on discord. |
21:45:52 | ixmpp | wait, you're talking on matrix? |
21:45:53 | FromDiscord | <Phil> In reply to @ixmpp "so what exactly were": I'm like 20% sure the official channel is more matrix than discord... is discord even linked to anywhere? |
21:46:06 | ixmpp | matrix -> discord -> irc -> xmpp |
21:46:15 | ixmpp | wow this is a round trip |
21:46:23 | PMunch | ixmpp, I'm on IRC |
21:46:23 | FromDiscord | <Elegantbeef> Yep |
21:46:25 | FromDiscord | <EyeCon> There's XMPP too? |
21:46:37 | ixmpp | im seeing the "fromdiscord" bot |
21:46:37 | FromDiscord | <Gumbercules> I kind of worked for tencent |
21:46:38 | PMunch | It's bridges all the way down |
21:46:45 | FromDiscord | <Elegantbeef> https://nim-lang.org/#community |
21:47:14 | FromDiscord | <Gumbercules> I worked for frogmind which was owned by supercell which was owned by tencent |
21:47:18 | ixmpp | EyeCon i'm on xmpp, bridging myself to irc personally |
21:47:37 | FromDiscord | <Gumbercules> only annoying part of working for tencent was porting games to Chna |
21:47:41 | FromDiscord | <Elegantbeef> I knew it gumber is a tencent agent! |
21:47:42 | krux02 | I thought xmpp was dead |
21:47:42 | FromDiscord | <Gumbercules> China even, that shit sucked |
21:47:47 | FromDiscord | <Elegantbeef> Quick get him |
21:47:53 | FromDiscord | <Gumbercules> caught me |
21:47:54 | krux02 | ixmpp, is that why you are cally ixmpp? |
21:48:00 | ixmpp | yes |
21:48:04 | FromDiscord | <Gumbercules> svdv tgytghguyfhgfxxxxxxsxdffhbvc |
21:48:08 | ixmpp | real irc me is "ix" |
21:48:12 | FromDiscord | <Gumbercules> my son typed that |
21:48:15 | FromDiscord | <Phil> You could say that the community all having different clients and protocols means that there is... discord↵👉 👉 |
21:48:25 | FromDiscord | <EyeCon> Ba dum tss |
21:48:46 | FromDiscord | <Elegantbeef> Nah having interopable protocols and clients is the matrix |
21:49:06 | ixmpp | anyway, please consider properly bridging matrix to irc :) |
21:49:14 | FromDiscord | <Phil> In reply to @Elegantbeef "Nah having interopable protocols": I know but that doesn't make for as good a pun |
21:49:16 | krux02 | @Gumbercules: yea I have callbacks for when my daughter ad access to my laptop. |
21:49:16 | ixmpp | this bridgebot thing is awful |
21:49:35 | krux02 | anyway, I call good night for now. |
21:49:41 | ixmpp | matrix actually bridges nicely to irc |
21:49:57 | krux02 | It is late and I have to go out to hunt some food (find a fast food restaurant) |
21:49:59 | FromDiscord | <Elegantbeef> Matrix bridges to most places nicely |
21:50:19 | krux02 | Matrix is made to bridge to things. |
21:50:23 | FromDiscord | <Elegantbeef> Discord is an exception due to them not liking puppeted users |
21:50:41 | krux02 | that is why discord sucks. |
21:50:42 | FromDiscord | <Elegantbeef> You technically can puppet a user but it's against their TOS, plus you're still using discord |
21:50:48 | ixmpp | so please fix :D |
21:50:50 | krux02 | they don't like other clients. |
21:51:03 | FromDiscord | <Elegantbeef> That and you dont own any of your data |
21:51:12 | ixmpp | i think libera bridges are easy to make on matrix |
21:51:18 | FromDiscord | <Elegantbeef> Goes straight into their data harvesting system |
21:51:23 | krux02 | ixmpp, yea fix a thing when the problem is that things can't be fixed |
21:51:26 | krux02 | but yea |
21:51:30 | krux02 | anyway, good night. |
21:51:38 | krux02 | was nice talking to you. |
21:51:44 | FromDiscord | <Elegantbeef> Buh bye |
21:52:00 | FromDiscord | <Elegantbeef> Dont lie to me 😛 |
21:52:02 | ixmpp | i just mean why the hell bridge matrix to irc via discord |
21:52:11 | ixmpp | thats very fixable |
21:52:15 | FromDiscord | <Elegantbeef> It's coincidental really |
21:52:25 | ixmpp | in seconds, really |
21:52:29 | FromDiscord | <Elegantbeef> Matrix is bridged to discord and discord is bridged to irc |
21:52:57 | FromDiscord | <Elegantbeef> A matrix bridge to IRC needs to filter out the matrix bridge and the matrix to discord bridge needs to filter out the irc bridge |
21:53:11 | ixmpp | kill the discord<->irc link, add matrix<->irc |
21:53:16 | FromDiscord | <Elegantbeef> Dont recall if t2bot's bot makes that easy |
21:53:27 | FromDiscord | <Elegantbeef> Yea that'd work 😄 |
21:53:27 | ixmpp | no filters needed |
21:53:42 | ixmpp | like i said, seconds |
21:53:51 | FromDiscord | <Gumbercules> I remember last summer Discord would crash to desktop on my desktop pc |
21:53:57 | FromDiscord | <Gumbercules> tried to find logs - nonexistent |
21:54:02 | ixmpp | then everyone gets a nicer experience |
21:54:11 | FromDiscord | <Gumbercules> couldn't even find anything in event viewer in windows |
21:54:24 | ixmpp | who do i ping to make this happen? |
21:54:45 | FromDiscord | <Elegantbeef> No clue who runs this ship anymore |
21:54:48 | FromDiscord | <Elegantbeef> Pmunch would know |
21:55:08 | PMunch | Huh? |
21:55:14 | PMunch | What ship? |
21:55:20 | PMunch | Iceberg? |
21:55:32 | FromDiscord | <Elegantbeef> Oh yay we're fucked |
21:55:32 | ixmpp | 😂 |
21:55:48 | PMunch | Oh who to ping about the bridges and such.. Good question |
21:56:00 | ixmpp | who's in the acl on matrix |
21:56:15 | ixmpp | cause i think any room admin can bridge |
21:56:22 | PMunch | I used to ping dom96, but now that he's gone I'm not entirely sure who has access. Maybe it's only Araq now |
21:56:29 | ixmpp | then just gotta kick the bot |
21:56:47 | ixmpp | Araq: your people need you |
21:57:43 | PMunch | Hmm, admins in the Matrix room is apparently dom96 and some person called y who I've never heard of.. |
21:57:47 | PMunch | That's.. Not great |
21:57:56 | ixmpp | right |
21:58:08 | ixmpp | no wonder this is so f***ed |
21:58:28 | PMunch | What do you mean? |
21:58:33 | PMunch | It works doesn't it? |
21:59:10 | ixmpp | on a level, sure, but it's a no brainer to have bridged it the much easier and nicer way |
21:59:40 | ixmpp | so all i can think of is "they couldn't" for some reason |
22:00:37 | FromDiscord | <Elegantbeef> I think it was a case that discord was bridged to irc first |
22:00:37 | FromDiscord | <Elegantbeef> Then matrix users appeared |
22:00:52 | ixmpp | PMunch: matrix-irc bridges are s2s links, so they appear as native irc users, it's so much nicer on both sides |
22:01:29 | PMunch | I think Matrix <-> Discord does a bit more in terms of user bans though |
22:01:52 | ixmpp | hm, well, if the matrix admins do wake up, worth telling them |
22:02:12 | ixmpp | matrix-discord is fine, it's discord-irc that needs to go |
22:02:12 | FromDiscord | <Elegantbeef> No one is saying drop that bridge, the suggestion is drop the Discord \<-\> Irc for Matrix \<-\> Irc |
22:03:05 | ixmpp | can i even ping matrix from here? @dom96 / @y |
22:03:24 | FromDiscord | <Elegantbeef> You pinged a discord user 😄 |
22:03:33 | ixmpp | oops |
22:03:41 | PMunch | Oh right |
22:03:50 | PMunch | You want IRC to connect to the Matrix side and not to Discord |
22:03:53 | PMunch | That makes sense |
22:04:00 | PMunch | Only reason for that is historic |
22:04:10 | ixmpp | how am i the first person to think of this though :p |
22:04:15 | PMunch | Matrix was added after the Discord bridge already existed |
22:04:22 | ixmpp | right, yeah |
22:04:28 | FromDiscord | <Elegantbeef> I pretend irc users dont exist |
22:04:31 | PMunch | I think more people have thought about it, but just figured "eh, it works" |
22:04:41 | ixmpp | FromDiscord: :( |
22:05:01 | FromDiscord | <Gumbercules> back in my day we used gitter |
22:05:06 | FromDiscord | <Gumbercules> and it was horrible |
22:05:14 | FromDiscord | <Elegantbeef> It still is |
22:05:23 | FromDiscord | <Gumbercules> well yeah, but at least we don't use it anymore |
22:05:37 | PMunch | What do you mean back in your day? Aren't you older than me @Gumbercules? |
22:05:38 | FromDiscord | <Elegantbeef> Whenever a gitter user talks here only some matrix clients can read their code |
22:05:42 | FromDiscord | <Elegantbeef> Cause gitter sends it as html |
22:05:59 | FromDiscord | <Gumbercules> probably - I'm 38 |
22:06:01 | FromDiscord | <Gumbercules> ancient by most standards |
22:06:09 | * | nick3 joined #nim |
22:06:22 | FromDiscord | <Gumbercules> well I will be soon, just rounding up |
22:06:27 | PMunch | Eh, only got me beat by 8 years |
22:07:15 | FromDiscord | <Gumbercules> early thirties are fun |
22:08:16 | FromDiscord | <Gumbercules> I had a kid so basically my life is over |
22:08:47 | FromDiscord | <ambient> well if you didn't have a kid by 40 your life is also over |
22:09:11 | FromDiscord | <Elegantbeef> Jesus |
22:09:25 | FromDiscord | <Gumbercules> naw, your kids life might be |
22:09:28 | FromDiscord | <ambient> maybe it's appropriate to note that this is mostly humorous |
22:09:30 | FromDiscord | <Gumbercules> but you can probably still have a life |
22:09:47 | FromDiscord | <Gumbercules> a hobbled one where everything hurts all the time for no reason |
22:09:56 | FromDiscord | <Gumbercules> but still a life |
22:10:05 | FromDiscord | <Gumbercules> I'm kidding also - having a kid is awesome in other ways |
22:10:45 | FromDiscord | <ambient> well death is not a lie, and you just don't live like you're 20 until you hit 80 and disappear. it's a progression of gradual decline and your body breaking down |
22:10:53 | FromDiscord | <ambient> ok enough offtopic for me |
22:11:04 | FromDiscord | <4zv4l> is it possible to detach thread created using `spawn` from here https://nim-lang.org/docs/threadpool.html ? |
22:11:50 | FromDiscord | <Elegantbeef> threads are created detached arent they? |
22:12:06 | FromDiscord | <Gumbercules> In reply to @ambient "well death is not": depends on your conceptual framing of life and death and consciousness, but yeah for sure #offtopic territory |
22:12:57 | FromDiscord | <4zv4l> In reply to @Elegantbeef "threads are created detached": I mean, detatch them so I don't need to use `sync` to wait for them ? |
22:13:10 | FromDiscord | <Elegantbeef> That's not the point of threadpool |
22:13:15 | FromDiscord | <Elegantbeef> Use a `Thread` primative |
22:13:37 | FromDiscord | <4zv4l> so with `Thread` I can just let them there ? no need to call a `detach` proc ? |
22:13:56 | FromDiscord | <Elegantbeef> `createThread(myThread, myThreadProc, myThreadArgs)` |
22:14:08 | FromDiscord | <Elegantbeef> It's detatched, it runs until completion |
22:14:17 | FromDiscord | <Gumbercules> you need to run `joinThread/s` |
22:14:18 | FromDiscord | <Elegantbeef> You can join it if you want |
22:14:23 | FromDiscord | <4zv4l> well actually I have to wait for the threads to be sure↵so Threadpool is better ? |
22:14:24 | FromDiscord | <Elegantbeef> Lol |
22:14:26 | FromDiscord | <4zv4l> xD |
22:14:44 | FromDiscord | <Elegantbeef> Threadpool is experimental mostly and araq mostly says 'use taskpools or weave' |
22:15:11 | FromDiscord | <Gumbercules> Threadpool is a pretty naïve implementation tmk |
22:15:40 | FromDiscord | <Gumbercules> I don't know anything about taskpools |
22:15:48 | FromDiscord | <Elegantbeef> What are you even working on? |
22:15:52 | FromDiscord | <Elegantbeef> Generally ime you either want to have threads in a producer consumer pattern, or just like taskpool/threadpools where you just have X number of tasks you want done in parallel |
22:16:00 | FromDiscord | <Elegantbeef> Taskpools is mratsim's version of threadpools practically using modern Nim |
22:16:15 | FromDiscord | <4zv4l> well I'm decrypting files |
22:16:20 | FromDiscord | <Elegantbeef> https://github.com/status-im/nim-taskpools#taskpools |
22:16:27 | FromDiscord | <4zv4l> if they're bigger than 1gb I would like to use a thread to not block the whole program |
22:16:30 | FromDiscord | <djazz> PMunch: here are my two futhark wrappers so far https://github.com/daniel-j/nim-picosdk/commit/9686d4b9df79f1ef6d84ad5766ca92558f60c4ff |
22:16:46 | FromDiscord | <djazz> made a clang finder function |
22:16:58 | FromDiscord | <djazz> only works on nix heh |
22:17:02 | FromDiscord | <Gumbercules> as beef mentioned, taskpools might be your best bet |
22:17:46 | FromDiscord | <4zv4l> taskpool or weave ? |
22:18:07 | FromDiscord | <Gumbercules> I have a job system implementation - https://github.com/Tail-Wag-Games/frag/blob/master/src/job.nim - but it only supports Windows atm and is probably more difficult to extract as a dependency than just using weave or taskpools |
22:18:19 | FromDiscord | <Gumbercules> I've never had luck using weave, but ymmv |
22:18:24 | PMunch | @djazz, why do you have to create all those constants? |
22:18:25 | FromDiscord | <Gumbercules> and I've never attempted to use taskpools |
22:18:40 | FromDiscord | <djazz> In reply to @PMunch "<@81390960805675008>, why do you": Futhark doesnt create them... |
22:19:07 | FromDiscord | <djazz> well, only a few |
22:19:09 | PMunch | Hmm |
22:19:14 | PMunch | Well that's a bummer |
22:19:24 | PMunch | They are #define in the C code right? |
22:19:27 | FromDiscord | <djazz> idk they might be internal and not needed in the api |
22:19:32 | PMunch | Futhark struggles a bit with those.. |
22:19:54 | FromDiscord | <djazz> example https://github.com/georgerobotics/cyw43-driver/blob/2bde1acdc45f8a6902b35b06ea6e85d1aa70ee28/src/cyw43_ll.h#L51-L61 |
22:20:07 | PMunch | Basically since a define can to arbitrary text-level code replacement they don't have a type, so it's hard to automatically map to Nim |
22:20:16 | FromDiscord | <djazz> and https://github.com/georgerobotics/cyw43-driver/blob/2bde1acdc45f8a6902b35b06ea6e85d1aa70ee28/src/cyw43_ll.h#L103-L105 this is an issue |
22:20:35 | FromDiscord | <Elegantbeef> 4zv4l afaik there isnt any reason you need to call `sync` at the end of a spawn anyway |
22:20:36 | FromDiscord | <djazz> (cant make a real enum for that) |
22:20:56 | PMunch | Hmm, weird that it doesn't parse those (it tries to parse numbers and define them as ints) |
22:21:03 | FromDiscord | <4zv4l> In reply to @Elegantbeef "4zv4l afaik there isnt": well if the file isn't fully decrypted that's not great xD |
22:21:04 | FromDiscord | <Elegantbeef> You can just dispatch them all then use `isReady` |
22:21:08 | PMunch | Maybe it's the parenthesis throwing it off.. |
22:21:41 | FromDiscord | <4zv4l> In reply to @Elegantbeef "You can just dispatch": isn't it an sync thing ? |
22:21:44 | * | jmdaemon joined #nim |
22:22:04 | PMunch | @djazz, what I tend to do is create an enum of the other values, then consts for values like that, pointing to the enum value |
22:22:07 | FromDiscord | <djazz> PMunch it tries to do this in Futhark: `Cyw43supauthenticated = distinct object` |
22:22:25 | FromDiscord | <djazz> for CYW43_SUP_AUTHENTICATED |
22:22:38 | FromDiscord | <djazz> since its referenced from another #define |
22:22:41 | PMunch | Yeah.. It defaults to that when it doesn't quite know what's going on |
22:23:04 | FromDiscord | <auxym> yeah use weave or taskpools |
22:23:13 | PMunch | What do you think of Futhark on the whole though? |
22:23:30 | FromDiscord | <djazz> the other #defines arent in opir json at all... |
22:23:30 | FromDiscord | <Elegantbeef> Sure but you dont need to call sync |
22:23:50 | PMunch | @djazz, yeah as I said if it can't guess the type they can't be imported |
22:23:57 | FromDiscord | <djazz> In reply to @PMunch "What do you think": it's really cool, works way better than nimterop which I tried to use before. |
22:24:13 | FromDiscord | <djazz> Only downside is that nim compiler has to be run multiple times |
22:24:33 | PMunch | @djazz, that's good to hear! I wrote it because I was sick and tired of trying to wrestle nimterop and c2nim |
22:24:38 | PMunch | Never managed to get those to work |
22:24:39 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kw0 |
22:24:51 | FromDiscord | <djazz> After first iteration, nim throws this: `Error: undeclared identifier: 'U16t_2365587925'` |
22:24:57 | PMunch | With Futhark I'm able to just import C libraries almost without thinking about it, it's beautiful |
22:25:04 | FromDiscord | <djazz> `(10, 0): 'U16t'` |
22:25:07 | PMunch | Oh right.. |
22:25:13 | PMunch | Yeah that's a weird bug |
22:25:17 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kw1 |
22:25:19 | PMunch | Not quite sure how to fix that one |
22:25:22 | FromDiscord | <Elegantbeef> No |
22:25:31 | FromDiscord | <djazz> after second iteration it works but shows some Warning and Error |
22:25:38 | FromDiscord | <Elegantbeef> Cause sync blocks until all spawned processes are done |
22:25:40 | FromDiscord | <djazz> `Warning: duplicate 'inline' declaration specifier` |
22:25:50 | FromDiscord | <Elegantbeef> You can do whatever you want while waiting for yours |
22:25:50 | PMunch | It seems like when it's output directly as a Nim node it creates that bug, but when you load the code from a cache file it's fine |
22:25:56 | FromDiscord | <4zv4l> ooooh |
22:26:00 | FromDiscord | <4zv4l> I got what you mean |
22:26:02 | FromDiscord | <4zv4l> thanks !!! |
22:26:02 | FromDiscord | <Elegantbeef> If you want to display a message, show a count do whatever your main thread isnt blocked |
22:26:05 | FromDiscord | <djazz> `Error: must specify support pico_cyw43_arch architecture type or set PICO_CYW43_ARCH_HEADER` (although I have it set in the importc thing) |
22:26:11 | FromDiscord | <4zv4l> yes right, thank you so much |
22:26:21 | FromDiscord | <djazz> In reply to @PMunch "It seems like when": yeah.. |
22:26:23 | FromDiscord | <4zv4l> well, hopefully no error xD |
22:26:28 | PMunch | That's probably an error from C though @djazz |
22:26:33 | PMunch | The must specify thing |
22:26:40 | FromDiscord | <djazz> it is, but only shows up on 2nd iteration |
22:26:46 | FromDiscord | <djazz> 3rd iteration, its all good! |
22:26:51 | PMunch | Hmm |
22:26:56 | PMunch | That's even weirder :P |
22:27:03 | FromDiscord | <djazz> (well, works on 2nd but with some warnings like those) |
22:27:33 | PMunch | It's a bit finicky for sure |
22:27:53 | FromDiscord | <djazz> yes the error is from here https://github.com/raspberrypi/pico-sdk/blob/2e6142b15b8a75c1227dd3edbe839193b2bf9041/src/rp2_common/pico_cyw43_arch/include/cyw43_configport.h#L24 |
22:27:54 | PMunch | But way better than the alternatives IMO (only slightly biased) |
22:28:05 | FromDiscord | <djazz> PICO_CYW43_ARCH_THREADSAFE_BACKGROUND is set though... |
22:28:10 | FromDiscord | <Elegantbeef> Still doesnt create readable bindings |
22:28:31 | FromDiscord | <djazz> i wish the bindings used more importc and were compatible with header pragma... |
22:28:44 | PMunch | @Elegantbeef, eh I find them readable enough. And you can always generate docs from the file if you want something more readable |
22:28:46 | FromDiscord | <djazz> so be able to use static inline stuff without manually porting those to nim |
22:28:59 | PMunch | The idea was that you weren't supposed to read the bindings, you where supposed to read the C tutorial |
22:29:06 | FromDiscord | <Elegantbeef> yea i wish one could refer to the generated code, but one cannot due to the functionality you added |
22:29:10 | FromDiscord | <Elegantbeef> Ah yes C tutorials |
22:29:13 | FromDiscord | <Elegantbeef> For a rust library |
22:29:17 | FromDiscord | <Elegantbeef> 10/10 😛 |
22:29:35 | FromDiscord | <djazz> doesnt seem to work with vscode/nimsuggest, it doesnt pick up the types/procs |
22:29:40 | PMunch | For a rust library? |
22:29:41 | FromDiscord | <Elegantbeef> This is based on a true story! |
22:29:43 | FromDiscord | <djazz> maybe if i were to import it manually |
22:29:54 | PMunch | @djazz, hmm it does for me |
22:30:01 | FromDiscord | <djazz> maybe mine is too large |
22:30:08 | PMunch | As long as I have it compiled once so I get the cache file |
22:30:10 | FromDiscord | <Elegantbeef> Yes I used futhark on multiple wasm runtimes with C-api that were written in rust with subpar C-api documentation |
22:30:16 | FromDiscord | <djazz> i often have to killall nimsuggest as its running a ton of zombies |
22:30:21 | PMunch | (otherwise nimlsp times out on running the code) |
22:30:21 | FromDiscord | <Elegantbeef> So having unreadable bindings was a ton of work |
22:30:28 | FromDiscord | <djazz> it did before i tried futhark |
22:30:35 | PMunch | @Elegantbeef, that sounds truly horrid |
22:30:52 | PMunch | @djazz, zombies? |
22:31:00 | FromDiscord | <djazz> i am using some nim #devel build tho |
22:31:04 | PMunch | Nimlsp shouldn't create any new threads |
22:31:16 | FromDiscord | <djazz> well, not zombie processes, just nimsuggest using 100% cpu per instance |
22:31:18 | FromDiscord | <Elegantbeef> Yep i think it's a concession with futhark, that you added all this functionality that makes it quite tedious to use in places you didnt imagine it being used |
22:31:29 | PMunch | Oh right, that tends to happen |
22:31:35 | FromDiscord | <djazz> vscode's cpp lang server did same a while ago |
22:31:46 | PMunch | @Elegantbeef, I am considering a "more readable mode" |
22:31:48 | FromDiscord | <djazz> now, my fans are quiet again xD |
22:32:01 | PMunch | Basically go away from all the when defined stuff |
22:32:17 | PMunch | On the tradeoff that you can't override stuff as easily any longer |
22:32:21 | FromDiscord | <Elegantbeef> Also like if you fed futhark the C for https://github.com/beef331/wasm3/blob/master/src/wasm3/wasm3c.nim it'd be a much larger file that isnt useful to refer to |
22:32:42 | FromDiscord | <Elegantbeef> Yep that's basically what i've been suggesting for a while |
22:32:50 | FromDiscord | <Elegantbeef> Use clang and generate something like c2nim does |
22:32:57 | FromDiscord | <djazz> but if futhark detects that something is defined, it doesnt even try to generate the definition? |
22:33:10 | FromDiscord | <djazz> i have nested two libs with futhark, one depends on the other |
22:33:23 | FromDiscord | <djazz> and no symbols overlap |
22:33:28 | FromDiscord | <djazz> in the cache |
22:34:00 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kw2 |
22:34:19 | FromDiscord | <djazz> PMunch: what do you think of my CLANG_INCLUDE_PATH const? |
22:34:31 | FromDiscord | <Elegantbeef> Jeez dont yell at the poor guy |
22:34:37 | FromDiscord | <djazz> basically running `clang -x c -v -E /dev/null` to get the first include path |
22:35:07 | FromDiscord | <djazz> ClangIncludePath then, better? 😄 |
22:35:18 | FromDiscord | <Elegantbeef> Nice 4 you found a macro issue with taskpools |
22:35:25 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kw3 |
22:35:43 | PMunch | @djazz, ooh nice |
22:35:47 | FromDiscord | <Elegantbeef> You could attempt to fix the bug by learning macros and why it's attempting to index a nnkNilLit |
22:35:59 | PMunch | I was hoping someone would come up with something like that |
22:36:10 | FromDiscord | <djazz> i think it only works on linux/macos |
22:36:13 | FromDiscord | <Elegantbeef> You can minimise the bug and report an issue |
22:37:29 | FromDiscord | <Elegantbeef> Oh i think i might know the issue |
22:37:40 | FromDiscord | <Elegantbeef> try changing the procedure from `dec to like `dec1\` and try again |
22:37:43 | FromDiscord | <Elegantbeef> I think it's an overload issue |
22:38:09 | FromDiscord | <Elegantbeef> Hard to say but the issue is here https://github.com/status-im/nim-taskpools/blob/stable/taskpools/taskpools.nim#L443 |
22:38:22 | FromDiscord | <Elegantbeef> For some reason something is geting a `nnkNilLit` |
22:38:32 | FromDiscord | <Gibbons> Hello, I'm trying to cross-compile for Windows some nim code that uses std/db_sqlite but I get an error for not having sqlite3_64.dll on Windows machines... is there any way that I can statically compile it without having to carry the DLLs? |
22:39:11 | FromDiscord | <Elegantbeef> If you get a mingw sqlite3\_64.a yes |
22:39:40 | FromDiscord | <Elegantbeef> Arch seems to have a `mingw-w64-sqlite` package |
22:40:03 | FromDiscord | <Gibbons> Ok, so i should have that file and then --passL:-static, that's it? |
22:40:08 | FromDiscord | <Elegantbeef> So you could use that with `dynlibOverride` https://nim-lang.org/docs/nimc.html#dynliboverride to provide the static lib |
22:40:20 | FromDiscord | <4zv4l> In reply to @Elegantbeef "try changing the procedure": yeah I get that with even other proc name 😢 |
22:40:35 | FromDiscord | <Elegantbeef> Hmph |
22:42:10 | FromDiscord | <4zv4l> what's `nnkNilLit` ? |
22:42:18 | FromDiscord | <Elegantbeef> `nil` |
22:42:33 | FromDiscord | <Elegantbeef> It's also often used internally in the compiler to signify 'nothing' |
22:43:00 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4kw5 |
22:43:23 | FromDiscord | <Gibbons> last question: if I install Nim on Windows and compile there will I still have this issue? |
22:43:34 | FromDiscord | <Elegantbeef> Yes Nim uses DLLs for these modules |
22:43:38 | FromDiscord | <4zv4l> In reply to @Elegantbeef "`nil`": if that's nil, why does it need it ? |
22:43:48 | FromDiscord | <Gibbons> Ok thank you very much |
22:43:53 | FromDiscord | <Elegantbeef> Cause it's Nil in the ast not nil as a value |
22:45:04 | FromDiscord | <! Nilts> In reply to @not logged in "I updated to the": Is this a bug? |
22:45:19 | FromDiscord | <Elegantbeef> Seems like it's your code causing the bug |
22:45:22 | FromDiscord | <Elegantbeef> So likely not |
22:46:53 | * | jjido joined #nim |
22:50:08 | FromDiscord | <4zv4l> `Error: closure in spawn environment is not allowed` |
22:50:17 | FromDiscord | <4zv4l> and |
22:50:31 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kw6 |
22:50:32 | FromDiscord | <4zv4l> except the decrypt proc |
22:50:37 | FromDiscord | <4zv4l> idk where there is a closure ? |
22:50:56 | FromDiscord | <! Nilts> In reply to @Elegantbeef "Seems like it's your": then shouldn't my traceback have my file in it? Not just `tables`? |
22:53:19 | FromDiscord | <4zv4l> how can I copy a variable when I pass it to a function ? |
22:53:31 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4kw7 |
22:56:40 | FromDiscord | <! Nilts> In reply to @4zv4l "because the var here": What is the trouble you get from the threads |
22:57:05 | FromDiscord | <! Nilts> You can copy it by removing `var` |
22:58:53 | FromDiscord | <Elegantbeef> Of course cause tasks should not write to a mutable reference↵(@4zv4l) |
22:58:58 | FromDiscord | <Elegantbeef> Tasks work independantly |
22:59:29 | FromDiscord | <4zv4l> In reply to @not logged in "You can copy it": I'll try that |
23:00:16 | FromDiscord | <! Nilts> In reply to @not logged in "I updated to the": Any help? If I'm not giving enough info just ask |
23:00:33 | FromDiscord | <Elegantbeef> What code are you using? |
23:01:31 | FromDiscord | <4zv4l> but that's weird |
23:01:41 | FromDiscord | <4zv4l> when I add `var` I don't get type error but threads don't want |
23:01:53 | FromDiscord | <4zv4l> when I remove `var` threads is ok but I get type error |
23:02:02 | FromDiscord | <Elegantbeef> Of course cause a threaded proc shouldnt use `var T` |
23:02:12 | FromDiscord | <4zv4l> I mean |
23:02:20 | FromDiscord | <! Nilts> In reply to @Elegantbeef "What code are you": you want my whole code? I guess the traceback doesn't specify a spot |
23:02:24 | FromDiscord | <4zv4l> the function to decrypt tells me the arguments aren't good |
23:02:43 | FromDiscord | <Elegantbeef> Of course cause it's not a `var T` anymore |
23:02:48 | FromDiscord | <Elegantbeef> So it's likely an immutable issue |
23:02:54 | FromDiscord | <4zv4l> how can I make it mutable ? |
23:02:58 | FromDiscord | <4zv4l> like copy copy |
23:03:41 | FromDiscord | <Elegantbeef> It wouldnt be gc safe but as long as you were just referencing it you could make it `ref T` |
23:03:44 | FromDiscord | <Elegantbeef> If you mutate the ctx though that's unwise |
23:04:06 | FromDiscord | <4zv4l> In reply to @Elegantbeef "If you mutate the": It does indeed |
23:04:11 | FromDiscord | <4zv4l> `deepCopy` sounds ok ? |
23:04:27 | FromDiscord | <Elegantbeef> No cause it doesnt propagate to the source |
23:05:13 | FromDiscord | <4zv4l> oh |
23:05:14 | FromDiscord | <4zv4l> so |
23:05:19 | FromDiscord | <4zv4l> what solution do I have ? |
23:05:23 | FromDiscord | <4zv4l> In reply to @Elegantbeef "No cause it doesnt": why not ? |
23:05:53 | FromDiscord | <Elegantbeef> Learn proper threading is all i can really say |
23:06:30 | FromDiscord | <4zv4l> you mean↵my way to make the function isn't good ? |
23:07:09 | FromDiscord | <Elegantbeef> You have a mutable part of code that is used for all your calls |
23:07:33 | FromDiscord | <! Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4kwc |
23:08:04 | FromDiscord | <4zv4l> In reply to @Elegantbeef "You have a mutable": I just copy the key to the function and create the ctx from the function directly now↵should work |
23:12:18 | FromDiscord | <Elegantbeef> `handleXml` and `buildProc` procedures? |
23:12:19 | FromDiscord | <Elegantbeef> Those are suspect as hell |
23:12:57 | FromDiscord | <Elegantbeef> Errors |
23:12:59 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kwf |
23:13:00 | FromDiscord | <Elegantbeef> The issue is the default parameter |
23:13:50 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4kwg |
23:18:09 | FromDiscord | <! Nilts> In reply to @Elegantbeef "The issue is the": what is wrong with default paramater? |
23:18:54 | FromDiscord | <Elegantbeef> It causes the bug |
23:19:31 | FromDiscord | <! Nilts> ok, it works now, so is it a bug or is there a deeper explination |
23:19:44 | FromDiscord | <Elegantbeef> It's a bug i imagine |
23:20:00 | FromDiscord | <Elegantbeef> Default static parameter of an object without exported fields |
23:20:14 | FromDiscord | <Elegantbeef> Seems to cause a bug due to how the static evaluation of constants work |
23:21:00 | * | xet7 joined #nim |
23:21:55 | FromDiscord | <! Nilts> ¯\_(ツ)_/¯ |
23:23:54 | * | ltriant quit (Ping timeout: 272 seconds) |
23:37:15 | * | xet7 quit (Quit: Leaving) |
23:37:39 | * | xet7 joined #nim |
23:37:40 | FromDiscord | <hmmm> @AmjadHD broski how do I test your nimlime rework? |
23:42:22 | * | PMunch quit (Quit: leaving) |
23:50:09 | * | nick3 quit (Quit: WeeChat 3.7.1) |
23:56:19 | FromDiscord | <Mustache Man> How does one copy-by-value in nim? |