<bobdobbs>
I'm assuming my script will be run in a linux environment. I want to test for the availability of a linux command. Is Shell the best tool to use?
<leftylink>
"If the method is applied to an Integer range without a block, the sum is not done by iteration, but instead using Gauss’s summation formula."
<leftylink>
as for the code, let's see... it's probably that int_range_sum call
<leftylink>
anyway my question is answered. if the docs reflect when it was added, it'd be around 2.7. et's see
fcser has quit [Read error: Connection reset by peer]
John_Ivan has quit [Ping timeout: 256 seconds]
fcser has joined #ruby
<leftylink>
you gotta tell us these things!
<leftylink>
can't hold out on us like that
fcser has quit [Client Quit]
fcser has joined #ruby
roadie has joined #ruby
<leftylink>
so I can reasonably expect that even if I gvae some absurd numbers that #sum will still calculate it as fast as it can create the bignums for it
<havenwood>
bobdobbs: You could alternatively look at PATH yourself, if you're anticipating the command will be in the PATH and is executable.
<havenwood>
command will likely be more portable than PATH
<havenwood>
i mean, it is
<adam12>
Gemdocs.org is now slightly less hacky. I've moved everything to a compressed filesystem and dropped storing everything as gzip. Gonna try to find time this week to generate docs for all new gem releases of versions I have already stored, and maybe setup the webhook to add new ones.... maybe. Or at least for the gems I already have for now.
oxfuxxx has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
<bobdobbs>
Thans havenwood
<bobdobbs>
*thanks
roadie has joined #ruby
<bobdobbs>
havenwood: sorry, I'm looking at this documentation for 'system'. I can't see how to supress messages: https://apidock.com/ruby/Kernel/system
ralu has joined #ruby
<bobdobbs>
havenwood: I mean, I can see the example you've given me. But I can't see how it maps to the docs
<bobdobbs>
Or at least to the documentation that I can find. There might be official documentation for this call, but I can't find it.
<adam12>
bobdobbs: Look for the Kernel#spawn docs.
<havenwood>
bobdobbs: I mean use system but the docs from spawn.
<havenwood>
The system docs just reference the same options from spawn, but use system.
<havenwood>
Command should work as I showed it.
roadie has quit [Quit: ERC (IRC client for Emacs 25.3.50.1)]
hd1 has quit [Quit: Connection closed]
ur5us has quit [Ping timeout: 240 seconds]
Pipip has quit [Quit: Ex-Chat]
Guest3367 has joined #ruby
oxfuxxx has joined #ruby
___nick___ has joined #ruby
oxfuxxx has quit [Ping timeout: 256 seconds]
taupiqueur has joined #ruby
oxfuxxx has joined #ruby
oxfuxxx has quit [Ping timeout: 268 seconds]
oxfuxxx has joined #ruby
roadie has joined #ruby
bluedust has quit [Remote host closed the connection]
John_Ivan has quit [Ping timeout: 256 seconds]
<rapha>
hi all
<rapha>
why might Sequel insist that "SQLite3::CorruptException: database disk image is malformed" although with `sqlite3` it opens just fine and `pragma integrity_check;` say all is fine?
<rapha>
says*
bluedust has joined #ruby
<jhass[m]>
maybe the command line tool and the ruby binding link against different versions of libsqlite3?
<jhass[m]>
Or you're simply not opening the same file actually :P
<rapha>
I made sure about the latter before asking :P
<rapha>
Hmm, the former sounds something to look into, tho
<rapha>
Also happy new year!
<jhass[m]>
thanks, same to you :)
<jhass[m]>
a blind bundle pristine sqlite3 / gem pristine sqlite3 might also be worth a shot
roadie has quit [Ping timeout: 240 seconds]
roadie has joined #ruby
bluedust has quit [Remote host closed the connection]
<rapha>
and needs to be put into the code manually
<rapha>
i think most ruby people are just happy with pry as it is
<adam12>
irb has picked up most of the pry pieces. I still use pry out of habit, and if I need to do a custom console, but outside of that, pry sees less usage for me lately.
<adam12>
And I'd rather run debug.gem than binding.irb almost always.
<rapha>
hmmm no reason so far to stop using it
<adam12>
Maybe you could do debug.gem, rdbg your command, then configure watch or outline or whatever the options are to display all variables at program pause.
<rapha>
will try Debug.gem ... so far i've lived okay with printf debugging
<rapha>
i do see the appeal of having an IDE where you can have a file open together with a terminal, run the file, then see your stack and play with it
<rapha>
(or maybe even interact with your stack visible, as Matlab allows one to do)
<rapha>
visually*
<adam12>
You can get that with the debug extension for vscode I believe.
<rapha>
hmm
<rapha>
will try then
<rapha>
adam12: so that's nice in terms of seeing the stack, but then you click on "debug console" and type "puts 'blah'" and to see the output you have to click back on "terminal". sad that they didn't find a way to make those two tabs one single tab.
<rapha>
okay, told him about it. we'll see how that goes.
<rapha>
thanks!
<rapha>
jhass[m]: fwiw that didn't help (gem pristine) and i ended up rebuilding the database on that same computer with that same sequel gem which needs to be able to access it.
dangerousdave has joined #ruby
<dangerousdave>
Anyone else here have a policy whereby additional code review approvals must be sought for complex, or extensive code changes?
bluedust has quit [Remote host closed the connection]
<adam12>
dangerousdave: How do you mean?
<adam12>
dangerousdave: After initial review, or if the code is complex, more than 1 review is necessary?
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
samgranieri has quit [Quit: ZNC 1.8.2+deb2build1 - https://znc.in]
samgranieri has joined #ruby
CrazyEddy has joined #ruby
<havenwood>
michigan: I think it's long been just the latter that works, but unsure. There's no strict rule that you should support www subdomain or lack of but I agree it's "normal" to just work.
<havenwood>
michigan: I don't know of anyone against having it also work omitting the "www" but needs to be configured.
<michigan>
Can't hurt! :-)
<weaksauce>
that's a pretty low effort thing to have not working