Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mazieres
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
1.
▲
by
mazieres
6mo ago
An AI agent that works 99.9% of the time is a lot more dangerous than one that works 90% of the time, because the former leads to expectations of 100% safe behavior. I've never been saved from harm by a car seatbelt. Should I extrapo
2.
▲
by
mazieres
6mo ago
Please use a dev container! Empirically, a lot of people don't, and some people regularly enable YOLO mode on their actual laptops. So if you've never run a code assistant outside of a dev container, that's fantastic and I
3.
▲
by
mazieres
6mo ago
jai uses persistent file systems for your changes (except for `/tmp`, `/var/tmp` and `/run/user`, which usually aren't persistent anyway). The data is stored under `$HOME/.jai` by default. But you can al
4.
▲
by
mazieres
6mo ago
But there is an old-school README.me at the github homepage: https://github.com/stanford-scs/jai The repository has an old-school ASCII INSTALL file. If you don't like the vitepress site, just use github and read
5.
▲
by
mazieres
6mo ago
Yes, unpacking a tar file is much safer than piping arbitrary code to bash! You can look at the PKGFILE in the directory--it is only 30 lines long and mostly variable assignments. The build/check/package functions are 7 lines of
6.
▲
by
mazieres
6mo ago
You can do that, but you need root to set it up each time, and it's not super convenient--you need to decide in advance which user account you are going to work under, and you may end up with files you can read from your regular accoun
7.
▲
by
mazieres
6mo ago
Yes, people very much are, and that's exactly the problem! People run `claude --dangerously-skip-permissions` and `codex --yolo` all the time. And I think one of the appeals of opencode (besides cross-model, which is huge) is that th
8.
▲
by
mazieres
6mo ago
Also, a lot of people use multiple harnesses. I'm often switching between claude, codex, and opencode. It's kind of nice to have the sandbox policy independent of the actual AI assistant you are running.
9.
▲
by
mazieres
6mo ago
What distro are you using? The only two dependencies are libacl and libmount. I'm trying to figure out which distros don't include these by default, and if the libraries are really missing, or if it's just the pkgconf "
10.
▲
by
mazieres
6mo ago
Human author here. The fact that I don't know web design shouldn't detract from my expertise in operating systems. I wrote the software and the man page, and those are what really matter for security. The web site is... let'
11.
▲
by
mazieres
6mo ago
I've seen claude get confused about what directory it's in. And of course I've seen claude run rm -rf *. Fortunately not both at the same time for me, but not hard to imagine. The claude sandbox is a good idea, but to be e
12.
▲
by
mazieres
6mo ago
The problem is that in practice, many people don't take the flamethrower to the shed. I recently had a conversation with someone who was arguing that you don't really need jai because docker works so well. But then it turned out
13.
▲
by
mazieres
6mo ago
It's a good point. Maybe I should add an option to make certain directories read-only even under the current working directory, so that you can make .git/ read-only without moving it out of the project directory. You can already
14.
▲
Go hard on agents, not on your filesystem
(jai.scs.stanford.edu)
635 points
by
mazieres
6mo ago
|
329 comments
15.
▲
by
mazieres
6mo ago
What would it take for people to stop recklessly running unconstrained AI agents on machines they actually care about? A Stanford researcher thinks the answer is a new lightweight Linux container system that you don't have to configure
16.
▲
by
mazieres
3y ago
Your constexpr function is not legal because it doesn't initialize all the array elements, even though the compiler might let you get away with it. That's easily fixed. More importantly, though, your static_value::value is not a
17.
▲
by
mazieres
3y ago
Actually not. Try to implement a compile-time initialized const char* that represents some compile-time value like sizeof(X) for some data structure X. You'll see that you need recursion. A place where this kind of pattern is useful
18.
▲
by
mazieres
3y ago
What is your non-template function in this example?
19.
▲
by
mazieres
3y ago
Obviously there's a whole section on comma folds that you didn't read. However, more importantly, there are things that you can't do without recursion. For example, how would you implement the `index_string` function in the
20.
▲
by
mazieres
6y ago
Wow, that talk is a fantastic link. He actually gets negative overhead from using coroutines, because the compiler has more freedom to optimize when humans don't prematurely break the logic into multiple functions.
21.
▲
by
mazieres
6y ago
Oh, that must be a typo in the document, sorry. I just fixed it. The actual corodemo.cc file was correct, though: http://www.scs.stanford.edu/~dm/blog/corodemo.cc Also, here's a more authoritative source th
22.
▲
by
mazieres
6y ago
> Stackless means when you resume a coroutine you're still using the same OS thread stack This is confusing, because it begs the question "same as what?" In fact, you can migrate a coroutine across threads, or even create
23.
▲
by
mazieres
6y ago
Agreed. I think the killer use is for event-driven programs that already do a lot of "stack ripping". If you are already manually putting all your "local" variables into an object and slicing your functions into many m
24.
▲
by
mazieres
6y ago
You are right that you are effectively stuck in a single coroutine (non-stack) frame. But you can chain multiple such coroutine frames, because one coroutine can co_await another.
25.
▲
by
mazieres
6y ago
Umm... if you download the code you will see that main returns int, but the main1...main6 functions invoked by main return void because they don't need to return a value.
26.
▲
by
mazieres
6y ago
I really liked Josuttis's book on C++17 ( https://www.cppstd17.com/ ). The only C++20 book I know of is the Grimm book linked in the referenced blog post ( https://leanpub.com/c20 ). I'm glad I read
27.
▲
by
mazieres
7y ago
> I'd love for you to expand more on this. What I can't think of is a realistic scenario where it's possible to validate the session id in a secure way, but there is also some reason that we couldn't just use TLS with
28.
▲
by
mazieres
7y ago
Some historical context here. First, the project was begun over 10 years ago, long before QUIC, before widespread use of https for most web pages, and before widespread use of ECC certificates. (E.g., americanexpress.com was an http web p
29.
▲
by
mazieres
8y ago
The thing is that reputation isn't formed in a vacuum. E.g., in the case of Stellar's blockchain, you have companies issuing assets like digital dollars or carbon credits or shares in commercial real estate ventures. The tokens
30.
▲
by
mazieres
8y ago
The Sybil attack doesn't work against SCP because, unlike proof-of-stake, the validators are not anonymous. E.g., are you using Stronghold dollars? Then put their validators in all of your quorum slices and you will be guaranteed not
More ›