Rubish: A Unix shell written in pure Ruby
31–40 of 111 posts
Re: Rubish: A Unix shell written in pure Ruby
#32A random example:
https://github.com/amatsuda/rubish/blob/master/lib/rubish/pa...
Where are the interface boundaries? Why are there methods that are 200 lines long? This is not a dis at the author, and it's not really about "code quality" per se, whatever that means. It's just that if someone would like to study the code and be able to improve it or add features, how would one go about it? Does this mean you have to use a coding agent in order to contribute? I felt the same about the recent Ruby compiler from matz [1]. The code looks impenetrable. What does this bode for the future of OSS?
Re: Rubish: A Unix shell written in pure Ruby
#33People think Ruby is a slow language, but little do they know Ruby is a slower language than Go. But ruby these days is faster than Python.
The speed argument never convinced me in general, in that whether it is perl, ruby or python, they are all slower than C. So the comparisons really are odd to me. The "scripting" languages should of course not try to be slow, but people rarely use them for speed-reasons; they use these languages for gains in productivity and ease of writing code, adding features and so forth. That should be the primary focus point. I…
Re: Rubish: A Unix shell written in pure Ruby
#34Tangential: I would love to see more interpreted languages offer shells with native constructs for operating as daily drivers shells (not just REPLs). When I first started learning Ruby I used `rush`[0] as my main shell. Being immersed in the language, even if there were a few helpers for shell operations, really helped me reason better about Ruby and think in the language. `scsh`[1] was enlightening as well. Ultimat…
Think about what it would take to write this in Python right now:
for wmv_file in $(find $1 -name '*.wmv'); do
echo -n "${wmv_file} "
ffmpeg -i $wmv_file ${wmv_file%.wmv}.mpg 2>&1 | grep kb/s: || echo "ERROR $?"
done
With a few handy variables and functions predefined, this could be something like: for wmv_file in find(argv[1], glob="\*.wmv"):
print(wmv_file, end=" ")
result = do("ffmpeg", "-i", wmv_file, basename(wmv_file, ".wmv") + ".mpg")
if result: print(grep(str(result), "kb/s:"))
else: print("ERROR", result.status)Re: Rubish: A Unix shell written in pure Ruby
#35Tangential: I would love to see more interpreted languages offer shells with native constructs for operating as daily drivers shells (not just REPLs). When I first started learning Ruby I used `rush`[0] as my main shell. Being immersed in the language, even if there were a few helpers for shell operations, really helped me reason better about Ruby and think in the language. `scsh`[1] was enlightening as well. Ultimat…
Not sure if this is related, but i'd love to see more scripting languages (mostly Python) offer facilities which let them take over from shell script for more scripts and one-liners. Think about what it would take to write this in Python right now: for wmv_file in $(find $1 -name '*.wmv'); do echo -n "${wmv_file} " ffmpeg -i $wmv_file ${wmv_file%.wmv}.mpg 2>&1 | grep kb/s: || echo "ERROR $?" done With a few handy var…
Re: Rubish: A Unix shell written in pure Ruby
#36I'm recently seeing more and more Ruby projects that are at least partly vibe-coded, and I'm kind of torn. On the one hand I appreciate that this allows people to create stuff that they maybe wouldn't have the time to do otherwise. On the other, the code itself makes it harder for people to contribute, especially those, like me, who don't use coding agents. A random example: https://github.com/amatsuda/rubish/blob/ma…
I think this will improve, but I also think your comment is important for people using agents to read. Speaking for myself, I want people like you to be able to read/understand/contribute to my projects should you desire, so this is a great reminder for me.
Re: Rubish: A Unix shell written in pure Ruby
#37Hmm. The name is a bit awkward since people can call it "rubbish". The idea is also not quite new in that many years ago people worked on an ruby-like shell with OOP support from the get go and they used a ncurses drop down box too. I forgot the name, but it must have been before 2010 already, as I vaguely remember it from talking on IRC back in those days. I think the main developer was from South Africa, but I don'…
> Rails is also ancient already. I think Rails both boosted Ruby and killed it. When I ask people about why they dislike Ruby it's usually due to something specific to Rails (plus some comments around syntax which are easily dismissed or accepted). I used to be a pretty heavy Ruby user and I still love the language, though I have only used Rails sparsely and not by choice. I had the opportunity to work on a Ruby proj…
Re: Rubish: A Unix shell written in pure Ruby
#38I'm recently seeing more and more Ruby projects that are at least partly vibe-coded, and I'm kind of torn. On the one hand I appreciate that this allows people to create stuff that they maybe wouldn't have the time to do otherwise. On the other, the code itself makes it harder for people to contribute, especially those, like me, who don't use coding agents. A random example: https://github.com/amatsuda/rubish/blob/ma…
Re: Rubish: A Unix shell written in pure Ruby
#39Kudos though, and great work! I can tell you put a lot of thought and effort into it.
Re: Rubish: A Unix shell written in pure Ruby
#40I'm recently seeing more and more Ruby projects that are at least partly vibe-coded, and I'm kind of torn. On the one hand I appreciate that this allows people to create stuff that they maybe wouldn't have the time to do otherwise. On the other, the code itself makes it harder for people to contribute, especially those, like me, who don't use coding agents. A random example: https://github.com/amatsuda/rubish/blob/ma…
In my day - I think it was around 2000 – I was handed a 5000 line perl script that both responded to CGI bin requests to run a store and kicked off fulfillment of the orders. Inside that script, it had two 1500 line long subroutines that sometimes navigated internally via goto.
We refactored, and added new features while a profitable business ran on top of the code. You don’t get quite the velocity you do on good code, but it’s manageable.