<< 22-01-2024 >>

00:03:48FromDiscord<thepuzzleddev> In reply to @michaelb.eth "at the top of": Ok, thank you
00:04:30FromDiscord<piman_discriminator_1010> is it valid for an enum to start with `#`?
00:04:41FromDiscord<Elegantbeef> Is it a valid Nim identifier?
00:11:22FromDiscord<piman_discriminator_1010> apparently not, which makse sense.... wait..... FUCK
00:11:34FromDiscord<piman_discriminator_1010> identifiers can't start with `_` either according to the docs
00:11:36FromDiscord<piman_discriminator_1010> shit
00:11:39FromDiscord<piman_discriminator_1010> now idk what to do
00:14:24FromDiscord<leorize> what are you aiming to do?
00:15:31FromDiscord<piman_discriminator_1010> copy enums from a system's documentation into Nim
00:15:58FromDiscord<leorize> then you'll have to get creative \:p
00:16:02*lucasta joined #nim
00:16:23FromDiscord<piman_discriminator_1010> yea but how :PepeHands: I can only start with letters
00:16:36FromDiscord<leorize> then start with letters
00:16:38FromDiscord<piman_discriminator_1010> 🤔 though any unicode character is also considered a letter
00:16:46FromDiscord<leorize> like, can't you just trim the `_`?
00:17:01FromDiscord<piman_discriminator_1010> In reply to @leorize "like, can't you just": no, I was adding the `_` because some start with numbers
00:17:20FromDiscord<piman_discriminator_1010> I suppose I could prepend zero width space :ElmoBurn:
00:17:23FromDiscord<leorize> add a `n` prefix for that \:p
00:18:23FromDiscord<piman_discriminator_1010> also some start with `#`
00:18:40FromDiscord<piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=bjxkmHAjWymu
00:19:52FromDiscord<piman_discriminator_1010> and then there is a timezone set which all start with `(`
00:20:18FromDiscord<leorize> split them into several different enums \:p
00:20:25FromDiscord<piman_discriminator_1010> wdym
00:20:28FromDiscord<leorize> then the type name itself would be your prefix
00:20:56FromDiscord<piman_discriminator_1010> this already is a set of enum sets
00:21:37FromDiscord<leorize> made up some prefixes then
00:21:40FromDiscord<piman_discriminator_1010> and this little devil exists too `? = 147`
00:22:57FromDiscord<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:36FromDiscord<leorize> if you really want to, you can try stropping them
00:23:36FromDiscord<Elegantbeef> You can use constants
00:23:55FromDiscord<Elegantbeef> I'm still absolutely baffled at what you're doing
00:26:21FromDiscord<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:09FromDiscord<Elegantbeef> Wait these are just bitsets
00:28:17FromDiscord<Elegantbeef> Why keep the names verbatim
00:28:22FromDiscord<Elegantbeef> replace `/` for `per`
00:28:40FromDiscord<Elegantbeef> replace `%` for `percent`
00:29:07FromDiscord<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:41FromDiscord<Elegantbeef> Using basic string replaces you'd get quite far very quickly
00:32:47*lucasta quit (Quit: Leaving)
00:35:22FromDiscord<piman_discriminator_1010> hmm, maybe I could do something like HTML does
00:36:45FromDiscord<piman_discriminator_1010> where `>` becomes `&gt;` iirc
00:39:21FromDiscord<Elegantbeef> Well that's uri encoding, but yea
00:39:38FromDiscord<piman_discriminator_1010> uri encoding typically uses `%HH`doesn't it?
00:39:53FromDiscord<Elegantbeef> A url is a uri
00:42:05FromDiscord<␀ Array 🇵🇸 🍉> wouldn't that be html encoding?
00:43:18FromDiscord<Elegantbeef> Seems it's actually "HTML character references"
00:45:38*lucasta joined #nim
00:49:32FromDiscord<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:47FromDiscord<maker_of_mischief> the only thing i could find was nsu and that doesnt compile
00:50:04FromDiscord<piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=ouXkPvdcSYEm
00:50:07FromDiscord<maker_of_mischief> https://media.discordapp.net/attachments/371759389889003532/1198791672079847554/1705884605800.png?ex=65c030bf&is=65adbbbf&hm=fb975f2fa653e2fd0cd3926ac8b62132524a6bac0cd6b80e923528f5af8b4135&
00:50:54FromDiscord<Elegantbeef> Using C there is pretty funny
00:51:21FromDiscord<maker_of_mischief> nsu refuses to compile :( https://media.discordapp.net/attachments/371759389889003532/1198791977337102457/1705884679580.png?ex=65c03107&is=65adbc07&hm=29a531f9a73a927570768b0488818a8de985ae35849190746525dfbe1216e4c1&
00:51:25FromDiscord<maker_of_mischief> https://cdn.discordapp.com/emojis/1162227794802130944.webp?size=48&name=sob%7E1&quality=lossless
00:51:46FromDiscord<Elegantbeef> Do I say "Time to fork it and change it to work"? 😄
00:52:04FromDiscord<piman_discriminator_1010> In reply to @Elegantbeef "Using C there is": easier to me than making a new Nim project
00:52:26FromDiscord<Elegantbeef> Nim is vastly more productive than C but to each their own
00:53:09FromDiscord<maker_of_mischief> wait why has treeform made like 80% of all the projects i use for nim
00:53:21FromDiscord<Elegantbeef> He uses it professionally
00:54:07FromDiscord<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:19FromDiscord<Elegantbeef> Same with Nim
00:54:51FromDiscord<Elegantbeef> Make a `myfile.nim` write your code compile with `nim c -r ./myfile.nim`
00:55:05FromDiscord<Elegantbeef> It's just as easy as writing C 😄
00:55:29FromDiscord<piman_discriminator_1010> oh, didn't remember that
00:56:43FromDiscord<piman_discriminator_1010> unfortunately this escape method will result in things like `ONEST` but oh well
00:56:52FromDiscord<piman_discriminator_1010> (edit) "but" => "(`1ST`)but"
01:03:44*Mister_Magister quit (Quit: bye)
01:04:50FromDiscord<girvo> sent a code paste, see https://play.nim-lang.org/#pasty=wiVfIbLEiGrX
01:05:16FromDiscord<Elegantbeef> yea `let test = default(array[32, byte])`
01:05:39*Mister_Magister joined #nim
01:06:34FromDiscord<Elegantbeef> https://discord.com/channels/371759389889003530/371759389889003532/1196297226444623872 also will help for more complicated constructs
01:09:27FromDiscord<girvo> ty ❤️
01:11:20*SchweinDeBurg quit (Quit: WeeChat 4.2.0-dev)
02:12:06*SchweinDeBurg joined #nim
02:25:24FromDiscord<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:17FromDiscord<piman_discriminator_1010> ah yes, such readability↵`UNIT_CTRL_MODE_LBRAK0EQLW_1EQRW_2EQDA_3EQSP_4EQHC_5EQHPRBRAK = 138`
03:33:43FromDiscord<piman_discriminator_1010> :aquacry: I have to escape these?↵`ΓÇôΓÇôΓÇôΓÇôΓÇôΓÇôΓÇôΓÇô`
03:34:05FromDiscord<piman_discriminator_1010> oh there's only 3 of them, and this smell like unicode
03:37:54FromDiscord<piman_discriminator_1010> yep, it's long dash
04:37:36FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=oQHottyaMGVs
04:43:12FromDiscord<odexine> Every symbol in a template is sanitised to prevent accidental collision
04:43:32FromDiscord<odexine> This means that each symbol in a template is made unique when generated from a template call
04:44:50FromDiscord<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:20FromDiscord<odexine> To do the latter, add the {.dirty.} pragma
04:46:08*SchweinDeBurg joined #nim
04:46:57FromDiscord<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:09FromDiscord<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:17FromDiscord<piman_discriminator_1010> sent a code paste, see https://play.nim-lang.org/#pasty=WNhUXeUpUAbE
04:56:58FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=NAQWZkfqxFsv
04:57:10FromDiscord<Elegantbeef> You annotated the wrong template
04:57:23FromDiscord<user2m> In reply to @piman_discriminator_1010 "how do I mark": try like this actions {.pure.}= enum
04:58:32FromDiscord<odexine> In reply to @Elegantbeef "You annotated the wrong": I think both need to be annotated
04:58:33FromDiscord<piman_discriminator_1010> alright, I'll let you know in like 10 minutes :var:
04:58:52FromDiscord<Elegantbeef> Maybe if you didn't just convert 30000000 enums to Nim code 😄
04:59:04FromDiscord<piman_discriminator_1010> hey, it's only 50000 enums lol
04:59:10FromDiscord<odexine> What the fuck
04:59:13FromDiscord<Elegantbeef> only
04:59:17FromDiscord<piman_discriminator_1010> only
04:59:29FromDiscord<odexine> Merely 50 thousand
04:59:37FromDiscord<Elegantbeef> You might be doing something wrong when
05:00:05FromDiscord<user2m> sent a code paste, see https://play.nim-lang.org/#pasty=KAMRwsTPyYqb
05:00:43FromDiscord<Elegantbeef> Does one really need any argument against this inane template madness?
05:02:09FromDiscord<user2m> In reply to @Elegantbeef "Does one really need": lol yeahhhh I'm going back to the sane world of santized templates
05:02:34FromDiscord<Elegantbeef> I do not even get why you're using templates here
05:03:01FromDiscord<user2m> In reply to @Elegantbeef "I do not even": honestly just trying to learn more about templates
05:03:01FromDiscord<piman_discriminator_1010> In reply to @user2m "try like this actions*": ok, this looked like it worked
05:03:24FromDiscord<user2m> In reply to @Elegantbeef "I do not even": my template / macro knowledge is very smol
05:04:28FromDiscord<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:38FromDiscord<MDuardo> sent a code paste, see https://play.nim-lang.org/#pasty=aUsPQktHljwf
06:11:06FromDiscord<odexine> What do you mean by cause problems
06:11:27FromDiscord<MDuardo> Unexpected behavior or something like that
06:12:53*nazgulsenpai quit (Ping timeout: 240 seconds)
06:14:30*nazgulsenpai joined #nim
06:19:14FromDiscord<4zv4l> I mean its literally a function that will wrap the code you added, nothing bad in it
06:19:38FromDiscord<4zv4l> you could add `{.inline.}` to avoid the function call "penalty"
06:21:34FromDiscord<4zv4l> (I would also add `varargs`)
06:23:59FromDiscord<MDuardo> Done, thank you very much
06:27:12FromDiscord<4zv4l> sent a code paste, see https://play.nim-lang.org/#pasty=bYuxKboZukiE
06:27:27FromDiscord<4zv4l> (even easier than doing the inline proc)
06:34:34FromDiscord<MDuardo> That's why I wanted to try it
06:35:47FromDiscord<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:34FromDiscord<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:56FromDiscord<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:48FromDiscord<Elegantbeef> `enum`
10:26:34FromDiscord<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:19FromDiscord<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:21FromDiscord<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:59PMunchI would also say embedded is a great niche
11:33:00FromDiscord<Cadmium> transpiling to JS and asm could be streamlined
11:33:18FromDiscord<Cadmium> transpiling to JS and wasm could be streamlined
11:33:39PMunchI'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:46PMunchHave it running on a FreeRTOS board atm
11:33:57FromDiscord<Cadmium> seen your efforts. thank you! I follow ur steps, master.
11:35:10FromDiscord<Cadmium> finally, presenting
11:37:06PMunchHaha, glad you like it :)
11:37:11PMunchWhat're you presenting?
11:38:03FromDiscord<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:55PMunchOh, weird. Half your message got cut through the bridge
11:39:01PMunchOr did you make an edit?
11:41:09*krux02 joined #nim
11:44:30FromDiscord<Cadmium> sent a long message, see https://pasty.ee/YvWOJpDajxQb
11:46:15PMunchHuh, maybe I wouldn't be completely musically inept if I had something like that growing up :P
11:46:18FromDiscord<Cadmium> sorry, wasn't aware message editing glitches through bridging.↵(<@709044657232936960_=50=4dunch=5b=49=52=43=5d>)
11:46:57PMunchIt has gotten a lot better
11:55:20FromDiscord<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:22FromDiscord<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:10PMunchOh 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:26PMunchI mean that's pretty much how the standard library and some external packages have gone
12:01:54PMunchAs always though it's hard to create a perfect API when you want to keep native performance
12:07:41FromDiscord<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:02PMunchYeah 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:28PMunchUnfortunately I simply haven't had the time to work on it as much as I had wanted (switched jobs a while back..)
12:10:39FromDiscord<nnsee> the woes of being a bigshot CTO
12:11:02PMunchHaha, something like that :P
12:11:44FromDiscord<Cadmium> maybe I'm ready for that position? LOL XD↵(@nnsee)
12:17:22FromDiscord<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:08PMunchHuh, why would I port it to Zig?
12:18:39FromDiscord<Cadmium> to get people using it.
12:19:52FromDiscord<Cadmium> in-line ratel inside an arduino project? they are just examples.
12:20:57PMunchThat doesn't make any sense though, I would want people to use ratel, not ratel-zig
12:21:33PMunchI 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:25FromDiscord<Cadmium> this needs more exposure then, I am very interested and haven't crossed this.
12:27:09PMunchIt was a very quick and dirty game jam thing, hence the missing exposure
12:27:10PMunchhttps://github.com/PMunch/MannBarSchwein-arduboy
12:27:16PMunchThe main game is in ardu.nim
12:29:26FromDiscord<MDuardo> What resources you recommend to use Nim with Arduino?
12:29:37FromDiscord<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:11PMunch@MDuardo, there isn't really a lot of published work on the topic yet
12:30:47PMunchI have some videos where I do it
12:46:27FromDiscord<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:22PMunchStolen?
12:47:31*Batzy joined #nim
12:47:58PMunchFYI Arduino is the name of the software framework
12:48:20*azimut joined #nim
12:51:59FromDiscord<MDuardo> Arduino Uno
12:52:07FromDiscord<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:50PMunchSure, but you program the ATmega328p IIRC
12:57:09PMunchSo you could either program it with the Arduino framework, or with something else
13:27:54*rockcavera joined #nim
13:39:08FromDiscord<nervecenter> sent a long message, see https://pasty.ee/rhdfHKUcfTRV
13:40:11FromDiscord<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:19FromDiscord<nervecenter> (edit) "not" => "no"
13:41:02FromDiscord<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:11FromDiscord<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:16FromDiscord<maker_of_mischief> is there a way to do that but for procs
14:06:49FromDiscord<nnsee> In reply to @maker_of_mischief "so, you know how": there was an experimental flag for it, let me find it
14:07:38FromDiscord<nnsee> https://nim-lang.org/docs/manual_experimental.html#code-reordering
14:07:45FromDiscord<maker_of_mischief> In reply to @nnsee "https://nim-lang.org/docs/manual_experimental.html#": nim is the best language
14:07:49FromDiscord<nnsee> alternatively use forward declarations
14:09:59NimEventerNew thread by ghostynewt: Exponentially-slow compile times with deeply nested iterators, see https://forum.nim-lang.org/t/10897
14:12:43FromDiscord<maker_of_mischief> In reply to @NimEventer "New thread by ghostynewt:": isnt that to be expected?
14:13:06FromDiscord<maker_of_mischief> oh wait compile not run
14:20:57PMunch@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:21arkanoidI 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:58FromDiscord<michaelb.eth> In reply to @arkanoid "I want to ditch": shell script?
15:25:51PMunchI guess you could just have a Nim file and run `nim e` on it for more or less the same experience
15:27:09FromDiscord<odexine> i believe atlas also has tasks?
15:27:18PMunchIt does?
15:27:19FromDiscord<odexine> and nim itself has tasks if i recall correctly
15:27:36FromDiscord<odexine> i remember something that resembled tasks outside of nimble
15:27:53FromDiscord<odexine> https://forum.nim-lang.org/t/2965 indeedd
15:27:54arkanoidtasks is a concept of nim script, it's independent from nimble https://nim-lang.org/docs/nims.html
15:27:55FromDiscord<odexine> (edit) "indeedd" => "indeed"
15:28:04FromDiscord<graveflo> yea Ive been using them. I even converted some nimble build systems to atlas using nim tasks
15:29:09PMunchWell nimble files are just nimscript files with some extra code getting inserted before them
15:30:17arkanoidPMunch: ok but there's the "nimble" executable
15:30:40FromDiscord<Cadmium> ratel could be an open language spec. and rapel-nim the official//supported implementation? See what I mean?
15:30:40FromDiscord<graveflo> arkan I've been just making a landing script and doing `nim taskName manifest.nims` to run the tasks
15:30:59arkanoidnevermind, just tested that just by writing tasks in config.nims, I can "nim mytask" and it works
15:32:23PMunch@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:34FromDiscord<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:36FromDiscord<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:36FromDiscord<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:54PMunchI 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:09PMunchIt's not a DSL though..
15:44:13FromDiscord<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:41FromDiscord<Cadmium> what is the reason you don't consider it a DSL?
15:44:54PMunchOh, so if someone wants to reimplement Nim in Java to run Ratel it would be Ratel in Java?
15:45:23FromDiscord<Cadmium> no.
15:45:23PMunchWell 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:48PMunchIt's not a special language, it's just Nim
15:46:15FromDiscord<Cadmium> i'd make it a
15:46:17FromDiscord<Cadmium> DSL
15:46:42PMunchWhy? Sounds like a very strange choice
15:50:30FromDiscord<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:25PMunchBut 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:01PMunchIt sounds like you want something completely different from what Ratel is supposed to offer
15:52:26FromDiscord<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:55FromDiscord<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:03FromDiscord<djazz> #embedded leaking into #main love to see it 😄
16:19:29FromDiscord<djazz> I wish we had a bigger Nim on microcontroller/embedded community
16:22:59FromDiscord<djazz> What we need is a hardware abstraction layer, similar to Arduino framework or rust's embedded-hal
16:23:19FromDiscord<djazz> Ratel is a start
16:28:26FromDiscord<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:42FromDiscord<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:05FromDiscord<djazz> i should give svd2nim a look and try bare metal nim on pico
16:38:07FromDiscord<djazz> without SDK
16:54:31*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
17:01:58FromDiscord<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:31FromDiscord<Cadmium> or.. minimum common features/all SDKs have incomplete implementation except one? XD
17:03:54FromDiscord<djazz> i2c, spi, gpio are similar
17:04:31FromDiscord<Cadmium> I2S/TDM is a secial case of SPI
17:04:37FromDiscord<Cadmium> special
17:05:13FromDiscord<djazz> <https://github.com/daniel-j/picostdlib>
17:06:09FromDiscord<Cadmium> yes, I had it opened already. and tried your broken radio as well↵(@djazz)
17:06:20FromDiscord<djazz> ah its broken again? xD
17:11:27FromDiscord<Cadmium> and the audio visualiser is muted on latest firefox.
17:12:08FromDiscord<Cadmium> i know... web audio....
17:14:42FromDiscord<djazz> hey, i havent done web dev in a while xD nim now
17:15:09FromDiscord<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:19FromDiscord<djazz> yeah
17:18:35FromDiscord<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:36FromDiscord<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:46FromDiscord<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:19arkanoidPMunch, out of curiosity, which of your many projects public Nim you like the most/are most proud of?
18:03:51FromDiscord<pmunch> Oh wow, good question
18:04:14FromDiscord<pmunch> Not sure really
18:04:31FromDiscord<pmunch> I really like how useful Futhark turned out to be
18:07:02arkanoidFuthark is gold
18:11:44FromDiscord<djazz> indeed!
20:42:51*gooba quit (Remote host closed the connection)
20:43:13*gooba joined #nim
21:00:17NimEventerNew thread by xioren: Argon2 in Pure Nim., see https://forum.nim-lang.org/t/10900
21:07:19FromDiscord<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:17FromDiscord<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:45FromDiscord<luteva> sent a code paste, see https://play.nim-lang.org/#pasty=omsIHttRiBkS
21:17:08FromDiscord<luteva> (edit) "https://play.nim-lang.org/#pasty=fOIqIyZSyMfO" => "https://play.nim-lang.org/#pasty=fCEhkeJKCcuh"
21:18:03FromDiscord<Phil> In reply to @luteva "ok so, something like:": Aye
22:26:41FromDiscord<luteva> can i use tuples inside of an array?
22:26:50FromDiscord<Elegantbeef> Of course
22:27:22FromDiscord<luteva> any example? somehing like: array[0..18, tuple??]
22:27:34FromDiscord<Elegantbeef> `array[3, (int, int)]`
22:27:46FromDiscord<luteva> ah ok. thx!
22:28:05FromDiscord<Elegantbeef> You can also use named tuples, but your god will smite you for code smells
22:28:32FromDiscord<Phil> I like to live dangerously
22:28:53FromDiscord<Elegantbeef> If that was the case why do you care what sanitizers say?
22:28:54FromDiscord<Phil> - The person using named tuples for input instead of objects in owlkettle so that the API remains easier to fill
22:29:14FromDiscord<Phil> In reply to @Elegantbeef "If that was the": Because I like to live dangerously, not suicidally
22:29:22FromDiscord<Phil> There's a difference between going climbing and drinking bleach
22:29:35FromDiscord<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)