00:00:00 | FromDiscord | <sOkam! 🫐> that's why i was searching for a execShellCmd alternative |
00:00:18 | FromDiscord | <sOkam! 🫐> In reply to @jviega "Yeah but doing sh": i couldn't find an alternative |
00:00:28 | FromDiscord | <sOkam! 🫐> thought i needed the sh -c |
00:00:43 | FromDiscord | <sOkam! 🫐> (edit) "-c" => "-c, becasue staticExec is just running the command like execCmd" |
00:00:48 | FromDiscord | <jviega> No, I don't know much about the javascript runtime, but I think it's semi-sandboxed |
00:01:18 | FromDiscord | <jviega> Certainly nobody's made functions like that available anyway, not that I've been able to fin |
00:01:18 | FromDiscord | <sOkam! 🫐> so it would need support from the VM itself to be output normally, i understand? |
00:01:19 | FromDiscord | <jviega> find |
00:01:24 | FromDiscord | <jviega> 100% |
00:01:32 | FromDiscord | <sOkam! 🫐> well, crap 😦 |
00:01:49 | FromDiscord | <jviega> There's no way I have ever been able to find to pass stdin down to a subprocess from nimscript |
00:02:02 | FromDiscord | <jviega> Or stdout/stderr |
00:03:36 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9f |
00:03:46 | FromDiscord | <sOkam! 🫐> that's without the sh -c |
00:03:55 | FromDiscord | <jviega> try staticExec() |
00:03:58 | FromDiscord | <jviega> It is what I use |
00:04:12 | FromDiscord | <sOkam! 🫐> docs say its an alias, but let me double check |
00:04:22 | FromDiscord | <jviega> Isn't it chdir on windows? |
00:04:51 | FromDiscord | <jviega> It says "cd not found" not "can't run a shell command" |
00:05:02 | FromDiscord | <sOkam! 🫐> i have no clue |
00:05:16 | FromDiscord | <sOkam! 🫐> cd is working for me on powershell |
00:05:33 | FromDiscord | <jviega> Maybe it doesn't use powershell, but the old cmd.exe |
00:05:33 | FromDiscord | <sOkam! 🫐> yeah it works |
00:05:38 | FromDiscord | <jviega> 🤷♂️ |
00:06:04 | FromDiscord | <sOkam! 🫐> no it works |
00:06:07 | FromDiscord | <sOkam! 🫐> (edit) "no" => "no," |
00:06:12 | FromDiscord | <sOkam! 🫐> cd works on cmd too |
00:06:40 | FromDiscord | <sOkam! 🫐> maybe i didn't --recurse-submodules, like an dummy. that would check out |
00:07:05 | FromDiscord | <jviega> heh |
00:32:46 | FromDiscord | <Chronos [She/Her]> Do y'all think that I should set Zig to be the default for compiling Nim? |
00:34:33 | FromDiscord | <jviega> What's the advantage? |
00:35:55 | FromDiscord | <sOkam! 🫐> In reply to @jviega "What's the advantage?": cross-compilation out of the box, no extra setup |
00:36:09 | FromDiscord | <sOkam! 🫐> no installing 3 different compilers |
00:36:47 | FromDiscord | <sOkam! 🫐> the benefit is clearer for C and C++, but its still really good for nim |
00:37:14 | FromDiscord | <jviega> Ah. Clang doesn't cross-compile everywhere?? I really don't do Windows, and most of the world just fire off multiple native builders 🙂 |
00:37:18 | FromDiscord | <Chronos [She/Her]> Yeah, easy as hell crosscompilation is a big one |
00:37:27 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Ah. Clang doesn't cross-compile": It's a lot more painful than Zig makes it |
00:38:20 | FromDiscord | <jviega> Sure |
00:38:39 | FromDiscord | <sOkam! 🫐> honestly, zigcc is what a modern compiler should look like, imo |
00:38:43 | FromDiscord | <Chronos [She/Her]> Also doesn't Zig also have incremental compilation |
00:38:59 | FromDiscord | <sOkam! 🫐> yeah it does, but i don't think it can be made to work with nim, since it already has it |
00:39:14 | FromDiscord | <sOkam! 🫐> for C, yes it does. and also dependency resolution, so no need for -MMD and friends |
00:39:34 | FromDiscord | <jviega> That's true for basically every important C compiler |
00:39:35 | FromDiscord | <Chronos [She/Her]> Nim doesn't have incremental compilation? |
00:39:50 | FromDiscord | <Chronos [She/Her]> Ah, Clang has that too? Nvm |
00:40:39 | FromDiscord | <jviega> Clang is by far the premier platform for compilers these days. |
00:40:50 | FromDiscord | <jviega> It's got a deep, rich ecosystem |
00:41:32 | FromDiscord | <Chronos [She/Her]> Zig cc actually just uses clang and adds some features to it |
00:42:20 | FromDiscord | <jviega> That's what I would have guessed |
00:42:25 | FromDiscord | <Chronos [She/Her]> I wonder if there's any point to using the `mold` linker too hm |
00:43:53 | FromDiscord | <sOkam! 🫐> In reply to @jviega "That's true for basically": then maybe i dealt with outdated AF buildsystems that allow for special flags for each separate file (like they require most times) |
00:44:08 | FromDiscord | <sOkam! 🫐> but what I found on gcc it definitely does not seem like it supports that |
00:44:19 | FromDiscord | <Chronos [She/Her]> It won't really benefit Nim itself much since that's what slows it down, but large Nim projects that generate large C outputs may benefit |
00:44:21 | FromDiscord | <sOkam! 🫐> if clang does, then I don't know about it |
00:44:24 | FromDiscord | <Chronos [She/Her]> Hm.... |
00:45:36 | FromDiscord | <jviega> gcc is an old tire fire |
00:45:38 | FromDiscord | <Chronos [She/Her]> Only doing this out of boredom too lol |
00:46:16 | FromDiscord | <jviega> It used to have a great optimizer, but it became a really unmaintainable behemoth close to 30 years ago |
00:47:27 | FromDiscord | <sOkam! 🫐> i figure it happens with all huge programs 🤷♂️ |
00:47:39 | FromDiscord | <jviega> Not even remotely |
00:47:41 | FromDiscord | <sOkam! 🫐> wouldn't surprise me if clang isn't, or doesn't become, like that |
00:49:03 | * | xet7 quit (Ping timeout: 246 seconds) |
00:49:13 | FromDiscord | <jviega> No, they made a very conscious choice to make the compiler as monolithic as possible, because they didn't want commercial analysis tools to profit from their "free" software; people were starting to just rip out the front end, output to a file, and circumvent the gpl quite easily |
00:51:26 | FromDiscord | <sOkam! 🫐> oh i see |
00:54:24 | FromDiscord | <Chronos [She/Her]> I am using `mold` and `zigcc` for building now :) |
01:23:43 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9m |
01:24:37 | FromDiscord | <Chronos [She/Her]> Yeah haha |
01:25:57 | FromDiscord | <sOkam! 🫐> personally, one of the things I like the most about zigcc is how easy it makes the ux of building a buildsystem, because its so self-contained and good to work with with its defaults↵if it wasn't like that, I would definitely give it a serious try |
01:26:20 | FromDiscord | <sOkam! 🫐> i'm just beyond sick of maintaining over-complicated buildsystems. I had enough of them for the rest of my years |
01:27:14 | FromDiscord | <michaelb.eth> isn't zig cc going away? or maybe I misunderstood, but there was that GitHub issue where the maintainer of the lang said they're moving away from LLVM and I thought I remember reading that would mean zig cc would become a thing of the past |
01:27:27 | FromDiscord | <sOkam! 🫐> for nim its probably a lot easier to implement, just depend on that `zigcc` package, and send the nimc command with mold as a linker, i imagine |
01:27:41 | FromDiscord | <sOkam! 🫐> In reply to @michaelb.eth "isn't zig cc going": that's different completely |
01:28:23 | FromDiscord | <sOkam! 🫐> they are moving away from llvm -over-the-years- as they can slowly do so↵and they are comitting to maintaining zigcc as a separate package just like right now, so not abandoning it |
01:29:01 | FromDiscord | <sOkam! 🫐> andrew had to clarify a LOT, because that post created a lot of nonsense rumours on the webs |
01:30:51 | FromDiscord | <michaelb.eth> gotcha, thanks for your clarification here 😄 |
01:34:00 | * | _________ quit (Ping timeout: 246 seconds) |
01:35:40 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "for nim its probably": I just added it into the system wide config.nims lol |
01:36:05 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4F9n |
01:36:15 | FromDiscord | <Chronos [She/Her]> I would also set the default for clang++ but idk how to so that on the command line |
01:38:59 | * | rockcavera quit (Remote host closed the connection) |
02:20:59 | * | Batzy quit (Ping timeout: 250 seconds) |
02:28:51 | FromDiscord | <bhunao> Hi, how do i create a table that my keys are a type that i still don't have? |
02:29:48 | FromDiscord | <Elegantbeef> What? |
02:30:03 | FromDiscord | <odexine> that -> where |
02:31:29 | FromDiscord | <bhunao> i want to do something like this↵↵proc my_func(component) =↵ my_table[component.type] = 1 |
02:31:42 | FromDiscord | <Elegantbeef> You cannot do that |
02:31:58 | FromDiscord | <bhunao> oh |
02:32:01 | FromDiscord | <Elegantbeef> Nim types are not runtime values they're static |
02:32:24 | FromDiscord | <bhunao> i guess i'm a little more lost now |
02:32:35 | FromDiscord | <bhunao> anyway i can do something like that? |
02:32:46 | FromDiscord | <bhunao> with some other type |
02:32:59 | FromDiscord | <bhunao> or i always need to know the types? |
02:33:03 | FromDiscord | <Elegantbeef> Convert to a string, use some runtime id system |
02:33:24 | FromDiscord | <Elegantbeef> You want to type erase key of the table |
02:33:40 | FromDiscord | <Elegantbeef> So they have to all be the same type you can do like `myTable[$theType] = 1` |
02:34:06 | FromDiscord | <bhunao> what is a runtime id system? |
02:34:19 | FromDiscord | <Elegantbeef> Some system that converts a type to an id |
02:34:41 | FromDiscord | <bhunao> i guess is this what im trying to do already then |
02:34:48 | FromDiscord | <Elegantbeef> IIRC we talked about ECS before and I suggested using `getTypeInfo` which is one way of doing this GUID per type |
02:35:11 | FromDiscord | <bhunao> lol, i'm trying to do an ECS |
02:35:23 | FromDiscord | <Chronos [She/Her]> ULID doesn't work as GUID in my chat platform TwT |
02:35:36 | FromDiscord | <Chronos [She/Her]> But don't really know how to modify it to make it work better- |
02:35:56 | FromDiscord | <odexine> why not? |
02:36:38 | FromDiscord | <Elegantbeef> Like I said last time bhunao `getTypeInfo` returns a `pointer` to type information, that pointer is already unique per type |
02:36:45 | FromDiscord | <bhunao> In reply to @Elegantbeef "Convert to a string,": gonna try it |
02:37:11 | FromDiscord | <bhunao> In reply to @Elegantbeef "Like I said last": then i set the table type as pointer? |
02:37:26 | FromDiscord | <bhunao> never used a pointer, i came from python |
02:37:31 | FromDiscord | <Elegantbeef> Yea `Table[pointer, int]` would wrok fine |
02:37:40 | FromDiscord | <Elegantbeef> You arent using the pointer as a pointer, you're using it as an integer really |
02:38:25 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "why not?": If there's a ton of instances, over time IDs will definitely start clashing |
02:38:35 | FromDiscord | <Chronos [She/Her]> It's not a problem right now, but in the future it would be |
02:39:17 | FromDiscord | <Chronos [She/Her]> Tho one solution is to use MAC addresses |
02:39:43 | FromDiscord | <bhunao> In reply to @Elegantbeef "Yea `Table[pointer, int]` would": it worked, i think at least no errors |
02:39:50 | FromDiscord | <bhunao> (edit) "think" => "think," |
02:41:45 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9v |
02:42:05 | FromDiscord | <sOkam! 🫐> just configure them globally instead of per-project, and you should be good |
02:44:52 | FromDiscord | <odexine> In reply to @chronos.vitaqua "If there's a ton": does it happen practically? |
02:45:06 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "just configure them globally": I already am lol |
02:45:09 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "does it happen practically?": Wdym? |
02:45:29 | FromDiscord | <Chronos [She/Her]> I mean obviously it probably won't happen any time soon, but my mind just can't stay off those edge-cases |
02:50:37 | FromDiscord | <Chronos [She/Her]> Any unique value on each system that I can grab? Mac address is one but doesn't seem to be an easy way to grab that in Nim |
02:53:04 | FromDiscord | <odexine> is it useful to think about something that will practically never happen |
02:53:25 | NimEventer | New post on r/nim by Impossible-Thanks408: Why to Learn Nim?, see https://reddit.com/r/nim/comments/167qzdl/why_to_learn_nim/ |
02:53:39 | FromDiscord | <odexine> if it practically never happens, instead of redesigning the whole system to remove the edge cases, wouldn't it be better to handle those edge cases exceptionally? |
02:53:54 | FromDiscord | <odexine> it would save time and effort |
02:55:10 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "if it practically never": One issue where it wouldn't be possible to solve it though, is users |
02:55:24 | FromDiscord | <Chronos [She/Her]> Users are the only location where this matters and why we can't stop thinking about it |
02:55:24 | FromDiscord | <odexine> solve isnt handle |
02:55:31 | FromDiscord | <odexine> rather backwards, handle isnt solve |
02:55:47 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "is it useful to": Blame obsessive brain |
02:55:52 | FromDiscord | <odexine> again does it practically matter, will it happen commonly enough to be a real problem |
02:55:59 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "solve isnt handle": Wouldn't be able to handle this either |
02:56:10 | FromDiscord | <odexine> why not? erroring out gracefully is handling |
02:56:17 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "again does it practically": Probably not but having design flaws in a system is just, annoying |
02:56:24 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "why not? erroring out": It's a chat platform |
02:56:26 | FromDiscord | <odexine> all systems will always have design flaws |
02:56:31 | FromDiscord | <Chronos [She/Her]> If your client errors outz that's an issue |
02:56:37 | FromDiscord | <odexine> not always? |
02:56:46 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "all systems will always": Design flaws that can be fixed that won't become a massive issue |
02:56:52 | FromDiscord | <odexine> there are things that legitimately are impossible to "solve" |
02:56:56 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "not always?": If the server crashes that's an issue |
02:57:02 | FromDiscord | <Chronos [She/Her]> This isn't impossible to solve tho |
02:57:05 | FromDiscord | <odexine> you're conflating things |
02:57:18 | FromDiscord | <Chronos [She/Her]> Users will be stored in a table, by ID |
02:57:20 | FromDiscord | <odexine> sure, you do you |
02:57:26 | FromDiscord | <Chronos [She/Her]> If two users have the same ID that's an issue |
02:57:30 | FromDiscord | <odexine> yes |
02:57:37 | FromDiscord | <Chronos [She/Her]> Oh well |
02:57:42 | FromDiscord | <Chronos [She/Her]> I'll figure it out later or something |
02:57:46 | FromDiscord | <odexine> and you solve that by retrying to create the user when an error (same id) occurs |
02:59:07 | FromDiscord | <odexine> btw you cannot reliably get a unique identifier on a system, that would be a fingerprinting (privacy) problem |
02:59:19 | FromDiscord | <odexine> especially if you're running in browser |
02:59:39 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "and you solve that": That's an issue, can't do that with two separate account systems since they're blind to eachother (doing federation) |
03:00:04 | FromDiscord | <odexine> two separate account systems should be isolated in "id space" |
03:00:39 | FromDiscord | <odexine> one user having the same ID as another but with differing account providers should be a nonissue |
03:00:51 | FromDiscord | <odexine> as you will know that theyre of different account providers... |
03:02:31 | FromDiscord | <Chronos [She/Her]> Hm |
03:02:39 | FromDiscord | <Chronos [She/Her]> Yeah alright then, thanks Rika |
03:02:48 | FromDiscord | <Chronos [She/Her]> I won't think too hard about this anymore |
03:12:14 | FromDiscord | <jviega> @Chronos [She/Her] IIRC, ULIDS have 45 bits of timestamp and 83 bits of randomness |
03:12:40 | FromDiscord | <jviega> So the point where a collision is worrisome is after about 2^41 ULIDs |
03:13:05 | * | azimut joined #nim |
03:13:59 | FromDiscord | <jviega> That's 4,398,046,511,104 ULIDs before there's a 50% chance of a single collision |
03:16:05 | FromDiscord | <odexine> and i assume that's if you generate them within one bit's worth of time in the timestampo |
03:16:07 | FromDiscord | <odexine> (edit) "timestampo" => "timestamp" |
03:16:21 | FromDiscord | <jviega> No, the timestamp is 45 bits |
03:16:59 | FromDiscord | <jviega> If you did 128 bits, you'd have the comfort of 2^64 ULIDs |
03:18:55 | FromDiscord | <odexine> i thought you got 2^41 from 83 randomness bits halved (birthday paradox) and then that's per (time span between one bit of timestamp)? |
03:20:49 | FromDiscord | <jviega> The birthday paradox is right, but that gives you the number you need till you have a 50% chance of finding two items colliding, out of ALL items |
03:20:59 | FromDiscord | <jviega> Think of each ULID as a person giving their birthday. |
03:21:49 | FromDiscord | <odexine> :HaaNotlikethis: |
03:22:08 | FromDiscord | <odexine> isee |
03:22:51 | FromDiscord | <odexine> so find 50% chance of finding n (n > 1) items colliding kinda thing? |
03:24:25 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "<@524288464422830095> IIRC, ULIDS have": 48 bit timestamp and 80 bit randomness |
03:25:09 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "That's 4,398,046,511,104 ULIDs before": The spec also says if a ULID is generated in the same timestamp as another, you increment the randomness value rather than create a new random value |
03:25:23 | FromDiscord | <jviega> I don't understand the question. If you have 2^128 equally possible outcomes, to find the number of items you need to generate, you essentially half the log, so it's 2^64 before any TWO collide |
03:25:59 | FromDiscord | <Chronos [She/Her]> Was mostly just be being kinda stupid lol |
03:26:21 | FromDiscord | <jviega> Why do you even care about it? The only reason to use a ULID beyond compatability is that they're time sortable |
03:26:21 | FromDiscord | <Chronos [She/Her]> Me |
03:26:24 | FromDiscord | <odexine> OH then you accumulate it every time you generate |
03:26:26 | FromDiscord | <odexine> ? |
03:26:34 | FromDiscord | <jviega> For user IDs, just base32 encode a 128 bit random value |
03:26:38 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "OH then you accumulate": Yeah until the timestamp changes |
03:26:53 | FromDiscord | <odexine> In reply to @chronos.vitaqua "Yeah until the timestamp": no i was thinking about what jtvsaid lol |
03:27:04 | FromDiscord | <odexine> In reply to @jviega "For user IDs, just": or just UUID if you want |
03:27:28 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Why do you even": Stores the timestamp, that's the exact reason I'm using it, otherwise I'd use my own format lol |
03:27:41 | FromDiscord | <jviega> UUIDs are a bit fugly but sure |
03:27:49 | FromDiscord | <jviega> Why do you need the timestamp in the userid? |
03:28:04 | FromDiscord | <jviega> Why not just keep two separate fields? |
03:28:08 | FromDiscord | <odexine> ? just put it in another column? |
03:28:18 | FromDiscord | <Chronos [She/Her]> Convenience? |
03:28:28 | FromDiscord | <odexine> its LESS convenient to do what you're doing isnt it |
03:28:34 | FromDiscord | <jviega> I don't find it to be more convenient if you care to extract a date from a ULID |
03:28:54 | FromDiscord | <jviega> It's much simpler to just pick a random 128-bit value and go. |
03:28:58 | FromDiscord | <Chronos [She/Her]> It's much more convenient to be able to have the timestamp there if needed (an example would be channel creation or message creation) |
03:29:08 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "its LESS convenient to": Now I'm not fussed about conflicts so it's fine |
03:29:24 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "I don't find it": The library would parse it, in my head at least |
03:29:33 | FromDiscord | <jviega> Yeah, and if you want it all in one data blob, you can encode 128 bits of randomness with the date |
03:29:47 | FromDiscord | <odexine> you'd be spending so much more on parse over just asking for another column i'd say |
03:30:09 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9E |
03:30:36 | FromDiscord | <odexine> sent a code paste, see https://play.nim-lang.org/#ix=4F9F |
03:30:39 | FromDiscord | <odexine> iirc that's the correct way to do it |
03:31:02 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Yeah, and if you": Ig so |
03:31:21 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9G |
03:31:25 | FromDiscord | <odexine> not sure then |
03:32:10 | FromDiscord | <Chronos [She/Her]> May do that then, if norm supports dates and stuff (which I wouldn't see why it wouldn't support that) |
03:32:21 | FromDiscord | <sOkam! 🫐> that's the syntax the manual is giving too, but.. its not ignoring it for some reason |
03:32:33 | FromDiscord | <sOkam! 🫐> it also mentions something about "in a push pragma like. ..." |
03:35:42 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9H |
03:36:29 | FromDiscord | <Elegantbeef> Might not be able to disable this warning in code |
03:36:32 | FromDiscord | <Elegantbeef> Is this a generic? |
03:37:59 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F9I |
03:38:09 | FromDiscord | <Elegantbeef> It's generic it has `static` |
03:38:17 | FromDiscord | <sOkam! 🫐> oh |
03:38:18 | FromDiscord | <odexine> `str`? |
03:38:47 | FromDiscord | <Elegantbeef> You can try the warning on/off inside the proc, but doubt it'd work |
03:38:48 | FromDiscord | <sOkam! 🫐> (edit) "https://play.nim-lang.org/#ix=4F9I" => "https://play.nim-lang.org/#ix=4F9J" |
03:38:48 | FromDiscord | <sOkam! 🫐> In reply to @odexine "`str`?": fixed |
03:39:14 | FromDiscord | <sOkam! 🫐> you will also ask me about prnt and echof, and they are wrapped C functions for cstrings |
03:39:16 | FromDiscord | <Elegantbeef> Though I'd just say use `when` `else` |
03:39:40 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Though I'd just say": isn't the code implying an else? |
03:39:41 | FromDiscord | <odexine> In reply to @heysokam "you will also ask": i wouldnt have lol str was just suspicious |
03:39:49 | FromDiscord | <odexine> In reply to @heysokam "isn't the code implying": yes but nim doesn t analyse it |
03:39:58 | FromDiscord | <Elegantbeef> It's implying else, sure but that's not what Nim sees |
03:40:02 | FromDiscord | <Elegantbeef> It sees `return; ....` |
03:40:02 | FromDiscord | <sOkam! 🫐> oh |
03:40:08 | FromDiscord | <sOkam! 🫐> kk |
03:41:42 | FromDiscord | <sOkam! 🫐> when else worked, tyty |
03:44:07 | FromDiscord | <sOkam! 🫐> is there a way to say something like `--warningAsError:ALL:on` or similar? |
03:44:40 | FromDiscord | <sOkam! 🫐> manual mentions that you can enable-disable them all at once, but not mark them as errors all at once. was wondering if there is something else 🤔 |
03:45:53 | FromDiscord | <odexine> try that? `all` lowercase |
03:46:22 | FromDiscord | <sOkam! 🫐> hmm |
03:47:02 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix= |
04:04:12 | FromDiscord | <nnsee> In reply to @chronos.vitaqua "It's much more convenient": fwiw the timestamps in uuids aren't really meant for actually storing timestamps, but rather easy sorting of uuids in chronological order |
04:08:25 | FromDiscord | <Chronos [She/Her]> In reply to @nnsee "fwiw the timestamps in": Yeah I'm aware |
04:20:21 | FromDiscord | <cedb> anyone ever tried to build OCI images with nim? |
04:20:50 | FromDiscord | <cedb> _cedb really hates buildah (and golang in general)_ |
04:21:15 | FromDiscord | <cedb> besides the bindings for the storage it doesnt look really hard just sort of tedious |
04:21:45 | * | cedb left #nim (WeeChat 4.0.4) |
05:04:23 | * | _________ joined #nim |
06:12:28 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Fah |
06:12:40 | FromDiscord | <sOkam! 🫐> i mean... how is varargs string not a varargs string? 🧩 |
06:14:19 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Fai |
06:17:05 | FromDiscord | <huantian> which line in the block is the errro on? |
06:17:08 | FromDiscord | <Elegantbeef> It's ambiguous which one you want I imagine |
06:17:18 | FromDiscord | <huantian> ohhh yeah |
06:17:46 | FromDiscord | <Elegantbeef> `log(level, false, args)` is equally `varargs[string, `$`]` and `bool, varargs[string, `$`]` |
06:17:55 | FromDiscord | <Elegantbeef> Whoops |
06:18:16 | FromDiscord | <Elegantbeef> sent a code paste, see https://play.nim-lang.org/#ix=4Faj |
06:18:43 | FromDiscord | <sOkam! 🫐> ohhh |
06:19:04 | FromDiscord | <sOkam! 🫐> true because flush passes as one of the varargs, damn |
06:19:11 | FromDiscord | <Elegantbeef> Probably can do `flush = false` to override that |
06:19:31 | FromDiscord | <Elegantbeef> inside the `logger.log` call of course |
06:19:32 | FromDiscord | <sOkam! 🫐> but then how do you define the non-requiring flush alternative? |
06:19:52 | FromDiscord | <sOkam! 🫐> oh you mean explicitely calling |
06:19:57 | FromDiscord | <sOkam! 🫐> (edit) "explicitely" => "explicitly" |
06:20:55 | FromDiscord | <sOkam! 🫐> I guess its fine, mandatory spelling the flush variable is actually good for the api |
06:29:11 | * | azimut_ joined #nim |
06:29:12 | * | azimut quit (Ping timeout: 246 seconds) |
06:36:12 | * | skulk quit (Ping timeout: 245 seconds) |
06:37:46 | FromDiscord | <sOkam! 🫐> finally getting rid of that dreaded technical debt. I payed my dues!! 🥳 https://media.discordapp.net/attachments/371759389889003532/1147420080951537715/image.png |
06:42:50 | NimEventer | New Nimble package! nulid - A ULID implementation in Nim!, see https://github.com/Yu-Vitaqua-fer-Chronos/NULID |
06:54:22 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4Fas |
07:31:56 | * | nmz- quit (Ping timeout: 248 seconds) |
07:46:35 | FromDiscord | <terrygillis> Is there a guide to reading the profiling result from nimprof? I read the docs and a blog post but they seem to just gloss over it. I know it’s a stack trace but there are ‘entries’ and numbers and ratios and percentages that I can’t really make sense of. |
07:47:20 | FromDiscord | <odexine> The big numbers are usually “how many times the function was called” |
07:47:44 | FromDiscord | <odexine> The percentages are “what % of all the calls were of this function” |
07:48:28 | FromDiscord | <terrygillis> what do entries mean? |
07:50:04 | FromDiscord | <terrygillis> also what does ratio like 2183/2207 indicate? sometimes the denominator is higher and other vice versa |
07:50:18 | FromDiscord | <odexine> I don’t remember the precise output, do you mind pasting a few lines for me to read? |
07:56:55 | FromDiscord | <terrygillis> sent a code paste, see https://play.nim-lang.org/#ix=4FaH |
07:58:38 | FromDiscord | <m4ul3r> sent a code paste, see https://play.nim-lang.org/#ix=4FaI |
07:58:47 | FromDiscord | <m4ul3r> (edit) "https://play.nim-lang.org/#ix=4FaI" => "https://play.nim-lang.org/#ix=4FaJ" |
07:58:54 | FromDiscord | <m4ul3r> file does exist |
07:59:00 | FromDiscord | <sOkam! 🫐> probably because of the @ |
07:59:20 | FromDiscord | <m4ul3r> ah windows, hmm how to handle that? |
07:59:55 | FromDiscord | <sOkam! 🫐> does it work if you escape the caracter? |
08:00:07 | FromDiscord | <sOkam! 🫐> dont know how to do it, just throwing ideas |
08:01:11 | FromDiscord | <m4ul3r> doesn't seem to work |
08:07:25 | FromDiscord | <m4ul3r> I'm able to run `os.execShellCmd("dir " & fileName)` on the string |
08:14:04 | FromDiscord | <m4ul3r> I can jankly just read it with powershell :blobshrug: |
08:40:42 | FromDiscord | <enthus1ast> @m4ul3r and with just "/" ? |
08:41:20 | FromDiscord | <enthus1ast> we also have a `/` proc that can combine path's |
08:52:17 | FromDiscord | <odexine> sent a code paste, see https://paste.rs/lLUMD |
08:52:43 | FromDiscord | <odexine> In any case, this doesn’t measure time spent in a function |
08:52:49 | FromDiscord | <m4ul3r> In reply to @enthus1ast "<@186968592544301058> and with just": I'm passing in a string to open, `/` doesn't seem to work either |
09:00:11 | FromDiscord | <griffith1deadly> Does --stacktrace:on degrade performance much in release mode? I'm just trying to make a CrashReport, something like the system from Minecraft |
09:19:19 | FromDiscord | <odexine> It degrades performance by a good amount I would say |
09:19:38 | FromDiscord | <odexine> Test if it’s too much |
09:21:25 | FromDiscord | <griffith1deadly> hmm, looks like I'll have to do a workaround for this. i'll still be able to manage exceptions in the main loop |
09:51:25 | * | nyeaa492842301 quit (Quit: The Lounge - https://thelounge.chat) |
09:52:46 | * | nyeaa492842301 joined #nim |
11:18:38 | * | PMunch joined #nim |
12:07:06 | PMunch | Hmm, the warning "unsafe conversion to 'cstring' from 'ptr char'" which will become an error in the future. How are we supposed to tell Nim that it's okay? |
12:08:18 | PMunch | In my case I have creating a string with `newString` and I need to pass it to a C function which will populate a string. So I pass it `result[0].addr` and then after the call I properly set the length of the string based on what was put in it. |
12:41:17 | * | ntat joined #nim |
12:49:30 | FromDiscord | <.destynova> ^ is it something to do with overloading? Do you still get the error if you remove/rename the top definition of `log`, or the bottom one? |
13:02:39 | * | nmz joined #nim |
13:06:06 | FromDiscord | <kingterrytheterrible12> gang |
13:06:18 | FromDiscord | <kingterrytheterrible12> can nim qml be compiled for android |
13:07:16 | * | nullie left #nim (WeeChat 2.8) |
13:08:06 | * | tk quit (Server closed connection) |
13:08:17 | * | tk joined #nim |
13:14:13 | FromDiscord | <ringabout> In reply to @PMunch "Hmm, the warning "unsafe": You can use `cast[cstring](...)`. |
13:14:40 | PMunch | @kingterrytheterrible12, Nim QML relies on DOtherSide which seems to only support Windows and Linux |
13:14:54 | PMunch | @ringabout, ah, so I just have to explicitly cast it |
13:14:59 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "<@655759729477287956>, Nim QML relies": what are my options for running nim on mobile |
13:15:09 | PMunch | I tried `result[0].addr.cstring` but that also threw the same warning |
13:15:11 | FromDiscord | <kingterrytheterrible12> or android specifically |
13:16:07 | PMunch | @kingterrytheterrible12, this came up recently on Reddit: https://www.reddit.com/r/nim/comments/ynv5fz/is_it_possible_to_make_android_apps_with_nim/ |
13:17:15 | PMunch | There are also these two projects: https://github.com/GordonBGood/NimHelloJNI and https://github.com/akavel/hellomello/tree/master |
13:17:29 | PMunch | If we can somehow merge those two I think we'd be in good shape |
13:18:17 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "There are also these": the whole point of me using nim is to not use java |
13:18:27 | FromDiscord | <kingterrytheterrible12> the android DX is so horrible |
13:18:33 | PMunch | DX? |
13:18:39 | PMunch | Developer Experience? |
13:19:08 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "Developer Experience?": yes |
13:20:34 | PMunch | The problem is that every app on Android kinda has to start through the JVM. You have the JNI (Java Native Interface I believe) which allows you to run native code, and this is where Nim comes it. Nim would compile to native code, then you need a small Java shim to basically just hand everything over to Nim. The hellomello project I linked above is all about building a Dalvik binary which properly runs under the JVM without ever having to install the |
13:20:34 | PMunch | Java/Android toolchains |
13:21:15 | PMunch | The NimHelloJNI example is mostly to interface between Nim and the JNI in order to do certain things which are only available from Java, such as using the native UI toolkit |
13:22:17 | PMunch | Currently the easiest way to build Nim Android apps would probably be to use SDL and your own UI toolkit. I've created an Android game in Nim before, it was pretty easy to set up. |
13:23:09 | PMunch | The alternative would be to find some kind of Android skeleton app which just wrapped a website and use Nim compiled to JS to run in the embedded browser |
13:24:06 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "The alternative would be": this cannot work due to me needing to capture microphone |
13:24:41 | PMunch | If we somehow took hellomello and NimHelloJNI and fused them together we could potentially have a library which you could use without having to grab the Java SDK and still be able to interface with everything in the phone |
13:24:54 | PMunch | @kingterrytheterrible12, not sure why any of that would limit you from using the microphone.. |
13:25:27 | PMunch | The app would have microphone permissions in its manifest, so both the web-app and the SDL app should be able to read from the microphone |
13:25:45 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "<@655759729477287956>, not sure why": bc i need to take the input, pass it to openai whisper (C++ port) then do things with the input then play the audio back to the user |
13:25:49 | PMunch | The web-app through HTML5 microphone APIs and SDL probably has some microphone wrapper thing |
13:26:17 | PMunch | Ah, then you would probably have to at least have some kind of native component |
13:26:36 | PMunch | Not sure if the skeleton web-app things have the ability to run a background native app, but maybe |
13:36:34 | FromDiscord | <sOkam! 🫐> In reply to @PMunch "There are also these": whats the benefit of one over the other? |
13:36:49 | FromDiscord | <sOkam! 🫐> like, what features are to keep from each of them? |
13:40:10 | * | ced1 joined #nim |
13:45:55 | FromDiscord | <kingterrytheterrible12> In reply to @PMunch "The web-app through HTML5": nah Qt quick is the way to go ngl |
13:45:59 | FromDiscord | <kingterrytheterrible12> with C++ |
13:56:33 | FromDiscord | <Chronos [She/Her]> In reply to @kingterrytheterrible12 "yes": You'd have to use NativeActivity somehow, I'm just not sure how |
14:08:06 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "There are also these": I wonder if the JNI could be replaced with JNim easily |
14:27:32 | * | jmdaemon quit (Ping timeout: 246 seconds) |
14:37:08 | FromDiscord | <jviega> In reply to @PMunch "In my case I": I've been declaring the C interface to take void and then pass in a pointer |
14:40:43 | FromDiscord | <alohaer> Would this be the best channel to ask a question about an error I'm having with a nim program I am trying to write? |
14:45:26 | FromDiscord | <kots> yes |
14:58:49 | FromDiscord | <kingterrytheterrible12> In reply to @chronos.vitaqua "You'd have to use": or fuck android dev |
14:59:02 | FromDiscord | <kingterrytheterrible12> im just gonna use regular desktop dev |
14:59:09 | FromDiscord | <kingterrytheterrible12> not touching mobile ever again |
15:01:44 | FromDiscord | <griffith1deadly> How do you shut the compiler up with "can have an unlisted effect: RootEffect"? |
15:04:56 | FromDiscord | <alohaer> sent a code paste, see https://play.nim-lang.org/#ix=4FcN |
15:06:21 | FromDiscord | <alohaer> (edit) "https://play.nim-lang.org/#ix=4FcN" => "https://play.nim-lang.org/#ix=4FcO" |
15:09:29 | FromDiscord | <kingterrytheterrible12> after exploring multiple GUI frameworks electron isnt that bad after all |
15:14:47 | FromDiscord | <sOkam! 🫐> In reply to @alohaer "I'm trying to follow": how are you using `ref`, `seq` and `string` without a GC at all?↵those are exclusively GC'ed objects, they cannot be used without a GC |
15:15:42 | FromDiscord | <alohaer> I didn't know that, I just set --gc:None |
15:16:17 | FromDiscord | <sOkam! 🫐> In reply to @alohaer "I didn't know that,": gc:none means no dynamic objects, which rules out like 75-90% of the stdlib |
15:17:30 | FromDiscord | <sOkam! 🫐> meaning, you cannot use gc:none as a measure of your application behavior, basically |
15:17:42 | FromDiscord | <sOkam! 🫐> the issue lies somewhere else |
15:17:51 | FromDiscord | <alohaer> Okay, I wasn't intending to use no GC, I was just trying to see if changing could help me find the issue. |
15:18:28 | FromDiscord | <sOkam! 🫐> makes sense |
15:18:56 | FromDiscord | <sOkam! 🫐> do you have the context around where the issue happens? what's the error -with- gc active and your regular code? |
15:19:31 | NimEventer | New thread by ploxotnuj1: Is it possible to make an extension for the browser on nim-lang?, see https://forum.nim-lang.org/t/10454 |
15:20:30 | FromDiscord | <sOkam! 🫐> @alohaer https://play.nim-lang.org this would be very useful, if you application can fit in there |
15:22:23 | qwr | all these gc'd objects work perfectly well with gc:none, they just won't be deallocated before exit, for utilities with short runtime it can be perfectly ok |
15:23:36 | qwr | in fact, it might give exactly the same result as --mm:markAndSweep in that case |
15:25:08 | * | ced1 is now known as cedb |
15:26:38 | FromDiscord | <alohaer> I've shared here, but it is multiple files so you cannot run it https://play.nim-lang.org/#ix=4Fd1 |
15:28:00 | FromDiscord | <sOkam! 🫐> In reply to @alohaer "I've shared here, but": yeah seems a bit lacking in context to give any help↵can you paste the error you are getting -with- gc? |
15:28:36 | FromDiscord | <alohaer> It is at the bottom of play-nim |
15:29:19 | FromDiscord | <sOkam! 🫐> oh... there is a more stuff. sry didnt see it |
15:30:58 | FromDiscord | <sOkam! 🫐> @alohaer do you have any `ref object` in there that you havent `new MyObjectType` before using them? |
15:31:09 | FromDiscord | <sOkam! 🫐> (edit) "in there" => "inside that sequence" |
15:31:31 | FromDiscord | <sOkam! 🫐> its trying to stringify something that is nil, and that something is inside one of the objects of your seq Stmt |
15:31:59 | FromDiscord | <alohaer> sent a code paste, see https://play.nim-lang.org/#ix=4Fd4 |
15:32:12 | FromDiscord | <sOkam! 🫐> return is almost never used in nim |
15:32:28 | qwr | what nim version (and therefore default gc) you have? i.e. i would suspect nim 2.0 and arc/orc |
15:32:34 | FromDiscord | <odexine> that's besides the point, that should work |
15:32:44 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4Fd5 |
15:32:49 | FromDiscord | <sOkam! 🫐> was just pointing a sidenote |
15:33:04 | FromDiscord | <odexine> and `return` is not "almost never used" |
15:33:11 | FromDiscord | <alohaer> nim 2.0 and I get the same error on arc and orc |
15:33:28 | FromDiscord | <sOkam! 🫐> In reply to @alohaer "nim 2.0 and I": yeah because something is not initialized, its not due to the gc |
15:33:29 | qwr | yes, but it works with refc or markAndSweep? |
15:33:50 | qwr | its probably bug that gets exposed with arc/orc move semantics |
15:33:58 | FromDiscord | <alohaer> I haven't tried those, I've only tried --mm:none |
15:34:07 | FromDiscord | <odexine> did it work with none? |
15:34:22 | FromDiscord | <alohaer> yes |
15:34:23 | FromDiscord | <sOkam! 🫐> its using seqs, refs and strings, how would it? |
15:34:44 | FromDiscord | <odexine> sokam none means things are not freed, things can still be allocated |
15:34:53 | qwr | and i would suspect something inside statements structure, that happens to be alive before interpret call, but not needed later |
15:34:57 | FromDiscord | <.maverk> what is the difference between ``#[]#`` and ``##[]##`` ? |
15:34:57 | FromDiscord | <odexine> none will just cause your app to exhaust memory |
15:35:03 | FromDiscord | <odexine> if it ever |
15:35:12 | FromDiscord | <alohaer> It works with refc and markAndSweep |
15:35:17 | FromDiscord | <odexine> In reply to @.maverk "what is the difference": 1st is a regular comment, 2nd is a doc comment |
15:35:31 | FromDiscord | <.maverk> In reply to @odexine "1st is a regular": yes but where is the difference ? |
15:35:40 | FromDiscord | <odexine> what do you mean "where"? |
15:35:42 | FromDiscord | <.maverk> they both do the same thing |
15:35:45 | FromDiscord | <odexine> they dont |
15:35:53 | FromDiscord | <.maverk> show me the difference |
15:35:57 | FromDiscord | <odexine> doc comments can only be placed in certain places |
15:36:02 | FromDiscord | <.maverk> they both do multiline comment |
15:36:16 | FromDiscord | <.maverk> what are these places ? |
15:36:21 | qwr | i've got similar problems when using closure in for without capturing the loop variable under arc |
15:36:36 | FromDiscord | <odexine> they do yes, but doc comments are also put in the nim AST whilst regular comments are not |
15:36:58 | FromDiscord | <odexine> doc comments will be read by the doc generator, regular comments will not |
15:37:27 | FromDiscord | <.maverk> i don't understand |
15:37:36 | FromDiscord | <kots> https://nim-lang.github.io/Nim/manual.html#lexical-analysis-comments↵https://nim-lang.github.io/Nim/docgen.html#introduction-documentation-comments |
15:37:49 | FromDiscord | <.maverk> In reply to @k0ts "https://nim-lang.github.io/Nim/manual.html#lexical-": i am in the doc right now |
15:38:55 | FromDiscord | <alohaer> In reply to @qwr "i've got similar problems": Is it worth trying to get down to a minimal example of the arc/orc error? will I be good just using refc and moving on (it is just a school assignment)? |
15:39:18 | qwr | alohaer: you can use refc as workaround, but can try to create minimal test case and do bug report, if the cause won't be appearant (it can be pretty annoying as with the optimizer seemingly totally unrelated statements can make bug appear/go) |
15:39:59 | FromDiscord | <odexine> well, if ever, test with devel first |
15:40:05 | FromDiscord | <alohaer> Thanks for help everyone |
15:40:06 | FromDiscord | <odexine> it might already have a bugfix pushed lol |
15:41:00 | FromDiscord | <.maverk> guys i read the docs but is till don't understand pls help |
15:41:24 | * | cedb quit (Ping timeout: 255 seconds) |
15:41:46 | FromDiscord | <kots> a doc comment starts with `##` and can be placed inside procs, inside object definitions, etc. to add text that will show up in the docs generated by `nim doc` |
15:41:56 | FromDiscord | <kots> `##[]##` is the doc comment version of `#[]#` |
15:43:21 | FromDiscord | <.maverk> also #[]# can be in proc |
15:43:28 | FromDiscord | <.maverk> i have just tried |
15:43:32 | * | ced1 joined #nim |
15:43:36 | FromDiscord | <kots> it won't be a doc comment boss |
15:43:49 | FromDiscord | <.maverk> what does that mean ????? |
15:44:05 | FromDiscord | <.maverk> i don't see any difference |
15:46:41 | NimEventer | New thread by maverk: Where is the difference between these two types of commenting in nim ?, see https://forum.nim-lang.org/t/10455 |
15:51:30 | FromDiscord | <odexine> In reply to @.maverk "i don't see any": because you're not using the documentation generator |
15:52:11 | FromDiscord | <.maverk> In reply to @odexine "because you're not using": where is it ? |
15:52:22 | FromDiscord | <.maverk> where is the doc generator ? |
15:52:51 | FromDiscord | <odexine> `nim doc <file>.nim` |
15:56:50 | FromDiscord | <.maverk> https://media.discordapp.net/attachments/371759389889003532/1147560774777196767/essees.PNG |
15:56:59 | FromDiscord | <.maverk> ???? weird |
16:01:41 | * | ced1 is now known as cedb |
16:02:21 | FromDiscord | <alohaer> In reply to @odexine "well, if ever, test": No error with arc or orc on devel |
16:03:04 | FromDiscord | <odexine> In reply to @.maverk "": only things that are exported are put on the doc page |
16:03:17 | FromDiscord | <System64 ~ Flandre Scarlet> https://devguide.python.org/internals/garbage-collector/↵Reference counting↵I will never understand Python's slowness |
16:11:51 | FromDiscord | <jaar23> i've following this method to implement logging in multi-thread. https://nim-lang.org/docs/logging.html#basic-usage-notes-when-using-multiple-threads↵but i got multiple logging in my console. When using `echo ` it is just one line, but using `logging` it is 3 - 6 times more being stdout. |
16:12:39 | * | azimut_ quit (Ping timeout: 246 seconds) |
16:49:42 | FromDiscord | <Phil> Any Atlas users present? |
16:50:55 | FromDiscord | <Phil> In reply to @jaar23 "i've following this method": Without knowing the setup: Is your code with logging getting executed once per thread and you have 3-6 threads running?↵Other than that, without any kind of code example or the like this seems difficult to diagnose |
16:52:44 | FromDiscord | <Phil> In reply to @isofruit "Any Atlas users present?": Actually never mind, found what I was after: Atlas provides, similarly to nimble, a way to parse a nimble file.↵Which is dope. |
17:00:27 | FromDiscord | <Chronos [She/Her]> In reply to @PMunch "There are also these": I wonder if HelloMello's build process would benefit from Confy |
17:00:49 | emery | if I have a 4k buffer that I resize to 1k and then again to 3k, can I depend on it not being reallocated? |
17:03:43 | * | ntat quit (Quit: leaving) |
17:11:48 | FromDiscord | <jviega> No |
17:20:00 | FromDiscord | <jaar23> In reply to @isofruit "Without knowing the setup:": Trying to create some example now. The context is yes, there are multiple thread running, since each request will spawn a new thread. But the log is more than the number of thread |
17:25:58 | * | azimut joined #nim |
17:35:57 | FromDiscord | <jviega> If I've got a C lib that will allow me to set a custom memory manager, anyone know the raw C api for allocating objects? Not seeing it in the doc. It not, I'll go dig through the codebase later |
19:00:55 | * | ntat joined #nim |
19:42:04 | * | ntat quit (Quit: leaving) |
19:42:20 | * | jmdaemon joined #nim |
19:46:09 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "If I've got a": https://github.com/nim-lang/Nim/blob/devel/lib/system/alloc.nim idk if it supports C tho |
19:46:18 | FromDiscord | <Chronos [She/Her]> You could also just make Nim use malloc |
19:48:36 | FromDiscord | <jviega> Not for one library in a big project, wouldn't make sense. But things will be looking in detail later, I'm sure I can make it work 🙂 |
19:49:22 | * | jmdaemon quit (Ping timeout: 246 seconds) |
20:34:29 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "I wonder if HelloMello's": honestly, doubt it |
20:35:22 | FromDiscord | <sOkam! 🫐> confy is meant to be simple, and with that simplicity its already becoming crazy complex↵i cannot even fathom how the android nightmare would fit into that box, its just too much |
20:38:06 | FromDiscord | <sOkam! 🫐> sent a long message, see https://paste.rs/tkpXx |
20:54:22 | * | Mister_Magister quit (Server closed connection) |
20:54:53 | * | Mister_Magister joined #nim |
21:01:55 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "confy is meant to": Oh not as a first party thing, definitely not, but maybe as a 3rd-party library? |
21:02:18 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "basically, confy is just": Only thing that might be useful is crosscompilation tbf |
21:05:11 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Oh not as a": `confy-droid` sounds catchy 🙂↵but i don't think i understand the android setup enough to give good knowledge of whether confy is of any use to that workflow |
21:05:47 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Only thing that might": you could achieve that same idea with the zigcc package, and relying on the user to install zig themselves |
22:07:33 | FromDiscord | <Chronos [She/Her]> Fair enough |
22:08:02 | FromDiscord | <Chronos [She/Her]> Hm, is there any way to make a byte seq into the big endian format? (Assuming that the bytes are stored in a little endian format) |
22:20:44 | NimEventer | New thread by ploxotnuj1: How to make a tray system icons?, see https://forum.nim-lang.org/t/10456 |
22:24:09 | FromDiscord | <demotomohiro> In reply to @chronos.vitaqua "Hm, is there any": https://nim-lang.org/docs/endians.html |
22:27:42 | FromDiscord | <Chronos [She/Her]> In reply to @demotomohiro "https://nim-lang.org/docs/endians.html": Doesn't exist for arrays |
22:29:07 | FromDiscord | <demotomohiro> So you need to iterate each data in the array. |
22:30:00 | FromDiscord | <Elegantbeef> Unless the byte sequence is a single type that is big endian what you're asking doesn't make much sense |
22:31:03 | FromDiscord | <Chronos [She/Her]> It's an int128 but `nint128` doesn't have a way to change that to big endian (only for `UInt128`s) |
22:34:42 | FromDiscord | <demotomohiro> If they are 128bit ints, you need to implement converting to big endian yourself. |
22:41:45 | FromDiscord | <kingterrytheterrible12> https://media.discordapp.net/attachments/371759389889003532/1147662677821366404/Screenshot_20230903_012246_Instagram.jpg |
22:41:51 | FromDiscord | <kingterrytheterrible12> W rizz? |
22:52:48 | FromDiscord | <Chronos [She/Her]> In reply to @demotomohiro "If they are 128bit": Pain |
23:00:47 | FromDiscord | <demotomohiro> In reply to @chronos.vitaqua "Pain": Is it painful to write `swap(x[0], x[15]); swap(x[1], x[14]); ...`? |
23:13:23 | FromDiscord | <sOkam! 🫐> Is there any way to wrap/bind a C enum into Nim, so that using it from nim the generated code converts it to an actual C enum, instead of just a `cint`? |
23:13:47 | FromDiscord | <sOkam! 🫐> (edit) "Is there any way to wrap/bind a C enum into Nim, so that ... using" added "when" |
23:14:02 | NimEventer | New thread by tcheran: Allowed key types in std/tables, see https://forum.nim-lang.org/t/10457 |
23:19:43 | FromDiscord | <demotomohiro> sent a code paste, see https://play.nim-lang.org/#ix=4Feo |
23:21:40 | FromDiscord | <Chronos [She/Her]> In reply to @demotomohiro "Is it painful to": Very tedious yes lol, I've just decided to swap the endian of the two 64-bit ints in the object and then swap the lo and the high |
23:24:21 | * | Ekho quit (Server closed connection) |
23:31:50 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4Feq |
23:32:01 | FromDiscord | <Chronos [She/Her]> Wait |
23:32:08 | FromDiscord | <Chronos [She/Her]> Ah bc it starts with a number |
23:37:20 | * | Ekho joined #nim |
23:38:52 | * | azimut quit (Remote host closed the connection) |
23:39:18 | * | azimut joined #nim |