Aminda has quit [Remote host closed the connection]
Aminda has joined #ruby
johnjaye has joined #ruby
dalan038228335 has quit [Quit: dalan038228335]
jenrzzz has joined #ruby
dalan038228335 has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
pgib has joined #ruby
ionface has quit []
grenierm has joined #ruby
Linux_Kerio has joined #ruby
hightower4 has joined #ruby
hightower3 has quit [Ping timeout: 272 seconds]
dalan038228335 has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
tromp has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Remote host closed the connection]
georgemp has joined #ruby
<georgemp>
Hi. My googling is failing me here..sorry for the basic question :-) How would I go about getting VSCode to give me autocomplete suggestions for method parameters. For example `def please_print(name)`, I'd like to indicate somehow that `name` will be a string so that when i type `name.` I get completion suggestions from the String class. Is this possible?
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tromp has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
osc4rpt has quit [Ping timeout: 260 seconds]
osc4rpt has joined #ruby
_ht has joined #ruby
jenrzzz has joined #ruby
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tromp has joined #ruby
ollysmith has quit [Quit: ZNC 1.8.2+deb4+b2 - https://znc.in]
Linux_Kerio has quit [Read error: Connection reset by peer]
ollysmith has joined #ruby
Linux_Kerio has joined #ruby
ollysmith has quit [Client Quit]
ollysmith has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
Linux_Kerio has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
grenierm has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
mange has joined #ruby
jenrzzz has joined #ruby
mange has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
osc4rpt has quit [Ping timeout: 256 seconds]
osc4rpt has joined #ruby
dalan038228335 has joined #ruby
dalan038228335 has quit [Read error: Connection reset by peer]
dalan038228335 has joined #ruby
dalan038228335 has quit [Client Quit]
donofrio_ has joined #ruby
dalan038228335 has joined #ruby
donofrio__ has quit [Ping timeout: 260 seconds]
osc4rpt has quit [Ping timeout: 240 seconds]
osc4rpt has joined #ruby
dalan038228335 has quit [Quit: dalan038228335]
dalan038228335 has joined #ruby
Linux_Kerio has joined #ruby
infinityfye has joined #ruby
hightower3 has joined #ruby
hightower4 has quit [Ping timeout: 260 seconds]
szkl has quit [Quit: Connection closed for inactivity]
znpy has joined #ruby
ih8u has quit [Ping timeout: 255 seconds]
ih8u has joined #ruby
donofrio__ has joined #ruby
donofrio__ has quit [Remote host closed the connection]
donofrio__ has joined #ruby
monr0e has joined #ruby
donofrio__ has quit [Remote host closed the connection]
donofrio_ has quit [Ping timeout: 246 seconds]
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hightower4 has joined #ruby
Vonter has joined #ruby
hightower3 has quit [Ping timeout: 264 seconds]
Guest46 has joined #ruby
Guest46 has quit [Client Quit]
Guest46 has joined #ruby
Guest46 has quit [Quit: Client closed]
Guest46 has joined #ruby
hightower3 has joined #ruby
Guest46 has quit [Client Quit]
hightower4 has quit [Ping timeout: 260 seconds]
hightower4 has joined #ruby
hightower3 has quit [Ping timeout: 264 seconds]
CrazyEddy has joined #ruby
tromp has joined #ruby
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
cxl has quit [Ping timeout: 268 seconds]
cxl has joined #ruby
<[0x1eef]>
short answer: I don't know. But you might have more luck if there are RBS definitions for 'name'.
<georgemp>
[0x1eef]: thanks. But, that seems a lot of effort though :-) so, is the general practice to just know the method signatures you want to use and type it in?
<[0x1eef]>
Yeah. That's normal in Ruby. But I think effort is being made for better support for what you expect, and RBS probably helps in that regard.
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rvalue has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
crespire has joined #ruby
sam113101 has quit [Quit: WeeChat 4.1.2]
sam113101 has joined #ruby
crespire1 has quit [Ping timeout: 260 seconds]
<adam12>
georgemp: This is getting better, slowly, but it's not perfect yet. Ruby is very dynamic, and is difficult to do static analysis on it (like how one might do it on Javascript or Typescript). Try this article: https://railsnotes.xyz/blog/vscode-rails-setup
<[0x1eef]>
Is JavaScript any different to Ruby when it comes to that ? I wouldn't think so. TypeScript obviously fairs better since everything is type'ed.
<adam12>
[0x1eef]: I think it might be better for core classes but maybe not for user-specific code.
<adam12>
But there's a lot less metaprogramming in Javacript so I think the static analysis is more reliable.
<adam12>
ps aux | grep -c 'defunct'
<adam12>
71
<adam12>
the heck
rvalue has quit [Ping timeout: 268 seconds]
<adam12>
I was about to blame ruby-lsp for that, but it looks like the culprit is Chrome.
<[0x1eef]>
That makes sense. Somehow I think a ton more effort went into JS support in VS Code.
<[0x1eef]>
Do what I do. Blame systemd.
<georgemp>
adam12: Thanks..will take a look at that
<georgemp>
[0x1eef]: with javascript, I believe we can provide comment style documenatation for the funcs, and specify the type in there. Code Completion then picks up the right methods for the params
<[0x1eef]>
Ah nice. Ruby has YARD which is similar but never saw that kind of support.
<[0x1eef]>
I wonder if something exists to take yard docs and generate rbs from them. That'd be nice.
royo25 has joined #ruby
royo25 has quit [Client Quit]
desnudopenguino has joined #ruby
tromp has joined #ruby
szkl has joined #ruby
kaivai_ has quit [Remote host closed the connection]
kaivai has joined #ruby
<adam12>
You can get Solargraph to read YARD tags.
<adam12>
Which is kind of like how JSDoc works.
hightower3 has joined #ruby
hightower4 has quit [Ping timeout: 260 seconds]
Linux_Kerio has quit [Ping timeout: 264 seconds]
<[0x1eef]>
Ah interesting. First time I heard of solargraph. Looks like a solved problem.
<[0x1eef]>
I could imagine writing YARD docs that generates RBS being a nice workflow.
<adam12>
I think my main issue is Loader is a special case here.
<adam12>
Since it could be integral to how the rest of the code is loaded, so it can't wait until the "end" of the application boot cycle necessarily.
<adam12>
Tho as I talk about this, if you wanted to pre-configure Loader, you'd just do it. And if you didn't want to configure Loader, you'd get the default.
<adam12>
Pre-configuring the Loader actually wouldn't work. Bleh.
<adam12>
Almost need to invert it and have some sort of pre-configured hook. The Loader would look for some sort of callback method and call it, and just make sure the Loader was loaded at the end.
<monr0e>
ok, so I got ruby working in userland. Now I'm looking at web app stuff. I need to avoid MVC, and use a webforms-style approach. Can I do this with Rails, despite it being primarily an MVC structure?
<adam12>
Shitty part about framework design I guess.
<adam12>
monr0e: Why webforms-style?
<monr0e>
adam12: Separation of modular components, and I'm doing a direct move from a .NET webforms app to ruby
<monr0e>
also ngl, I don't really likemvc
<adam12>
monr0e: This might be an uphill fight, tbh.
<[0x1eef]>
adam12: Yeah auto-loading constants is an annoying problem.
<adam12>
monr0e: You don't need to use Rails. There's Sinatra and a myriad of other Ruby routing libraries where you can build your own design. I am not sure how you'd recreate webforms tho.
<adam12>
monr0e: Ah. That's just standard Rails forms. Rails ships with a form builder that handles conveniences for you (ie. matching id's for inputs and labels).
<monr0e>
Honestly I don't necessarily need to wholly recreate it, I just need the static page concept. The page isn't actually static, its just that I use in-page tooling for much of the stuff
<monr0e>
i.e. I write a fair bit of JS
<adam12>
Oh, I got you.
<adam12>
In that case, I'd either use the built-in Rails Turbo, or something like Unpoly or HTMX (both backend agnostic)
<monr0e>
hmmmm. Sinatra looks close to, I'm just a bit lost about how to manage the session
<adam12>
monr0e: You'd need to `enable :sessions` (or whatever it is)
<adam12>
monr0e: Do you have a data layer?
<monr0e>
adam12: In a manner of speaking, yes. Under VS, data transit is managed mostly automatically, although I had some session hijacking within a few files to manage things like auto-refreshing of individual components etc. I haven't even started the ruby project yet, I'm just trying to figure out what route to take with all of this.
<adam12>
monr0e: Are you communicating with a database?
<monr0e>
yes, although in asp that's somewhat separate
<adam12>
monr0e: Do you normally bring it in by hand in ASP?
<monr0e>
also I'm a bit fucky with terminology, everything I've ever learned is self taught so
<monr0e>
er
<adam12>
You really only have two paths at this point. Ruby on Rails, which will bring in the routing layer, view layer, and data layer. Optionally it will bring in the "webform" like layer (which isn't comparable but will probably be a close match). You'll need to go through the Guides but it's almost as simple as `rails new your-app`.
<adam12>
The other path is build your own. You'll need to choose your routing view (Sinatra, Roda, other), your view layer (ERB, Haml, Slim, Phlex, other), and your data layer (Sequel, ActiveRecord), and then your "webform" layer (Unpoly, Turbo, HTMX).
<adam12>
The latter is very appealing but beware of dragons. It's easy to get caught in the weeds and make poor choices (ie. security) that have been solved in Rails for you.
<monr0e>
reet. The latter is probably more appropriate for this project. As it stands, in .net one is obliged to manage connections, transactions, and returning data to any DB backend manually
* rapha
will still vote for the 2nd approach. And building something with Sinatra (and Roda, from what I've seen) is not badly documented at all.
<monr0e>
there's also the active directory tangent to consider, which will likely be a single standalone application in its own right
<monr0e>
plus api calls, etc etc etc
<rapha>
Sinatra + HAML + Sequel is the combo I most enjoyed. Perhaps at some point I'll get a chance to try Roda + HAML + Sequel.
<monr0e>
phew. I've been spoiled by VS, most definitely. All of this is managed mostly by library statements
<rapha>
VS?
<monr0e>
Visual Studio
<rapha>
oic
<adam12>
monr0e: Possibly. Rails does this for you too.
<adam12>
monr0e: But they are definitely not equivalent. There is a blessed path in Rails.
<rapha>
but doesnt that then also mean you're forced into one concept, one dogma, one way of thinking and doing things, monr0e?
<adam12>
monr0e: Why the rewrite?
<monr0e>
woof, one at a time!
<monr0e>
ok, so
<rapha>
(apologies for getting into the middle of the conversation)
<adam12>
rapha: you might need to keep it going since I have to start dinner in 6 minutes :)
<rapha>
fair enough
<rapha>
otoh i'm starved
<rapha>
and just had the 2nd unsuccessful date in 3 days, so, pretty sad, too. but that's perhaps a little too ot.
<adam12>
I was hoping to get a little further on this project but at least I extracted some framework plugins I needed.
<rapha>
your productivity is beyond, anyways, adam12. go have your dinner, you've earned it!
<rapha>
when you're back, i think i have a new graphql-ruby "philosophy" question :)
infinity_fye has joined #ruby
<monr0e>
rapha: in c#, there's definitely a few ways of doing things. However, when I said "managed by library statements", what I mean is, I can add SQL functionality by including the line "using System.Data.SqlClient" at the top of my class document. Or, alternatively, I can go to NuGet and grab any equivalent library I wish - there are hundreds. When I say "spoiled by VS", I actually refer to quite a few things - JIT compilation, for example, gives me
<monr0e>
anything from auto-completion to automatic detection of syntax errors. I can add a data connection to an MS-SQL backend by simply adding the connection string in a configuration file, and then instantiating it in a setup class. A lot of thought has gone into efficiency, which makes the grunt work a lot easier. However, it remains mostly closed-source, which brings me on to
infinity_fye has quit [Remote host closed the connection]
infinity_fye has joined #ruby
infinityfye has quit [Ping timeout: 264 seconds]
<monr0e>
adam12: Because I moved to linux. I did try getting VS to work in a VM with cassowary and then winapps, but VS is a fucking nightmare under the hood and it does not play nicely with friends. Also, both winapps and cassowary have issues on a multi-monitor setup under X11, and don't seem to work at all under Wayland. That said, I can't get into Wayland anyway, because I decided to go with an nVidia card after my r9 cannibalised itself
<rapha>
hmm, ok, that's a lot VS does for you then. i've been on linux since 199...6, i think, so all of that is a bit of a foreign world for me.
<[0x1eef]>
Yeah. *nix world has alternatives but they're usually less integrated and require a bit of work to be optimal.
<rapha>
that being how it may, perhaps then, adam12 is right, and Rails would be the less painful path for you. because it *does* do a lot for you. and Visual Studio Code can easily be outfitted to make Rails do even more for you and actually be fairly integrated as well.
<monr0e>
honestly, there's absolutely nothing like VS. I've been playing around with different IDEs on linux and there's simply nothing comparable - so I'm resorting to payware to see if I can get soem of that magic back. RubyMine looks... ok(ish)
<[0x1eef]>
I tried VS for a while, and for a time I was hooked but now I'm back using emacs and kind of hate using VS.
<rapha>
at my current dayjob they mostly use RubyMine. i far prefer VSCode as far as IDEs go, but mostly end up on the terminal with vim open. but that's just how i grew up and i think these things are down a lot to what makes you feel warm and fuzzy inside. no "right" or "wrong" here.
<monr0e>
rapha: Ah, there's the rub. Webforms is out of date even by Microsoft standards, and MVC (and Razor) has been the big cheese in .NET webdev for a decade now. Like I said, though, I jsut don't really like MVC. It feels too human, and given the aspergers, I don't particularly like that :)
<monr0e>
btw, VSCode is awful
<rapha>
[0x1eef], do you mean Visual Studio or Visual Studio Code?
<monr0e>
VS =/= VSc
<[0x1eef]>
Oh sorry - yeah, Visual Studio Code is all I've used.
<monr0e>
there's none of the nice stuff with VSCode, and frankly I don't know why microsoft ever bothered making it. It's kinda phat.
<[0x1eef]>
I think it fit a niche that Atom also filled.
<monr0e>
I dunno how, its basically a code-formatted text editor
<monr0e>
I do use it for non-application websites, but I haven't stuck it on this machine yet
<[0x1eef]>
It works out of the box, tons of plugins. The editor space before that was missing it.
<monr0e>
hmmm. Maybe. I tried a few plugins with it back on windows, and nothing ever really worked right
<monr0e>
anyway, I gotta scroll up and make some notes
<[0x1eef]>
I think it took the idea of editors like emacs, and made it easily accessible for everyone. There's a learning curve with either emacs or vim but i think it pays off in the end.
<rapha>
monr0e: with Asperger's, I'll assume a degree of intelligence and working/longterm memory so high, you wouldn't really depend on choosing the thing that's closest to what you've been using. Go take a loo at the things that were mentioned earlier (Sinatra, Roda, also Hanami and Padrino) and see if you like any of them conceptually. And if you're not hellbent on Ruby, might I suggest a look at
<rapha>
Haskell's web frameworks - especially if you happen to be good at mathematical/abstract kinds of thinking.
_ht has quit [Remote host closed the connection]
<rapha>
Re. the VSCode "why", I feel like Atom (and possibly Sublime) are the reasons why MS decided they needed a product to compete with these.
<monr0e>
Ruby is probably the right move in all honesty. I looked at Rust and Rocket, and woof. Not my thing. I could always have gone Java, but Java is kinda slow iirc. Also, no overloading in Java, as well as a bunch of licensing problems that would be ... problematic come me-running-a-business
<[0x1eef]>
I remember when I saw Textmate back in the day. That played a big role in buying my first Mac.
<rapha>
We're #ruby here, so we'll be very happy to have another person love Ruby as much as we do :))
<rapha>
Have you tried Warp btw, [0x1eef]? Is it worth making an account and letting a terminal, of all things, telemetry the shit out of your life?
<[0x1eef]>
Yeah not for me. I hate stuff like that.
<rapha>
Fair enough :)
* rapha
is mostly wishing for a 3d accellerated Terminal for Linux which looks and feels similar enough to Gnome Terminal, but doesn't have any noticable input lag when pasting larger (say, an encoded JWT) pieces of text into it.
<[0x1eef]>
I'm trying to get away from cloud services as much as I can. If it ran on my computer, and didn't rely on network, I'd be more interested.
<rapha>
Same, hence my "telemetry" stab at them.
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<gr33n7007h>
helix is pretty good
<gr33n7007h>
no lanuage server as of yet tho
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
brokkoli_origin has quit [Ping timeout: 246 seconds]
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
tromp has joined #ruby
brokkoli_origin has joined #ruby
hightower3 has quit [Remote host closed the connection]
hightower3 has joined #ruby
<havenwood>
gr33n7007h: I have it set up with Solargraph LSP.
hightower3 has quit [Remote host closed the connection]
infinity_fye has quit [Quit: Leaving]
<havenwood>
I tried to set up rdbg but not really working. Ruby LSP would be nice.
donofrio has joined #ruby
donofrio has quit [Read error: Connection reset by peer]
donofrio has joined #ruby
tromp has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<rapha>
wow, what a discovery, language server or no ... that feels real nice on first try. thanks for sharing!