00:14:51 | * | onetwo3 joined #nim |
00:16:42 | * | onetwo quit (Ping timeout: 255 seconds) |
00:42:54 | FromDiscord | <ajusa> I will try |
01:08:38 | * | Xenon joined #nim |
01:19:31 | * | Xenon quit (Read error: Connection reset by peer) |
01:24:17 | NimEventer | New Nimble package! palladian - A Frontend Web Framework for Nim based on Preact, see https://github.com/itsumura-h/nim-palladian |
01:34:34 | FromDiscord | <auxym> so `nimscript` has `buildos`, but that doesn't seem to be available for comptime stuff. How can I do something like `when buildOs == "linux"`? |
01:36:38 | FromDiscord | <ringabout> when defined(linux)? |
01:39:58 | FromDiscord | <auxym> doesn't work when cross compiling |
01:41:19 | FromDiscord | <auxym> wait |
01:41:27 | FromDiscord | <auxym> no |
01:42:01 | FromDiscord | <auxym> sent a code paste, see https://play.nim-lang.org/#ix=4q8a |
01:42:10 | FromDiscord | <auxym> even if i'm building on linux |
02:01:29 | FromDiscord | <Elegantbeef> Afaik there is no mechanism to check the OS of the compiler |
02:02:05 | FromDiscord | <Elegantbeef> A hack would be to do `getCurrentCompilerExe` or similar and checking if it starts with a letter or a `/` |
02:04:57 | FromDiscord | <auxym> i can't even call `getCurrentCompilerExe` if compiling with `os:any` |
02:07:14 | FromDiscord | <Elegantbeef> Oh that's in OS |
02:07:15 | FromDiscord | <Elegantbeef> I missed that |
02:07:27 | FromDiscord | <auxym> maybe I could use `currentSourcePath` though |
02:08:09 | FromDiscord | <auxym> just trying to implement a simple `joinPath` implem that I can use at comptime with `os:any`, lol |
02:27:44 | * | rockcavera quit (Remote host closed the connection) |
02:38:14 | FromDiscord | <tfp> i'm trying to make a macro to create a new "kind" of object |
02:38:32 | FromDiscord | <tfp> FWIU this isn't possible |
02:38:32 | FromDiscord | <tfp> sent a code paste, see https://play.nim-lang.org/#ix=4q8h |
02:38:33 | FromDiscord | <tfp> am i wrong? |
02:41:26 | FromDiscord | <tfp> so i'm falling back to this |
02:41:34 | FromDiscord | <tfp> sent a code paste, see https://play.nim-lang.org/#ix=4q8i |
02:41:42 | FromDiscord | <tfp> but it complains about the , and i figure that's from the same limitation? |
02:49:55 | FromDiscord | <tfp> ok as usual i see a workaround, macro pragmas? |
02:50:46 | FromDiscord | <tfp> https://nim-lang.github.io/Nim/manual_experimental.html |
02:50:53 | FromDiscord | <tfp> oddly the manual doesn't show the name of the experiment to enable |
02:53:06 | FromDiscord | <Rika> Pragmas in macros are not experimental |
02:53:41 | FromDiscord | <tfp> https://nim-lang.github.io/Nim/manual_experimental.html#extended-macro-pragmas |
02:53:43 | FromDiscord | <tfp> it's listed here |
02:53:49 | FromDiscord | <tfp> at least applying it to a type anyway seems to be experimental |
02:53:54 | FromDiscord | <tfp> which is what i'm interested in |
02:54:08 | FromDiscord | <Rika> Then they aren’t experimental in the way that a switch is needed |
02:54:10 | FromDiscord | <Rika> They’re just on |
02:54:12 | FromDiscord | <tfp> ah ok |
02:54:13 | FromDiscord | <Rika> Just like concepts |
02:55:26 | FromDiscord | <tfp> now i just have to figure out why it says invalid pragma 🙂 |
02:55:26 | FromDiscord | <tfp> thanks |
02:56:52 | * | rockcavera joined #nim |
02:58:25 | FromDiscord | <tfp> ok i figured it out |
02:58:35 | FromDiscord | <tfp> was just because the type of the ast node i returned was wrong, didn't think it mattered |
03:18:17 | FromDiscord | <Elegantbeef> Also worth noting type def macros cannot take in typed ast |
03:39:13 | * | jkl left #nim (#nim) |
03:54:23 | termer | Is it expected for ORC to cause threaded programs to crash with SIGSEGV |
03:54:50 | termer | I've had this issue with both Jester and Prologue, and debugging it is very difficult |
03:56:02 | termer | It seems in the stack traces that this happens a lot on iterators |
03:57:57 | FromDiscord | <Elegantbeef> Likely if they are not changed to support orc |
03:59:52 | termer | woo boy |
04:00:14 | termer | the issues don't happen under ARC, but of course they leak memory under ARC |
04:00:31 | FromDiscord | <Elegantbeef> Likely sharing memory improperly |
04:04:20 | FromDiscord | <Elegantbeef> Probably needs a few `{.cursor.}`s thrown around but idk |
04:08:35 | FromDiscord | <ringabout> It seems that httpbeast shares Settings between threads |
04:08:42 | FromDiscord | <ringabout> https://media.discordapp.net/attachments/371759389889003532/1082515141033218141/image.png |
04:10:36 | FromDiscord | <Elegantbeef> Is settings a ref object? |
04:12:45 | FromDiscord | <ringabout> It contains managed memory. |
04:13:17 | termer | I'm trying to get a better understanding of Prologue but I'm wholly unfamiliar with it |
04:13:36 | FromDiscord | <ringabout> Though it seems to be a complex problem. I have no idea. |
04:13:46 | termer | compiling with -d:usestd (use asynchttpserver) fixes the problem |
04:13:53 | termer | BUT that's probably not multithreaded |
04:13:59 | termer | and of course I don't want to use asynchttpserver lol |
04:14:03 | FromDiscord | <ringabout> asynchttpserver doesn't use threads at all |
04:14:12 | termer | you *can* make it use threads lol |
04:14:13 | termer | I have |
04:14:16 | termer | just not good |
04:16:40 | termer | basically I'm trying to figure out a way to get Prologue working with this cause I don't want to write a new framework and add yet another to the pool |
04:16:55 | termer | plus the new version of Nim uses ORC and threads by default I believe |
04:20:12 | termer | ringabout, how does application global state work in Prologue? |
04:20:23 | termer | what kind of state is there, and how is it dealt with? |
04:26:54 | FromDiscord | <ringabout> It shares the same application instance, name Prologue => https://github.com/planety/prologue/blob/e676b9a85fc66d136177aef94d30fdcd58d45fcb/src/prologue/core/application.nim#L499 |
04:27:14 | FromDiscord | <ringabout> The global state will be shared between threads. |
04:28:20 | FromDiscord | <ringabout> It is a ref => https://github.com/planety/prologue/blob/e676b9a85fc66d136177aef94d30fdcd58d45fcb/src/prologue/core/context.nim#L46 |
04:28:25 | FromDiscord | <tfp> if i'm making a pragma macro for a type, can i emit more than one type? because i can't emit a type section |
04:28:34 | FromDiscord | <tfp> it looks like i can only emit a single type def |
04:28:35 | termer | Lemme see |
04:28:39 | FromDiscord | <Elegantbeef> In devel it can tfp not in stable |
04:28:41 | termer | might need to check out if it can be a threadvar or something |
04:28:57 | FromDiscord | <tfp> In reply to @Elegantbeef "In devel it can": oh ok, that sounds good |
04:29:12 | FromDiscord | <tfp> thanks-- i can't really find a workaround because other types of macros can't accept for the public marker |
04:29:19 | FromDiscord | <tfp> can u think of anything 🥺 |
04:29:44 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q8D |
04:29:56 | FromDiscord | <tfp> the issue i ran into with that is a public field just breaks it |
04:30:00 | FromDiscord | <tfp> i'm not sure why, i might be missing something |
04:30:05 | FromDiscord | <tfp> let me check again |
04:31:01 | FromDiscord | <tfp> nevermind i think i'm wrong |
04:31:04 | FromDiscord | <tfp> 🤹♂️ |
04:33:25 | termer | ringabout The context for a request, is that run on the thread or is that generated by the main event loop thread and then sent somewhere else? |
04:33:27 | FromDiscord | <Elegantbeef> The typedef macro should work with export |
04:34:00 | FromDiscord | <tfp> micros can iterate over a type section right? |
04:34:00 | FromDiscord | <ringabout> In reply to @termer "ringabout The context for": it is generated on the thread |
04:34:08 | termer | so realistically that shouldn't be an issue |
04:34:32 | FromDiscord | <Elegantbeef> Of course↵(@tfp) |
04:34:34 | termer | man I'm really drawing a blank on this |
04:35:33 | FromDiscord | <ringabout> The context holds a reference to the global state created in the main thread. |
04:35:41 | termer | oh I see |
04:35:56 | termer | is that gScope |
04:36:08 | FromDiscord | <ringabout> yeah |
04:36:14 | termer | where is that created |
04:37:19 | FromDiscord | <ringabout> https://github.com/planety/prologue/blob/e676b9a85fc66d136177aef94d30fdcd58d45fcb/src/prologue/core/application.nim#L366 |
04:37:25 | FromDiscord | <ringabout> in the `newApp` |
04:38:05 | FromDiscord | <ringabout> in the main thread anyway |
04:38:13 | termer | I'm noticing the return type of gScope is lent |
04:38:20 | termer | I wonder if that plays nice with threads |
04:38:34 | FromDiscord | <tfp> @ElegantBeef ok so i can't actually find a way to iterate over the fields in a type section in the tests |
04:38:54 | FromDiscord | <tfp> well i guess iterate over the types, and then the fields |
04:39:07 | termer | ok, lent or no lent, still crashes |
04:39:15 | FromDiscord | <tfp> (sorry i haven't read the code itself much, just the tests in lieu of examples or docs) |
04:39:59 | FromDiscord | <Elegantbeef> You have to manually navigate the tree |
04:41:19 | FromDiscord | <tfp> ah gotcha, but then the type definitions themselves i can yoink out fields with micros? |
04:42:14 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/definitions/objectdefs.nim#L217 |
04:42:23 | FromDiscord | <Elegantbeef> If you're using micros that's what you'll likely want |
04:43:23 | FromDiscord | <tfp> ty, i saw ObjectDef but i thought it could only be used with like a "already made" type, can i actually use it on like nnkTypeDef? |
04:43:40 | FromDiscord | <tfp> sorry still connecting concepts in my head and i am trying to save some time by asking questions 😦 |
04:44:13 | FromDiscord | <Elegantbeef> You can use it on each typedef |
04:44:49 | FromDiscord | <Elegantbeef> Cause micros doesnt cover the entire AST you have to use normal Nim ast occasionally |
04:45:10 | FromDiscord | <tfp> it doesn't look like there's a ctor for nnkTypeDef though is what im seeing |
04:46:01 | FromDiscord | <Elegantbeef> https://github.com/beef331/micros/blob/master/src/micros/definitions/objectdefs.nim#L6-L27 converts a nimnode to a objectdef |
04:48:19 | FromDiscord | <tfp> maybe i'm stupid but it doesn't look like i can put an nnkTypeDef in there? |
04:49:05 | FromDiscord | <Elegantbeef> Yes you can |
04:49:35 | FromDiscord | <Elegantbeef> Notice `isa` checks if it's a `nnkyTypeDef` |
04:50:01 | FromDiscord | <Elegantbeef> And objectDef passes it along if it's not a `nnkSym` or `nnkObjConstr` |
04:50:12 | FromDiscord | <Elegantbeef> So a typedef goes to `isa` and passes |
04:51:01 | FromDiscord | <tfp> ah ok i see, i misread the case statement |
04:51:05 | FromDiscord | <tfp> thanks! yes it's working |
04:51:07 | FromDiscord | <tfp> appreciate the help |
04:51:20 | FromDiscord | <Elegantbeef> I appreciate the using micrros |
04:52:19 | FromDiscord | <Elegantbeef> Hopefully micros makes your life much easier |
04:54:54 | FromDiscord | <tfp> so far so good :^) |
05:05:04 | FromDiscord | <Elegantbeef> Good let it infest the entire macro world! |
05:28:02 | * | rockcavera quit (Remote host closed the connection) |
05:38:14 | FromDiscord | <Saint> How do I use an external JS library with Nim and compile my nim to JS |
05:38:27 | FromDiscord | <Saint> Could someone point me to a page that sort of goes over how to do this |
05:41:09 | FromDiscord | <Elegantbeef> https://github.com/juancarlospaco/nodejs is probably the best reference |
06:00:58 | FromDiscord | <Saint> Thanks @ElegantBeef but do you know how I would import something like https://github.com/Tonejs/Tone.js |
06:03:12 | FromDiscord | <Saint> https://github.com/bluenote10/KaraxExamples/blob/master/JsIntegration/demo.nim |
06:03:24 | FromDiscord | <Saint> Is this still the way to do it? Example is pretty old |
06:11:26 | * | kenran joined #nim |
06:12:42 | * | kenran quit (Remote host closed the connection) |
06:14:34 | FromDiscord | <Elegantbeef> Pretty much |
06:14:47 | FromDiscord | <Elegantbeef> You do not need the `emit`, that's only if you do not want to have to include the js in another method |
06:27:32 | FromDiscord | <Saint> In reply to @Elegantbeef "You do not need": Could you explain a bit more? I'm not sure I get it |
06:27:51 | FromDiscord | <Elegantbeef> You only need the emit if you do not include the other js file in another way |
06:28:17 | FromDiscord | <Elegantbeef> If this is in browser that could be replaced with a `<script src = "mysrc.js"/>` |
06:28:28 | FromDiscord | <Saint> Okay right, gotcha |
06:28:31 | FromDiscord | <Saint> Thanks! |
06:29:36 | FromDiscord | <Saint> I only need the emit once even if I wrap multiple functions from the js library, right? |
06:29:58 | * | advesperacit joined #nim |
06:30:06 | FromDiscord | <Elegantbeef> emit pastes whatever the string you use into the generated js file |
06:30:17 | FromDiscord | <Elegantbeef> It's verbatim |
06:55:21 | NimEventer | New post on r/nim by Enigmanark: My second game made with Nim, see https://reddit.com/r/nim/comments/11ks0sh/my_second_game_made_with_nim/ |
07:23:41 | FromDiscord | <that_dude> Is there a way to avoid evaluating a const variable if it doesn't get used? I've got a function that has a considerable setup cost that I want to avoid it if it doesn't get used |
07:28:10 | FromDiscord | <Elegantbeef> Perhaps you can make it a template instead |
07:32:20 | FromDiscord | <that_dude> So basically try to just change proc -> template for the main function? |
07:32:31 | FromDiscord | <Elegantbeef> You said a const |
07:33:28 | FromDiscord | <that_dude> Well my code looks like this right now https://media.discordapp.net/attachments/371759389889003532/1082566672830967879/image.png |
07:33:52 | FromDiscord | <that_dude> And my idea is that if test doesn't get called, get_coords (which takes a few seconds) doesn't either |
07:34:15 | FromDiscord | <that_dude> But right now coords it still calculated |
07:34:31 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4q93 |
07:37:04 | FromDiscord | <that_dude> That works, but only until I do something with coords. In this case test still isn't called, but it's evaluated again https://media.discordapp.net/attachments/371759389889003532/1082567579320713226/image.png |
07:37:40 | FromDiscord | <Elegantbeef> Use a macro + compile time variable then |
07:42:34 | * | PMunch joined #nim |
09:05:30 | * | Notxor joined #nim |
09:26:25 | * | randomuser464876 joined #nim |
09:32:26 | * | azimut quit (Ping timeout: 255 seconds) |
09:34:02 | FromDiscord | <4zv4l> since sha-1 and md5 aren't secure nowadays why isn't there in the stdlib a sha256 digest ? |
09:38:37 | Amun-Ra | why sha256? |
09:38:55 | Amun-Ra | blake2, sha3… |
09:39:28 | FromDiscord | <4zv4l> are those in the stdlib ? |
09:39:48 | Amun-Ra | nope |
09:40:36 | FromDiscord | <4zv4l> so the point is the same |
09:40:41 | FromDiscord | <4zv4l> gonna check nimcrypto |
09:41:37 | Amun-Ra | mhm |
09:42:00 | Amun-Ra | I would not use stdlib crypto modules for anything close to security |
09:42:03 | Amun-Ra | see https://github.com/nim-lang/Nim/blob/devel/lib/pure/md5.nim#L269-L273 |
09:42:25 | Amun-Ra | that's a perfect example how not to compare hashes |
09:42:29 | Amun-Ra | it's not constant time |
09:43:00 | Amun-Ra | I started my own crypto lib, but it's on hiatus atm |
09:48:42 | PMunch | Well hashes are used for more than crypto |
09:49:07 | Amun-Ra | true |
09:49:13 | PMunch | MD5 and SHA-1 are commonly used for things like comparing files or messages for example |
09:49:21 | FromDiscord | <Elegantbeef> Md5 is mostly used for checksums now |
09:49:36 | Amun-Ra | md5 should not be used anymore even for that |
09:49:55 | Amun-Ra | mac+md5 is fine |
10:21:21 | FromDiscord | <4zv4l> In reply to @Amun-Ra "I would not use": nimcrypto from github not the stdlib ^^ |
11:20:02 | * | anddam quit (Quit: WeeChat 3.8) |
11:23:47 | FromDiscord | <0ffh> In reply to @Amun-Ra "see https://github.com/nim-lang/Nim/blob/devel/lib/": You care about a side channel attack on a non-cryptographic hash function?↵Or is that just a very badly chosen example? |
11:35:26 | Amun-Ra | that was the first thing I've noticed by skimming the source for a few seconds |
12:00:24 | FromDiscord | <Gennadiy> Other than the manual's documentation, could someone point to some documentation/tutorials on `'Concepts'` in Nim. thanks. |
12:28:32 | PMunch | Maybe @Elegantbeef has something |
12:34:02 | FromDiscord | <jmgomez> In reply to @Gennadiy "Other than the manual's": https://nim-lang.org/docs/manual_experimental.html#concepts |
12:35:30 | PMunch | @jmgomez, that's the manual though.. |
12:42:28 | FromDiscord | <jmgomez> Yeah, I misread it that's why I deleted the post. I guess it doenst get reflected in matrix |
12:43:15 | PMunch | I'm on IRC, nothing gets deleted here |
12:47:35 | NimEventer | New post on r/nim by jdmidds: Exercism is showcasing Nim this month, see https://reddit.com/r/nim/comments/11kxrbm/exercism_is_showcasing_nim_this_month/ |
12:49:44 | * | derpydoo quit (Quit: derpydoo) |
12:54:27 | FromDiscord | <Phil> This is more software in general, but in distributed systems, are there really only 2 ways to guarantee that you correctly fully received and processed a piece of data ? |
12:55:00 | FromDiscord | <Phil> 1) Act on it synchronously, only return a response once you fully processed the entire thing. When you give back HTTP200 you give a guarantee it is fully processed |
12:57:00 | FromDiscord | <Phil> 2) Act on it asynchronously and check with a job. You return a response immediately and "mark" the received message for later processing, e.g. by handing out a message to some message-queue like rabbitmq or activemq.↵You can then only soft "guarantee" that it'll get fully processed by storing somewhere whether it has been processed or not and then you regularly check with a job whether it has been processed already |
12:58:14 | FromDiscord | <Rika> In distributed systems whenever you move to asynchrony there’s a lot of guarantees you lose |
13:00:52 | FromDiscord | <Phil> We're having an hour long debate currently over what's the way to go here as the original implementation used asyncrhony and suddenly the requirement dropped out of nowhere that we would want a guarantee, that if somebody says "Don't show my profile publicly" then we need a guarantee that it actually gets stored. Messages being dropped must not happen because otherwise we're violating their right to govern how their data is being used |
13:01:06 | FromDiscord | <Phil> I'm mentally exhausted from simulating all those different ways to build it |
13:02:19 | * | derpydoo joined #nim |
13:07:15 | FromDiscord | <Rika> Give me a moment I’m busy lol |
13:14:22 | FromDiscord | <Phil> Apparently ActiveMQ and maybe others support transactions (?)↵I'll need to dive into those docs at some point |
13:23:58 | PMunch | Cool to see the intro video from Exercism for Mechanical March |
13:24:13 | PMunch | You can tell that the person who did it has used Nim |
13:33:07 | * | anddam joined #nim |
13:37:33 | * | anddam quit (Client Quit) |
13:57:29 | * | randomuser464876 quit (Quit: Client closed) |
13:57:41 | * | randomuser464876 joined #nim |
14:03:58 | FromDiscord | <Rika> In reply to @Rika "Give me a moment": I can’t find the document I usually use to explain this and I’m usually terrible at explaining these more complex topics so |
14:13:21 | * | anddam joined #nim |
14:18:11 | FromDiscord | <Phil> You can not see it, but now I'm sad |
14:18:39 | FromDiscord | <Phil> We have like 5 different opinions on build this particular feature in our distributed ecosystem and I'm just mentally exhausted |
14:19:12 | FromDiscord | <Phil> (edit) "We have like 5 different opinions on ... build" added "how to" |
14:25:07 | PMunch | Pretty neat when you find a fairly large project like this and don't recognize any of the contributors: https://github.com/exercism/configlet |
14:25:13 | PMunch | Meas the community is growing :) |
14:30:58 | FromDiscord | <Rika> In reply to @Isofruit "We have like 5": It just is like that |
14:31:05 | FromDiscord | <Rika> Distributed is a pain |
14:31:29 | FromDiscord | <Rika> I think one of the simplest ideas is just to use a time out and retry n times |
14:31:38 | FromDiscord | <Rika> If all fails then just raise an error to the user |
14:31:51 | FromDiscord | <Rika> You cannot avoid the error to the user anyway even in synchrony |
14:34:20 | FromDiscord | <Rika> I found the resource I usually use |
14:34:30 | FromDiscord | <Rika> https://decentralizedthoughts.github.io |
14:37:27 | FromDiscord | <Rika> https://decentralizedthoughts.github.io/2019-06-01-2019-5-31-models/ |
14:38:46 | FromDiscord | <Rika> @Phil |
14:41:17 | FromDiscord | <Phil> In reply to @Rika "If all fails then": I mean, one of the reasons you'd want to use asynchrony is so that the user can immediately return to their client and do their own thing while the infrastructure distributes the knowledge that data was changed |
14:41:46 | FromDiscord | <Rika> In reply to @Isofruit "I mean, one of": I see, that’s what you mean |
14:42:08 | FromDiscord | <Phil> So raising an error to the user goes out the window once asynchrony via an MQ is involved because the user already has gotten their answer:↵That the first service received the data.↵You just can't give a guarantee that it was fully distributed into the microservice-landscape |
14:43:18 | FromDiscord | <Rika> Well in such case you can go read the linked article where they propose a latency model that is safe in asynchrony but has a weak guarantee for liveness |
14:43:58 | FromDiscord | <Phil> God damn large distributed systems are such a pain to think about |
14:44:37 | FromDiscord | <Rika> Well that’s what happens when you want to generalise |
14:46:03 | FromDiscord | <Rika> They have a start guide https://decentralizedthoughts.github.io/start-here/ |
14:48:23 | FromDiscord | <Rika> I don’t know man have fun this is a really brain blending rabbit hole |
14:53:43 | FromDiscord | <Phil> And I thought I had to break my brain 3 years ago when I started getting into async |
14:54:00 | FromDiscord | <Phil> (edit) "And I thought I had to break my brain 3 years ago when I started getting into async ... " added "with rxjs and promises" |
14:55:02 | FromDiscord | <jmgomez> In reply to @PMunch "Pretty neat when you": 🚀 |
14:58:03 | FromDiscord | <Yepoleb> In reply to @Isofruit "So raising an error": It seems like raising an error is a requirement though |
15:02:22 | FromDiscord | <Yepoleb> You can not return success unless you know the data has been written and saved in all nodes, that can only be a synchronous operation |
15:04:40 | FromDiscord | <Yepoleb> To the front end at least, you can use async operations behind the scenes and wrap that in a synchronous operation that checks for success or aborts and shows an error |
15:05:03 | FromDiscord | <Yepoleb> (edit) "least, you" => "least. You" |
15:12:58 | FromDiscord | <Rika> It’s always a good idea to have a way of handling errors in that sense yes |
15:13:25 | FromDiscord | <Phil> The error doesn't have to be, the requirement is either it fails and you inform the user, or it doesn't and you have a way to notice that it failed yourself |
15:13:59 | FromDiscord | <Rika> What, |
15:16:10 | FromDiscord | <Phil> Storing a collection or table with records for whom passing them on failed |
15:16:50 | FromDiscord | <Phil> So if you notice that filling up you see what needs to be migrated by hand if necessary |
15:17:31 | * | madprog quit (Remote host closed the connection) |
15:18:19 | FromDiscord | <Rika> So basically when it fails it has to do something potentially over the network |
15:18:31 | FromDiscord | <Rika> 🙂 sounds like there’s gonna be a lot of issues there |
15:20:41 | FromDiscord | <gogolxdong> Is there any new ORC/ARC latency benchmarks? |
15:20:51 | FromDiscord | <gogolxdong> (edit) "benchmarks?" => "benchmark?" |
15:25:44 | FromDiscord | <Nerve> What are peoples' preferred command line parser setups for complex CLI applications? I'm currently using `docopt` and while the semantics are nice, I feel like all the template-generated procedures are bloating my application startup time. |
15:26:27 | FromDiscord | <Nerve> I'd prefer simple and lean without requiring a spaghetti mess |
15:28:06 | PMunch | Cliche might be a good hit: https://github.com/juancarlospaco/cliche |
15:49:57 | FromDiscord | <exelotl> I just use parseopt from the std lib, even for a complex app with multiple subcommands it's pretty manageable. After using your OptParser to figure out which command to run, you can forward it on to each subroutine to handle the remaining opts, and show a different help message if _those_ opts are wrong, etc.↵e.g.↵main options: https://git.sr.ht/~exelotl/natu/tree/devel/item/natu.nim↵sub options: https://git.sr.ht/~exelotl/natu/tree |
16:01:30 | NimEventer | New Nimble package! sauer - Scaffolder for Karax., see https://github.com/moigagoo/sauer |
16:02:11 | * | arkurious joined #nim |
16:14:00 | * | derpydoo quit (Quit: derpydoo) |
16:29:14 | * | derpydoo joined #nim |
17:11:06 | * | azimut joined #nim |
17:22:18 | * | azimut_ joined #nim |
17:23:08 | * | azimut quit (Ping timeout: 255 seconds) |
17:28:42 | * | rockcavera joined #nim |
17:40:24 | NimEventer | New thread by TKD: Why does this code using 'concepts' fail?, see https://forum.nim-lang.org/t/9972 |
17:51:51 | * | derpydoo quit (Quit: derpydoo) |
17:57:06 | * | derpydoo joined #nim |
18:20:03 | FromDiscord | <rakgew> I like cligen quit a bit, but so far have not used it in complex cli apps yet. |
18:34:28 | PMunch | I've actually used npeg for very complex command line parsing |
18:36:44 | NimEventer | New Nimble package! wilayahindonesia - Library data wilayah indonesia, see https://github.com/nekoding/wilayahindonesia-nim |
18:41:44 | NimEventer | New Nimble package! epub2gpub - Convert epub to gpub (https://codeberg.org/oppenlab/gempub), see https://gitlab.com/mars2klb/epub2gpub |
18:47:13 | FromDiscord | <Hourglass [She/Her]> I've just scrapped my 'super modular plugin system' idea now |
18:57:29 | PMunch | :( |
19:10:45 | PMunch | I was looking forward to that |
19:21:14 | FromDiscord | <Hourglass [She/Her]> So, I recreated the server software without the plugin system structure I had, but I'm still getting the same issue which honestly is kinda wack |
19:21:31 | FromDiscord | <Hourglass [She/Her]> So I'm assuming it's a logic error, which means I may actually be able to use the plugin system structure |
19:21:43 | FromDiscord | <Hourglass [She/Her]> Just not sure where the logic error is happening aha |
19:21:50 | FromDiscord | <Hourglass [She/Her]> Probably during packet creation |
19:43:03 | * | junaid_ joined #nim |
19:47:34 | * | junaid_ quit (Remote host closed the connection) |
19:50:11 | * | randomuser464876 quit (Quit: Client closed) |
19:53:37 | FromDiscord | <Pandasdontfly> choosenim does not work on windows 11 it seems |
19:56:14 | FromDiscord | <Hourglass [She/Her]> In reply to @Hourglass, When the Hour Strikes "Probably during packet creation": Yep, it's a logic error |
19:56:21 | FromDiscord | <Hourglass [She/Her]> Finally figured out the issue |
19:56:30 | FromDiscord | <Hourglass [She/Her]> Pain. Because I don't know how to fix this |
19:57:26 | FromDiscord | <Phil> In reply to @Pandasdontfly "choosenim does not work": Tried asking any other folks that use win11 yet to see if nim works on there or not? |
20:02:17 | * | Phil[m]123 joined #nim |
20:02:22 | Phil[m]123 | Okay, took some swapping around between matrix servers to find the one with the channel but I think this is it? |
20:02:24 | Phil[m]123 | Never mind, thisappears to not be the channel bridged to discord offtopic |
20:15:42 | FromDiscord | <Pandasdontfly> In reply to @Isofruit "Tried asking any other": i dunno dont really know anyone |
20:16:08 | FromDiscord | <Pandasdontfly> i just got a new pc so used windows 11 it just spits out a error upon trying to install it |
20:42:07 | * | tiorock joined #nim |
20:42:07 | * | tiorock quit (Changing host) |
20:42:08 | * | tiorock joined #nim |
20:42:08 | * | rockcavera is now known as Guest8641 |
20:42:08 | * | Guest8641 quit (Killed (lead.libera.chat (Nickname regained by services))) |
20:42:08 | * | tiorock is now known as rockcavera |
20:46:47 | * | Notxor quit (Quit: Leaving) |
21:23:24 | * | lumidify quit (Remote host closed the connection) |
21:27:38 | * | tiorock joined #nim |
21:27:38 | * | tiorock quit (Changing host) |
21:27:38 | * | tiorock joined #nim |
21:27:38 | * | rockcavera is now known as Guest4572 |
21:27:38 | * | Guest4572 quit (Killed (tungsten.libera.chat (Nickname regained by services))) |
21:27:38 | * | tiorock is now known as rockcavera |
21:30:19 | FromDiscord | <michaelb.eth> is it somehow possible to use an importc'd func at compile-time? |
21:45:09 | * | lumidify joined #nim |
21:47:08 | * | derpydoo quit (Quit: derpydoo) |
21:55:41 | PMunch | @michaelb.eth, there is some work being put towards this, but I don't believe it's currently possible, no |
21:57:06 | PMunch | @Pandasdontfly, what's the error? I assume this could be the notorious false positive AV thing.. |
21:59:39 | FromDiscord | <Pandasdontfly> In reply to @PMunch "<@924783372755169311>, what's the error?": upon opening it prints out the entire help section then says [process exited with code 1 (0x00000001)] then does not work since i cant install it. Trying to install nim manually does not work either. |
21:59:40 | FromDiscord | <ElegantBeef> Pmunch i did actually write a code reuse 'tutorial' recently so i do indeed have a writeup for concepts sorta! |
22:00:05 | FromDiscord | <ElegantBeef> @Gennadiy no clue if it explains concepts enough https://www.jasonbeetham.com/codereuse.html |
22:00:29 | FromDiscord | <ElegantBeef> In reply to @michaelb.eth "is it somehow possible": Yes if you build the compiler with libffi enabled |
22:03:14 | FromDiscord | <ElegantBeef> https://github.com/nim-lang/Nim/pull/10150 for reference |
22:04:23 | * | PMunch quit (Quit: leaving) |
22:05:06 | FromDiscord | <jmgomez> Wasnt aware of it, why is not default? Worst comp times? |
22:05:18 | FromDiscord | <ElegantBeef> Even worse security |
22:05:58 | FromDiscord | <ElegantBeef> staticExec is bad enough for security, arbitrary C apis working with the VM is even worse |
22:08:25 | FromDiscord | <jmgomez> Ah I see, nobody considered two versions of the compiler? |
22:09:04 | FromDiscord | <ElegantBeef> I mean that creates even more dialects |
22:09:44 | FromDiscord | <michaelb.eth> In reply to @ElegantBeef "Yes if you build": thanks |
22:10:12 | FromDiscord | <jmgomez> yeah, fragmentation is an issue but importc so at comp time is so tempting.. I guess you can just ship the compiler, it doesnt take that long to compile |
22:10:29 | FromDiscord | <ElegantBeef> Well it's such a hard thing to audit |
22:10:42 | FromDiscord | <ElegantBeef> You need something like `{.libffi.}:` or something |
22:11:26 | FromDiscord | <ElegantBeef> Otherwise it's too difficult to see where your library may make FFI calls, which makes it even more insecure to just compile a library |
22:22:38 | FromDiscord | <djazz> In reply to @gitterirc "<shashlick> Araq should I": Long overdue 😁 @auxym |
22:22:56 | FromDiscord | <djazz> In reply to @gitterirc "<Araq> shashlick, ok": He said ok 🙂 |
22:23:30 | * | lumidify quit (Ping timeout: 268 seconds) |
22:23:30 | FromDiscord | <djazz> Guess I should make a PR |
22:24:26 | * | rez joined #nim |
22:26:54 | * | advesperacit quit () |
22:34:32 | FromDiscord | <gogolxdong> Is move from --gc to --mm only an item change or means no gc literally? |
22:34:41 | FromDiscord | <ElegantBeef> They mean the same thing |
22:34:53 | FromDiscord | <ElegantBeef> arc/orc are not conventional GCs hence the name change |
22:35:17 | FromDiscord | <gogolxdong> not conventional GCs means gc or not |
22:35:34 | FromDiscord | <gogolxdong> I'm comparing with golang/Rust. |
22:35:45 | FromDiscord | <ElegantBeef> Not conventional means it's more like Rust/C++'s RAII |
22:35:51 | FromDiscord | <Diogenes of Toronto> falling for these puns |
22:35:54 | FromDiscord | <ElegantBeef> Orc has a cycle collector on top |
22:36:36 | FromDiscord | <ElegantBeef> What puns? |
22:36:38 | FromDiscord | <gogolxdong> yeah, aware of that, is there any new benchmark of arc/orc |
22:39:36 | * | lumo_e joined #nim |
22:40:46 | FromDiscord | <ElegantBeef> I mean it's generally faster than refc in many cases, in others it might not be |
22:51:26 | FromDiscord | <gogolxdong> The latest news of golang gc I've heard of is it's been reduced down to around 1ms in price of throughput. |
22:52:54 | FromDiscord | <gogolxdong> 'm investigating whether nimbus can beat go-ethereum/geth since golang has the "stop the world" |
22:53:03 | FromDiscord | <gogolxdong> (edit) "'m" => "I'm" |
22:53:44 | FromDiscord | <gogolxdong> https://nim-lang.org/blog/2020/12/08/introducing-orc.html |
22:55:40 | FromDiscord | <gogolxdong> if so , we have a way to make Nim popular in some so-called "web3 scientist community" very fast |
23:30:58 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4qcZ |