Live data from Hacker News

Show HN: Compile Ruby to C

github.com

81–90 of 110 posts

Re: Show HN: Compile Ruby to C

#81

Earlier quoted context omitted.

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?

Language servers provide generic autocomplete and other language-specific functionality (e.g. rename a method, find all references to a symbol within your project, find where a symbol is defined, etc) to any editor that supports them. The reference implementation is VSCode, so if you use VSCode you can definitely use language servers, but now that’s it’s picking up steam, support is getting added to other editors, e.g. see vim-coc.

The Ruby language server in question: https://solargraph.org/

Re: Show HN: Compile Ruby to C

#82
post #39

I wish there would C to GO compiler, that would make my day.

c to go transpiler exists https://github.com/elliotchance/c2go

i have discovered it just today, lol. but it kind of works and mostly not, unfortunately. it would be AWESOME if Go core team would implement something like this into Go itself, since Go is just better C anyway, with GC. that would revolutionize the programming world, i think. i still dont understand why we dont have transpilation between the major languages being something one does not even have to think about, it just IS and WORKS.

Re: Show HN: Compile Ruby to C

#83

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.

I'm sure if joel loves rails, it must be working for him.

If it didn't, surely he'd hate it, no?

Re: Show HN: Compile Ruby to C

#84
post #83

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.

I'm sure if joel loves rails, it must be working for him. If it didn't, surely he'd hate it, no?

No. You can continue to build everything with the language you love. But there are cases where a certain thing is just easier to get done in a particular language. And there is nothing about hating any language.

Re: Show HN: Compile Ruby to C

#85
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 obvious performance and bloat overhead with RoR aside.

Does the bloat matter in the end tho?

You can build a million dollar business on a single $20 / month DigitalOcean server to run everything with tens of thousands of users. That's what Chris did from https://gorails.com. We talked about his Rails driven tech stack on the Running in Production podcast[0].

Recently he tweeted out he generated a million dollars from his business[1].

If you can get 100ms or less p95 response times without a complicated infrastructure then the only thing that matters is the ecosystem, community and how much you enjoy using that technology. If performance is a web framework's biggest feature then I think they're fighting an uphill battle. Performance isn't that important for most applications as long as you can produce a nice feeling application that responds quickly. All modern frameworks have a means to do that. Now it comes down to how fast can you build it and how nice is it to maintain.

[0]: https://runninginproduction.com/podcast/12-learn-ruby-on-rai...

[1]: https://twitter.com/excid3/status/1295730795148193792

Re: Show HN: Compile Ruby to C

#86

Earlier quoted context omitted.

> However, recently I started a project with Ruby, thanks to language servers What do u mean exactly?

Language servers provide generic autocomplete and other language-specific functionality (e.g. rename a method, find all references to a symbol within your project, find where a symbol is defined, etc) to any editor that supports them. The reference implementation is VSCode, so if you use VSCode you can definitely use language servers, but now that’s it’s picking up steam, support is getting added to other editors, e.…

Interesting. Do u know what Rubymine is using ? it's own in-house solution?

Re: Show HN: Compile Ruby to C

#87
post #85
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 obvious performance and bloat overhead with RoR aside. Does the bloat matter in the end tho? You can build a million dollar business on a single $20 / month DigitalOcean server to run everything with tens of thousands of users. That's what Chris did from https://gorails.com . We talked about his Rails driven tech stack on the Running in Production podcast[0]. Recently he tweeted out he generated a million dolla…

I guess it depends on what you build. At the scale of GitHub and Twitter or Shopify there are probably significant challenges caused by said bloat.

Re: Show HN: Compile Ruby to C

#88
post #87
post #85

Earlier quoted context omitted.

> The obvious performance and bloat overhead with RoR aside. Does the bloat matter in the end tho? You can build a million dollar business on a single $20 / month DigitalOcean server to run everything with tens of thousands of users. That's what Chris did from https://gorails.com . We talked about his Rails driven tech stack on the Running in Production podcast[0]. Recently he tweeted out he generated a million dolla…

I guess it depends on what you build. At the scale of GitHub and Twitter or Shopify there are probably significant challenges caused by said bloat.

I would argue that there isn’t a framework in existence that is actually built to cleanly scale to the size of any of those companies. If there is one that claims to, it is probably lying.

Re: Show HN: Compile Ruby to C

#89

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…

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,…

> 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)

... that seems unnecessarily complicated compared to using byebug, or hell, the RubyMine debugger.

Re: Show HN: Compile Ruby to C

#90

Earlier quoted context omitted.

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 except…

What do u use outside Rails and how was your experience? It's a bit embarrassing I only did Rails with Ruby.
Post reply on HN