mixfix41 has quit [Read error: Connection reset by peer]
libsys has quit [Remote host closed the connection]
libsys has joined #ruby
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
pmwals09 has quit [Remote host closed the connection]
pmwals09 has joined #ruby
pmwals09 has quit [Remote host closed the connection]
pmwals09 has joined #ruby
weaksauce has quit [Ping timeout: 256 seconds]
weaksauce has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
weaksauce has quit [Ping timeout: 256 seconds]
weaksauce has joined #ruby
Sheilong has quit [Quit: Connection closed for inactivity]
unyu has quit [Quit: brb]
gr33n7007h has quit [Read error: Connection reset by peer]
rms2511 has quit [Quit: Leaving]
gr33n7007h has joined #ruby
polishdub has quit [Ping timeout: 240 seconds]
neshpion has quit [Quit: neshpion]
polishdub has joined #ruby
pmwals09 has quit [Remote host closed the connection]
bluedust has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
reset has joined #ruby
bluedust has quit [Remote host closed the connection]
bluedust has joined #ruby
polishdub has quit [Quit: leaving]
gr33n7007h has quit [Ping timeout: 256 seconds]
gr33n7007h has joined #ruby
bluedust_ has joined #ruby
teclator has joined #ruby
bluedust has quit [Ping timeout: 240 seconds]
_ht has joined #ruby
libsys has quit [Read error: Connection reset by peer]
libsys has joined #ruby
bluedust_ has quit [Read error: Connection reset by peer]
bluedust has joined #ruby
Rounin has joined #ruby
ur5us has joined #ruby
_ht has quit [Remote host closed the connection]
roshanavand has joined #ruby
bluedust has quit [Remote host closed the connection]
goepsilongo has quit [Ping timeout: 256 seconds]
roshanavand has quit [Ping timeout: 250 seconds]
goepsilongo has joined #ruby
exondation has joined #ruby
TomyWork has joined #ruby
Aylat has joined #ruby
Aylat has quit [Changing host]
Aylat has joined #ruby
cout_ has quit [Ping timeout: 260 seconds]
cout has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
dviola has quit [Changing host]
dviola has joined #ruby
perrierjouet has joined #ruby
Aylat has left #ruby [Leaving]
gr33n7007h has quit [Ping timeout: 250 seconds]
ur5us has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
m_antis has quit [Ping timeout: 250 seconds]
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
gproto23 has joined #ruby
rando25892 has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
perrierjouet has joined #ruby
bluedust_ has joined #ruby
perrierjouet has quit [Quit: WeeChat 3.4]
bluedust has quit [Ping timeout: 240 seconds]
perrierjouet has joined #ruby
infinityfye has joined #ruby
gproto23 has quit [Quit: Leaving]
gproto23 has joined #ruby
roshanavand has joined #ruby
m_antis has joined #ruby
duds- has quit [Ping timeout: 256 seconds]
John_Ivan has quit [Remote host closed the connection]
John_Ivan has joined #ruby
exondation has quit [Ping timeout: 250 seconds]
exondation has joined #ruby
unyu has joined #ruby
duds- has joined #ruby
duds- has quit [Ping timeout: 256 seconds]
duds- has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
bluedust_ has quit [Remote host closed the connection]
bluedust has joined #ruby
cornduck has quit [Remote host closed the connection]
cornduck has joined #ruby
swaggboi has quit [Ping timeout: 240 seconds]
swaggboi has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
John_Ivan has joined #ruby
bluedust has quit [Read error: Connection reset by peer]
bluedust has joined #ruby
bluedust_ has joined #ruby
bluedust has quit [Ping timeout: 250 seconds]
moons has joined #ruby
<IsoLinCHiP>
mooff, havenwood : I recently learned of the existance of refinements (without having fully grasped them yet). The way I interpreted them, they allow a scoped modification of Classes. So would they possibly allow having shorthands for public_method(false) within for example an interactive pry session, without interfering with the actual code being inspected?
<IsoLinCHiP>
Hmm an list of alternatives to rails for my reading list, nice :-)
<IsoLinCHiP>
Im trying to migrate a brittle shell script from ferrying files between servers via SCP. I'd like to convert it to ruby, but I get the impression NET::SCP might not be up to the job. I need something that is able to liste remote file names and also to up/download files aswell as remotely rename or unlink them. Any suggestions?
<ox1eef>
IsoLinCHiP: id say it is fair to say refinements are a failed experiment
<IsoLinCHiP>
Are they pending removal - not worth getting used to - or is it likely they will be reworked?
fredlinhares has joined #ruby
<IsoLinCHiP>
I thought it was an interesting idea. Ive had a few cases - a long time ago - where I wanted to have Hash.slice behaviour, before it was a core method. So I used to monkey patch Hash for small scale projects, where I had few dependancies, and then started missing it in larger projects where it felt risky to monkeypatch Hash. So I was quite interested in refinements.
<IsoLinCHiP>
My solution after that was constructing a new object from the Hash, which had those methods I wanted, but then everything slowed to a crawl, because I was taxing the garbage collector with constantly creating and deleting small objects.
<IsoLinCHiP>
Still dont really have a good answer to it.
<IsoLinCHiP>
kinda mixing functional and OO style to get around the performance problems, but not very happy with the readability.
<havenwood>
IsoLinCHiP: Yup, good case for refinements. If they'd existed from the start they'd have much more adoption. I do use them and am glad they exist.
<havenwood>
IsoLinCHiP: They're not pending removal and are being improved release after release. There are several open proposals for making them easier yet to use anonymously, etc.
<havenwood>
IsoLinCHiP: You can use refinements anonymously now with Module.new but it could be more slick. For example, this works:
<IsoLinCHiP>
havenwood: intersting, thx. :) Still need a quiet moment to figure out the scoping interactions and stuff. :)
<IsoLinCHiP>
ox1eef: Id be curious though, what makes you think they are a failed experiment - without wanting to start a heated debate. Do they cause issues somewhere, or do you just think adoption has been to low to call them successful?
lim has joined #ruby
<adam12>
They have some edge cases that make them difficult to use.
<adam12>
I'd almost rather a utility method on a module or class than a refinement. Utils.blank?(str) vs using Blank; str.blank?
infinityfye has quit [Ping timeout: 240 seconds]
<havenwood>
IsoLinCHiP: An aside, but now in 3.1 you can use #import_methods too.
<havenwood>
module IsoLinCHiP def your_methods = public_methods(false) end
<havenwood>
using Module.new { refine(Object) { import_methods IsoLinCHiP } }
<havenwood>
Refinements landed in an experimental form then changed and nobody felt comfortable using them. They're still changing but more stable now. Seems they're heading towards being usable rather than removed but still some rough edges.
<havenwood>
adam12: Yeah, that's what limits my use.
<adam12>
havenwood: I think the ruby-next use of refinements is brilliant tho
<adam12>
I'm commonly integrated into teams that have many juniors and few Ruby experts, and explaining Refinements to them is always a struggle. They understand a utility method easily tho, and it works in their repl :O
<havenwood>
Yeah, glad they exist.
<ox1eef>
IsoLinCHiP: they didnt pick up much traction in the community. i cant think of one library taking advantage of them in their public APIs.
<havenwood>
ox1eef: They really weren't safe to adopt for years, and the memo that they're usable now never went out. ;P
<ox1eef>
most notably rails did not use them at all, and while rails is not ruby, it is notable they didnt pick them up and probably the biggest user of monkeypatches.
<havenwood>
Not safe in the sense that they broke every Ruby release since they were experimental.
<havenwood>
Now they work just fine across major versions. ¯\_(ツ)_/¯
<havenwood>
ox1eef: I think Rails prides itself in its significant monkey patch.
<ox1eef>
indeed, it's their perspective
<havenwood>
Just only Rails can do that or the world devolves.
<havenwood>
I'm glad we can dip in refinements when we'd otherwise dabble in monkey patching.
bluedust_ has quit [Ping timeout: 256 seconds]
<ox1eef>
i can sorta understand, after all monkey patches are a language feature but sometimes spoke of as bad as globals, etc.
<ox1eef>
dont let one persons opinion drive you when it comes to them
<havenwood>
I am doing that, but I'm the person whose opinion is driving me.
<nakilon>
rules are made for those who can't work without them
<ox1eef>
i wouldnt say i strongly like them, but they have their place now and then
<nakilon>
don't remember who said that
<havenwood>
I'd pretty much agree.
<havenwood>
nakilon: Metaprogramming and macros are anarchy, which is appealing as an anarchist.
<havenwood>
"Ruby, you'll shoot your eye out."
<havenwood>
Don't hear that anymore these days...
<ox1eef>
if we're giving languages personas i always found java to be a corporate suit
<havenwood>
don't personify languages, they hate it when you do that
<IsoLinCHiP>
Hmm, ok. That argument about explaining them to juniors is kind of relevant. Guess Ill stick to utility methods for team projects for now.
<IsoLinCHiP>
havenwood: Lol :D @personifying languages
lim has quit [Remote host closed the connection]
<IsoLinCHiP>
Trying to figure out how to configure ActiveJob's logging without using the rails framework as a total, reminded me, how easy to read code can be, if you know where it is. But trying to find out how logging was hooked up when seeing the code the first time, was a bit of a hunt with all the meta programming involved there. Its clean, once you know your way around it, but not simple. ;-)
<IsoLinCHiP>
Im meanwhile even more surprised, seeing the hook'ability of ActiveJob, that nooone seems to have built a tracking plugin around it. As in a backlog of issued and completed jobs.
<IsoLinCHiP>
Ah, NET::SFTP might fit the bill, I seemed to have missed that.
aeris has quit [Remote host closed the connection]
aeris has joined #ruby
infinityfye has joined #ruby
bluedust has joined #ruby
roshanavand has quit [Remote host closed the connection]
bluedust has quit [Remote host closed the connection]
TomyWork has quit [Quit: Leaving]
exondation has quit [Ping timeout: 256 seconds]
goldfish has joined #ruby
jpw has joined #ruby
John_Ivan has quit [Read error: Connection reset by peer]
szkl has joined #ruby
ur5us has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
weaksauce has joined #ruby
duds- has quit [Ping timeout: 256 seconds]
duds- has joined #ruby
et09 has joined #ruby
<et09>
what's the actual standard for misc version strings like "^0.2.3" or "~>5.4.2" ? it's not semver itself right?
gproto23 has quit [Remote host closed the connection]
<adam12>
For anybody keeping track, other old Ruby frameworks were Waves and IOWA.
<ox1eef>
cool
seninha has joined #ruby
sam113101 has quit [Ping timeout: 250 seconds]
jpw has quit [Remote host closed the connection]
bluedust_ has joined #ruby
<seninha>
Hello, what's wrong in the line `File.open("file.txt").readlines.select{|l| l =~ /0-9/}`? It gets the error "invalid byte sequence in UTF-8 (ArgumentError)"
<weaksauce>
is the file utf-8?
bluedust has quit [Ping timeout: 240 seconds]
bluedust has joined #ruby
<seninha>
wtf this person uses macos and sent to me a dos-formated file!
<seninha>
nope, `:set fileformat?` in vim prints "dos", and `:set fileencoding?` prints "latin1"
<seninha>
how can I read into UTF8?
<weaksauce>
there's a force_encoding method
<weaksauce>
on string
bluedust_ has quit [Ping timeout: 256 seconds]
<weaksauce>
but it sounds like utf-8 is the type of string it is defaulting to and there is a sequence there that is invalid