Our great sponsors
|16 days ago||6 days ago|
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
would you use rust for scripting?
6 projects | reddit.com/r/rust | 20 Mar 2023
find-invalid-utf8: walks a directory tree and prints invalid UTF-8 in files using nice hex escapes with coloring. This is useful for honing on in where invalid UTF-8 occur. You have a good bet of finding some by checking out any moderately sized repository of code. The Linux kernel used to have some. The Mozilla repo does. The CPython repo does too. This is why it's important for CLI tools to deal with invalid UTF-8 gracefully in some way.
What are some less popular but well-made crates you'd like others to know about?
12 projects | reddit.com/r/rust | 8 Jan 2023
Yeah it's great! I used it to implement a little utility to convert a subset of SMS/MMS messages from an XML backup to a more readable plain text version: https://github.com/BurntSushi/dotfiles/blob/0b075d79a6ff8812a1f48a37b9858938b3eadc58/bin/rust/searchsms/main.rs
Ask HN: Can I see your scripts?
73 projects | news.ycombinator.com | 15 Aug 2022
My dotfiles: https://github.com/BurntSushi/dotfiles
Here are some selected scripts folks might find interesting.
Here's my backup script that I use to encrypt my data at rest before shipping it off to s3. Runs every night and is idempotent. I use s3 lifecycle rules to keep data around for 6 months after it's deleted. That way, if my script goofs, I can recover: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
I have so many machines running Archlinux that I wrote my own little helper for installing Arch that configures the machine in the way I expect: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
A tiny little script to recover the git commit message you spent 10 minutes writing, but "lost" because something caused the actual commit to fail (like a gpg error): https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
A script that produces a GitHub permalink from just a file path and some optional file numbers. Pass --clip to put it on your clipboard: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae... --- I use it with this vimscript function to quickly generate permalinks from my editor: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
A wrapper around 'gh' (previously: 'hub') that lets you run 'hub-rollup pr-number' and it will automatically rebase that PR into your current branch. This is useful for creating one big "rollup" branch of a bunch of PRs. It is idempotent. https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
Scale a video without having to memorize ffmpeg's crazy CLI syntax: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
Under X11, copy something to your clipboard using the best tool available: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae...
Is it common for you guys to have an update break your system?
2 projects | reddit.com/r/archlinux | 11 Aug 2022
Otherwise, the most common "breakage" I get is when I forget to update in a while. Used to be a mostly non-issue until package signing became a thing. Now I get lots of signing errors when I update. When that happens, I run this script and it usually fixes things: https://github.com/BurntSushi/dotfiles/blob/2f58eedf3b7f7dae7f0a7cea1a641459e25e5d07/bin/pacman-fix-keys
Tauri reached 1.0
2 projects | reddit.com/r/rust | 16 Jun 2022
Sadly, at work, I can't use my own bespoke setup any more. I'm effectively forced to use GNOME, which has the same braindead support for multiple monitors that KDE has. These days, I just gave up on multiple monitors and work on my laptop in my sunroom at home. Back when I was in the office and using multiple monitors, it pretty much sucked, but I did write a little script that lets me at least move focus between monitors using my keyboard while respecting the window stacking order. I had intended to expand it with more stuff, but then COVID hit, my sunroom became my work environment and multiple monitors became a luxury I didn't care about any more. For work, anyway.
Fd: A simple, fast and user-friendly alternative to 'find'
18 projects | news.ycombinator.com | 20 May 2022
The zsh builtin with a custom TIMEFMT: https://github.com/BurntSushi/dotfiles/blob/965383e6eeb0bad4...
Git ignores .gitignore with .gitignore in .gitignore
4 projects | news.ycombinator.com | 18 May 2022
That's what I used to do, but I switched to Josh's strategy a couple years ago. It doesn't "blow up" git-status. If some new piece of software creates a new directory with a bunch of random stuff in it, git-status will just show you the directory since it is is untracked, and not everything in it.
archinstall is actually good
2 projects | reddit.com/r/archlinux | 2 Aug 2021
But I did that enough that I've scripted most of it: https://github.com/BurntSushi/dotfiles/blob/caed7921e48d112cc8932b33b81013fcbbcb2e08/bin/arch-install
What do you use for writing rust code?
15 projects | reddit.com/r/rust | 11 May 2021
For docs and license, see: https://github.com/BurntSushi/dotfiles/tree/master/.doc15 projects | reddit.com/r/rust | 11 May 2021
This is why I kept mine private for so many years too. A bit ago, I cleaned house and published them: https://github.com/BurntSushi/dotfiles
Topiary: A code formatting engine leveraging Tree-sitter
3 projects | reddit.com/r/rust | 10 Mar 2023
From the tree-sitter side, I am tracking https://github.com/tree-sitter/tree-sitter/issues/19423 projects | reddit.com/r/rust | 10 Mar 2023
We rely on the Rust bindings from the main tree-sitter repository on the C library. Loading and matching the queries on the source file is done by this library, and so out of scope for Topiary.
Shiki Syntax Highlighter
7 projects | news.ycombinator.com | 6 Mar 2023
Is tree-sitter really slower than TextMate grammars? Some benchmarks indicate that this isn't really the case . On the other hand, breaking parse trees is a real issue, because the error-recovery in tree-sitter is pretty rudimentary , but as you said, it's not an issue for Shiki.
Several TextMate grammars suffer from inaccuracy bugs, and issues of maintainability. Perhaps the biggest hindrance in the adoption of tree-sitter, is that the most popular editor, VSCode, still doesn't support it.
: https://github.com/tree-sitter/tree-sitter/issues/18707 projects | news.ycombinator.com | 6 Mar 2023
Tree-sitter is going to be a lot slower to load: https://github.com/tree-sitter/tree-sitter/issues/1942.
It's ok for things like editor but using it in a SSG for example is hard when just loading the syntaxes will take multiple times the time it takes to render the whole thing with a regex based highlighter.
It seems that some BIG improvements of Treesitter on BIG FILEs have been merged into Nightly! (minutes ago!)
3 projects | reddit.com/r/neovim | 24 Feb 2023
u/lewis6991 I think the biggest performance gain was made by tree-sitter itself: https://github.com/tree-sitter/tree-sitter/pull/2085
Looking for Tree-sitter query documentations and guides
2 projects | reddit.com/r/neovim | 17 Feb 2023
I asked on the repo's discussions but responses are limited and not explanatory (I'm not shaming anyone here, discussions aren't a place for detailed how-tos and documentations anyway).
Will Treesitter ever be stable on big files?
8 projects | reddit.com/r/neovim | 16 Feb 2023
The following discussion here. TS query cannot be incremental, that is why I regard it as design fault.
Detailed syntax highlighting
3 projects | reddit.com/r/neovim | 8 Feb 2023
Hi, so I've recently decided to give Neovim yet another try, this time using some predefined plugins with kickstart.nvim, for syntax it uses tree-sitter.
UnTeX - Parsing and formatting TeX documents with Rust - Looking for help
6 projects | reddit.com/r/rust | 27 Jan 2023
Another thing that comes to my mind is Tree-sitter. In my understanding it generates syntax trees that can not only be used for syntax highlighting but also for building advanced text manipulation in plug-ins. Maybe it can save you from implementing the parsing in the first place. There is already a Latex-Grammar and a rust create to use treesitter.
Emacs Is Not Enough
6 projects | news.ycombinator.com | 14 Jan 2023
What do you think about treesitter? https://github.com/tree-sitter/tree-sitter
The idea is to sync changes in the text to a tree structure, then have all the structure manipulation functions built on top of it. See the gif here for a visual representation: https://github.com/nvim-treesitter/playground
What are some alternatives?
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
Visual Studio Code - Visual Studio Code
doom-emacs - An Emacs framework for the stubborn martian hacker [Moved to: https://github.com/doomemacs/doomemacs]
indent-blankline.nvim - Indent guides for Neovim
coc-explorer - 📁 Explorer for coc.nvim
language-server-protocol - Defines a common protocol for language servers.
sourcegraph - Code Intelligence Platform
csharp-mode - A major-mode for editing C# in emacs
new-moon-vscode - New Moon Theme for Visual Studio Code.
nvim-tree.lua - A file explorer tree for neovim written in lua
Catppuccino.nvim - 🍨 Catppuccin theme for NeoVim [Moved to: https://github.com/catppuccin/nvim]
elisp-tree-sitter - Tree-sitter bindings for Emacs Lisp