Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
chubot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
181.
▲
by
chubot
1y ago
> `[` in one context is an index, in another it’s test. vim can match both, but it can’t decide which meaning is active unless the outer mode is remembered. and that’s the gap ysh.vim solves exactly that problem. The [ in command mode (t
182.
▲
by
chubot
1y ago
Yeah after writing this highlighter, I started noticing what I consider bugs in other highlighters e.g. although Vim's syntax highlighting helped me learn shell, it highlights numbers like 'echo 42' in a special way, which is
183.
▲
by
chubot
1y ago
Nested is also demonstrated by stage 2 fixing the "nested double quotes bug". Screenshots: https://github.com/oils-for-unix/oils.vim/blob/main/doc/stag... Stage 1 is non-recursive, but st
184.
▲
by
chubot
1y ago
no memory of nesting It absolutely nests! Vim's model has recursion, and it works perfectly. Some details here: https://github.com/oils-for-unix/oils.vim/blob/main/doc/stag... This highlig
185.
▲
by
chubot
1y ago
Oh cool, I'd be interested to read about the issues you had expressing Rust syntax in Vim! And yes, there are a whole bunch of limitations: - C function definitions - harder than JavaScript because there's no "function".
186.
▲
by
chubot
1y ago
(author here) I just noticed this link doesn’t work on my iPad because of the captcha – this is the same content: https://github.com/oils-for-unix/oils.vim/blob/main/doc/algo...
187.
▲
by
chubot
1y ago
Nice post -- so does Facebook no longer use jemalloc at all? Or is it maintenance mode? Or I wonder if they could simply use tcmalloc or another allocator these days? Facebook infrastructure engineering reduced investment in core technolo
188.
▲
by
chubot
1y ago
This feels like both a non-sequitur and troll If you want to make an "AI dev philosophy", sure go ahead But it has nothing to do with the Unix philosophy
189.
▲
by
chubot
1y ago
I think you missed the original point, which is that joining argv is equivalent to sh -c "$1 $2 $3 $4 ..." This is a form of shell injection, just like sh -c "ls $dir" because there's interpolation
190.
▲
by
chubot
1y ago
It’s a design mistake because it adds exactly zero functionality. The only thing it adds is insecurity. If the feature didn’t exist, then it wouldn’t need to be documented, and the world would be better.
191.
▲
by
chubot
1y ago
It's hidden in the sense that it creates ambiguity at the usage site. Compare with sudo: $ sudo ls 'file with spaces' ls: cannot access 'file with spaces': No such file or directory If ssh (and sh eval
192.
▲
by
chubot
1y ago
Ah yes, that's clever: $ sh -c "$(quote-argv -echo 'file with spaces')" sh: 0: Illegal option -h $ sh -c "$(quote-argv-left -echo 'file with spaces')" sh: 1: -echo: not found
193.
▲
by
chubot
1y ago
It also fixes the problem with eval that is shared with ssh: ysh-0.29$ eval ls $dir eval ls $dir ^~~~ [ interactive ]:11: 'eval' requires exactly 1 argument And it fixes word evaluation YSH Doesn't R
194.
▲
by
chubot
1y ago
YSH addresses the "string safety" problem: What is YSH? https://oils.pub/ysh.html I am writing a quoting module now, but the key point is that it's a powerful enough language to do so. It is more like Pyt
195.
▲
by
chubot
1y ago
The article mentioned printf '%q ', but it is a bit hard to find. Here is a handy way to remember it. First, define this function: quote-argv() { printf '%q ' "$@"; } # (uses subtle vectorization of
196.
▲
by
chubot
1y ago
There are some mini typed functional languages here - https://plzoo.andrej.com/ Although they are implemented in OCaml, which feels like more magic than say a Forth or Lisp written in C. In C you can still "see"
197.
▲
by
chubot
1y ago
That's kind of how I feel about C. C is fun, because you get to see "everything" But C is slow to create -- it is like using a toothpick Writing from scratch is slow, and using C libraries also sucks. Certainly libc sucks, e
198.
▲
Is the Transition to IPv6 Inevitable?
(ipv6.hanazo.no)
3 points
by
chubot
1y ago
|
1 comments
199.
▲
by
chubot
1y ago
OK, but then not for generating production code? I thought I read that somewhere, but now I can't find the claim
200.
▲
by
chubot
1y ago
One thing I wondered about the P language: It seems like in the early days, it was used at Microsoft to generate C code that’s actually used at runtime in the Windows USB stack? But now it is no longer used to generate production code? I as
201.
▲
by
chubot
1y ago
have nothing that anybody wants directly Yeah I definitely thought about that ... it is a bit crazy. Avoiding conflict is definitely a way of surviving The Amish are an interesting case study in avoiding conflict ... I buy produce at
202.
▲
by
chubot
1y ago
Yeah I think what I realized is that I learned history as a bunch of names, places, and dates But I am bad at remembering that kind of thing. There is infinite history of that sort On the other hand, now I feel like if I wanted to understa
203.
▲
by
chubot
1y ago
I like the production values, and the narrator is especially good at leaving spaces. When I watch other videos, it seems like they are trying to recite facts as fast as possible, and they don't take enough time to explain the terms &#
204.
▲
by
chubot
1y ago
A bit tangential, but I wonder if anyone else (in the US) discovered they had a big hole in their knowledge of the "old world" and its history? I feel like I understand these pictures a bit better after learning some history I dis
205.
▲
by
chubot
1y ago
Yeah I actually meant that the first extinction happened 10,000 years ago when humans first arrived on the continent! Humans arriving is what caused the biomass of animals to collapse And then Europeans arriving basically finished the job
206.
▲
by
chubot
1y ago
Yeah totally, I have read that the total biomass of cows and dogs dwarfs that of say lions or elephants Because humans like eating beef, and they like having emotional support from dogs That seems to be true: https://ourworldinda
207.
▲
by
chubot
1y ago
Yeah exactly ... I want Windows running in Linux, not the other way around, so I actually control the software and the updates! I actually just tried WINE for the FIRST time (surprisingly, I have been out of the Windows world for so long)
208.
▲
by
chubot
1y ago
Related: Black Swan Farming (2012) https://news.ycombinator.com/item?id=4497461 https://paulgraham.com/swan.html It is interesting that YC started as being more Founder friendly ... and I guess "Foun
209.
▲
by
chubot
1y ago
Spawning processes generally takes much less than 1 ms on Unix Spawning a PYTHON interpreter process might take 30 ms to 300 ms before you get to main(), depending on the number of imports It's 1 to 2 orders of magnitude difference, so
210.
▲
by
chubot
1y ago
That reminded me of Orkut, which was a social networking product, but created by Orkut Büyükkökten. So he just reused his personal domain name for the product! https://orkut.com/ https://en.wikipedia.org/wi
More ›