00:03:48 | FromDiscord | <thepuzzleddev> In reply to @michaelb.eth "at the top of": Ok, thank you |
00:04:30 | FromDiscord | <piman_discriminator_1010> is it valid for an enum to start with `#`? |
00:04:41 | FromDiscord | <Elegantbeef> Is it a valid Nim identifier? |
00:11:22 | FromDiscord | <piman_discriminator_1010> apparently not, which makse sense.... wait..... FUCK |
00:11:34 | FromDiscord | <piman_discriminator_1010> identifiers can't start with `_` either according to the docs |
00:11:36 | FromDiscord | <piman_discriminator_1010> shit |
00:11:39 | FromDiscord | <piman_discriminator_1010> now idk what to do |
00:14:24 | FromDiscord | <leorize> what are you aiming to do? |
00:15:31 | FromDiscord | <piman_discriminator_1010> copy enums from a system's documentation into Nim |
00:15:58 | FromDiscord | <leorize> then you'll have to get creative \:p |
00:16:02 | * | lucasta joined #nim |
00:16:23 | FromDiscord | <piman_discriminator_1010> yea but how :PepeHands: I can only start with letters |
00:16:36 | FromDiscord | <leorize> then start with letters |
00:16:38 | FromDiscord | <piman_discriminator_1010> 🤔 though any unicode character is also considered a letter |
00:16:46 | FromDiscord | <leorize> like, can't you just trim the `_`? |
00:17:01 | FromDiscord | <piman_discriminator_1010> In reply to @leorize "like, can't you just": no, I was adding the `_` because some start with numbers |
00:17:20 | FromDiscord | <piman_discriminator_1010> I suppose I could prepend zero width space :ElmoBurn: |
00:17:23 | FromDiscord | <leorize> add a `n` prefix for that \:p |
00:18:23 | FromDiscord | <piman_discriminator_1010> also some start with `#` |
00:18:40 | FromDiscord | <piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=bjxkmHAjWymu |
00:19:52 | FromDiscord | <piman_discriminator_1010> and then there is a timezone set which all start with `(` |
00:20:18 | FromDiscord | <leorize> split them into several different enums \:p |
00:20:25 | FromDiscord | <piman_discriminator_1010> wdym |
00:20:28 | FromDiscord | <leorize> then the type name itself would be your prefix |
00:20:56 | FromDiscord | <piman_discriminator_1010> this already is a set of enum sets |
00:21:37 | FromDiscord | <leorize> made up some prefixes then |
00:21:40 | FromDiscord | <piman_discriminator_1010> and this little devil exists too `? = 147` |
00:22:57 | FromDiscord | <piman_discriminator_1010> :mood: and dashes exist too...... maybe I just won't, I already have ID to string, I'll just have to deal with magic numbers in my code then |
00:23:36 | FromDiscord | <leorize> if you really want to, you can try stropping them |
00:23:36 | FromDiscord | <Elegantbeef> You can use constants |
00:23:55 | FromDiscord | <Elegantbeef> I'm still absolutely baffled at what you're doing |
00:26:21 | FromDiscord | <piman_discriminator_1010> I'm trying to be able to use these enums in code↵<https://docs.johnsoncontrols.com/bas/api/khub/documents/THb8Qdc9LX8uRqre~Nsu_w/content>↵(NOTE: this is a PDF download link, not a webpage link) |
00:26:36 | * | gooba_ quit (Remote host closed the connection) |
00:27:03 | * | gooba joined #nim |
00:27:09 | FromDiscord | <Elegantbeef> Wait these are just bitsets |
00:28:17 | FromDiscord | <Elegantbeef> Why keep the names verbatim |
00:28:22 | FromDiscord | <Elegantbeef> replace `/` for `per` |
00:28:40 | FromDiscord | <Elegantbeef> replace `%` for `percent` |
00:29:07 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "Why keep the names": I don't need to completely, but the ammount of effort needed to sanitize them just seems like too much |
00:31:41 | FromDiscord | <Elegantbeef> Using basic string replaces you'd get quite far very quickly |
00:32:47 | * | lucasta quit (Quit: Leaving) |
00:35:22 | FromDiscord | <piman_discriminator_1010> hmm, maybe I could do something like HTML does |
00:36:45 | FromDiscord | <piman_discriminator_1010> where `>` becomes `>` iirc |
00:39:21 | FromDiscord | <Elegantbeef> Well that's uri encoding, but yea |
00:39:38 | FromDiscord | <piman_discriminator_1010> uri encoding typically uses `%HH`doesn't it? |
00:39:53 | FromDiscord | <Elegantbeef> A url is a uri |
00:42:05 | FromDiscord | <␀ Array 🇵🇸 🍉> wouldn't that be html encoding? |
00:43:18 | FromDiscord | <Elegantbeef> Seems it's actually "HTML character references" |
00:45:38 | * | lucasta joined #nim |
00:49:32 | FromDiscord | <maker_of_mischief> Is there a working method to get a screenshot of the active display? |
00:49:32 | * | lucasta quit (Remote host closed the connection) |
00:49:47 | FromDiscord | <maker_of_mischief> the only thing i could find was nsu and that doesnt compile |
00:50:04 | FromDiscord | <piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=ouXkPvdcSYEm |
00:50:07 | FromDiscord | <maker_of_mischief> https://media.discordapp.net/attachments/371759389889003532/1198791672079847554/1705884605800.png?ex=65c030bf&is=65adbbbf&hm=fb975f2fa653e2fd0cd3926ac8b62132524a6bac0cd6b80e923528f5af8b4135& |
00:50:54 | FromDiscord | <Elegantbeef> Using C there is pretty funny |
00:51:21 | FromDiscord | <maker_of_mischief> nsu refuses to compile :( https://media.discordapp.net/attachments/371759389889003532/1198791977337102457/1705884679580.png?ex=65c03107&is=65adbc07&hm=29a531f9a73a927570768b0488818a8de985ae35849190746525dfbe1216e4c1& |
00:51:25 | FromDiscord | <maker_of_mischief> https://cdn.discordapp.com/emojis/1162227794802130944.webp?size=48&name=sob%7E1&quality=lossless |
00:51:46 | FromDiscord | <Elegantbeef> Do I say "Time to fork it and change it to work"? 😄 |
00:52:04 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "Using C there is": easier to me than making a new Nim project |
00:52:26 | FromDiscord | <Elegantbeef> Nim is vastly more productive than C but to each their own |
00:53:09 | FromDiscord | <maker_of_mischief> wait why has treeform made like 80% of all the projects i use for nim |
00:53:21 | FromDiscord | <Elegantbeef> He uses it professionally |
00:54:07 | FromDiscord | <piman_discriminator_1010> In reply to @Elegantbeef "Nim is vastly more": for larger projects I agree, but for a single file like this, I don't need to setup a project structure, I just need a text editor and cmd |
00:54:19 | FromDiscord | <Elegantbeef> Same with Nim |
00:54:51 | FromDiscord | <Elegantbeef> Make a `myfile.nim` write your code compile with `nim c -r ./myfile.nim` |
00:55:05 | FromDiscord | <Elegantbeef> It's just as easy as writing C 😄 |
00:55:29 | FromDiscord | <piman_discriminator_1010> oh, didn't remember that |
00:56:43 | FromDiscord | <piman_discriminator_1010> unfortunately this escape method will result in things like `ONEST` but oh well |
00:56:52 | FromDiscord | <piman_discriminator_1010> (edit) "but" => "(`1ST`)but" |
01:03:44 | * | Mister_Magister quit (Quit: bye) |
01:04:50 | FromDiscord | <girvo> sent a code paste, see https://play.nim-lang.org/#pasty=wiVfIbLEiGrX |
01:05:16 | FromDiscord | <Elegantbeef> yea `let test = default(array[32, byte])` |
01:05:39 | * | Mister_Magister joined #nim |
01:06:34 | FromDiscord | <Elegantbeef> https://discord.com/channels/371759389889003530/371759389889003532/1196297226444623872 also will help for more complicated constructs |
01:09:27 | FromDiscord | <girvo> ty ❤️ |
01:11:20 | * | SchweinDeBurg quit (Quit: WeeChat 4.2.0-dev) |
02:12:06 | * | SchweinDeBurg joined #nim |
02:25:24 | FromDiscord | <4zv4l> is there an equivalent in Nim of Perl `readline`/`<>` ?↵like if there are files given in arguments it will read from it, otherwise from pipes or from STDIN |
02:40:00 | * | krux02 quit (Remote host closed the connection) |
02:44:59 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
03:19:17 | FromDiscord | <piman_discriminator_1010> ah yes, such readability↵`UNIT_CTRL_MODE_LBRAK0EQLW_1EQRW_2EQDA_3EQSP_4EQHC_5EQHPRBRAK = 138` |
03:33:43 | FromDiscord | <piman_discriminator_1010> :aquacry: I have to escape these?↵`ΓÇôΓÇôΓÇôΓÇôΓÇôΓÇôΓÇôΓÇô` |
03:34:05 | FromDiscord | <piman_discriminator_1010> oh there's only 3 of them, and this smell like unicode |
03:37:54 | FromDiscord | <piman_discriminator_1010> yep, it's long dash |
04:37:36 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=oQHottyaMGVs |
04:43:12 | FromDiscord | <odexine> Every symbol in a template is sanitised to prevent accidental collision |
04:43:32 | FromDiscord | <odexine> This means that each symbol in a template is made unique when generated from a template call |
04:44:50 | FromDiscord | <odexine> There are two options to fix this: one is to pass in the symbol to the template, the other is to make the template dirty which disables the sanitisation |
04:45:20 | FromDiscord | <odexine> To do the latter, add the {.dirty.} pragma |
04:46:08 | * | SchweinDeBurg joined #nim |
04:46:57 | FromDiscord | <odexine> To do the former you add a parameter of type untyped called “this song” to the “continue…” template and then also pass it in on the call |
04:48:09 | FromDiscord | <user2m> In reply to @odexine "To do the former": yup! tthat's what i've been doing. but I'll try the dirty pargma! |
04:56:17 | FromDiscord | <piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=WNhUXeUpUAbE |
04:56:58 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=NAQWZkfqxFsv |
04:57:10 | FromDiscord | <Elegantbeef> You annotated the wrong template |
04:57:23 | FromDiscord | <user2m> In reply to @piman_discriminator_1010 "how do I mark": try like this actions {.pure.}= enum |
04:58:32 | FromDiscord | <odexine> In reply to @Elegantbeef "You annotated the wrong": I think both need to be annotated |
04:58:33 | FromDiscord | <piman_discriminator_1010> alright, I'll let you know in like 10 minutes :var: |
04:58:52 | FromDiscord | <Elegantbeef> Maybe if you didn't just convert 30000000 enums to Nim code 😄 |
04:59:04 | FromDiscord | <piman_discriminator_1010> hey, it's only 50000 enums lol |
04:59:10 | FromDiscord | <odexine> What the fuck |
04:59:13 | FromDiscord | <Elegantbeef> only |
04:59:17 | FromDiscord | <piman_discriminator_1010> only |
04:59:29 | FromDiscord | <odexine> Merely 50 thousand |
04:59:37 | FromDiscord | <Elegantbeef> You might be doing something wrong when |
05:00:05 | FromDiscord | <user2m> sent a code paste, see https://play.nim-lang.org/#pasty=KAMRwsTPyYqb |
05:00:43 | FromDiscord | <Elegantbeef> Does one really need any argument against this inane template madness? |
05:02:09 | FromDiscord | <user2m> In reply to @Elegantbeef "Does one really need": lol yeahhhh I'm going back to the sane world of santized templates |
05:02:34 | FromDiscord | <Elegantbeef> I do not even get why you're using templates here |
05:03:01 | FromDiscord | <user2m> In reply to @Elegantbeef "I do not even": honestly just trying to learn more about templates |
05:03:01 | FromDiscord | <piman_discriminator_1010> In reply to @user2m "try like this actions*": ok, this looked like it worked |
05:03:24 | FromDiscord | <user2m> In reply to @Elegantbeef "I do not even": my template / macro knowledge is very smol |
05:04:28 | FromDiscord | <user2m> In reply to @piman_discriminator_1010 "ok, this looked like": awesome |
06:05:58 | * | nazgulsenpai quit (Ping timeout: 264 seconds) |
06:08:33 | * | nazgulsenpai joined #nim |
06:09:38 | FromDiscord | <MDuardo> sent a code paste, see https://play.nim-lang.org/#pasty=aUsPQktHljwf |
06:11:06 | FromDiscord | <odexine> What do you mean by cause problems |
06:11:27 | FromDiscord | <MDuardo> Unexpected behavior or something like that |
06:12:53 | * | nazgulsenpai quit (Ping timeout: 240 seconds) |
06:14:30 | * | nazgulsenpai joined #nim |
06:19:14 | FromDiscord | <4zv4l> I mean its literally a function that will wrap the code you added, nothing bad in it |
06:19:38 | FromDiscord | <4zv4l> you could add `{.inline.}` to avoid the function call "penalty" |
06:21:34 | FromDiscord | <4zv4l> (I would also add `varargs`) |
06:23:59 | FromDiscord | <MDuardo> Done, thank you very much |
06:27:12 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=bYuxKboZukiE |
06:27:27 | FromDiscord | <4zv4l> (even easier than doing the inline proc) |
06:34:34 | FromDiscord | <MDuardo> That's why I wanted to try it |
06:35:47 | FromDiscord | <MDuardo> You need to do that to keep your lines short and tidy everything |
06:36:37 | * | nazgulsenpai_ joined #nim |
06:36:41 | * | nazgulsenpai quit (Ping timeout: 256 seconds) |
06:46:48 | * | nazgulsenpai_ quit (Ping timeout: 268 seconds) |
06:49:06 | * | rockcavera quit (Remote host closed the connection) |
06:51:54 | * | nazgulsenpai joined #nim |
07:17:19 | * | azimut quit (Ping timeout: 240 seconds) |
07:20:34 | FromDiscord | <Phil> In reply to @michaelb.eth "was that a forum": https://forum.nim-lang.org/t/10161 |
07:50:50 | * | advesperacit joined #nim |
08:38:32 | * | Batzy quit (Ping timeout: 252 seconds) |
09:03:14 | * | m5zs7k quit (Ping timeout: 260 seconds) |
09:05:08 | * | m5zs7k joined #nim |
09:16:56 | FromDiscord | <xtrayambak> Is there a way to use enums "generically" (like, `SomeInt`, `SomeUnsignedInt`, is there a way to use it as `SomeEnum`?) or will I have to convert the enum into an integer and use it interchangeably like that? |
09:18:48 | FromDiscord | <Elegantbeef> `enum` |
10:26:34 | FromDiscord | <demotomohiro> In reply to @xtrayambak "Is there a way": There is `enum` type class: https://nim-lang.org/docs/manual.html#generics-type-classes |
11:00:19 | FromDiscord | <Cadmium> I am not active in the Nim community, but it is my impression that Nim is a great project that needs more traction.↵If development would be concentrated for a while in a particular niche where Nim qualities can shine, this will tempt many more devs into Nim.↵I'm biased, but I'd say embedded firmware is an area where Nim has a lot to offer. But any niche would do. |
11:06:50 | * | PMunch joined #nim |
11:20:21 | FromDiscord | <Cadmium> To make interoperability EVEN easier and leverage C, C++, Rust libraries to the point that they feel native would give new devs the guarantees many need to be sure they musn't reinvent some wheel to get their projects forward. |
11:32:59 | PMunch | I would also say embedded is a great niche |
11:33:00 | FromDiscord | <Cadmium> transpiling to JS and asm could be streamlined |
11:33:18 | FromDiscord | <Cadmium> transpiling to JS and wasm could be streamlined |
11:33:39 | PMunch | I've done some experimental work on Futhark in order to be able to wrap larger projects in a way that makes it possible to use on embedded |
11:33:46 | PMunch | Have it running on a FreeRTOS board atm |
11:33:57 | FromDiscord | <Cadmium> seen your efforts. thank you! I follow ur steps, master. |
11:35:10 | FromDiscord | <Cadmium> finally, presenting |
11:37:06 | PMunch | Haha, glad you like it :) |
11:37:11 | PMunch | What're you presenting? |
11:38:03 | FromDiscord | <Cadmium> finally, presenting Nim as the "void main" language where to "glue" all foreign libraries from the docs and tutorials will atract young and "too busy too read all the specs" mature devs. |
11:38:55 | PMunch | Oh, weird. Half your message got cut through the bridge |
11:39:01 | PMunch | Or did you make an edit? |
11:41:09 | * | krux02 joined #nim |
11:44:30 | FromDiscord | <Cadmium> sent a long message, see https://pasty.ee/YvWOJpDajxQb |
11:46:15 | PMunch | Huh, maybe I wouldn't be completely musically inept if I had something like that growing up :P |
11:46:18 | FromDiscord | <Cadmium> sorry, wasn't aware message editing glitches through bridging.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
11:46:57 | PMunch | It has gotten a lot better |
11:55:20 | FromDiscord | <Cadmium> have you considered a DSL-driven development to gather the scattered pieces and create a more inviting environment for possible collabs?↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
12:00:22 | FromDiscord | <Cadmium> I mean a top to bottom approach. Starting with syntax inviting for fast prototyping and complete the puzzle all the way down WITHOUT predjudice. I mean nim, c, c++, rust, etc. One day, when nim has the traction, someone may feel like rewriting those bits in nim, but Nim is such a work of love at risk of falling into unfair irrelevancy I feel to comment about it even if I can't give much more that words at the moment. |
12:01:10 | PMunch | Oh you mean create the high-level interface (allowed by the macro system) and then plug in pieces from different languages which can be replaced later on? |
12:01:26 | PMunch | I mean that's pretty much how the standard library and some external packages have gone |
12:01:54 | PMunch | As always though it's hard to create a perfect API when you want to keep native performance |
12:07:41 | FromDiscord | <Cadmium> I think nim has plenty of slack( iremember your keyboar firmware presentation) to allow fo focus on easy and fast prototyping, and the pace of hardware evolution on the MCU arena is such, that most projects need to get thing done, no need to optimise, and those needing performance can become collaborators in pointing where thos optimizations REALLY need to be done. |
12:09:02 | PMunch | Yeah part of my goal with Ratel was to build something which was possible to use across devices with different underlying libraries but which would still be performant. |
12:09:28 | PMunch | Unfortunately I simply haven't had the time to work on it as much as I had wanted (switched jobs a while back..) |
12:10:39 | FromDiscord | <nnsee> the woes of being a bigshot CTO |
12:11:02 | PMunch | Haha, something like that :P |
12:11:44 | FromDiscord | <Cadmium> maybe I'm ready for that position? LOL XD↵(@nnsee) |
12:17:22 | FromDiscord | <Cadmium> ratel is going in the right direction. but where is the hok bringing new users/devs? port it to zig? (i know, i feel you, but this is what I mean by without predjudice) in free software, extend and embrace (without eliminate) becomes a positive for all strategy. |
12:18:08 | PMunch | Huh, why would I port it to Zig? |
12:18:39 | FromDiscord | <Cadmium> to get people using it. |
12:19:52 | FromDiscord | <Cadmium> in-line ratel inside an arduino project? they are just examples. |
12:20:57 | PMunch | That doesn't make any sense though, I would want people to use ratel, not ratel-zig |
12:21:33 | PMunch | I remember Zevv managed to get Nim running in the Arduino IDE, pretty neat. And you can of course use Nim while wrapping the Arduino libraries (I wrote a game like this) |
12:24:25 | FromDiscord | <Cadmium> this needs more exposure then, I am very interested and haven't crossed this. |
12:27:09 | PMunch | It was a very quick and dirty game jam thing, hence the missing exposure |
12:27:10 | PMunch | https://github.com/PMunch/MannBarSchwein-arduboy |
12:27:16 | PMunch | The main game is in ardu.nim |
12:29:26 | FromDiscord | <MDuardo> What resources you recommend to use Nim with Arduino? |
12:29:37 | FromDiscord | <Cadmium> I'm afraid people might end up not using ratel at all. traction is, sadly, very important. it is the chick-egg, platform/dev problem. I see interop and nich focus the only winning strategies for nim. |
12:30:11 | PMunch | @MDuardo, there isn't really a lot of published work on the topic yet |
12:30:47 | PMunch | I have some videos where I do it |
12:46:27 | FromDiscord | <MDuardo> Nim makes me want to give Arduino another try↵↵Had two PCBs but they were stolen a year ago, haven't used Arduino since then |
12:47:22 | PMunch | Stolen? |
12:47:31 | * | Batzy joined #nim |
12:47:58 | PMunch | FYI Arduino is the name of the software framework |
12:48:20 | * | azimut joined #nim |
12:51:59 | FromDiscord | <MDuardo> Arduino Uno |
12:52:07 | FromDiscord | <MDuardo> arduino-uno-vneshnij-vid-kontrollera-arduino-uno.jpg https://media.discordapp.net/attachments/371759389889003532/1198973370893602898/arduino-uno-vneshnij-vid-kontrollera-arduino-uno.jpg?ex=65c0d9f7&is=65ae64f7&hm=b8e61615b21fc4ce690d178dab54af73ebf8eeecce4532d51ccf10612ac3af49& |
12:56:50 | PMunch | Sure, but you program the ATmega328p IIRC |
12:57:09 | PMunch | So you could either program it with the Arduino framework, or with something else |
13:27:54 | * | rockcavera joined #nim |
13:39:08 | FromDiscord | <nervecenter> sent a long message, see https://pasty.ee/rhdfHKUcfTRV |
13:40:11 | FromDiscord | <nervecenter> Nim also has the best static type system I've ever seen, there are not tricks or traps anywhere. Each type is exactly what it says on the tin. You can use it, pass it, make it var or const, whatever. |
13:40:19 | FromDiscord | <nervecenter> (edit) "not" => "no" |
13:41:02 | FromDiscord | <nervecenter> (edit) "Nim also has the best static type system I've ever seen, there are no tricks or traps anywhere. Each type is exactly what it says on the tin. You can use it, pass it, make it var or const, whatever. ... " added "A string is a string is a string. Can't say that for Rust. Don't get me started on C/C++ and integer types." |
13:45:59 | * | azimut_ joined #nim |
13:46:31 | * | azimut quit (Ping timeout: 240 seconds) |
13:48:42 | * | azimut_ quit (Remote host closed the connection) |
13:49:28 | * | azimut joined #nim |
13:56:11 | FromDiscord | <maker_of_mischief> so, you know how in type you can reference objects before they're assigned and it just looks further down for the definition |
13:56:16 | FromDiscord | <maker_of_mischief> is there a way to do that but for procs |
14:06:49 | FromDiscord | <nnsee> In reply to @maker_of_mischief "so, you know how": there was an experimental flag for it, let me find it |
14:07:38 | FromDiscord | <nnsee> https://nim-lang.org/docs/manual_experimental.html#code-reordering |
14:07:45 | FromDiscord | <maker_of_mischief> In reply to @nnsee "https://nim-lang.org/docs/manual_experimental.html#": nim is the best language |
14:07:49 | FromDiscord | <nnsee> alternatively use forward declarations |
14:09:59 | NimEventer | New thread by ghostynewt: Exponentially-slow compile times with deeply nested iterators, see https://forum.nim-lang.org/t/10897 |
14:12:43 | FromDiscord | <maker_of_mischief> In reply to @NimEventer "New thread by ghostynewt:": isnt that to be expected? |
14:13:06 | FromDiscord | <maker_of_mischief> oh wait compile not run |
14:20:57 | PMunch | @nnsee, can you forward declare types? |
14:52:53 | * | krux02 quit (Remote host closed the connection) |
15:07:46 | * | azimut_ joined #nim |
15:08:31 | * | azimut quit (Ping timeout: 240 seconds) |
15:08:49 | * | azimut_ quit (Remote host closed the connection) |
15:09:19 | * | azimut joined #nim |
15:24:21 | arkanoid | I want to ditch nimble and use atlas instead. All is good, but how to replace the "task" I used to configure in .nimble file? Should I use config.nims? or myapp.nims? how to replace "nimble mytask" at cli? |
15:24:58 | FromDiscord | <michaelb.eth> In reply to @arkanoid "I want to ditch": shell script? |
15:25:51 | PMunch | I guess you could just have a Nim file and run `nim e` on it for more or less the same experience |
15:27:09 | FromDiscord | <odexine> i believe atlas also has tasks? |
15:27:18 | PMunch | It does? |
15:27:19 | FromDiscord | <odexine> and nim itself has tasks if i recall correctly |
15:27:36 | FromDiscord | <odexine> i remember something that resembled tasks outside of nimble |
15:27:53 | FromDiscord | <odexine> https://forum.nim-lang.org/t/2965 indeedd |
15:27:54 | arkanoid | tasks is a concept of nim script, it's independent from nimble https://nim-lang.org/docs/nims.html |
15:27:55 | FromDiscord | <odexine> (edit) "indeedd" => "indeed" |
15:28:04 | FromDiscord | <graveflo> yea Ive been using them. I even converted some nimble build systems to atlas using nim tasks |
15:29:09 | PMunch | Well nimble files are just nimscript files with some extra code getting inserted before them |
15:30:17 | arkanoid | PMunch: ok but there's the "nimble" executable |
15:30:40 | FromDiscord | <Cadmium> ratel could be an open language spec. and rapel-nim the official//supported implementation? See what I mean? |
15:30:40 | FromDiscord | <graveflo> arkan I've been just making a landing script and doing `nim taskName manifest.nims` to run the tasks |
15:30:59 | arkanoid | nevermind, just tested that just by writing tasks in config.nims, I can "nim mytask" and it works |
15:32:23 | PMunch | @Cadmium, well there's a reason why it's written in Nim, and that's because it heavily uses meta-programming to do it's thing. Not sure what an "open language spec" would even mean in this case.. |
15:32:34 | FromDiscord | <graveflo> I hope atlas takes over nimble's job one day and some of the more nagging problems with nimble tasks can be fixed |
15:38:36 | FromDiscord | <Cadmium> It means you welcome the idea of someone make an different implementation (platform specific compiler?) and (if you wish, of course) used in a proprietary tooling, etc.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>) |
15:40:36 | FromDiscord | <Cadmium> the DSL is what invites the users, the oficial implementation brings attention to nima as a good choice, giving reputation to nim, giving confidence to new devs. |
15:40:54 | PMunch | I think you misunderstand. Ratel basically just is an implementation. It is an interface over various low-level features of these chips, tailored to Nim and the way Nim works. So no idea what "Ratel in X" would even mean, it would just be a different abstraction. |
15:41:09 | PMunch | It's not a DSL though.. |
15:44:13 | FromDiscord | <Cadmium> I might misunderstand. You might be refering to the lack of modularity in ratel implementation. ratel in x means ratel sources run on x implementation. |
15:44:41 | FromDiscord | <Cadmium> what is the reason you don't consider it a DSL? |
15:44:54 | PMunch | Oh, so if someone wants to reimplement Nim in Java to run Ratel it would be Ratel in Java? |
15:45:23 | FromDiscord | <Cadmium> no. |
15:45:23 | PMunch | Well mostly because it's not. It's just a Nim library. You import it and it behaves just like any other Nim library |
15:45:48 | PMunch | It's not a special language, it's just Nim |
15:46:15 | FromDiscord | <Cadmium> i'd make it a |
15:46:17 | FromDiscord | <Cadmium> DSL |
15:46:42 | PMunch | Why? Sounds like a very strange choice |
15:50:30 | FromDiscord | <Cadmium> i understand the advantages of having the whole of nim as your firmware arsenal, but there is a need for simplified, readable higher abstraction DSLs. When "easy" becomes "limiting", an invitation to dive into a complete and powerful language is really tempting. |
15:51:25 | PMunch | But the whole point of Ratel is to make it easier to use Nim for embedded programming. So by essentially taking the Nim out of that equation Ratel doesn't have a purpose |
15:52:01 | PMunch | It sounds like you want something completely different from what Ratel is supposed to offer |
15:52:26 | FromDiscord | <Cadmium> e. g. supercollider was originally a "smalltalk-ish" DSL for music dev, with a client/server REPL. implemented in C++. |
15:54:52 | * | PMunch quit (Quit: leaving) |
15:56:55 | FromDiscord | <Cadmium> yes, sorry. you talk about ratel as what you envisioned, I talk about how different it could be to fullfil the intentions of making embedded easier AND avoid becoming abandonware together with the whole nim effort. |
16:19:03 | FromDiscord | <djazz> #embedded leaking into #main love to see it 😄 |
16:19:29 | FromDiscord | <djazz> I wish we had a bigger Nim on microcontroller/embedded community |
16:22:59 | FromDiscord | <djazz> What we need is a hardware abstraction layer, similar to Arduino framework or rust's embedded-hal |
16:23:19 | FromDiscord | <djazz> Ratel is a start |
16:28:26 | FromDiscord | <Cadmium> svd2nim is quite raw. e.g. svd2rust has some automated testing and regression management. and making "easy" to add boards it is not enough to achieve critical mass of users. |
16:29:55 | * | nazgulsenpai quit (Read error: Connection reset by peer) |
16:30:20 | * | tiorock joined #nim |
16:30:20 | * | rockcavera is now known as Guest6139 |
16:30:21 | * | Guest6139 quit (Killed (silver.libera.chat (Nickname regained by services))) |
16:30:21 | * | tiorock is now known as rockcavera |
16:30:53 | * | nazgulsenpai joined #nim |
16:37:42 | FromDiscord | <djazz> was thinking for writing drivers that work on more than a single microcontroller (like I do for the Raspberry Pi Pico with its SDK) |
16:38:05 | FromDiscord | <djazz> i should give svd2nim a look and try bare metal nim on pico |
16:38:07 | FromDiscord | <djazz> without SDK |
16:54:31 | * | SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev) |
17:01:58 | FromDiscord | <Cadmium> this sounds good. problem is, e.g. ESP32 has its own ESP-SDK, how do you approach the merging? aliases and filling-up the gaps of one sdk with the object/classes/method/functions of the other SDKs?↵(@djazz) |
17:03:31 | FromDiscord | <Cadmium> or.. minimum common features/all SDKs have incomplete implementation except one? XD |
17:03:54 | FromDiscord | <djazz> i2c, spi, gpio are similar |
17:04:31 | FromDiscord | <Cadmium> I2S/TDM is a secial case of SPI |
17:04:37 | FromDiscord | <Cadmium> special |
17:05:13 | FromDiscord | <djazz> <https://github.com/daniel-j/picostdlib> |
17:06:09 | FromDiscord | <Cadmium> yes, I had it opened already. and tried your broken radio as well↵(@djazz) |
17:06:20 | FromDiscord | <djazz> ah its broken again? xD |
17:11:27 | FromDiscord | <Cadmium> and the audio visualiser is muted on latest firefox. |
17:12:08 | FromDiscord | <Cadmium> i know... web audio.... |
17:14:42 | FromDiscord | <djazz> hey, i havent done web dev in a while xD nim now |
17:15:09 | FromDiscord | <pmunch> In reply to @djazz "Ratel is a start": I would like to implement a lot more interfaces in it. And some way to improve the tooling and such. I think the idea really has a lot of potential, but Ratel is a bit too AVR focused in its design |
17:16:19 | FromDiscord | <djazz> yeah |
17:18:35 | FromDiscord | <Cadmium> decouple to modularise. rescue/keep the AVR concept/abstraction to want to be part of your API, next interface, rinse and repeat?? it would be great.↵(@pmunch) |
17:20:36 | FromDiscord | <djazz> example, fatfs wrapper, could be made into abstract wrapper <https://github.com/daniel-j/nim-pimoroni-pico/blob/master/src/pimoroni_pico/drivers/fatfs.nim> |
17:30:46 | FromDiscord | <pmunch> In reply to @Cadmium "decouple to modularise. rescue/keep": I mean it is already fairly modular and adaptable. But things like how interfaces are defined, tested, and documented is a bit up in the air |
17:48:29 | * | krux02 joined #nim |
17:52:19 | arkanoid | PMunch, out of curiosity, which of your many projects public Nim you like the most/are most proud of? |
18:03:51 | FromDiscord | <pmunch> Oh wow, good question |
18:04:14 | FromDiscord | <pmunch> Not sure really |
18:04:31 | FromDiscord | <pmunch> I really like how useful Futhark turned out to be |
18:07:02 | arkanoid | Futhark is gold |
18:11:44 | FromDiscord | <djazz> indeed! |
20:42:51 | * | gooba quit (Remote host closed the connection) |
20:43:13 | * | gooba joined #nim |
21:00:17 | NimEventer | New thread by xioren: Argon2 in Pure Nim., see https://forum.nim-lang.org/t/10900 |
21:07:19 | FromDiscord | <luteva> is there any "constant length string" type in nim? somthing like string[3] which only accepts strings of length 3, e.g. for IATA codes (airport codes). |
21:15:17 | FromDiscord | <Phil (he/him)> Best I could come up with is writing your own array char↵(@luteva) |
21:16:18 | * | azimut quit (Remote host closed the connection) |
21:16:37 | * | azimut joined #nim |
21:16:45 | FromDiscord | <luteva> sent a code paste, see https://play.nim-lang.org/#pasty=omsIHttRiBkS |
21:17:08 | FromDiscord | <luteva> (edit) "https://play.nim-lang.org/#pasty=fOIqIyZSyMfO" => "https://play.nim-lang.org/#pasty=fCEhkeJKCcuh" |
21:18:03 | FromDiscord | <Phil> In reply to @luteva "ok so, something like:": Aye |
22:26:41 | FromDiscord | <luteva> can i use tuples inside of an array? |
22:26:50 | FromDiscord | <Elegantbeef> Of course |
22:27:22 | FromDiscord | <luteva> any example? somehing like: array[0..18, tuple??] |
22:27:34 | FromDiscord | <Elegantbeef> `array[3, (int, int)]` |
22:27:46 | FromDiscord | <luteva> ah ok. thx! |
22:28:05 | FromDiscord | <Elegantbeef> You can also use named tuples, but your god will smite you for code smells |
22:28:32 | FromDiscord | <Phil> I like to live dangerously |
22:28:53 | FromDiscord | <Elegantbeef> If that was the case why do you care what sanitizers say? |
22:28:54 | FromDiscord | <Phil> - The person using named tuples for input instead of objects in owlkettle so that the API remains easier to fill |
22:29:14 | FromDiscord | <Phil> In reply to @Elegantbeef "If that was the": Because I like to live dangerously, not suicidally |
22:29:22 | FromDiscord | <Phil> There's a difference between going climbing and drinking bleach |
22:29:35 | FromDiscord | <Elegantbeef> Nah they're both exhilarating |
22:43:31 | * | advesperacit quit () |
22:55:37 | * | jmdaemon joined #nim |
23:43:20 | * | rockcavera quit (Read error: Connection reset by peer) |
23:46:37 | * | rockcavera joined #nim |
23:56:43 | * | xet7 quit (Remote host closed the connection) |