Live data from Hacker News

Show HN: Compile Ruby to C

github.com

71–80 of 110 posts

Re: Show HN: Compile Ruby to C

#71
post #44

The obvious performance and bloat overhead with RoR aside, I have yet to see a framework and ecosystem that lets you have a programmable web application up and running with typical features in comparable time. For shipping new products or testing out ideas, I have not come across a more optimal framework in terms of going from idea to market. Most often I've tried Phoenix, Django and Laravel as alternatives, but all…

The weird thing is we have to keep semi-apologising for choosing Rails. Why is that? For each his own. I love Rails, sue me.

I am all for your love of Rails, but tools should not be picked based on how much you love them. Choose the correct tool for the job, if it is rails, good for you.

Re: Show HN: Compile Ruby to C

#72

I'm sad Ruby has been, or is, left behind by python. There are lots of little reasons but no real big one. I just love ruby. I love little things like 'unless'. I know it's still with us, but still feels a little sad.

Rails jobs are still plentiful. I don't see what's gonna wipe them all out in the coming 10-20 years. Especially if you live in North America, Rails is still super popular. But yes outside Rails there's mostly devops for Rubyists.

Re: Show HN: Compile Ruby to C

#73

Earlier quoted context omitted.

The weird thing is we have to keep semi-apologising for choosing Rails. Why is that? For each his own. I love Rails, sue me.

I am all for your love of Rails, but tools should not be picked based on how much you love them. Choose the correct tool for the job, if it is rails, good for you.

For me its Rails, also because I love it. None of us is 100% objective or rational about this. I'm very much aware most companies can be built with any of the common stacks, the tech barely matters for 90% of these companies. Why does it mater if advertisement algo company X or insurance tech company Y choose java/.net/ruby/php ? All these stacks are good enough and have been used countless times in varying scales.

Re: Show HN: Compile Ruby to C

#74
post #22

Earlier quoted context omitted.

I still think Ruby is the more interesting and expressive language. However, for me there's a single pain point that means Python wins in any larger project. That is the behaviour of Python's "import" vs. Ruby's "require". So it's not surprising that this distinction between these languages pops up all over the place. Python tries to be as explicit as possible. While "from import *" is possible it is heavily frowned…

I can echo this sentiment. I want to love Ruby, but when I work in project in it, I eventually get to point where I have trouble finding where something is defined, which wastes my time — and in general, to your point, it’s harder to find where anything that’s getting pulled into a file is defined. Unfortunately, this dynamism is a concept in Ruby that is part of the reason why it’s so great. However, recently I star…

> However, recently I started a project with Ruby, thanks to language servers

What do u mean exactly?

Re: Show HN: Compile Ruby to C

#75
post #44

The obvious performance and bloat overhead with RoR aside, I have yet to see a framework and ecosystem that lets you have a programmable web application up and running with typical features in comparable time. For shipping new products or testing out ideas, I have not come across a more optimal framework in terms of going from idea to market. Most often I've tried Phoenix, Django and Laravel as alternatives, but all…

This is what brought me to RoR land... and this is what made me leave. I agree rapid prototyping is an excellent point for RoR but when you need to actually evolve the project for years, it gets really tedious and hard. So for a dev shop RoR is quite fine -- you make the project, do very little iteration on it, and ship. That works well and I've experienced it. For longer-lived projects however, Phoenix is miles ahea…

edited to delete as i was discourteous.

Re: Show HN: Compile Ruby to C

#76

Earlier quoted context omitted.

I am all for your love of Rails, but tools should not be picked based on how much you love them. Choose the correct tool for the job, if it is rails, good for you.

For me its Rails, also because I love it. None of us is 100% objective or rational about this. I'm very much aware most companies can be built with any of the common stacks, the tech barely matters for 90% of these companies. Why does it mater if advertisement algo company X or insurance tech company Y choose java/.net/ruby/php ? All these stacks are good enough and have been used countless times in varying scales.

For example if you are building something around nlp, probably pick python.

Also, since you are all into ruby, maybe take a look around as to why other languages exist.

Re: Show HN: Compile Ruby to C

#77

Earlier quoted context omitted.

For me its Rails, also because I love it. None of us is 100% objective or rational about this. I'm very much aware most companies can be built with any of the common stacks, the tech barely matters for 90% of these companies. Why does it mater if advertisement algo company X or insurance tech company Y choose java/.net/ruby/php ? All these stacks are good enough and have been used countless times in varying scales.

For example if you are building something around nlp, probably pick python. Also, since you are all into ruby, maybe take a look around as to why other languages exist.

That's quite a specific use case and as a mainly backend web developer I don't hit many nlp problems. That's usually a whole specialisation of it's own.

> maybe take a look around as to why other languages exist.

I've been around. Still like Rails, works well for me. Thanks for the advice :)

Re: Show HN: Compile Ruby to C

#78

Earlier quoted context omitted.

What makes you say it is hard to maintain longer lived projects? (I used to be a RoR developer for a few years, so I'm curious about other people's experiences.)

It's mostly the "magical" parts like before/after hooks. When you are tracing a bug and are trying to do step-by-step debugging, it has been hell. Quickly jumping to definitions? Even RubyMine can't do it. Furthermore, as the project grows, you need to introduce something more/bigger than MVC and people put these files everywhere. Sure it's a management problem but it doesn't help that people don't do the right thing…

    It's mostly the "magical" parts like before/after hooks. 
I dislike a lot of the "magic" in Rails, but don't find before/after hooks very "magical" at all.

I guess when you get into inheritance perhaps. When you have an inheritance chain, which hooks are firing and in which order? That gets confusing fast. But, that also doesn't feel Rails-specific at all to me.

Rails gives you some ways to shoot yourself in the foot, but what language/framework doesn't?

    When you are tracing a bug and are trying to do step-by
    -step debugging, it has been hell.
I don't find this too much of an issue. It may be primitive but I just rely on debug output statements.

I have an expansion set up in my text editor that spits out `Rails.logger.debug("[jbootz] ")` and then I just do `tail -f log/development.log | grep jbootz`. I also have iTerm set up to highlight any lines containing "jbootz", so it stands out when it's mingled in with other output. (I just picked "jbootz" as it's a unique string)

In general that's the strategy for Rails debugging or really any dynamic language where the editor/IDE can't reason about the code like it can with a static language.... lots of debug output and then get a little creative with how you filter it in your terminal.

Helps to use an terminal app like iTerm that lets you use split panes so you can look at multiple filtered views of your log output at once if you like.

    Quickly jumping to definitions? Even RubyMine can't do it.
Yeah. I used to work in C# + Visual Studio + Resharper and oohhhhh boy, I often miss being able to lean heavily on the IDE/compiler.

Still, as far as definitions go? I don't know. I just grep for "def foo" (if I don't know what file it's in) or use my editor to jump right to the file where it exists (if I know where it is, which is usually the case)

Not as slick as the editor/IDE actually being smart, but I don't really find it to be a friction point.

Re: Show HN: Compile Ruby to C

#79

Earlier quoted context omitted.

It's mostly the "magical" parts like before/after hooks. When you are tracing a bug and are trying to do step-by-step debugging, it has been hell. Quickly jumping to definitions? Even RubyMine can't do it. Furthermore, as the project grows, you need to introduce something more/bigger than MVC and people put these files everywhere. Sure it's a management problem but it doesn't help that people don't do the right thing…

I agree Rails only does a great job on structuring when project is started But any large enough project needs rules for placing files/classes I don't see how Rails failed in that way I do agree there are some "magical" stuff like hooks that can be easily abused and introduce bad coding habits/patterns Wish I can turn them off per class (not for the whole app since they are still sometimes useful)

Yeah. MVC is not always the right tool for the job, but it's generally fine and IMO rarely a terrible fit.

I don't see how that's a Rails-specific problem.

Before Rails, working in the wild and wooly world of Microsoft web dev (with occasional PHP thrown in) I saw some real horrorshow web apps. People hacking together their own confusing and misthought architectures. And those horrorshows were rule and not the exception.

The standardized structure of Rails apps is such a breath of fresh air. It's so nice to step into a Rails codebase and basically know where most things are most of the time.

Admittedly it's also nice to step away from Rails for smaller, simpler apps.

Re: Show HN: Compile Ruby to C

#80
post #26

Earlier quoted context omitted.

Come on, use Rubymine or any other smart editor to find definitions..

I've been using Ruby in IntelliJ for nearly a year now at my new job. Up until literally the very most recent version of it, this has definitely not been enough to be able find some methods. Like, ... 'move' or 'read', or some other horribly overloaded function that is the one that I need to go and find the specific implementation of because it's busted. You need more than just Rubymine in many cases. And no, sometim…

I was fairly unhappy with RubyMine 4-5 years ago, when I last worked in Ruby long-term. Glad to hear it’s gotten better. I’ll have to revisit it, especially if there’s a CE for RubyMine.

To GP: there weren’t at the time any other options for a Ruby “smart-editor” AFAIK. However, like I mentioned in my comment, I’m giving Solargraph [1], a Ruby language server, a try, which is equivalent.

1: https://solargraph.org/

Post reply on HN