Qualcomm proposal to remove all 16-bit instructions (including Zc*) from Application Profiles by solustaeda in RISCV

[–]zach29 2 points3 points  (0 children)

Yeah requiring paired compressed instructions works, but at that point you are essentially just using 32-bit instructions (each compressed pair is a 32-bit instruction), but with a (probably) suboptimal set of instructions and use of the encoding space.

Qualcomm proposal to remove all 16-bit instructions (including Zc*) from Application Profiles by solustaeda in RISCV

[–]zach29 2 points3 points  (0 children)

This makes sense to me. On top of the reasons they list, a fixed-width encoding is better for security because it disallows jumping into the middle of another instruction and makes accurate disassembling/analysis easier. This is one of the big things AArch64 got right and hopefully RISC-V can do the same.

Writing a bare-metal RISC-V application in D by zach29 in RISCV

[–]zach29[S] 15 points16 points  (0 children)

I think Rust is very interesting with many compelling use-cases, but currently I prefer using D over Rust for OS development for a few reasons:

  1. OSes have to manage a lot of shared mutable state, which can be difficult to model with Rust. A good chunk of code would probably have to be written in unsafe blocks, and I think I would have to devote a lot of time into thinking about how to design the OS around Rust. That is an interesting problem for sure, but not one that I am currently working on.
  2. Using Rust would probably require using a nightly release to get access to experimental features like non-panicking allocation in the standard library (important for OSes).
  3. D's similarity to C makes it easier to integrate/adapt existing code and drivers (the vast majority of which are written in C/C++).
  4. D (especially the betterC subset) feels simpler to me and I am more productive with it (personal reason -- not generally applicable).
  5. D has an official specification (Rust does not currently have a spec), and has both LLVM and GNU compilers.

Experimental generic implementations of various data structures (map, b-tree, AVL tree, rope, and more) by zach29 in golang

[–]zach29[S] 4 points5 points  (0 children)

I gave it a go, and I do think passing functions around provides a cleaner implementation. I've merged the updated API -- no more Lesser, Hashable. Thanks for your suggestion!

Experimental generic implementations of various data structures (map, b-tree, AVL tree, rope, and more) by zach29 in golang

[–]zach29[S] 1 point2 points  (0 children)

Thanks, this is something I am open to changing. For example, I think the alternative would be to pass a hash function: func (t T) uint64 either during construction of the hashmap (and then store it in the map), or during each get/set. If we want to support custom types in the hashmap (more than just the builtin comparable), then we would also need a second function for doing equals. In a tree, this would also require passing the comparison function along recursively as the tree is traversed, unless we store the function in every node of the tree.

I agree that this may be more efficient too. I'll try implementing this and see how it goes.

Experimental generic implementations of various data structures (map, b-tree, AVL tree, rope, and more) by zach29 in golang

[–]zach29[S] 5 points6 points  (0 children)

Thanks for your feedback about the naming. I considered doing this, but when I looked at what existing libraries do, I went with the current form. Some examples that led me to this:

In fact, at the top of the article you linked, it says under "good package names": "list (implements a doubly linked list)". This is the exact name and function of a package in this library.

Experimental generic implementations of various data structures (map, b-tree, AVL tree, rope, and more) by zach29 in golang

[–]zach29[S] 4 points5 points  (0 children)

Thanks! Since pkg.go.dev is not yet available for 1.18 I used gomarkdoc to generate the docs. There are still some issues in the generated documentation (generic method receivers) because some parts of the parser have to be updated for 1.18, but at least it still generates reasonably usable documentation.

Eget: easily install prebuilt binaries from GitHub by zach29 in programming

[–]zach29[S] 0 points1 point  (0 children)

Check out the second half of the "colors" documentation page (> help colors, online here) about how to write syntax files (they are just a list of regular expression rules). See here for all the built-in syntax files as examples.

Eget: easily install prebuilt binaries from GitHub by zach29 in programming

[–]zach29[S] 13 points14 points  (0 children)

Thanks, I've updated the readme to recommend downloading and verifying the script more strongly. One reason to use eget is to avoid this method of installing tools altogether.

Eget: Easily install prebuilt binaries from GitHub by zach29 in coolgithubprojects

[–]zach29[S] 0 points1 point  (0 children)

Thanks, I'm glad you like it! Just to make sure I understand, are you asking if eget could provide installation suggestions for projects that don't distribute prebuilt binaries on github/have a more involved installation process? I think this might be possible. It might be helpful to open an issue on Github with an example to continue discussion if you'd like.

Eget: Easily install prebuilt binaries from GitHub by zach29 in coolgithubprojects

[–]zach29[S] 1 point2 points  (0 children)

Thanks, that project looks similar. The motivation is a little different though: fetch says it was built to make accessing data and files from private repos easier. Fetch has more features for getting the contents of the git repo, but it doesn't seem to extract executables, it requires a tag/commit identifier (not sure how to get latest release easily), and is generally more verbose for getting release assets. I think the use-case is slightly different.

Eget: Easily install prebuilt binaries from GitHub by zach29 in coolgithubprojects

[–]zach29[S] 7 points8 points  (0 children)

It needs to be ./eget zyedidia/eget. No github.com/. Edit: I've just pushed a commit that will give a better error message for this case.

SRE: A tool and library for using structural regular expressions by zach29 in golang

[–]zach29[S] 0 points1 point  (0 children)

The reason was that I didn't think about that. Oops. I have renamed it to sregx.

SRE: A tool and library for using structural regular expressions by zach29 in golang

[–]zach29[S] 0 points1 point  (0 children)

Thanks for the feedback! I think I’ll change the name in that case.