<gr33n7007h>
I think that's why it falls short for zayd's example.
<adam12>
gr33n7007h: Yes, likely. There's a distinction of kilobyte vs kibibyte, but when I was doing this implementation it was for representing on-disk values and I was copying the hardware vendor at the time.
<adam12>
So more accurately, that value is 30.502 GiB.
<gr33n7007h>
adam12: ah, now that makes sense for storage. precisely ;)
<adam12>
I should probably update it.
<adam12>
Or at least allow you to specify the Si unit.
<gr33n7007h>
adam12: that's sound great to me! ;)
donofrio__ has joined #ruby
donofrio_ has quit [Ping timeout: 264 seconds]
Guest26nakilon has joined #ruby
<Guest26nakilon>
hi
<Guest26nakilon>
I have multiple YAML::Store files and I need to implement a single migration operation that would edit them all
<Guest26nakilon>
the issue is that if I do, let's say, s1.transaction{ s2.transaction{}; s3.transaction{} } -- if t3 fails it won't rollback t2
<Guest26nakilon>
also, if I do s1.transaction{ s2.transaction{ s2.abort } }, it won't abort s1
<Guest26nakilon>
the one question is will s1.transaction{ s2.transaction{ s1.abort } } abort both?
<Guest26nakilon>
or... was having multiple pstores essentially an impractical idea and I have to switch to a single db?
<Guest26nakilon>
or, what if I make a special single db that to wrap them all in its transaction and be careful to close transactions alltogether in the end?
<Guest26nakilon>
i.e. super_store.transaction{ s1.transaction{ ... s2.transaction{ ... s3.transaction{ ... } } } } and call only the super_store.abort -- will it be a remedy?
<Guest26nakilon>
or should it be a catch/throw
<Guest26nakilon>
this throws error
<Guest26nakilon>
tap{ next catch(:c)do end.tap{ fail } }
<Guest26nakilon>
why this does not?
<Guest26nakilon>
tap{ next catch :c do end.tap{ fail } }
Guest26nakilon has quit [Ping timeout: 250 seconds]
_ht has joined #ruby
bovis has quit [Ping timeout: 268 seconds]
grenierm has joined #ruby
user71 has joined #ruby
reset has quit [Quit: reset]
cxl has quit [Read error: Connection reset by peer]
Furai has quit [Quit: WeeChat 4.2.2]
cxl has joined #ruby
Furai has joined #ruby
gaussianblue has joined #ruby
xdminsy has joined #ruby
nmollerup has joined #ruby
sarna has quit [Ping timeout: 256 seconds]
grenierm has quit [Ping timeout: 250 seconds]
sarna has joined #ruby
TomyWork has joined #ruby
hightower2 has joined #ruby
graaff has quit [Quit: Leaving]
Guest26 has joined #ruby
<Guest26>
Hope everyone's peachy this morning :-)
<Guest26>
Was just wondering how many devs here are getting more involved in Rust, and how many find themselves rewriting some or all of their Ruby apps (or RoR) to Rust?
Guest66 has joined #ruby
Guest20 has joined #ruby
Guest20 has quit [Quit: Client closed]
Guest18 has joined #ruby
Guest89 has joined #ruby
Guest89 has quit [Client Quit]
Guest66 has quit [Quit: Client closed]
Guest76 has joined #ruby
Guest76 has quit [Client Quit]
mkoncek has joined #ruby
<mkoncek>
in `void rb_hash_foreach(VALUE hash, int (*func)(VALUE key, VALUE val, VALUE arg), VALUE arg);` what is the meaning of the returned int from the callback? the documentation says nothing about it
<konsolebox>
shaghomey: Can't answer your question since I don't have an app, but translating Ruby code to Rust for me is not so straightforward. I'd look at other languages like C# first.
<shaghomey>
Thanks. Since you mentioned C#, may I ask whether you'd go with Java?
<shaghomey>
(ie, what your reasons would be for chosing the one over the other)
<konsolebox>
shaghomey: I'm not sure. I feel so unproductive with Java. That's just me.
xdminsy has quit [Read error: Connection reset by peer]
shaghomey has joined #ruby
xdminsy has joined #ruby
karolis has joined #ruby
shaghomey has quit [Quit: Client closed]
osc4rpt has quit [Ping timeout: 252 seconds]
osc4rpt has joined #ruby
pantera has joined #ruby
<adam12>
There are things I would rewrite in Rust, but most Rails apps would not qualify.
xdminsy has quit [Remote host closed the connection]
xdminsy has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
fdan has joined #ruby
Guest45 has joined #ruby
Guest45 has quit [Client Quit]
pascal_blaze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pascal_blaze has joined #ruby
pascal_blaze has quit [Ping timeout: 256 seconds]
fdan94 has joined #ruby
fdan79 has joined #ruby
fdan has quit [Ping timeout: 250 seconds]
fdan94 has quit [Ping timeout: 250 seconds]
fdan79 has quit [Quit: Client closed]
<zayd>
Is it a bad idea to have a fetch script be only 1 file? I wanted to pack in quite a few features so I'm not sure.
<adam12>
zayd: Not sure I follow?
<zayd>
adam12: Basically, I'm trying to create something like neofetch with a decent amount of its features along with some other things I'll add in. I know that neofetch does it in just 1 file but it's a bit large (probably due to the ASCII art being in it, which I will have separately). I'm just trying to look for the most efficient way to do this, as this is my first Ruby project.
<zayd>
Progress has been moving a bit slow tbh, but it's made me really like using Ruby
<adam12>
zayd: If you're distributing it as a Ruby gem, then you can just use the gem distribution mechanism which will support multiple files.
pascal_blaze has joined #ruby
<adam12>
zayd: There's a few different ways to package multiple files up, but they all have limitations or may not be maintained. I actually built my own, called rbz, which you could try if your requirements are simple.
<adam12>
github.com/adam12/rbz
<adam12>
If you have any sort of dependency on another Ruby gem, you might as well just use Rubygems to distribute.
<zayd>
adam12: Yeah I was thinking of doing that, plus I have it set up in bundle already. I'm just looking for whether it's best to split the program between multiple files or just have one big rubyfetch.rb inside the bundle.
<adam12>
But if you only rely on Ruby stdlib then rbz might work for you.
<adam12>
It's a personal call. I've done a single 1000 line file because it felt more natural, but there's no real downside of breaking it up.
<zayd>
I guess I can go with a single file for now and if it gets too big to manage I'll split it up
<adam12>
Yep
<havenwood>
zayd: As soon as it gets awkward in a single class/module and file, I go to RubyGems style structure, like adam12 mentioned.