brolib-sml
zed
brolib-sml | zed | |
---|---|---|
1 | 38 | |
0 | 35,981 | |
- | 10.1% | |
8.4 | 10.0 | |
19 days ago | 3 days ago | |
Standard ML | Rust | |
BSD Zero Clause License | GNU General Public License v3.0 or later |
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.
brolib-sml
-
Zed Decoded: Rope and SumTree
I have a simple (well, simple by my standards because I've spent a long time with it) implementation of a rope in Standard ML [0], OCaml [1] and F# [2]. (See tiny_rope.sml, brolib.fs or lib/tiny_rope.ml for implementation if you can read any of those languages; the F# implementation is probably easiest to read.)
[0] https://github.com/hummy123/brolib-sml
[1] https://github.com/hummy123/brolib
[2] https://github.com/hummy123/brolib-fs
The essence of a data structure is a binary tree where the internal nodes (the N2 case) contains a pointer to the left subtree, an integer containing the total length of the strings in the left subtree and a pointer to the right subtree. Then there are leaf nodes (the N0 case) which contain simply strings. (There are some other cases in the type like N1, N3 and L2, but those are solely for balancing because I built my ropes on top of 1-2 Brother Trees as described by Ralf Hinze, and those aren't essential to the rope data structure.)
When indexing (which is necessary for the insertion and deletion operations), you have a simple recursive algorithm which can be best seen in the recursive "ins" function. In the internal N2 nodes, the algorithm is to compare the index (given as an argument) with the left metadata. If the index argument is less than the left metadata, recurse to the left subtree passing the same index; otherwise, recurse to the right subtree, subtracting the index argument with the left metadata.
By the end, when you eventually reach the leaf case, the index argument is equal to the position you want to insert into in the current node. (I haven't tried to understand the maths behind this but it's how the data structure works.) At that point, all you do is insert into the leaf node's string (this is the same as inserting at an arbitrary index in any normal string) and unroll the recursion. Unrolling the recursion involves updating the left subtree metadata when you reach the parent, and it also involves balancing. (I'm using 1-2 Brother Trees for balancing but ropes don't really care which balancing you use or if you use one at all.)
That's pretty much all there is to ropes. The deletion and substring algorithms just require minor modifications (the user might specify a range that includes more than one subtree, so you might need to recurse on both subtrees).
zed
- Ask HN: What macOS apps/programs do you use daily and recommend?
-
Zed Editor - My honest opinion
Recently I tried using ZED the new code editor which claims to be fast by using less system resources. On my new company I was provided with a Macbook air, since it old and still uses intel processors it was kinda slow. But it was usable. As a long time VSCode user, as usual I installed vscode and used, since node js takes some memory, vscode was laggy with my project. So I switched to ZED.
-
Helix-gpui: helix gpui front end
I've heard that Zed's vim mode is very good, although I'm not a vim user so I can't confirm.
https://zed.dev
-
Zed Decoded: Linux When? ā Zed Blog
Seems like it's a choice of API surface (i.e. wgpu implements some things they don't need in a graphics API): https://github.com/zed-industries/zed/issues/7015#issuecomme.... I'm sure if you asked Kvark in the blade repo what the difference is with wgpu (he was/is a major contributor), he'd have an answer.
-
Exploring Zed, an open source code editor written in Rust
Zed is a new, open source, multiplayer code editor written in Rust. It was developed by the creators of Atom and Tree-sitter ā Nathan Sobo, Antonio Scandurra, and Max Brunsfeld. The team launched Zed in early 2023 and later open sourced it in 2024.
-
Zed Decoded: Rope and SumTree
There is an open issue about helix keybinds:
https://github.com/zed-industries/zed/issues/4642
- I can't stand using VSCode so I wrote my own (it wasn't easy)
-
What is your favorite IDE/text-editor?
Currently vim, but Iām very excited about Zed.
https://zed.dev/
-
Zed and AI will save us millions
The software engineering world has changed a lot, but it seems like both workers and companies haven't fully caught up yet. Recently, I've been having a lot of fun using Zed. It made programming enjoyable for me again, just like it was many years ago. Some people think Zed is just another unfinished editor, but that's not right. Zed is an AI tool. If you're not using Zed with GitHub Copilot and OpenAI GPT, you're not using it correctly, and you likely don't need Zed at all.
-
Zed Decoded: Async Rust
I don't mean to reply-guy this thread, but it builds on Windows (and Linux)
https://github.com/zed-industries/zed/blob/main/docs/src/dev...
What are some alternatives?
lapce - Lightning-fast and Powerful Code Editor written in Rust
helix - A post-modern modal text editor.
Monaco Editor - A browser based code editor
Visual Studio Code - Visual Studio Code
tree-sitter-solidity - Solidity grammar for tree sitter
zed-fonts - The Zed Mono and Sans typefaces, custom built from Iosevka
pulsar - A Community-led Hyper-Hackable Text Editor
plock - From anywhere you can type, query and stream the output of an LLM or any other script
Slim - Ruby Slim syntax for Sublime Text
sublime_text - Issue tracker for Sublime Text
live-share - Real-time collaborative development from the comfort of your favorite tools
dotfiles - Configs for apps I care about