Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
xiaq
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
xiaq
2y ago
You can find this in the explainer linked from the example too :) https://elv.sh/learn/scripting-case-studies.html#jpg-to-png.... https://elv.sh/learn/tour.html also has a big list of syntax compa
32.
▲
by
xiaq
2y ago
You can actually wrap variables with {} (which functions just as a grouping construct in Elvish): ~> curl -s https://dl.elv.sh/{$platform:os}-{$platform:arch}/elvish-HEA... .... It's more verbose than quoting th
33.
▲
by
xiaq
2y ago
Well, Elvish doesn't have objects , but it's also not based only on text processing - it has lists and maps that can be arbitrarily nested. On this front it is somewhat aligned with PowerShell but without all the OO paradigm.
34.
▲
by
xiaq
2y ago
I have a ton of respect for whoever sticks to the traditional vi! Not promising anything but this may have bumped the priority of supporting ^Z slightly in my TODO list :)
35.
▲
by
xiaq
2y ago
Hiya! I, for one, would definitely welcome more promotion of Murex! (Also just checked out Murex's website again, seems we reworked the style of the respective homepages around the same time :)
36.
▲
by
xiaq
2y ago
Tcl is actually an inspiration for Elvish, and Elvish has a "command language" flavor too. The "everything is a string" idea sadly turned out to not work that well for most people though, so Elvish has lists, maps, and f
37.
▲
by
xiaq
2y ago
I would invite you to read the rest of the explainers, which go into deeper differences: https://elv.sh/learn/scripting-case-studies.html Re "cosmetic" - I'd agree that the extent syntax matters is more
38.
▲
by
xiaq
2y ago
Elvish's lambda syntax used to be [arg]{ ... }. But since [arg] is also the syntax for lists, it can get confusing - so I decided to move the argument list inside { ... }. And going through all the metacharacters Elvish already had, |
39.
▲
by
xiaq
2y ago
> I personally don’t find the TUI idea compelling. I’d rather use a general purpose language like Rust or Python. Many powerful and mature frameworks are already available to build TUIs there. You want to optimise the average one-off hac
40.
▲
by
xiaq
2y ago
Actually 1/2 is there because Elvish supports rational numbers, unfortunately there's no infix math. (Elvish supports arbitrary-precision integers and rationals.)
41.
▲
by
xiaq
2y ago
> Even to this day, years later, I have to look up bits and pieces here and again if I don't use some of the ${}-type substitutions frequently. In that case I think you should give Elvish a chance then :) Honestly one of the motivat
42.
▲
by
xiaq
2y ago
PowerShell is quite heavyweight. Aside from the feel of the language and the requirement of .Net runtime, it also makes PowerShell very slow to start up, which is a dealbreaker for interactive usage for me. Also when I started Elvish 10 yea
43.
▲
by
xiaq
2y ago
80% of the shell is just a normal interpreter. Crafting Interpreters ( http://craftinginterpreters.com ) is a pretty popular book for that. The remaining parts are stuff about process and file semantics - you can find that in APUE
44.
▲
by
xiaq
2y ago
I would invite you to read the explainer for this script: https://elv.sh/learn/scripting-case-studies.html#jpg-to-png.... Maybe you're not as traumatized by the thousand small cuts when writing traditional shell s
45.
▲
by
xiaq
2y ago
There are explainers linked from each of the examples - in this case https://elv.sh/learn/scripting-case-studies.html#update-serv... . Hopefully that clears up things for you!
46.
▲
by
xiaq
2y ago
There's indeed a feature request for it: https://github.com/elves/elvish/issues/322 I can't promise anything, but I'm undertaking a major refactoring of Elvish's TUI and that should make i
47.
▲
by
xiaq
2y ago
I believe shells have the potential to be much more than what they are today, and traditional shells are held back by their rather weak languages. Re the cost of switching: on the one hand, I'd say that "switching" is really
48.
▲
by
xiaq
2y ago
Hey, thanks for the compliment! Glad you've enjoyed Elvish. Re job control - you can run a background job with &, and there are fg and bg commands, but you can't actually ^Z a running program (which is what most people mean by
49.
▲
by
xiaq
2y ago
Author of Elvish here, glad to see it's on the homepage again :) AMA.
50.
▲
Beginner’s Guide to Elvish
(elv.sh)
4 points
by
xiaq
3y ago
|
0 comments
51.
▲
by
xiaq
3y ago
The approach taken by Igalia (a co-op) is quite interesting: https://wingolog.org/archives/2013/06/25/time-for-money . Basically they target equal pay but adjust it for cost of living, rather than cost of
52.
▲
by
xiaq
3y ago
A lot of custom keyboards have wheels (search "rotary encoder"), common enough for qmk to support them ( https://docs.qmk.fm/#/feature_encoders ).
53.
▲
by
xiaq
3y ago
The concern may be that there could be undiscovered vulnerabilities in the service and releasing the source before shutdown could make it easier for malicious actors to discover those vulnerabilities and compromise user data.
54.
▲
by
xiaq
3y ago
You can write A | B | C | result=$(cat) in shell. Edit: this only works if the shell runs the last command in the current environment (as opposed to a subshell), and only ksh and zsh seem to do that...
55.
▲
by
xiaq
3y ago
My understanding is that Google’s stock structure was set up specifically to allows Sergey and Larry to retain a majority in terms of voting rights when combined.
56.
▲
by
xiaq
3y ago
I don’t think it’s so complex. Without i := i, there’s only one i. With i := i, there’s one i per iteration. Closure captures are always by reference. Heap vs stack allocation don’t affect the language semantics.
57.
▲
by
xiaq
3y ago
It seems that the one-time reselling clause can be easily abused by the original IP holder to effectively extend their 20 years to 30 years and enable unlimited reselling? Just sell it to a company you control at the end of 20 years, and yo
58.
▲
by
xiaq
3y ago
Autosuggestion is one of those features that I never bothered to implement and have learned to live without. Maybe some day :) There's also Ctrl-R for searching through history, and unlike other shells it has a list UI (like fzf). If y
59.
▲
by
xiaq
3y ago
Also by "reader apps" I mean "reader apps with their walled gardens", like Kindle, as opposed to readers for local files. Boox's builtin reader is OK, but I've used other e-readers whose builtin reader was wors
60.
▲
by
xiaq
3y ago
Installing other reader apps is exactly the point of having Android, and there isn't really a way to implement "just enough Android" to be able to run other reader apps. You have to have the whole package of an Android OS. I
More ›