Live data from Hacker News

Brut: A New Web Framework for Ruby

naildrivin5.com

11–20 of 88 posts

Re: Brut: A New Web Framework for Ruby

#11

> I know, we can vibe away all the boilerplate required for Rails apps. But how much fun is that? How much do you enjoy setting up RSpec, again, in your new Rails app? How tired are you of changing the “front end solution” every few years? And aren’t you just tired of debating where your business logic goes or if it’s OK to use HTTP DELETE (tunneled over a _method param in a POST) to archive a widget? For your person…

Author here. The framework does require setting stuff up. RSpec is not one of those things. It's the testing library you will use if you use this framework. I didn't create a lot of flexibility in the framework. For example, if you don't like RSpec, you will not like this framework :)

You may want to examine the docs more closely. There are plenty of conventions and very few that can be circumvented.

But day one of a new framework is not going to compete with Rails. Sorry!

Re: Brut: A New Web Framework for Ruby

#12
Oh man, Brut's HIPPOCRATIC LICENSE[1] is interesting! Just excerpting bits of Section 3.1 and Section 3.2 for example:

  * 3.1. The Licensee SHALL NOT, whether directly or indirectly, through agents
   or assigns:
[...]

    * 3.1.12. Taliban: Be an individual or entity that:
      
      * 3.1.12.1. engages in any commercial transactions with the Taliban; or
      
      * 3.1.12.2. is a representative, agent, affiliate, successor, attorney, or
        assign of the Taliban;
   
    * 3.1.13. Myanmar: Be an individual or entity that:
      
      * 3.1.13.1. engages in any commercial transactions with the
        Myanmar/Burmese military junta; or
      
      * 3.1.13.2. is a representative, agent, affiliate, successor, attorney, or
        assign of the Myanmar/Burmese government;
   
    * 3.1.14. Xinjiang Uygur Autonomous Region: Be an individual or entity, or a
      representative, agent, affiliate, successor, attorney, or assign of any
      individual or entity, that does business in, purchases goods from, or
      otherwise benefits from goods produced in the Xinjiang Uygur Autonomous
      Region of China;
[...]

  * 3.2. The Licensee SHALL:

   * 3.2.1. Provide equal pay for equal work where the performance of such work
     requires equal skill, effort, and responsibility, and which are performed
     under similar working conditions, except where such payment is made
     pursuant to:
     
     * 3.2.1.1. A seniority system;
     
     * 3.2.1.2. A merit system;
     
     * 3.2.1.3. A system which measures earnings by quantity or quality of
       production; or
     
     * 3.2.1.4. A differential based on any other factor other than sex, gender,
       sexual orientation, race, ethnicity, nationality, religion, caste, age,
       medical disability or impairment, and/or any other like circumstances
       (See 29 U.S.C.A. § 206(d)(1); Article 23, United Nations Universal
       Declaration of Human Rights; Article 7, International Covenant on
       Economic, Social and Cultural Rights; Article 26, International Covenant
       on Civil and Political Rights); and
   
   * 3.2.2. Allow for reasonable limitation of working hours and periodic
     holidays with pay (See Article 24, United Nations Universal Declaration of
     Human Rights; Article 7, International Covenant on Economic, Social and
     Cultural Rights).
[1] https://firstdonoharm.dev/version/3/0/cl-eco-media-my-tal-xu...

Re: Brut: A New Web Framework for Ruby

#13

> I know, we can vibe away all the boilerplate required for Rails apps. But how much fun is that? How much do you enjoy setting up RSpec, again, in your new Rails app? How tired are you of changing the “front end solution” every few years? And aren’t you just tired of debating where your business logic goes or if it’s OK to use HTTP DELETE (tunneled over a _method param in a POST) to archive a widget? For your person…

Author here. The framework does require setting stuff up. RSpec is not one of those things. It's the testing library you will use if you use this framework. I didn't create a lot of flexibility in the framework. For example, if you don't like RSpec, you will not like this framework :) You may want to examine the docs more closely. There are plenty of conventions and very few that can be circumvented. But day one of a…

To be honest, I love this framework (so far from what I've seen) but I do hate the choice of RSpec. I say this as someone who used RSpec for like a decade after it was first released. I "get" it. I have contributed code to it.

Minitest (which is bundled with Ruby these days) is Good Enough™. It doesn't require you to learn a new DSL. Everything is just Plain Old Ruby. The use of RSpec these days—IMO—is just cargo-culting forward what was the right decision from 10+ years ago. Having an pseudo-English style interface for testing isn't worth having the additional dependencies nor the mental overhead of needing to know how the RSpec syntax is actually mapped into Ruby concepts.

I'm not asking you to change it, you're welcome to have a different opinion than mine. But I am curious if you have strong reasons for requiring it. Particularly because MiniTest seems to be well-aligned with the rest of your design philosophies, unlike RSpec.

Re: Brut: A New Web Framework for Ruby

#14
post #12

Oh man, Brut's HIPPOCRATIC LICENSE[1] is interesting! Just excerpting bits of Section 3.1 and Section 3.2 for example: * 3.1. The Licensee SHALL NOT, whether directly or indirectly, through agents or assigns: [...] * 3.1.12. Taliban: Be an individual or entity that: * 3.1.12.1. engages in any commercial transactions with the Taliban; or * 3.1.12.2. is a representative, agent, affiliate, successor, attorney, or assign…

All lovely ideals, but sadly means the project is not actually open source (by the official definition). And not compatible with the GPL and similar copyleft.

Re: Brut: A New Web Framework for Ruby

#15
post #13

Earlier quoted context omitted.

Author here. The framework does require setting stuff up. RSpec is not one of those things. It's the testing library you will use if you use this framework. I didn't create a lot of flexibility in the framework. For example, if you don't like RSpec, you will not like this framework :) You may want to examine the docs more closely. There are plenty of conventions and very few that can be circumvented. But day one of a…

To be honest, I love this framework (so far from what I've seen) but I do hate the choice of RSpec. I say this as someone who used RSpec for like a decade after it was first released. I "get" it. I have contributed code to it. Minitest (which is bundled with Ruby these days) is Good Enough™. It doesn't require you to learn a new DSL. Everything is just Plain Old Ruby. The use of RSpec these days—IMO—is just cargo-cul…

I thought hard about this decision. Every time I use MiniTest, I end up wanting a bit more that RSpec has and then switching to it. I also have been surprised over the years that the `expect(x).to eq(y)` seems to be relatively intuitive to people, despite the fact that it doesn't seem like it ought to be.

Re: Brut: A New Web Framework for Ruby

#16
post #13

Earlier quoted context omitted.

To be honest, I love this framework (so far from what I've seen) but I do hate the choice of RSpec. I say this as someone who used RSpec for like a decade after it was first released. I "get" it. I have contributed code to it. Minitest (which is bundled with Ruby these days) is Good Enough™. It doesn't require you to learn a new DSL. Everything is just Plain Old Ruby. The use of RSpec these days—IMO—is just cargo-cul…

I thought hard about this decision. Every time I use MiniTest, I end up wanting a bit more that RSpec has and then switching to it. I also have been surprised over the years that the `expect(x).to eq(y)` seems to be relatively intuitive to people, despite the fact that it doesn't seem like it ought to be.

Do you mind elaborating on what more you end up wishing you had?

Most of the additional features RSpec adds seem worthwhile but just end up being more complicated/confusing in the end, in my experience. Shared contexts/examples, for example. Others like let blocks should… just be methods.

I will say the change in… I think it was RSpec 3(?) to the expect(x) syntax was a hugely positive change, particularly in not having to monkeypatch the world.

Re: Brut: A New Web Framework for Ruby

#17
post #16

Earlier quoted context omitted.

I thought hard about this decision. Every time I use MiniTest, I end up wanting a bit more that RSpec has and then switching to it. I also have been surprised over the years that the `expect(x).to eq(y)` seems to be relatively intuitive to people, despite the fact that it doesn't seem like it ought to be.

Do you mind elaborating on what more you end up wishing you had? Most of the additional features RSpec adds seem worthwhile but just end up being more complicated/confusing in the end, in my experience. Shared contexts/examples, for example. Others like let blocks should… just be methods. I will say the change in… I think it was RSpec 3(?) to the expect(x) syntax was a hugely positive change, particularly in not havi…

The biggest thing is the mocking system. MiniTest's feels so difficult to use.

I also like creating custom matchers vs. creating my own assert_* methods.

I would agree that many features of RSpec are, honestly, bad: shared examples, shared contexts, etc. Excessive use of let! and let, plus the predicate matchers are all just really confusing to me.

I actually thought about patching the RSpec gem to remove the features I didn't like :) Might still consider it heh

Re: Brut: A New Web Framework for Ruby

#20

[flagged]

All frameworks are like that. They make it simple to solve a particular class of problems, by making choices for you, and providing code that supports these choices. If your problems fit the framework's shape, it can be immensely helpful. If not, go look for another. There's nothing wrong about building a framework that matches your particular needs and tastes.

If you need a universal toolbox, no framework will do, you need composable libraries. Most large projects end up facing this, but most projects are not large.

Post reply on HN