|
what was the deficiency regarding the combo box? are there generators for rails that spit out react/typescript front ends?
|
# ? Oct 7, 2023 18:10 |
|
|
# ? May 15, 2024 04:22 |
|
KoRMaK posted:what was the deficiency regarding the combo box? Stimulus is worse than react or other state based js tools basically, and the smaller community means you're not as likely to find premade stuff. But I think maybe mounting react components for that stuff inside a mostly server-driven frontend could work. The other thing that sucks but is maybe solvable is some of the tooling. Like with a react component when I hit save it fires off prettier, and if prettier doesn't do its thing I know my markup is invalid. Couldn't get that working for erb templates. Maybe slim or haml is the answer there. I've basically been out of the loop on frontend rails for the last 6 years or so.
|
# ? Oct 7, 2023 20:14 |
|
prom candy posted:Anyone out there still using Rails? I can't decide if I want to double down on my almost 20 years of experience with it and just ride out the rest of my career as a Rails expert or if I should delete it from my resume. It seems like there's lots of lucrative opportunities working on and modernizing legacy Rails apps but at the same time working on legacy Rails apps can be hell. My employer is just now starting a new Rails application to replace a dotnet application. Ruby is still growing, just not as fast as *insert latest fad*.
|
# ? Oct 7, 2023 22:37 |
|
We still run the world’s biggest Rails app, I think. Good stuff, though I really need to learn it better.
|
# ? Oct 7, 2023 22:54 |
|
if you don't want a monolith, just make an eco system of tinier rails apps, right?
|
# ? Oct 7, 2023 22:57 |
|
oh I very much want a monolith in terms of the software architecture, even if we deploy it “unevenly” for routes that get different traffic levels Black Friday/Cyber Monday should put up some good numbers this year, especially with YJIT coming along so nicely
|
# ? Oct 7, 2023 23:04 |
|
Nice, I used to work there. I remember arguing with the CTO in my last few months because he was insisting we would never use "microservices" and I showed him my dev environment with not only the core monolith but like 18 other services necessary for the feature I was working on (money related which made it far worse); he was kinda furious about how everyone stealthed into services but like holy poo poo that monolith was brutal to work with in the pre-Spin days.
|
# ? Oct 7, 2023 23:47 |
|
Spin still hurts a bit, but not as much as running 200 services with slightly different conventions. You can still reliably rile up the CEO by suggesting a microservice for something. dev up will work for me some day, but today is not the day.
|
# ? Oct 8, 2023 01:10 |
|
quote:after getting into typescript i was kinda like "gently caress this i'm sick of all the indirection of rails I don't want to do this anymore" Comparing that and when I work on the Rails part off the app is night and day in terms of ease work and productivity in general. Now I thought it's just due to me being more experienced with Rails, but internal polls in the company (100+ devs) say pretty much the same. People are in general happy with the BE part, but frustrated with FE. Of course it could be due to our setup and React could be a joy to work with in other circumstances but it sure doesn't feel that way to me. From what I heard of Node projects it's not much better. A bunch glued on libraries, that end up looking like a frankenstein Rails anyway but without the standards to quickly figure out a way around. Gmaz fucked around with this message at 09:42 on Oct 8, 2023 |
# ? Oct 8, 2023 09:39 |
|
Gmaz posted:Funny, that's how I feel about our current React (TS) setup at work and not Rails. Between auto generated types from BE to FE, all the libraries for tables/forms, our own hacks built over the top of those libraries and the interdependence between different libraries it's really complex and counter intuitive to figure out a flow of data. Like something as simple as a table, I have to go to through 5 files to figure where the data is coming from and how it's setup. You want do something that would be trivial in plain old HTML? gently caress you! Type checker is nice, but often times it just gets in the way with indecipherable errors that are usually about simple and inconsequential things. The thing I like about TS is the way everything is explicitly imported, meaning you can always easily follow the thread of "where is this defined?" It's still absolutely possible to build layers upon layers of bullshit like you describe, but at least there's a thread to follow. Meanwhile even when running the Ruby LSP in VSCode because of inheritance and mixins and so many global contexts you can occasionally command click on a symbol and it just goes This is especially annoying if you wind up on a project where people decided to solve the fat model problem by just splitting the model's methods into various concerns (one of Rails' absolute biggest mistakes imo) meaning the actual implementation of the class is now broken up into a bunch of different files and because there are no actual hard boundaries they're probably all reliant on one another. There's no avoiding playing code detective when you're working on established systems but in Rails I find it can be a lot more frustrating than TS.
|
# ? Oct 8, 2023 14:45 |
|
I've fully swapped over to TS on the whole stack for my own stuff. Between Next and Remix, it's just as straightforward for me to get going there as it is in Rails. I still like rails, but Remix is just as easy.
|
# ? Oct 10, 2023 15:27 |
|
I'm the opposite. I started off with JS/TS for all of my own stuff (and professionally) but I just recently in the past month or so started to swap over to Rails for anything I'm making now. Once I got past the magic of Rails I have been able to build out an MVP for a personal workout app faster than I would have in either NestJS or Elsyia and have found Turbo to be a really nice feature.
|
# ? Nov 19, 2023 04:34 |
turbo is cool. I haven't gotten to the "stimulus" part of "hotwire" yet. is all this really better than doing a create-react-app ?Pardot posted:Is it merging them down to a single one with commas? https://github.com/lostisland/faraday/issues/1120 sorry didn't reply before but I was having trouble getting at any value in the list after the first one. and I would have been happy to split it myself but I couldn't find a way to get at a raw header value either.. I haven't had to page through okta api user lists since then but I am going to have get it working on the library sooner than later lol. might have to use the standard http lib for that request. but theres a company policy (a policy I made up) to not use other http libraries than faraday lmao. standard lib doesn't count A MIRACLE fucked around with this message at 06:23 on Nov 19, 2023 |
|
# ? Nov 19, 2023 06:15 |
|
I'm just now leaving a 6 year stretch in pure Rails server side development for a JS/TS job. I've avoided learning any of the Hotwire stuff because we only had a very limited amount of interactivity required and it was doable with JS/jQuery stuff. When I look at descriptions of Hotwire technologies, it makes sense to a point, but "turbo streams" are they start to lose me and then stimulus is a Whole Thing. The Stimulus example on that page looks nasty in that you gotta learn a whole funky grammar that wouldn't translate to any other framework. Maybe there are advantages over Doing A React, but I would have to see a more complicated example to know how far it can be pushed with this syntax. They say it's only for "interactions that are relatively small" -- I presume you couldn't use Stimulus to implement something like a drag-drop list that persisted back to the server on every drop?
|
# ? Nov 19, 2023 06:45 |
|
A MIRACLE posted:turbo is cool. I haven't gotten to the "stimulus" part of "hotwire" yet. is all this really better than doing a create-react-app ? It really depends, they are different tools for different use cases. A react SPA is definitely going to be a better fit for highly interactive applications, if you were making something that looked like Google Maps, or Figma, or anything else where most interactions don't really feel like navigating pages, that's going to be a pain in the rear end with "vanilla" Rails even with all the Hotwire stuff. If your app feels like navigating between pages primarily and has smaller bits of interaction sprinkled in, and especially if you're not working on a team that splits into front-end and back-end developers, you'll be way more productive with Rails. There's honestly not that much to Stimulus and more and more I find that you can often do things more effectively with Turbo. Any stimulus controller that communicates with the backend is a smell IMO.
|
# ? Nov 19, 2023 13:13 |
|
I played with Stimulus a little bit and I really didn't like it. I think I'd probably go for something like Alpine if I needed the "JS sprinkles" approach but I'd honestly rather just use React.
|
# ? Nov 20, 2023 05:08 |
|
Yeah, it's definitely one part of Hotwire that you can take or leave, it doesn't really tie into the other stuff much at all. I can't imagine heavy use of React and Turbo playing nice together though. React generally wants to control the DOM of anything it's mounted on and have JS fully control what the user sees, and Turbo is built around the server generating HTML and adding that to the DOM so they're pretty fundamentally different approaches.
|
# ? Nov 20, 2023 12:54 |
|
enki42 posted:Yeah, it's definitely one part of Hotwire that you can take or leave, it doesn't really tie into the other stuff much at all. I think if I was going all in on Rails I would maybe use React just for specifically complex UIs and turbo for other stuff. Last month I was posting about coming home to Rails but after spending more time with it I think I'm just going to be starting new full-stack projects with Remix. The nice parts of Rails are really nice but ultimately I just like working in TypeScript that much better. Edit: All that said I'm working on a legacy Rails project with jQuery today and I can see why people who skipped out on going full JS find Stimulus pretty nice to work with. It's a big jump over this nonsense. prom candy fucked around with this message at 23:06 on Nov 20, 2023 |
# ? Nov 20, 2023 21:37 |
|
Yeah, that's definitely possible, and can work. Where I've found it falls flat is when dealing with forms and submitting data to the server. Rails really wants to use a traditional HTML form, and React really wants to do server interaction via fetch. It's possible to make either do the unnatural thing, but you miss out on a lot of tooling and hit some sharp edges. But I used React to build a media player in an otherwise JS light Rails app and it worked great. I like Stimulus but I agree when I try to do something complicated with it I want to use React. It's good for the "once in a blue moon I will want to write 30 lines of Javascript for a particular interaction" but if it's more than that it's painful.
|
# ? Nov 25, 2023 15:16 |
Applied to a job at <popular rails hosting company> and got a form response rejection. Not even an HR screen? Maybe I’m slipping..
|
|
# ? Dec 20, 2023 21:36 |
|
I want to obfuscate IDs in my URLs without having to either change my primary key types or add slug attributes to my models and use those. In the past, I've used the hashid gem for this and it worked well, but I see it hasn't been maintained in 4 years. Anybody else know of an actively maintained gem they like for this purpose?
|
# ? Jan 2, 2024 20:18 |
|
Steely Dad posted:I want to obfuscate IDs in my URLs without having to either change my primary key types or add slug attributes to my models and use those. In the past, I've used the hashid gem for this and it worked well, but I see it hasn't been maintained in 4 years. Anybody else know of an actively maintained gem they like for this purpose? from that link it looks like they renamed the project to "sqids", which is maintained
|
# ? Jan 2, 2024 20:24 |
|
Steely Dad posted:I want to obfuscate IDs in my URLs without having to either change my primary key types or add slug attributes to my models and use those. In the past, I've used the hashid gem for this and it worked well, but I see it hasn't been maintained in 4 years. Anybody else know of an actively maintained gem they like for this purpose? https://github.com/excid3/prefixed_ids
|
# ? Jan 2, 2024 20:26 |
|
Perfect, and I'm already using Jumpstart. Thanks!
|
# ? Jan 2, 2024 20:42 |
|
what about signed global ids? https://github.com/rails/globalid#signed-global-ids
|
# ? Jan 2, 2024 20:46 |
|
Interesting! Hadn't seen those before. I think I'm leaning towards the simplicity of excid3's gem, but it's good to know about this one, too.
|
# ? Jan 2, 2024 21:01 |
|
Steely Dad posted:Perfect, and I'm already using Jumpstart. Thanks! Nice! Haven't used this, I just happened to see it on twitter or something recently and thought it looked good.
|
# ? Jan 2, 2024 21:17 |
|
I'm trying to do something that I feel should be easy but I'm clearly loving something basic up. I have a rails 7 app and I am trying to use a node package called TipTap in it, using these installation instructions. I have run: code:
code:
code:
Edit: Motherfucker, just code:
Sub Par fucked around with this message at 18:07 on Jan 6, 2024 |
# ? Jan 6, 2024 17:25 |
faraday is driving me up the wall today. it was decoding and re encoding my URL params in ways that are incompatible with the API i'm calling, so I thought, ok I will try writing a custom param encoder. which it is hitting but then not respecting at all. like why does it do thisRuby code:
code:
A MIRACLE fucked around with this message at 18:53 on Feb 20, 2024 |
|
# ? Feb 20, 2024 18:41 |
|
I upgraded to rails 6 and this new console behavior is driving me up the wall - it has autocomplete and pager enabled. I've disabled autocomplete, but can't figure out how to disable the pager behavior. I added the following to my ~/.irbrc file. Is there a way to config this in the actual app rather than needing people to edit their irbrc file?code:
KoRMaK fucked around with this message at 18:49 on Mar 2, 2024 |
# ? Mar 2, 2024 07:09 |
|
You could throw it in an initializer, and check if ::Rails::Console is defined:code:
|
# ? Mar 12, 2024 11:42 |
A MIRACLE posted:Applied to a job at <popular rails hosting company> and got a form response rejection. Not even an HR screen? Maybe I’m slipping.. lol just wanted to update, i guess a real person finally read my stupid markdown resume and was like when can we talk??
|
|
# ? Mar 29, 2024 23:45 |
|
|
# ? May 15, 2024 04:22 |
|
Nice !
|
# ? Apr 4, 2024 11:32 |