[HN Gopher] RubyJS-Vite
___________________________________________________________________
RubyJS-Vite
Author : thunderbong
Score : 78 points
Date : 2024-04-16 05:41 UTC (1 days ago)
(HTM) web link (filipvrba.github.io)
(TXT) w3m dump (filipvrba.github.io)
| hombre_fatal wrote:
| Imo, all documentation entry points like this link or a README
| should have the contents of this link's Introduction + Getting
| Started + Tutorial merged into the entry point page.
|
| It's always so jarring when you land on a page like this, read
| the quick blurb, and then have to look around to see where you
| need to click to read more entry-level content but without
| clicking too deeply into API docs.
| leipert wrote:
| Little confused as to why it has vite in it's name, it seems
| unrelated to https://vitejs.dev/
| runjake wrote:
| From the linked page:
|
| "Since the Vite tool is a secondary feature of the RubyJS tool,
| it is appropriate to refer to the combined tool as RubyJS-Vite"
| freedomben wrote:
| It's been a long time dream for me since about 2013 when I
| started getting deep into Ruby and Rails, to be able to write
| Ruby code for the frontend instead of JavaScript. I was a lover
| and adopter of CoffeeScript (which had it's flaws and
| imperfections), but that mostly got killed by ES6, and in truth
| ES7 and beyond made javascript a whole lot more tolerable so less
| need/motivation to use Ruby on frontend.
|
| I wrote some PoCs with Opal[1] that felt pretty good to write,
| but the overhead was rough (this was many years ago so things
| might be different now) and I never really felt like I didn't
| have to know about or care about the underlying javascript. I
| tend to discard leaky abstractions as I feel they often add more
| complexity than they were meant to cover in the first place.
|
| Has anybody used this or Opal or anything else? What is the state
| of "write your frontend in Ruby" nowadays?
|
| [1]: https://github.com/opal/opal
| bingemaker wrote:
| With importmaps (https://github.com/rails/importmap-rails) and
| Hotwire (https://hotwired.dev/), you write plain js and serve
| it.
|
| Also packages are served via CDN. There is no tree shaking.
| Rails got rid of the whole bundling step.
| aidog wrote:
| Ruby.wasm is here now, so you can run ruby in the browser. It
| still a bit big, but it even supports many regular gems. I met
| up today with a friend who is working on much smaller mruby
| version. He'll be giving a talk at rubykaigi next month.
|
| I use Ruby.wasm with my own patch. [1][2] You can use the
| Javascript API and the syntax is a joy. I used it to make an
| electron app with videoplayer.[3] I also ported the
| rubykoans[4]
|
| Lots of ruby.wasm talks at rubykaigi next month.
|
| [1] https://github.com/largo/ruby.wasm
|
| [2] https://github.com/largo/ruby.wasm-quickstart.
|
| [3] https://github.com/largo/PsychometricStudyVideoPlayer
|
| [4] https://koans.idogawa.com
| quechimba wrote:
| I'm working on a framework inspired by React/Next.js which
| turns Haml into Ruby. It's 100% server side, but it runs pretty
| fast. I'm currently working on a rewrite, I just wish I had
| more time to work on it.
|
| https://github.com/mayu-live/framework
|
| https://mayu.live/
| pelagicAustral wrote:
| Was the Haml use (as opposed to ERB) a technical decision, or
| is it based on personal preference? Product looks really nice
| btw.
| simultsop wrote:
| What a time to be alive, js turning into binary. So many
| runtimes, so many compiling strategies, like who would have
| thought this? It's been a crazy rollercoaster. First block this
| unsafe scripting language, then lets make this scripting language
| available everywhere.
| Alifatisk wrote:
| What did you refer to when saying "js turning into binary"?
| constantlm wrote:
| WASM?
| None4U wrote:
| I think they are referring to the use of JS as a compile
| target
| Alifatisk wrote:
| I can't describe the feeling I get every time I see a bizarre
| project in the Ruby world, excited / thrilled is the closest
| feeling.
___________________________________________________________________
(page generated 2024-04-17 23:01 UTC)