baweaver changed the topic of #ruby to: Rules & more: 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.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
braincrash has quit [Ping timeout: 272 seconds]
cnsvc has quit [Quit: WeeChat 2.9]
ellcs1 has quit [Ping timeout: 240 seconds]
cnsvc has joined #ruby
ur5us has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
gix has quit [Ping timeout: 272 seconds]
drincruz has quit [Ping timeout: 240 seconds]
Lyubo1 has quit [Ping timeout: 260 seconds]
lightstalker has quit [Ping timeout: 240 seconds]
lightstalker has joined #ruby
Lyubo1 has joined #ruby
TCZ has quit [Quit: Leaving]
bmurt has joined #ruby
<havenwood> cinci_kal: The method isn't available until below where it's defined.
<havenwood> cinci_kal: Commented on your gist.
<havenwood> cinci_kal: Is that what you mean?
ChmEarl has quit [Quit: Leaving]
cinci_kal has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mkaito has quit [Ping timeout: 258 seconds]
lipoqil has quit [Ping timeout: 258 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
mkaito- has joined #ruby
lipoqil has joined #ruby
janemba has quit [Ping timeout: 258 seconds]
janemba has joined #ruby
SeepingN has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
orbyt has quit [Quit: Textual IRC Client: www.textualapp.com]
xco has joined #ruby
adu has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
r3my has quit [Ping timeout: 240 seconds]
r3my has joined #ruby
meinside has quit [Ping timeout: 240 seconds]
meinside has joined #ruby
meinside has quit [Changing host]
meinside has joined #ruby
timwis has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Ping timeout: 265 seconds]
timwis has joined #ruby
timwis has quit [Excess Flood]
timwis has joined #ruby
meinside has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
timwis has quit [Changing host]
timwis has joined #ruby
meinside has joined #ruby
pitastrudl has quit [Ping timeout: 240 seconds]
pitastrudl has joined #ruby
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
cthulchu_ has quit [Ping timeout: 264 seconds]
djellemah has quit [Ping timeout: 240 seconds]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
powerhouse has quit [Quit: Leaving]
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
powerhouse has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
Azure has quit [Read error: Connection reset by peer]
wallace_mu has joined #ruby
Azure has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
powerhouse has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
powerhouse_ has joined #ruby
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
alfiemax has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
mozzarella has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
mozzarella has joined #ruby
wallace_mu has quit [Remote host closed the connection]
wallace_mu has joined #ruby
wallace_mu has quit [Ping timeout: 258 seconds]
SeepingN has joined #ruby
SeepingN has quit [Ping timeout: 240 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Ping timeout: 260 seconds]
ap4y has quit [Ping timeout: 264 seconds]
zacts has joined #ruby
zacts has quit [Client Quit]
_whitelogger has joined #ruby
zacts has joined #ruby
zacts has quit [Client Quit]
prestorium has quit [Quit: prestorium]
ap4y has joined #ruby
xco has joined #ruby
<Tuor> nakilon: ah first(10) looks nice to me, I didn't get it that it takes an argument, I tested .first without argument and got only the first. I'll probably switch. :)
x0n has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has joined #ruby
a-l-e has joined #ruby
duderono_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Furai has quit [Quit: WeeChat 2.9]
duderonomy has joined #ruby
Furai has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
burgestrand has joined #ruby
vondruch has joined #ruby
BSaboia has joined #ruby
mcr has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
ntt has joined #ruby
prestorium has joined #ruby
adu has quit [Quit: adu]
mcr has joined #ruby
imode1 has joined #ruby
imode has quit [Ping timeout: 272 seconds]
SeepingN has joined #ruby
imode has joined #ruby
prestorium has quit [Quit: prestorium]
imode1 has quit [Ping timeout: 260 seconds]
cd has quit [Quit: cd]
Rudd0 has quit [Ping timeout: 272 seconds]
SeepingN has quit [Ping timeout: 260 seconds]
ap4y has quit [Ping timeout: 258 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ntt has quit [Quit: Leaving]
BSaboia has quit [Quit: This computer has gone to sleep]
ur5us has joined #ruby
ellcs1 has joined #ruby
dfucci has joined #ruby
Mrgoose5 has joined #ruby
Mrgoose has quit [Ping timeout: 240 seconds]
Mrgoose5 is now known as Mrgoose
BSaboia has joined #ruby
zacts has quit [Quit: leaving]
brunosaboia_ has joined #ruby
deimos_ has quit [Quit: leaving]
BSaboia has quit [Ping timeout: 246 seconds]
brunosaboia__ has joined #ruby
powerhouse_ has quit [Remote host closed the connection]
brunosaboia_ has quit [Ping timeout: 240 seconds]
deimos_ has joined #ruby
powerhouse has joined #ruby
brunosaboia__ has quit [Quit: This computer has gone to sleep]
Tempesta has quit [Quit: See ya!]
mcr has quit [Ping timeout: 258 seconds]
Tempesta has joined #ruby
zacts has joined #ruby
cnsvc has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
freshmaker666 has quit [Quit: ZNC 1.8.2 - https://znc.in]
freshmaker666 has joined #ruby
freshmaker666 has joined #ruby
freshmaker666 has quit [Changing host]
ramfjord has joined #ruby
SeepingN has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
neozor has joined #ruby
alfiemax has joined #ruby
SeepingN has quit [Ping timeout: 256 seconds]
shortdudey123 has quit [Ping timeout: 256 seconds]
shortdudey123 has joined #ruby
<janemba> hello
<janemba> sorry but what's going on with bundler -> https://dpaste.org/ZXQY I really don't get it. Did I make something wrong ?
<jhass> janemba: what does which bundler and bundle exec ruby -v say?
<janemba> jhass: here the answer -> https://dpaste.org/gKFk
dionysus69 has joined #ruby
<jhass> mmh, no clues yet, can you add `gem env`, `head -n1 $(which bundler)`, `which gem` and `which ruby` please? :)
<janemba> sure
braincrash has joined #ruby
<janemba> done : https://dpaste.org/mQ4D
alfiemax has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 258 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rudd0 has joined #ruby
infinityfye has joined #ruby
alfiemax has joined #ruby
<jhass> janemba: sorry for the late response. So you've been running all commands as root so far?
<janemba> jhass: yes
<jhass> what distro is this?
<janemba> jhass: slackware
<jhass> can you tell me the output of gem which bundler please?
<janemba> yes sure
<janemba> --> /usr/lib64/ruby/2.6.0/bundler.rb
<jhass> mmh, not sure what's happening
<jhass> bundle -v and bundler -v produce the same (.2) output I presume?
<janemba> yes same .2
<jhass> what about bundle _1.17.3_ -v ?
<janemba> -> Bundler version 1.17.2
<jhass> maybe .3 just got released with the wrong version constant xD
<janemba> I was reeading bundle and bundler binary to check where they get 1.72.2 from
<janemba> jhass: lol :-D
<jhass> mh, no I can make it print .3
mikecmpbll has quit [Ping timeout: 260 seconds]
<jhass> what about bundle _3_ -v (just checking if the version picker is even doing anything in your shim)
<janemba> Oh !!!
<jhass> that's good and expected
<janemba> hmmm
<jhass> and making explicitly selecting .3 printing .2 ever more so weird
mikecmpbll has joined #ruby
<jhass> can you just upgrade your project to bundler 2? 😅
<janemba> well unfortunately it's not my project :(
<janemba> this is package require 1.17.3 bundle
<jhass> well locally too, 98% of stuff should be compatible
<jhass> but yeah, I have no clue what's happening there on your system. That just should not happen
<janemba> I will investigate
<jhass> most of these issues come from competing ruby installations, but that seems sane on your system
burgestrand has quit [Quit: burgestrand]
<janemba> ok i will check
xco has joined #ruby
imode has quit [Ping timeout: 256 seconds]
burgestrand has joined #ruby
SeepingN has joined #ruby
SeepingN has quit [Ping timeout: 265 seconds]
alfiemax has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
brunosaboia__ has joined #ruby
brunosaboia__ has quit [Client Quit]
drincruz has joined #ruby
TCZ has joined #ruby
markong has quit [Remote host closed the connection]
markong has joined #ruby
Swyper has quit [Remote host closed the connection]
drincruz has quit [Ping timeout: 256 seconds]
Swyper has joined #ruby
vondruch has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ruby
akem has quit [Ping timeout: 246 seconds]
djellemah has joined #ruby
leitz has joined #ruby
<leitz> Is the ruby-community (IRC, website) being maintained?
<jhass> not too actively tbh
<jhass> apeiros was the driving force behind and for the moment he has other priorities :)
mcr has joined #ruby
TCZ has quit [Quit: Leaving]
<leitz> jhass, is apeiros doing okay?
<leitz> The world seems to have gone crazy.
<leitz> I'm thinking through the "rubymentoring.org" site, and trying to make sure there's little or no duplication of effort.
<leitz> No real site yet, still in the planning stage. I added books to the ruby-community list, and did a PR.
<jhass> fwiw it's open-source (https://github.com/ruby-community/ruby-community) and should still auto-deploy (and I got the keys to fix that if not)
<leitz> It uses Rails and Bundler, neither of which I'm hyped about. :)
<jhass> I think the original intent was to list a curated list of recommendations, it looks like you rather went into the direction of a bibliography? :P
<jhass> Also not sure we really should link to amazon here
<leitz> jhass, I wasn't sure on Amazon, but some of the publishers don't really have good links. That's discouraging; PragProg seems to be dropping some of their Ruby titles.
<jhass> I think I'd rather have no link and just list an ISBN, but may just be me :shrug:
<leitz> I have most of the books I list, and I've gotten a couple more. Different books fit different minds, or the same mind at different times. I really love the Pickaxe, but now that I can understand more the O'Reilly book is good. But I couldn't understand that one when I first started.
<jhass> I mean if the list is too long we're not really helping anybody. At least not until we at least add a comment to each why you may want to choose this one over another, which complement and which are a bit redundant etc
GodFather has joined #ruby
<jhass> but then I only ever read one Ruby book and one Rails book :D
<jhass> (and that's like half of the programming books I ever read)
<leitz> Understood. I'm the opposite, I have about 20 Ruby based books, and stacks of Perl, C, Go, Python, and PHP. I learn most from books.
bmurt has joined #ruby
<leitz> I did sort the books by groups, and made comments on each group. I'm not sure what my base line is for mentoring, and if there will be any mentors willing to help out. Having the books in groups lets us say "Use IRC and Email through your first Ruby work, and then pick a topic." The books give ideas on topics.
<leitz> That's the thinking, anyway.
drincruz has joined #ruby
<nakilon> I have zero books, I have google
<jhass> If I can y'all make you run programming book, it's Clean Code
<nakilon> good thing that google knows that I only need ruby doc pages and the old "pragmatic ruby" book hosted on phrogz's site
<jhass> eh, read even
ramfjord has joined #ruby
<leitz> jhass, Clean Code is good. I'm going to re-read The Pragmatic Programmer soon, though. I think it's more in depth.
<nakilon> most of the things that no one follows were described years ago in "rope of enough length to shoot your own leg" or smth
<leitz> The Practice of Programming is good, too, but I like PragProg more.
TCZ has joined #ruby
kerframil has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
markong has quit [Remote host closed the connection]
kerframil has joined #ruby
markong has joined #ruby
ellcs1 has quit [Remote host closed the connection]
ellcs1 has joined #ruby
neozor has quit [Remote host closed the connection]
kerframil has quit [Quit: WeeChat 2.9]
neozor has joined #ruby
neozor has quit [Ping timeout: 246 seconds]
ramfjord has joined #ruby
mikecmpbll has quit [Ping timeout: 260 seconds]
mikecmpbll has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
impermanence has quit [Quit: Connection closed]
alfiemax has joined #ruby
wallace_mu has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
weaksauce has quit [Ping timeout: 265 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
teclator has joined #ruby
burgestrand has quit [Quit: burgestrand]
braincrash has quit [Read error: Connection reset by peer]
SeepingN has joined #ruby
burgestrand has joined #ruby
burgestrand has quit [Client Quit]
braincrash has joined #ruby
SeepingN has quit [Ping timeout: 260 seconds]
ramfjord has joined #ruby
SeepingN has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
alfiemax has quit [Remote host closed the connection]
braincrash has quit [Ping timeout: 260 seconds]
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
roshanavand_ is now known as roshanavand
Technodrome has joined #ruby
roshanavand_ has joined #ruby
roshanavand has quit [Ping timeout: 258 seconds]
roshanavand_ is now known as roshanavand
alexherbo2 has joined #ruby
akem has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
banisterfiend has joined #ruby
rose_nd_ash has joined #ruby
<apotheon> The Pragmatic Programmer is an excellent book.
alfiemax has joined #ruby
ramfjord has joined #ruby
ChmEarl has joined #ruby
ramfjord has quit [Ping timeout: 258 seconds]
rose_nd_ash has quit [Remote host closed the connection]
rose_nd_ash has joined #ruby
<jhass> does it try to define what pragmatism actually is? :D
mikecmpbll has quit [Ping timeout: 260 seconds]
braincrash has joined #ruby
<Tuor> Hi, I would like to do very simple user interraction, I just want (for now) that the user can enter yes or no (or y or n) case insensitive. And map this to true are false. How can I?
dfucci has joined #ruby
mikecmpbll has joined #ruby
dfucci has quit [Ping timeout: 260 seconds]
<Tuor> I looked for user input instead of user interaction in the gems and found: https://github.com/akerl/userinput seems to do what I need. :)
alfiemax has quit [Remote host closed the connection]
<adam12> Tuor: If you're looking to do it without dependencies, I'd probably start with using `gets` to assign to a variable, then maybe casecmp the result to get truthyness.
<adam12> Tuor: There's also tty-prompt which is very nice.
<apotheon> Tuor: You can just use gets, do a downcase comparison, and return true or false.
<apotheon> Tuor: That assumes you want actual interactive behavior. If you just want it as a command line argument, you can find the arguments in the ARGV array.
<apotheon> Tuor: All of this assumes you're trying to do this with a text interface, as opposed to using GUI libraries or something like that.
alfiemax has joined #ruby
<leitz> jhass, PragProg references the Latin and Greek origins of "pragmatic"; going to the Greek definition "fit for use". The very next sentence (in the Preface to the First Edition) is: "This is a book about doing."
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cd has joined #ruby
cthulchu_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
rose_nd_ash has quit [Read error: Connection reset by peer]
rose_nd_ash has joined #ruby
rose_nd_ash has quit [Ping timeout: 256 seconds]
<Tuor> text is fine.
dfucci has joined #ruby
<Tuor> dependency is not a problem (I write it only for my self (at least for now) and if it changes I'll have to write a Gemfile...
<havenwood> Tuor: require 'io/console'; $stdin.getch
<havenwood> y #=> "y"
<havenwood> Tuor: $stdin.gets(chomp: true) if you want to hit Enter or $stdin.getch if you don't.
TCZ has quit [Quit: Leaving]
dfucci has quit [Ping timeout: 265 seconds]
rkoller has joined #ruby
rkoller has quit [Client Quit]
quintasan has quit [Quit: quintasan]
quintasan has joined #ruby
quintasan has quit [Changing host]
quintasan has joined #ruby
ricer2 has quit [Quit: Caught SystemExit exception.]
ricer2 has joined #ruby
ramfjord has joined #ruby
braincrash has quit [Ping timeout: 260 seconds]
quintasan has quit [Quit: quintasan]
quintasan has joined #ruby
quintasan has quit [Changing host]
quintasan has joined #ruby
vondruch has quit [Ping timeout: 260 seconds]
<jhass> leitz: I just made the experience that it's rare for two people to agree what pragmatism actually is once you get to the details :P
dan64 has quit [Quit: ZNC - http://znc.in]
dan64 has joined #ruby
dan64 has quit [Quit: ZNC - http://znc.in]
banisterfiend has joined #ruby
dan64 has joined #ruby
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
Eiam has joined #ruby
ewanchic has joined #ruby
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
alfiemax has joined #ruby
<havenwood> jhass: I disagree with you about what pragmatism actually is. :P
<havenwood> Therefore affirming your point. 👍
<havenwood> leitz: I'm an Idealist Coder not a Pragmatic Programmer.
<zacts> what would an 'idealist coder' be?
imode has joined #ruby
<havenwood> zacts: An Anarchist Quaker Engineer.
<zacts> :-)
impermanence has joined #ruby
kristian_on_linu has joined #ruby
<havenwood> zacts: I'm a pacifist, anarchist, anti-fascist, and my Twitter bio at least claim I'm an engineer. ¯\_(ツ)_/¯
<havenwood> zacts: I'm suspicious of pragmatism. :P
<leitz> havenwood, I like the "get things done" mind-set. It puts me behind when the market is driven by data-science hopes.
<leitz> But I've usually sat between Operations that needed things to work and Coders who couldn't figure out why their perfect code didn't work.
<havenwood> leitz: I suppose it depends what's sacrificed for the pragmatism?
<leitz> havenwood, perfection.
* havenwood goes back to polishing stones
burgestrand has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
<apotheon> AQE for the win
<leitz> havenwood, it is an extension of the 'premature optimization' comment; get it to work first, then figure out how to improve it, if you need to.
weaksauce has joined #ruby
<havenwood> leitz: Ruby is good at prototyping and often then has long legs, serving well at *gasp* scale.
<havenwood> leitz: Sometimes hard to get out of a ball of mud built with incremental blocks of pragmatism too.
mikecmpbll has joined #ruby
fuzzface has joined #ruby
<havenwood> Rewrites seem to always misattribute successes to the language change, when it seems it's often just a way for engineering not get blamed for not writing it right the first time. Easier to swallow "we need to rewrite for a language to, ahem, scale" than "we need to rewrite in the very same language because we did it wrong the first time and learned."
<apotheon> How pragmatic do you think it is to make a ball of mud out of code?
<leitz> havenwood, I've been sticking with Ruby because it let's me make progress in areas that I haven't succeeded in before. With the switch to Roda or similar, I can probably achieve any scale I'm likely to encounter.
<apotheon> Chad Fowler has employed an approach to solving the ball of mud problem that I found quite interesting.
akem has quit [Ping timeout: 256 seconds]
<havenwood> apotheon: Dry the mud out and grind it into a dust?
<leitz> havenwood, what I really find Ruby great for is that first build; because there are always things we don't know about the domain, the requirements, or the problem set when we first start. By getting something up and running quickly, we get to those next problems quickly.
<havenwood> apotheon: Melt the mud into a larger body of water.
<apotheon> He changed the development process at a company such that everything was built in small parts, basically a part per feature, each one in Whatever Language The Developer Wanted. When it became time to make a change, that piece would just get rewritten.
<havenwood> apotheon: Hide the mud and never speak of it again.
<apotheon> There was never a ball of mud. There was never a major language migration project.
<havenwood> apotheon: Yeah, at work we use many, many microservices written in a number of languages including a large amount of Ruby.
<apotheon> The pieces were intentionally small enough that it was as easy to rewrite (better) as it was to improve-in-place.
<havenwood> The Ruby services tend to have nicer attention to tooling and tests. :)
<apotheon> The tooling (especially testing-related) in Ruby is *fantastic*.
<havenwood> apotheon: They come with their own challenges but when you have hundreds or more engineers they start making a lot of sense along team lines.
<apotheon> I miss it when I'm writing C.
<apotheon> . . . but C is my favorite video game.
fuzzface has quit [Client Quit]
cthulchu_ has quit [Read error: Connection reset by peer]
<havenwood> Majestic monolith!
<apotheon> What's a majestic monolith?
<havenwood> Rails.
<apotheon> ah
<apotheon> true
cthulchu_ has joined #ruby
<apotheon> Rails is too full of magic, just as Django is too full of thumbscrews.
<apotheon> I'm off for a motorcycle ride, perhaps some photos, and perhaps some writing.
<apotheon> ta
<havenwood> Magic seems good to me, unless it's dark magic, then great—but at what cost???
* havenwood invokes Tenderlove
<apotheon> It's the black magic in Rails that worries me. Rails is great, until it isn't.
<apotheon> . . . but I was leaving, so . . . AFK now.
neozor has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
cow[moo] has quit [Client Quit]
neozor has quit [Ping timeout: 256 seconds]
cow[moo] has joined #ruby
akem has joined #ruby
alexherbo2 has quit [Ping timeout: 260 seconds]
<adam12> I always forget IO#gets() accepts a chomp option.
GodFather has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
davispuh has joined #ruby
neozor has joined #ruby
neozor has left #ruby [#ruby]
GodFather has quit [Ping timeout: 260 seconds]
FastJack has quit [Ping timeout: 256 seconds]
lightstalker has quit [Ping timeout: 260 seconds]
FastJack has joined #ruby
dfucci has joined #ruby
lightstalker has joined #ruby
GodFather has joined #ruby
dfucci has quit [Ping timeout: 246 seconds]
<isene> Could someone chime in and give me a hand in using ueberzug to view images in my rfm (Ruby File Manager)? https://dpaste.com/5YS6NHQKU
akem has quit [Ping timeout: 260 seconds]
akem has joined #ruby
<adam12> isene: What do you mean by halt? What's the exit code?
<isene> adam12: Halt = It just displays the image and doesn't give back control to rfm
<adam12> isene: Ah. What happens when you run the command in a regular terminal? Do you have to press a key to exit? or does it return to the prompt immediately?
inanepenguin has joined #ruby
<adam12> isene: the img.sh command
<isene> I have to hit a key. So, should I fork that process in Ruby instead of simply running it in backticks? And how do I do that?
inanepenguin has quit [Client Quit]
<havenwood> isene: require 'io/console'; $stdin.getch
ChmEarl has quit [Read error: No route to host]
<havenwood> isene: Oh, I got it opposite. You *don't* want blocking.
<havenwood> It's already blocking. Gotcha.
ChmEarl has joined #ruby
<isene> yes
<isene> havenwood: So, I need to fork it... but how?
<havenwood> isene: The most straightforward way is to spawn a fork with #spawn or, like you said, a thread.
<havenwood> isene: Other way is a fiber reactor, which would just take a gem to do.
bocaneri has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> isene: Process.detach spawn 'img.sh'
nofxx has quit [Remote host closed the connection]
nofxx has joined #ruby
Swyper has quit [Remote host closed the connection]
alfiemax_ has joined #ruby
<isene> havenwood: Or like this (with backticks?): Process.detach spawn `img.sh #{@selected} #{imgx} #{imgy} #{imgw} #{imgh}`
<havenwood> isene: Nope, no backticks.
<havenwood> isene: It'd be: spawn "img.sh #{@selected} #{imgx} #{imgy} #{imgw} #{imgh}"
<isene> havenwood: So this?: Process.detach spawn 'img.sh #{@selected} #{imgx} #{imgy} #{imgw} #{imgh}'
<havenwood> isene: Double quotes.
<havenwood> (For interpolation.)
alfiemax has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
alfiemax_ has quit [Ping timeout: 264 seconds]
TCZ has joined #ruby
braincrash has joined #ruby
<isene> That was a tiny step forward - I got to browse one image, press Down and got the second image, but then it stops. I cannot get it to display a third image, but I can go back to the first. This is rather odd methinks.
Eiam has quit [Quit: (╯°□°)╯︵ ǝpouǝǝɹɟ]
alfiemax has quit [Ping timeout: 258 seconds]
alfiemax has joined #ruby
<isene> How do I kill a detached process?
<leitz> isene, love on it a lot. Give it plenty of hugs.
<leitz> Failing that, pkill or kill <PID>
<isene> leitz: Inside ruby??
<leitz> isene, my guess is yes, but I haven't done it myself. There is a "kill" in the Process module.
<havenwood> isene: #spawn returns the PID
<isene> So, what's the command for killing the process?'
<leitz> Process.kill("TERM", pid)
<havenwood> isene: Search for "kill" in the process docs. ¯\_(ツ)_/¯
<havenwood> isene: Or don't detach it.
<havenwood> isene: Child processes die with their parents, unless ZOMBIE ORPHANS...
<havenwood> No alarm, just ZOMBIES.
* havenwood runs in terror
* havenwood to his chariot pulled by flying cats
<leitz> isene, I just tested that, and it works.
<nakilon> zombie processes should become more active if you emit sounds
alfiemax has quit [Ping timeout: 272 seconds]
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 246 seconds]
alfiemax has joined #ruby
burgestrand has quit [Quit: burgestrand]
Liothen has quit [Ping timeout: 240 seconds]
Liothen has joined #ruby
burgestrand has joined #ruby
bvdw has quit [Quit: The Lounge - https://thelounge.chat]
bvdw has joined #ruby
<EdwardIII> hrm this is weird, if i do a brand new thing with `bundle gem thinger`, go into it, do bundle install, then do bundle exec rake test, i get Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it
<EdwardIII> hmmm nope, just me being in the wrong directory. dumb
bmurt has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
larou has joined #ruby
a-l-e has quit [Ping timeout: 260 seconds]
GodFather has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #ruby
cnsvc has joined #ruby
larou has quit [Quit: Connection closed]
larou has joined #ruby
yasumi2136 has joined #ruby
larou has left #ruby [#ruby]
ur5us has joined #ruby
<Tuor> Hi, My script is generally running, but after some 2 hour of waiting i got a "Uncaught exception: failed to allocate memory". I do have 64GB of ram on my computer and all I did was hashing files one after one and building a big object with a very long list of hashes and one or more paths to files having the same hash. My code (don't cry to much please, just finished the prototype): https://gitlab.com/nod0n/dedup
<Tuor> Could it really have no memory left? I mean 64GB is a lot...
ramfjord has quit [Ping timeout: 264 seconds]
alfiemax has quit [Ping timeout: 272 seconds]
dfucci has joined #ruby
GodFather has joined #ruby
<Tuor> it's only 142 total lines. ;)
dfucci has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
dfucci has joined #ruby
<havenwood> Tuor: Find.find is recursive. I suspect you're repeatedly recursively crawling directories.
<havenwood> Tuor: You can Find.prune(path) for paths you've seen or rework the logic to take into account that Find.find goes deep. Does that sound right?
<Tuor> havenwood: yes. Every file which is found recursively in some specific directories
<havenwood> Tuor: And within directories within that directory.
<havenwood> Tuor: And so on.
<havenwood> Tuor: Are these not deeply nested dirs?
<Tuor> very deeply nested.
<Tuor> listing all files worked fine (~200K)
<havenwood> Tuor: Hmm. Maybe track paths seen and blow up when you see a duplicate path?
<havenwood> Tuor: Or prune. I don't quite follow this logic on first glance, but assuming you don't expect the same paths seen multiple times.
<Tuor> hmm track every found directory and if I'm traversing the same directory again, exit?
dfucci has quit [Read error: Connection reset by peer]
alfiemax has quit [Remote host closed the connection]
<havenwood> Tuor: I meant raise an exception (assuming it's exceptional and shouldn't happen).
<havenwood> Tuor: Or if it's allowed but you don't want to repeatedly crawl the same tree, prune.
<Tuor> I don't expect to see them multiple times. And even if I do, I would calculate the same checksum again and fail at: https://gitlab.com/nod0n/dedup/-/blob/master/lib/duplicate.rb#L13
CrazyEddy has joined #ruby
<havenwood> Tuor: defined? @main.includes(path)
dfucci has joined #ruby
<havenwood> Tuor: `defined?` meant here??
<havenwood> That seems wrong.
<Tuor> If it crawls the same tree again, it finds the same files and then it would raise an error at line 13 or 19. It could theoretically add the same path to the main and secondary storage...
<havenwood> Tuor: Did you mean?: raise 'main_path already defined!' if @main.includes(path)
<havenwood> &>> :oops if defined? false
<rubydoc> # => :oops (https://carc.in/#/r/9u00)
<havenwood> &>> :oops if defined? true
<rubydoc> # => :oops (https://carc.in/#/r/9u01)
<havenwood> Tuor: ^
<Tuor> ups, forgot the defined. that you! i'll path
zacts has quit [Quit: leaving]
ap4y has joined #ruby
<Tuor> should be better now
<nakilon> I would not use Ruby to hash millions of files
<nakilon> use some command line utilities like md5, openssl, etc.
<Tuor> nakilon: why not?
burgestrand has quit [Quit: burgestrand]
<nakilon> because that makes no sense
<Tuor> What is the difference?
<nakilon> get all the hashes with those tools and them process the results in Ruby as you wish
<Tuor> I'm sorry, but I don't get the point.
<nakilon> the difference is that you came here to tell that it didn't work
<nakilon> Ruby has nothing to do with hashing
<nakilon> checksuming, whatever
<havenwood> Well, it *can* checksum. So related.
<havenwood> nakilon: Might just be with another error in #bash channel. ¯\_(ツ)_/¯
<nakilon> the OS where you run your Ruby already has hundreds of utilies, including those that are for that purpose
<nakilon> heh
<havenwood> nakilon: Shell programming can really start to suck after more than a few dozen lines, especially for folk who aren't shell programmers. That said, it's funny how shell scripts can actually be super terse and performant.
banisterfiend has quit [Read error: Connection reset by peer]
<havenwood> Then as they grow they become monsters...
<nakilon> I'm not telling to code all the program in bash, neither in Ruby
<nakilon> just split
<havenwood> GNU Parallel can be nice for pretty respectable parallel processing for stuff like this.
ramfjord has joined #ruby
<havenwood> nakilon: I hesitate to suggest shell to folk who aren't already familiar. So. Many. Pitfalls.
<nakilon> I suppose if you use proper md5/openssl/whatever commands they'll use paralleling internally in an efficient way
<nakilon> paralleling such stuff on your own might not be a good idea because of hard drive cache miss
alfiemax has joined #ruby
<Tuor> havenwood: I now bash a lot better then ruby, but it's more then just a bunch of lines and if it grows it's a lot easier even for me to debug ruby then my own shell scripts from 2 years ago (Shellscripts >100 lines can be quite tedious to debug). How ever it's not about the language and I don't care how long it takes, I just want it to work and If I don't have to rewrite it, I'll prefer. On top of it, handling pathnames isn't all that easy to do it in a
<Tuor> safe manner in bash :(
<havenwood> Tuor: Easier to test Ruby. <3 Ruby.
alfiemax has quit [Ping timeout: 240 seconds]
<havenwood> Tuor: I'm not arguing for Bash. :)
<Tuor> :), how ever what could be the problem for my exception, any ideas?
<Tuor> I'm open to improvements, but if they take to much time I'll not be able to realize them this evening. (with out rewriting it (ruby or not))
<Tuor> I let it run again to see if my memory fills up. I'm at ~50K files out of 277K. I'll see if my machine just runs out of memory.
<Tuor> Can it be, that a file is to big to hash it?
<nakilon> as I understand there are millions of files and you want to hold their checksums of whatever of all of them in the RAM at the same time
<nakilon> while Ruby is one of the most slow and memory consuming languages
<havenwood> Tuor: Your code isn't working to detect duplicates, right? Or the `defined?` part works.
<nakilon> try on smaller directories and measure the consumed RAM with `time` or another nix utility
<nakilon> to know if it's because you want it to hold too much or because it's an infinite recursion in the program or smth
<nakilon> and why the gem Blake? there is Digest::*.file()
<nakilon> the more gems you use the more chances they have own issues
<Tuor> my code works on smaller amounts of files and deletes duplicates.
<Tuor> nakilon: blake2b is fast.
<Tuor> I can test on smaller directories and see how much it consumes.
<nakilon> be sure that gem is faster that using command line utilities, because gem might have Ruby overhead
<Tuor> at the moment I'm at 55K files and this is my "available memory": 53Gi
<nakilon> consuming so much memory for 55k numbers sounds weird
<Tuor> used (my computer, not only my script): 7.7Gi
<Tuor> so until now, I do have a lot of free memory.
Azure has quit [Ping timeout: 256 seconds]
Azure has joined #ruby
<nakilon> I would do Ruby Dir.glob() with whatever filtering logic you need and feed it to https://manpages.debian.org/testing/coreutils/b2sum.1.en.html and then get it back to Ruby for further needs
GodFather has quit [Ping timeout: 260 seconds]
<Tuor> Why Dir.glob(), what the advantage?
<Tuor> What's the advantage of feeding to the cli b2sum?
<Tuor> I'll check it out.
<Tuor> Inresting module. :)
<Tuor> Probably I found the problem: The biggest file is bigger then my RAM: 97Gi vs 62Gi...
<Tuor> nakilon: probably the shell utility can handle it, because it doesn't load first the complete file into RAM (like my code probably does).
<nakilon> I don't know these Find and FileTest things but I have a feeling that these 3 lines of code are the same as a single Dir.glob https://gitlab.com/nod0n/dedup/-/blob/master/lib/target.rb#L7-9
<Tuor> nakilon: possible. I'll check out the Dir.glob() method.
burgestrand has joined #ruby
alfiemax has joined #ruby
GodFather has joined #ruby
drincruz_ has joined #ruby
ricer2 has quit [Ping timeout: 256 seconds]
drincruz has quit [Ping timeout: 258 seconds]
<Tuor> What this three lines do: find all files (similar to Dir.glob), test if each file is a regular file (ex: not a directory) and add it into the @files variable. I get only regular files in the @files variable. Dir.glob() gives me all files, but also special files like for example devices (/dev), I would still have to do the FileTest.file?.
<al2o3-cr> regarding Falcon, Polyphony is very interesting.
marens has quit [Remote host closed the connection]
<al2o3-cr> the Ascyn-* members.
drincruz has joined #ruby
<Tuor> OK found the problem: It fails on files to big to load into ram. https://gitlab.com/nod0n/dedup/-/blob/master/lib/targets.rb#L53
drincruz_ has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> Tuor: I was working on binding monocypher to ruby with an easy to use API. Which in turn as a incremental interface (stream) solving this problem.
<al2o3-cr> Think i'm going to wait until ruby 3 though.
aandrew has left #ruby [#ruby]
<Tuor> al2o3-cr: was just searching in the internet for streaming files into a digest....
<Tuor> al2o3-cr: ok. What solutions would you suggest until then? cli util like nakilon sugested?
<al2o3-cr> Tuor: that or find a blake2b gem that is able to digest in chunks. :)
<al2o3-cr> Tuor: i don't think i've come across one tbh.
<Tuor> OK. Thx, there are not that many I'll see.
<al2o3-cr> Tuor: for the time being, it looks like you'll have to use an external command :(
<Tuor> OK. Thank you!
<al2o3-cr> Tuor: welcome :-)
<Tuor> al2o3-cr: what about: https://github.com/willbryant/digest-blake3
<al2o3-cr> Tuor: sure, but that is BLAKE3. if that is suitable for your needs, go ahead :)
<al2o3-cr> Tuor: it's got a streaming interface
<Tuor> If I'm not mistaken, it's still preatty good, (I know some less extreme security), but ah will do it.
<Tuor> (and will be even faster)
burgestrand has quit [Quit: burgestrand]
<al2o3-cr> Tuor: I can't remember why Loup Vaillant didn't use BLAKE3
<havenwood> Tuor: Why Blake? Any particular reason?
<havenwood> Tuor: How about using SHA512 or SHA3?
<nakilon> 23:43:17 <Tuor> nakilon: blake2b is fast.
<havenwood> Ah, I didn't read back that far.
<havenwood> SHA512 and SHA3 area really fast too. &shrug;
TCZ has quit [Quit: Leaving]
<al2o3-cr> Tuor: just don't use MD5 ;P
<Tuor> https://blake2.net/, question for you: why not?
<Tuor> al2o3-cr: shure. I know that. :)
<nakilon> why not md5?
<al2o3-cr> SHA3 is just as fast a BLAKE2b
<al2o3-cr> give or take a little.
<havenwood> nakilon: collisions I imagine
<nakilon> havenwood, but it appeared that his files are dozens of gigabytes large
<havenwood> Tuor: I have a pure Ruby SHA3 but the C-extension ones are way faster.
<havenwood> Tuor: Try SHA512?
<havenwood> nakilon: Eek. No wonder the RAM ran out.
<havenwood> Tuor: Does streaming with Digest::SHA512 work?
<Tuor> I take the fastest which handels >100GB files with my laptop and is more or less secure.
<Tuor> havenwood: have to check out
<nakilon> I guess SHA3 is already here: https://docs.ruby-lang.org/en/master/OpenSSL/Digest.html
Colpop4323 has joined #ruby
<Tuor> nakilon: is that in Ruby 2.7.1?
<havenwood> nakilon: Ah, right - added to OpenSSL::Digest but not Digest::SHA3.
<havenwood> Tuor: Yes.
<havenwood> Tuor: I'd expect SHA2 to be faster in software than SHA3, fwiw.
<havenwood> Tuor: I'd recommend trying SHA512 as a baseline.
Colpop4323 has quit [Read error: Connection reset by peer]
<havenwood> I can't think of a practical advantage for using SHA3.
<havenwood> (Unless you have hardware encoding available somehow.)
<al2o3-cr> Tuor: what is it needed for?
<Tuor> al2o3-cr: replacing https://gitlab.com/nod0n/dedup/-/blob/master/lib/targets.rb#L53 with something capable of streaming
<Tuor> havenwood: I don't know if I do have any acceleration for anything. (intel CPU)
<al2o3-cr> Tuor: i mean, why that particular cipher?
<Tuor> I just took it because I know it's fast and secure. Now I have to replace it with something, that is secure, can handle chunked data and if I can choose is fast.
<Tuor> I'll have t handle files of >100GB (64GB of memory).
<nakilon> idk how does security applies to files this large
<nakilon> anyway
akem has quit [Ping timeout: 272 seconds]
<al2o3-cr> Tuor: Is this a game?
<Tuor> al2o3-cr: What? why? Sorry I don't get it.
<al2o3-cr> Tuor: what are these files?
<Tuor> Files laying on my nas... Sometimes Backups/Images of things, sometimes I don't even know, would have to look for all big files and have a look at what they are...
<al2o3-cr> Tuor: why are you trying to hash them?
<Tuor> I want to identify copies of files and delete duplicates in directories which are "secondary" not sorted.
<al2o3-cr> Tuor: why does it have to be secure then?
<Tuor> I do have some sorted directory structure and some random stuff completely unsorted, and I don't want to go threw files, I already have in my sorted directory.
ellcs1 has quit [Ping timeout: 240 seconds]
<Tuor> al2o3-cr: Just because of the principle of avoiding using insecure stuff when you do have a secure alternative that's similarly fast or even fast.
<al2o3-cr> Tuor: just use xxhash then
* Tuor has to duckduckgo 'xxhash'
<al2o3-cr> Tuor: not cryptographically, but very very fast.
darthThorik has quit [Ping timeout: 272 seconds]
<havenwood> or Murmur
d0liver has quit [Ping timeout: 272 seconds]
proc has quit [Read error: Connection reset by peer]
<havenwood> Tuor: On Intel I'd imagine you have SSE2 available even, if you really want fast.
d0liver has joined #ruby
proc has joined #ruby
<al2o3-cr> havenwood: why didn't i think of that one, being the time of year :)
<Tuor> how can I check?
Pillus has quit [Ping timeout: 272 seconds]
<havenwood> Tuor: Desktop processors all have it these days.
<havenwood> Tuor: cat /proc/cpuinfo
darthThorik has joined #ruby
r3my has quit [Ping timeout: 272 seconds]
<havenwood> Tuor: XXH128 or something using SSE2 for parallelization should be very fastest, I'd think.
<havenwood> Tuor: So I'm agreeing with al2o3-cr :)
englishm has quit [Ping timeout: 272 seconds]
<al2o3-cr> havenwood: HHH3 SSE2
<Tuor> "flags" lists sse2
<al2o3-cr> *XXH3
Pillus has joined #ruby
manveru has quit [Ping timeout: 272 seconds]
<Tuor> Will try. :)
<havenwood> Okay, *almost* agreeing with al2o3-cr
<havenwood> haha
<al2o3-cr> havenwood: :-)
englishm has joined #ruby
<nakilon> guys, you spend much more time on chosing the hashing algorithm than would be spent on wrapping the Dir.glob and finding with any standard utility has a call syntax able to checksum a list of paths
r3my has joined #ruby
manveru has joined #ruby
<havenwood> I'd have just used SHA512 as a baseline to see from there. ¯\_(ツ)_/¯
<al2o3-cr> nakilon: why shell out when there is a tool in the stdlib or a gem
ec has quit [Ping timeout: 272 seconds]
<al2o3-cr> i'm never out of the ruby interpreter so i might be biased :)
<nakilon> because who knows what mess does an average ruby gem do compared to linux utilities
Phoebus has quit [Ping timeout: 272 seconds]
<havenwood> find /foo/bar -type f | parallel -j 9000 sha512sum #... work here, and please do have 9,000 cores, that's be nifty
<al2o3-cr> nakilon: if its been thouroughly tested, why not?
ec has joined #ruby
<havenwood> nakilon: The Ruby digest bindings are just based on reference implementations pretty much.
<havenwood> nakilon: And the OpenSSL ones, are, well, OpenSSL ones.
<nakilon> and again, using an already implemented features like checksumming the list of files or implicit large files processing is more reliable than reinventing that wheel in own script
<CommunistWolf> fork() could be cheaper
<nakilon> havenwood, and 9000 hard drive caches
<havenwood> nakilon: RAID 9000
<CommunistWolf> I'd generally prefer in-process to out-of-process unless I had a very good reason
<nakilon> unless parallel processes the list from start to the beginning without random walk
<havenwood> nakilon: For simple parallelized checksums I'd agree, but the more logic gets added the more I might consider a higher level lang.
Phoebus has joined #ruby
<nakilon> al2o3-cr, how many gems on github that you see the first time in your life are "thouroughly tested"?
<havenwood> And no fun writing shell tests.
<Tuor> OK. Thx you all for today. I'll have to work on streaming an other day. I'll try: Digest::XXH64.new.reset (it looks to me it can work with chunked data). have a good night. :)
<havenwood> Who writes tests to test the tests?
<al2o3-cr> nakilon: that's your job the check, i do.
<havenwood> Tests to exercise type sigs are interestings.
<havenwood> al2o3-cr: Yes, I certainly check.
<nakilon> CommunistWolf, I proposed to do only one call of a checksumming program and one call of ruby -- there is no "our-of-processing" here, just splitting the work into two steps
<al2o3-cr> havenwood: of course, it's a third party lib. Maybe it could be malware... :P
jrhorn424 has quit [Ping timeout: 272 seconds]
<havenwood> al2o3-cr: As long as its well tested malware...
<nakilon> checksum the given directories and then do anything you want with that
<CommunistWolf> the call of the checksumming program is out-of-process
<havenwood> it's well-tested malware*
<havenwood> I'd not shell out to a checksum util.
<CommunistWolf> do it however you like, but I know how I'd do it
<al2o3-cr> havenwood: hehe, absolutely
<havenwood> Shelling out is no fun and Ruby digests *just work*.
<nakilon> CommunistWolf, out-of-WHAT-process?
<CommunistWolf> the check process
siasmj has quit [Ping timeout: 272 seconds]
<nakilon> you don't call it from ruby
<nakilon> ther is a shell that you are already in
jrhorn424 has joined #ruby
<CommunistWolf> the distinction is kinda moot
<nakilon> just cheksum that directory ,and then run your ruby program on that results
<nakilon> just two program calls
<CommunistWolf> whether you `sha512sum | ruby ...` or `ruby <some script that fork { exec }s`, you're paying the same overhead
<al2o3-cr> nakilon: but what if it's GNU external command?
siasmj has joined #ruby
<havenwood> If I can avoid shelling out, I almost always do.
<nakilon> where did I say I call the ruby for each checksum?
mikecmpbll has quit [Ping timeout: 265 seconds]
<nakilon> where did I tell to shell out?
<nakilon> I told from the very beginning to do a single one call of any unix utility to checksum your directory
<nakilon> and then do a single one call of ruby to process the results
<havenwood> nakilon: sha1deep or something?
<nakilon> I don't know, these unilities must exist, would need 5 minutes of googling
<nakilon> *utilities
mikecmpbll has joined #ruby
<havenwood> nakilon: I'm not sure on the domain, so unsure if exact dir checksums suffice? I'm multitasking, so may have missed a requirement that allows complete dir comparison?
<havenwood> nakilon: I dunno. If a utility exists that does the particular thing? Maybe here, but only Tuor knows. I was assuming there's a tad more to what Tuor is doing but maybe I'm just wrong there.
<havenwood> Maybe they'll come back and share the finished product.
<havenwood> nakilon: I think about just as likely that there's a Ruby gem solution too though.
<al2o3-cr> nakilon: i bet sha512sum /foo/bar/* | sha512sum works
<havenwood> nakilon: Unsure if a Ruby gem solution or command line tool would be more optimal.
<nakilon> he said he knows bash better than Ruby, so he probably just wanted to experiment of making the whole program in pure Ruby; my point was that it might be not practical
<havenwood> yeah, i usually like to try both and see which i like when unsure on two lang options. (assuming it's something you can quickly spike out both options for)
<havenwood> you never know the state you'll find libs in
<nakilon> I see nothing bad in chaining the whole process into steps that use different languages
<havenwood> nor in just using one language
<Tuor> lol it goes on... Can't answer all questions. I already answered why not bash. My code works as it is published (for smaller files). It's a mess to handle filenames and logical connected data in bash. The discussion begun, because my solution didn't work with very big files. streaming will solve this problem. :) I'll try to remember to read the chat from tonight tomorrow morning.
<nakilon> people spend already around 60 years making new programming languages, there is no reason to decide "these 1000 languages are obsolete, I should now stick to the one, the whole science of programming languages design should stop exist"
<havenwood> nakilon: If SCOTUS has it's way in Oracle vs. Google we may all be learning new programming languages soon. >.>
<nakilon> you don't have to keep "logical connections" or do the "deleting/filtering" in bash
<al2o3-cr> nakilon: create your own language?
<havenwood> Set the world on fire so Oracle can make a buck. :(
<al2o3-cr> OOP will out live me :P
<nakilon> al2o3-cr, first check if it's already created: https://esolangs.org/wiki/Language_list
<havenwood> al2o3-cr: EOP, emotion-oriented programming, where everything in the language is an emotion.
<havenwood> *almost* everything
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SeepingN has joined #ruby
<al2o3-cr> esotric languages will soon enough
<al2o3-cr> *die
<nakilon> havenwood, Emo, Emoji-gramming, Emoticon from that link
<al2o3-cr> the only language good enough for me is Ruby!
<al2o3-cr> always has been, always will. :-0
<al2o3-cr> the creativity that 'Matz' introduced in the mid 90's, in IMO is just impressive to say the least!
akem has joined #ruby
<al2o3-cr> the only other language that truly inspires me, is Lua. so simple, so powerful.
<nakilon> fxri was a part of why I'm here
<nakilon> having the docs and irb in the same window was absolutely another world compared to C++Builder
alfiemax has joined #ruby
<nakilon> and it was in Ruby Installer I guess
Swyper has joined #ruby
banisterfiend has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
Swyper has joined #ruby
djellemah has quit [Ping timeout: 260 seconds]
braincrash has quit [Ping timeout: 258 seconds]
<al2o3-cr> Tuor: i'd be interested in the results for a 100 GB file.
<al2o3-cr> Tuor: time wise that is.
kristian_on_linu has quit [Remote host closed the connection]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
infinityfye has quit [Quit: Leaving]
TCZ has joined #ruby
ur5us has joined #ruby
Emmanuel_ChanelW has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
<al2o3-cr> Tuor: just did a quick test: https://imgur.com/a/F0XjPWj
<al2o3-cr> with 100 MB chunks.
djellemah has joined #ruby
<al2o3-cr> file size being 50 GB
roshanavand_ has joined #ruby
<al2o3-cr> with ractors this is going to be supersonic :-)
roshanavand has quit [Ping timeout: 260 seconds]
roshanavand_ is now known as roshanavand
<al2o3-cr> btw, this is using a single core, using i5U processor