Readit News logoReadit News
ievans commented on Reflections on OpenAI   calv.info/openai-reflecti... · Posted by u/calvinfo
maest · a month ago
Similar to Pascal's wager, which pretty much amounts to "yeah, God is probably not real, _but what if it is_? The utility of getting into heaven is infinite (and hell is infinitely negative), so any non-zero probability that God is real should make you be religious, just in case."

https://en.wikipedia.org/wiki/Pascal%27s_wager#Analysis_with...

ievans · a month ago
This is explicitly not the conclusion Pascal drew with the wager, as described in the next section of the Wikipedia article: "Pascal's intent was not to provide an argument to convince atheists to believe, but (a) to show the fallacy of attempting to use logical reasoning to prove or disprove God..."
ievans commented on Archival Storage   blog.dshr.org/2025/03/arc... · Posted by u/rbanffy
nntwozz · 5 months ago
I basically use the 3-2-1 backup strategy.

The 3-2-1 data protection strategy recommends having three copies of your data, stored on two different types of media, with one copy kept off-site.

I keep critical data mirrored on SSDs because I don't trust spinning rust, then I have multiple Blu-ray copies of the most static data (pics/video). Everything is spread across multiple locations at family members.

The reason for Blu-ray is to protect against geomagnetic storms like the Carrington Event in 1859.

[Addendum]

On 23 July 2012, a "Carrington-class" solar superstorm (solar flare, CME, solar electromagnetic pulse) was observed, but its trajectory narrowly missed Earth.

ievans · 5 months ago
Do you store your SSDs powered? They can lose information if they're not semi-frequently powered on.
ievans commented on Show HN: Globstar – Open-source static analysis toolkit    · Posted by u/sanketsaurav
xxpor · 6 months ago
Another rule engine checker that doesn't support the language that needs this type of thing the most: C

In this case, it's inexplicable to me since tree-sitter supports C fine.

ievans · 6 months ago
For C, you might be interested in https://github.com/weggli-rs/weggli or https://github.com/semgrep/semgrep (I work on the latter). Both are also tree-sitter based.
ievans commented on CLI tool to insert spacers when command output stops   github.com/samwho/spacer... · Posted by u/freetonik
grandchild · 8 months ago
There is also `ts` from moreutils[0]. One of a few gems there. And moreutils is (probably) already in "your" distro.

[0] https://joeyh.name/code/moreutils/

ievans · 8 months ago
Looks like the `ets` readme has a direct comparison:

> The purpose of ets is similar to that of moreutils ts(1), but ets differentiates itself from similar offerings by running commands directly within ptys, hence solving thorny issues like pipe buffering and commands disabling color and interactive features when detecting a pipe as output. (ets does provide a reading-from-stdin mode if you insist.) ets also recognizes carriage return as a line seperator, so it doesn't choke if your command prints a progress bar. A more detailed comparison of ets and ts can be found below.

ievans commented on Refactoring Python with Tree-sitter and Jedi   jackevans.bearblog.dev/re... · Posted by u/todsacerdoti
ievans · a year ago
I wrote up a Semgrep rule as a comparison to add! (also tree-sitter based, `pip install Semgrep`, https://github.com/semgrep/semgrep, or play with live editor link: https://semgrep.dev/playground/s/nJ4rY)

    pattern: |-
       def $FUNC(..., database, ...):
           $...BODY
    fix: |-
      def $FUNC(..., db, ...):
          $...BODY

ievans commented on Eliminating Memory Safety Vulnerabilities at the Source   security.googleblog.com/2... · Posted by u/coffeeaddict1
ievans · a year ago
So the argument is because the vulnerability lifetime is exponentially distributed, focusing on secure defaults like memory safety in new code is disproportionately valuable, both theoretically and now evidentially seen over six years on the Android codebase.

Amazing, I've never seen this argument used to support shift/left secure guardrails but it's great. Especially for those with larger, legacy codebases who might otherwise say "why bother, we're never going to benefit from memory-safety on our 100M lines of C++."

I think it also implies any lightweight vulnerability detection has disproportionate benefit -- even if it was to only look at new code & dependencies vs the backlog.

ievans commented on Difftastic, a structural diff tool that understands syntax   difftastic.wilfred.me.uk/... · Posted by u/frankjr
kstrauser · a year ago
For those who don't already know, this is built on tree-sitter (https://tree-sitter.github.io/tree-sitter/) which does for parsing what LSP does for analysis. That is, it provides a standard interface for turning code into an AST and then making that AST available to clients like editors and diff tools. Instead of a neat tool like this having to support dozens of languages, it can just support tree-sitter and automatically work with anything that tree-sitter supports. And if you're developing a new language, you can create a tree-sitter parser for it, and now every tool that speaks tree-sitter knows how to support your language.

Those 2 massive innovations are leading to an explosion of tooling improvements like this. Now every editor, diff tool, or whatever can support dozens or hundreds of languages without having to duplicate all the work of every other similar tool. That's freaking amazing.

ievans · a year ago
Absolutely agreed, and copying from a comment I wrote last year: I think the fact that tree-sitter is dependency-free is worth highlighting. For context, some of my teammates maintain the OCaml tree-sitter bindings and often contribute to grammars as part of our work on Semgrep (Semgrep uses tree-sitter for searching code and parsing queries that are code snippets themselves into AST matchers).

Often when writing a linter, you need to bring along the runtime of the language you're targeting. E.g., in python if you're writing a parser using the builtin `ast` module, you need to match the language version & features. So you can't parse Python 3 code with Pylint running on Python 2.7, for instance. This ends up being more obnoxious than you'd think at first, especially if you're targeting multiple languages.

Before tree-sitter, using a language's built-in AST tooling was often the best approach because it is guaranteed to keep up with the latest syntax. IMO the genius of tree-sitter is that it's made it way easier than with traditional grammars to keep the language parsers updated. Highly recommend Max Brunsfield's strange loop talk if you want to learn more about the design choices behind tree-sitter: https://www.youtube.com/watch?v=Jes3bD6P0To

And this has resulted in a bunch of new tools built off on tree-sitter, off the top of my head in addition to difftastic: neovim, Zed, Semgrep, and Github code search!

u/ievans

KarmaCake day702August 3, 2012
About
co-founder at https://semgrep.dev make it expensive to exploit software

Contact me at isaac at that domain ^

[ my public key: https://keybase.io/ine; my proof: https://keybase.io/ine/sigs/lLgIx6kHhFdId2nkYud-g18G-usi9L4GzJVXQMjK6qM ]

View Original