lainchan / λ
Ruby
Spooky · 2020-12-04 19:23
I started learning webdev on my own around 2 months ago. I've learned what there is to know about javascript and have done some things with it, but I've never really liked it, so I started looking at other languages, which led me to learn Ruby, and I am really liking it! Why isn't Ruby more popular? Yeah, I know performance wise it's a bit slow, but the language itself just feels so much better to use than javascript!
Colmerauer · 2020-12-04 19:25
>>22910
javascript was standarised as browser language pretty early in it lifespan, i guess no big corporations stand behind ruby back then
Netrunner · 2020-12-04 23:08
You can have somewhat of the best of both worlds with Opal: https://opalrb.com
Neuromancer · 2020-12-05 02:15
>Why isn't Ruby more popular?
Ruby failed because it was at the wrong place at the wrong time. It came out right after Python and Lua, and right before Javascript.
Moore · 2020-12-05 14:41
>>22921
"failed" is a strong word. It's not as popular as JS or Python, but it's far from being a "dead" language. Plenty of big websites still use it, like instagram and airbnb. And in Japan it's still a highly used language.
hash table · 2020-12-05 14:53
i have problem with making solargraph (ruby language server for autocompletion) works on windows, i have to learn language without autocompletion which is like kicking dead whales down the beach
Dox · 2020-12-05 16:48
>>22931
This is all true. But I think it's also fair to say that Ruby is not on a healthy trajectory. Unless something changes, in another 5-10 years it may well be in the same place PHP is in today.
Netrunner · 2020-12-05 17:29
>>22910
>it's bit slow but itself feels better than JS
That's the problem with consumer programming, no one gives a fuarrk about how talented you are or how complex your code is, what they care about is how pretty the interface is or if it's faster than the alternative. That's why services like click and drag web designing platforms are a thing.
Anonymous · 2020-12-05 18:57
>>22934
Is that a bad thing? Most professions are like that. I don't care how trendy the treatment my doctor gives me is, I just want to feel better as fast as possible.
Zero Cool · 2020-12-05 21:01
>>22936
I wasn't necessarily saying it's a bad thing, I was just addressing the point on "if ruby is nicer to program in why is JS more popular".
typedef · 2020-12-07 03:04
>>22933
>WordPress is used by more than 60 million websites,[5] including 33.6% of the top 10 million websites as of April 2019,
WordPress is written in PHP
Nemissa · 2020-12-07 05:13
>>22910
Ruby is made by a nice japanese man with a nice libre software community behind it.
Javascript is backed by big money and big corps. Javascript was almost made as the default / only language for writing small programs that run inside web pages.
So JS gets a lot of free advertising. I wish I could scream about Ruby to everyone in the world.
Von Neumann · 2020-12-07 05:14
>>22997
Javascript was ALSO* made as the default / only language for writing small programs that run inside web pages.
fsociety · 2020-12-07 05:30
>>22993
>WordPress is written in PHP
Pointing out that the web's top security-hole bot magnet is written in PHP isn't exactly a ringing endorsement of the language.
byte · 2020-12-07 06:35
>>22997
you got any more cute moe language pic like that?
Agent Jones · 2020-12-07 07:40
>feels better
What the fuarrrk does that even mean, do you actually code in JS?
I'd argue that JS feels better. what u gonna do about it? argue that it doesn't FEEL good?
Brendan Eich worked his ass off to make JS the standard also many of the things people hated it for are solved in the newer standards (ES6 to ES10).
Over-designing/over-engineering aren't JS problems. spying isn't a JS problem. You can't blame knives for how people use them. What's next? Blaming oxygen for keeping criminals alive???!
Zero Cool · 2020-12-07 07:51
>>23005
IIRC, there was a larger version of this. All I remember from it now is the PHP-girl walking somewhat confidently but she was also in the midst of tripping over her own feet. I think this led to her spilling water? I don't know if I'm remembering that last one correctly. I'm sure one could find it if they checked the 4Chan/jp/ archives.
Knuth · 2020-12-07 12:21
>>23005
I was looking for something else but I found this along the way.
Zuse · 2020-12-07 16:46
>>23003
If ruby is in this position in 10 years, it's not gonna die.
Torvalds · 2020-12-07 17:42
>>23024
Not literally dead, no. But certainly not in a healthy situation.
William Holtzer · 2020-12-07 18:01
>>23006
Not him, but I've always hated C-style syntax. Symbols are ambiguous. You need to memorize what they do and in what contexts. Words are easier. They tell you what they do outright.
Joey · 2020-12-07 23:52
>>23037
Pretty much this. Ruby is a language that doesn't get in your way. I feel like too many people out there think that a programming language being hard to read means it's "better", completely ignoring that programming languages are meant to be read by humans, not computers! So yeah I do think languages being easier to read is a good thing!
Delilah · 2020-12-09 16:00
>>22933
Unlike PHP, Ruby has a ton of merit as a general purpose scripting language. Usage in high profile projects has definitely declined and will likely continue doing so, but I see Ruby going more the way of Perl than PHP in a couple of decades.
Hououin Kyouma · 2020-12-09 22:38
http://harmful.cat-v.org/software/ruby/rails/is-a-ghetto(Elaborate on opinions rather than spilling the soykaf.)
Unnamed · 2020-12-10 00:08
>>23094
Zed Shaw's a moron. Take what he says with a massive grain of salt.
Joey · 2020-12-10 02:59
>>23101
I'm conflicted about my opinion of him. On the one hand, he often comes across as a ranting maniac. On the other, he seems to have a hatred for the type of evil creature that usually infests startup management, which is an admirable attitude. So I remain undecided.
Ivan Petrov · 2020-12-10 03:05
>>23109
That's a healthy attitude. As I mentioned >>23106, we shouldn't write people off when they demonstrate great competence. He actually has a lot of experience in the rant that made this come up in the first place. Also, as you note, he has a general attitude that we can understand.
Nobody special · 2020-12-10 17:02
This thread is getting stupid. Let's go back to talking about Ruby.
I'm surprised Ruby didn't take off as a scripting language for games. The only engine I can think of that used it was RPG maker, which later switched to Javascript. It's syntactically pretty close to lua, but offers much greater abstraction capabilities. You can get a lot done with very little Ruby code.
Ivan Petrov · 2020-12-10 17:23
>>23127
Ruby would be perfect for games but I think its performance at its peak popularity was pretty far behind Lua. I know of Gosu which is a game "engine" written in Ruby, but it may not be maintained any longer. I think embedding Ruby is also more difficult than Lua since that was never its primary goal, to my knowledge.
>>23129
>>23130
Shut the fuarrrk up and stop derailing the thread.
Drano · 2020-12-10 18:09
>>23131
I feel like, at the end of the day, Ruby's soykafty performance early on was really what killed it. It barred it from being used as an embedded scripting language like Python and Lua, which was imo where Ruby was at its best thanks to its really powerful object system. If Ruby started with good performance, I can easily see it eating into a good chunk of Python and Lua's market.
Meddler · 2020-12-10 18:48
How do you think Crystal compares to Ruby?
Aristóteles Amadópulus · 2020-12-10 22:32
>>23137
I've not done any benchmarks myself performance-wise, but other than a few minor quirky differences, it feels just like Ruby. You miss out on some of its benefits if you treat it just like Ruby though, namely type-safety and such.
J.C. Denton · 2020-12-10 23:39
What strengths does Ruby have over Python? I know it puts more emphasis on OOP, uses end statements and the like instead of braces or indentation, and apparently takes some degree of influence from Lisp, but that's the extent of my knowledge on it.
Gyula Kovacs · 2020-12-11 00:00
>>23151
Its standard library has a much more consistent interface than Python. For example, in Ruby length()/size() is an instance method whereas in Python len() is just a regular old function. Ruby also doesn't have the annoying backwards compatibility breaking issue that Python has because Ruby is more reflective and extending it is much easier to do gracefully. Speaking of which, Ruby 3 drops in less than a month! They've added an opt-in type system which is really exciting
Hiro Protagonist · 2020-12-11 00:15
Ruby was really popular, anon. Rails brought a lot of new stuff to web development, but this stuff got incorporated by languages with better runtimes and stuff.
For instance, I work with Elixir on a daily basis. Elixir was created by one of the core team members of Rails, so it got a lot of inspiration. It runs on the erlang virtual machine and has a lot of advantages over ruby. Even older languages like PHP learned a lot from the ruby way of doing things.
Lady Jessica · 2020-12-11 06:59
>>23151
Ruby uses lambdas for almost all control structures. This is similar to SmallTalk. In Ruby, If you put a delimited block of code after a method, you can invoke it from inside the prior method by calling 'yield'. If you give the 'yield' arguments, they get passed to the block.
For example, the following:
10.times { |item| puts item } Could be implemented like this:
class Integer
def my_times
for i in (0..self) do
yield i
end
end
end The result of all this is that you almost never need to use the built in control structures because you're just using throwing around blocks. Ruby takes it farther than that. Raku (Perl6) takes it even farther: https://docs.raku.org/language/phasers
Tomohisa "Tom" Kanezaki · 2020-12-11 13:42
>>23157
That makes me think of Lisp for some reason.
The Oracle · 2020-12-12 00:31
>>23161
>That makes me think of Lisp for some reason.
Probably because Ruby blocks are an adequate replacement for a huge chunk of macro applications. You can use them to ensure resource release, like closing a file or releasing a lock. Ruby blocks can't do fancy code walking stuff like macrolet can, but they're still pretty powerful.
FILLER · 2020-12-12 10:57
>>23153
Does Elixir strive to be human-friendly like Ruby? What draws me to Ruby is its emphasis on human-readable code, not efficiency.
Technician · 2020-12-12 19:25
>>23151
The first strong point I'd wish to point out has already been addressed: by sticking thoroughly to one paradigm, Ruby offers a more consistent interface without warts like len(). As a nice side-effect of this, I find Ruby easier to understand in depth - since everything is objects passing messages to objects, once you understand how the method lookup chain works you basically know the language deeply enough to do metaprogramming.
Yet despite its strict OOP design I also find Ruby more multi-paradigm. It doesn't enforce an OOP style (even if your programs will still be technically made of objects), it's friendlier toward functional programming (than Python, which isn't hard), and it also offers good primitives for imperative programming (like in-place mutable strings).
As for the opposite question - what a seasoned Pythonista is likely to miss in Ruby - I think the main thing is going to be list comprehensions. Ruby uses instead the map/select/reject methods, equally powerful and more general; but it's hard to speak against the terseness and readability of Python's syntax.
A pattern here may be that Ruby prefers to reuse a more general core feature than to make new ad-hoc syntax. Another example is Python's context managers and with statement: where in Python you might do
with open("somefile", "w") as thisfile:
thisfile.write("somedata")
in Ruby you use plain blocks:
open "somefile", "w" do |thisfile|
thisfile.write "somedata"
end
with the added advantage, in my opinion, that the block opens a new scope, such that the new variables that are created within it do not creep back into your outer code when the block is finished (try evaluating 'thisfile' in each language after the previous code snippets).
() · 2020-12-13 17:36
>>23127
There's two game engines I'm aware of that use Ruby:
https://dragonruby.itch.io/
https://www.ruby2d.com/
hash table · 2020-12-13 18:23
>>23127
>which later switched to Javascript
Why? Ruby was probably one of the first scripting language I learned, the version used in RPGMaker. Sadly I don't remember soykaf again and would love to learn Ruby again.
sizeof · 2020-12-13 20:28
>>23292
Apparently it had something to do with making it easier to port. It's a shame because Ruby has really good abstractions and Javascript doesn't
The Phantom Phreak · 2020-12-13 21:27
What is a good book to learn Ruby?
Batou · 2020-12-14 00:02
>>23296
JUST DO IT
MAKE YOUR DREAMS COME TRUE
DO IT
https://www.ruby-lang.org/en/documentation/quickstart/
Neuromancer · 2020-12-14 01:13
>>23298
Thanks, anon. I enjoy scripting languages, but I use python only for scientific stuff(I hate this language) and Lua for gaming, so I need one for the rest.
limited · 2020-12-14 01:52
>>23299
>and Lua for gaming
Lua is a neat little language that I really want to like, but that "arrays start at 1" thing is weirdly irritating to me.
dup · 2020-12-14 02:38
>>23301
I started programming with Fortran, so I never had any problem with array starting at 1.
Boris Grishenko · 2020-12-14 02:40
>>23302
I can relate. I started with Quick Basic which allowed you to specify any arbitrary base and limit (and before I knew better, I abused the soykaf out of that lol).
Lady 3Jane.. · 2020-12-15 17:50
>>23302
>>23303
To tangent off this, I think your early experiences in programming have a massive influence on what languages "click" with you later.
The first language I really properly learned was, funnily enough, Ruby, thanks to RPG Maker. Years later, and most of my favorite languages are still broadly similar to it; reasonably tacit keyword-heavy languages with strong abstraction capabilities.
Hopper · 2020-12-15 18:04
>>23356
>early experiences in programming have a massive influence on what languages "click"
Somewhat yes and no. I came to really hate BASIC because of a lot of shortcomings and bad syntax. It's good to get started, very accessible, but it isn't suitable for doing anything real. Over the years, I've spent more time on C/C++ and related languages mostly, with some various scripting languages. Talk about a nice departure from BASIC.
JARGON · 2020-12-15 20:12
>>23356
>To tangent off this, I think your early experiences in programming have a massive influence on what languages "click" with you later.
Makes total sense. I spent my early years in classic C (K&R 2nd ed was my bible in middle school) and now I spend probably 95% of my time in Go. My brain just seems wired to C-like patterns and structures.
Church · 2020-12-15 21:35
>>23358
C-likes are reasonably simple languages with reasonable access to power. Not super elegant, but they're clear. I haven't messed much with Go, but it seems to follow that tradition nicely.
Cereal Killer · 2020-12-15 22:27
>>23363
>I haven't messed much with Go, but it seems to follow that tradition nicely.
Pretty much, yeah. Go has an interesting blend of characteristics. The structure and syntax and static typing of C, which makes it dead simple to learn for anyone with C experience. But it also has efficient garbage collection, an easy concurrency model that takes advantage of multicore processors, and a ridiculously huge standard library that means you rarely need to use any third-party libraries.
But I think my favourite feature is that it has compile times so fast it competes with startup times of interpreted languages. I do most of my work on a 5-year-old i7-7500U laptop, not exactly a speed demon. A current project I'm working on with about 18K lines of code compiles in about 2 seconds. It's painless to change a line, rebuild and rerun the program, and check if it works. I don't even have time to sip coffee. I sure don't miss C++'s compilation times!
Of course there's some drawbacks. Binary sizes are pretty big thanks to the statically-included runtime, bumping it up by a few MB. It's maybe only 80-85% as fast as an equivalent C program on average. It's not good for super-low-level bare-metal stuff like kernels or drivers due to the garbage collection. No language is perfect.
Anyway my apologies to Ruby users here, didn't mean to derail the thread with discussion of another language.
Koos van der Merwe · 2020-12-15 22:33
>>23367
This is all really cool. I'm quite intrigued now.
>No language is perfect.
Anybody who claims there's a perfect language (or a language that is Satan's butthole (except COBOL)) is either retarded or trolling your ass.
Agent Richard Gill · 2020-12-16 19:35
Ruby is actually not a bad choice to learn webdev backend. IIRC, RoR was the big mvc rest api framework style that later became sort of standard. But it's not really the most popular language, its heyday was maybe late 00s early 10s. It's for sure still in heavy use, but I'd go with maybe Python, C#, JS (no, you aren't done learning it..), Go, maybe PHP..
Jim Hilger · 2020-12-16 19:46
>>23386
mvc is not rest api
Crash Override · 2020-12-16 20:05
>>23356
>have a massive influence on what languages "click" with you later.
I don't know, I'm the guy who started with Fortran, but I love functional languages so much and yet I only tried any of them way later in my programming life.
Agent Jones · 2020-12-16 20:31
>>23387
it can be
Sipho Nkosi · 2020-12-16 23:22
>>23386
>JS (no, you aren't done learning it..)
Anyone who's figured out fetch and how to replace dom elements has basically learned all that's genuinely useful in javascript. Let a backend written in a carefully-developed sane language handle the actual processing, instead of relying on the product of a Brandon Eich two week coke binge.
Yamaoto Toshi · 2020-12-17 01:01
>>23399
I agree in general about backend in nodejs, though it is useful for smaller projects and quick scripts. But no, actually even on the front end, the js ecosystem, and the language its self, are really big and complex. You're not done learning it after going through some tutorials. You're not done learning it after years of working with it. Just like any other living programming language really..
DEBUG-CONTENTS · 2020-12-17 01:56
>>23401
I'm sure that's theoretically true. But my point was that I'd rather do all I can to avoid writing javascript at all. The only time I touch that wretched language is to do things that are flat-out impossible without it. I'm thankful that I don't code for a living and have the freedom to make that choice.
God I wish I could write for native in-browser Ruby. Opal is an evil hack.
SHODAN · 2020-12-17 17:11
>>23403
It's not quite the same, but there was once a browser that had native Python scripting. I think it was called Grail. I'm surprised that didn't catch on when JS did, considering Python was already a thing outside of browsers, as opposed to JS which was invented specifically for them.
Colmerauer · 2020-12-17 22:11
>>23410
I'm not normally a python fan (whitespace-based blocks are just frickin' weird to me, too many years in C and C-alike languages I guess) but I'd happily and eagerly use it in place of javascript if it were an option.
For now I have to settle for using the absolute bare minimum of javascript possible. Most of the time I'll simply not use javascript and focus on keeping page load sizes as small as possible, so that plain old brute-force full-page refreshes feel fast. It has a nice side bonus of working perfectly on not-very-fast, no-javascript-allowed Tor.
Jens Hansen · 2021-01-12 15:57
>>23296
The Odin Project has lots of resources and projects to learn Ruby on the Rails path (you can safely skip the previous parts)
https://www.theodinproject.com/courses/ruby-programming
Terzibashjian · 2021-01-25 16:47
Hello. Can someone please explain to me how to properly handle rails and solargraph ?
I install ruby, yarn, nodejs, sqlite then gem install solargraph and rails.
When I run rails new test_project I think it wants to install gemfiles globally or something. Why would it not use the local folder in ~/.gem where solargraph and rails were installed ?
Also why is the folder structure versioned ? I'm talking about ~/.gem/ruby/2.7.0/bin. Are all these incompatible with ruby 3.0.0 and rails will break once the ruby package from the main repository gets updated ?
Backus · 2021-01-25 18:30
>>22910
>performance wise it's a bit slow
Try jruby or Crystal?
https://www.jruby.org
https://crystal-lang.org
https://github.com/planetruby/awesome-rubies
>>22910
>>23131
>Why isn't Ruby more popular?
I really don't know. To me Ruby is better and nicer version of Python.
>>23006
Ruby has nice and flexible syntax that allows you to choose the appropriate way of writing your code, bu despite this, Ruby doesn't feel inconsistent (like JabbaShit does)
https://www.ruby-lang.org/en/about/
>>23296
Take a loot at these:
>>23892
>https://www.ruby-lang.org/en/documentation
>http://rubykoans.com
>http://rubyforadmins.com
>https://www.ruby-lang.org/en/community
>https://github.com/markets/awesome-ruby
The "Pickaxe Book" aka Programming Ruby: The Pragmatic Programmers' Guide is still regarded as one of best books on Ruby even though it's a bit dated. Ruby Under a Microscope is a more advanced book on Ruby's internals.
Yamaoto Toshi · 2021-01-27 19:26
>>24108
>3.0.0
I would wait until some more patches are added before using it.
>>24109
Thanks fren, I'll go check those when I have some time
word · 2021-01-27 21:10
>>22933
>Unless something changes, in another 5-10 years it may well be in the same place PHP is in today.
Isn't php still used extensively?
Cutter · 2021-01-29 17:52
>>24167
>Isn't php still used extensively?
Yes, but PHP developers are not exactly respected by the community, are they?
Arisu Mizuki · 2021-02-02 08:20
ruby pros, what'd you simplify here and optimize via native extensions?
https://github.com/ap-oc/exocortex/tree/architecture/problem-only
i thought of maybe rewriting the thing >>23808 but figured it'd be simpler to refactor and optimize
Koos van der Merwe · 2021-02-18 13:28
>>22910
>I've learned what there is to know about javascript
lol no you haven't
Mario Rossi · 2021-04-10 17:42
>>22921
Ruby per its creator was made in part because he felt Python wasn't a true OO language.
Lukasiewicz · 2021-04-10 17:43
>>23024
It'll be like Perl. Only used in old codebases when rewriting is infeasible or pointless.
Leto Atreides I · 2021-04-10 17:46
JS is everywhere as its the de facto client-side language.
What surprises we is why when it was popular, Python suddenly overtook it.
sage · 2021-04-10 23:07
>>25356
isn't it just because python is a better designed language?
Knuth · 2021-05-05 03:15
>>25356
Because it's easy to use for non-programmers and it has a fuarrrkton of libraries
Neo · 2021-05-05 19:38
>>25364
I dream of a world where there are non-javascript, non-webassembly options for in-browser programs. Javascript's tooling ecosystem is a complexity disaster, and the language is utterly insane ("let's have a shotgun wedding between functional and OOP ideas, not have any actual concurrency, just that fake event-loop concurrency, and then let's slather it in misleading C-ish syntax!"). Webassembly is a privacy nightmare that turns theoretically-human-readable scripted sites into blackbox programs that are immune to adblocking methods that don't bluntly rely on altering a hosts file.
Python in the browser would be a dream come true. I have a few issues with Python (not a fan of dynamic typing) but they're very minor compared to the existing alternatives.
Milner · 2021-05-06 04:21
>>25736
>theoretically-human-readable scripted sites
Assembly is just as human-readable as obfuscated js.
McCarthy · 2021-05-07 11:05
I'vwe >>22910
I've tried using ruby as a web developer and I think it is like kicking dead whales down the beach because they're snobbish. If you have a problem and get help on stack overflow, their specific forum (sometimes on google groups), on irc, they will behave snobbish towards you. They expect you to do things the proper and conventional way, but that's not always the best way for you. If you want help to do things YOUR unique way, they will REFUSE to help you and tell you do the conventional way.
Also because if you want to run a ruby website on apache (or litespeed), you can't just use FTP or WebDAV to upload files to a folder like you can with php then know the code will run. They expect you to create a virtual host for each script or app that you run. So if you just want to run 30 single file scripts (or apps) then setting up 30 virtual hosts isn't practical. Most people are not computer savvy or even programming savvy to have the relevant skills to setup a virtual host. If you get stuck, you won't get much help.
Yu-ichi · 2021-07-20 06:08
>>25742
>hey this language works for these scenarios, follow thid standards and things will be easy!
>No fuarrrk you, how dare you not to cover my weird, specific, one of a kind use case exactly the way I wanted to
synchronized · 2021-07-20 11:31
I used ruby for a soykafload of automated tasks.
Case · 2021-07-20 14:33
I feel the same with perl
Hopper · 2021-07-20 22:55
Ruby is madness. Everything is an object that can have any property modified at runtime. TDD was a Rubyist meme for the longest because that is the only way to have any assurances about runtime behavior. Some method made a copy when you expected it to mutate. Some object is now null when you thought that was impossible. JS is the king of “worse is better” but Ruby is in the same class.
If you can use whatever you want and aren’t too invested, then I would use something else. Dotnet and the JVM are good platforms that are well suited to servers. Golang is very easy to learn if you have no pretensions about being a code artisan. Elixir is Ruby-flavored Erlang, which iPad a very, very cool runtime.
At the end of the day though, most languages are pretty similar, especially now that Java 16 and C++20 are here. You will probably write instructions to be executed in sequence. Each language will have a convention for packaging/encapsulating data structures and associated behaviors. They probably all have objects and lambdas in some capacity. Almost all have usable package managers and IDEs.
Fred Nurk · 2021-07-21 17:45
>>26841
I love Ruby and use it at every chance, and don't disagree with you.
There is this dichotomy between 'fun to write' and 'fun to maintain', or if you prefer 'what programmers want' and 'what programmers need'. There needn't be, and sometimes you can get both, but a lot of the time it's a tradeoff. And Ruby sits at the very tip of the 'want' extreme.
Ruby's an utter pleasure to write. Every thought that you have can be expressed succintly and beautifully. Every structure that you conceive can be chiseled into the object system and made to run. Of course succint and creative code doesn't always make for the easiest to debug, but that's, like, totally not the language's problem. Should have thought twice before doing the things that the language encourages you to do, you dumb programmer!
I reach for Ruby when I want a script on steroids, a prototype or small program, or something that I need to run on a different architecture. I've written software in Ruby that I rely on, but if I were to tackle a biggish project, I'd reach for something with strong, static typing.
St. IGNUcius · 2021-07-26 01:31
>>22910
Ruby never really competed against JS, but against Python. That said, I don't know why python prevailed.
Joe Bloggs · 2021-07-26 11:38
>>26882
GvR focused on getting Python in schools and stressing that it’s a teaching language. Eric Schmidt & friends wrote their first iteration of Google in Python (then paid some dorks to rewrite it in Cpp).
Ruby was appropriated by grandstanding lefties (the “I think regimes that starve 1/4 of their population are OK” kind) like Steve Klabnik who spent all their time promising how Ruby was some transcendental, word changing experience. None of them have written any useful software (contrast with Rich Hickey or Joe Armstrong). All of these people jumped ship and are now Rust consultants and bloggers.
Ruby might actually thrive without their dead weight, but the value proposition of Ruby over Python isn’t very strong: they’re basically the same in terms of what they’re good for. If you already learned Python, Ruby is not going to open any doors. I stopped dabbling in Ruby for that reason. Call me a hater, but really I don’t think language popularity is actually important. It’s not like Ruby gets worse because some obnoxious hipsters don’t blog about it. If you like it, use it. If you’re a wagie, then the boss will probably tell you what you will use for work.
Tomohisa "Tom" Kanezaki · 2021-07-26 17:44
>>26884
Ruby is a transcendental, world-changing experience unless you already speak Smalltalk or Self. It doesn't necessarily bring satori upon you, but it does make you wonder why someone came up with a crippled version of OOP and everyone stuck with it.
Agent Richard Gill · 2021-07-27 14:06
>>26841
> Ruby is madness. Everything is an object that can have any property modified at runtime.
I see you haven't had much exposure to CL before, if this is your first time seeing that sort of thing.
Lukasiewicz · 2021-08-03 10:54
>>26884
>Eric Schmidt & friends wrote their first iteration of Google in Python
You are full of soykaf, Larry Page and Sergey Brin founded Google in 1997 after coming up with PageRank, Eric Schmidt only joined in 2001 after leaving Novell.
Google was primarily a Java shop (with a bit of C++ for the critical parts) and probably still is at its core. It takes literally two search engine requests to know this.
Not really surprised an alt-right idiot makes soykaf up and generates text no different than a GPT-3 bot, but I wish you would fuarrrk off back to 4/g/ and stay there.
Regarding Ruby, I never got into it for some reason, but I wish I did because mixing Smalltalk with Perl was a genuinely good idea.
Unidentified · 2021-08-03 15:43
>>26946
>an alt-right
How do you know he is an alt-right person, whatever that means?
Knuth · 2021-08-04 14:16
>>26947
This lainon started ranting about muh lefties for no reason in a thread about a programming language. I could understand if it was about Rust, but Ruby has nothing to do with politics. Alt-right idiots can't discuss anything without bringing up their boogeymen into the conversation, threads on 8/tech/ back in the days were mostly about politics and had barely anything to do with tech.
Nemissa · 2021-08-06 09:12
>>26957
I disagree with you, but expanding upon that will just propagate brewing soykaf. Instead, I just want to express how happy I am to see someone remembering that 'sage' exists, and using it appropriately. Anyway, back to the sewers I go.
Batou · 2021-08-06 14:17
>>26957
If you take away the emotional labels and that specific point is still valid though. Ruby's killer app in the west was Rails and that corner of web development was monopolized by a specific subculture. Python on the other hand ended up with much broader appeal for reasons that are not technical.
BloodCat · 2021-08-22 08:26
>>22931
And in China, Lua is much more popular
car · 2021-08-26 22:24
>>27192
Why is that, though?
Rick Deckard · 2021-08-26 22:28
>>27272
Not that lainon, but at a guess it's older and ruby wasn't really a thing outside Japan for a while after it first started existing.
Molly Millions · 2021-11-19 17:47
anyone use ruby for system automation?
share some scripts
Nameless · 2022-02-14 10:10
>>22910
Javascript is the definition of corporate sunk cost fallacy. If not were for corps throwing it billions and thousands of man hours it would've not grow anywhere. There's nothing particulary good about it as a language other than derivates of the money invested on it (huge ecosystem, adoption); it can cobble together something fast, nothing wrong with that if all you care is hacking out something for money, but if you've something with such ridiculous backing, it'd be absurd that it couldn't even deliver that, and more absurd is defending this mess beyond "don't care, money". Pretty much anything JS does is awful and hacked together from somewhere else.
Meddler · 2022-02-14 13:15
>>22933
So do you think PHP is better to learn/has better job
perspectives than Ruby? I'm interested in this, I kind
of understood that PHP is 'legacy' language that old
projects use, but I am not up to speed about the
situation with Ruby, how is it? They said it's for small sites
Junichi Fujiwara · 2022-02-16 05:40
Is Ruby still usable? I remember it was one of the languages I enjoyed most, but recently I looked up the gems repo and the vast majority are unmantained. I also read that most of its userbase migrated to other languages already, so I feared it be an abandoned language which kept me from using it again.
sizeof · 2022-02-16 09:53
>>30133
If you "abandoned" in the sense that it is no longer hyped up, yes. And by no longer hyped up, I mean it no longer needs to be hyped up because it is one of the standard web development frameworks in use today. A lot of the old SSR driven gems are unmaintained because people have moved on to the newer ruby stuff like https://hotwired.dev/
Roger Pollack · 2022-02-17 20:01
>>30140
Ruby is still used a lot, just not as popular as it was before since other languages have gained more hype.
Ruby's most popular XML library is still receiving frequent updates. https://github.com/sparklemotion/nokogiri
Hagbard Celine · 2022-03-05 15:11
Hi, lainons.
I'm having a Software Engineering course this semester, and the professor uses the book on pic related (http://www.saasbook.info) to guide the course.
The book til now has dug into a lot of shiny buzzword topics like agile methodologies, scrums, and cloud computing. I still have no idea why I'm having this course, honestly.
But anyway. The book uses ruby and ruby on rails as a tool to teach agile and cloud computing. The book only covers those tools superficially, so I need other resources on them.
For ruby, I'm reading Matz's «The Ruby Programming Language» (even it being for Ruby 1.9, it seems to be a good, terse and complete resource).
But I have no idea which resource I should use for Rails. I tried to read «The Ruby on Rails Tutorial», but its content is very diffuse and shallow, being appropriated to newbies that have never programmed before. It is a pain to read.
Do you know any good resource on Rails?
Also, have anyone read (or had a course based on) the book on pic related?
The Oracle · 2022-03-08 21:04
>>30312
Try this one: https://pragprog.com/titles/rails7/agile-web-development-with-rails-7/
Dr. X · 2022-08-11 03:06
>>30446
>>31496
Excuse me, I'd moved then removed it while doing some cleanup.
https://git.lain.church/apoc/poke
Jane Doe · 2022-08-11 03:10
>>26884
>the value proposition of Ruby over Python isn’t very strong
Yes it is. Ruby has a Crystal and an Elixir.
Drano · 2022-08-11 21:14
>>26884
There is so much wisdom distilled in this post. A year later, and still hits home.
Naomi Nascimento · 2022-08-12 16:26
>>32308
You are retarded. If you want to write Elixir you will need to learn how to model problems with the actor model, closing blocks with “end” or “{“ makes no difference. If you think it does then you are a bad programmer no matter the syntax.
The other lainon is right, ruby doesn’t “have” crystal and elixir, you think it does then you are either stupid or started programming two months ago.
Aristóteles Amadópulus · 2022-08-13 07:47
>>32310
>>32307
I'll disengage as you (both?) are not presenting testable arguments, both posts are just juvenile.
I'll report back if I figure out or find an objective measure of what I'm saying as it might be useful to the thread subject.
藤原純一 · 2022-08-13 09:25
>>32329
>Ruby has a Crystal and an Elixir.
How is this testable retard? What objective measure is there for this?
Yes crystal looks like ruby, elixir looks somewhat like rub (but the similarities end there). The point is that this means nothing.
Koichiro · 2023-10-27 07:07
Sorry, meant to mention >>33788 about Pleroma which is a mastodon implementation in elixir.
Colmerauer · 2023-10-27 09:10
>>33788
Exercism.org is written in Ruby. (new)
Lobste.rs is written in Ruby. (new)
AirBNB is written in Ruby. (newish)
etc.
Hopper · 2023-11-12 02:47
>>37537
>>32287
>It also gives me a 404 but thanks for pointing me to lain.church
ah damn, put it back up again
Yamaoto Toshi · 2023-11-12 03:38
i'm doing something similar to datomic (but on CSV) except in ruby for my own purposes - to use it from my own projects
it's been fairly stable so i'll put it up also on lain church and share, got to figure out how to package it though, i guess probably as a gem?
Molly Millions · 2023-12-03 06:46
>>22910
Ruby used to be the highest paying webdev language, new user.
Tank · 2023-12-17 05:53
>>26885
I think it really goes to show how little people understand or have experienced pure/real OOP when Ruby gets compared to Lisp as much as it does. As someone coming from Smalltalk, Ruby is effectively just a Smalltalk dialect with added syntax structures for more "traditional" code statements (like if and for blocks), which I think is a very pleasant addition. The language understands what it means to be a true OO language, while not restricting itself to be something alien to anyone not already familiar with the theory.
DEBUG-CONTENTS · 2023-12-17 19:16
>>23005
i am quite late but here you go. Ruby is still cute.
Masami Eiri · 2024-04-01 03:49
>>37767
i indend to make this datomic-compatible somehow, essentially reimplementing the syntax 1:1
https://docs.datomic.com/pro/query/query.html
gotta check if it's copyrighted/legal
don't know where to start even, anyone got any suggestions? one benefit is that i already have data as i use the db engine for two different projects
on another note i started getting into dev sometime mid-2010s so at work i went straight from cpanels to dockers and k8s, which means i skipped the capistrano era - and ijust discovered capistrano, it's insanely good for managing my hobby projects
Milner · 2024-04-06 08:40
>>37951
Comparing a programming language to Lisp is like comparing an RPG to Earthbound. People know that it's different from what a "normal" programming language is like, so they assume everything that deviates from C in a way that's even remotely similar to Lisp makes it a "Lisp-like", because they have extraordinary small reference pools that they refuse to expand.
With that said, I'm not sure I'm super keen on the Smalltalk comparison either. A lot of what makes Smalltalk Smalltalk is the environment; it's not just a programming language, but also a mini operating-system unto itself. Ruby definitely owes a lot to Smalltalk, but a typical Ruby program is going to be shaped a lot more like Perl; the other big influence.
Stallman · 2024-07-10 22:00
>>39478
can't be me, i'm the anon in the post above you and once i have to make my DB even more performant and/or distributed i'll look into leveraging elixir and crystal
elixir i haven't had a chance to work with yet but i did use crystal to implement some of the first versions of the aforementioned database, in a similar manner although at the time i had a drastically different data structure in mind (for the same goal) and made a small DB in crystal for that specific structure
can't (and don't think i will be able to) find the code for it BUR iirc crystal provides a lot more of what one would need to build things like a db than ruby does; one example being storage, with crystal i had a nice and clean way to store and read binary blobs, with ruby i for now stick to CSV because i couldn't find any better approach in a timely manner
Hacker · 2024-07-26 05:53
>>39477
>will do a cleanup and push the WIP to the repository in case anyone is interested
done
as a reminder the repository is here >>37767
made another incremental improvement, got a few minor things left until i've covered fundamentals
i want to try and commercialize one project running on this database and it looks like i'll soon be ready to start
project's already up but as very crude implementation with a minimum of polish and functionality
nb as the post does not contribute aynthing to the discussion
John Rain · 2026-05-15 18:24
I recently wrote a blog post about a particular corner of Ruby: http://aesthetikx.info/blog/date_italy.html
Cowboy · 2026-07-16 22:47
>>44227
nice blog. do you use ruby professionally?
Davis · 2026-07-20 08:42
>>44464
Yes I do! I also just got back from RubyConf in Vegas, it was a blast -- I got to meet Matz which was cool for me.
Jens Hansen · 2026-07-20 17:38
>>44493
how do you see the future of ruby? it seems that it is getting displaced by statically typed languages and languages with a better concurrency story.
Cereal Killer · 2026-07-25 18:23
Can someone please explain the value of metaprogramming in Ruby? Metaprogramming seems to make the code more difficult to understand for other people and they complain, when there are usually better ways of writing the same code that is clearer.
Dujour · 2026-08-28 13:59
>>23005
Here you go lain, enjoy!!
Minimum body size go brr