havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.0, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
caedmon has quit [Ping timeout: 252 seconds]
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
willow has joined #ruby
Shortstop has quit [Quit: Connection closed]
Sankalp has quit [Ping timeout: 268 seconds]
Milos has quit [Ping timeout: 260 seconds]
Milos has joined #ruby
Sankalp has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 272 seconds]
Sankalp- is now known as Sankalp
lucartc has quit [Remote host closed the connection]
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 268 seconds]
Sankalp- is now known as Sankalp
Sankalp has quit [Ping timeout: 252 seconds]
markong has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
razetime has joined #ruby
razetime1 has joined #ruby
razetime has quit [Ping timeout: 248 seconds]
razetime1 is now known as razetime
stirl has quit [Ping timeout: 260 seconds]
plantman2 has joined #ruby
plantman has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
plantman has quit [Ping timeout: 252 seconds]
plantman2 has quit [Ping timeout: 255 seconds]
<apteryx> can I assign a variable while testing a condition in if?
moldorcoder7 has quit [Ping timeout: 260 seconds]
<Na_Klar> apteryx: like if (a = 3 == 3) .. no
<Na_Klar> oh, actually you can .. lol
<Na_Klar> but a is true withing the scope of the clause .. not 3 .. weird
<Na_Klar> *within
Na_Klar has left #ruby [https://quassel-irc.org - Komfortabler Chat. Überall. ]
ur5us has quit [Ping timeout: 246 seconds]
finsternis has joined #ruby
<apteryx> I think because it doesn't evaluate in order
<apteryx> so 3 == 3 -> true and assigns to a ? perhaps
cartdrige has joined #ruby
<leftylink> well, = has much lower precednece than ==, so you would need to use parentheses
<leftylink> but of course it works with the correct parentheses.
<willow> ruby has ? ternary operator
<willow> unfortunately no walrus operator like python
leonthemisfit has joined #ruby
joto has quit [Remote host closed the connection]
Linux_Kerio has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
ur5us has joined #ruby
<ox1eef_> if x = 3 == 3; puts x; end works as expected. if x = (3 == 3); puts true; end is a little clearer, and might help for more complex conditions. Some people recommend avoiding assignment in if altogether though.
aesthetikx has joined #ruby
aestheti1 has quit [Ping timeout: 272 seconds]
Sankalp has quit [Ping timeout: 268 seconds]
_ht has joined #ruby
Sankalp has joined #ruby
Linux_Kerio has quit [Ping timeout: 252 seconds]
<tsujp> Currently reading the docs for the IO class but in-case it isn't there or I miss it, what's the best way to read from a potentially large file where I might need to go _backwards_ too. I.e. `File.foreach` is not useful here as that only goes _forwards_
<tsujp> `IO:Buffer#slice` looks useful for this "view" as I can move the start and end around but the `IO:Buffer` does not keep the entire file in memory does it? The docs say `Create a buffer mapped to some file with ::map, then it could be used for reading and writing the underlying file.` so I am assuming it is not copied into memory?
<ox1eef_> Does seek not help ? My approach would be: File.new('foo.txt', 'r'), and then I'd use seek, alongside reading a given number of bytes.
<jhass[m]> I'd probably trade some memory usage (keeping things I might need later again in a cache, usually in their parsed/deserialized form) to achieve linear reading though, it's just that much faster I think
Sankalp has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 260 seconds]
<leonthemisfit> personally I'd say those are both good solutions depending on the specific use case and whether or not it's known in advance what needs to be cached or if it's conditional based on the input file
apteryx has quit [Ping timeout: 252 seconds]
Cata[m]1 has quit [Quit: You have been kicked for being idle]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
apteryx has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
Sankalp has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
smp has quit [Remote host closed the connection]
smp has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
dionysus69 has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
ccapndave has joined #ruby
Sankalp- has joined #ruby
Sankalp has quit [Ping timeout: 264 seconds]
Sankalp- is now known as Sankalp
ccapndave has quit [Client Quit]
moldorcoder7 has joined #ruby
markong has joined #ruby
ur5us has joined #ruby
victori has quit [Ping timeout: 246 seconds]
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
victori has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
lucartc has joined #ruby
mooff has quit [Remote host closed the connection]
mooff has joined #ruby
dorian has quit [Remote host closed the connection]
plantman2 has joined #ruby
plantman has joined #ruby
plantman has quit [Ping timeout: 252 seconds]
plantman2 has quit [Ping timeout: 256 seconds]
plantman has joined #ruby
plantman2 has joined #ruby
dorian has joined #ruby
dorian has quit [Remote host closed the connection]
dorian has joined #ruby
plantman2 has quit [Ping timeout: 252 seconds]
plantman has quit [Ping timeout: 248 seconds]
shiru has joined #ruby
razetime has quit [Remote host closed the connection]
TomyWork has joined #ruby
Linux_Kerio has joined #ruby
Guest61 has joined #ruby
Guest61 has quit [Client Quit]
stirl has joined #ruby
Laplace has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
tuxcrafter has quit [Client Quit]
tuxcrafter has joined #ruby
shiru has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
<adam12> Apparently rubygems.org repo for gem sources is 5.2TB compressed. :O
<leah2> and 4.2TB of that is libxml binaries?
<adam12> leah2: LOL. I'm not sure, tho I am intrigued. I only have 2 nokogiri releases archived, and they are ~ 6 MB each.
<leah2> imagine how may loc ruby are 6mb
<adam12> Contrary that to the other gems I talked about yesterday, which are about 45-50 MB each (3 of them alone make up 15 GB of my archive)
<adam12> I was thinking about offering some sort of mirror, where you could ssh in and grep through every gem released, but I'd have to re-architect if I was going to store 5.2+ TB.
<adam12> Or just say nope to anybody with 50MB daily releases.
<leah2> how is it compressed?
<leah2> gems are zip no?
<adam12> Not zip, afaik.
<adam12> I actually don't remember now, tho I looked just a few months ago. It's a package of packages.
<leah2> or tar
<adam12> I think it's a tgz of tz.
<adam12> err, tar of tgz.
<leah2> ok
<adam12> or a tgz of tars. Oneo f those.
<leah2> so it compresses across files hmm
<adam12> I use transparent compression on the filesystem.
<adam12> Or at least, that's what I currentlt do for gemdocs.org.
<leah2> zfs?
<adam12> Yep.
<adam12> Well, btrfs and zfs.
<adam12> btrfs is legacy, and what I started with. But I am gradually moving to zfs.
<leah2> i wonder if zfs dedup would work
rapha has joined #ruby
<rapha> hi all!
<leah2> or use ginormeous amounts of ram
<leah2> hi rapha
<adam12> rapha: hello
<adam12> leah2: dedup might work. at least with yard doc output, there's a lot of common assets that I store repeatedly.
<adam12> leah2: I've never had good dedup experience tho.
<adam12> Rather just throw more TB at the machine.
<rapha> when `bundle env` and `gem env` agree on /home/jrs/.gem/ruby/3.0.0 being in the Gem Path, shouldn't running, say, `rake -T` (instead of `bundle exec rake -T`) also be working? The Gems are all installed in that path, but the former command complains it can't load the gems. I'm confused by this.
<rapha> Hey leah2 and adam12 :)
<rapha> Did you both have a happy new year's eve?
<adam12> rapha: when you call `rake`, do you get the one from that path?
<adam12> Technically the `rake` from that path isn't likely to be setting up bundler env, so I am not sure it would work without complaints.
<rapha> aha! ofc, that's it! in that case i get /usr/bin/rake
<rapha> ok, then it's logical one needs to prefix with `bundle exec`. thanks!
<adam12> leah2: I'm actually trying to wrap up migration off btrfs this week. I'm exporting the btrfs image over ssh+nbd and it's working but it's not without it's issues.
<adam12> rapha: I'd generate binstub. Then you can push bin/ with direnv if desired.
<adam12> rapha: bundle binstubs rake
<rapha> i didn't understand well, adam. `which rake` is still the same after `bundle binstubs rake`.
<adam12> I wanted to mirror all ruby source because if I updated yard/rdoc/whatever, I'd like to regenerate all source with new version. And I dont want to redownload all that every time from rubygems.org.
<adam12> rapha: That command makes a bin/rake file
<adam12> rapha: So now instead of bundle exec rake, you bin/rake
<rapha> oooh, right in .
<adam12> rapha: Or, install direnv, and PATH_add bin/. Then you can just `rake`.
<rapha> not sure if i want a bin/ folder in every repo...
<rapha> i'm fine with `bundle exec ...`. was just confused the general behaviour, but the confusion is now cleared up.
<adam12> rapha: Maybe just alias be='bundle exec'
<adam12> rapha: Yeah.
* rapha might be lazy but not when it comes to typing ... didn't get those Keychron K80 for no reason :P
henk has left #ruby [#ruby]
travelingwilbur has joined #ruby
c10l has quit [Ping timeout: 260 seconds]
plantman2 has joined #ruby
plantman has joined #ruby
c10l has joined #ruby
Sheilong has joined #ruby
plantman has quit [Ping timeout: 260 seconds]
plantman2 has quit [Ping timeout: 260 seconds]
caedmon has joined #ruby
c10l has quit [Ping timeout: 272 seconds]
caedmon has quit [Ping timeout: 268 seconds]
stirl has quit [Ping timeout: 260 seconds]
leonthemisfit has quit [Quit: WeeChat 3.6]
Sankalp has quit [Ping timeout: 260 seconds]
___nick___ has joined #ruby
stirl has joined #ruby
crax23 has quit [Ping timeout: 256 seconds]
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
___nick___ has quit [Ping timeout: 268 seconds]
Sankalp has joined #ruby
___nick___ has joined #ruby
TomyWork has quit [Remote host closed the connection]
grawity has quit [Remote host closed the connection]
grawity has joined #ruby
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
tuxcrafter has quit [Quit: Client closed]
tuxcrafter has joined #ruby
cartdrige has joined #ruby
c10l has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 246 seconds]
keb has joined #ruby
Linux_Kerio has quit [Ping timeout: 252 seconds]
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
Laplace has quit [Quit: Connection closed for inactivity]
John_Ivan_ has joined #ruby
victori has joined #ruby
John_Ivan has quit [Ping timeout: 260 seconds]
victori has quit [Read error: Connection reset by peer]
victori has joined #ruby
Starfoxxes has quit [Ping timeout: 264 seconds]
Starfoxxes has joined #ruby
gonix has joined #ruby
___nick___ has quit [Ping timeout: 256 seconds]
caedmon has joined #ruby
Sankalp has quit [Ping timeout: 272 seconds]
gonix has quit [Ping timeout: 252 seconds]
caedmon has quit [Ping timeout: 252 seconds]
Sankalp has joined #ruby
keb has quit [Quit: Leaving]
ur5us has joined #ruby
gonix has joined #ruby
Linux_Kerio has joined #ruby
_ht has quit [Quit: _ht]
dionysus69 has joined #ruby
pgib has quit [Ping timeout: 255 seconds]
travelingwilbur has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 260 seconds]
stirl has quit [Ping timeout: 256 seconds]
hightower3 has joined #ruby
Y05hito__ has joined #ruby
Y05hito__ has quit [Read error: Connection reset by peer]
hightower4 has quit [Ping timeout: 268 seconds]
crax23 has quit [Ping timeout: 268 seconds]
travelingwilbur has joined #ruby
cartdrige has joined #ruby
travelingwilbur has quit [Ping timeout: 260 seconds]
travelingwilbur has joined #ruby
leonthemisfit has joined #ruby
cryptkeeper has joined #ruby
cartdrige has quit [Read error: Connection reset by peer]
cartdrige has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
cartdrige has quit [Read error: Connection reset by peer]
cartdrige has joined #ruby
tomtmym has quit [Quit: Gone.]
perrierjouet has quit [Quit: WeeChat 3.8]
travelingwilbur has quit [Ping timeout: 246 seconds]
travelingwilbur has joined #ruby
gonix has quit [Read error: Connection reset by peer]
Sheilong has quit []
stirl has joined #ruby