jhass[m] changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ
ur5us has quit [Ping timeout: 272 seconds]
Rounin has quit [Ping timeout: 272 seconds]
Guest4321 has joined #ruby
Guest4321 has quit [Client Quit]
Guest4321 has joined #ruby
Guest4321 has quit [Client Quit]
Guest4321 has joined #ruby
RickHull has quit [Ping timeout: 272 seconds]
Dooky has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest4321 has quit [Ping timeout: 260 seconds]
cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
oxfuxxx has joined #ruby
ur5us has joined #ruby
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
r3m has quit [Client Quit]
r3m has joined #ruby
oxfuxxx has quit [Ping timeout: 272 seconds]
jpn has joined #ruby
oxfuxxx has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
Pixi has quit [Quit: Leaving]
Sankalp has quit [Ping timeout: 240 seconds]
Pixi has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
Sankalp has joined #ruby
konsolebox has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
oxfuxxx has quit [Ping timeout: 240 seconds]
oxfuxxx has joined #ruby
konsolebox has quit [Ping timeout: 272 seconds]
Ziyan has joined #ruby
szkl has joined #ruby
konsolebox has joined #ruby
ianikeev has joined #ruby
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Ziyan has joined #ruby
Ziyan has quit [Client Quit]
ur5us has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 246 seconds]
ianikeev has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
trillp has joined #ruby
Ziyan_ has joined #ruby
Ziyan has quit [Ping timeout: 240 seconds]
Ziyan has joined #ruby
Ziyan_ has quit [Ping timeout: 246 seconds]
Mikaela has quit [Ping timeout: 240 seconds]
Mikaela has joined #ruby
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
roadie has joined #ruby
ianikeev has joined #ruby
teclator has joined #ruby
oxfuxxx has quit [Ping timeout: 276 seconds]
reset has quit [Quit: reset]
_ht has joined #ruby
ianikeev has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
konsolebox has quit [Ping timeout: 246 seconds]
woos4 has joined #ruby
jpn has joined #ruby
szkl has quit [Quit: Connection closed for inactivity]
woos4 has quit [Ping timeout: 260 seconds]
jpn has quit [Ping timeout: 260 seconds]
trillp has quit [Quit: Leaving]
_ht has quit [Remote host closed the connection]
___nick___ has joined #ruby
Rounin has joined #ruby
ur5us has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
gproto23 has joined #ruby
roadie has quit [Ping timeout: 244 seconds]
smp has quit [Ping timeout: 252 seconds]
smp_ has joined #ruby
smp_ is now known as smp
Ziyan has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
roadie has joined #ruby
<rapha> morning all
roadie has quit [Ping timeout: 260 seconds]
<rapha> oh, srry jhass[m], didn't mean to bereave you of the credit :)
<rapha> could someone take a look at https://gist.github.com/sixtyfive/54bfcaea43edb5e2a5c0241f32d18dce and see if that's alsready as concise and functional as it can be made?
wand has quit [Remote host closed the connection]
wand has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
roadie has joined #ruby
Ziyan has joined #ruby
TomyWork has joined #ruby
protektwar has quit [Ping timeout: 240 seconds]
mjacob has quit [Read error: Connection reset by peer]
mjacob has joined #ruby
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
<leah2> why not regex?
jpn has quit [Ping timeout: 246 seconds]
titibandit has joined #ruby
roadie has quit [Ping timeout: 244 seconds]
roadie has joined #ruby
jpn has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
jpn has quit [Ping timeout: 240 seconds]
protektwar has joined #ruby
protektwar has quit [Changing host]
protektwar has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
jpn has quit [Ping timeout: 244 seconds]
gproto23 has quit [Remote host closed the connection]
jpn has joined #ruby
gproto23 has joined #ruby
jpn_ has joined #ruby
gnemmi has joined #ruby
<gnemmi> hello all =)
jpn has quit [Ping timeout: 244 seconds]
<gnemmi> anyone with write permission on https://ruby-doc.org/es/ over here?
<gnemmi> I just found out there's a link to "fuck.Ruby-doc.org"
<gnemmi> =/
jpn_ has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 260 seconds]
gnemmi has left #ruby [#ruby]
<adam12> gnemmi: I don't see it.
gr33n7007h has quit [Ping timeout: 260 seconds]
John_Ivan has joined #ruby
Al2O3 has quit [Ping timeout: 248 seconds]
<havenwood> gnemmi: The official docs are docs.ruby-lang.org, for what it's worth.
roadie has joined #ruby
roadie has quit [Ping timeout: 248 seconds]
Al2O3 has joined #ruby
jpn has joined #ruby
Ziyan has joined #ruby
reset has joined #ruby
<oz> oh, it's nice to see shopify doubling down on Ruby https://shopify.engineering/shopify-ruby-at-scale-research-investment
<libsys> noice
<libsys> ruby is great
<nebiros> oz: probably they ended up using truffleruby<?>
* nebiros hides
pfharlock has quit [Remote host closed the connection]
<oz> haha :)
pfharlock has joined #ruby
<oz> TruffleRuby is great. :)
<nebiros> well, didn't try it myself, but looks pretty awesome
<nebiros> we were thinking to move to jruby, but we use lots of gems with c extensions
<nebiros> guess truffleruby will fit well
jpn_ has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
<libsys> never thought ruby used so much memory in comparison to python
<oz> IIRC, using --yjit uses a whole lot more memory unless you limit it with --yjit-max-mem-something
bit4bit has joined #ruby
<havenwood> libsys: They're microbenchmarks using lowest common denominator code, so high level languages don't fare so well.
<havenwood> Yeah, --yjit and --mjit take a bunch of memory compared to without.
<oz> enabling yjit will, by default, allocate 256M. It's a lot for micro-benchmarks, but I guess it works for larger Rails apps.
<libsys> buy... python is pretty high language also
<libsys> xd sorry
<libsys> but.. python is a pretty high level lang also
polishdub has quit [Quit: leaving]
AndreYuhai has joined #ruby
<ox1eef> what's great about truffleruby, looks like yet another implementation based on the jvm - so with that, comes all the limitations i've been use to with jruby.
<ox1eef> cruby or die, that's how it is.
gproto23 has quit [Remote host closed the connection]
<adam12> Heh
<oz> mri/cruby's only getting better it seems. It's already nice and fast for a lot of [my] use cases.
<oz> nothing wrong with using something lower-level when you need more perf. though ¯\_(ツ)_/¯
oxfuxxx has joined #ruby
AndreYuhai has quit [Quit: Lost terminal]
oxfuxxx has quit [Ping timeout: 272 seconds]
<havenwood> libsys: I prefer letting each language write it the way that's right. Otherwise you just get bias towards languages that prefer a style more similar to C.
<havenwood> libsys: Here's a benchmark, for example, that's almost as low level but dips higher into practical things too. https://github.com/kostya/benchmarks
<havenwood> libsys: Ruby does tend to target low memory when a JIT isn't selected, but Python has also has a ton of optimizations.
<havenwood> As far as interpreted languages go, I'd consider Ruby in the low memory category generally. It certainly varies.
<havenwood> Jemalloc or malloc trim help.
<havenwood> Ruby doesn't enable these by default but they're ubiquitous in production.
<havenwood> These benchmarks look at memory but don't use standard memory saving options.
szkl has joined #ruby
seabre has quit [Remote host closed the connection]
<adam12> Speaking of memory use, I'd love some official mechanisms to inspect the heap / perhaps trigger GC / whatever.
<adam12> ruby -p $SOME_PROCESS_PID -e 'GC.start` or something.
<adam12> Pretty sure I can do this through rbtrace but its _just another_ dependency, and Aman (rbtrace maintainer) seems like they are doing less ruby these days.
<adam12> Actually I think you can do this through gdb too.
bit4bit has quit [Quit: Leaving]
<ox1eef> oz: those negative attitudes towards cruby's performance mostly come from a decade ago, back when 1.8.6/7 was hot, and the boot time for jruby/jvm is brutal. i'd say its for niche cases at best.
<ox1eef> it doesn't help that the maintainer of truffleruby is a british soldier, and into monoarchy and all that nonsense. that turns me away as well, ill be honest.
titibandit has quit [Remote host closed the connection]
howdoi has joined #ruby
John_Ivan has quit [Ping timeout: 244 seconds]
gr33n7007h has joined #ruby
seabre has joined #ruby
jpn_ has quit [Ping timeout: 256 seconds]
hellstabber has joined #ruby
hellstabber has quit [Client Quit]
hellstabber has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
jpn has joined #ruby
r3m has quit [Quit: WeeChat 3.6-dev]
r3m has joined #ruby
jpn_ has joined #ruby
jpn has quit [Ping timeout: 272 seconds]
jpn_ has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
_ht has joined #ruby
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
protektwar has quit [Ping timeout: 244 seconds]
jpn has quit [Ping timeout: 240 seconds]
jpn has joined #ruby
<ox1eef> adam12: you know about the methods on GC, too? they can provide some insight into that.
<adam12> ox1eef: Yeah. I think some mechanism to query a remote process would be nice.
<adam12> s/remote/running
jpn has quit [Ping timeout: 276 seconds]
konsolebox has joined #ruby
gproto23 has joined #ruby
shokohsc has quit [Ping timeout: 240 seconds]
<ox1eef> agreed, i seem to remember some attempts at that.
TomyWork has quit [Remote host closed the connection]
henk has joined #ruby
<henk> hi, I have some ruby code for puppet, see http://pastie.org/p/2fuA9G0asO4mGfb2bSR6yl. I don’t quite understand when and why it uses 'class << self' for some method/function definitions, 'def self.foo' for others, and just 'def bar' for most. I read that 'class << self' is for defining 'singleton methods' but I’m not sure I really understand the concept. Also I wonder if it’s the same as 'def self.foo' and
<henk> if not, what’s the difference? I’m mostly a noob when it comes to programming, so if anyone could point me to some resource explaining the necessary fundamentals to me like I’m 5 years old, I’d appreciate that.
<adam12> henk: In your example, class << self and def self.method_name are equivalent.
<henk> adam12: ah, good, thank you
<adam12> henk: The reason they switched between them is probably two fold: 1. someone likely wasn't paying attention, and 2. the class << self uses an attr_accessor, which is not available by just calling self. You need to reopen the eigenclass (the singleton class if you want to think of it that way)
<henk> adam12: I only guessed the former :D thanks
finsternis has joined #ruby
konsolebox has quit [Remote host closed the connection]
Acdlbs has joined #ruby
___nick___ has quit [Ping timeout: 276 seconds]
<Acdlbs> anyone doing modern rails devlopment using emacs? & if so what packages are you using?
hellstabber has quit [Quit: Textual IRC Client: www.textualapp.com]
polishdub has joined #ruby
_ht has quit [Remote host closed the connection]
tumdum has joined #ruby
Vonter has quit [Ping timeout: 240 seconds]
Acdlbs has quit [Ping timeout: 272 seconds]
moldorcoder7 has quit [Ping timeout: 276 seconds]
tumdum has quit [Ping timeout: 260 seconds]
pfharlock has quit [Remote host closed the connection]
moldorcoder7 has joined #ruby
pfharlock has joined #ruby
gr33n7007h has quit [Quit: WeeChat 3.5]
szkl has quit [Quit: Connection closed for inactivity]
stylo has quit [Quit: Connection closed for inactivity]
Ziyan has quit [Quit: Textual IRC Client: www.textualapp.com]
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby
gproto23 has quit [Remote host closed the connection]
<henk> adam12: can you, by any chance, also take a guess why these functions are put in the eigenclass? I think I still don’t understand the concept of the eigenclass well enough to understand this … or how puppet interacts with this code. I’m trying to figure out which it is (:
CrazyEddy has quit [Ping timeout: 252 seconds]
cocalero has joined #ruby
stylo has joined #ruby
John_Ivan has joined #ruby
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby
<libsys> acosta: I use solargraph with lsp-mode
<libsys> ahm... sorry acosta ... wanted to answer Acdlbs, but he's gone
ur5us has joined #ruby
typeof[panda] has joined #ruby
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby
szkl has joined #ruby
robotmay has quit [Quit: No Ping reply in 180 seconds.]
robotmay has joined #ruby
<adam12> henk: It's not obvious why. But the eigenclass is basically a hidden object of the class you're looking at. There's better explanations out in the world, but you could think of them as class methods.
<adam12> henk: It's actually unfortunate that they don't use the class builder pattern, but that's beside the point.
<adam12> henk: If we replaced the top line with something like `class S6Service`, then re-opening the eigenclass (or calling def self.some_method in the class body) would be adding methods to the class (or instance methods to the eigenclass). So class S6Service; class << self; def foo; end; end would be called with S6Service.foo (the foo method on the class
<adam12> S6Service).
<adam12> henk: Unfortunately there's no great way to determine why they've done anything, but maybe it's a contract for classes to meet a certain API that Puppet expects?
pfharlock has quit [Remote host closed the connection]
pfharlock has joined #ruby