1. 2

    This is an exciting development. I am just thinking about having pure Janet binaries working like that. So I definitely will watch this.

    1. 4

      I used to be a massive keyboard nerd, and then bought an Ergodox Infinity, and my journey ended. Hopefully, for you too, this keyboard is satisfactory in the same way.

      1. 1

        Thank you very much! It looks like that to me.

      1. 3

        Beautiful, soulful article! Hope the author is doing better now 🥰

        1. 2

          Thank you! Due to Janet, I guess I am.

        1. 1

          Oh, Janet is missing. I need to PR soon :-).

          Anyway, great list!

          1. 1

            I am straw widower for the weekend and Janetuary is in full swing, so I guess I will Janet.

            1. 2

              I’m not familiar with the phrase “straw widower”. I found a few references, but I’m most of them don’t seem to fit your usage. (for example.) I take it you mean your partner is away for the weekend?

              1. 1

                Oh yep. That is the meaning here, where I live :-).

                1. 1

                  In Swedish, “gräsänkling” (grass widower) refers to a man stuck working in the city while his wife and children are in the country. I believe it stems from the late 19th century when the well-off middle class (in the UK sense) could afford a country place and the mother could accompany the children on school vacations.

                  The “widower” generally joined them on week-ends.

                  Edit considering the close cultural ties of Sweden with Germanophone Europe during this time I would not be surprised if the word is a German loan-word.

              1. 2

                One small thing, it was pointed to me, that old logo resembled KKK hood, which notion I strongly reject and Logo is redone. Sorry if it offended you.

                1. 3

                  This looks like a great resource. I’ve been using Janet a fair bit recently and having a place to find high quality libraries will be extremely useful. Nice work!

                  1. 4

                    Thank you very much. I hope they are high quality, but you definitely will be able to find some rough edges. If you do, please let me know.

                    1. 1

                      Will do! I appreciate the openness to feedback :)

                  1. 10

                    If you want to something really new, I will try Janet programming language https://janet-lang.org/.

                    The language and ecosystem are very young, but you mentioned parsing text for which Janet has powerful tools in the language’s core: the PEG.

                    Feel free to contact me if you need further advice. I am a co-maintainer of the packages registry for the language to help you choose the right tools.

                    1. 15

                      I’ve been working on a formatter for Fennel. I use the language’s own parser, which worked really well except for a few places where it uncovered shortcomings in the parser. (These were fixed once identified.) Most of the issues were around how it represented comments, because the parser omits comments by default and only gives you them if you ask specifically. A few were around missing filename/line data in the AST for certain constructs.

                      I also created antifennel which compiles Fennel back into Lua code by walking the results of an existing Lua parser and constructing a Fennel AST to send to the formatter. I blogged about the process; the cool part about this is that we used it to make the compiler self-hosting.

                      I’m not sure that my experience can be generalized from as I’m also the lead developer of the compiler itself. That said, the idea that you would need a 3rd-party parser in order to just parse code for a language seems really broken to me! If the compiler doesn’t allow you to use its own parser I would consider that a bug.

                      1. 6

                        If the compiler doesn’t allow you to use its own parser I would consider that a bug.

                        I think the idea that compilers should also be consumable as libraries has only surfaced recently, and even then not all compilers are self-hosting and not all compiler parsers might be usable for your specific use-case (maybe you wanna keep track of stuff that is discarded by the compiler like whitespace/comments).

                        Still, I definitely agree that compiler should be exposing APIs.

                        1. 2

                          Those are good observations. As a Janet user, I have a similar view.

                        1. 7

                          I don’t like the submitter link being so prominent, especially when it’s mostly just “pepe” everywhere. Seems a tad silly to me. Maybe a more subtle color?

                          1. 3

                            That is an excellent observation. I will PR the change, thank you.

                            1. 0

                              especially when it’s mostly just “pepe” everywhere.

                              Or even worse: yumaikas

                              😱

                              1. 1

                                Upvote here to donate Karma to the Janet Collective </sarcasm>

                                1. 2

                                  Please accept my precious up vote. I have only one to give.

                            1. 2

                              Now with an interactive playground, where you can run examples from the page.

                              1. 2

                                I like the idea of a programming language where instead of saying “I use X” you say “I am X”

                                1. 10

                                  This seems like a step in the wrong direction to me. We want people’s identities less tied to their tool selection.

                                  1. 7

                                    I took it as a pun with the name (Janet from The Good Place reference) but I agree that people must not be defined only by their tools. The other side of the coin is that we tend to either feel forced to use any tool either make the tools fit our way. When your tools began to be your medium of expression. How can you not feel them as part of your identity?

                                    1. 1

                                      Well said!

                                    2. 1

                                      As a programmer, I am JavaScript. As a programmer, I am Python. As a programmer, I am C++.

                                  1. 3

                                    This was a very good read. Respect for the kakoune linter.

                                    But I wonder, does the VM provide a Garbage Collector? Is it stack based? If so, how does it work and cope with its C potential “ordinary objects”?

                                    1. 5

                                      Thank you very much!

                                      VM indeed provide a GC, and it is stack-based. But I am not sure what you mean by the second sentence. There is a mechanism to create your own JanetAbstracts in C language, and then you can provide a call-back for the GC (among other things) where you usually free resources. If I am off, please refer to https://janet-lang.org/capi/index.html and beyond.

                                    1. 3

                                      The LISP tag might be appropriate?

                                      What distinguishes Janet from other LISP-like languages? The website doesn’t go out of its way to compare it to LISP; I had to find the home page and scroll down to some examples before seeing the telltale parentheses ;-)

                                      1. 10

                                        I think that’s intentional. I’m very comfortable describing Janet as a Lisp, but it departs from Lisp tradition in some key ways (like not using cons cells). In other, more argumentative spaces, describing it as a Lisp has led to a lot of really unnecessary rancour.

                                        1. 15

                                          Yeah, there’s a certain breed of Common Lisper who looooooves telling other people that their lisps are “not a real lisp”, and I think it’s completely reasonable to word your home page in such a way that it avoids having those incredibly tedious conversations.

                                          1. 5

                                            I had the lisp tag chosen for a brief moment when composing the post. But for a reason given above and because I did not want the post to be about code at all, I removed it.

                                            This is actually the second part of my Óde to Janet, and I want it to be plain praise.

                                          2. 4

                                            Janet isn’t huge but I’d love a Janet tag for this reason. A lot of Janet-related stuff gets submitted here

                                        1. 7

                                          Janet seems like a practical, modern lisp to get into. Anyone using Janet for anything? If so, what?

                                          1. 8

                                            I am using it right now only for personal stuff, but here are two projects that I am using every day:

                                            fuzzy finder ala fzy https://git.sr.ht/~pepe/jff.git time tracker/todo manager https://git.sr.ht/~pepe/neil

                                            1. 4

                                              I maintain (and use) a SSG in Janet: https://bagatto.co/

                                              I’ve also used Janet as a prototyping/tutorial language: https://blog.zdsmith.com/whist.html

                                              1. 2

                                                I’ve also used Janet as a prototyping/tutorial language: https://blog.zdsmith.com/whist.html

                                                I was just looking through this, really awesome! What are you using to tangle the literate source?

                                                1. 4

                                                  Thanks! The literate-programming application is Literate: https://zyedidia.github.io/literate/

                                                  It works pretty well. Totally source language agnostic. And I think I could theoretically get it to work with Emacs mmm-mode, though I haven’t tried too hard at all.

                                                  1. 2

                                                    wicked! Thanks – I’m excited to check this out over the weekend. I tend to do most of my literate programming in org-mode, but I’m always excited to try another system for literate programming

                                              2. 3

                                                I’m rewriting file opening scripts in it, my shell scripts for that are pretty ugly and bug-ridden (you can fit many bugs in 74 lines of shell). I can see myself rewriting most of my small scripts in it.

                                              1. 5

                                                Sorely needed! I’ve been keeping an eye on Janet. I think it’s time to dig in and see what I can learn. Thanks for posting this.

                                                1. 2

                                                  I think now is the right time, as we are moving into stable waters. Great to hear this

                                                1. 3

                                                  Really excited for this effort – best of luck! More real world examples on janetdocs would be awesome! I’ve found that many of the examples are so minimal as to not translate wicked well to real world applications. I look forward to keeping tabs on this project.

                                                  1. 2

                                                    Thank you very much!

                                                    We have already discussed the real-world examples in the Gitter channel, and it sounds very reasonable. I guess we have big enough corpus of a code to get examples from.

                                                  1. 1

                                                    You should check Janet programming language; it has PEG as part of the core https://janet-lang.org/docs/peg.html. And it is overall nice LISP dialect with some Lua flavour.

                                                    1. 2

                                                      I think that’s a great way to describe it. You can feel the Lua-isms in the design, even if the syntax are different.

                                                    1. 5

                                                      Sinatra’s law: given enough time, every programming language will see an attempt at a Sinatra clone. 1

                                                      Also, “Dammit Janet” would have been a cool name ;).

                                                      Jokes aside, this looks really nice! Especially the documentation using security-related things as examples always warms my heart: https://github.com/swlkr/osprey/blob/master/examples/csrf-tokens.janet

                                                      1. 1

                                                        I have Janet coloured glasses, but from all the Sinatra clones I have ever seen, this is the best. Probably better than the original :-).

                                                        Very true.

                                                      1. 4

                                                        What gets me really excited is the pure Janet HTTP server backing it. Great to see Janet stdlib’s net/server and peg put to use so well.

                                                        https://github.com/joy-framework/halo2/blob/master/src/halo2.janet

                                                        1. 2

                                                          It is indeed a very good thing and speed is very good too.