havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 2.7.2, 2.6.6, 3.0.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.org | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | BLM <3 | Can't talk? Register/identify with NickServ
<leftylink> I have not heard that name in a long time
<al2o3-cr> et09: just remember this, in a method defintion `def foo(&block)` in this instance the `&` means convert a block of code to a proc (a procedure). But, foo(&bar) means pass the proc (prodecdure) as a block.
<al2o3-cr> as a block of code
<al2o3-cr> et09: the only reason to use the &block syntax is if, for e.g saving the binding to a variable and use it later somewhere in your code.
<al2o3-cr> &>> class Foo def initialize(&b) @b = b end; def shout() @b.call.upcase end end; Foo.new { 'foo' }.shout
<rubydoc> # => "FOO" (https://carc.in/#/r/a0bv)
<et09> exactly
<et09> got it thx
dfucci has quit [Ping timeout: 240 seconds]
cliluw has quit [Ping timeout: 264 seconds]
<al2o3-cr> &>> TOPLEVEL_BINDING.receiver
<rubydoc> # => main (https://carc.in/#/r/a0bw)
cliluw has joined #ruby
BTRE has quit [Remote host closed the connection]
BTRE has joined #ruby
<al2o3-cr> how to get each object pass to a block?
<al2o3-cr> without binding_of_caller is it possible?
dfucci has joined #ruby
swaggboi has quit [Quit: C-x C-c]
swaggboi has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
Axy has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
miss0r3 has joined #ruby
miss0r2 has quit [Ping timeout: 260 seconds]
gavlee has quit [Ping timeout: 265 seconds]
dfucci has joined #ruby
TCZ has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
Mia has joined #ruby
Axy has quit [Ping timeout: 260 seconds]
dfucci has quit [Ping timeout: 240 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roadie has joined #ruby
gavlee has joined #ruby
Swyper has joined #ruby
DaRock has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
cthulchu_ has quit [Ping timeout: 240 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
roadie has joined #ruby
roadie has quit [Ping timeout: 260 seconds]
Swyper has quit [Remote host closed the connection]
Rudd0 has quit [Ping timeout: 260 seconds]
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Technodrome has joined #ruby
arkinor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
cnsvc has quit [Quit: WeeChat 2.9]
ua has quit [Ping timeout: 264 seconds]
Swyper has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 264 seconds]
ua has joined #ruby
ur5us has joined #ruby
ChmEarl has quit [Quit: Leaving]
Swyper has joined #ruby
Swyper has quit [Ping timeout: 260 seconds]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 265 seconds]
et09 has left #ruby [#ruby]
rippa has joined #ruby
Rudd0 has joined #ruby
drincruz has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
ur5us has quit [Ping timeout: 264 seconds]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
roshanavand_ is now known as roshanavand
gix- has joined #ruby
gix has quit [Disconnected by services]
ua has quit [Ping timeout: 246 seconds]
adu has joined #ruby
ur5us has joined #ruby
nakilon has quit [Ping timeout: 272 seconds]
howdoi has joined #ruby
nakilon has joined #ruby
manjaroi3 has joined #ruby
cd has joined #ruby
fippy has joined #ruby
dfucci has joined #ruby
et09 has joined #ruby
<et09> did ruby ever add anything like javascript ``, for multiline strings
<et09> besides that godawful heredoc syntax i can't even remember
postmodern has quit [Quit: Leaving]
adu has quit [Quit: adu]
<summerisle> can %-literals span lines?
<summerisle> yes
dfucci has quit [Ping timeout: 272 seconds]
<summerisle> et09: %{string...} appears to be able to span lines
<et09> oh interesting
<summerisle> my test code also allowed "string..." to span lines.
<summerisle> this was accepted by ruby 2.7.0p0 (647ee6f091)
<manjaroi3> How can I write classes outside of Shoes.app block?
<summerisle> like in a different file? use require or require_relative. otherwise, just write them
<manjaroi3> No, in the same file. I read the scope is not the same for outside of the block
<et09> good to know, i thought that broke in earlier versions
<et09> i could be stupidly misremembering
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
leni1[m] has joined #ruby
et09 has quit [Ping timeout: 246 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
manjaroi3 has quit [Quit: leaving]
roadie has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
BSaboia has joined #ruby
ua has joined #ruby
ua has quit [Excess Flood]
ua has joined #ruby
meinside has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
rippa has quit [Read error: Connection reset by peer]
BSaboia has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
ua has quit [Ping timeout: 240 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
howdoi has quit [Quit: Connection closed for inactivity]
BSaboia has joined #ruby
ua has joined #ruby
dfucci has joined #ruby
rindolf has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Swyper has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
teclator has joined #ruby
<rindolf> Hi all! I've been intending to try to contribute to this project: https://github.com/otwcode/otwarchive (GPLv2 ; rails) but i've been wondering if the fact that it depends on ruby 2.6.x is a red flag due to ruby having a 2.7.2 version already given what fxn noted in https://www.nntp.perl.org/group/perl.module-authors/2018/08/msg10949.html that " in Rails we drop support for old Ruby really fast. People
<rindolf> need to move forward if they want to upgrade Rails (and culturally, they normally do)" ; the docker instructions failed on my debian bullseye partition too (and failed earlier on fedora 33 with podman).
BenDover has joined #ruby
BenDover has quit [Client Quit]
rippa has joined #ruby
BenDover has joined #ruby
gix- has quit [Ping timeout: 246 seconds]
Besnik_b has quit [Quit: Ika]
dfucci has joined #ruby
<jhass> rindolf: not too much, 2.7 has been quite noisy on the deprecation warnings towards Ruby 3, so people sticked to 2.6 more :)
TomyWork has joined #ruby
akem has joined #ruby
akem_ has quit [Ping timeout: 264 seconds]
vondruch has joined #ruby
<rindolf> jhass: ah
<leni1[m]> Hi. I was looking at the GitLab source code for https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/logger.rb and I have tried without success to find where the original Logger class referenced here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/logger.rb#L4 was defined. I am a bit new to Ruby generally so maybe I am asking an obvious question but is this a case where we are referencing a class that
<leni1[m]> has not yet been created?
royo25 has joined #ruby
<jhass> leni1[m]: this should be the stdlib logger https://rubyapi.org/2.7/o/logger
<leni1[m]> jhass: thank you!
akem has quit [Quit: Leaving]
Swyper has joined #ruby
BSaboia has joined #ruby
roadie has quit [Ping timeout: 272 seconds]
roadie has joined #ruby
d0liver has quit [Ping timeout: 260 seconds]
otagi[m] has quit [Ping timeout: 260 seconds]
Furai has quit [Ping timeout: 260 seconds]
otagi[m] has joined #ruby
d0liver has joined #ruby
Furai has joined #ruby
TzilTzal has joined #ruby
baojg_ has joined #ruby
baojg has quit [Ping timeout: 264 seconds]
roadie has quit [Ping timeout: 272 seconds]
arkinor has joined #ruby
ellcs has joined #ruby
royo25 has quit [Quit: Bye...]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Besnik_b has joined #ruby
dionysus69 has joined #ruby
weaksauce has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
TzilTzal has quit [Ping timeout: 246 seconds]
Swyper has joined #ruby
Besnik_b has quit [Quit: Leaving]
Swyper has quit [Ping timeout: 260 seconds]
arkinor has quit [Ping timeout: 240 seconds]
TzilTzal has joined #ruby
ivan_ has joined #ruby
<ivan_> Hello
ivan_ has left #ruby ["Ciao!"]
dhollinger has quit [Ping timeout: 260 seconds]
dhollinger has joined #ruby
DaRock has quit [Read error: Connection reset by peer]
DaRock has joined #ruby
Technodrome has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
rubydoc has quit [Ping timeout: 260 seconds]
roadie has quit [Ping timeout: 260 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
ellcs has quit [Ping timeout: 272 seconds]
roadie has joined #ruby
ellcs has joined #ruby
TCZ has joined #ruby
BenDover has quit [Remote host closed the connection]
TzilTzal has quit [Quit: Leaving.]
ellcs has quit [Ping timeout: 272 seconds]
GodFather has joined #ruby
phaul has quit [Ping timeout: 240 seconds]
rubydoc has quit [Ping timeout: 246 seconds]
phaul has joined #ruby
rubydoc has joined #ruby
rubydoc has quit [Remote host closed the connection]
rubydoc has joined #ruby
BenDover has joined #ruby
Swyper has joined #ruby
titanbiscuit has quit [K-Lined]
stnly has quit [Quit: goodbye]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
akem has joined #ruby
fercell has joined #ruby
Besnik_b has joined #ruby
Guest25513 has quit [Quit: Leaving]
Besnik_b has left #ruby ["Po dal ca…"]
roadie has quit [Ping timeout: 272 seconds]
Swyper has quit [Remote host closed the connection]
cow[moo] has joined #ruby
meinside has quit [Quit: Connection closed for inactivity]
GodFather has quit [Ping timeout: 264 seconds]
stnly has joined #ruby
lucasb has joined #ruby
GodFather has joined #ruby
GodFather_ has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skyikot has quit [Ping timeout: 240 seconds]
et09 has joined #ruby
impermanence has joined #ruby
DaRock has quit [Ping timeout: 260 seconds]
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
roadie has joined #ruby
adu has joined #ruby
GodFather_ has quit [Ping timeout: 272 seconds]
GodFather has quit [Ping timeout: 272 seconds]
adu has quit [Quit: adu]
baojg_ has quit [Remote host closed the connection]
baojg has joined #ruby
ChmEarl has joined #ruby
rubydoc has quit [Remote host closed the connection]
skyikot has joined #ruby
rubydoc has joined #ruby
TCZ has joined #ruby
ua has quit [Ping timeout: 256 seconds]
cow[moo] has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua has joined #ruby
execat[m] has joined #ruby
vondruch has quit [Read error: Connection reset by peer]
AndreYuhai has joined #ruby
seydar has joined #ruby
<AndreYuhai> Hey there, is there anything wrong with overriding initialize in ActiveRecord::Base and then calling super? I am not sure whether I should do it or not. Some sources say not.
<seydar> do ruby's blocks exist in other languages?
<adam12> AndreYuhai: I'd stick with using after_initialize, imho.
<AndreYuhai> adam12, then it doesn't really make sense to try to parse the data inside the class that inherits ActiveRecord::Base, right?
<adam12> AndreYuhai: Not sure I follow.
<AndreYuhai> adam12, So, let me show you an example
<jhass> seydar: couple. Very directly in Crystal as it's deeply inspired. Groovy has something very similar, Kotlin too. I believe Swift too. Then you have a lot on the a little more explicit side, where you have a short and nice way to pass an anonymous function as an argument
<seydar> jhass: thank you, it's tough to find lists on the web that distinguish between ruby-style blocks and, like you said, simply passing an anonymous function
<seydar> jhass: i'm convinced the secret to ruby's ease and clarity is its blocks
<AndreYuhai> adam12, not really show but explain, since there's not much to show. So let's say I have a class that inherits from ActiveRecord::Base, I should pass a hash to initialize the variables. But let's say first I want to parse an HTML document and then create a hash to pass to my database class. So I was trying to parse that HTML document inside the db class
<jhass> I follow, but I wouldn't nail it down on the implicitness of the syntax, that they're closures plays an as big if not bigger role I think
<AndreYuhai> adam12, but while I was writing I realized that that doesn't really make sense :D
<jhass> also important is the strong emphasis stdlib puts on them
<adam12> AndreYuhai: Maybe you want your own constructor that then calls `new`
<AndreYuhai> adam12, oh that's what I will have to do I guess. Thank you!
moldorcoder7 has quit [Quit: %bye mirc%]
<seydar> jhass: true: can't have method-ending blocks without closures in the first place
<seydar> jhass: i'm always frustrated that python only allows single-line anonymous functions. i dislike having to define larger closures as a separate method and then passing those along
<jhass> it's a cultural thing greater than that. Ruby and its community likes implicitness, convention over configuration. Python and its community tends to prefer explicitness, configuration over convention
<jhass> compare django and rails, it's quite apparent
<nakilon> my Ruby program has a huge Array that grows up to 2gb of RAM and then such operations as .sort and .uniq on it become too slow, so I moved this part to an external Go process that I start and kill when needed
<jhass> maaaybe wrong data structure?
<nakilon> I start it via popen3 and move data in both directions serialising it with Oj gem -- this reduced the amount of RAM and made possible to optimize those pieces of code about sort and uniq
<nakilon> but the speed in the end is now 3 times lower and there is benchmark https://i.imgur.com/fpNJNw0.png -- 2/3 of times is gone for popen IO and Oj -- are there any better alternatives?
<jhass> it's hard to judge given you talked about implementation but zero about the problem domain
<jhass> but my first questionmarks would be, is array really a fit datastructure for the job? Is Ruby a fit tool for the job?
<nakilon> jhass, if that question was addressed to me then unfortunately there are no better data structures I'm aware about for my program, since I'm already optimizing it for like two weeks
<jhass> I mean given .uniq and .sort is your pain points SortedSet comes to mind, but as pointed out for a real recommendation the problem domain would need to be known much better
<jhass> maybe there's an algorithmic solution that doesn't even require holding this much data in memory
<jhass> it's really hard to give advice on this shallow info
<nakilon> jhass, 1. it's not just an array, it's a mix of an array and map in golang already
<nakilon> jhass, 2. if I was not doing it in Ruby I would achieve the same progress only in a year ) now after I'm pretty sure there is nothing huge to optimize algorithmically I'm doing this stuff around the satellite process, and at first I believed it would help but see the profiler report
<nakilon> I'm not asking you to improve the algorithm -- I've already spent two weeks on it, and partially did it 5 years ago -- it can't be optimized by just a talk in IRC
<jhass> how many LOC are we talking?
<nakilon> the question is in the way I move data between two processes
<nakilon> 75 in Ruby, 70 in Go
<jhass> and how production critical / stable does this need to be? does your buisness stand or fail on it?
<nakilon> it's a solver for a competitive logical puzzle and there is an input case that to find the best solution for it eats >2gb of RAM and it becomes too slow to solve another dozen of such in adequate time
<jhass> Okay, then if I were you I would invest a day to see if you can port it to Crystal (whole, without going through Go part)
<nakilon> the puzzle is supposed to be solved by hand and I'm a cheater, yeah ) but I don't participate in daily competition rankings so I don't ruin others' fun
<jhass> regardless I can't stop the feeling that a 2GB array you call .sort and .uniq on really should be a different purpose based data structure, something like a custom binary search tree or so
<jhass> in any language
<nakilon> I won't say "in any language"
GodFather_ has joined #ruby
<nakilon> in Ruby it can be faster to aggregate and apply .uniq and .sort rarely and in parts, rather than doing microoptimizations, such as custom data type
<jhass> a custom data type is by no means a microoptimization, generally
<jhass> of course there's problems where it is
<nakilon> after I moved this stuff out to Go it made me possible to change the .uniq call to adding to an array only if the item is uniq -- that won't be faster with Ruby stdlib in any way
<jhass> Set?
<jhass> or as said previously, SortedSet
<nakilon> a million of Set.include? lookups is slower than a million of push and then uniq
<nakilon> there is no need in SortedSet
<jhass> only in Ruby though, because of the method call overhead
<jhass> hence my suggestion to port to Crystal
<nakilon> the .sort was needed for a correct .uniq procedure to throw out correct one from the pair
<nakilon> after a move to Go the whole need in sort is gone
<jhass> or just move to Go fully given you're already halfway there
<nakilon> I don't sort it in Go, because in Go I do the "set.include?"-like thing and solve the collision for each push with no perfomance overhead
GodFather has joined #ruby
<nakilon> oh, I won't say it's halfway -- converting it from Ruby to Go is making 10 times more lines of code
moldorcoder7 has joined #ruby
<jhass> Did you take a look at Crystal yet? ;)
<jhass> anyways, I'll stop now. You asked for opinions, you got mine. Take it or leave it.
<jhass> There won't be a magic bullet to make your approach 10x faster than it already is
jottr has joined #ruby
<seydar> jhass: my opinion is that these attitudes derived from the syntax and the opportunities presented by it (the ole "syntax changes the way you think" argument)
<nakilon> I asked if there is a more efficient way to move data between two processes ..D
<jhass> and I recognized it as a classic X/Y question :)
<jhass> seydar: it's hard to separate. Yes mindsets get formed, or better strengthend, by it but it also attracts already compatible mindsets which then also have an influence how everything, including new syntax features, is designed
cer0 has joined #ruby
<jhass> seydar: we observe this quite interestingly over at Crystal, which attracts the Ruby kind of folk based on its inspiration from it, but also another group looking just for a high-level compiled language coming from all other kinds of backgrounds. It actually leads to a lot of discussions over implicitness vs explicitness
cthulchu_ has joined #ruby
davispuh has joined #ruby
<summerisle> I like crystal, but the strict type system can be a bit suffocating at times
TCZ has quit [Quit: Diabe? tkwi w szczegó?ach]
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
Swyper has joined #ruby
drincruz has joined #ruby
Technodrome has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
cognemo_ has quit [Ping timeout: 272 seconds]
seydar has quit [Quit: leaving]
cognemo has joined #ruby
<nakilon> by my estimation my solver will consume up to 8gb of RAM to find the optimal solution; benchmarking on simplier test cases the ruby+go would consume two times less RAM but it's several times slower because of the communication process
BTRE has quit [Remote host closed the connection]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pwnd_sfw9 has joined #ruby
Swyper has quit [Remote host closed the connection]
pwnd_sfw has quit [Ping timeout: 264 seconds]
pwnd_sfw9 is now known as pwnd_sfw
dfucci has joined #ruby
Swyper has joined #ruby
<apotheon> nakilon: What do you mean "two times less"?
<apotheon> Is that half as much RAM, or what?
<nakilon> apotheon yes, sorry for bad English
<apotheon> Thanks for clearing that up.
<nakilon> ruby solution was like 30mb; ruby+go was like 20+9, where 20 obviously contains json garbage what would be cleaned by GC when needed; also even empty programs consume few megabytes so it should be subtracted too
<apotheon> I'm not sure there's much you can do about the time spent in interprocess communication except by reducing the amount of interprocess communication.
<nakilon> today I made two memory optimizations and maybe the solution will be found in the next hour but it's just a one puzzle case and other from the same difficulty range can be worse
<nakilon> apotheon, tried that -- today's optimization have reduced json string size by x1.5, but the total time remained the same, not sure why
<nakilon> also thinking about writing not line by line but making a multiline buffer but not sure if it will help
<nakilon> should reduce the number of Oj and IO calls but the question is if the slow part is the call itself or not
roadie has quit [Ping timeout: 264 seconds]
<nakilon> also I measure the total time used using "time" command line utility and that does not tell me which part of the CPU time was spent by Ruby and which by Go
<apotheon> I doubt buffering would help overall speed much unless you're overwhelming available RAM or you're loading from disk while sending between processes or something like that.
<apotheon> In the "from disk" case, the bottleneck is likely just disk I/O.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<nakilon> you mean swap?
<apotheon> Swap would be a consequence of overwhelming RAM.
<nakilon> my json pieces are 1000-1500 bytes long; in that profiler screenshot there are 300'000 .write calls for a puzzle of 7'000 array items (i.e. pieces) in peak; in the case I try to solve there are >800'000 items already, so it's like 300mln of Oj and IO write calls
<apotheon> I don't know where your Go process is getting its data before sending it to Ruby. Is it reading from disk?
<apotheon> Actually, even worse than disk I/O would be over the network. That tends to be a bottleneck everywhere a network is connected to what people are doing.
<nakilon> Go process is a storage for Ruby process, launched with popen3
<nakilon> no network
<nakilon> a single macos machine
Swyper has quit [Remote host closed the connection]
<nakilon> so 300mln cycles is like... 500gb of json strings searialised and deserialised on both sides ..D that's what I pay by ruby+go solution to reduce the solution of a pure ruby process that otherwise eats almost 5gb of RAM already
BTRE has joined #ruby
<AndreYuhai> I have exactly this piece of code in my gemspec https://paste.ofcode.org/GpZRXvUip9HDW3bykExjEW
<AndreYuhai> What might be wrong that I still don't see the path
<AndreYuhai> Everything is exactly the same from another working gem
<AndreYuhai> This path stuff always confuses me.
<nakilon> this path stuff is a legacy from the time when there was no require_relative
<AndreYuhai> I don't really like require relative :D
<AndreYuhai> I mean when it's all "require" I have chill hahaha
Rudd0 has quit [Remote host closed the connection]
queip has quit [Quit: bye, freenode]
<adam12> AndreYuhai: Too hard to say with little info. gemspec is in same folder as lib/?
<adam12> AndreYuhai: Are you seeing this when calling `gem build` or some other time?
queip has joined #ruby
<AndreYuhai> adam12, I was seeing it when requiring the gem. Folder structure is like this: https://paste.ofcode.org/tk5XKBswJJZFFaSxxL4nvk
<AndreYuhai> Just created with bundle gem my_gem
<adam12> AndreYuhai: How are you requiring the gem? Just because $LOAD_PATH is mutated in gemspec doesn't mean it is everywhere.
<AndreYuhai> adam12, I was just doing require 'my_gem' and now I get "Gem::InvalidSpecificationException" with this gemspec: https://paste.ofcode.org/329rndZsd58gGAVSbkCsgWe
<AndreYuhai> by the way doesn't "spec.require_paths = ['lib']" do the same thing as https://paste.ofcode.org/GpZRXvUip9HDW3bykExjEW ?
weaksauce has joined #ruby
Swyper has joined #ruby
dfucci has quit [Ping timeout: 256 seconds]
dviola has quit [Ping timeout: 240 seconds]
<adam12> AndreYuhai: No
<AndreYuhai> adam12, oh
<adam12> AndreYuhai: You're mutating the load path in gemspec for the purpose of building the gem
<adam12> the require_paths (which is a default and unnecessary) is for when rubygems sets up the load path when loading the gem.
<AndreYuhai> I fixed it and I doubt it was because of "`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }"
fercell has quit [Ping timeout: 240 seconds]
<adam12> AndreYuhai: I'd drop those lines from gemspec, and just `require_relative "lib/some_gem/version"`
<AndreYuhai> After I committed all there is no problem
<adam12> AndreYuhai: Yeah. Get rid of that too
<AndreYuhai> I always forget that
<adam12> AndreYuhai: Just manage the files by hand or use Rack's FileList.
<AndreYuhai> adam12, Oh alright, thank you for the help! I will check rack.
<adam12> AndreYuhai: Sorry, I meant Rake.
<adam12> Rake's FileList.
<AndreYuhai> ooooh
<adam12> (I'm in the Puma source staring at the Rack handler)
<AndreYuhai> adam12, thanks for the link!
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
dfucci has joined #ruby
dviola has joined #ruby
dfucci has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
et09 has left #ruby [#ruby]
<nakilon> an observation that I already had earlier with other programs: if ruby process reaches 4gb RES it starts going back and forth between 3gb and 4.5gb with almost no computational progress; I feel like it's either Ruby's GC or OS hardcoded RAM treshold
ur5us has joined #ruby
dfucci has joined #ruby
ur5us has quit [Client Quit]
adu has joined #ruby
TomyWork has quit [Quit: Leaving]
Technodrome has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
BenDover has quit [Quit: BenDover]
<AndreYuhai> What's the difference here: https://paste.ofcode.org/4kwN2fTUtrPrFUQZkMauDg ?
<jhass> AndreYuhai: **options expects keyword arguments, so .new(somehting: value), or .new(**some_hash)
<AndreYuhai> jhass, so do keyword args not get passed as a hash?
<jhass> right
<jhass> at least semantically
<jhass> especially towards Ruby 3 the differentation is made stronger
<AndreYuhai> So what's the difference really I mean you use them both as a hash inside the function. Can I see how they are passed in some source code?
<jhass> the entire point of ** is to convert between hash and keywords, the same way as * converts between array and arguments
donofrio__ has joined #ruby
<jhass> def take_my_keyword_arguments_as_hash(**args); def take_my_arguments_as_array(*args); pass_my_hash_as_keywords(**hash); pass_my_array_as_args(*array)
cer0 has quit [Ping timeout: 240 seconds]
biggtimber has quit [Ping timeout: 256 seconds]
BSaboia has quit [Quit: This computer has gone to sleep]
biggtimber has joined #ruby
adu has quit [Quit: adu]
donofrio_ has quit [Ping timeout: 256 seconds]
rprimus has quit [Ping timeout: 256 seconds]
Junaos has quit [Quit: ZNC - http://znc.in]
Junaos has joined #ruby
<jhass> any behaviour beyond this is just compatibility layers that will be removed in Ruby 3.0 and are deprecated in Ruby 2.7
<AndreYuhai> Oh now I get why mine was not working. Thank you! I will need to read more about the difference & use cases.
powerhouse has quit [Ping timeout: 256 seconds]
rprimus has joined #ruby
BrianWGray has quit [Ping timeout: 256 seconds]
powerhouse has joined #ruby
Swyper has quit [Remote host closed the connection]
tinco has quit [Ping timeout: 256 seconds]
tinco has joined #ruby
r29v has joined #ruby
guest1 has quit [Ping timeout: 256 seconds]
r29v has quit [Client Quit]
guest1 has joined #ruby
akem_ has joined #ruby
dviola has left #ruby ["WeeChat 2.9"]
dviola has joined #ruby
akem has quit [Ping timeout: 256 seconds]
cer0 has joined #ruby
aloy has quit [Quit: WeeChat 2.9]
fercell has joined #ruby
gix has joined #ruby
Rudd0 has joined #ruby
Fire-Dragon-DoL has quit [Quit: Quit]
Fire-Dragon-DoL has joined #ruby
fercell has quit [Ping timeout: 256 seconds]
aloy has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
TCZ has quit [Remote host closed the connection]
rindolf has quit [Quit: http://www.shlomifish.org/ ; Some people grow older and wiser. Not I. I grow older and more foolish.]
AndreYuhai has quit [Quit: Leaving]
dviola has quit [Ping timeout: 240 seconds]
TCZ has joined #ruby
davispuh has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
teclator has quit [Ping timeout: 260 seconds]
dfucci has quit [Ping timeout: 260 seconds]
cer0 has quit [Ping timeout: 272 seconds]
dviola has joined #ruby
dviola has quit [Ping timeout: 260 seconds]
dviola has joined #ruby