00:19:14 | FromDiscord | <heysokam> In reply to @mythnus3 "never mind, it was": are you sure you need `include`? do the karax docs require that? |
00:19:39 | FromDiscord | <heysokam> because 90% chance that include is going to shoot you in the foot (except for pragmas, since they can't be imported) |
00:21:16 | FromDiscord | <mythnus3> In reply to @heysokam "are you sure you": I am pretty sure they do, since the prelude contents is just 1 non-exported import statement, and it uses `include` in the readme examples |
00:21:34 | FromDiscord | <mythnus3> though the examples just manually import the modules instead of using the prelude |
00:22:09 | FromDiscord | <mythnus3> In reply to @mythnus3 "I am pretty sure": https://github.com/karaxnim/karax/blob/master/karax/prelude.nim |
00:24:28 | FromDiscord | <mythnus3> In reply to @mythnus3 "I am pretty sure": and chatgpt also asserted how that is how the prelude should be used (I know chatgpt isn’t to be trusted, but the docs are inexistent, so it’s the best thing I have) |
00:24:42 | FromDiscord | <lainlaylie> include is probably intended here yes, there's also a std/prelude with a similar purpose. though usually it's better to import the specific things we need |
00:24:56 | FromDiscord | <lainlaylie> (edit) "we" => "you" |
00:25:06 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
00:26:11 | FromDiscord | <lainlaylie> you don't need chatgpt to know how to use the prelude, there's an example right here: https://github.com/karaxnim/karax |
00:26:28 | FromDiscord | <heysokam> sent a long message, see https://pasty.ee/GcwrRIXW |
00:27:35 | FromDiscord | <heysokam> sent a code paste, see https://play.nim-lang.org/#pasty=qUxgNuGD |
00:27:37 | FromDiscord | <mythnus3> In reply to @lainlaylie "you don't need chatgpt": https://github.com/karaxnim/karax/blob/master/examples/todoapp/todoapp.nim↵the examples import the modules manually, even though the prelude has existed for longer than they were made, so there isn’t much of an authoritative answer 🤷♂️ |
00:28:01 | FromDiscord | <lainlaylie> then the authoritative answer is "do what you like, either way will work" |
00:28:31 | FromDiscord | <heysokam> (edit) "https://play.nim-lang.org/#pasty=UdlnApwD" => "https://play.nim-lang.org/#pasty=ykVXNAth" |
00:30:14 | * | Lord_Nightmare joined #nim |
00:30:56 | * | Lord_Nightmare quit (Remote host closed the connection) |
00:31:11 | FromDiscord | <heysokam> either way will work, as Laylie said, but be aware that that pattern is not idomatic↵include is completely unnecessary there |
00:34:14 | * | Lord_Nightmare joined #nim |
01:38:27 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
02:14:50 | * | rockcavera quit (Remote host closed the connection) |
03:54:28 | * | SchweinDeBurg joined #nim |
04:14:30 | * | andy-turner joined #nim |
05:28:38 | * | skippy8 joined #nim |
07:22:37 | * | nils` quit (Ping timeout: 252 seconds) |
08:19:40 | FromDiscord | <entropydev> In reply to @litlighilit "Assign those objects to": While this would work, it still forces the main thread to hand waiting for the function to return. What I was hoping for was something like an event listener, where I could add handler that would be called every time a message came in, but that the main thread would not hang |
08:20:14 | FromDiscord | <entropydev> (edit) "hand" => "hang" | "hangwaiting for the function to return. What I was hoping for was something like an event listener, where I could add ... handler" added "a" |
08:21:20 | FromDiscord | <entropydev> for example, if I needed to set up multiple event listeners, I could just put them one after another |
08:46:42 | * | nils` joined #nim |
10:35:33 | * | andy-turner quit (Quit: Leaving) |
13:37:39 | FromDiscord | <nervecenter> I'm shocked by how convergent all the needs of modern native-compiled languages are. I just looked into Jakt, and it's basically reproducing all of Nim's featureset and semantics. Duplicating work, as it were. |
14:04:31 | * | beholders_eye joined #nim |
14:09:50 | * | xet7 joined #nim |
14:15:34 | * | xet7 quit (Remote host closed the connection) |
14:17:00 | * | xet7 joined #nim |
14:39:41 | FromDiscord | <Phil> In reply to @nervecenter "I'm shocked by how": Can you elaborate? |
14:39:51 | FromDiscord | <Phil> (edit) "elaborate?" => "elaborate, out of curiosity?" |
14:43:35 | FromDiscord | <leorize> a lot of it is a contest of who can realize the ideal better, tbh |
14:56:21 | FromDiscord | <nervecenter> In reply to @isofruit "Can you elaborate, out": RC'ed collections, explicit and differentiated pointer/reference types, fat pointers and bounds checking, immutable by default, very similar object instantiation and semantics with the exception of actual OO support with `this`, differentiation between conversion and casting, a tiny bit of comptime and generics (so not quite as power as Nim's). |
14:56:44 | FromDiscord | <nervecenter> (edit) "power" => "powerful" |
14:57:07 | FromDiscord | <nervecenter> (edit) "generics (so not quite as powerful as Nim's)." => "generics, and they want to add full compile-time execution of the whole language." |
14:58:01 | FromDiscord | <nervecenter> (edit) "In reply to @isofruit "Can you elaborate, out": RC'ed collections, explicit and differentiated pointer/reference types, fat pointers and bounds checking, immutable by default, very similar object instantiation and semantics with the exception of actual OO support with `this`, differentiation between conversion and casting, a tiny bit of comptime and generics, and they want to add full compile-time execution of the whole lang |
14:58:37 | FromDiscord | <nervecenter> Seems almost carbon-copy in terms of feature set. |
15:37:10 | FromDiscord | <griffith1deadly> In reply to @nervecenter "I'm shocked by how": i like now that language |
15:43:41 | FromDiscord | <nervecenter> okay...my point is that Nim is a much more mature version of what they've done though |
15:43:49 | FromDiscord | <nervecenter> I kinda don't see the purpose of Jakt |
15:44:27 | FromDiscord | <nervecenter> (edit) "they've done though" => "they want to do" |
15:46:34 | * | skippy8 quit (Ping timeout: 272 seconds) |
16:06:16 | FromDiscord | <rakgew> it seems to focus only on c++ backend though. |
16:13:01 | * | skippy8 joined #nim |
16:44:07 | * | ntat joined #nim |
16:48:16 | FromDiscord | <kapendev> Why use Nim when Jakt exists? |
16:58:54 | FromDiscord | <rakgew> @kapendev \: for some it might be\: nicer syntax, more backends, more metaprogramming power, more libs/eco-system |
17:01:11 | FromDiscord | <janakali> @kapendev Why use Jakt when [Lobster](https://strlen.com/lobster/) exists? |
17:01:53 | * | SchweinDeBurg quit (Quit: WeeChat 4.7.0-dev) |
17:02:49 | FromDiscord | <Elegantbeef> Why use lobster when C exists? |
17:04:29 | Amun-Ra | why use C when butterflies exist? |
17:05:25 | FromDiscord | <Elegantbeef> That's a sentiment I can get behind |
17:05:25 | Amun-Ra | :P |
17:05:37 | Amun-Ra | good to know you're a man of culture, Elegantbeef |
17:06:23 | FromDiscord | <kapendev> In reply to @Elegantbeef "Why use lobster when": Someone would unironically say that. |
17:06:23 | FromDiscord | <Elegantbeef> It's my favourite emacs command |
17:06:23 | Amun-Ra | that Jakt does not even share a syntax with nim… |
17:06:23 | FromDiscord | <Elegantbeef> @kapendev I know it's commentary on the reductionist nature that is "Why X when Y" |
17:07:17 | FromDiscord | <Elegantbeef> You can point at anything and say why that instead of an alternative. It's not a reason it's a associative word game |
17:09:56 | Amun-Ra | TIL windows terminal does not glob at all |
17:10:18 | FromDiscord | <Elegantbeef> It's down to the shell to support that |
17:10:33 | FromDiscord | <Elegantbeef> Fish globs well |
17:10:33 | Amun-Ra | true, but only windows works that way |
17:11:19 | FromDiscord | <Elegantbeef> Bash and Fish glob differently so I don't think it's only windows |
17:11:43 | FromDiscord | <Elegantbeef> Fish's glob is so smart that if you hit tab it'll expand to all of the paths that match the glob |
17:12:04 | Amun-Ra | I use fish for ~3 month |
17:12:14 | FromDiscord | <Elegantbeef> so like bleh/\.txt expands to bleh/bleh.txt bleh/meh.txt bleh/huh.txt |
17:12:20 | Amun-Ra | the only thing I miss is matching like [A-Z] |
17:16:19 | FromDiscord | <muddmaker> In reply to @kapendev "Why use Nim when": Jakt basically doesn't exist |
17:16:59 | FromDiscord | <muddmaker> It is/was an experiment within SerenityOS to specifically generate C++ within their style in a memory safe way |
17:17:07 | FromDiscord | <muddmaker> Nim is far more general purpose |
17:17:56 | FromDiscord | <muddmaker> But in addition, they weren't going to rewrite SerenityOS in any language that they didn't create themselves, because being completely NIH is part of their philosophy |
17:24:12 | * | beholders_eye quit (Ping timeout: 265 seconds) |
17:28:38 | FromDiscord | <rakgew> yash does that, too. |
17:55:29 | FromDiscord | <Elegantbeef> rakgew yash doesn't sound like fish so I didn't read the rest of the sentence 😛 |
17:59:05 | FromDiscord | <nnsee> In reply to @Elegantbeef "so like bleh/\*.txt expands": i'm fairly certain this is how it works for bash as well |
17:59:07 | FromDiscord | <rakgew> \:-D↵I see, it is a nice one though (small fast comfortable)↵https://github.com/magicant/yash |
18:00:50 | FromDiscord | <Elegantbeef> No bash does not expand it when you hit tab |
18:01:13 | FromDiscord | <nnsee> oh that yes |
18:01:16 | FromDiscord | <Elegantbeef> Fish will expand it in the shell when you complete, you then can remove entries or modify them |
18:03:09 | FromDiscord | <nnsee> fairly sure you can get bash to do that as well but it doesn't do so out of the box indeed |
18:04:58 | FromDiscord | <Elegantbeef> If it doesn't do it out of the box it doesn't do it |
18:05:13 | FromDiscord | <Elegantbeef> That is my reaction to every shell 😄 |
18:05:35 | FromDiscord | <Elegantbeef> "zsh can have fish-level auto complete" nope |
18:10:05 | FromDiscord | <nnsee> my zsh config for a while was very similar to what fish ended up implementing |
18:10:18 | FromDiscord | <nnsee> so when i switched over to fish, it didn't take much getting used to |
18:10:29 | FromDiscord | <nnsee> by the way, fish's autocomplete is broken |
18:11:00 | FromDiscord | <Elegantbeef> How is it broken? |
18:11:00 | FromDiscord | <Elegantbeef> Works on my machien |
18:13:10 | FromDiscord | <Elegantbeef> ah "machien" a way to say "my dog" and confuse both the French and English |
18:13:49 | FromDiscord | <nnsee> create a file with a tab char in the filename: `touch "hi"\t"there"` |
18:13:53 | FromDiscord | <nnsee> then try to autocomplete it |
18:13:58 | FromDiscord | <nnsee> (you can't) |
18:14:28 | FromDiscord | <Elegantbeef> I just did |
18:14:37 | FromDiscord | <Elegantbeef> image.png https://media.discordapp.net/attachments/371759389889003532/1379161294900433018/image.png?ex=683f3b8c&is=683dea0c&hm=2f92a9c3e9923c8857a54f26613acba77baf487327bdecec6346ab6b9ac4e427& |
18:14:51 | FromDiscord | <Elegantbeef> Oh whoops |
18:15:55 | FromDiscord | <nnsee> that's not a tab character |
18:16:02 | FromDiscord | <Elegantbeef> I said whoops |
18:16:48 | FromDiscord | <Elegantbeef> Your point stands, though have I ever seen a file with a tab in the name? Yes once today like 2 minutes ago |
18:17:25 | FromDiscord | <nnsee> it's true that it's not common, but it's not _illegal_ so it should be supported |
18:18:05 | FromDiscord | <nnsee> funnily enough, i discovered this by writing exploits for shell scripts on an embedded device i was testing |
18:18:58 | FromDiscord | <Elegantbeef> You made an issue right? 😛 |
18:19:31 | FromDiscord | <nnsee> i made a mental note to make an issue and promptly forgot about it until now |
18:23:04 | FromDiscord | <nnsee> well, it's been an issue for a few years now |
18:23:07 | FromDiscord | <nnsee> https://github.com/fish-shell/fish-shell/issues/9310 |
18:45:04 | FromDiscord | <rakgew> file names with tabs in it? yikes.. |
19:01:35 | * | beholders_eye joined #nim |
19:05:47 | * | przmk quit (Remote host closed the connection) |
19:05:55 | FromDiscord | <Elegantbeef> rakgew "Instead of aligning the stdout we decided it was easier to offset the file names, so our program moves all the files to `\t$FILE_NAME`" 😄 |
19:06:01 | * | przmk joined #nim |
19:16:52 | FromDiscord | <rakgew> \:-D |
19:34:04 | * | beholders_eye quit (Ping timeout: 260 seconds) |
19:48:14 | * | ntat quit (Quit: leaving) |
20:18:52 | * | skippy8 quit (Quit: WeeChat 4.5.2) |
20:37:48 | FromDiscord | <nnsee> In reply to @rakgew "file names with tabs": pretty much every character is legal, depending on the platform, so you have to account for it in your code. iirc most linux filesystems just prevent you from having a null byte in the path, otherwise everything else is fair game. then there's platforms where null bytes are legal |
20:39:18 | Amun-Ra | null byte and '/' |
20:40:32 | FromDiscord | <nnsee> in my case, the vulnerability was in a script which took a different code path when parsing a tar archive based on what files it contained. later it started iterating over the filenames and doing stuff with them. they had accounted for spaces, but not tabs, so a filename with a tab in it was interpreted as two separate files (unlike the first check) |
20:40:37 | FromDiscord | <nnsee> kind of hard to explain |
20:44:48 | FromDiscord | <nnsee> In reply to @Amun-Ra "null byte and '/'": also related to tar files, `../` in a filename is perfectly legal in a tar archive (and other formats like zip) and many unarchiving libs and programs have historically not taken this into account, and allowed (a malicious actor) to extract files to outside the intended destination |
21:21:11 | * | rockcavera joined #nim |
22:10:57 | * | rockcavera is now known as Guest9008 |
22:10:57 | * | tiorock joined #nim |
22:10:57 | * | Guest9008 quit (Killed (silver.libera.chat (Nickname regained by services))) |
22:10:57 | * | tiorock is now known as rockcavera |