5 ms·
This looks really interesting, going to check this out later today. Anyone using Janet for anything that would care to comment on their experience?
by spsesk117 5y ago
This looks really interesting, going to check this out later today. Anyone using Janet for anything that would care to comment on their experience?
- swlkr 5y agoI wrote a few websites with it, notably: https://github.com/swlkr/janetdocs https://github.com/swlkr/janetdocs I also scraped together a large web framework and a small one: https://github.com/joy-framework/joy https://github.com/joy-framework/joy https://github.com/swlkr/osprey https://github.com/swlkr/osprey
- frompdx 5y agoThanks for all of your work Sean. I've messed around a bit with Joy and have been keeping an eye on the development of the framework.
- swlkr 5y agoHey no problem! It's always great when something I make for myself works out for someone else too!
- spsesk117 5y agoOh awesome, thanks for sharing, I have already been looking at some community examples on there!
- harryvederci 5y agoI'm using your html library (a Clojure hiccup clone, sort of) and tw (tailwind) library, and often use janetdocs to find examples of how to use Janet functions. Thanks a lot man!
- swlkr 5y agoHey! It's nice to see someone using the stack! What's funny about tw is that it was kind of like a ghetto tailwind jit before it was released! Janet can really help you move fast
- harryvederci 5y agoHaha, I like that description: "ghetto tailwind jit". From your blog it seems like you're not really using it yourself anymore, though? I tried to add a styling thingy (sorry, really not familiar with the terminology) to `tw` to add support for "print" media queries (like this: https://tailwindcss.com/docs/breakpoints#styling-for-print https://tailwindcss.com/docs/breakpoints#styling-for-print), but didn't get it to work on the first try. If I do make it work I'll create a PR :)
- swlkr 5y agoOh yeah, that's a bit of journey, each variant is kind of annoying to handle manually. I always look forward to any and all PRs! Edit: Yeah I haven't used it lately, I currently use roda + sequel now (ruby libraries). I have limited time after work and I really want to get some "SaaS apps" up and running, so the trade-off was spend less time on libraries and more time on applications.
- cellularmitosis 5y agoBecause swlkr is a bit modest, I’ll take this opportunity to point out his Janet twitch streams on his behalf. Definitely check them out! (google for “twitch swlkr”)
- swlkr 5y agohaha thanks for the shout out! I’m currently working on ruby stuff on stream but maybe I won’t be able to stay away from Janet for long
- saikyun 5y agoI'm making an editor, Freja, which is like a tiny Emacs with graphical support. Makes it fun to create gui apps and games. :) Ultima Underworld inspired game I'm making for a game jam: https://youtu.be/1fWsV83P-S8 https://youtu.be/1fWsV83P-S8 Demo of pixel editor: https://www.youtube.com/watch?v=KOBi805nxNc https://www.youtube.com/watch?v=KOBi805nxNc Freja: https://github.com/Saikyun/freja https://github.com/Saikyun/freja --- My experience has overall been very nice. I come from Clojure, and comparing to that: - so nice and small! Clojure is great but has a lot of baggage from JVM, for good and bad - very easy to get started interoping with C. You need to manually wrap libraries, but I think it's pretty easy. As a benefit, you are able to throw exceptions from C that can be catched from Janet. The C support is what sells me on Janet over Clojure - repl:ing works well, but you can get tripped up by early binding and lack of namespaces. There are ways around it, but when coming from Clojure it was a bit hard to wrap my head around - many libraries that you'd want are already wrapped, like http-servers and postgresql connections. But ofc this is an area that is thinner than older languages. It's decently easy to wrap C-libs though - easy to understand data structures if you've used JS / Lua -- "everything is a hashmap" (but there are also arrays and strings)
- diskzero 5y agoFreja looks really cool! Thanks for sharing it. I find these types of projects very inspiring. They bring back the wonder and joy that I felt when I first discovered computers in the early 80s. You felt like you were in control of a whole new world and anything was possible.
- saikyun 5y agoThank you! That is exactly what I'm going for. :) My friend said "so you're just making basic?", haha. I didn't get to experience C64 / Amiga era, but after having listened to 100s of interviews with swedish game developers it seems that the automatic (or even required) access to a coding environment sparked a lot of creativity and imagination. :) I hope Freja can capture at least a part of that.
- spsesk117 5y agoWow! Some really cool projects, thanks for sharing, I'll definitely check out Freja later this evening! Thanks so much for the info and commentary!
- ianthehenry 5y agoI've been writing about my first impressions of the language here: https://ianthehenry.com/posts/janet-game/ https://ianthehenry.com/posts/janet-game/ Not a whole lot of content yet, but I plan to keep going with it. I am pretty firmly in the Haskell/OCaml "let me program with types" camp for most development, but it's a great to have a little scripting language to reach for instead of bash or Python or Perl. Using Janet (coming from Python) reminds me a bit of: https://xkcd.com/353/ https://xkcd.com/353/ Except... without the rich standard library :)
- spsesk117 5y agoThanks for the link, I'll definitely check it out! What actually piqued my interest was the surface impression of something like a Lispier Perl/Python.
- CraigJPerry 5y agoYour writing style is really enjoyable, I binged the 3 posts and really enjoyed, especially the macros post
- actuallyalys 5y agoI've thought about using Janet for a game, but there's more examples of people using love2d plus Fennel so I'm more likely to use that combination for my future Lisp game experiments. (Fennel is similar to Janet and created by the same person, but compiles to Lua.)
- harryvederci 5y agoI'm using it for some side projects, combined with htmx (htmx.org). What I like: 1. The applications start really quickly, compared to Clojure. 2. It feels like I could learn everything about the language if I ever want to dive into the internals. With Clojure/Babashka I don't think that would be possible for me. 3. A bit vague, but it really feels nice to program in this language. I can easily get things to work, I can mess around in a REPL if I want to, and #4: 4. The community is great. Instead of searching on the internet, when I don't know how to do something, I ask a question on gitter / matrix and before long there's an answer from a more experienced person (sometimes even from the creator of the language). 5. The package manager (JPM) is really easy to use. 6. In terms of download size, Janet it tiny. But compared to Lua, it's way more "batteries included" due to the great standard library. What could be better: 1. Tooling I guess, but that's logical for younger languages. I use Olical his "Conjure" Neovim plugin, which is great. I don't think it's possible to jump to the definition of a function name if my cursor is on it. Maybe that's normally done through LSP in Conjure, I'm not sure. I don't know if there are plans to add LSP support to Janet? 2. I just found out a couple of days ago that Janet has no `set` datastructure. You can work around this by using a hashmap where each key maps to a value of true, or you can use a library that adds the datastructure. 3. Not sure if this would have downsides in Janet, but something I really like about Clojure is that you can use a lot of standard library functions on all data types. In Janet sometimes you have to look up a function specific to a data type, where Clojure would be more agnostic - with functions that work on different datatypes in an expected way, and return a `sequence`. 4. Some library authors have the tendency to use "The Good Place" references in their library names. I know the name "Janet" is a reference to that series, and I know developers in all languages are always trying to be funny. But finding a library called "html" (by swlkr) is way more helpful than finding one named after some character from a series. What I think I will like, but haven't tried yet: 1. Object Oriented Programming in Janet seems nice (https://janet-lang.org/docs/object_oriented.html https://janet-lang.org/docs/object_oriented.html). 2. PEG (Parsing Expression Grammars - https://janet-lang.org/docs/peg.html https://janet-lang.org/docs/peg.html )
- frompdx 5y agoI use Janet most often as a glue for shell utilities using the sh package (https://github.com/andrewchambers/janet-sh https://github.com/andrewchambers/janet-sh). It's a great tool for building small containerized jobs. I think it has a ton of potential as the ecosystem grows and matures. Some rough spots: - No canonical http client. There are a few attempts at wrapping libcurl but nothing complete and well documented yet. However, the creator of Joy framework for Janet does have an http client library. - The main http server circlet is MIT licensed, but it is built on top of Mongoose, which is GPL/paid commercial. Something to be aware of if you want to distribute binaries made with this library. - I have never been successful getting any of the UI or drawing libraries to work. - Naming of packages is a bit confusing even if you have watched the Good Place and are aware of all of the inside jokes.
- saikyun 5y ago> I have never been successful getting any of the UI or drawing libraries to work. Have you tried jaylib (built on top of raylib)? I have gotten that to work well on macos, linux and windows. :) > The main http server circlet is MIT licensed, but it is built on top of Mongoose, which is GPL/paid commercial. Something to be aware of if you want to distribute binaries made with this library. While I haven't used it outside of development, chidi is MIT licensed. :) https://git.sr.ht/~pepe/chidi https://git.sr.ht/~pepe/chidi
- jd_mongodb 5y agoThe Mongoose github says it's MIT Licensed https://github.com/Automattic/mongoose https://github.com/Automattic/mongoose
- frompdx 5y agoDifferent mongoose in this case: https://cesanta.com/ https://cesanta.com/
- jd_mongodb 5y ago