Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
A quick introduction to janet programming language on Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 364

PostPosted: Wed Jan 22, 2020 6:11 am    Post subject: A quick introduction to janet programming language on Gentoo Reply with quote

Janet programming language is a good system scripting language. I use janet where I used to use python and haskell for small scripts.

It compiles fast. It is simpler and more expressive than python. Developers are very active. It integrates with C programming language.

If you want to try janet on Gentoo, it's simple.
Code:
emerge dev-lang/janet::crocket-overlay

`janet` launches janet REPL. `man janet` teaches you REPL key bindings. There are few janet packages worth trying.
  • dev-janet/process::crocket-overlay
    • janet process module has a set of low-level functions for launching processes.
  • dev-janet/sh::crocket-overlay
    • janet sh module has a set of higher-level functions for launching processes.
  • dev-janet/argparse::crocket-overlay
    • It is used for parsing command line arguments.
  • dev-janet/rlrepl::crocket-overlay
    • rlrepl is a REPL that utilizes GNU readline which is more powerful than janet built-in REPL, but rlrepl doesn't have colorful output. Use this if you want a more powerful REPL.
    • If you want rlrepl to replace the built-in REPL, create an executable or an alias that executes
      Code:
      janet -e '(import rlrepl) (rlrepl/rlrepl)'

  • dev-janet/repl-tools::crocket-overlay
    • This has a set of functions useful for browsing functions and variables on REPL. I use this every time that I use a REPL.
    • If you want your REPL to use repl-tools by default, create an executable or an alias that executes
      Code:
      janet -e '(use repl-tools)' -r
      or
      Code:
      janet -e '(use repl-tools) -e '(import rlrepl) (rlrepl/rlrepl)'
You can use `(doc)` macro to learn what roles each function or variable serves. You can check a list of registered janet packages on http://github.com/janet-lang/pkgs


Last edited by crocket on Wed Jan 22, 2020 6:42 am; edited 2 times in total
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1029
Location: The Holy city of Honolulu

PostPosted: Wed Jan 22, 2020 6:32 am    Post subject: Reply with quote

Interesting.

Though until it becomes ubiquitous I, personally, won't have a reason to use it. Python is everywhere, my chances of finding a system with Janet installed on it are pretty low.
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2020 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 364

PostPosted: Wed Jan 22, 2020 6:34 am    Post subject: Reply with quote

It takes very little time to compile janet and janet modules. So, if you use it personally on your system, it is not cumbersome.

Also, it is far easier to create a janet package than to create a python package.
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1029
Location: The Holy city of Honolulu

PostPosted: Wed Jan 22, 2020 6:43 am    Post subject: Reply with quote

crocket wrote:
It takes very little time to compile janet and janet modules. So, if you use it personally on your system, it is not cumbersome.

Also, it is far easier to create a janet package than to create a python package.


Which is nice. But my chances of finding Janet on a network I'm pentesting is low. I can see the appeal of it for an end user on their own system, but as a Python replacement I'm just not seeing it.
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2020 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 18249

PostPosted: Wed Jan 22, 2020 9:46 pm    Post subject: Reply with quote

Maybe some day there will be a lisp-like that doesn't look as lisp-like (maybe there is?):

https://janet-lang.org/docs/syntax.html
https://janet-lang.org/docs/specials.html
_________________
Eat recycled food. It's good for the environment and okay for you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum