00:11:01 | * | xet7 quit (Ping timeout: 248 seconds) |
00:15:25 | * | xet7 joined #nim |
00:20:42 | * | xet7 quit (Ping timeout: 246 seconds) |
00:26:14 | * | xet7 joined #nim |
00:52:29 | * | xet7 quit (Ping timeout: 252 seconds) |
01:34:36 | * | wikipedia joined #nim |
01:40:06 | FromDiscord | <Nlits (Ping on reply)> Is an iterator the most efficient way to convert a table to a `seq[(string, string)]` |
01:45:13 | FromDiscord | <Elegantbeef> There's not much of an improvement that can be done given it's a non sequential storage |
01:45:24 | FromDiscord | <Elegantbeef> Obviously the most efficient way is to not |
01:51:10 | * | xet7 joined #nim |
02:08:09 | * | xet7 quit (Ping timeout: 246 seconds) |
02:08:47 | * | xet7 joined #nim |
02:30:45 | * | xet7 quit (Ping timeout: 252 seconds) |
02:39:56 | FromDiscord | <xkonti> In reply to @ieltan "If you first do": Does anybody know a decent guide on setting up a proper Nimble package with intent of publishing it to Nimble directory? Or alternatively is somebody willing to jump on a call and go through that process with me? Nimble makes me angry sometimes. |
02:40:16 | FromDiscord | <xkonti> Does anybody know a decent guide on setting up a proper Nimble package with intent of publishing it to Nimble directory? Or alternatively is somebody willing to jump on a call and go through that process with me? Nimble makes me angry sometimes. |
02:42:14 | FromDiscord | <Elegantbeef> Step 1 - Disregard all warnings↵Step 2 - Profit |
02:50:30 | * | xet7 joined #nim |
02:59:02 | * | xet7 quit (Ping timeout: 272 seconds) |
03:44:27 | * | alexdaguy joined #nim |
03:55:55 | * | xet7 joined #nim |
03:56:32 | * | lucasta quit (Remote host closed the connection) |
04:46:56 | FromDiscord | <spotlightkid> @xkonti\: use this template? https://github.com/treeform/nimtemplate |
04:47:45 | FromDiscord | <spotlightkid> But also, what is not clear about https://nim-lang.github.io/nimble/create-packages.html ? |
04:52:49 | FromDiscord | <spotlightkid> (Path to that doc\: Nim homepage -\> "Documentation" -\> "Nimble Package Manager" -\> "How to create a Nimble package" link in README) |
05:29:02 | FromDiscord | <zectbumo> sent a code paste, see https://play.nim-lang.org/#pasty=BsyprarO |
05:30:30 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=xIBRcmlp |
05:30:33 | FromDiscord | <Elegantbeef> But really stop what you're doing |
05:31:15 | FromDiscord | <zectbumo> okay, so basically you can't. That's what I'm doing already over multiple lines |
05:32:05 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=xLncOyaA |
05:33:13 | FromDiscord | <Phil> In reply to @xkonti "Does anybody know a": https://github.com/PhilippMDoerner/NimSetup/blob/main/Nim%20Project%20Setup%20on%20Github.md |
05:52:39 | FromDiscord | <spotlightkid> Nice! |
05:58:00 | * | ntat joined #nim |
05:58:27 | * | coldfeet joined #nim |
06:00:57 | FromDiscord | <xkonti> Thanks @spotlightkid and @Phil ! I will definitely check those and quite possibly it will get me through 😄 |
06:05:04 | FromDiscord | <Phil> In reply to @xkonti "Thanks @spotlightkid and <@180601887916163073>": It's pretty much just my obsidian docs on the process for reference. ↵Some of the files might benefit from an update but they should work |
06:05:37 | FromDiscord | <Phil> (edit) "In reply to @xkonti "Thanks @spotlightkid and <@180601887916163073>": It's pretty much just my obsidian docs ... on" added "slightly cleaned up" |
06:39:02 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=vijNFNSC |
06:39:57 | FromDiscord | <Elegantbeef> Alternatively use the pragma to mark negative fields instead of positive fields |
06:40:22 | FromDiscord | <blashyrk> Yes but I really need this to be opt-in 🙂 |
06:40:26 | FromDiscord | <blashyrk> Instead of opt-out |
06:40:30 | FromDiscord | <Phil> In reply to @blashyrk "Hi, is there a": Custom macro in this case might be more what you're after, hand the pragma a list of field names |
06:40:59 | FromDiscord | <blashyrk> @Phil How might one do that with these "marker" field pragmas? Because they can't have an implementation, they are only metadata afaik |
06:42:00 | FromDiscord | <Phil> In reply to @blashyrk "<@180601887916163073> How might one": I mean, I don't know what pragma you're using specifically.↵Essentially if you want one pragma, make it a pragma on the type itself that receives a value, is the syntax for the latter the hang-up or how to access it? |
06:42:03 | FromDiscord | <blashyrk> Oh you meant a custom macro that accepts the field definitions, yes I agree |
06:42:23 | FromDiscord | <Elegantbeef> You also could just make a `proc getMyFields(_: typedesc[T]): seq[string]` |
06:43:24 | FromDiscord | <Phil> Just depends on what this is for if that makes syntactical sense or not |
06:44:20 | FromDiscord | <blashyrk> For my use case I really need it to be a pragma marker, so I guess I'll go with the macro... Although writing a macro for this is going to be a bitch as it needs to transform the field definition to a `nnkPragmaExpr` |
06:44:43 | FromDiscord | <Phil> In reply to @blashyrk "For my use case": Do you really need to annotate the fields specifically? Can't you store that metadata with the type ? |
06:44:53 | FromDiscord | <Phil> Say you want to tag a given field as red |
06:45:34 | FromDiscord | <blashyrk> I do because I am working on Panno's gdext-nim godot 4 gdextension integration |
06:46:02 | FromDiscord | <blashyrk> So I want to be able to define export groups as this compile-time metadata |
06:46:21 | FromDiscord | <blashyrk> Here's an example |
06:46:22 | FromDiscord | <Elegantbeef> Seems like a lot of work for a minor inconvience |
06:46:52 | FromDiscord | <Elegantbeef> People happily annotate fields in Unity and Godot with `[SerializeField]` and `export` |
06:47:06 | FromDiscord | <blashyrk> Yeah but say you want 10 fields in a single group |
06:47:25 | FromDiscord | <Elegantbeef> `{.startgroup.} `{.endGroup.}\` |
06:48:09 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=eciqxxjd |
06:48:51 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=mAagaUoy |
06:48:58 | FromDiscord | <blashyrk> Now I want to add groups/subgroups which look like this in the editor https://media.discordapp.net/attachments/371759389889003532/1287304616664633394/image.png?ex=66f10f59&is=66efbdd9&hm=116269f50bbecc30b4d72e911f571ea1ad391b86169811b8ad78645926da495e& |
06:49:12 | FromDiscord | <blashyrk> So ideally the user shouldn't annotate every single field with group/subgroup 🙂 |
06:49:22 | FromDiscord | <Elegantbeef> You only annotate the first and last |
06:49:36 | FromDiscord | <Phil> In reply to @blashyrk "Yes but I'm currently": Honestly, I would still recommend going with this more verbose variant.↵Another variant is making it highly likely more difficult to grok and it's more complexity |
06:49:39 | FromDiscord | <Phil> (edit) "In reply to @blashyrk "Yes but I'm currently": Honestly, I would still recommend going with this more verbose variant.↵Another variant is making it highly likely more difficult to grok and it's more ... complexity" added "code with" |
06:50:20 | FromDiscord | <Phil> The explicit way at least shows you up front what you're wanting, the generated way means you need to know what gets generated exactly in debugging scenarios |
06:50:21 | FromDiscord | <blashyrk> But from the user's perspective they don't care about that, they just add the exports and they're done 😄 |
06:50:38 | FromDiscord | <blashyrk> The implementation details I mean |
06:50:55 | FromDiscord | <Elegantbeef> But they will care when you inevitably change the semantics of the type def cause macros are not foolproof |
06:51:58 | FromDiscord | <blashyrk> Yeah but on the other hand this emulated GDScript almost 1-1 for exporting which is valuable for people coming from gdscript I suppose. And manual exporting (not using these annotations) is still supported |
06:52:13 | FromDiscord | <Elegantbeef> "manual exporting"? |
06:52:54 | FromDiscord | <Phil> Can you actually be certain that if you make a macro pragma that it gets executed and gets a chance to apply the pragmas to the fields before other code using those pragmas get to run? |
06:53:11 | FromDiscord | <Elegantbeef> Phil type section macros are untyped |
06:53:29 | FromDiscord | <Phil> I tend to avoid scenarios where macros generate pragmas because I have a tough time reasoning about execution order |
06:53:50 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=RzVBefok |
06:53:52 | FromDiscord | <Phil> In reply to @Elegantbeef "Phil type section macros": .... they are? |
06:53:58 | FromDiscord | <Elegantbeef> Yes |
06:54:12 | FromDiscord | <Elegantbeef> You cannot have a typed typesection macro as the compiler has a hissy fit |
06:54:17 | FromDiscord | <Elegantbeef> Which is a shame |
06:54:21 | FromDiscord | <blashyrk> This is guaranteed to be executed when the custom node is regitered with GDExtension |
06:54:30 | FromDiscord | <metagngn> you can make a typesection and redirect it to a typed macro |
06:54:51 | FromDiscord | <blashyrk> In reply to @isofruit "Can you actually be": This is guaranteed to be executed when the custom node is regitered with GDExtension |
06:54:57 | FromDiscord | <Elegantbeef> The issue with making a macro is that you have to match all the semantics of a normal type definition |
06:55:02 | FromDiscord | <Elegantbeef> So it's just ugh |
06:55:30 | FromDiscord | <metagngn> sent a code paste, see https://play.nim-lang.org/#pasty=UivXdSRM |
06:55:49 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=FXAHBXkY |
06:55:50 | FromDiscord | <metagngn> (edit) "https://play.nim-lang.org/#pasty=AylIYNuN" => "https://play.nim-lang.org/#pasty=XmJMQmvV" |
06:56:18 | FromDiscord | <blashyrk> That was my intention yes |
06:57:35 | FromDiscord | <blashyrk> Is there a "simple" way to convert `a: int` to `a {.something:"asdf".}: int` in that scenario |
06:57:37 | FromDiscord | <blashyrk> I assume not 😄 |
06:57:55 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=ecrTIaHB |
06:57:56 | FromDiscord | <Elegantbeef> Nope |
06:58:01 | FromDiscord | <Elegantbeef> You have to walk the tree and replace it |
06:58:22 | FromDiscord | <Elegantbeef> That does not work well phil cause you need to add fields to a group together |
06:58:23 | FromDiscord | <Phil> In this case relace getNonRedFields with code generation |
06:58:25 | FromDiscord | <blashyrk> And another problem is I also need to keep any other pragmas that are explicitly set... Sigh |
06:59:04 | FromDiscord | <Phil> In reply to @Elegantbeef "That does not work": Isn't the "grouping" just a way to reduce the amount of explicitly mentioned fields? |
06:59:26 | FromDiscord | <Elegantbeef> The grouping is to show fields together in an inspector |
06:59:56 | FromDiscord | <Elegantbeef> So you might have `group({locomotion, [a, b, c, d], attack: [e, f, g])` |
07:00:00 | FromDiscord | <Phil> But how is that expressed in the final pragmas? I saw only a bunch of gdexport statement which were the things blashyrk wanted to reduce, no? |
07:00:03 | FromDiscord | <Elegantbeef> Where `a...g` are fields |
07:00:15 | FromDiscord | <Elegantbeef> No they do not want to reduce the just the export |
07:00:16 | FromDiscord | <Phil> (edit) "statement" => "pragmas" |
07:00:23 | FromDiscord | <Elegantbeef> They also want to group them together inspector |
07:00:25 | FromDiscord | <blashyrk> In reply to @isofruit "But how is that": They aren't, yet, hence my original question 🙂 |
07:00:40 | * | ntat quit (Quit: Leaving) |
07:00:51 | FromDiscord | <blashyrk> Currently you can only define groups when writing manual exporters, sequentially |
07:02:10 | FromDiscord | <Phil> I'm just bowing out, I don't get what the final syntax is supposed to be and I'm already not a fan of where this is heading |
07:02:19 | FromDiscord | <Phil> (edit) "heading" => "heading, which is custom type-definition syntax" |
07:02:33 | FromDiscord | <blashyrk> I suppose as a first step I could just make `group "GroupName" Obj.fieldname1, Obj.fieldname2` that is explicitly called after object definition |
07:03:03 | FromDiscord | <Phil> Honestly, if you're already writing custom type definition syntax, go balls to the wall |
07:03:13 | FromDiscord | <blashyrk> Well currently i am not |
07:03:25 | FromDiscord | <blashyrk> The example I pasted is just using standard nim, which is fields with pragmas 🙂 |
07:03:39 | FromDiscord | <blashyrk> But for this group stuff that won't cut it |
07:03:43 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#pasty=jiepumot |
07:03:52 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#pasty=ZGfLAdqB" => "https://play.nim-lang.org/#pasty=bKCJbdkn" |
07:04:06 | FromDiscord | <Elegantbeef> The issue with the above is it will run into people wanting to do `a, b: int` |
07:04:33 | FromDiscord | <Phil> Your choice if you decide to support that syntax or not |
07:04:53 | FromDiscord | <Phil> It's certainly cleaner (in my eyes) than using extra pragmas |
07:05:15 | FromDiscord | <Phil> And you're generating the desired type-def with all the necessary pragma annotations either way, might as well go all the way to make a DSL |
07:05:28 | FromDiscord | <Elegantbeef> I'm not one for making typedef macros unless they're needed, so I'm going to sit this one out |
07:06:17 | FromDiscord | <Phil> The alternative imo just makes it feel too much like normal code when more realistically you're doing a lot of custom stuff |
07:06:21 | FromDiscord | <Elegantbeef> Ideally `{.push.}` and `{.pop.}` would work |
07:06:33 | FromDiscord | <blashyrk> Oh wait that's built-in right? |
07:06:39 | FromDiscord | <blashyrk> So that might just work out of the box |
07:06:43 | FromDiscord | <Elegantbeef> They do not work in type definitions |
07:06:45 | FromDiscord | <blashyrk> 🙏 |
07:06:49 | FromDiscord | <blashyrk> Oh |
07:06:51 | FromDiscord | <blashyrk> :/ |
07:08:39 | FromDiscord | <Elegantbeef> Since field iterators are in order of definition you in theory could just have a `pushGdExport(...)` which you'd search for in order for |
07:09:34 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=mPVklIbI |
07:09:49 | FromDiscord | <Elegantbeef> You then search for the last `pushGdExport` without a `pop` when doing whatever you're doing |
07:10:02 | FromDiscord | <Elegantbeef> use any of those if you do not override it with your present definition |
07:11:13 | FromDiscord | <blashyrk> But the problem there is there are multiple gdexport variants |
07:11:33 | FromDiscord | <Elegantbeef> What do you have? |
07:11:35 | FromDiscord | <blashyrk> As defined by Godot itself, stuff like color_no_alpha, enum, flags, multiline etc etc |
07:11:47 | FromDiscord | <blashyrk> Like ~10 different variants |
07:11:48 | FromDiscord | <Elegantbeef> So those can be arguments to `pushGdExport` aswell |
07:11:55 | FromDiscord | <blashyrk> Soem accept params some not |
07:12:06 | FromDiscord | <Elegantbeef> I still fail to see the issue |
07:12:48 | FromDiscord | <blashyrk> sent a code paste, see https://play.nim-lang.org/#pasty=cfGNDzCH |
07:13:15 | FromDiscord | <blashyrk> But they all need different pragmas, can't apply the same one to all of them |
07:14:07 | FromDiscord | <Elegantbeef> well this is where I say to use Nim types instead of basic integers |
07:14:15 | FromDiscord | <Elegantbeef> `set[T]` exported is a `flag` |
07:14:26 | FromDiscord | <Elegantbeef> a `enum` is an enum |
07:14:36 | FromDiscord | <Elegantbeef> `int` is always just an int export |
07:14:51 | FromDiscord | <Elegantbeef> then it's a simpler operation |
07:15:03 | FromDiscord | <blashyrk> In Godot an enum can be either string or int |
07:15:15 | FromDiscord | <Elegantbeef> Right but aren't we writing Nim? |
07:15:15 | FromDiscord | <blashyrk> But i agree in general I'll think this through a bit more |
07:15:37 | FromDiscord | <blashyrk> Yeah but we need to support both for interop with gdscript/other Godot code |
07:15:40 | FromDiscord | <Elegantbeef> We're sending code to Godot so whether their enums are lost hippos in outspace is of no consequence 😄 |
07:16:07 | FromDiscord | <Elegantbeef> If you're in Nim and you write an enum I cannot see wanting to use a string on the other side, but maybe i'm just biased |
07:16:40 | FromDiscord | <Elegantbeef> But still that doesn't actually stop anything in hindsight |
07:16:51 | FromDiscord | <Elegantbeef> `groups` was not overidden |
07:16:55 | FromDiscord | <Elegantbeef> as such it still is applied |
07:17:57 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=OuqkKYOK |
07:18:01 | FromDiscord | <Elegantbeef> Works just fine |
07:18:52 | FromDiscord | <blashyrk> Yeah that could work |
07:18:58 | FromDiscord | <Elegantbeef> when you attempt to find whether your field is in a group you check if the field has `groups` otherwise you check where the last `pushGdExport` was, if it has a group and you do not you say this is apart of a group |
07:19:08 | FromDiscord | <blashyrk> Thanks! |
07:19:38 | FromDiscord | <Elegantbeef> You have to deal with some rambling before you get normal help |
07:19:46 | FromDiscord | <Elegantbeef> It's a part of the service here |
07:20:40 | FromDiscord | <blashyrk> Honestly I'm very thankful for the time both you and Phil invested into my silly problem |
07:20:46 | FromDiscord | <blashyrk> So thanks a lot! |
07:44:36 | FromDiscord | <Phil> Fair, still think the DSL approach might be neater for your users |
11:56:48 | * | coldfeet quit (Remote host closed the connection) |
12:30:01 | * | ryuukk quit (Remote host closed the connection) |
12:32:07 | * | ryuukk joined #nim |
12:36:29 | * | Batzy quit (Ping timeout: 252 seconds) |
12:36:57 | * | Batzy joined #nim |
13:04:38 | * | lucasta joined #nim |
13:09:38 | * | beholders_eye joined #nim |
13:13:04 | * | alexdaguy quit (Quit: WeeChat 4.4.2) |
14:25:30 | * | ryuukk quit (Remote host closed the connection) |
14:27:46 | * | ryuukk joined #nim |
14:36:05 | * | wikipedia quit (Read error: Connection reset by peer) |
14:39:20 | * | wikipedia joined #nim |
15:02:41 | * | arkanoid quit (Ping timeout: 248 seconds) |
15:16:11 | FromDiscord | <rakgew> has anybody used `libusbControTransfer` from libusb nim lib by any chance?↵with the lib I can list my devices and get their device handle fine,↵but when I want to send a command with `libusbControlTransfer` I would - different from my tests with python and rust libs - need to fill a parameter of length of the setup packet.↵how would I get that? |
15:17:07 | FromDiscord | <rakgew> ^^ in this lib\: https://github.com/nimious/libusb |
15:26:42 | FromDiscord | <rakgew> oh ok, nvm - it seems to be the length of the data buffeer that gets passed in. |
15:36:04 | * | ntat joined #nim |
15:50:00 | * | beholders_eye quit (Ping timeout: 260 seconds) |
15:58:51 | * | arkanoid joined #nim |
16:01:56 | FromDiscord | <rakgew> sent a long message, see https://pasty.ee/gSRpMdAd |
16:09:04 | FromDiscord | <lucidrains (Phil Wang)> hey all, finally may have an opportunity to use Nim to speed up some python code, and was wondering if anyone can recommend nimporter? or is it better to just use nimpy directly? |
16:09:54 | FromDiscord | <lucidrains (Phil Wang)> nimporter has a few open issues that suggest it may be heading towards being unmaintained. that's my only concern |
16:17:28 | FromDiscord | <rakgew> ok found it\:↵`var devHandle: ptr LibusbDeviceHandle = nil`↵`discard libusbOpen(device, addr devHandle)` |
16:23:12 | FromDiscord | <lucidrains (Phil Wang)> hmm, seems like happyx is just using nimpy, so prob best to just lean on that |
16:26:02 | FromDiscord | <rakgew> lucidrains (Phil Wang) \: last time I checked, both nimpy and nimporter worked fine for me, but that was also quite a few months back. |
16:26:37 | FromDiscord | <spotlightkid> How can I use `_exec` family functions in Nim on Windows? |
16:27:23 | FromDiscord | <rakgew> and now there is another brick wall - the last type↵mismatch for `libusbControlTransfer` - it wants a↵`ptr cuchar`↵but I get deprecated messages for cuchar and cannot pass my array `array[6,uint8]` - is there a way to cast it into that? |
16:28:34 | Amun-Ra | arrname[0].addr |
16:29:13 | FromDiscord | <lucidrains (Phil Wang)> rakgew\: thank you! couple months is pretty recent. maybe i'll give nimporter a shot then |
16:31:34 | FromDiscord | <rakgew> thank you - would that be the same as\:↵`cast[ptr cuchar](buffer)` that I just found?↵(<@709044657232936960_=41mun-=52a=5b=49=52=43=5d>) |
16:40:47 | Amun-Ra | that should work too |
16:42:58 | FromDiscord | <rakgew> ok, thank you \:-D |
16:43:33 | Amun-Ra | no worries :) |
16:56:56 | Amun-Ra | btw. cuchar is obsolete for byte |
16:57:00 | Amun-Ra | term* |
16:59:33 | FromDiscord | <rakgew> right - I get these deprecation warnings, but what else can I do if the lib requires it? |
17:00:06 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=bpsHWouQ |
17:00:10 | FromDiscord | <rakgew> hmm, maybe I could wrap that one function myself..(?) |
17:01:03 | Amun-Ra | nil derefernce should not pop up in stdlib |
17:01:32 | Amun-Ra | btw, you can find many warnings in stdlib code |
17:06:36 | FromDiscord | <xkonti> In reply to @Amun-Ra "nil derefernce should not": I'm not sure what that `nil` reference is here. There's no reference to a line of code where the issue is happening. If I put tests before that one, they won't be run. It's as if this error is happening before the code runs. |
17:10:04 | Amun-Ra | xkonti: there's somewhere |
17:10:48 | Amun-Ra | rakgew: you can replace cuchar with byte for cuchar is byte |
17:11:37 | Amun-Ra | and is two chars shorter, the reason I write byte instead of uint8 ;) |
17:12:20 | FromDiscord | <xkonti> In reply to @Amun-Ra "<@244832576215318528>: there's somewhere": I found this async test library: https://github.com/codex-storage/asynctest↵Magically fixed the problem 🙂 |
17:12:56 | Amun-Ra | nice :) |
17:46:12 | FromDiscord | <xkonti> In reply to @Amun-Ra "nice :)": Still, testing async stuff seems broken. If I compare same code running normally vs in tests, normally it runs no problem. Inside a test websocket connections get broken between executions of "await" :/ |
17:47:55 | Amun-Ra | I've never written anything serious in async nim :/ |
17:50:44 | FromDiscord | <fabric.input_output> do we have proper view types already? |
17:55:37 | FromDiscord | <Elegantbeef> They're experimental so kinda, but not really as they explode if you even attempt to look at them↵(@fabric.input_output) |
17:55:57 | FromDiscord | <fabric.input_output> it's joever |
18:05:28 | * | beholders_eye joined #nim |
18:49:51 | * | lucasta quit (Quit: Leaving) |
19:05:46 | * | ntat quit (Quit: Leaving) |
19:07:10 | * | beholders_eye quit (Read error: Connection reset by peer) |
19:08:44 | * | jjido joined #nim |
19:12:51 | * | beholders_eye joined #nim |
19:45:20 | * | lucasta joined #nim |
20:43:41 | * | beholders_eye quit (Read error: Connection reset by peer) |
20:49:17 | * | beholders_eye joined #nim |
21:31:33 | FromDiscord | <determiedmech1> unviewable types |
21:33:25 | * | jjido quit (Quit: My laptop has gone to sleep. ZZZzzz…) |
21:51:51 | * | beholders_eye quit (Read error: Connection reset by peer) |
21:54:56 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=gnXcqjgO |
21:57:37 | * | beholders_eye joined #nim |
22:09:03 | * | beholders_eye quit (Read error: Connection reset by peer) |
22:10:18 | FromDiscord | <Elegantbeef> There is no better way to write that |
22:10:55 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=YbNQYlwV |
22:12:35 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=TiOhHXtA |
22:13:18 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#pasty=sbKkzdti |
22:13:48 | FromDiscord | <xkonti> 🤔 |
22:14:58 | * | beholders_eye joined #nim |
22:15:52 | * | beholders_eye quit (Read error: Connection reset by peer) |
22:16:46 | FromDiscord | <Elegantbeef> Inside the LE version you'd put the shl first, but on the BE version you'd do nothing special |
22:17:00 | FromDiscord | <leorize> `endians2` by status handles all of that boring stuff for you btw |
22:17:51 | FromDiscord | <xkonti> sent a code paste, see https://play.nim-lang.org/#pasty=sjJTmlLj |
22:17:55 | FromDiscord | <xkonti> Endians 2? |
22:18:27 | FromDiscord | <leorize> https://github.com/status-im/nim-stew/blob/master/stew/endians2.nim |
22:18:28 | FromDiscord | <Elegantbeef> Right I was practically suggesting making the same thing as those to not grow the array weirdly |
22:18:38 | FromDiscord | <Elegantbeef> But it'd still probably grow normally |
22:18:46 | FromDiscord | <Elegantbeef> So it's probably a lost cause of not avoiding that 0-init |
22:19:48 | FromDiscord | <Elegantbeef> Really what you're doing was mostly fine |
22:19:49 | FromDiscord | <leorize> you really can't avoid 0-init due to destructor concerns tbh |
22:20:04 | FromDiscord | <leorize> if 2 bytes zero-init is an issue I think you have bigger problems |
22:21:18 | * | beholders_eye joined #nim |
22:23:41 | FromDiscord | <xkonti> Thanks for your help and opinions @ElegantBeef @leorize - I think I'll end up using the endians2 as it looks like it makes it dumb enough for me to comprehend 🤕 And it's not a problem with zeroing first. Just thought about checking if there are better ways to solve my problems 😄 |
22:24:06 | FromDiscord | <leorize> I'd recommend vendoring endians2 |
22:24:12 | FromDiscord | <leorize> stew is not versioned |
22:43:18 | * | lucasta quit (Ping timeout: 246 seconds) |
22:43:54 | * | beholders_eye quit (Read error: Connection reset by peer) |
22:43:58 | FromDiscord | <double_spiral> Is it possible to compile nim to wasm |
22:44:45 | FromDiscord | <Elegantbeef> Yes |
22:44:55 | FromDiscord | <Elegantbeef> You can use clang or emcc to do it |
22:45:05 | FromDiscord | <double_spiral> I see |
22:46:37 | FromDiscord | <Elegantbeef> https://github.com/beef331/wasm3/blob/master/wasmsources/config.nims this stolen config from treeform atleast shows the emcc path |
22:46:46 | FromDiscord | <double_spiral> This could make webdev enjoyable |
22:49:40 | * | beholders_eye joined #nim |
23:25:51 | * | disso-peach joined #nim |
23:31:22 | * | beholders_eye quit (Read error: Connection reset by peer) |
23:37:05 | * | beholders_eye joined #nim |
23:50:19 | * | beholders_eye quit (Read error: Connection reset by peer) |
23:56:25 | * | beholders_eye joined #nim |