1. 14

    Can someone explain me the point of the rant? I don’t really understand what it’s trying to say.

    1. 84

      Every language has some core idea that inspired its creators to make it, instead of putting up with the other perfectly good languages that already existed. Sometimes, that idea is simple (“everything is an object” for Smalltalk, “everything is a cons cell” for LISP), and sometimes that idea is more complex (the way that Java is designed to scale to huge teams, or the way that Perl is “the Cliff’s Notes of Unix”).

      The author’s idea is that the core idea of Ruby is (waves hands) for making domain-specific languages. It’s not the universal syntax for expressing all algorithms, but if you have an idea for how a particular algorithm should be expressed, you can probably bend Ruby into that shape, at least within a particular class or project.

      The author’s lament is that Ruby’s core idea was never really named, and thus never advertised, and thus never formed part of Ruby’s reputation. As a result, it didn’t build up the audience of tinkerers and experimenters who could form a long-lived supportive community around it.

      Instead, what it got was Rails, which was the opposite of that core idea: instead of bending Rails into a domain-specific language for the application you want to create, the idea is to bend your application to fit within the framework Rails provides. And since Rails became hugely popular, the vast majority of the Ruby community valued that framework-style approach and Ruby just became the incidental-complexity runtime for Rails instead of an interesting thing in its own right.

      1. 11

        Brilliant summary. Well done.

        1. 4

          The Ruby-on-Rails revolution and its consequences have been a disaster for the Ruby race.

          1. 2

            Can you expand a bit on the idea that Ruby is for DSLs? I feel like I’ve heard that here and there and it always seemed like a bit of a stretch. Ruby just doesn’t have things that I would think would be critical for truly writing DSLs, such as lazy evaluation and macros.

            The vagrant config, for example, is a bunch of ruby code that calls itself a DSL but it really just feels like… writing ruby. Python, for instance, could do it just as well (see: SCons).

            1. 5

              The instance_exec method allows for succinct DSLs whose syntax couldn’t be easily copied in other languages like Python. Basically, it allows you to evaluate blocks as if they were running in the scope of an arbitrary object’s methods — or to put it in Rubyist terms, it allows you to execute blocks with an arbitrary receiver. For (a completely contrived) example, in Python you might write:

              conf = Library.config_object()
              conf.config_file("foo.txt")
              conf.worker_processes(2)
              worker = Library.worker(conf)
              

              Whereas a Ruby library might read:

              worker = Library.worker do
                config_file "foo.txt"
                worker_processes 2
              end
              

              The interior of the Ruby block defining the worker feels in a certain sense like a DSL; these methods are not in global scope: they’re special methods that are accessible inside the block, running on an anonymous object. It’s sort of like having a domain-specific language with new keywords — config_file and worker_processes — that elegantly composes with standard Ruby.

              Of course, really all it means is you can leave out repeated references to conf, since Library.worker makes everything run as if it’s in the scope of some method on conf (and Ruby has implicit self inside method calls, so you can write config_file instead of self.config_file). But ergonomically it can feel nice. It’s the same number of lines, but much less significant text.

              1. 1

                To your point: until I read this comment, I had no idea that the Vagrant config was even supposed to be any kind of DSL. It just looked like ordinary Ruby to me.

              2. 1

                Thank you… Didn’t even bother reading the post - love your writing style too!

                1. 1

                  Thanks for that. I never learned that about ruby because the first and only place I tried it was (gross) codecademy, before I’d started learning how to code.

                  1. 1

                    The author’s lament is that Ruby’s core idea was never really named, and thus never advertised

                    I know this is not your point, but I have a bunch of populer old books from ruby 1.9 times such as “metaprogramming ruby” and “rspec” which disagree.

                  2. 5

                    That Ruby never gained traction for the face value of its expressiveness. I feel that this rant imply that the mix of semantic approach of Perl and the meta-approach of Lisp meeting in the right balance in Ruby have not been recognized and exploited fully to show what Ruby really is.

                    The way the author speaks about “phrase-based” reminds me of Perl, Raku, APL, dense language where you can express yourself in short understandable phrase. The author pushes the idea that this is the meaning of the mantra “Desifned for developer’s happiness”. To be happy, you have to be able to express yourself without convolution and Ruby provided that solid base and rich vocabulary to be expressive and precise.

                    1. 3

                      Me neither. Wondering if I should flag this as off-topic.

                    1. 2

                      When I was a Rails developer I never wrote view-specific tests and don’t think they are especially useful.

                      But I always wrote integration tests which exercised the full request/response cycle, including view rendering, which is critically useful. ERB is like any other piece of code: if you aren’t exercising it regularly, it’s probably broken.

                      1. 1

                        Controller unit tests (if that’s your jam) can also enable view rendering (off by default)

                        1. 5

                          That’s termination free iteration, not recursion.

                          Recursion must have a base case

                          1. 2

                            The base case is “are you bored yet?”

                            1. 1

                              Was about to say this but you beat me to it!

                            2. 3

                              It took me far too long to get this…

                              Relatedly, I also like this post about recursion.

                              1. 2

                                I’m on to you (ಠ_ಠ)

                            1. 18

                              Our sysadmin @alynpost is resigning as moderator and sysadmin to focus on other projects. Prgmr will no longer be donating hosting. For security’s sake, I’ve reset all tokens and you’ll have to log in again - sorry for the hassle.

                              Is there any risk that Lobste.rs could go offline in the future due to running costs?

                              1. 38

                                No. The new hosting bill is $75/month, which I don’t mind at all.

                                1. 14

                                  Isn’t that very overpriced? 40€/month at hetzner gets you a dedicated machine with a Ryzen 5 3600, 64GB of RAM and 512GB of SSD on RAID1 (no affiliation or anything, it’s just the provider I know).

                                  1. 8

                                    Hetzner also just uses electricity from sustainable sources, while with digital ocean it depends on the location

                                    1. 3

                                      Hetzner is the goat! I use them for my VPS and it’s the best deal I’ve seen yet for cloud services. The fact that they’re environmentally friendly as well makes it that much better!

                                    2. 5

                                      Does Hetzner have managed MySQL? Seems like it’s a big hassle removed there.

                                      1. 6

                                        You can rent a managed server with Hetzner and they have a panel to install and mange MySQL on it, but I don’t think it’s comparable to DigitalOcean’s managed offerings.

                                        1. 1

                                          Would be really interesting to hear what they’re doing with “managed”. Because based on the prices I’d say prgrmr.com is also not cheap compared to the hardware you get.

                                    3. 5

                                      Does hosting lobster requires lots of CPU or RAM?

                                      1. 4

                                        It’s Rails. So both :)

                                        1. -1

                                          #rust

                                      2. 5

                                        Would you consider accepting donations for hosting?

                                        1. 35

                                          I appreciate the offers but prefer not to, no. Still looking for someone to print-on-demand stickers, though.

                                          1. 12

                                            I’ll buy $75 worth of stickers every month to show my appreciation.

                                            1. 6

                                              Minor dissenting opinion:

                                              I support a lot of people on Patreon and expect nothing in return. Chipping in $5/month to Lobste.rs because I like the community and the stuff that gets shared here isn’t a tall order, and won’t come with any entitlement. (A lot of the people I support are artists and content creators that are usually in high demand from the rest of the community.)

                                              I can’t speak for the rest of the community, but I don’t think I’m particularly saintly in this regard. :P

                                              If the expenses grow, please don’t rule this option out entirely.

                                              1. 3

                                                It seems to me that the expectation comes from the design of sites which ask for monthly donations. Thinking out loud here, but a donations system which really was just a donations system, something more similar to ko-fi and didn’t have names attached, might help highlight the fact that by donating one is helping out rather than a new account tier?

                                                I personally also donate on Patreon and expect nothing.

                                              2. 4

                                                Thank you! That is a great attitude.

                                                I have one concern though. What happens when lobste.rs keeps growing and the bill increases? What is your maximum you would spend on the site? Wouldn‘t it be better to care about that rather earlier than later?

                                                1. 22

                                                  By design, Lobsters grows pretty slowly. I’m thinking of design decisions like invites vs open signups, and a narrow focus rather than a subreddit for everything. Growth is not a goal like it would be in a startup, and I’d pause invites if we saw some kind of huge spike.

                                                  Right off we should have plenty of spare capacity. I aimed to overprovision this new server and we’ll see if I eyeballed that correctly as we reach peak traffic during the US work week. If the hosting bill goes to about 10x current I’ll start reconsidering donations. But that may never happen! Hosting costs slowly decline as power gets cheaper, data centers get built, and fiber gets laid. Lobsters is cheap to run because it’s a CRUD SQL app pushing around text a few kilobytes at a time and our size increases slowly. I hope not to jinx it, but it seems likely that our hosting bill is flat or declines over the next decade.

                                                2. 2

                                                  Not print-on-demand afaik, but Sticker Mule has been great to work with in the past for me.

                                                  1. 1

                                                    Redbubble do print on demand for stickers, iirc.

                                                    1. 1

                                                      I’m definitely in the market for some stickers if you find a service or have any left over from the first batch!

                                              1. 27

                                                Accepting civilization’s doom and not worrying about the future.

                                                1. 14

                                                  This position seems to be most often held by people who are unlikely to feel the impact of the current destructive path we are on.

                                                  In other words: “civilization’s eventual doom” may be a hypothetical to you, but (taking an example) within ten years climate change is expected to cause 250k additional annual deaths, mostly in developing countries that are least equipped to handle these problems. That feels like something we should all worry about, no?

                                                  1. 21

                                                    God, grant me the serenity to accept the things I cannot change, courage to change the things I can, and wisdom to know the difference

                                                    https://en.wikipedia.org/wiki/Serenity_Prayer

                                                    I would say worrying is good if it leads to productive action. Climate change is one place where that could happen, depending on the person.

                                                    I’m less convinced with respect to US politics, which a lot of people seem to be worrying about. I think they are overestimating the ability of their words to cause anything meaningful to happen. And often the words have a net negative contribution, even if they’re well intentioned.

                                                    1. 3

                                                      Can’t speak for soc, but I think the non-hypothetical eventual destruction of all of human society could not come sooner. It’s better this way.

                                                      1. 1

                                                        This is the way.

                                                      2. 3

                                                        There is nothing hypothetical about this.

                                                        1. 2

                                                          The US lost 250k people to Covid-19 and many people there are still don’t worry even if it happens in their own country.

                                                      1. 2

                                                        Any program can look like abstract art if you try hard enough.

                                                        1. 1

                                                          Author definitely tried hard enough then

                                                        1. -5

                                                          We definitely need safer cops these days. Too soon?

                                                          1. 2

                                                            There was a pretty contentious post on here about a proposal to rename this software a couple weeks ago

                                                          1. 0

                                                            Great, here’s a piece of paper. Can you write down your email password for me here, please?

                                                            ^^ Not mine… I can’t remember where I found this as the proposed response, but I knew it was perfect when I saw it :)

                                                            1. 2

                                                              Please apply grammarly

                                                              1. 3

                                                                Doing a Cessna 172 checkride so that I get some instruction and guidance oh how to fly them and am able to rent and take others up with my recently acquired PPL. Any Vancouver area pilots on here?

                                                                1. 5

                                                                  This is the type of stuff that makes Lobsters awesome. Well done Christine!

                                                                  1. 3

                                                                    So, I posted that warning message, but I forgot to say this. I agree, this is awesome! Well done @cadey!

                                                                  1. 3

                                                                    Please keep in mind it’s more than OK to do nothing at all too!

                                                                    This is nice to see. This series of posts always makes me feel anxious and intimidated. But I did open it this time … For intrigue.

                                                                    1. 3

                                                                      Google Blogger alternatives – WordPress, Medium, and Ghost are all good options.

                                                                      No, they are not good anything

                                                                      1. 3

                                                                        What’s wrong with wordpress?

                                                                        1. 1

                                                                          Yeah, I have the same question. If you say “security” then you can use wordpress.com and let them handle that for you, and also, if you’re dilligent about it, it’s such a well trod path you can secure your site pretty thoroughly if you’re on top of it.

                                                                          Not everyone wants to use a static site generator.

                                                                          1. 1

                                                                            I might have been hasty in judging all three of these with the same cloth. I’ve never heard of Ghost and only have a slightly negative opinion of Wordpress. My judgement was perhaps clouded by my immense hatred for Medium – the fact that it is recommended here makes me skeptical of all of these recommendations.

                                                                            1. -2

                                                                              /s ?

                                                                              1. 6

                                                                                We as a community can do better than this kind of response. Why not communicate what you think is wrong with Wordpress, instead of questioning the motivations of the person asking a question?

                                                                                1. 4

                                                                                  Wordpress is a good option if you host it yourself. Medium is an abomination these days. I never used ghost.

                                                                                  1. 3

                                                                                    I don’t see the problem with using wordpress.com either - At any time you can export to a self hosted instance trivially. I know everyone here feels super strongly about self hosting, and there’s a lot of wisdom in that, but some of us lack the hours in the day to properly secure and maintain a Wordpress site, or to tackle the extra necessary steps to do static site generation.

                                                                                    1. 4

                                                                                      I’m especially happy to pay wordpress.com because that’s what funds development - I know several automattic employees who are essentially paid to work on wp-core fulltime, and I’m personally extremely happy to support that arrangement (see also: fastmail and their work on Cyrus imap).

                                                                                      I own the domain; I own the data. I don’t need the headache that comes with actually running the thing if I can port to another host easily.

                                                                                      1. 2

                                                                                        Precisely! I think people are going a bit too overboard with the “SELF HOST ALL THE THINGS” - the important thing is data ownership and mobility.

                                                                                        I ran my own WP instance for years, and did a crappy job of it, and got owned pretty hard.

                                                                                        Not everyone wants the part time job of owning server resources. It’s admittedly gotten a LOT easier but I’m still much happier outsourcing this particular thing - just like I outsource my mail to Fastmail. I ran a mail server for years and years as well, but again - a part time job I don’t need.

                                                                                        1. 2

                                                                                          This is also my bugbear with mastodon. Federation is great, but most of the new users don’t own the domain their account is at, nor hold the keys used to authenticate posts as theirs.

                                                                            1. 5

                                                                              Some of my Saturday will be spent on further contributing to and getting my wip PR ready for Amber, a rails like MVC framework written in Crystal, a ruby like language that is “as fast as C”. It is of course therefore compiled and statically typed.

                                                                              I am stll learning the language and framework and instead of using amber for a project - like I did with Rails - I’m trying to learn it via contribution.

                                                                              1. 23

                                                                                I was appalled at the scarcity of static site generators out there. So I wrote my own: Glod, the new glod standard in static site generation.

                                                                                1. 4
                                                                                  1. 14

                                                                                    I suspect @bcampbell was waxing ironic.

                                                                                    1. 6

                                                                                      Aaah I see… woosh

                                                                                      1. 3

                                                                                        Indeed :-)

                                                                                        Actually, the ironic bit was that I wrote it because I found Hugo too complex - I’d have to relearn it every 6 months, so Glod’s aim was to be short and stupid (well under 1000 lines of golang) - but in the process I ended up submitting a patch to Hugo too…

                                                                                      2. 1

                                                                                        I use the Clojure one.

                                                                                    1. 5

                                                                                      Passed my PPL ground test today which means I should now able to finally get my PPL license as early as next week. Maybe I’ll do a dual flight this weekend if weather permits. My last one was the flight exam a few months ago so I should refresh.