00:33:39 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4I6p |
00:34:13 | FromDiscord | <ravinder387> C:\Users\ravin\Downloads\nim-2.0.0\lib\js\jsffi.nim(434, 16) template/generic instantiation of `{}` from here Error |
00:34:40 | FromDiscord | <Elegantbeef> Nim doesnt use `{}` for construction |
00:36:29 | FromDiscord | <raynei486> c++ syndrome |
00:46:13 | FromDiscord | <_gumbercules> Nim used to have optional brace syntax - maybe it still does? |
00:46:16 | FromDiscord | <_gumbercules> Who knows really |
00:46:28 | FromDiscord | <_gumbercules> Definitely not me |
00:46:40 | FromDiscord | <Elegantbeef> It doesnt anymore, syntax skins have luckily been removed |
00:46:57 | FromDiscord | <ravinder387> https://media.discordapp.net/attachments/371759389889003532/1158928211183419463/Screenshot_2023-10-04_061647.png?ex=651e0781&is=651cb601&hm=84b3f103ce2f540960c9ef88afcb5d52c6856a9662d709db3a30aa113d65d747& |
00:48:08 | FromDiscord | <_gumbercules> hahaha |
00:48:52 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4I6r |
00:49:10 | FromDiscord | <_gumbercules> https://nim-lang.org/docs/jsffi.html#%7B%7D.m%2Ctypedesc%2Cvarargs%5Buntyped%5D |
00:49:12 | FromDiscord | <ravinder387> C:\Users\ravin\OneDrive\Programming-Languages\Nim-Lang\Tutorials\Interop\nim-js\Jsffi\chart-js\Day-1\file.nim(33, 3) Error: expression 'rr' is of type 'JsObject' and has to be used (or discarded) |
00:49:13 | FromDiscord | <_gumbercules> it's just a macro |
00:49:45 | FromDiscord | <_gumbercules> yeah well - the error for the second thing you posted is pretty clear no? |
00:49:54 | FromDiscord | <_gumbercules> type `discard rr` |
00:50:01 | FromDiscord | <_gumbercules> instead of just `rr` |
00:51:38 | FromDiscord | <ravinder387> C:\Users\ravin\OneDrive\Programming-Languages\Nim-Lang\Tutorials\Interop\nim-js\Jsffi\chart-js\Day-1\file.nim(29, 6) Error: implementation of 'file.Chart(a: Element, b: JsObject)' expected |
00:52:10 | FromDiscord | <ravinder387> now nim says he want Chart implementation.... I'm trying to call chart.js library |
00:52:30 | FromDiscord | <ravinder387> is jsffi only able to call jquery library |
00:53:58 | FromDiscord | <Elegantbeef> Nope |
00:55:47 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4I6u |
00:55:54 | FromDiscord | <ravinder387> how to wrap this code |
01:23:07 | FromDiscord | <ravinder387> anybody know |
01:23:32 | FromDiscord | <Elegantbeef> Use importjs and `type Chart = object` |
01:28:59 | FromDiscord | <raynei486> beef RTFM coming within the next 5 messages |
01:29:17 | FromDiscord | <Elegantbeef> I only say that sparringly |
02:32:10 | * | azimut joined #nim |
03:01:59 | FromDiscord | <ravinder387> sent a code paste, see https://play.nim-lang.org/#ix=4I6F |
03:02:26 | FromDiscord | <ravinder387> attempting to call routine: 'Chart'↵ found file.Chart [type declared in C:\Users\ravin\OneDrive\Programming-Languages\Nim-Lang\Tutorials\Interop\nim-js\Jsffi\chart-js\Day-1\file.nim(29, 6)] |
03:12:07 | FromDiscord | <ravinder387> it compile successfully but line 255 error https://media.discordapp.net/attachments/371759389889003532/1158964740857540678/Screenshot_2023-10-04_084142.png?ex=651e2986&is=651cd806&hm=6c5efc7f5371a3a2275c2db559a3f492334fcdf4275ee84e51c8a0444cee2f19& |
03:13:04 | FromDiscord | <ravinder387> line 255 error https://media.discordapp.net/attachments/371759389889003532/1158964981035974706/Screenshot_2023-10-04_084243.png?ex=651e29c0&is=651cd840&hm=eb4b842b3cb694a0ec2815c541feed7a759db2fb68578f3567fc13caab32fd98& |
03:15:27 | * | LuxuryMode joined #nim |
03:15:51 | LuxuryMode | Anyone been able to get syntax highlighting/coloring for nim in vim/nvim? I got the lsp working, but I still have no colors :( |
03:20:18 | FromDiscord | <ravinder387> vim will dead on 2025 |
03:20:45 | FromDiscord | <fastfist> whaaa? that isa huge hottake |
03:24:19 | LuxuryMode | lulz |
03:24:28 | FromDiscord | <dissolved.girl> In reply to @LuxuryMode "Anyone been able to": Yes |
03:24:36 | FromDiscord | <dissolved.girl> One sec |
03:25:19 | * | LuxuryMode considers moving to Discord |
03:25:20 | FromDiscord | <dissolved.girl> This is my setup: https://forum.nim-lang.org/t/10507#70259 |
03:25:53 | LuxuryMode | Ah, thank you so much! |
03:25:56 | FromDiscord | <dissolved.girl> nimlangserver provides the.. well... language server, and the nim.nvim provides the colours |
03:28:51 | LuxuryMode | Amazing, thank you https://ibb.co/7knLFpq |
03:28:59 | LuxuryMode | Right |
03:34:07 | LuxuryMode | Does anything else belong in my .gitignore besides `nimcache/`, `nimblecache/`, and `htmldocs/`? |
03:34:34 | LuxuryMode | oh I guess the compiled executables |
03:34:37 | FromDiscord | <dissolved.girl> Maybe `bin/` |
03:34:46 | FromDiscord | <dissolved.girl> If you've set it to compile there |
03:37:36 | LuxuryMode | Looks like it's going into `src/` which I hadn't even realized. I've just been running with `nim c -r --verbosity:0 src/main.nim` |
04:04:57 | * | azimut quit (Remote host closed the connection) |
04:04:57 | * | blop_ quit (Remote host closed the connection) |
04:05:17 | * | azimut joined #nim |
04:08:09 | * | blop_ joined #nim |
04:18:40 | FromDiscord | <dissolved.girl> you can set a nim.cfg option to compile into specific directories |
04:20:59 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I6P |
04:30:55 | * | gooba quit (Remote host closed the connection) |
04:31:12 | * | gooba joined #nim |
04:59:48 | * | rockcavera quit (Remote host closed the connection) |
05:33:14 | FromDiscord | <dissolved.girl> sent a code paste, see https://play.nim-lang.org/#ix=4I6U |
05:33:25 | FromDiscord | <dissolved.girl> I usually have it set to `bin/` per project. |
05:43:12 | * | advesperacit joined #nim |
05:46:10 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I6W |
05:47:08 | FromDiscord | <pmunch> That it has encountered a C type which it doesn't know how to map |
05:47:21 | FromDiscord | <pmunch> Which mostly just means I never encountered it |
05:47:54 | FromDiscord | <sOkam! 🫐> https://github.com/mackron/miniaudio basically this |
05:52:11 | FromDiscord | <sOkam! 🫐> @pmunch it seems to be finding -some- stuff, which wasnt before↵but it hits that error, and dunno how to continue↵do i need to wait until you patch it? https://media.discordapp.net/attachments/371759389889003532/1159005022512750662/image.png?ex=651e4f0a&is=651cfd8a&hm=a545d7328589b9acdcc79c2829dcbf5968f3ce1a0dde62f21bc3bb61695f1fc5& |
05:53:46 | FromDiscord | <sOkam! 🫐> this seems to be the type that fails to parse 🤔 https://media.discordapp.net/attachments/371759389889003532/1159005419176468480/image.png?ex=651e4f69&is=651cfde9&hm=ac767033eabc4550b05f619c9676b7729dfe1306addf382c50ad6009fd5449d3& |
05:54:41 | FromDiscord | <sOkam! 🫐> oh nvm, there are many with `invalid`... all of them coming from mmintrin.h |
06:00:07 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://paste.rs/Ll4gY |
06:03:09 | * | cnx quit (Remote host closed the connection) |
06:05:25 | * | cnx joined #nim |
06:16:22 | FromDiscord | <pmunch> Yeah, you basically need me (or someone else, hint hint) to fix it |
06:20:39 | * | GreaseMonkey quit (Remote host closed the connection) |
06:25:34 | * | PMunch joined #nim |
06:26:59 | FromDiscord | <pmunch> Looked into it, and it's caused by `attribute((vector_size(8), aligned(8)));`. This makes the type into a vector, which I'm not entirely sure how to wrap.. |
06:28:05 | FromDiscord | <pmunch> If anyone is more familiar with SIMD instructions then maybe you could shed some light? |
06:30:39 | PMunch | It seems like maybe an opaque object is the way to go, judging my this: https://github.com/bsegovia/x86_simd.nim/blob/master/x86_sse.nim |
06:38:29 | * | LuxuryMode quit (Quit: Connection closed for inactivity) |
07:13:12 | * | junaid_ joined #nim |
08:36:34 | * | advesperacit_ joined #nim |
08:36:36 | * | advesperacit quit (Ping timeout: 272 seconds) |
08:49:05 | * | azimut quit (Ping timeout: 252 seconds) |
08:58:11 | NimEventer | New thread by Cyb3rC3lt: AES Help Please, see https://forum.nim-lang.org/t/10527 |
09:10:22 | * | advesperacit_ quit (Ping timeout: 255 seconds) |
09:10:42 | * | advesperacit joined #nim |
09:29:55 | * | PMunch_ joined #nim |
09:32:18 | FromDiscord | <pmunch> @sOkam! 🫐 do you have a minimal sample of the wrapper you try to create? I think I have fixed the bug |
09:32:56 | * | PMunch quit (Ping timeout: 255 seconds) |
09:34:06 | * | PMunch_ is now known as PMunch |
10:07:51 | PMunch | Hmm, for some reason `top5[(pos + 1)..^1] = top5[pos..^2]` is slower than `for i in countdown(3, pos): top5[i + 1] = top5[i]` |
11:02:22 | FromDiscord | <.aingel.> Why can I not find the nim docs for `enum` |
11:02:50 | FromDiscord | <vindaar> https://nim-lang.github.io/Nim/manual.html#types-enumeration-types |
11:03:13 | FromDiscord | <.aingel.> In reply to @vindaar "https://nim-lang.github.io/Nim/manual.html#types-en": Thanks @vindaar |
11:03:21 | FromDiscord | <.aingel.> Any idea on how to make that searchable via enum |
11:03:26 | FromDiscord | <.aingel.> (edit) "Any idea on how to make that searchable via ... enum" added "the keyword" |
11:03:40 | FromDiscord | <.aingel.> If you search google nim enum you don't get that neither if you search "enum" in the docs page |
11:03:47 | FromDiscord | <.aingel.> There should be some sort of alias or something |
11:04:12 | FromDiscord | <Phil> I mean the manual in general is not searchable on the docs page |
11:04:35 | FromDiscord | <.aingel.> Oh I see |
11:04:37 | FromDiscord | <Phil> It's basically:↵For general concepts: Go to manual page, do CTRL + F↵To reference docs to specific procs: Go to the nim lib and enter whatever into the search field |
11:04:53 | FromDiscord | <.aingel.> Shouldn't that be changed somehow |
11:04:57 | FromDiscord | <Phil> (edit) "F↵To" => "F, type whatever and press F3 until you got what you want↵To" |
11:05:17 | FromDiscord | <Phil> I don't think so tbh, they are 2 completely separate kinds of documentation |
11:05:31 | FromDiscord | <Phil> The search is specifically reference documentation search, so you look for a specific proc name that you want to know more for |
11:06:02 | FromDiscord | <Phil> the equivalent of the nim manual would be in rust "the book" |
11:06:29 | FromDiscord | <Phil> And I'm actually not sure what equivalents other languages have as a general introduction-type lang spec thingy |
11:08:53 | FromDiscord | <Phil> The manual is sort of the super short equivalent of an "Introduction to java" book.↵You want a list of chapter overview so you can easily click through - which it has in the sidebar.↵↵Wanting an explainer on a proc is looking for reference documentation which you need search for because reference documentation by its nature is structure the way the code is structure and you can't be expected to search through 4000 different files. |
11:09:27 | FromDiscord | <Phil> The fact that the manual links to reference docs in the sidebar may be just giving off the wrong impression there |
11:09:40 | FromDiscord | <Phil> (edit) "links to" => "provides a search for the" |
11:10:47 | FromDiscord | <Phil> It would be rather unexpected behaviour in my eyes if I enterd something in a search for reference documentation in Rust or python and suddenly I got linked to a piece of text from their language specification |
11:10:57 | FromDiscord | <Phil> (edit) "enterd" => "entered" |
11:13:05 | FromDiscord | <Phil> I think it makes sense to develop a sense for: When are you looking for a language construct (enums are one for example) and when are you looking for the existence of specific consts/procs/templates/macros |
11:13:09 | FromDiscord | <.aingel.> But I mean the fact that there's no way to find out about the enum type from the docs is crazy |
11:13:14 | FromDiscord | <.aingel.> To me anyways |
11:14:20 | FromDiscord | <Phil> I don't know a single language where they mix between reference documentation of libs etc. and language specs |
11:14:39 | FromDiscord | <.aingel.> https://docs.python.org/3/library/enum.html |
11:14:43 | FromDiscord | <.aingel.> I just googled python enum |
11:14:45 | FromDiscord | <.aingel.> Boom first link |
11:14:54 | FromDiscord | <.aingel.> It's part of the python docs |
11:15:00 | FromDiscord | <.aingel.> I'm sure I can do that with a ton of languages |
11:15:10 | FromDiscord | <Phil> It's also not part of the core python language of itself, it's a library that builds an enum type. |
11:15:17 | FromDiscord | <Phil> (edit) "It's also not part of the core python language ... of" added "in and" |
11:15:31 | FromDiscord | <.aingel.> https://docs.python.org/3/tutorial/classes.html |
11:15:35 | FromDiscord | <.aingel.> Boom |
11:15:37 | FromDiscord | <Phil> It may be default shipped with python, sure, but that's like as if nim had an std/enum lib |
11:16:11 | FromDiscord | <.aingel.> classes are part of the core language in python |
11:17:39 | FromDiscord | <.aingel.> Even when i search enum in the manual search thing, which first of all has a weird imo search result thing |
11:17:45 | FromDiscord | <.aingel.> I don't get the enumeration type |
11:17:56 | FromDiscord | <.aingel.> Everyone knows this type as "enum" or would expect to type enum |
11:18:39 | FromDiscord | <Phil> That's also a tutorial that can not be searched via the quick search in the top↵I will hand you though that if you search in their for "enum", that 30th hit or so finally lands you on some reference documentation, meaning that in python the search also includes reference docs |
11:18:41 | FromDiscord | <Phil> As well as changelogs |
11:18:57 | FromDiscord | <_nenc> Nim's document is honestly not as good as some other projects. For example, it has a relatively poor searching feature (but better than no searching feature). That's fact. |
11:18:57 | FromDiscord | <Phil> (edit) "That's also a tutorial that can not be searched via the quick search in the top↵I will hand you though that if you search in their for "enum", that 30th hit or so finally lands you on some reference documentation, meaning that in python the search also includes ... reference" added "language" |
11:19:29 | FromDiscord | <Phil> I'm not even disputing that, I'm disputing that a search that (in my eyes) was always only meant as search for reference on libs should suddenly search for everyone and their mother |
11:20:31 | FromDiscord | <.aingel.> Why not just have some sort of unified search |
11:20:50 | FromDiscord | <.aingel.> First of all there should be some way to search "enum" and get the enumeration section |
11:20:53 | FromDiscord | <.aingel.> without control-f |
11:20:54 | FromDiscord | <Phil> Because now I'm looking for a proc and the first 20 hits are spam about lang specs I don't care about |
11:21:09 | FromDiscord | <.aingel.> Okay I'll just leave it there |
11:21:20 | FromDiscord | <Phil> Which for the most part means it'd require a filter ability |
11:21:24 | FromDiscord | <Phil> (edit) "Which for the most part ... means" added "just" |
11:23:23 | FromDiscord | <Phil> I guess I should also leave it there, that was just my opinion on how I view documentation and my personal preferences for keeping things that are (in my head) separate in separate boxes.↵Not that I have any say on the matter, I'd like to emphasise that was solely me stating my preferences. |
11:23:30 | FromDiscord | <Phil> (edit) "matter," => "matter in general," |
11:23:51 | FromDiscord | <Phil> Pretty sure if it were implemented the PR would likely be accepted 🤷 |
11:24:38 | FromDiscord | <vindaar> ^--- this. I don't like to throw in the "PRs welcome", but in many cases the fact of the matter is\: anyone around currently just hasn't needed it / felt motivated to work on improving the situation↵(@Phil) |
11:25:10 | FromDiscord | <.aingel.> Gotcha, I mean the question though if people don't want it a certain way there's no point of developing it |
11:25:39 | FromDiscord | <.aingel.> Like would a PR be welcome to add the word enum somehow next to enumeration |
11:26:45 | FromDiscord | <Phil> sent a long message, see http://ix.io/4I81 |
11:26:50 | FromDiscord | <.aingel.> Just as an example |
11:26:56 | FromDiscord | <Phil> In reply to @.aingel. "Like would a PR": I think the approach would be more to add the individual headings of the manual section to the search |
11:27:19 | FromDiscord | <.aingel.> Thats a second problem too |
11:27:34 | FromDiscord | <.aingel.> More of a general problem, or more the primary problem |
11:27:41 | FromDiscord | <.aingel.> This is just a smaller one but yeah |
11:28:17 | FromDiscord | <Phil> "enum" would match "enumeration" of the heading and land it in the search results.↵So the task would be for the most part:↵1) Add the manual headings to the list of things that get searched↵2) Determine a small text excerpt that should be shown as a search hit in the search-result box |
11:28:42 | FromDiscord | <Phil> The mechanism for rendering that excerpt in the search box and performing searches etc. wouldn't even need to be touched I'm pretty sure |
11:33:01 | FromDiscord | <Phil> In reply to @.aingel. "More of a general": Yes-ish, this is just a behemoth of one you can't tackle in one go, you chip away at it |
11:33:03 | FromDiscord | <Phil> With small changes like this |
11:36:20 | FromDiscord | <Phil> "Enable the search to search more kinds of documentation"↵Then one can add the main manual, the experimental manual, the compiler flag docs etc. one by one and thus make them findable and solve that particular problem.↵↵Could even link up with the folks over in https://github.com/nim-lang/Nim/issues/22720 which I'm sure would be happy to provide support and/or feedback |
11:36:32 | FromDiscord | <Phil> (edit) ""Enable the search to search more kinds of documentation"↵Then one can add the main manual, the experimental manual, the compiler flag docs etc. one by one ... and" added "over time" |
11:36:52 | FromDiscord | <Phil> (edit) ""Enable the search to search more kinds of documentation"↵Then one can add the main manual, the experimental manual, the compiler flag docs etc. one by one over time and thus make them findable and solve that particular problem.↵↵Could even link up with the folks over in https://github.com/nim-lang/Nim/issues/22720 which I'm sure would be happy to provide support and/or feedback" => "sent a long message, see http://ix.io/4I83 |
11:39:18 | PMunch | Hmm, does `-d:danger` do anything more than `--boundChecks:off`? |
11:39:33 | PMunch | I was wondering if adding `-d:danger --boundChecks:on` would make sense. |
11:39:55 | FromDiscord | <Phil> I mean for reference, I for example don't feel motivated to tackle that search problem because I busy myself currently with owlkettle and contributing there |
11:41:25 | FromDiscord | <Phil> (edit) "there" => "there.↵That suits my current interest for my fairly limited time currently more, because "search" is a problem I've solved for myself." |
11:46:14 | FromDiscord | <.aingel.> In reply to @isofruit ""Enable the search to": Thanks for the github issue I'll look into that |
11:52:35 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4I85 |
12:23:31 | FromDiscord | <.aingel.> How do I early end an iterator? |
12:30:29 | PMunch | break? |
12:31:24 | PMunch | Hmm, tried to use `withValue` instead of `hasKeyOrPut` to add to a sequence if it exists otherwise add a sequence with one element. Not sure why but it was slower.. |
12:31:36 | PMunch | You'd think it would be faster as it's only a single lookup |
12:31:52 | * | junaid_ quit (Remote host closed the connection) |
12:43:57 | * | rockcavera joined #nim |
13:05:45 | * | junaid_ joined #nim |
13:08:58 | FromDiscord | <Chronos [She/Her]> @sOkam! 🫐 when are you gonna do docs? :p |
13:09:14 | FromDiscord | <Chronos [She/Her]> If you need help with them, I'm able to help/guide you to setting them up |
13:13:11 | * | rockcavera quit (Remote host closed the connection) |
13:33:27 | * | rockcavera joined #nim |
13:36:06 | * | systemdsucks quit (Remote host closed the connection) |
13:38:34 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I8y |
13:39:20 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "<@186489007247589376> when are you": i know 😔 |
13:39:42 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "If you need help": i haven't set them up because of figuring out github pages |
13:40:12 | FromDiscord | <sOkam! 🫐> i have a task to auto-generate the docs for mostly all my libs, I just haven't connected that to gh pages, so that's why |
13:41:09 | * | systemdsucks joined #nim |
13:44:44 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "i have a task": Ah, is the code already sorted out in a .sh script? |
13:45:00 | FromDiscord | <Chronos [She/Her]> Or anything executable by Linux? |
13:45:26 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Ah, is the code": sh 🤢 hell no, its a nimscript task |
13:45:40 | FromDiscord | <Chronos [She/Her]> If so, you probably have it even easier, the Setup-Nim action + a job to run that + uploading a dir to GH Actions |
13:45:48 | FromDiscord | <sOkam! 🫐> i don't want to rely on nim actions |
13:45:51 | FromDiscord | <Chronos [She/Her]> You can definitely stitch that together in less than a day |
13:46:00 | FromDiscord | <Chronos [She/Her]> Why not? You could also do Choosenim tbf |
13:46:04 | FromDiscord | <sOkam! 🫐> i have the tasks already, i just run a single command and they generate across all my projects |
13:46:16 | FromDiscord | <sOkam! 🫐> (edit) "nim" => "gh" |
13:46:24 | FromDiscord | <Chronos [She/Her]> The Nim action is for installing Nim |
13:46:35 | FromDiscord | <Chronos [She/Her]> You need to install Nim to run nimscript :p |
13:47:03 | FromDiscord | <sOkam! 🫐> yeah |
13:47:12 | FromDiscord | <sOkam! 🫐> but i have nimscript in my system, i don't need to install anything else |
13:48:01 | FromDiscord | <sOkam! 🫐> i just haven't figured out how to connect the pages to the gh hosting for them, the rest is setup already |
13:49:11 | FromDiscord | <Chronos [She/Her]> So you'd rather upload them manually? |
13:51:25 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "So you'd rather upload": its not manually, its a script that does all of it↵the difference is who triggers the task, me or some big-corp-managed system |
13:51:51 | * | greaser|q joined #nim |
13:52:20 | FromDiscord | <sOkam! 🫐> but yeah, i just haven't figured out the website connection itself, the rest is all ready (afaik) |
13:54:42 | FromDiscord | <Chronos [She/Her]> Fair enough aha |
13:54:54 | FromDiscord | <Chronos [She/Her]> I've configured my task to just build the docs when I create a new tag for it aha |
13:55:07 | FromDiscord | <Chronos [She/Her]> Though, I have been tempted to move to a Forgejo instance.... |
13:57:10 | FromDiscord | <Chronos [She/Her]> Oh, GitHub Pages let's you use `<username>.github.io` as a repo to deploy to Pages |
13:57:18 | FromDiscord | <Chronos [She/Her]> So you could upload the folders of your docs there |
13:59:12 | PMunch | sOkam, seems like it works. You can try Futhark HEAD now |
14:01:44 | * | junaid_ quit (Remote host closed the connection) |
14:14:17 | * | PMunch quit (Quit: Leaving) |
14:28:32 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "So you could upload": yeah, i know. -that- is the part i haven't figured out |
14:28:54 | FromDiscord | <sOkam! 🫐> In reply to @PMunch "sOkam, seems like it": kk ty ✍️ will try |
14:31:53 | FromDiscord | <sOkam! 🫐> @pmunch how do i install #head from cli? nimble its ignoring the request and installing 0.9.3 instead 🤔 |
14:32:49 | FromDiscord | <sOkam! 🫐> ah nvm, it already installed it from the nimble file |
14:35:03 | FromDiscord | <sOkam! 🫐> seems like it worked this time, ty pmunch 🙏 https://media.discordapp.net/attachments/371759389889003532/1159136606146543668/image.png?ex=651ec996&is=651d7816&hm=05404aa82fbb48643a9482af390ad95b465bc315283e0048f63096ce234b0490& |
15:50:00 | * | xet7 quit (Quit: Leaving) |
16:07:55 | FromDiscord | <my.narco> what does this even mean?? https://media.discordapp.net/attachments/371759389889003532/1159159979174019078/image.png?ex=651edf5b&is=651d8ddb&hm=2031ce92aa4b06fb49f3417aa35e9a66a8d6c9e82d964494fc1ffe3cb3b92e97& |
16:08:23 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9f |
16:08:38 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9g |
16:09:27 | FromDiscord | <Phil> Can you compile and copy paste the error the Compiler spits out? |
16:10:38 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9i |
16:10:47 | FromDiscord | <my.narco> can i not use a pointer to a seq? |
16:13:45 | FromDiscord | <Phil> Nah note that the mismatch is position 3 |
16:14:03 | FromDiscord | <Phil> You provide uint, the proc expects int |
16:14:49 | FromDiscord | <my.narco> got it, OH, IT SAYS THE POSITION ON THE LEFT |
16:14:54 | FromDiscord | <my.narco> I NEVER REALIZED THAT |
16:15:21 | FromDiscord | <Phil> Quite useful ,no? 😄 |
16:15:31 | FromDiscord | <my.narco> YEAH |
16:15:35 | FromDiscord | <my.narco> im so dumb sorry |
16:15:36 | FromDiscord | <my.narco> lol |
16:16:04 | FromDiscord | <my.narco> is there a way you think i can convert multiple bytes to a single uint? |
16:16:14 | FromDiscord | <Phil> All good, the first lecture is compiler > nimsuggest (aka error from Nim plugin) |
16:16:58 | FromDiscord | <Phil> Erm, I'm sure you could convert 8 into one uint64 since those take 8 bytes |
16:17:28 | FromDiscord | <Phil> How is a question for folks that do low level memory stuff more often, which is basically everyone |
16:18:22 | FromDiscord | <my.narco> i just need to be able to convert like a u2(2 byte seq) into a uint(single number made of those 2 bytes) |
16:18:36 | FromDiscord | <Phil> You should be able to summon elegantbeef by chaining multiple operators from sequtils to one another and state it's neat and efficient code |
16:19:15 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9m |
16:19:36 | FromDiscord | <Phil> Nah, chain operators line mapit or he'll smell the bait |
16:19:44 | FromDiscord | <Phil> (edit) "line" => "like" |
16:20:43 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9n |
16:21:15 | FromDiscord | <Phil> Chain it my man, got to use it multiple times in a row to trigger it creating copies of the seq every time |
16:22:52 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9p |
16:25:00 | FromDiscord | <Phil> Okay and now we wait... or find somebody else who knows low level memory operations.↵Honestly you might be able to just cast 2 bytes to a uint16 but I would double check that by contemplating what numbers a combo of 2 bytes in a uint16 should turn into |
16:26:59 | FromDiscord | <sOkam! 🫐> `byte` is an unsigned char, afaik. so yeah, that should work |
16:27:52 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9s |
16:28:22 | FromDiscord | <sOkam! 🫐> In reply to @my.narco "so something like this?": does your `readData` function expect a `ptr seq` or a `ptr byte`? |
16:28:30 | FromDiscord | <sOkam! 🫐> because if its not a seq, that will be very wrong |
16:28:48 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "yeah, i know. -that-": Fair aha |
16:29:01 | FromDiscord | <sOkam! 🫐> also, if its not an external function, just do `var seq[byte]` in the function.... don't pass a ptr |
16:29:13 | FromDiscord | <my.narco> In reply to @heysokam "does your `readData` function": that isnt my readData function |
16:29:19 | FromDiscord | <my.narco> stream is a FileStream |
16:29:22 | FromDiscord | <sOkam! 🫐> (edit) "`var" => "`arg :var" |
16:29:29 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4I9t |
16:29:45 | FromDiscord | <Phil> Wait, fuck, I likely just cast the pointer to a uint and not the bytes |
16:30:04 | FromDiscord | <Phil> Yeah no, no idea how else to do that |
16:30:18 | FromDiscord | <sOkam! 🫐> yeah, you need to do `x[0]` in the cast |
16:30:23 | FromDiscord | <Chronos [She/Her]> https://github.com/Yu-Vitaqua-fer-Chronos/yu-vitaqua-fer-chronos.github.io/tree/master sokam here |
16:30:27 | FromDiscord | <sOkam! 🫐> otherwise you include the len/cap in it |
16:30:29 | FromDiscord | <Chronos [She/Her]> That's my repo |
16:30:36 | FromDiscord | <Phil> In reply to @heysokam "yeah, you need to": But I wanna combine the two bytes into a single uint |
16:30:48 | FromDiscord | <Phil> That's why the uint16 |
16:30:51 | FromDiscord | <sOkam! 🫐> ah true, fudge nvm |
16:31:08 | FromDiscord | <sOkam! 🫐> well the seq is definitely in the way a bit |
16:31:20 | FromDiscord | <my.narco> In reply to @heysokam "also, if its not": this is what readData does https://media.discordapp.net/attachments/371759389889003532/1159165870040424448/image.png?ex=651ee4d7&is=651d9357&hm=21980821cda0a3ba8dd0e24e6950484e0db1ba55781384f3c1f419cef85b61c0& |
16:31:31 | FromDiscord | <Chronos [She/Her]> https://pages.github.com/ this too |
16:31:41 | FromDiscord | <Phil> With an array it behaves as expected |
16:31:47 | FromDiscord | <sOkam! 🫐> In reply to @my.narco "this is what readData": then that thing you are passing is very wrong, and you want `buffer[0].addr` instead |
16:32:03 | FromDiscord | <sOkam! 🫐> otherwise you are writing over the len/cap of the seq |
16:33:10 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4I9v |
16:34:08 | FromDiscord | <sOkam! 🫐> sent a code paste, see https://play.nim-lang.org/#ix=4I9w |
16:34:33 | FromDiscord | <sOkam! 🫐> so if you cast... you are basically casting the first two bytes of the len, not the data contents |
16:35:37 | FromDiscord | <Phil> In reply to @my.narco "i just need to": In that case, just create an array from your 2 byte seq and cast that to a uint16, bam, done |
16:36:14 | FromDiscord | <my.narco> how do you create an array from a seq? is there a ``toArray`` function? |
16:36:17 | FromDiscord | <sOkam! 🫐> I honestly would never use a seq to store a bytebuffer |
16:36:26 | FromDiscord | <Phil> In reply to @my.narco "how do you create": That or the long and arduous manual way |
16:36:42 | FromDiscord | <sOkam! 🫐> stringbuffer to store bytebuffers are a lot more usable, specially considering `treeform/binny` exists |
16:36:46 | FromDiscord | <Phil> Or rather there is definitely no toArray because toArray requires you to know the length at compiletime |
16:37:00 | FromDiscord | <my.narco> alright got it |
16:37:27 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4I9x |
16:37:35 | FromDiscord | <my.narco> yeah i understnad |
16:37:40 | FromDiscord | <Phil> 👍 |
16:37:43 | FromDiscord | <sOkam! 🫐> oh you can `,` inside cast? thats news didn't know |
16:37:49 | FromDiscord | <sOkam! 🫐> great and handy |
16:38:03 | FromDiscord | <Phil> In reply to @heysokam "oh you can `,`": I mean, it's not inside cast, it's inside the `[]` which create an array |
16:38:16 | FromDiscord | <sOkam! 🫐> oh wait, im blind as usual 🙈 |
16:38:30 | FromDiscord | <Phil> Got too many of them blueberries |
16:38:34 | FromDiscord | <sOkam! 🫐> for sure |
16:39:55 | FromDiscord | <sOkam! 🫐> but yeah, @my.narco, consider using strings for bytebuffer stuff↵treeform/binny is great, and stringstreams are a thing, no need to void stuff in nim↵plus, in-memory strings are faster than streams by a lot, unless you are given the stream without a choice you will almost always be faster with a string and not a stream |
16:40:27 | FromDiscord | <my.narco> In reply to @heysokam "but yeah, <@811230507408031774>, consider": i will take that into account, thank you |
16:42:38 | FromDiscord | <vindaar> In reply to @heysokam "I honestly would never": well, a string is functionally identical to a `seq[byte]` (even the implementation is essentially identical). And on a byte buffer most string operations do not make any sense, so ideally you have a separate type completely for that reason |
16:42:41 | * | xet7 joined #nim |
16:43:19 | FromDiscord | <vindaar> (I assume it's more for historical reasons and compiler logic that `system.nim` doesn't just say `string = distinct seq[byte]`) |
17:07:26 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://play.nim-lang.org/#ix=4I9H |
17:08:48 | FromDiscord | <Chronos [She/Her]> https://play.nim-lang.org/#ix=4I9I |
17:09:02 | FromDiscord | <Chronos [She/Her]> Lets you pass in a seq, but obviously it just does what Phil did |
17:09:05 | FromDiscord | <Chronos [She/Her]> But manually- |
17:09:17 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4I9J |
17:09:28 | FromDiscord | <Phil> (edit) "https://play.nim-lang.org/#ix=4I9J" => "https://play.nim-lang.org/#ix=4I9K" |
17:09:37 | FromDiscord | <Chronos [She/Her]> Also has a util for endianness- |
17:09:44 | FromDiscord | <Chronos [She/Her]> For BE |
17:10:08 | FromDiscord | <Phil> In reply to @chronos.vitaqua "https://play.nim-lang.org/#ix=4I9I": Oh neat! |
17:10:47 | FromDiscord | <Chronos [She/Her]> Yeah, I originally used it in my ID format for my app before just deciding to implement the ULID spec |
17:26:36 | * | nils` quit (Ping timeout: 248 seconds) |
17:26:53 | FromDiscord | <my.narco> sent a code paste, see https://play.nim-lang.org/#ix=4I9S |
17:28:32 | FromDiscord | <_gumbercules> no |
17:28:41 | FromDiscord | <_gumbercules> they're not variables either btw |
17:28:45 | FromDiscord | <_gumbercules> they are field names |
17:28:47 | FromDiscord | <Phil> In reply to @my.narco "can i have multiple": You mean have a field apply to 2 out of N kinds of object variants?↵no. |
17:28:54 | FromDiscord | <Phil> Dangit, gumb was faster |
17:29:15 | FromDiscord | <_gumbercules> 🫳 🔫 |
17:29:19 | FromDiscord | <_gumbercules> quickest hands in the west |
17:29:21 | FromDiscord | <_gumbercules> or something |
17:29:25 | FromDiscord | <my.narco> In reply to @_gumbercules "they're not variables either": yeah may bad, im stupid at naming |
17:29:31 | FromDiscord | <my.narco> alright thats unfortunate, thanks though |
17:29:33 | FromDiscord | <_gumbercules> no worries |
17:29:56 | FromDiscord | <_gumbercules> and you're not stupid 😉 |
17:30:33 | FromDiscord | <Phil> sent a code paste, see https://play.nim-lang.org/#ix=4I9V |
17:30:57 | FromDiscord | <Phil> (Assume gdouble is just a flipping double, I have no idea why in GTK that stuff all is prefixed with g) |
17:32:01 | FromDiscord | <_gumbercules> yeah it's most likely a pointer to a 64-bit floating point number |
17:32:13 | FromDiscord | <_gumbercules> assuming that's what `gdouble` is |
17:32:26 | FromDiscord | <_gumbercules> but I mean - in C arrays are pointers |
17:32:43 | FromDiscord | <_gumbercules> so it could also be a pointer to an array of float64s |
17:32:46 | FromDiscord | <Phil> This should be a single float |
17:33:16 | FromDiscord | <_gumbercules> gotcha - yeah context matters in C but this is generally how you handle stuff like `var` parameters in Nim |
17:33:20 | FromDiscord | <Phil> The fact that I have to prefix so much with "should" when it comes to C is scary |
17:33:46 | FromDiscord | <_gumbercules> the caller has to pass a pointer if they want it to be mutated by the function they are calling |
17:34:06 | FromDiscord | <_gumbercules> C is that whole - ultimate power comes ultimate responsibilty, much like asm |
17:34:16 | FromDiscord | <_gumbercules> if you know what you're doing, C is the most amazing programming language ever |
17:34:27 | FromDiscord | <_gumbercules> and even then it will still surprise you |
17:35:03 | FromDiscord | <Chronos [She/Her]> I wonder if there's anything that would be useful but simple for Nim that I could implement |
17:35:07 | FromDiscord | <_gumbercules> but there are also many reasons why it's not the greatest language if you want to be productive or not have to worry about every detail all of the time |
17:35:46 | FromDiscord | <Phil> I mean, right now I'm just waging war against adwaita widgets |
17:35:58 | FromDiscord | <Chronos [She/Her]> That does not sound simple |
17:36:04 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "I wonder if there's": simple or easy? |
17:36:10 | FromDiscord | <Chronos [She/Her]> Either |
17:36:15 | FromDiscord | <Chronos [She/Her]> Idk the difference |
17:36:31 | FromDiscord | <_gumbercules> knowing the difference is important |
17:36:42 | FromDiscord | <Chronos [She/Her]> What is the difference? |
17:36:58 | FromDiscord | <Chronos [She/Her]> To me easy means it could be big and complex but the logic is easy to comprehend |
17:37:08 | FromDiscord | <_gumbercules> For that |
17:37:12 | FromDiscord | <_gumbercules> I recommend you watch https://www.youtube.com/watch?v=SxdOUGdseq4 |
17:37:18 | FromDiscord | <Chronos [She/Her]> Simple means that in hindsight it was also easy but accurately working on it may be complex |
17:37:25 | FromDiscord | <_gumbercules> it's a pretty legendary talk |
17:37:48 | FromDiscord | <demotomohiro> I think if your first programming language was assembly language, C lang would looks like a nice high level language. |
17:38:48 | FromDiscord | <_gumbercules> in reality it is, but most programmers don't even have to worry about C/C++ in their daily lives these days so to most it might as well be assembly |
17:39:20 | FromDiscord | <_gumbercules> people scoff at C being. a high level language but they are simply ignorant |
17:39:35 | FromDiscord | <_gumbercules> (edit) "being." => "being" |
17:41:11 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "it's a pretty legendary": I am not able to focus on videos at all aha |
17:41:15 | * | azimut joined #nim |
17:41:50 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "I am not able": https://media.discordapp.net/attachments/371759389889003532/1159183608578330624/Screenshot_2023-10-04_at_12.41.33_PM.png?ex=651ef55c&is=651da3dc&hm=989b80b342f51002c971f1b70f167cd06992f2267e320129ca84f4abc53d17c6& |
17:42:21 | FromDiscord | <_gumbercules> https://media.discordapp.net/attachments/371759389889003532/1159183740313018539/Screenshot_2023-10-04_at_12.41.33_PM.png?ex=651ef57c&is=651da3fc&hm=e8df3462f03ff730934fab17c5895673b91cadf7dc04ccd0e0e428da757e5260& |
17:42:30 | FromDiscord | <_gumbercules> whoops |
17:42:51 | FromDiscord | <_gumbercules> https://media.discordapp.net/attachments/371759389889003532/1159183866620280882/Screenshot_2023-10-04_at_12.41.57_PM.png?ex=651ef59a&is=651da41a&hm=0f7e6ec2cd232ab3bb9a1319843cc61e895916c638c308b73b4b55f8b88d3bb1& |
17:43:05 | FromDiscord | <Chronos [She/Her]> That makes sense |
17:43:14 | FromDiscord | <Chronos [She/Her]> Then ig I'm fine with simple or easy |
17:43:20 | FromDiscord | <Chronos [She/Her]> I don't mind either |
17:46:02 | FromDiscord | <_gumbercules> the ideal is probably both combined haha - but that tends to be low-hanging fruit |
17:46:26 | FromDiscord | <_gumbercules> my advice would be to pick something that is of interest to you that would benefit others working in that same area |
17:46:47 | FromDiscord | <_gumbercules> so if you want to work on something gamedev related for instance - maybe port some popular library from C to Nim |
17:47:53 | FromDiscord | <_gumbercules> or talk to others and see what they're working on to see if there's any room for collaboration - lord knows that there are probably at least 10 Nim game engines / frameworks / libraries in development at any given time |
17:49:37 | FromDiscord | <_gumbercules> one project idea that would probably be super popular is porting https://github.com/fungos/cr to Nim |
17:51:01 | * | rockcavera quit (Ping timeout: 260 seconds) |
17:52:50 | FromDiscord | <wick3dr0se> Is it possible to modify existing headers to httpclient? Tried calling newHttpHeaders() and setting again but seems to not work. Is it necessary to call a new client? |
17:57:14 | FromDiscord | <_gumbercules> you could also create bindings to https://github.com/r-lyeh/FWK - then Nim has another 3d game engine at its disposal. That would also probably be pretty simple to do. |
17:59:20 | FromDiscord | <_gumbercules> In reply to @wick3dr0se "Is it possible to": why not call `request` and supply them? |
17:59:24 | FromDiscord | <Phil> How did you check if a proc exists in the compilation context again? |
17:59:33 | FromDiscord | <Phil> I want to do "if this proc is present do X, else do Y" |
17:59:33 | FromDiscord | <_gumbercules> `when defined(x)` |
17:59:49 | FromDiscord | <wick3dr0se> In reply to @_gumbercules "why not call `request`": Well I'm not sure how. I haven't ever seen or tried something like that |
17:59:52 | FromDiscord | <_gumbercules> or `when compiles` |
18:00:02 | FromDiscord | <sOkam! 🫐> In reply to @isofruit "How did you check": `if compiles: ...`? |
18:00:33 | FromDiscord | <_gumbercules> In reply to @wick3dr0se "Well I'm not sure": https://nim-lang.org/docs/httpclient.html#request%2CAsyncHttpClient%2C%2Cstring%2CHttpHeaders%2CMultipartData |
18:00:47 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4Ia7 |
18:01:05 | FromDiscord | <wick3dr0se> I call it and resupply to that but yea no luck |
18:02:05 | FromDiscord | <wick3dr0se> Ahhh so I can pass directly to request. Thanks |
18:02:25 | FromDiscord | <wick3dr0se> I'm always overcomplicating everything.. |
18:02:31 | FromDiscord | <wick3dr0se> Just gotta read more |
18:02:33 | FromDiscord | <_gumbercules> Nope |
18:02:43 | FromDiscord | <_gumbercules> It's just there are a myriad of ways to do things |
18:02:54 | FromDiscord | <_gumbercules> What you were trying to do is pretty sensible - I cannot explain why it doesn't work |
18:02:56 | FromDiscord | <wick3dr0se> One would think my method would work tho |
18:03:02 | FromDiscord | <wick3dr0se> Weird... |
18:03:09 | FromDiscord | <_gumbercules> Nim is full of oddities |
18:03:12 | FromDiscord | <_gumbercules> and inconsistencies |
18:03:18 | FromDiscord | <wick3dr0se> Beautiful language tho |
18:03:24 | * | rockcavera joined #nim |
18:03:24 | * | rockcavera quit (Changing host) |
18:03:24 | * | rockcavera joined #nim |
18:03:37 | FromDiscord | <wick3dr0se> I enjoy the challenge over others not implementing the same thing. At least with functional examples |
18:04:16 | FromDiscord | <wick3dr0se> Most examples I've seen writting in Nim could be rewritten a couple times |
18:04:39 | FromDiscord | <_gumbercules> yeah - writing idiomatic Nim or really idiomatic code in any language doesn't happen overnight |
18:05:11 | FromDiscord | <_gumbercules> I've been writing Nim since 2015 and still learn new things |
18:05:28 | FromDiscord | <_gumbercules> I also forget a lot of things - so that never helps but 🤷 |
18:08:37 | FromDiscord | <_gumbercules> In reply to @heysokam "`if compiles: ...`?": `when` is checked at compile time and `if` at runtime I believe - that would be the only difference |
18:10:23 | FromDiscord | <wick3dr0se> I've been back and forth with it for like a year but quickly kept giving up.Being persistent these last few weeks with it and learning a lot |
18:10:29 | FromDiscord | <wick3dr0se> I'm trying to escape bash |
18:10:31 | FromDiscord | <_gumbercules> sent a code paste, see https://play.nim-lang.org/#ix=4Iad |
18:10:47 | FromDiscord | <wick3dr0se> Wrote a bunch of shit lately tho |
18:10:52 | FromDiscord | <_gumbercules> well Nim is a good escape route for bash - that and python |
18:11:02 | FromDiscord | <wick3dr0se> Started an IRC server, API, Discord bot and more |
18:11:04 | FromDiscord | <_gumbercules> I love bash though - such a quirky language |
18:11:06 | FromDiscord | <vindaar> sent a code paste, see https://play.nim-lang.org/#ix=4Iac |
18:11:21 | FromDiscord | <wick3dr0se> Yea Python is not as awesome as Nim tho |
18:11:27 | FromDiscord | <_gumbercules> In reply to @vindaar "not just that. `when`": good call out! |
18:12:30 | FromDiscord | <_gumbercules> In reply to @wick3dr0se "Yea Python is not": Yeah - I worked with Python for a while but was never a huge fan. I get the appeal but it was never a language that I was seriously considering for the kinds of programs I wanted to write, and then working with it professionally just turned me off more. |
18:12:49 | FromDiscord | <wick3dr0se> Can't I just append headers too? I thought in the past I've used like client.headers.add("string") but apparently not |
18:13:10 | FromDiscord | <wick3dr0se> Everyone does everything the same in Python |
18:13:17 | FromDiscord | <wick3dr0se> Thats my turnaway lol |
18:13:55 | FromDiscord | <_gumbercules> In reply to @wick3dr0se "Can't I just append": I'm going to get to the bottom of this now, one moment.... |
18:14:43 | FromDiscord | <wick3dr0se> Well thank you! Idk why I'm struggling with some headers. Just decided I'll just set the auth and append content-type after if I can |
18:14:58 | FromDiscord | <wick3dr0se> Before I was trying to re-set the entire headers object |
18:15:22 | FromDiscord | <wick3dr0se> I see that works with `request` now |
18:17:44 | FromDiscord | <_gumbercules> okay - so I imagine before calling `request` you were calling whatever proc corresponds to the verb of the request you wanted to make, like `post` for instance? |
18:18:34 | FromDiscord | <wick3dr0se> sent a code paste, see https://play.nim-lang.org/#ix=4Iag |
18:18:35 | FromDiscord | <wick3dr0se> Setting them like this initially now |
18:18:42 | FromDiscord | <wick3dr0se> Before I included the content-type |
18:18:56 | FromDiscord | <wick3dr0se> Then I had t hat proc I was trying to modify them with |
18:19:07 | FromDiscord | <_gumbercules> I just looked at `httpclient.nim` and none of the procedures for the various HTTP request verbs pass the client headers to `request` |
18:19:35 | FromDiscord | <_gumbercules> so if you were calling like `client.post` or `post(client` or something like that - whatever headers are assigned to `client` aren't being passed to `post` |
18:19:43 | NimEventer | New thread by bsljth: How ready is Nim (and the ecosystem) for front-end web development?, see https://forum.nim-lang.org/t/10528 |
18:19:49 | FromDiscord | <_gumbercules> `post` in turn calls `request` |
18:19:53 | FromDiscord | <wick3dr0se> I'm using `request` only |
18:20:28 | FromDiscord | <wick3dr0se> I'll just overwrite them entirely within the request for now |
18:20:33 | FromDiscord | <_gumbercules> ah okay |
18:20:36 | FromDiscord | <wick3dr0se> Nothing wrong with cleaning it up later |
18:20:54 | FromDiscord | <wick3dr0se> I put too much shit off trying to optimize it |
18:21:06 | FromDiscord | <_gumbercules> yeah - it seems that whatever `headers` are associated with the `httpclient` aren't necessarilly going to be used when the actual http request is made |
18:21:20 | FromDiscord | <_gumbercules> which is definitely counter-intuitive |
18:21:20 | FromDiscord | <wick3dr0se> Thats odd |
18:21:29 | FromDiscord | <_gumbercules> and is probably a bug / poor implementation |
18:21:48 | FromDiscord | <wick3dr0se> Yea it makes no logical sense at all but I am still learning a lot |
18:21:53 | FromDiscord | <wick3dr0se> Thanks for all your help |
18:22:01 | FromDiscord | <_gumbercules> anytime! |
18:27:45 | FromDiscord | <sOkam! 🫐> is it possible to make the components of a seq, not the seq itself, to be `{.alignas(16).}`? |
18:33:52 | FromDiscord | <_gumbercules> tmk that pragma can only be applied to variables - not types |
18:34:42 | FromDiscord | <sOkam! 🫐> it also works on object fields |
18:34:52 | FromDiscord | <sOkam! 🫐> but seq is not an object I can modify, or is it? |
18:37:19 | FromDiscord | <_gumbercules> no but you could always define your own custom sequence and then write a converter that casts it to a sequence - whether this is a good idea or not is another question entirely haha |
18:37:46 | FromDiscord | <_gumbercules> but yeah - then theoretically you could specify the alignment requirement for the `data` field in the custom sequence |
18:39:24 | FromDiscord | <sOkam! 🫐> sounds awful, ngl |
18:39:45 | FromDiscord | <_gumbercules> `codegenDecl` might be your friend here as well |
18:39:54 | FromDiscord | <sOkam! 🫐> i would rather `distinct` a vector with 4 components and remove access to the fourth |
18:40:10 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "`codegenDecl` might be your": in what way? |
18:41:21 | FromDiscord | <_gumbercules> mmm let me see if I can create an example on the playground |
18:45:22 | FromDiscord | <_gumbercules> In reply to @heysokam "in what way?": something like this: https://play.nim-lang.org/#ix=4Ial |
18:46:05 | FromDiscord | <_gumbercules> the example is contrived but hopefully gets the idea across |
19:39:25 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "something like this: https://play.nim-lang.org/#ix=": what's the benefit of this at all, compared to just `{.align(16).}` on the fields? |
19:43:42 | FromDiscord | <_gumbercules> In reply to @heysokam "what's the benefit of": well - I don't think there is much but in this case you could use this custom type in a `seq` and you would know that it is aligned |
19:44:11 | FromDiscord | <_gumbercules> it's just a way to add a C compiler hint for alignment on a type - which we can't do in Nim |
20:03:47 | * | jmdaemon joined #nim |
20:13:25 | FromDiscord | <sOkam! 🫐> i see. yeah the nim approach seems a lot better |
20:18:02 | FromDiscord | <Chronos [She/Her]> What if Nim stdlib but made with Rust /j |
20:21:13 | FromDiscord | <_gumbercules> haha another project idea - a stdlib for Nim that doesn't require the GC |
20:21:51 | FromDiscord | <_gumbercules> bonus points if you design it so that every procedure that performs an allocation accepts an allocator as an argument |
20:22:27 | FromDiscord | <raynei486> Zig vibes |
20:22:53 | FromDiscord | <_gumbercules> C vibes 😛 |
20:26:35 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "bonus points if you": How would you make it accept an allocator hmmm |
20:26:42 | FromDiscord | <Chronos [She/Her]> Would it have to have a vtable or something? |
20:27:32 | FromDiscord | <Chronos [She/Her]> Also for stdlib stuff like tables, should you be able to change the allocator at any time during the object's lifespan? |
20:27:37 | FromDiscord | <Chronos [She/Her]> Or only during creation? |
20:27:57 | FromDiscord | <Chronos [She/Her]> It would be an interesting challenge to take on considering I do not touch that stuff normally |
20:27:59 | FromDiscord | <_gumbercules> well your custom stdlib's table I imagine would hold a reference to the allocator it was allocated with |
20:28:11 | FromDiscord | <_gumbercules> if your writing your own stdlib your writing your own table implementation 🙂 |
20:28:18 | FromDiscord | <Chronos [She/Her]> It would but should you be able to change it? |
20:28:24 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "if your writing your": Yep I'm aware |
20:28:31 | * | advesperacit quit () |
20:28:42 | FromDiscord | <_gumbercules> no you wouldn't be able to change it - I think that field would be unexported |
20:28:56 | FromDiscord | <_gumbercules> you'd provide the allocator when you call `newTable` or whatever |
20:29:11 | FromDiscord | <raynei486> Just like... Zig.. 😛 |
20:29:15 | FromDiscord | <Chronos [She/Her]> Also assuming you can pass an allocator as an argument but also have it be optional too and have a default allocator? (Such as Nim's allocator or malloc) |
20:29:18 | FromDiscord | <raynei486> Cool project idea tho |
20:29:18 | FromDiscord | <Chronos [She/Her]> Never used Zig so |
20:29:19 | FromDiscord | <_gumbercules> yeah but I mean Zig didn't popularize this |
20:29:20 | FromDiscord | <raynei486> who's gonna pick it up |
20:29:22 | FromDiscord | <_gumbercules> C did |
20:29:32 | FromDiscord | <_gumbercules> anyone who wants to be able to define their own allocators and use them with Nim |
20:29:36 | FromDiscord | <Chronos [She/Her]> I'm thinking of trying it on a small scale lol |
20:29:42 | FromDiscord | <raynei486> In reply to @_gumbercules "C did": Maybe I haven't read enough embedded code to know |
20:29:46 | FromDiscord | <_gumbercules> currently you can patch the stdlib and replace the allocator but you have to use that one allocator for all alocations |
20:30:14 | FromDiscord | <Chronos [She/Her]> Does system.nim rely on the GC specifically? |
20:30:14 | FromDiscord | <_gumbercules> you could have a `threadvar` and use locks etc and then keep track of the current allocator or something like that to support multiple allocators with Nim and the current stdlib |
20:30:18 | FromDiscord | <_gumbercules> but it'd probably be pretty ugly |
20:30:31 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "Does system.nim rely on": I don't think so |
20:30:37 | FromDiscord | <Chronos [She/Her]> Also I wonder... would arc + destructors be useful here? |
20:30:58 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "I don't think so": I guess I'd still need to modify it to allow for custom allocators for types (such as strings) tho |
20:30:59 | FromDiscord | <_gumbercules> no - this would all be manual memory management |
20:31:05 | FromDiscord | <Chronos [She/Her]> Ah |
20:31:18 | FromDiscord | <Chronos [She/Her]> So with `free` methods for everything then? |
20:31:32 | FromDiscord | <Chronos [She/Her]> Procs |
20:31:44 | FromDiscord | <_gumbercules> well just one `free` proc most likely |
20:31:50 | FromDiscord | <_gumbercules> that allocator would implement |
20:32:10 | FromDiscord | <_gumbercules> allocator would probably expose an interface like - `alloc`, `alignedAlloc`, `realloc` and `free` |
20:32:29 | FromDiscord | <_gumbercules> and anywhere you need to do one of those things - you would pass along an allocator |
20:33:01 | FromDiscord | <_gumbercules> or could store a reference to the allocator in an object and then have a generic `free` that invokes that allocator's `free` |
20:33:19 | * | Jjp137 quit (Quit: Leaving) |
20:33:26 | FromDiscord | <_gumbercules> https://github.com/niklas-ourmachinery/bitsquid-foundation/blob/master/memory.h |
20:33:27 | FromDiscord | <_gumbercules> something like this |
20:33:28 | FromDiscord | <Chronos [She/Her]> Interesting... |
20:33:57 | FromDiscord | <_gumbercules> as @raynei486 pointed out - this would be similar to what Zig and Odin offer |
20:34:25 | * | Jjp137 joined #nim |
20:34:30 | FromDiscord | <_gumbercules> and I mean - people do this today (use Nim without the GC - so no ARC/ORC) but they have to bring their own stdlib |
20:35:39 | FromDiscord | <_gumbercules> having a standardized one or at least an off-the-shelf one would be neat |
20:36:10 | FromDiscord | <_gumbercules> people that do embedded stuff / care deeply about performance would probably be thrilled to have one |
20:36:34 | FromDiscord | <raynei486> I guess something like ETL that's available for C++ |
20:36:41 | FromDiscord | <raynei486> (edit) removed "that's available" |
20:36:50 | FromDiscord | <Chronos [She/Her]> I don't have anything where I could apply this personally tbh |
20:36:51 | FromDiscord | <raynei486> No dynamic memory allocation is pretty exciting |
20:37:45 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "I don't have anything": Unless you're working on near-realtime software or embedded software on extremely resource constrained devices, you're not likely to |
20:38:08 | FromDiscord | <_gumbercules> Games and game engines could be an application but not really unless you need to squeeze a lot of performance out |
20:38:36 | FromDiscord | <Chronos [She/Her]> Yeaaah |
20:38:52 | FromDiscord | <Chronos [She/Her]> I'll consider taking it on but I likely won't- |
20:39:29 | FromDiscord | <Chronos [She/Her]> An stdlib for Nim written in Rust /j |
20:40:09 | FromDiscord | <.aingel.> Wha |
20:40:11 | FromDiscord | <.aingel.> Haha |
20:40:24 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "haha another project idea": misery |
20:40:48 | FromDiscord | <_gumbercules> Meh, managing memory manually isn't THAT bad |
20:40:57 | FromDiscord | <sOkam! 🫐> mm:none is not maintained, it has so many footguns because of the lang not supporting it at all |
20:41:02 | FromDiscord | <_gumbercules> and it can have advantages |
20:41:22 | FromDiscord | <sOkam! 🫐> i had a massive list of config options just to not crash the compiler, when those should have been disabled by default |
20:41:49 | FromDiscord | <_gumbercules> well yeah, that makes some sense - you're not really supposed to use it with the stdlib and I imagine certain compiler features rely on the stdlib |
20:42:05 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "Meh, managing memory manually": yeah i know. i love it↵but a simple source-to-source compiler that takes nim and outputs C is like 100000mil times better than the mm:none idea |
20:42:33 | FromDiscord | <sOkam! 🫐> i tried it for months, and it just becomes navigating the footguns, more than actual working with the lang |
20:42:39 | FromDiscord | <sOkam! 🫐> its working against the tool, not with it |
20:42:40 | FromDiscord | <_gumbercules> doesn't gc:none still output C? |
20:42:47 | FromDiscord | <raynei486> In reply to @heysokam "mm:none is not maintained,": We need to start training a group of elite compiler engineers to tame those pesky bugs using guerrilla warfare in the compiler 😛 |
20:42:49 | FromDiscord | <_gumbercules> or mm:none? |
20:43:13 | FromDiscord | <_gumbercules> tmk all gc:none / mm:none does is warn you when you make an allocation |
20:43:20 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "doesn't gc:none still output": but there are a LOT of features that are literally not docummented, or not supported, or just outright bugged, when using mm:none |
20:43:38 | FromDiscord | <_gumbercules> well yeah - I mean essentially anything that uses the heap is not going to work with gc/mm:none |
20:43:48 | FromDiscord | <_gumbercules> so strings, sequences, tables, sets, etc... |
20:43:57 | FromDiscord | <sOkam! 🫐> yeah, and all those things -should- be disabled by default when using mm:none |
20:44:06 | FromDiscord | <sOkam! 🫐> like... why the hell would you allow to use unusable features? |
20:44:12 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "i tried it for": So an stdlib impl that lets you supply an allocator to it and free stuff manually would be a lot better? |
20:44:14 | FromDiscord | <_gumbercules> oh okay I see what you mean - yeah I mean possibly |
20:44:20 | FromDiscord | <sOkam! 🫐> which signals that basically mm:none is not maintained at all |
20:44:24 | FromDiscord | <_gumbercules> but for people who have no other option - there really is no other option |
20:44:33 | FromDiscord | <_gumbercules> well I think the rationale behind -mm:none is |
20:44:34 | FromDiscord | <Chronos [She/Her]> And just doesn't rely on typical stdlib stuff when possible |
20:44:51 | FromDiscord | <_gumbercules> if you're not going to use the GC you're already treading in territory that the majority of the Nim userbase is not - so you're basically on your own |
20:44:51 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "So an stdlib impl": errr, i guess so yeah |
20:44:53 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "but for people who": Sokam is making something for Nim to C source to source translation |
20:45:02 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "errr, i guess so": It was what we were talking about earlier aha |
20:45:03 | FromDiscord | <_gumbercules> but there are folks who have no other choice - like the GC is a non-starter for them and they still want to use Nim |
20:45:04 | FromDiscord | <sOkam! 🫐> but how are you going to not use the stdlib, but still implement that? |
20:45:24 | FromDiscord | <Chronos [She/Her]> By designing it around `--mm:none` to begin with |
20:45:32 | FromDiscord | <sOkam! 🫐> errr i was saying that i did that |
20:45:38 | FromDiscord | <sOkam! 🫐> spend a few months there in mm:none land |
20:45:45 | FromDiscord | <Chronos [She/Her]> You disabled certain flags and such, right? |
20:45:46 | FromDiscord | <sOkam! 🫐> and its just footgun after footgun |
20:45:57 | FromDiscord | <sOkam! 🫐> yes, but all those -should- be defaults |
20:46:02 | FromDiscord | <Chronos [She/Her]> But I mean to completely rewrite it to not rely on any memory management except for manual stuff |
20:46:11 | FromDiscord | <sOkam! 🫐> which means that a good effort on PRs would need to be sent to the compiler itself |
20:46:25 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "yes, but all those": Can talk to Araq about it in #internals tbf |
20:46:27 | FromDiscord | <sOkam! 🫐> which means that mm:none support would be desired by the devs, which I have my doubts on |
20:46:31 | FromDiscord | <_gumbercules> essentially what is being pointed out I think - is that if @Chronos [She/Her] or someone else were to embark on this project, they'd be fixing all those broken `mm:none` things your'e alluding to @sOkam! 🫐 |
20:46:32 | FromDiscord | <sOkam! 🫐> (edit) "on" => "about" |
20:46:58 | FromDiscord | <_gumbercules> because then there would be a non-managed string and sequence and table, etc... |
20:47:07 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "essentially what is being": yeah i understand. my point is just that it needs to happen from the lang, not from just implementing an alternative stdlib |
20:47:16 | FromDiscord | <sOkam! 🫐> and the changes are deep |
20:47:29 | FromDiscord | <Chronos [She/Her]> But majority of those issues come from Nim expecting a GC, no? |
20:47:32 | FromDiscord | <_gumbercules> sure - but it could always be a project that someone builds that patches the compiler |
20:47:33 | FromDiscord | <sOkam! 🫐> i have a ton of mm:none code, where I was trying exactly that |
20:47:36 | FromDiscord | <_gumbercules> similar to how the mimalloc project works |
20:47:39 | FromDiscord | <Chronos [She/Her]> Ah |
20:47:59 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "But majority of those": it comes from nim not having support for it, basically, and nobody thought those things should just be disabled |
20:48:10 | FromDiscord | <sOkam! 🫐> because they leak everywhere like crazy |
20:48:47 | FromDiscord | <Chronos [She/Her]> I'm probably just not understanding it then considering I've never had a need for manual allocation and stuff then rip |
20:48:51 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "sure - but it": yeah thats a better approach. hopefully by making it a set of PRs and not a fork |
20:49:25 | FromDiscord | <_gumbercules> Yeah - I don't even think there's much of an appetite for this thing outside of a very small niche of Nim users and even they probably have already worked out their own solutions if they needed them |
20:49:53 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "I'm probably just not": i even started a tutorial about it, i was really committted to mm:none. but its just painful to deal with, and the benefit is so little, that the moment I found the source-to-source idea then the project just made no sense to me personally |
20:50:27 | FromDiscord | <Chronos [She/Her]> Yeah fair rip |
20:51:25 | FromDiscord | <sOkam! 🫐> a source to source compiler, that uses the great features of nim, but outputs human-readable C, is a lot more in line with the task, since writing for mm:none feels literally like writing C (minus the metaprogramming) |
20:52:00 | FromDiscord | <sOkam! 🫐> because if you output C, and you are C, you don't need bindings, you can use C libs directly, and can output C code for other libs (and/or nim) to use |
20:52:22 | FromDiscord | <_gumbercules> definitely an interesting approach |
20:52:28 | FromDiscord | <sOkam! 🫐> the only loss is the metaprogramming, really. so far I have seen no other piece missing |
20:52:52 | FromDiscord | <Chronos [She/Her]> I should work on my own programming language for the JVM |
20:52:59 | FromDiscord | <Chronos [She/Her]> Just need to actually implement a parser sigh... |
20:53:09 | FromDiscord | <sOkam! 🫐> In reply to @_gumbercules "definitely an interesting approach": I have some progress on it, but I want it capable of creating a real app before publishing it. but its my current toy/side project |
20:53:16 | FromDiscord | <Chronos [She/Her]> Half wish I could use EBNF grammar but if I make the language self-hosting I'll need a parser for that |
20:53:37 | FromDiscord | <sOkam! 🫐> yeah parsing is big just by itself |
20:54:26 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Half wish I could": do you think self-hosting is worth it though? |
20:55:32 | FromDiscord | <_gumbercules> In reply to @heysokam "I have some progress": makes sense - I'm excited to see how it turns out! |
20:56:24 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "do you think self-hosting": For getting it to run on the JVM yeah |
20:56:47 | FromDiscord | <Chronos [She/Her]> Since that way I can skip Java codegen (or Jasmin codegen, an assembly format for the JVM) and just generate bytecode directly |
20:58:21 | FromDiscord | <Chronos [She/Her]> @TӨMΛ ☠ saw you typing aha |
20:58:54 | FromDiscord | <TӨMΛ ☠> Haha, yeah, but seems like I found answer to my question in documentation 😅 |
20:59:16 | FromDiscord | <TӨMΛ ☠> Was meant to get here with not relevant thing anyway, so I don't want to disrupt the convo ❤️ |
20:59:36 | FromDiscord | <TӨMΛ ☠> (edit) "Haha, yeah, but seems like I found answer to my ... question" added "typed" |
21:01:18 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "Since that way I": oh i can see that, makes sense |
21:01:45 | FromDiscord | <sOkam! 🫐> sounds like a big task, better start chipping away at it slowly. won't get progress otherwise |
21:02:10 | FromDiscord | <sOkam! 🫐> for difficult/frustrating projects, I've found that just working a small amout daily works amazing |
21:02:23 | FromDiscord | <Chronos [She/Her]> In reply to @toma400 "Haha, yeah, but seems": Fair! |
21:02:25 | FromDiscord | <sOkam! 🫐> that way progress is steady, but you don't pull your hair out in frustration |
21:03:22 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "sounds like a big": Yeah, I'm just avoiding the parser now rip, I already have a tokenizer and lexer |
21:03:57 | FromDiscord | <sOkam! 🫐> yeah exactly what i mean. don't avoid it, just work a very small amount of time on it. but daily |
21:04:11 | FromDiscord | <sOkam! 🫐> don't commit to 1h even... just 10-15mins |
21:05:01 | FromDiscord | <Chronos [She/Her]> It's still a complete pain ahaa |
21:05:22 | FromDiscord | <sOkam! 🫐> i sounded like a broken record when I was a coach saying that, but it literally is the root of progress↵consistency trumps everything else, even if that consistency is 15min per day↵ive seen people achieve huge tasks by just that alone, without even doing anything big or special away from that |
21:05:31 | FromDiscord | <sOkam! 🫐> In reply to @chronos.vitaqua "It's still a complete": that's why its 15min! |
21:05:41 | FromDiscord | <sOkam! 🫐> that's the core of the problem, and the core of the solution |
21:06:13 | FromDiscord | <Chronos [She/Her]> I don't know how to go about it at all- |
21:06:14 | FromDiscord | <sOkam! 🫐> 1h of pain... hell no. 15min of pain... ouch, but anyone can muster that much |
21:06:29 | FromDiscord | <_gumbercules> In reply to @chronos.vitaqua "I don't know how": have you read crafting interpreters? |
21:06:58 | FromDiscord | <sOkam! 🫐> @Chronos [She/Her] https://www3.nd.edu/~dthain/compilerbook/compilerbook.pdf |
21:07:46 | FromDiscord | <sOkam! 🫐> the main problem with compiler books is how low the teaching skill of those writers is |
21:07:46 | FromDiscord | <_gumbercules> or ^ |
21:08:06 | FromDiscord | <sOkam! 🫐> sure they know a lot.... but... man, teaching is not dumping 10000pages of theory on someone, even if those pages all have value |
21:09:27 | FromDiscord | <sOkam! 🫐> teaching is entertainment first, theory second. otherwise 99% of people just drop or get bored, and only the relentless 1% survives the theory dump |
21:10:23 | FromDiscord | <sOkam! 🫐> In reply to @heysokam "<@524288464422830095> https://www3.nd.edu/~dthain/c": mentioning because this book does not fall into that trap, so very recommended |
21:11:20 | FromDiscord | <Chronos [She/Her]> In reply to @_gumbercules "have you read crafting": I have |
21:11:34 | FromDiscord | <Chronos [She/Her]> In reply to @heysokam "<@524288464422830095> https://www3.nd.edu/~dthain/c": 247 pages 😭 |
21:12:07 | FromDiscord | <Chronos [She/Her]> Reading now |
21:12:18 | FromDiscord | <raynei486> Also parsing theory is |
21:12:23 | FromDiscord | <raynei486> in my experience |
21:12:27 | FromDiscord | <raynei486> skimmable |
21:12:53 | FromDiscord | <Chronos [She/Her]> Thank god |
21:13:00 | FromDiscord | <Chronos [She/Her]> Tbf I think I have the knowledge |
21:13:10 | FromDiscord | <Chronos [She/Her]> But I'd also have to document the quirks of my parser |
21:13:16 | FromDiscord | <Chronos [She/Her]> And that's putting me off so much |
21:13:41 | FromDiscord | <raynei486> yeah you just gotta know NFAs and DFAs, REs and how they are all equivalent |
21:13:48 | FromDiscord | <raynei486> do some exercises |
21:13:55 | FromDiscord | <Chronos [She/Her]> Pls expand acronyms- |
21:13:57 | FromDiscord | <raynei486> that's the main gist |
21:14:30 | FromDiscord | <jmgomez> @Chronos [She/Her] or be the one that puts Nim in the JVM and makes it shine 🙂 |
21:14:32 | FromDiscord | <Chronos [She/Her]> Also my language will ideally be Nim-like in syntax because I do like Nim's syntax a lot |
21:14:38 | FromDiscord | <TӨMΛ ☠> In reply to @chronos.vitaqua "Fair!": I kinda miss the server honestly, but I fell into Python waters again due to gamedeving my RPG... I'm happy that I plan on using Nim for its mod editor at least, so I will be back in few weeks I guess 😅 |
21:14:45 | FromDiscord | <raynei486> In reply to @chronos.vitaqua "Pls expand acronyms-": Nondeterministic finite automata = NFA↵Deterministic finite automata = DFA↵RE = regular expression |
21:14:47 | FromDiscord | <Chronos [She/Her]> In reply to @jmgomez "<@524288464422830095> or be the": I've done that briefly but it's so pain.... |
21:14:53 | FromDiscord | <Chronos [She/Her]> In reply to @toma400 "I kinda miss the": Fair |
21:15:07 | FromDiscord | <Chronos [She/Her]> In reply to @raynei486 "Nondeterministic finite automata =": Thank you! Not sure between the difference of the first two |
21:15:18 | FromDiscord | <Chronos [She/Her]> In reply to @chronos.vitaqua "I've done that briefly": have it on GitHub, the beginnings of it |
21:15:28 | FromDiscord | <Chronos [She/Her]> I'm really debating on trying it again but.. Hm |
21:15:31 | FromDiscord | <jmgomez> it's much easier that building one (decent) from scratch though. Also the promise is that the new NIR will make that proccess easier |
21:16:19 | FromDiscord | <raynei486> In reply to @chronos.vitaqua "Thank you! Not sure": You should just check them out, these math theories are the reason why we have theoretically perfect scanner generators |
21:16:47 | FromDiscord | <raynei486> That's why a lot of people also use lexer & parser generators |
21:16:51 | FromDiscord | <raynei486> the math behind it is mature |
21:17:04 | FromDiscord | <Chronos [She/Her]> In reply to @raynei486 "You should just check": I probably will at some point aha |
21:18:28 | FromDiscord | <Chronos [She/Her]> This probably won't work now but hm... https://gist.github.com/haxscramper/8821819221b1d73866e4aed306147f0c |
21:36:12 | * | jmdaemon quit (Ping timeout: 240 seconds) |
21:48:57 | FromDiscord | <Chronos [She/Her]> sent a code paste, see https://paste.rs/hEKkH |
21:49:29 | FromDiscord | <Chronos [She/Her]> I did `repr` on the `ModuleGraph` |
22:30:02 | * | Lord_Nightmare quit (Quit: ZNC - http://znc.in) |
22:30:34 | FromDiscord | <Chronos [She/Her]> Oh yeah I managed to collect all the nodes in the ast |
22:30:41 | FromDiscord | <Chronos [She/Her]> Not too sure where to go from here :p |
22:30:52 | FromDiscord | <Chronos [She/Her]> Java codegen will be very tricky |
22:32:14 | * | Lord_Nightmare joined #nim |
22:48:52 | FromDiscord | <juancarlospaco> In reply to @chronos.vitaqua "Java codegen will be": Like dali?. |
22:52:54 | FromDiscord | <Chronos [She/Her]> Wdym? |
23:00:59 | termer | what're we doing Java codegen for? |
23:02:55 | FromDiscord | <juancarlospaco> In reply to @chronos.vitaqua "Wdym?": https://github.com/akavel/dali |
23:08:38 | FromDiscord | <Chronos [She/Her]> In reply to @termer "what're we doing Java": Nim JVM backend lol |
23:08:53 | termer | imagine |
23:09:14 | termer | It'd probably be pretty inefficient to emulate a bunch of the memory-related things |
23:09:26 | termer | especially considering the fact that there's no concept of stack memory on the JVM |
23:09:34 | termer | well, not outside of primitives |
23:09:49 | termer | stack objects just don't exist |
23:10:03 | termer | If you ever wondered why Java applications eat so much memory, that's a big reason why |
23:11:06 | FromDiscord | <Chronos [She/Her]> There's a local stack in the bytecode iirc |
23:20:35 | termer | I'm not sure how much freedom you have in the bytecode |
23:20:38 | termer | it's really weird |