Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chubot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
38 ms
·
451.
▲
by
chubot
3y ago
There are many answers, but one situation is 1. you already have a bash script (e.g. in your CI) 2. you want to use an array or dict Bash arrays and dicts have all sorts of warts. You have to remember to use "${array[@]}&
452.
▲
by
chubot
3y ago
Yeah the way I frame it is that Lisp is about "interior" composition (functions and data), not "exterior" (processes andf iles) Narrow Waists Can Be Interior or Exterior: PyObject vs. Unix Files https://www
453.
▲
by
chubot
3y ago
Cool! If you use and know bash, right now OSH with shopt -s strict:all will prevent almost all of the "silent footguns". On the other hand, YSH has strict:all and then a bunch of NEW features. There's been good fee
454.
▲
by
chubot
3y ago
Shells have some of the absolutely bonkersly dumb parsers and interpreters Oils fixes all this, it's a from-scratch reimplementation of shell with an upgrade path from OSH (compatible) to YSH (new). --- aliases that can override key
455.
▲
by
chubot
3y ago
Yup, I call that the Perlis-Thompson Principle -- because Ken Thompson made a similar combinatorial argument about software composition: you should design it around "one thing". https://www.oilshell.org/blog/2
456.
▲
by
chubot
3y ago
All the good programmers use plain shell -- DJB, Fabrice Bellard, Xavier Leroy for OCaml, etc. :) They don't copy and paste stuff they don't understand (The DJB scripts were almost certainly plain sh and not bash, since I think th
457.
▲
by
chubot
3y ago
If you redid all that work, and managed to avoid m4, it would still be a win! I believe m4 was used because some Unix shells at the time did not have functions. All shells have functions now -- it's in POSIX. If you have shell functio
458.
▲
by
chubot
3y ago
Anything that has to run on a BSD or a Mac needs these tools Do QEMU, tcc, and OCaml run on BSD and Mac? Pretty sure they do https://news.ycombinator.com/item?id=39925033 https://github.com/lucasaiu/
459.
▲
by
chubot
3y ago
A better solution is just to write a plain ass shell script that tests if various C snippets compile. https://github.com/oilshell/oil/blob/master/configure https://github.com/oilshell&#x
460.
▲
by
chubot
3y ago
I don't agree -- process isolation is a simple, effective, and traditional mechanism. It has downsides (e.g. parsing and serializing), but they don't apply here. Many mitigations work at the process level, like ASLR, cgroups, and
461.
▲
by
chubot
3y ago
and that's how dynamic linking works -- really ignorant comment Read the lobste.rs thread for some quotes on process separation and the Unix philosophy. There are mechanisms other than dynamic linking -- this is precisely the questi
462.
▲
by
chubot
3y ago
Yup, "trusted computing base" is classic concept that we've forgotten Or we pay lip service to, but don't use in practice
463.
▲
by
chubot
3y ago
Something to add to the timeline: when did this avenue of attack become available? It only happened in the last 10 years apparently. Why do sshd and xz-utils share an address space? When was the sshd -> systemd dependency introduced? Whe
464.
▲
by
chubot
3y ago
Yup, I like this point. Oils / YSH is kind of a mash-up between shell and Python: 1. shell-like commands - ls *.py 2. python-like expressions - 42 + a[i] + f(x, y) So it would be nice to highlight them differently to help people learn
465.
▲
by
chubot
3y ago
One example of a useful technique https://serenityos.org/ apparently only makes source code available. There are no binary images of the OS to install I think Andreas said this functions like a little test -- if you'r
466.
▲
by
chubot
3y ago
Regarding writing tools/tests/benchmarks in bash+Python, vs. writing tools in your main language: I think we might eventually concede that something Debian-like is the “standard development environment” (at least for server side s
467.
▲
by
chubot
3y ago
I'd say - open source works because there is a large amount of work that's done by people other than the main authors, or people outside the project. e.g. See all the documentation that's done around Linux or git. If you try
468.
▲
by
chubot
3y ago
I wonder if the diagrams were done in Figma? Diagrams are probably the #1 thing missing from most docs, and they are hard / time-consuming to make They do look very nice The author of esbuild was also the CTO/main author of Figma
469.
▲
by
chubot
3y ago
How do you prevent common Lisp idioms from being quadratic in that case? I noticed this about Norvig's toy Lispy: https://norvig.com/lispy.html It implements cdr as mylist[1:] So if you recurse on a list with cdr, then
470.
▲
by
chubot
3y ago
Yup, I swear by vi mode You can also use set -o vi in your bashrc to enable it. I've used it for probably ~18 years now. It also works with https://www.oilshell.org/ since we use GNU readline. Just 'set
471.
▲
by
chubot
3y ago
It is something on my mind too But to be honest my parents’ generation had the same issue. In the 80’s we had neighbors we knew. I was babysat by a neighbor In the 90’s, we moved, and didn’t know a single neighbor, and we lived there for
472.
▲
by
chubot
3y ago
An analogy I like is - Are Perl-style regexes (used in Python, Ruby, Java, .NET, etc.) syntactic sugar for regular languages? The answer is no, because Perl added all sorts of imperative doodads to regexes, which can’t be easily represent
473.
▲
by
chubot
3y ago
I think it simply boils down to the requirements of interactive editors vs. batch tools. I have no doubt that interactive editors like Atom/Zed can really make use of incremental parsing, and also lenient parsing. Syntax highlighting a
474.
▲
Pipes, Forks, & Dups: Understanding Command Execution and Input/Output Data Flow
(rozmichelle.com)
2 points
by
chubot
3y ago
|
0 comments
475.
▲
by
chubot
3y ago
BTW there is interesting feedback from 4 people on a Treesitter post yesterday: https://news.ycombinator.com/item?id=39762495 (1) The top comment is from the author of difftastic (the subject here), saying that treesitter
476.
▲
by
chubot
3y ago
I marvel more at say a cat than a spool of wire. They are physically skilled in ways that humans aren't! They don't have language, but they do know a lot about what's going on.
477.
▲
by
chubot
3y ago
The API design of STL is often over-constrained. That is, The style is very kitchen-sink and generalized, which means implementers have little flexibility. Every “real” C++ codebase I’ve worked on has its own data structures for most things
478.
▲
by
chubot
3y ago
Yup, that's the point this article makes: I’m so sorry for psychology’s loss, whatever it is - https://www.experimental-history.com/p/im-so-sorry-for-psych... This whole debacle matters a lot socially: careers
479.
▲
by
chubot
3y ago
OK thanks, I glossed over that part. But really what I look for is (1) explicit claims about durability, and (2) a third party (e.g. Aphyr) actually tested the claims. If there's no claim, then it's impossible to test :) In parti
480.
▲
by
chubot
3y ago
Thanks for the link. But I searched the docs for "durability" and got zero results. Before I use anything like this, I'd like to see what durability settings are used: https://www.postgresql.org/docs/cur
More ›