zeitwerk
murex
zeitwerk | murex | |
---|---|---|
9 | 56 | |
1,925 | 1,386 | |
- | - | |
7.4 | 9.6 | |
1 day ago | 7 days ago | |
Ruby | Go | |
MIT License | GNU General Public License v3.0 only |
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.
zeitwerk
-
Enhancing development with REPLs - A practical guide
To setup it's pretty simple, you just need to create a file inside bin/console and require all the files you want to use on a REPL, most of the times we use gems like zeitwerk to provide the auto requiring, but if you want to do it manually, refer to the example below:
-
Performance e elegância! Escrevendo uma CLI CRUD utilizando ScyllaDB e Ruby
zeitwerk
-
How to Load Code in Ruby
Zeitwerk takes a directory and makes every file underneath it available to load. The convention is that every new sub-directory is a new module, and every file defines a class with the same name as the file.
-
To Ruby from Python
There is a gem that does that used by Rails and multiple other gems:
https://github.com/fxn/zeitwerk
It is pretty easy to set it up in any Ruby project.
-
PHP – The Right Way
I actually prefer auto-loading, which lets you iterate through a package manager much easier/faster - PHP iterated through PSR-0[0] before landing on PSR-4[1], and you can always build your own (which is what most frameworks pre-composer were doing).
With Rails 7 and Zeitwerk, the Ruby community has landed on a very similar auto-loading system as PHP now[2] with constants translating to paths by convention.
[0]: https://github.com/php-fig/fig-standards/blob/master/accepte...
[1]: https://www.php-fig.org/psr/psr-4/
[2]: https://github.com/fxn/zeitwerk#the-idea-file-paths-match-co...
-
One Class/Module per File Rules - Working With Nested Modules
If you're working on non-Rails apps and need to deal with loading code, zeitwerk can be used anywhere, unlike the old Rails autoloader. It's also really easy to set up.
-
Move models, views and controllers to non-standard folders
https://github.com/fxn/zeitwerk#collapsing-directories
-
Code Loaders in Ruby: Understanding Zeitwerk
Zeitwerk
-
Ruby on Rails + Auth0: Authenticating your API with an external authentication service
With a few modifications in the gem source code, we could easily integrate Auth0 into our Rails API, but that on Rails 5. Rails 6 brought Zeitwerk code loader together, which makes it harder to perform the alterations suggested in my previous post.
murex
-
Show HN: a Rust Based CLI tool 'imgcatr' for displaying images
This is how murex works too https://github.com/lmorg/murex/blob/master/config/defaults/p...
- Xonsh: Python-powered, cross-platform, Unix-gazing shell
-
The Bun Shell
I agree. I’ve written about this before but this is what murex (1) does. It reimplements some of coreutils where there are benefits in doing so (eg sed, grep etc -like parsing of lists that are in formats other than flat lines of text. Such as JSON arrays)
Mutex does this by having these utilities named slightly different to their POSIX counterparts. So you can use all of the existing CLI tools completely but additionally have a bunch of new stuff too.
Far too many alt shells these days try to replace coreutils and that just creates friction in my opinion.
1. https://murex.rocks
-
Jaq – A jq clone focused on correctness, speed, and simplicity
This is exactly what Murex shell does. It has lots of builtin tools for querying structured data (of varying formats) but also supports POSIX pipes for using existing tools like `jq` et al seamlessly too.
https://murex.rocks
- Murex rocks v5 is out
-
The Case for Nushell
Stable is a problem because a lot of these shells don’t offer any guarantees for breaking changes.
My own shell, https://github.com/lmorg/murex is committed to backwards compatibility but even here, there are occasional changes made that might break backwards compatibility. Though I do push back on such changes as much as possible, to the extent that most of my scripts from 5 years ago still run unmodified.
- Murex
- FLaNK Stack Weekly for 20 June 2023
- Show HN: A smarter Unix shell and scripting environment
-
Nushell.sh ls – where size > 10mb – –sort-by modified
This is similar to how my shell works. It still just passes bytes around but additionally passes information about how those bytes could be interpreted. A schema if you will. So it works as cleanly with POSIX / GNU / et al tools as it does with fancy JSON, YAML, CSV and other document formats.
It basically sits somewhere between Powershell and Bash: typed pipelines like Powershell but without sacrificing familiarity with all the CLI commands you already use day in and day out.
https://github.com/lmorg/murex
As an aside, I’m about to drop a massive update in the next few days that will make the shell even more intuitive to use.
What are some alternatives?
jets - Ruby on Jets [Moved to: https://github.com/rubyonjets/jets]
elvish - Powerful scripting language & Versatile interactive shell
JWT - A ruby implementation of the RFC 7519 OAuth JSON Web Token (JWT) standard.
nushell - A new type of shell
Karafka - Ruby and Rails efficient multithreaded Kafka processing framework
tidy-viewer - 📺(tv) Tidy Viewer is a cross-platform CLI csv pretty printer that uses column styling to maximize viewer enjoyment.
unholy - a ruby-to-pyc compiler
fx - Terminal JSON viewer & processor
dry-system - Application framework with state management and built-in dependency injection support
jc - CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
unholy - a ruby-to-pyc compiler - _why mirror
xonsh - :shell: Python-powered, cross-platform, Unix-gazing shell.