Earlier quoted context omitted.
In your experience, is there good resource for discovering the "de-facto" hex packages for a particular requirement - I end up Googling things like "Phoenix paperclip equivalent" and then evaluating all the various ones. Alternatively are there some good "kitchen sink" open source projects that implement many of the typical web application features like auth, uploads, etc. ? Companies like thoughtbot have been a gold…
Sadly there aren't many better ways. For the moment the best course of action is to search on ElixirForum. Even if I love the language and still look for ways to work with it (in my new job where it isn't used) I recognize that the ecosystem is not that big. For auth, the core Elixir team has made one prototype but I am not sure if they'll pursue it further. Outside of that, use Pow. For file attachments: Waffle. Aut…
Show HN: Compile Ruby to C
101–110 of 110 posts
Re: Show HN: Compile Ruby to C
#102The 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 answers your question indirectly. I’ve included a link below to Amber Web Framework, built on Crystal. Crystal is a statically typed language with the speed of C and the exact same syntax as Ruby.
Check out the video a couple screens below, and you’ll see a demo of how quickly an Amber Blog App is generated. You’ll notice their is almost no difference between Rails syntax and Amber syntax.
Re: Show HN: Compile Ruby to C
#103Earlier quoted context omitted.
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 RubyM…
I use pry/byebug extensively as well.
There are times when I prefer debugging via debug output statements and times when I prefer interactive debugging.
Re: Show HN: Compile Ruby to C
#104Earlier quoted context omitted.
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.
Generally each web app had its own organizational structure. Everything was still "page-based" so your site's file structure would mirror the actual URLs: the code for your product page would be "/product.asp" and your shopping cart page would be "/cart.asp" or whatever. Those files had intermingled markup and code extremely similar to ERB files in Rails.
Conscientious developers of that era would of course extract as much functionality as possible into shared include files. Even in those savage days we tried to separate logic and presentation whenever possible. Early PHP dev worked much the same way.
Needless to say this generally lead to spaghetti code. You certainly could make very maintainable ASP/PHP sites, with a lot of effort -- just like you can find some very maintainable and well-structured shell scripts. But, even so, each "well-structured" ASP/PHP site would have its own structure and it was quite a learning curve jumping into a new one, if you ever had to look at somebody else's code.
Early ASP.NET apps used an even more bizarre set of Microsoft constructs. Code-behind files, etc. Yuck.
Later came ASP.NET MVC which was quite good IMO. It borrowed liberally from Rails which was a good thing.
In Ruby land I developed with both Sinatra and Rails. Sinatra is great and a lot of fun, but you are totally on your own w.r.t. structuring your app. Once your Sinatra app grows past a certain complexity, you will generally just find yourself reimplementing large parts of Rails and encountering the same problems w.r.t. structuring your app.
Rails and MVC are not perfect -- many say other variations like MVVM/MVP/etc are better. Perhaps so. I've certainly had pain points with Rails (too much "magic", high RAM usage) but as far as structuring my applications.... no.
Re: Show HN: Compile Ruby to C
#105Earlier 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.
Depends why you love Ruby. If you love it because you adore programming languages with red logos then yes, bad choice. But if you love it because it lets you work quickly and performs well then that is a reason to pick it. Not to mention, if you’re a solo developer or a small team, picking a language everyone knows and likes absolutely is a good reason. It’ll save you a lot of time.
Now I'm not saying you can't ever grow out of your friends (or languages), I just haven't outgrew Ruby.
Re: Show HN: Compile Ruby to C
#106The 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, 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. This answers your question indirectly. I’ve included a link below to Amber Web Framework, built on Crystal. Crystal is a statically typed language with the speed of C and the exact same syntax as Ruby. Check o…
Re: Show HN: Compile Ruby to C
#107The 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, 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. This answers your question indirectly. I’ve included a link below to Amber Web Framework, built on Crystal. Crystal is a statically typed language with the speed of C and the exact same syntax as Ruby. Check o…
I would be very careful with that statement, because it's simply not true (example: no type-related syntax in Ruby).
Re: Show HN: Compile Ruby to C
#108Earlier quoted context omitted.
>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. This answers your question indirectly. I’ve included a link below to Amber Web Framework, built on Crystal. Crystal is a statically typed language with the speed of C and the exact same syntax as Ruby. Check o…
Is there anyone notable using it in production?
Re: Show HN: Compile Ruby to C
#109Earlier quoted context omitted.
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.
But once you reach that level of scale you have (or should have!) the resources to redevelop services that are holding you back. Not choosing Rails because you intend some day to get to Twitter scale smells of premature optimisation. (Twitter themselves used Ruby!)
Re: Show HN: Compile Ruby to C
#110Earlier quoted context omitted.
Thorsten Ball's writeup [1] on the architecture behind Unicorn is one of the single most informative pieces I've ever read about fork-based multiprocessing, signals, and pipe-based ipc. The information there can be applied to any platform and, imo, is a must-read for anyone operating in a *nix environment. [1] https://thorstenball.com/blog/2014/11/20/unicorn-unix-magic-...
How is it any different from when Apache 2.0 got introduced?