Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ianthehenry
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
ianthehenry
4y ago
Oh hey! Ha. I forgot to implement a way to do that. I just added it -- ctrl-enter or cmd-enter, depending on your OS, should work now.
62.
▲
by
ianthehenry
4y ago
I just compiled a hello world and got 784k on aarch64 macOS with all the defaults.
63.
▲
by
ianthehenry
4y ago
You can click the REPL icon in the bottom left corner, but the experience is pretty bad on mobile.
64.
▲
by
ianthehenry
4y ago
The only thing they have in common are parentheses. Carp is a statically typed language that compiles to native code without a GC. Janet is a dynamically-typed language that compiles to bytecode and runs in a virtual machine with a GC. Jane
65.
▲
by
ianthehenry
4y ago
I don't think Janet and Scheme have very much in common. If you're looking for a huge, batteries-included language, you will not have a good time with Janet :) Janet is much closer to Lua, in scope and applications, than it is to
66.
▲
by
ianthehenry
4y ago
I am not the author of the Janet programming language, just a user who likes it enough to write a book about it. That is my real favorite feature, not a strategy of any kind :)
67.
▲
by
ianthehenry
4y ago
The Janet language is named after a fictional immortal being from the television show The Good Place, who exists to help mortals in the afterlife -- that was the inspiration for the title.
68.
▲
by
ianthehenry
4y ago
I think Janet is an excellent choice for making redistributable CLI apps. Chapter 12 covers a bit of this, including the implementation of an extremely simple fzf-powered todo list: https://janet.guide/scripting/
69.
▲
Janet for Mortals
(janet.guide)
354 points
by
ianthehenry
4y ago
|
158 comments
70.
▲
by
ianthehenry
4y ago
I'll announce it on my RSS feed/newsletter/twitter once it's done, if you use any of those. I'd estimate that it'll be out by the end of March; I won't write any public updates until it's ready for pe
71.
▲
by
ianthehenry
4y ago
Janet doesn’t have regular expressions built in to the language. Instead, you write parsing expression grammars. https://janet-lang.org/docs/peg.html Spork has a regex-like syntax for constructing PEGs, but the semanti
72.
▲
by
ianthehenry
4y ago
Thank you for making an actually relevant point about syntax. I agree with this 100%, and I love Janet, and was recently doing a lot of interactive Janet programming for a generative art playground. So I added postfix function application.
73.
▲
by
ianthehenry
4y ago
They're similar! The author of Janet previously wrote https://fennel-lang.org/ , a compile-to-Lua language. Janet has more traditional scoping rules than Lua. Tables and arrays are separate types in Janet, and arrays ar
74.
▲
by
ianthehenry
4y ago
Oh hey! Nice to see this on the front page here. I love Janet -- I've been using it for about year and a half, and it's now my go-to scripting language when I need something more powerful than bash, or when I want to hack on goofy
75.
▲
by
ianthehenry
4y ago
I don't think that's ignorance :) Embedding Janet in the browser is hard! My real motivation for making this website was to have a simple example to point to of how to do it. Short answer: Emscripten + WebAssembly. Long answer: h
76.
▲
Show HN: Toodle.Studio is an art playground with Lisp and turtles
(toodle.studio)
167 points
by
ianthehenry
4y ago
|
19 comments
77.
▲
by
ianthehenry
4y ago
This has come up before, so I probably should mention it in the README at this point. There are some differences: The main feature of sd is the command descriptions in autocomplete. PATH_DIRS doesn't include these, so it's hard to
78.
▲
by
ianthehenry
4y ago
Yeah :( https://github.com/ianthehenry/sd/issues/9 The trouble is `sd` is just so easy to type on a qwerty keyboard, and it's such a nice mnemonic for "script directory." I've thought abou
79.
▲
by
ianthehenry
4y ago
Yeah, the problem is that I am very likely to write a script that takes `--` as an argument, and I don't want to have to write `-- --` when I call it. I am very unlikely to write a script that takes `--really` as an argument, so it
80.
▲
by
ianthehenry
4y ago
I use GoAccess. Free, open source, run it from the command line and it can spit out an HTML file full of plots. Works in offline or incremental mode. https://goaccess.io/
81.
▲
by
ianthehenry
4y ago
Yep! Got a piece of tooling leather, roughed up the steel with sandpaper, and affixed it with gorilla glue two part epoxy. If you go that route, make sure you clean the steel with soap -- my first attempt started to delaminate after a few m
82.
▲
by
ianthehenry
4y ago
Does it take a long time to adjust the height between sitting and standing? Without any tripod experience I would assume it would require carefully adjusting each of the three legs whenever you want to change height. Is that true, or is the
83.
▲
by
ianthehenry
4y ago
Oh I love this! Doubling as a carrying case is a great idea. I like the flat-pack assembly with the spacers parts. What's the weight of the full assembly like? I did something similar to this last year, but without the travel goal (jus
84.
▲
by
ianthehenry
4y ago
This article mentions Janet as a possible "Lua replacement," which is unrealistic. It's hard to overcome Lua's inertia and familiarity. But! If you're in the market for an embeddable-or-not scripting language, and y
85.
▲
by
ianthehenry
4y ago
Yeah, sd-the-script-directory pre-dates sd-the-sed-alternative by about 6 months. It seemed like such a good name at the time :)
86.
▲
by
ianthehenry
4y ago
Yep, sd supports arbitrarily nested command hierarchies.
87.
▲
by
ianthehenry
4y ago
You can also set the PATH_DIRS shell option and type, e.g. `blog/publish` if you have a ~/bin/blog directory full of scripts. Easier than an underscore. I mean, yeah, sd is only a marginal improvement over not sd. It's n
88.
▲
by
ianthehenry
4y ago
Yeah, and Janet copies Clojure's threading macros (that's how I implemented pipe syntax -- split on pipes, add some parens, and stick them into a -> form). I've just never seen it done infix like this -- it's very con
89.
▲
by
ianthehenry
4y ago
This is described later in the tutorial (ctrl-f "lisp heresy"). It's a macro that I wrote, not something built into Janet -- I'm sure I'm not the first person to do this, but I'm not aware of any lisps that hav
90.
▲
by
ianthehenry
4y ago
STL is a format for 3D geometry, so the GP is asking if there's a way to export the 3D models themselves. Bauble will have a way to export recordings eventually! That's much easier to do than meshing surfaces.
More ›