00:01:56 | FromDiscord | <Chronos [She/Her]> What's a license that'd be good for saying 'you can use this in any way you want' |
00:02:47 | FromDiscord | <Elegantbeef> https://en.wikipedia.org/wiki/WTFPL |
00:02:50 | FromDiscord | <Elegantbeef> Or just MIT |
00:06:53 | FromDiscord | <Chronos [She/Her]> CC0 also works |
00:29:05 | * | jmdaemon joined #nim |
00:29:44 | FromDiscord | <Chronos [She/Her]> Wait can I not convert between int types at runtime! |
00:29:46 | FromDiscord | <Chronos [She/Her]> ? |
00:30:14 | FromDiscord | <Elegantbeef> of course you can |
00:30:32 | FromDiscord | <Chronos [She/Her]> Wanted to do `int(num div 32.T)` but I'm getting a type mismatch |
00:30:49 | FromDiscord | <Chronos [She/Her]> `T` being a `uint` in this case and num is also the same type as T |
00:33:02 | FromDiscord | <Chronos [She/Her]> Pls explain all-knowing beef- |
00:33:17 | FromDiscord | <Elegantbeef> No clue you did not provide an error message for me to even guess you just said words |
00:33:21 | FromDiscord | <Elegantbeef> I can say things all day long |
00:35:05 | FromDiscord | <Chronos [She/Her]> Literally just `/data/data/com.termux/files/home/Supernovae/crockfordbase32/src/crockfordb32.nim(21, 25) Error: type mismatch: got 'int' for 'int(num div T(32))' but expected 'uint'`- |
00:36:08 | FromDiscord | <Elegantbeef> You're returning `int` but need `uint` |
00:36:37 | FromDiscord | <Chronos [She/Her]> Wait |
00:36:39 | FromDiscord | <Chronos [She/Her]> Ah shit |
00:36:47 | FromDiscord | <Chronos [She/Her]> I am so dumb |
00:37:08 | FromDiscord | <Chronos [She/Her]> Wait no I'm not |
00:37:13 | FromDiscord | <Chronos [She/Her]> I'm not returning a uint |
00:37:33 | FromDiscord | <Chronos [She/Her]> Nvm I'm still fucking stupid lol |
00:37:39 | * | xmachina quit (Quit: WeeChat 4.0.4) |
01:04:43 | FromDiscord | <Chronos [She/Her]> Trying to create tests now but doing that is a bit harder bc I can't figure out how to reliably add that to the path |
01:04:56 | FromDiscord | <Chronos [She/Her]> (Since it's not a project dep, no way to have optional deps in Nimble afaik) |
01:11:02 | * | azimut joined #nim |
01:43:29 | FromDiscord | <Chronos [She/Her]> Anyone have a GitHub Action for releasing GitHub Pages for Nim docs? |
01:43:35 | FromDiscord | <Chronos [She/Her]> For my package |
01:44:05 | FromDiscord | <Chronos [She/Her]> @Phil sorry to ping you, but ik you did docs stuff for Owlkettle, do you have any/know of a pre-made action for this? |
01:47:53 | FromDiscord | <sOkam! 🫐> Is there any difference between: `array[4, cchar]` and `cstring "123"`?↵does an array in Nim have any extra information added to it, or is it fully compatible with a `char thing[4]` in C? |
02:10:25 | FromDiscord | <Elegantbeef> cstrings are just pointers |
02:10:34 | FromDiscord | <Elegantbeef> C arrays are odd |
02:24:09 | FromDiscord | <sOkam! 🫐> what are Nim arrays when it comes to what C understands of them? |
02:24:25 | FromDiscord | <Elegantbeef> They're static arrays just the same as C arrays |
02:28:57 | FromDiscord | <sOkam! 🫐> so if I cast `array[4, cchar]` to `cstring`, assuming the array ends in `'\0'`, they are gonna behave the same? |
02:30:34 | FromDiscord | <Elegantbeef> Yes |
02:30:41 | FromDiscord | <Elegantbeef> Well no |
02:30:50 | FromDiscord | <Elegantbeef> `ptr array[4, cchar]` |
02:31:41 | FromDiscord | <Chronos [She/Her]> Submitted my thing as a package! (It works) |
02:33:10 | FromDiscord | <sOkam! 🫐> ptr array? |
02:33:17 | FromDiscord | <sOkam! 🫐> are arrays not ptr? |
02:34:52 | FromDiscord | <Elegantbeef> Nope |
02:35:06 | FromDiscord | <sOkam! 🫐> then arrays are not the same as C arrays |
02:35:42 | FromDiscord | <Elegantbeef> I mean they are, but they're not |
02:36:04 | FromDiscord | <sOkam! 🫐> basically, as its usual in C, `char thing[N]` and `char ` are sent interchangably everywhere |
02:36:29 | FromDiscord | <sOkam! 🫐> so i have separate code that defines a char array of N, but that is sent to a function that wants a ptr char |
02:36:39 | FromDiscord | <sOkam! 🫐> so... i mapped it as a cstring, but its technically not |
02:36:48 | FromDiscord | <sOkam! 🫐> and don't know how to correlate them |
02:37:09 | FromDiscord | <Elegantbeef> use the array but make it explicitly pass by `ptr T` |
02:37:25 | FromDiscord | <Elegantbeef> Or `var T` |
02:37:39 | FromDiscord | <sOkam! 🫐> then I cannot pass a cstring to it, or assign a cstring to the input |
02:37:49 | FromDiscord | <Elegantbeef> Well you do not have a cstring |
02:37:51 | FromDiscord | <Elegantbeef> You have an array |
02:37:56 | FromDiscord | <sOkam! 🫐> the problem is in the conversion, i can change the argument of the importc no problem, but not convert |
02:38:13 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Well you do not": i have both, they are used interchangably |
02:38:24 | FromDiscord | <sOkam! 🫐> C is type unsafe 🤷♂️ |
02:39:01 | FromDiscord | <Elegantbeef> Right but you're not wrapping it as C so you do not have to live with the silly lack of helpful type information |
02:39:08 | FromDiscord | <sOkam! 🫐> if I can `cast[one](other)` then all good. but I wanted to know what is compatible with what |
02:39:36 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Right but you're not": definitely, but the code is full of array[char] and ptr char everywhere |
02:39:57 | FromDiscord | <Chronos [She/Her]> https://github.com/nim-lang/packages/pull/2699 anyone with perms? Flutters eyelashes |
02:40:26 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Right but you're not": How would you map them? |
02:40:40 | FromDiscord | <sOkam! 🫐> the input function requires a size and a char |
02:40:49 | FromDiscord | <sOkam! 🫐> and its built with cstrings in my code |
02:41:24 | FromDiscord | <sOkam! 🫐> i mapped the char as a cstring.... but... that is taking an array[cchar] as input in reality |
02:42:43 | FromDiscord | <sOkam! 🫐> This: https://github.com/JBustos22/oDFe/blob/fa9eff61890dbbaca896c77816cce3c01a579a6b/code/unix/unix_main.c#L881↵And this: https://github.com/JBustos22/oDFe/blob/fa9eff61890dbbaca896c77816cce3c01a579a6b/code/unix/unix_main.c#L901-L910↵Is what I mean |
02:43:57 | FromDiscord | <Elegantbeef> The first is a `array[YourSize, cchar]` |
02:44:04 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F4k |
02:44:23 | FromDiscord | <sOkam! 🫐> and if I want to send a cstring, i need to know how to convert cstring to array[N, cchar] |
02:44:34 | FromDiscord | <sOkam! 🫐> (edit) "cchar]" => "cchar], or the other way around" |
02:44:39 | FromDiscord | <Elegantbeef> Right `con_title` should be a `array[Size,Cchar]` |
02:44:46 | FromDiscord | <Elegantbeef> `cast[cstring](myArr.addr)` if you want to use a cstring, but don't |
02:45:07 | FromDiscord | <sOkam! 🫐> so they are compatible by casting? that's what I needed to know |
02:45:16 | FromDiscord | <sOkam! 🫐> what would you use as alternative to that? |
02:45:40 | FromDiscord | <Elegantbeef> The array type |
02:45:54 | FromDiscord | <sOkam! 🫐> ? |
02:46:19 | FromDiscord | <Elegantbeef> `commadLine: cstring, title: array[Size, cchar], ...` |
02:46:19 | FromDiscord | <sOkam! 🫐> then how do you get a cstring to an array[cchar] if you don't cast? |
02:46:39 | FromDiscord | <sOkam! 🫐> but you are saying to use array... and they are -mixed in the C code- |
02:46:52 | FromDiscord | <sOkam! 🫐> they are mixing them because its C and they are compatible |
02:47:00 | * | dza quit (Ping timeout: 244 seconds) |
02:47:09 | FromDiscord | <sOkam! 🫐> all im asking is what would you do if you say to not mix them |
02:48:21 | FromDiscord | <Elegantbeef> Use the correct type where needed and not cast |
02:51:07 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Use the correct type": beef, but they are used interchangeably in the code im translating, because that is legal in C |
02:51:20 | FromDiscord | <sOkam! 🫐> I don't want to do type-unsafe stuff either |
02:57:51 | FromDiscord | <sOkam! 🫐> i guess the function should take a `ptr cchar` after all 🤷♂️ |
03:02:52 | * | rockcavera quit (Remote host closed the connection) |
03:05:41 | * | rockcavera joined #nim |
03:57:43 | * | cm quit (Quit: Bye.) |
04:06:55 | * | cm joined #nim |
04:26:53 | FromDiscord | <Phil> In reply to @chronos.vitaqua "<@180601887916163073> sorry to ping": In general?↵Sure, look at basically any of my larger library projects |
04:30:06 | FromDiscord | <Phil> This can act as example:↵- Snorlogue docs: https://github.com/PhilippMDoerner/Snorlogue/blob/main/.github/workflows/docs.yml↵- nimword docs: https://github.com/PhilippMDoerner/nimword/blob/main/.github/workflows/docs.yml↵- Step 5 of my nim-setup for a doc-compilation workflow: https://github.com/PhilippMDoerner/NimSetup/blob/main/Github%20Project%20Setup.md |
04:30:39 | FromDiscord | <Phil> (edit) "This" => "These" |
04:32:55 | FromDiscord | <Phil> It's less pre-made actions and more you need to provide your own workflow files |
04:45:17 | * | disso-peach joined #nim |
04:45:49 | * | disso-peach quit (Client Quit) |
06:01:38 | * | genr8eofl quit (Remote host closed the connection) |
06:01:57 | * | genr8eofl joined #nim |
06:07:07 | * | advesperacit joined #nim |
06:19:02 | * | cm_ joined #nim |
06:19:40 | * | termer_ joined #nim |
06:21:12 | * | advesperacit_ joined #nim |
06:25:54 | * | advesperacit quit (*.net *.split) |
06:25:54 | * | cm quit (*.net *.split) |
06:25:54 | * | marcus quit (*.net *.split) |
06:25:54 | * | termer quit (*.net *.split) |
06:25:54 | * | cm_ is now known as cm |
06:34:09 | * | marcus joined #nim |
06:44:49 | * | PMunch joined #nim |
06:47:15 | advesperacit_ | Is there a way to check if a pointer points to allocated memory and avoid segfaulting? |
06:50:40 | * | ntat joined #nim |
06:51:13 | PMunch | Well, you can always set up a handler for the SIGSEGV signal before access, then attempt the access and record the result |
06:51:50 | termer_ | advesperacit_ Not procedurally |
06:52:21 | advesperacit_ | myptr == nil was what I needed, I must have misspelled my real variable name somehow |
06:52:38 | termer_ | You can set up sigsegv handling like PMunch said, but other than that, you just have to write things safely |
06:52:43 | FromDiscord | <odexine> that only checks if the pointer points to an address |
06:52:54 | FromDiscord | <odexine> that doesnt check if the address can be accessed by the process |
06:52:57 | termer_ | advesperacit_ use isNil for that |
06:53:06 | termer_ | but it'll only check if it's nil |
06:53:24 | termer_ | you can't use it to avoid use after free |
06:53:45 | termer_ | fortunately, if you don't use unsafe lang features, you should have no use after free problems |
06:54:02 | * | termer_ quit (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
06:54:27 | * | termer joined #nim |
06:55:11 | termer | test |
06:55:13 | termer | I'm back baby |
06:55:52 | advesperacit_ | thanks, I'll see if it works as I want it to, otherwise I'll have to rethink |
06:58:12 | termer | best of luck |
07:01:02 | PMunch | advesperacit_, you probably don't want to check if memory is accessible, that smells like a logic error |
07:02:52 | termer | let me tell you guys about the funniest function I wrote today |
07:03:22 | termer | C function that adds 2 uint8_t values together and returns it as an int |
07:03:23 | FromDiscord | <odexine> lets hear it then |
07:03:32 | termer | Then I made a wrapper |
07:03:34 | FromDiscord | <odexine> what about that is funny |
07:03:54 | termer | proc add(a: auto, b: auto): int |
07:03:57 | PMunch | I don't think he was done :P |
07:04:15 | termer | then you can use it to pass any value in |
07:04:28 | termer | since everything is at least a byte, you can use it on anything lol |
07:04:50 | termer | I found it mildly entertaining to put various values in |
07:05:09 | termer | it turns out, "abc" added with 1 is 4 in Nim |
07:05:31 | termer | figures since I assumed the length was the first value in the string struct |
07:05:57 | termer | auto keyword is funny to use in a wrapper proc |
07:06:03 | PMunch | That is actually pretty funny |
07:06:26 | termer | thanks |
07:06:31 | termer | I thought so myself |
07:06:40 | termer | that's what I did while bored at work |
07:15:33 | * | kenran joined #nim |
07:30:05 | PMunch | Hmm, anyone here played around with vimspector? |
07:43:24 | termer | nope, no idea what that is |
07:54:30 | PMunch | Basically a debugger UI for Vim |
08:38:24 | * | rockcavera quit (Remote host closed the connection) |
08:47:35 | NimEventer | New thread by miran: This Month with Nim: July and August 2023, see https://forum.nim-lang.org/t/10452 |
08:50:20 | * | nexus joined #nim |
08:50:37 | * | nexus quit (Client Quit) |
09:15:55 | * | PMunch quit (Ping timeout: 245 seconds) |
09:24:11 | * | ntat quit (Quit: leaving) |
09:28:02 | * | azimut quit (Remote host closed the connection) |
09:28:29 | * | azimut joined #nim |
09:29:47 | FromDiscord | <firasuke> Nim is just a joy to write in! |
09:37:12 | * | PMunch joined #nim |
09:39:58 | FromDiscord | <haoyu233> Take over the memory allocated for seq, maybe we can do something interesting |
09:40:35 | FromDiscord | <haoyu233> sent a code paste, see https://play.nim-lang.org/#ix=4F5Z |
09:41:31 | FromDiscord | <haoyu233> just for fun |
09:42:56 | FromDiscord | <haoyu233> sent a code paste, see https://play.nim-lang.org/#ix=4F62 |
09:49:47 | FromDiscord | <toma400> I was a bit sceptical about new `type mismatch` stacktrace upgrade, but it's actually pretty amazing after quickly getting used to ❤️ ↵The only thing I wish was for more "smart" stacktrace, so when you use `.add()` on Array, for example, it doesn't complain only on type mismatch, but also point you to that arrays are not mutable/do not have the function.↵It's small thing, but each of such small issues is why I even complain on s |
09:52:06 | * | ntat joined #nim |
10:05:29 | * | ntat quit (Quit: leaving) |
10:07:36 | * | _________ quit (Quit: leaving) |
10:09:18 | * | _________ joined #nim |
10:36:30 | NimEventer | New thread by arnetheduck: Unittest2 face lift, see https://forum.nim-lang.org/t/10453 |
10:46:47 | * | _________ quit (Quit: leaving) |
10:47:27 | FromDiscord | <System64 ~ Flandre Scarlet> I sometimes need to compute many waveforms↵How can I reach maximum parallelism here for the sequence part? https://media.discordapp.net/attachments/371759389889003532/1147120529132761158/wavExport.nim |
10:48:12 | * | _________ joined #nim |
10:48:37 | FromDiscord | <firasuke> I am unable to register at the forum, why is that? |
10:53:57 | FromDiscord | <odexine> Have you done so before? |
10:59:53 | FromDiscord | <System64 ~ Flandre Scarlet> Is it possible to run multiple threads at once and to wait them all? |
11:01:35 | PMunch | Yes |
11:01:50 | FromDiscord | <cosmicstella> hello, i have been using nim quite often in the last few weeks, but i have not found any vscode extension or separate ide/editor for it that actually works and doesn't break randomly. |
11:01:56 | FromDiscord | <cosmicstella> what is your suggestion? |
11:02:21 | PMunch | Hmm, I thought the VSCode extension by Saem was about as good as it got for Nim |
11:02:29 | FromDiscord | <cosmicstella> for example, i have tried several vscode extensions and hover information just doesn't work, when i save a file other than the main file all the errors get suppressed, etc |
11:02:48 | FromDiscord | <cosmicstella> In reply to @PMunch "Hmm, I thought the": yeah sadly i haven't been able to find anything better |
11:03:30 | PMunch | The IDE tooling support for Nim is unfortunately quite bad.. Personally it's not a big issue since I rarely use those kind of features anyways. But it would certainly be nice to have. |
11:03:39 | PMunch | Currently I'm using NimLSP in Vim which works okay |
11:04:45 | FromDiscord | <cosmicstella> does it have autocomplete? |
11:05:24 | PMunch | It has some kind of autocomplete I think, as I said I don't really use it much |
11:06:56 | FromDiscord | <Phil> In terms of autocomplete the intellij extension is better, but apparently that has its own issues |
11:07:27 | FromDiscord | <Phil> The main issue here being is that basically no authority bar the compiler really can know what symbols are available where and when and how they will screw you |
11:07:56 | FromDiscord | <Phil> That means the only tooling that can reliably hand you that information is nimsuggest and that isn't all that fast as it pretty much just goes through the compiler |
11:08:08 | FromDiscord | <Phil> (edit) "That means the only tooling that can reliably hand you that information is nimsuggest and that isn't all that fast as it pretty much just goes through the compiler ... " added "from what I understand" |
11:08:17 | FromDiscord | <vindaar> sent a long message, see http://ix.io/4F6q |
11:08:19 | FromDiscord | <vindaar> your real bottlenecks currently are |
11:09:15 | FromDiscord | <cosmicstella> In reply to @isofruit "That means the only": the speed doesn't matter, can i slap nimsuggest on an editor with an extension and be fine? |
11:09:39 | FromDiscord | <Phil> nimsuggest pretty much is what nimsaem is using afaik |
11:10:30 | FromDiscord | <Phil> So the bits and bobs where it isn't capable that likely is because it's not using the compiler in those places or sth |
11:12:27 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @vindaar "it's a bit hard": Synthesize is an expensive operation |
11:12:43 | FromDiscord | <System64 ~ Flandre Scarlet> It computes the entire modular synth |
11:12:48 | FromDiscord | <odexine> In reply to @cosmicstella "the speed doesn't matter,": The buggy part is nimsuggest |
11:13:30 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "The buggy part *is*": I also encounter problems with ORC |
11:24:34 | FromDiscord | <mratsim> In reply to @sys64 "I sometimes need to": `synth.synthesize` doesn't look like it's thread-safe.↵↵Otherwise you can use weave parallelFor |
11:26:01 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @mratsim "`synth.synthesize` doesn't look like": I can clone the synth |
11:26:19 | FromDiscord | <mratsim> In reply to @sys64 "I sometimes need to": and f.write isn't either.↵↵Here you can use data parallelism but only if output can be written in very specific positions in an array. No appending to file or calling a stateful function (which synth.synthesize looks like) |
11:28:01 | FromDiscord | <mratsim> in that case you can do wuick prototyping with OpenMP with system.`||`, or use Weave (you need to passc:-fopenmp and passl:-fopenmp if you use OpenMP),↵↵Example: https://github.com/mratsim/Arraymancer/blob/e2df3dd7509588e3a863c690389649ced790344a/src/arraymancer/laser/openmp.nim#L222-L223 |
11:28:21 | FromDiscord | <mratsim> (edit) "wuick" => "quick" |
11:29:09 | FromDiscord | <mratsim> In reply to @sys64 "I can clone the": for f.write, seems you write 3 bytes for sure, so preallocate an array of the appropriate size ahead of time |
11:30:04 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @mratsim "for f.write, seems you": The synth has an array that contains the synthesized waveform |
11:43:06 | FromDiscord | <firasuke> In reply to @odexine "Have you done so": Yes and I deactivated or deleted my account in order to create a new one |
11:44:04 | FromDiscord | <odexine> You’re gonna have to contact a forum moderator for that |
11:44:28 | FromDiscord | <firasuke> Oh ok, do we have any forum moderators here? |
11:44:29 | FromDiscord | <odexine> @PMunch or @Phil I believe are forum moderators, not sure |
11:45:07 | PMunch | firasuke, what's the issue? |
11:45:33 | FromDiscord | <firasuke> In reply to @PMunch "<@248208053952970752>, what's the issue?": oh I am unable to register on the forum |
11:45:43 | PMunch | Unable how? |
11:46:12 | FromDiscord | <firasuke> I had an old account that I deleted, now I am trying to create a new account that has the same email address as the previous deleted account |
11:47:08 | PMunch | Do you get an error? |
11:48:15 | FromDiscord | <firasuke> the fields just turn red without explaining why |
11:49:21 | PMunch | Could you PM me the e-mail address you where trying to use? |
11:51:54 | FromDiscord | <firasuke> alright, just did that |
11:53:52 | PMunch | You did? |
11:58:36 | * | jmdaemon quit (Ping timeout: 248 seconds) |
11:58:58 | FromDiscord | <odexine> He did on your discord account I assume |
12:03:36 | * | ntat joined #nim |
12:04:22 | PMunch | So did I, but I can't see anything there |
12:06:33 | FromDiscord | <firasuke> oh |
12:06:50 | FromDiscord | <firasuke> I can't PM your bot account xD |
12:07:07 | FromDiscord | <firasuke> @PMunch this |
12:07:09 | FromDiscord | <Phil> @pmunch His discord account |
12:07:50 | FromDiscord | <odexine> Why are there TWO |
12:08:03 | FromDiscord | <firasuke> I have no idea, these are two different accounts |
12:10:19 | PMunch | I don't know either, at some point I just suddenly had two accounts.. |
12:10:32 | FromDiscord | <pmunch> This is the one I use |
12:12:25 | PMunch | Hmm, it seems the forum is struggling. It throws a 502 Bad Gateway when I try to make a new account.. |
12:12:47 | PMunch | @Araq, could you have a look? I believe you're the only one with admin access to the forum at the moment. |
12:14:02 | FromDiscord | <firasuke> I also just received an email confirmation from the forum, when i tried to activate it it showed this |
12:14:15 | FromDiscord | <firasuke> https://media.discordapp.net/attachments/371759389889003532/1147142373583896646/image.png |
12:15:13 | PMunch | Hmm, strange |
12:15:19 | PMunch | Something is wrong with the forum basically |
12:15:37 | PMunch | But I think Araq is the only person with the level of access required to fix it |
12:22:43 | FromDiscord | <firasuke> I see |
12:23:35 | FromDiscord | <firasuke> Can someone create a new forum post indicating that registration is not possible with "Unknown Error Occurred" when trying to sign up, so that Araq sees it? |
12:25:10 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4F6B |
12:52:25 | PMunch | I already pinged him here firasuke, so he should see it |
12:53:58 | PMunch | I've also contacted him in the moderators chat, so he should be aware of it |
12:54:21 | FromDiscord | <System64 ~ Flandre Scarlet> Can a threaded proc return a value? |
12:55:19 | PMunch | Nope |
12:56:54 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @PMunch "Nope": Oh, that's quite a problem |
12:57:19 | FromDiscord | <firasuke> In reply to @PMunch "I've also contacted him": Oh ok, thanks |
12:59:21 | PMunch | System64_~_Flandre_Scarlet, not really. You set up a channel or add the resulting data to a shared data structure |
13:03:37 | FromDiscord | <System64 ~ Flandre Scarlet> sent a code paste, see https://play.nim-lang.org/#ix=4F6Q |
13:04:52 | FromDiscord | <odexine> Yes but it will be a copy |
13:05:31 | FromDiscord | <odexine> Not sure of this but it also might be quite slow since that’s a pretty large object |
13:08:44 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "Not sure of this": In worst cases I can only pass the outputInt array |
13:08:51 | PMunch | Yeah that's a pretty substantial object.. You could definitely pass it through a channel though.. |
13:09:28 | FromDiscord | <odexine> In reply to @sys64 "In worst cases I": That only roughly 1/3rds the size, still pretty big |
13:09:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @odexine "That only roughly 1/3rds": So I can pass it by reference? |
13:10:17 | PMunch | It all depends on how your program works |
13:10:21 | FromDiscord | <odexine> Doing that in a threaded context is tricky |
13:10:35 | PMunch | I guess the Malgolgia Locker type could help you |
13:10:44 | PMunch | Or a UniqueRef? |
13:21:42 | PMunch | Right, so it seems to be a known bug where you use the same name + email address as a previously registered user |
13:21:46 | PMunch | https://github.com/nim-lang/nimforum/issues/346 |
13:23:59 | FromDiscord | <firasuke> oh ok |
13:29:26 | FromDiscord | <Chronos [She/Her]> In reply to @isofruit "These can act as": Makes sense, thank you! |
13:32:23 | * | ntat quit (Quit: leaving) |
13:37:27 | FromDiscord | <griffith1deadly> In reply to @PMunch "Yeah that's a pretty": threading/channels is not good for this? |
13:48:08 | PMunch | Well I believe they copy the object to ensure that it's thread safe |
13:48:20 | PMunch | So with large objects you will incur quite a bit of overhead |
13:48:49 | PMunch | But you might be able to pass a UniqueRef over a channel without issues. |
13:51:35 | FromDiscord | <griffith1deadly> In reply to @PMunch "Well I believe they": doesn't isolate involve moving an object? |
13:52:39 | PMunch | Possibly, I don't remember the details |
13:53:46 | FromDiscord | <griffith1deadly> if so, is this a good way to transfer large objects? |
14:07:02 | * | rockcavera joined #nim |
14:09:23 | FromDiscord | <firasuke> With Nim 2.0 and ORC being the default memory management strategy, is it still advised to use the `-d:useMalloc` switch, also what's the difference between specifying `--gc:orc` and `--mm:orc` (which is the newer flag?), also where can I find the latest documentation about the nim compiler options, I can't seem to find the `--gcc.exe` anywhere? |
14:11:23 | FromDiscord | <odexine> mm is newer |
14:11:35 | FromDiscord | <demotomohiro> I think you need to use `-d:useMalloc` only when --os:standalone or use valgrind. |
14:12:03 | FromDiscord | <demotomohiro> iirc, --gc and --mm is same. |
14:12:26 | FromDiscord | <odexine> it is the same but mm is the newer flag |
14:12:36 | FromDiscord | <odexine> i do not know if gc will be removed in a future version |
14:13:22 | FromDiscord | <vindaar> https://nim-lang.github.io/Nim/nimc.html |
14:13:40 | FromDiscord | <firasuke> ok cool, what if I am on a Linux system that uses `mimalloc` as it's default memory allocator, will passing `useMalloc` allow my Nim program to benefit from that, or it has no effect and `LD_PRELOAD` already does the job |
14:13:54 | FromDiscord | <firasuke> In reply to @odexine "it is the same": thanks |
14:14:01 | FromDiscord | <firasuke> In reply to @vindaar "https://nim-lang.github.io/Nim/nimc.html": thanks for the link |
14:14:23 | FromDiscord | <odexine> In reply to @firasuke "ok cool, what if": you will need to use usemalloc and ld_preload, nim's allocator uses mmap iirc |
14:15:23 | FromDiscord | <firasuke> oh ok, thanks for pointing that out |
14:16:00 | * | PMunch quit (Quit: Leaving) |
14:23:12 | * | blop quit (Ping timeout: 246 seconds) |
14:25:40 | * | blop joined #nim |
14:27:40 | * | kenran quit (Quit: ERC 5.6-git (IRC client for GNU Emacs 30.0.50)) |
14:32:19 | * | blop_ joined #nim |
14:34:24 | * | blop quit (Ping timeout: 246 seconds) |
14:38:31 | FromDiscord | <enthus1ast> @.elcritch\: In figuro, it seems that it currently emits a click event on a "button down", i think it would be better when a click event is emitted on a "button up", the biggest benefit is, that when you've clicked wrong, the user has the chance to move the mouse from the button and release the click without activating the buttons action. |
14:39:24 | FromDiscord | <enthus1ast> the KFC pos system i've suported for years had exactly this issue.... |
14:42:14 | FromDiscord | <enthus1ast> this was especially problematic since it was a touch based system. The older kfc system did not had this issue, and this one bug/issue created a lot of service calls \:) |
14:46:26 | NimEventer | New Nimble package! crockford-base32 - A simple implementation of Crockford Base32., see https://github.com/Yu-Vitaqua-fer-Chronos/Crockford-Base32-Nim |
15:03:13 | FromDiscord | <odexine> thats a name |
15:16:58 | termer | To touch on -d:useMalloc, I use it often because I prefer memory to be returned to the OS often, and Nim's allocator doesn't do that as much |
15:17:16 | termer | However, every once in a while you'll see different behavior because of it |
15:17:35 | termer | so far I've found one library that doesn't compile with that flag (nim-sys) |
15:18:10 | FromDiscord | <jviega> You do realize with virtual memory that's not a big deal. freed pages eventually fall out of the page table and don't show back upswapped in |
15:18:23 | FromDiscord | <jviega> (edit) "upswapped in" => "up" |
15:22:31 | FromDiscord | <firasuke> In reply to @termer "To touch on -d:useMalloc,": oh ok, thanks for your insight on this |
15:22:41 | FromDiscord | <Chronos [She/Her]> In reply to @NimEventer "New Nimble package! crockford-base32": Eyyyy |
15:22:56 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "thats a name": The package name is crockfordb32 when importing lol |
15:23:01 | termer | jviega, I'm not an expert on how it works |
15:23:18 | FromDiscord | <Chronos [She/Her]> I'm probably gonna make a ULID impl but there's already one that exists, so idk what to name mine lil |
15:23:20 | FromDiscord | <Chronos [She/Her]> Lol |
15:23:46 | termer | What I do know is that a bunch of memory on the Nim allocator wasn't been returned to the OS whenever I used it and it confuse me for a long time making me think it was a leak |
15:24:38 | FromDiscord | <jviega> Yeah, you'll waste cycles returning memory, which is why Nim won't do it often. It doesn't actually make a significant difference. |
15:25:21 | termer | It does for me because I have a poverty mindset when it comes to RAM lol |
15:25:47 | FromDiscord | <jviega> In fact, when you malloc, you tend to have very fragmented memory anyway, keeping more pages resident than needed. That's why plenty of garbage collectors use memory pools, and return entire pools. |
15:26:04 | termer | I do know that much |
15:26:38 | termer | what I can say though is that Nim often waits a very long time to return anything, and you can end up with huge memory usage in a short period of time |
15:27:06 | FromDiscord | <jviega> Compile with -release, the binaries tend to be MUCH faster |
15:28:03 | termer | I never said it affected speed |
15:28:20 | FromDiscord | <jviega> Oh, I misread that |
15:28:34 | FromDiscord | <jviega> "memory usage" is VIRTUAL memory usage, not physical memory usage |
15:28:48 | termer | what do you mean |
15:28:55 | FromDiscord | <jviega> Once physical memory fills up, the OS swaps out the least-recently used stuff |
15:29:09 | termer | The RSS is higher with Nim allocator |
15:29:14 | FromDiscord | <jviega> It's still "in memory" but it's not in memory until it gets swapped back in |
15:29:15 | termer | that's all I'm saying here |
15:29:54 | termer | These days I don't worry too much about memory memory management though since 1. I avoid allocations whenever possible for performance reasons and 2. I don't use asyncdispatch anymore lol |
15:30:00 | FromDiscord | <jviega> So I'm saying an app "using a lot of memory" is not an issue whatsoever |
15:30:15 | FromDiscord | <jviega> Because it's all about how much is resident when memory is full |
15:30:40 | FromDiscord | <Chronos [She/Her]> `nint` doesn't seem to support swapping the endian of an Int128 :/ |
15:31:06 | FromDiscord | <odexine> what is nint |
15:31:07 | FromDiscord | <Chronos [She/Her]> https://rockcavera.github.io/nim-nint128/nint128/nint128_endians.html |
15:31:10 | FromDiscord | <odexine> where is it from more specifically |
15:31:18 | termer | For a long time I worked with VMs with 1GiB of less of RAM, so that sort of thing mattered |
15:31:24 | FromDiscord | <Chronos [She/Her]> nint128, implements 128-bit integers |
15:31:28 | termer | anything that wasn't hot would find itself in swap |
15:31:38 | FromDiscord | <Chronos [She/Her]> Nint is just the package |
15:31:42 | FromDiscord | <odexine> In reply to @chronos.vitaqua "`nint` doesn't seem to": `swapBytes` |
15:31:56 | FromDiscord | <jviega> Yeah, back when ram was cheap, bus speeds were slow, and hard drives didn't have caches |
15:32:14 | FromDiscord | <jviega> I remember it. That's a non-issue in the real world. |
15:32:28 | FromDiscord | <Chronos [She/Her]> In reply to @odexine "`swapBytes`": Only for UInts |
15:32:31 | termer | I don't think RAM was ever cheap |
15:32:32 | FromDiscord | <jviega> Erm, was NOT cheap |
15:32:48 | FromDiscord | <Chronos [She/Her]> I'm doing it on a signed int |
15:32:51 | termer | ok yeah I thought you were fucking with me |
15:32:58 | FromDiscord | <jviega> per MB it's super cheap compared to way back when, are you kidding me |
15:33:12 | termer | it is NOW |
15:33:40 | termer | Like I said, my mindset is that of a kid without a lot of money to spare for larger VMs |
15:34:02 | FromDiscord | <jviega> Not a reason to go give people bad advice 🙂 |
15:34:03 | termer | so I just allocated a lot of swap and traded CPU for less RAM usage |
15:34:14 | termer | Bad advice? I just said the natural consequence |
15:34:19 | termer | I didn't say to use it |
15:34:48 | termer | But your RSS will be lower with malloc, and it'll return the memory to the OS more often, that's just itd behavior |
15:34:54 | termer | I'm not saying to use it |
15:35:05 | FromDiscord | <jviega> The natural consequence is you spend more cycles returning memory, with no difference in performance due to cache misses |
15:35:24 | termer | Right |
15:36:24 | termer | Not related to the reasons I said, but anyone working on a nonstandard OS or no OS at all like in the case of embedded will need to use malloc |
15:36:30 | termer | but that's not a problem most will face |
15:37:51 | termer | jviega, If you want to talk traumatic memory experiences, try running multiple JVMs on the same 512MiB VM |
15:37:53 | FromDiscord | <odexine> non-posix + uncommon would need malloc |
15:37:57 | termer | now THAT was hell |
15:38:20 | termer | That's why I really appreciate the fact that Nim heavily prefers stack |
15:38:32 | termer | it's a lot more reliable that way |
15:38:40 | termer | err, predictable |
15:48:07 | * | ntat joined #nim |
17:18:03 | * | krux02 joined #nim |
17:20:02 | FromDiscord | <System64 ~ Flandre Scarlet> > Thread 1 received signal SIGTRAP, Trace/breakpoint trap.↵What is SIGTRAP? |
17:27:34 | * | ntat quit (Ping timeout: 250 seconds) |
17:38:58 | termer | https://en.wikipedia.org/wiki/Signal_(IPC) |
17:56:34 | FromDiscord | <Prestige> Since nim 2.0 it seems I can't cast a string to `Pcuchar`, is there a work around for this? |
17:56:58 | FromDiscord | <Prestige> ah the playground is down again |
17:59:51 | FromDiscord | <System64 ~ Flandre Scarlet> The worst one https://media.discordapp.net/attachments/371759389889003532/1147229345795027005/image.png |
18:20:20 | FromDiscord | <demotomohiro> In reply to @avahe "Since nim 2.0 it": Why dont you convert string to cstring? |
18:21:54 | FromDiscord | <Prestige> Would that allow me to use it as a Pcuchar? |
18:23:41 | FromDiscord | <sOkam! 🫐> cstring is ptr cchar, not cuchar 🤔 |
18:24:01 | FromDiscord | <demotomohiro> `Pcuchar` is `ptr cuchar`? |
18:24:09 | FromDiscord | <Prestige> Yeah |
18:25:22 | FromDiscord | <demotomohiro> Even if you cast a string to `ptr cuchar`, you dont get a vaild pointer. |
18:26:20 | FromDiscord | <demotomohiro> I think you need to do `cast[ptr cuchar](someString.cstring)`. |
18:30:52 | FromDiscord | <Prestige> hmm using cstring seems to get rid of those errors at least |
18:36:56 | FromDiscord | <Chronos [She/Her]> I'm debating on if I should store a random value as a string or as a big int/int128 |
18:43:42 | FromDiscord | <demotomohiro> I think it depends on what to do with the random value. |
18:58:26 | FromDiscord | <jviega> Do you mean "random value" literally? |
18:58:50 | FromDiscord | <jviega> What are you going to do w/ it? |
19:04:11 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "Do you mean "random": Yep, from urandom |
19:05:02 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "What are you going": ULID requires it in the format, I'll have to use it as an int, it seems like |
19:05:23 | FromDiscord | <jviega> I have a library to produce ulids |
19:05:27 | FromDiscord | <jviega> It does all that |
19:06:41 | FromDiscord | <jviega> https://github.com/crashappsec/nimutils |
19:06:54 | FromDiscord | <jviega> If you want a random ulid just call getUlid() |
19:07:49 | FromDiscord | <jviega> You can also do: `secureRand[uint64]()` or `randString(12)` |
19:13:40 | FromDiscord | <jviega> There's basically no docs right now, but the ulid stuff is in encodings.nim where the b32 implementation is |
19:16:33 | FromDiscord | <Chronos [She/Her]> Oh epic! |
19:16:47 | FromDiscord | <Chronos [She/Her]> I just made a crockford base32 impl yesterday lmao |
19:21:13 | FromDiscord | <jviega> That has both variants |
19:26:29 | FromDiscord | <.elcritch> In reply to @enthus1ast "<@703717429230174229>\: In figuro, it": oh good idea! That's an awesome insight from KFC of all places 🤣 Yah I've used that trick a few times myself. You're quick, I literally just got clicking wired in last night! Getting "click out" working was challenging. Events are one of the trickier things to get right. BTW, feel free to ping me in appdev channel, less traffick there |
19:33:54 | FromDiscord | <Chronos [She/Her]> In reply to @jviega "That has both variants": Neat! |
19:34:14 | FromDiscord | <Chronos [She/Her]> I'll likely just finish my own out of wanting to actually contribute more things in Nim lol |
19:34:52 | FromDiscord | <sOkam! 🫐> @System64 ~ Flandre Scarlet was this the french error you were getting? https://media.discordapp.net/attachments/371759389889003532/1147253257635381431/image.png |
19:37:51 | * | dza joined #nim |
19:46:45 | FromDiscord | <flyx> hi folks! I'm getting `Error: undeclared identifier: 'shallowCopy'` from the cligen package, how can that happen? that's a symbol from `system` and should always be available, right? |
19:52:46 | FromDiscord | <jviega> It’s not in 2.0 iirc |
19:53:05 | FromDiscord | <jviega> Or at least not with all memory managers |
19:57:13 | FromDiscord | <Prestige> I think you need to pass --deepcopy:on ? |
20:01:18 | * | azimut quit (Ping timeout: 246 seconds) |
20:04:39 | FromDiscord | <flyx> nope, it works with `--gc:refc` though. but now I get another error… I think cligen just isn't compatible with Nim 2 yet |
20:10:27 | * | blop joined #nim |
20:13:12 | * | blop_ quit (Ping timeout: 246 seconds) |
20:24:22 | FromDiscord | <Elegantbeef> Shallow copy is not in orc/arc as it's just a `{.cursor.}` |
20:24:56 | FromDiscord | <sOkam! 🫐> In reply to @heysokam "<@380360389377916939> was this the": I managed to reproduce the exact error you got. Working on it, to see what's causing the probl https://media.discordapp.net/attachments/371759389889003532/1147265856271822869/image.png |
20:41:33 | FromDiscord | <sOkam! 🫐> @ElegantBeouf is there a way to completely erase a tag from graffitti forever, so it doesn't get found and readded back ever again? |
20:42:19 | FromDiscord | <sOkam! 🫐> there is some old-ass 4.1.2 version in the git history of `nglfw`, but it is conflicting with my current latest version which is in sync with glfw at `3.3.8.2` 😔 |
20:44:38 | FromDiscord | <Elegantbeef> Nope not without rewriting git historry |
20:47:28 | FromDiscord | <sOkam! 🫐> idm rewriting it. what would I need to find and remove exactly? |
20:47:57 | FromDiscord | <Elegantbeef> Removing the commit that changed the nimble file to that version |
20:48:07 | FromDiscord | <Elegantbeef> Unless you mean you have local tags you keep pushing |
20:48:11 | FromDiscord | <Elegantbeef> In that case delete local tags |
20:48:46 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "Unless you mean you": no its just some old commit form before I forked, afaik |
21:03:43 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "<@380360389377916939> was this the": Yes |
21:11:39 | * | advesperacit_ quit () |
21:14:20 | * | nullie joined #nim |
21:20:23 | nullie | Does nim support operator overloading? |
21:21:22 | FromDiscord | <Phil> yes |
21:21:24 | FromDiscord | <Elegantbeef> Yes |
21:22:29 | nullie | I remember reading something like "operators won't cause function calls" and then thought that it does not |
21:22:49 | FromDiscord | <sOkam! 🫐> @System64 ~ Flandre Scarlet found the bug. it was exactly what I thought it was, this line is not behaving correctly on windows https://media.discordapp.net/attachments/371759389889003532/1147280423278354643/image.png |
21:23:30 | FromDiscord | <Elegantbeef> inb4 'zig.exe' |
21:23:39 | FromDiscord | <sOkam! 🫐> How do you properly check for the existance of a command in a cross-platform way in Nim? 🤔 |
21:24:04 | FromDiscord | <sOkam! 🫐> I thought that line would do it, but apparently exit codes are not the same |
21:25:08 | FromDiscord | <sOkam! 🫐> or at least how do you do it on windows specifically? |
21:28:04 | FromDiscord | <Elegantbeef> `where zig` on windows `which zig` on \nix i believe |
21:33:15 | FromDiscord | <sOkam! 🫐> oh that works, i thought that would be returning local files for the cwd, but apparently not (at least not on win) |
21:36:34 | FromDiscord | <sOkam! 🫐> apparently the autodownloader for zig in confy is invaluable in windows↵TIL there is no real way to install automatically, you need to set it up manually. even zigup stores things in local, not homedir |
21:39:27 | FromDiscord | <jviega> Store your config in the binary… that’s what I do! |
21:40:54 | FromDiscord | <sOkam! 🫐> In reply to @jviega "Store your config": wdym? |
21:41:47 | * | Arthur quit (Server closed connection) |
21:42:04 | * | Arthur joined #nim |
21:42:27 | FromDiscord | <jviega> Self edit your exe |
21:43:03 | FromDiscord | <jviega> I have an elf library for it, not PE tho I don’t do Windows |
21:43:26 | FromDiscord | <sOkam! 🫐> i don't understand what that does or how it works |
21:43:50 | FromDiscord | <sOkam! 🫐> how is that going to solve resolving PATH and updating versions? |
21:48:08 | FromDiscord | <sOkam! 🫐> In reply to @Elegantbeef "`where zig` on windows": just for reference, `os.findExe` is a lot more reliable, even if it searches first at the local folder... because the output of `where zig` could be in a different language and its much more difficult to filter |
21:49:44 | FromDiscord | <sOkam! 🫐> plus it seems like `where` doesn't even want to work some times 🤷♂️ |
21:50:22 | FromDiscord | <System64 ~ Flandre Scarlet> I have a question, is it possible to do 24 bits RGB on a terminal with Nim? If yes, how? |
21:51:15 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/colors.html#rgb%2Crange%5B%5D%2Crange%5B%5D%2Crange%5B%5D |
21:51:37 | FromDiscord | <Elegantbeef> https://nim-lang.org/docs/terminal.html#ansiForegroundColorCode%2CColor |
21:53:47 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @Elegantbeef "https://nim-lang.org/docs/terminal.html#ansiForegro": Oh alright so I can print colored text? |
21:55:46 | * | rockcavera quit (Read error: Connection reset by peer) |
21:56:19 | * | rockcavera joined #nim |
21:56:19 | * | rockcavera quit (Changing host) |
21:56:19 | * | rockcavera joined #nim |
22:01:27 | * | jmdaemon joined #nim |
22:27:34 | FromDiscord | <m4ul3r> Is it possible to turn `--overflowChecks:off` at compile time? ↵I have a proc that overflows (expected) and can't use the `{.compileTime.}` pragma on the proc |
22:30:12 | * | krux02 quit (Remote host closed the connection) |
22:30:20 | FromDiscord | <Elegantbeef> No use a uint |
22:33:07 | FromDiscord | <m4ul3r> sick, i was returning a uint, but int inside proc. Changing all to uint works |
22:37:02 | * | via quit (Server closed connection) |
22:37:09 | * | via joined #nim |
22:47:48 | FromDiscord | <sOkam! 🫐> @System64 ~ Flandre Scarlet I fixed the zig resolving bug, but I'm testing the downloader and its crashing because of a `zippy` conflict with the way I'm working with the files↵I'm waiting for an answer from treeform, and will push the bugfix when its solved |
22:52:26 | * | robertmeta quit (Server closed connection) |
22:52:34 | * | robertmeta joined #nim |
23:04:12 | FromDiscord | <System64 ~ Flandre Scarlet> Alright! We are close! |
23:20:22 | FromDiscord | <fakenullie> C++, D, and Rust have operator overloading, so the + operator might call a function. |
23:20:53 | FromDiscord | <fakenullie> So it doesn't mean that operators are not overloaded? |
23:21:08 | FromDiscord | <Elegantbeef> What? |
23:24:09 | FromDiscord | <fakenullie> Ah, sorry, got nim and zig mixed up |
23:26:04 | FromDiscord | <System64 ~ Flandre Scarlet> This is funny how terminals can do pixel art |
23:26:33 | FromDiscord | <sOkam! 🫐> In reply to @sys64 "This is funny how": if you don't know about `illwill`, you must 🙂↵its awesome for that type of stuff |
23:26:50 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "if you don't know": Will check it out |
23:27:10 | FromDiscord | <sOkam! 🫐> there is a couple of pixel-like examples |
23:27:12 | FromDiscord | <System64 ~ Flandre Scarlet> Btw https://media.discordapp.net/attachments/371759389889003532/1147311726598037584/image.png |
23:27:14 | FromDiscord | <sOkam! 🫐> (edit) "there is a couple of pixel-like examples ... " added "in their repo" |
23:27:26 | FromDiscord | <sOkam! 🫐> In reply to @sys64 "Btw": damn nice |
23:27:33 | FromDiscord | <System64 ~ Flandre Scarlet> I did the art too |
23:28:42 | FromDiscord | <System64 ~ Flandre Scarlet> In reply to @heysokam "if you don't know": Ah yeah, sounds nice! |
23:39:07 | FromDiscord | <sOkam! 🫐> How do you run a `shell` command from the VM during compilation?↵`gorgeEx` is not running a shell, its running a process, and `execShellCmd` does not work on the VM↵I've been relying on `gorgeEx( "sh -c myCommand arg1 arg2" )`, but that is only correct for posix↵How do can you run a command at compile time only, as if it was the user who run it, in a way that works across systems? |
23:40:03 | FromDiscord | <sOkam! 🫐> or, at least, how do you run a command without a shell on windows specifically from the VM? |
23:55:34 | FromDiscord | <jviega> `staticExec()` runs a shell on Unix and Mac |
23:55:40 | FromDiscord | <jviega> I'd assume on Windows too |
23:56:17 | FromDiscord | <jviega> On nix staticExec() will essentially give you "sh -c" for free. |
23:56:33 | FromDiscord | <sOkam! 🫐> In reply to @jviega "`staticExec()` runs a shell": gorgeEx and staticExec are aliases |
23:56:45 | FromDiscord | <jviega> Well then you don't have to do the sh -c anyway 🙂 |
23:56:47 | FromDiscord | <sOkam! 🫐> the problem is running the command on windows with it |
23:57:03 | FromDiscord | <jviega> It certainly wouldn't work on windows (sh -c) except with WSL |
23:57:10 | FromDiscord | <sOkam! 🫐> yeah exactly |
23:57:22 | FromDiscord | <sOkam! 🫐> but i believe WSL would signal being on linux, right? |
23:57:39 | FromDiscord | <jviega> staticExec("...") doesn't work if you pass windows shell commands? |
23:57:45 | FromDiscord | <jviega> I'd be shocked |
23:57:49 | FromDiscord | <sOkam! 🫐> i haven't tried on windows, tbh |
23:58:00 | FromDiscord | <sOkam! 🫐> only tried with sh -c whcih failed (obviously) |
23:58:02 | FromDiscord | <jviega> I'll bet $100 it works |
23:58:09 | FromDiscord | <jviega> You don't even need the sh -c on other boxes 🙂 |
23:58:13 | FromDiscord | <sOkam! 🫐> let me try, thought i needed to call a shell |
23:58:23 | FromDiscord | <jviega> It runs via a shell |
23:58:47 | FromDiscord | <jviega> I've written several lines of shell script when things were easier from sh than nims |
23:58:47 | FromDiscord | <sOkam! 🫐> but on linux it wasn't working i believe |
23:58:52 | FromDiscord | <jviega> It works 100% |
23:58:55 | FromDiscord | <jviega> I do it all the time |
23:59:04 | FromDiscord | <sOkam! 🫐> plus... its not really outputting the result like a shell, its containing it (which obliterates compiler progress) |
23:59:24 | FromDiscord | <jviega> It returns the output, which you can then echo |
23:59:31 | FromDiscord | <sOkam! 🫐> you realize what that means? |
23:59:33 | FromDiscord | <jviega> It doesn't pass stdout to the subprocess |
23:59:37 | FromDiscord | <sOkam! 🫐> what about compiler progress |
23:59:38 | FromDiscord | <sOkam! 🫐> its gone |
23:59:46 | FromDiscord | <sOkam! 🫐> sure... echoed... all at once? |
23:59:59 | FromDiscord | <jviega> Yeah but doing sh -c isn't going to change that. |