baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.3, 2.5.5, 2.4.6: 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!
brool has quit [Ping timeout: 258 seconds]
Fernando-Basso has quit [Remote host closed the connection]
mosh has quit [Ping timeout: 252 seconds]
skryking has quit [Ping timeout: 248 seconds]
fphilipe_ has joined #ruby
skryking has joined #ruby
tf2ftw has joined #ruby
jenrzzz has quit [Ping timeout: 245 seconds]
cthulchu_ has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
octos has quit [Read error: Connection reset by peer]
octos has joined #ruby
FancyEagle has joined #ruby
Ai9zO5AP has quit [Quit: WeeChat 2.4]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
<fredolinhares> exit
brool has joined #ruby
fphilipe_ has quit [Ping timeout: 258 seconds]
leitz has quit [Quit: Leaving]
fredolinhares has quit [Quit: WeeChat 1.9.1]
fredolinhares has joined #ruby
darix has quit [Quit: may the packets be with you...]
darix has joined #ruby
Vingador has joined #ruby
AJA4350 has joined #ruby
esp32_prog has joined #ruby
esp32_prog has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
orbyt_ has joined #ruby
FancyEagle has quit [Ping timeout: 244 seconds]
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
skryking has quit [Quit: WeeChat 2.2]
weteamsteve has joined #ruby
paraxial has quit [Ping timeout: 268 seconds]
Nicmavr has joined #ruby
paraxial has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
fphilipe_ has joined #ruby
budonyc has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fusl has quit [Remote host closed the connection]
Fusl has joined #ruby
AJA4351 has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
lambarena has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
deepredsky has joined #ruby
deepreds1 has quit [Ping timeout: 268 seconds]
Vingador has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
Vingador has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
fphilipe_ has quit [Ping timeout: 250 seconds]
skryking has joined #ruby
cropcircle has joined #ruby
octos has quit [Remote host closed the connection]
octos has joined #ruby
brool has quit [Ping timeout: 252 seconds]
Vingador has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
hekumar has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
duderonomy has joined #ruby
hekumar has quit [Remote host closed the connection]
jenrzzz has joined #ruby
tf2ftw has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
fphilipe_ has joined #ruby
AJA4351 has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
cropcircle has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Nicmavr has joined #ruby
esp32_prog has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
Talion has joined #ruby
<Talion> Hello all
<Talion> I am getting an error while trying to install mysql2 gem
<ruby[bot]> Talion: we in #ruby do not like irccloud.com, it has no syntax highlighting, distracting formatting and loads slowly for most. Please use https://gist.github.com
<Talion> May i have a help please?
esp32_prog has quit [Ping timeout: 258 seconds]
<Talion> This may be better
mad_al has quit [Quit: Textual IRC Client: www.textualapp.com]
<mozzarella> Talion: well, is mariadb installed?
mad_al has joined #ruby
<Talion> yes
<Talion> its installed
<Talion> [root@nebula one]# rpm -qa | grep MariaDB
<Talion> MariaDB-common-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-devel-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-client-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-compat-10.3.15-1.el7.centos.x86_64
AJA4350 has quit [Quit: AJA4350]
<Talion> just installed MariaDB-server also
<Talion> [root@nebula one]# rpm -qa | grep MariaDB
<Talion> MariaDB-common-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-compat-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-server-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-client-10.3.15-1.el7.centos.x86_64
<Talion> MariaDB-devel-10.3.15-1.el7.centos.x86_64
<Talion> same error
jenrzzz has quit [Ping timeout: 248 seconds]
<mozzarella> well, where is it installed?
<Talion> Centos 7.6
<mozzarella> Talion: no I mean the library
<mozzarella> what does 'find / -name libmariadb.so 2>/dev/null' say?
<Talion> ok
code_zombie has joined #ruby
<Talion> checking
gix has quit [Ping timeout: 259 seconds]
FancyEagle has joined #ruby
<Talion> it doesnt find libmariadb.so but it found libmariadb.so.19 wierd?
<Talion> [root@nebula ~]# find / -name libmariadb.so 2>/dev/null
<Talion> [root@nebula ~]# find / -name libmariadb*
<Talion> /usr/lib64/pkgconfig/libmariadb.pc
<Talion> /usr/lib64/libmariadbd.so
<Talion> /usr/lib64/libmariadbd.a
<Talion> [root@nebula ~]# find / -name libmariadb.so
<Talion> /usr/lib64/libmariadbd.so.19
<Talion> /usr/lib64/libmariadbclient.a
<Talion> ah its in the first line sorry, didnt see.
braincrash has quit [Quit: bye bye]
<mozzarella> there's an extra d there
<Talion> [root@nebula ~]# find / -name libmariadb*
<Talion> /usr/lib64/libmariadbd.so
<Talion> So it should work normally ?
<mozzarella> no idea why it's called that way, it's properly called libmariadb.so here
<mozzarella> no
<mozzarella> it doesn't have the right name
<Talion> shall i rename it ?
<mozzarella> I suggest you ask the centos people why that is, and maybe try creating symlinks or changing the makefile
<mozzarella> if you rename them it's probably going to break a bunch of stuff
jenrzzz has joined #ruby
braincrash has joined #ruby
<mozzarella> try this: ln -s /usr/lib64/libmariadb.so /usr/lib64/libmariadbd.so
fphilipe_ has quit [Ping timeout: 258 seconds]
<mozzarella> and check if you at least get a different error message when building the gem…
<Talion> ok
<Talion> trying
<Talion> it worked
<mozzarella> sweet
<Talion> ln -s /usr/lib64/libmariadbd.so /usr/lib64/libmariadb.so
<mozzarella> of course I mixed it up
<Talion> But i think there is a problem with mariadb package at centos?
<mozzarella> I always do
<Talion> :)
<mozzarella> I don't know, I suggest you ask them
<Talion> it shouldnt be there normally ?
<mozzarella> I don't use centos
<Talion> sure
<Talion> just saying
<Talion> Appreciated mozzarella, thanks.
<mozzarella> no problem
fphilipe_ has joined #ruby
fredolinhares has quit [Quit: WeeChat 1.9.1]
jenrzzz has quit [Ping timeout: 244 seconds]
fphilipe_ has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
Swyper_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
bambanx has joined #ruby
jenrzzz has quit [Ping timeout: 259 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
galeido has joined #ruby
jenrzzz has joined #ruby
fphilipe_ has joined #ruby
weteamsteve has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
cd has quit [Quit: cd]
jenrzzz has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
molly has joined #ruby
molly is now known as Guest46379
octos has quit [Read error: Connection reset by peer]
esp32_prog has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
esp32_prog has quit [Ping timeout: 258 seconds]
doodlebug has quit [Remote host closed the connection]
fphilipe_ has quit [Ping timeout: 252 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
xco has quit [Quit: xco]
sameerynho has joined #ruby
bambanx has quit [Quit: Leaving]
Ai9zO5AP has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
arand_ has quit [Ping timeout: 264 seconds]
sameerynho has quit [Ping timeout: 272 seconds]
fphilipe_ has joined #ruby
reber has joined #ruby
jenrzzz has joined #ruby
fphilipe_ has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
conta has joined #ruby
sauvin has joined #ruby
Swyper has joined #ruby
code_zombie has quit [Quit: Leaving]
Swyper has quit [Ping timeout: 248 seconds]
salerace has joined #ruby
woodruffw has quit [Ping timeout: 252 seconds]
Talion has quit [Quit: Connection closed for inactivity]
Guest46379 has quit [Ping timeout: 258 seconds]
_whitelogger has joined #ruby
conta has quit [Ping timeout: 244 seconds]
conta has joined #ruby
fphilipe_ has joined #ruby
schne1der has joined #ruby
jenrzzz has joined #ruby
arand has joined #ruby
xco has joined #ruby
esp32_prog has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
esp32_prog has quit [Ping timeout: 248 seconds]
slackmare has joined #ruby
FancyEagle has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 258 seconds]
kapilp has joined #ruby
JanMrlth has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
jenrzzz has joined #ruby
andikr has joined #ruby
TomyWork has joined #ruby
schne1der has quit [Ping timeout: 248 seconds]
aupadhye has joined #ruby
deepredsky has quit [Ping timeout: 248 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
schne1der has joined #ruby
lxsameer has joined #ruby
donofrio__ has joined #ruby
faces has joined #ruby
m27frogy_ has quit [Ping timeout: 250 seconds]
jtdowney14 has joined #ruby
KramerC has quit [Ping timeout: 250 seconds]
KramerC_ has joined #ruby
mahlon_ has joined #ruby
hanmac has quit [Ping timeout: 250 seconds]
KramerC_ is now known as KramerC
m27frogy has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
mahlon has quit [Ping timeout: 250 seconds]
jtdowney1 has quit [Ping timeout: 250 seconds]
donofrio_ has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
BrianWGray has quit [Ping timeout: 250 seconds]
facest has quit [Ping timeout: 252 seconds]
ErhardtMundt_ has joined #ruby
Brian-W-Gray has joined #ruby
michael_mbp has quit [Ping timeout: 248 seconds]
ErhardtMundt has quit [Ping timeout: 248 seconds]
hanmac has joined #ruby
michael_mbp has joined #ruby
alireza has joined #ruby
<alireza> is there a reason to use RuntimeError for custom exceptions instead of StandardError or vice versa?
<alireza> 'cause they're direct relatives?
mosh has joined #ruby
alireza has quit [Quit: WeeChat 2.1]
esp32_prog has joined #ruby
deepredsky has joined #ruby
blackmesa has joined #ruby
_whitelogger has joined #ruby
mikecmpbll has joined #ruby
sylario has joined #ruby
jefffrails35 has joined #ruby
duderonomy has quit [Ping timeout: 244 seconds]
lupine has quit [Remote host closed the connection]
lupine has joined #ruby
duderonomy has joined #ruby
ShalokShalom has quit [Remote host closed the connection]
Freshnuts has quit [Quit: Leaving]
xco has quit [Quit: xco]
laaron has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
laaron has joined #ruby
<linuus> How would you test this code in a nice way? https://gist.github.com/Linuus/f13248caab72718cc7b6818cdfde873b
<linuus> The `sync_with_remote` method makes a call to an external API. The method has been tested in isolation by passing in an API client mock.
<linuus> Now I want to test that this perform method which instantiates a thing and then calls the sync method. I could pass an API client mock to the perform method which passes it along to the sync method, but that seems messy...
ShalokShalom has joined #ruby
Jonopoly has joined #ruby
al2o3-cr has joined #ruby
hightower2 has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
Nicmavr has joined #ruby
jenrzzz has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
blackmesa1 has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
Swyper has quit [Ping timeout: 272 seconds]
alexeev has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
marmotini_ has joined #ruby
kapilp has quit [Quit: Connection closed for inactivity]
gb_away has quit [Ping timeout: 244 seconds]
conta has quit [Ping timeout: 272 seconds]
sysvalve has joined #ruby
Swyper has joined #ruby
mikecmpbll has quit [Ping timeout: 248 seconds]
TomyWork has quit [Remote host closed the connection]
TomyWork has joined #ruby
tf2ftw has joined #ruby
slackmare has quit [Ping timeout: 258 seconds]
conta has joined #ruby
kapilp has joined #ruby
mikecmpbll has joined #ruby
laaron has quit [Remote host closed the connection]
AJA4350 has joined #ruby
Swyper has quit [Remote host closed the connection]
laaron has joined #ruby
mniip has quit [Read error: Connection reset by peer]
mniip has joined #ruby
Caerus has quit [Ping timeout: 245 seconds]
Caerus has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 245 seconds]
alexeev has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
UncleCid__ has joined #ruby
jenrzzz has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 268 seconds]
dar123 has joined #ruby
Swyper has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
Swyper has quit [Remote host closed the connection]
Kestrel-029 has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
Swyper has joined #ruby
budonyc has quit [Quit: Leaving]
tf2ftw has quit [Quit: Textual IRC Client: www.textualapp.com]
tf2ftw has joined #ruby
alexeev has joined #ruby
paraxial has quit [Quit: The Lounge - https://thelounge.chat]
paraxial has joined #ruby
paraxial has quit [Read error: Connection reset by peer]
gb_away has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4350 has joined #ruby
cd has joined #ruby
conta has quit [Read error: Connection reset by peer]
conta2 has joined #ruby
Swyper has quit [Remote host closed the connection]
conta2 is now known as conta
ShalokShalom has quit [Ping timeout: 258 seconds]
conta has quit [Ping timeout: 250 seconds]
marmotini_ has quit [Remote host closed the connection]
conta has joined #ruby
phage has joined #ruby
phage has quit [Changing host]
phage has joined #ruby
banisterfiend has joined #ruby
_whitelogger has joined #ruby
conta has quit [Quit: conta]
conta has joined #ruby
Tuor_ has joined #ruby
Tuor_ has quit [Client Quit]
Dbugger has joined #ruby
<_axx> linuus why not test Thing.sync_with_remote in isolation?
<_axx> Eh, sorry, i mean, why test the job if it works in isolation
<_axx> linuus i probably would probably do a "Thing receives sync_with_remote" check in the job spec
blackmesa has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
phage is now known as Phage
Dbugger has quit [Quit: Leaving]
Dbugger has joined #ruby
Dbugger has quit [Quit: Leaving]
AJA4350 has quit [Ping timeout: 272 seconds]
Nicmavr has joined #ruby
Kestrel-029 has quit [Ping timeout: 245 seconds]
marz_d`ghostman has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gigetoo has quit [Ping timeout: 244 seconds]
budonyc has joined #ruby
hmaronon has joined #ruby
hays has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
Nicmavr has quit [Ping timeout: 245 seconds]
Kestrel-029 has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
conta has quit [Quit: conta]
hmaronon has quit [Quit: The Lounge - https://thelounge.chat]
AJA4350 has joined #ruby
cthulchu_ has joined #ruby
zodd_ has joined #ruby
noboruma has joined #ruby
pwnd_nsfw has joined #ruby
UncleCid__ has quit [Ping timeout: 258 seconds]
hightower2 has joined #ruby
luminousnine has quit [Quit: Goodbye ~ Powered by LunarBNC]
luminousnine has joined #ruby
luminousnine has quit [Changing host]
luminousnine has joined #ruby
<zodd_> Ruby n00b here. What is the status of rubyforge.org ? It seems down/very slow. Is this normal?
<zodd_> What is/are(?) the prefered ways of accessing databases (over odbc)? (which libs/methods)
Kestrel-029 has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
<bougyman> zodd_: since you asked for prefernce, mine is Sequel.
<zodd_> bougyman, Sequel is a lib I presume?
<zodd_> as SQL is pronounced the same way
<zodd_> ah. I see. I understand there is also some port of Perl DBI.
<zodd_> Does an article which provides a comparison exist or some metrics on what is popular or not?
teclator has quit [Ping timeout: 272 seconds]
jeremycw has joined #ruby
<bougyman> No idea.
<bougyman> https://sequel.jeremyevans.net/ you saw that, right?
fphilipe_ has quit [Ping timeout: 258 seconds]
<ytti> sequal is so great
<ytti> one of the main reasons i hate switching away from ruby
<ytti> haven't found anything as nice in other languages i'm considering
schne1der has quit [Ping timeout: 272 seconds]
gigetoo has joined #ruby
aupadhye has quit [Quit: Leaving]
deepredsky has quit [Ping timeout: 252 seconds]
<zodd_> bougyman, yes. ty
<zodd_> ytti. Check out SQLAlchemy in Python
<ytti> i have, and i don't like it
<zodd_> Together with Alembic
deepredsky has joined #ruby
<ytti> on python i use peewee
<ytti> example of peewee model: http://p.ip.fi/w733
<zodd_> never heard of it. It might be great, but is it sustainable: is it maintained, is there a community etc. Ie: what will be its state in 5 years time/is it worth investing in when developing a major project on it
pwnd_nsfw` has joined #ruby
<zodd_> Not ment as a (negative) remark regarding pweewee, but a remark about software (libraries) in general
deepredsky has quit [Ping timeout: 258 seconds]
<ytti> if i want sustainable and serious major project, i'm not going to choose python to begin with :)
<ytti> (nor ruby)
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 258 seconds]
AJA4351 is now known as AJA4350
<zodd_> looks neat
octos has joined #ruby
<Jonopoly> whats a good all-around OO project to do
<Jonopoly> so i can do in most (if not all) languages
pwnd_nsfw has quit [Ping timeout: 258 seconds]
<Jonopoly> to show a basic understanding of OO ?
<zodd_> Jonopoly, not entirely sure what your question is, nor iof this is the place for it, but maybe it is worth your time to check out: http://rosettacode.org/wiki/Rosetta_Code
<zodd_> *if
hmaronon has joined #ruby
twobitsprite has joined #ruby
<twobitsprite> Is there something like the "requests" module from python for ruby?
<Jonopoly> Rosetta?? haha
<Jonopoly> Thanks zodd_
octos has quit [Ping timeout: 252 seconds]
<Jonopoly> cucumber so annoying at times
<Jonopoly> wish there was a "slow" down property T_T
<z64> twobitsprite: you can take a look at the gems "rest-client" or "httparty"; there's others, but those are probably the most basic ones off the top of my head that are similar to requests
r29v has joined #ruby
hmaronon has quit [Quit: The Lounge - https://thelounge.chat]
polishdub has joined #ruby
jenrzzz has joined #ruby
FastJack has quit [Ping timeout: 264 seconds]
englishm has quit [Excess Flood]
englishm has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
Tempesta has quit [Quit: See ya!]
haxx0r has joined #ruby
FastJack has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
laaron has quit [Remote host closed the connection]
orbyt_ has joined #ruby
jenrzzz has joined #ruby
laaron has joined #ruby
banisterfiend has joined #ruby
haxx0r has quit [Remote host closed the connection]
dviola has quit [Ping timeout: 258 seconds]
AJA4350 has quit [Ping timeout: 245 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hays has joined #ruby
Jonopoly has quit [Quit: WeeChat 2.4]
Brian-W-Gray has quit [Quit: Give a man a phish, you might get his credentials. Teach a man to phish, he'll get someone elses.]
jenrzzz has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
octos has joined #ruby
<havenwood> twobitsprite: +1 HTTP.rb
<havenwood> It's the most similar to Requests.
ellcs has quit [Ping timeout: 272 seconds]
octos has quit [Read error: Connection reset by peer]
andikr has quit [Remote host closed the connection]
esp32_prog has quit [Ping timeout: 252 seconds]
<zodd_> how to try/catch or ruby equivalent a db connection to check how/why the connection errors? So far all my odbc attempts whether it being odbc, odbc-dbi or odbc-sequel
<zodd_> +fail
banisterfiend has quit [Ping timeout: 246 seconds]
<zodd_> quite sure the DSN is ok as it works ok and from other programming languages
<zodd_> *works ok from shell
blackmesa has quit [Ping timeout: 252 seconds]
iffraff has joined #ruby
sysvalve has quit [Quit: Leaving]
<iffraff> Hello, I', a complete ruby novice. I have a new job and they are using ruby and they are using foreman, to start stuff up from a procfile. I've noticed that the processes are starting up asynchronously. I was wondering if there is anyway to have them run synchronously.
tdy has joined #ruby
Jonopoly_ has joined #ruby
<zodd_> nm. found it
Dbugger has joined #ruby
Dbugger has quit [Client Quit]
Dbugger has joined #ruby
noboruma_ has joined #ruby
noboruma_ has quit [Client Quit]
noboruma has quit [Quit: leaving]
noboruma has joined #ruby
<zodd_> what is wrong there please?
noboruma has quit [Client Quit]
<havenwood> zoUse snake_case instead of headlessCamelCase for local variables in Ruby
r29v has quit [Quit: r29v]
r29v has joined #ruby
Inline has joined #ruby
<zodd_> havenwood, ty. looking into it now
Kestrel-029 has joined #ruby
<havenwood> iffraff: Does it work to limit to a single worker process?
Nicmavr has quit [Ping timeout: 245 seconds]
<havenwood> iffraff: foreman start -c listener=1,workers=1
<havenwood> or is it -m?
salerace has quit [Ping timeout: 272 seconds]
NL3limin4t0r is now known as NL3limin4t0r_afk
nowhere_man has joined #ruby
cisco has joined #ruby
salerace has joined #ruby
esp32_prog has joined #ruby
c0dec has quit [Ping timeout: 244 seconds]
<iffraff> havenwood: ah, that might work. I'll give that a try. thank you
c0dec has joined #ruby
blackmesa has joined #ruby
conta has joined #ruby
r29v has quit [Ping timeout: 248 seconds]
esp32_prog has quit [Ping timeout: 248 seconds]
duderonomy has joined #ruby
Jonopoly_ has quit [Quit: WeeChat 2.4]
al1 has joined #ruby
AJA4350 has joined #ruby
al1 has quit [Client Quit]
cisco has quit [Ping timeout: 272 seconds]
zodd_ has quit [Ping timeout: 248 seconds]
zacts has joined #ruby
twobitsprite has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
banisterfiend has joined #ruby
zacts has quit [Quit: WeeChat 2.4]
jenrzzz has quit [Ping timeout: 246 seconds]
gix has joined #ruby
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
<banisterfiend> sdf
jenrzzz has joined #ruby
<banisterfiend> woohoo!
<banisterfiend> finally got my irc client to connect outisde the vpn :)
govg has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Ping timeout: 248 seconds]
salerace has quit [Ping timeout: 252 seconds]
ravenous_ has joined #ruby
twobitsprite has joined #ruby
emilford has joined #ruby
octos has joined #ruby
salerace has joined #ruby
gix has quit [Ping timeout: 246 seconds]
gix has joined #ruby
molly has joined #ruby
molly is now known as Guest64648
ramfjord has joined #ruby
octos has quit [Ping timeout: 248 seconds]
doodlebug has joined #ruby
doodlebug has quit [Max SendQ exceeded]
nowhere_man has quit [Ping timeout: 246 seconds]
schne1der has joined #ruby
doodlebug has joined #ruby
iffraff has quit [Ping timeout: 248 seconds]
iffraff has joined #ruby
iffraff has quit [Remote host closed the connection]
octos has joined #ruby
AJA4351 has joined #ruby
codefriar has joined #ruby
cisco has joined #ruby
cisco is now known as Guest87502
Guest64648 has quit [Ping timeout: 248 seconds]
<codefriar> If I've loaded a yml file with Psych.load_file is there anyway I can dynamically get a part of that object? ie: foo["#{bar}"] but bar = [key][1]
AJA4350 has quit [Ping timeout: 248 seconds]
AJA4351 is now known as AJA4350
<havenwood> codefriar: So bar is a String with square braces in it?
<codefriar> havenwood yep. Trying to create a reusable method to pull an arbitrary array out of an object loaded from yml. So I can add to the array, and write the file back.
<havenwood> foo.dig *bar.scan(/[^\[\]]+/)
<jhass> sound's like you're reinventing Hash#dig
<havenwood> codefriar: By 1, do you mean an Array index?
tdy has quit [Ping timeout: 258 seconds]
<jhass> where does the string come from?
octos has quit [Read error: Connection reset by peer]
<havenwood> &>> foo = {'key' => [nil, :payload]}; bar = '[key][1]'; foo.dig *bar.scan(/(?<=\[).+?(?=\])/).map { |key| Integer(key, exception: false) || key }
<rubydoc> # => :payload (https://carc.in/#/r/6yr7)
<havenwood> codefriar: +1 where does the string come from?
octos has joined #ruby
<codefriar> havenwood let me backup. I'm needing to open a yml, and add an entry to an array. In this first instance, the yml file is a static site generator list of sub pages.
<codefriar> The string comes from my futzing arround in pry
<codefriar> havenwood make sense?
<codefriar> havenwood here's the file in question
<havenwood> codefriar: And what are you trying to add to it?
<codefriar> havenwood writing a script to automate adding new packages. as part of that, I need to append to the array of pages under software
Nicmavr has joined #ruby
<codefriar> havenwood basically appending something like this: {"NewPackage":"/software/newpackage.md"}
Kestrel-029 has quit [Ping timeout: 245 seconds]
Guest87502 has quit [Ping timeout: 252 seconds]
octos has quit [Read error: Connection reset by peer]
<havenwood> codefriar: site.dig('pages', 4, 'Included Software') << extra_included_software
blackmesa has quit [Ping timeout: 250 seconds]
octos has joined #ruby
<codefriar> havenwood wow. thank you
<codefriar> havenwood++
sauvin has quit [Ping timeout: 258 seconds]
<havenwood> codefriar: If you're ever going to be writing from more than one process, Ruby stdlib has YAML::Store for transactional file storage in YAML.
emilford has quit [Quit: Lost terminal]
<havenwood> codefriar: That way, your transactions will succeed or fail together and you can enable atomic writes as well.
<codefriar> cool
<havenwood> See the PStore docs for YAML::Store options: https://docs.ruby-lang.org/en/2.6.0/PStore.html
esp32_prog has joined #ruby
molly has joined #ruby
molly is now known as Guest511
octos has quit [Ping timeout: 248 seconds]
esp32_prog has quit [Ping timeout: 258 seconds]
jeremycw has quit [Ping timeout: 272 seconds]
<codefriar> havenwood i wish I could pass an array into dig :(
<codefriar> havenwood ie: ["pages", 4, "Included Software"]
<jhass> you can, just prepend a *
<codefriar> ?
<jhass> data.dig(*the_array)
<codefriar> Oh damn, that's slick wth is happening?
jeremycw has joined #ruby
<jhass> * is called the splat parameter, it passes each array element as an individual argument to the method
<codefriar> jhass thats f'ing awesome
<jhass> works in general for any method call of course
<jhass> view it as the inverse of a varargs argument in a method definition, that is a method parameter that collects all (remaining) positional arguments into an array: def foo(*args)
octos has joined #ruby
Guest511 has quit [Ping timeout: 250 seconds]
octos has quit [Remote host closed the connection]
octos has joined #ruby
octos has quit [Read error: Connection reset by peer]
octos has joined #ruby
lxsameer has quit [Ping timeout: 248 seconds]
octos has quit [Read error: Connection reset by peer]
octos has joined #ruby
laaron has quit [Remote host closed the connection]
fphilipe_ has joined #ruby
houhoulis has joined #ruby
conta has quit [Ping timeout: 248 seconds]
laaron has joined #ruby
altious has quit [Read error: Connection reset by peer]
altious has joined #ruby
yoshie902a has joined #ruby
<yoshie902a> Does anyone know what ‘if_dne” means?
<jhass> not without context context context
<yoshie902a> def self.[](id, &if_dne)
<yoshie902a> all.fetch id&.intern, &if_dne
<yoshie902a> end
<yoshie902a> Oops, sorry, should have made a gist
<jhass> call example?
<jhass> looks like terrible code tbh :D
<phaul> it's just a name of an argument. like id. except it's a block argument
<jhass> my current best guess is Does Not Exist
<jhass> yup, Hash#fetch's block get's called when the given key does not exist in the hash
<yoshie902a> what is the & mean
<jhass> in the argument list it binds any given block argument to the given variable name (as a proc)
<jhass> in the call it does the reverse essentially, it passes the given proc as a block argument
gix- has joined #ruby
gix has quit [Disconnected by services]
<jhass> >> def foo(&block); block; end; a_proc = foo { 1 + 1 }; a_proc.call
<ruby[bot]> jhass: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<jhass> eh, whatever
AJA4351 has joined #ruby
<jhass> second example: def foo; 1 + yield; end; a_proc = proc { 1 }; foo(&a_proc)
AJA4350 has quit [Ping timeout: 252 seconds]
AJA4351 is now known as AJA4350
<yoshie902a> so essentially, if_dne is a block that is getting passed into the method and then it runs the all.fetch id&.intern, &if_dne. &if_dne being the block that was passed in.
<jhass> no if there, but yeah
<jhass> if there's no block if_dne will be nil and &nil will just pass no block
<jhass> simple terms: Product#[] forwards any given block to Hash#fetch
<yoshie902a> ok, thank you
Bounga has joined #ruby
<yoshie902a> Can you tell me what self[__method__]
<yoshie902a> is doing?
<yoshie902a> i have never seen this syntax either
Nicmavr has quit [Ping timeout: 245 seconds]
<havenwood> yoshie902a: In Ruby 2.6 you can combine lines 8 & 9 using: .to_h { |id, attrs| ...
<havenwood> >> def foo; __method__ end; foo
<havenwood> #=> :foo
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> &>> def foo; __method__ end; foo
<rubydoc> # => :foo (https://carc.in/#/r/6yrx)
<havenwood> yoshie902a: __method__ is the method name as a symbol
<havenwood> yoshie902a: self is Product
Nicmavr has joined #ruby
<yoshie902a> Thank you!
<yoshie902a> so i could remove .map and replace with .to_h?
<yoshie902a> assuming it’s is ruby 2.6
<havenwood> yup
<twobitsprite> ytti, havenwood: thanks, that http.rb looks perfect
<yoshie902a> Nice, thank you
twobitsprite has left #ruby [#ruby]
Dbugger has quit [Quit: Leaving]
jrafanie has joined #ruby
<yoshie902a> One last request, what does this line do? `Product[product_id] { Product.membership }`
<yoshie902a> The pattern, not the specific membership method
<yoshie902a> Oh, nevermind, It is the block we discussed. I think
<jhass> yes
samort7 has joined #ruby
doodleb89 has joined #ruby
doodlebug has quit [Ping timeout: 248 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
budonyc has quit [Ping timeout: 248 seconds]
<havenwood> yoshie902a: Here are some refactoring suggestions: https://gist.github.com/havenwood/ad3c014f383d122190f32f2a3fdc577b
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> yoshie902a: Alternatively, you could make it a *real* ActiveModel backed by the YAML. :) I gave a talk on how to back your Models with an API (or YAML file works too) at RailsConf.
<jhass> I think the id&. is a really big smell here btw
<jhass> why would you ever pass nil there and silently handle it
<yoshie902a> Can you point me to how to have an active model backed by YAML?
<yoshie902a> that sounds interesting
<havenwood> yoshie902a: My talk on it will be posted here: https://www.youtube.com/playlist?list=PLE7tQUdRKcyaOq3HlRm9h_Q_WhWKqm5xc
<havenwood> yoshie902a: You can get pretty far with the Active Model docs: https://guides.rubyonrails.org/active_model_basics.html
<havenwood> yoshie902a: I'll write an article on it and maybe even show how to use YAML::Store.
<havenwood> You can make a fine Model backed by YAML::Store.
<havenwood> We should write a gem that does just that, if someone hasn't already.
<havenwood> If there is one, I don't know about it.
<havenwood> I'll look into it.
<havenwood> Need write support ;)
<yoshie902a> :) THat would be wonderful.
<havenwood> yoshie902a: My talk is "An API-Backed Model with Square's Ruby SDK", but you can use anything that can CRUD rather than an API.
<yoshie902a> The youtube video you posted does not seem to mention active model with YAML
<yoshie902a> am I wrong?
<havenwood> yoshie902a: My talk isn't posted yet - they're just being added now.
<havenwood> It should be posted in the next week or two.
<yoshie902a> got it. thank you, I would love to read your article when you publish
<yoshie902a> Any way you could post your slides now?
<yoshie902a> or send a link?
budonyc has joined #ruby
Inline has quit [Remote host closed the connection]
<havenwood> I don't have them ready to post. Let me take a quick stab at a generic YAML solution. I can make it work properly later.
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
<yoshie902a> :)
Inline has joined #ruby
octos has quit [Read error: Connection reset by peer]
cjohnson has quit [Quit: Lost terminal]
octos has joined #ruby
<yoshie902a> havenwood: in case this is helpful, here is a more complete version of the product model
<havenwood> yeah, actually thinking about this a generic one isn't going to work for your particular case - but you can make it work custom anyhow.
<yoshie902a> It would be helpful to see for learning purposes
<yoshie902a> and I could see how I could adapt it
blackmesa has joined #ruby
voodoofish430 has joined #ruby
al2o3-cr has quit [Quit: If the universe is a machine where the future is uniquely determined by its present state, it would not be possible to calculate what the future will be.]
doodleb89 has quit [Ping timeout: 248 seconds]
spacesuitdiver has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
octos has quit [Ping timeout: 272 seconds]
<yoshie902a> havenwood: updated just for you… https://gist.github.com/yoshie902a/627845570d0ea88fe0911a3d619b0c58
codefriar has quit [Ping timeout: 244 seconds]
SID790 has joined #ruby
octos has joined #ruby
doodlebug has joined #ruby
SeepingN has joined #ruby
dviola has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
esp32_prog has joined #ruby
weteamsteve has joined #ruby
jenrzzz has joined #ruby
esp32_prog has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 259 seconds]
fphilipe_ has quit [Ping timeout: 246 seconds]
budonyc has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
kapilp has quit [Quit: Connection closed for inactivity]
jrafanie_ has joined #ruby
jefffrails35 has quit [Remote host closed the connection]
jrafanie has quit [Ping timeout: 246 seconds]
schne1der has quit [Ping timeout: 248 seconds]
SID790 has left #ruby ["Konversation terminated!"]
hays has quit [Ping timeout: 258 seconds]
hays has joined #ruby
Cache_Money has joined #ruby
hays has quit [Ping timeout: 248 seconds]
hays has joined #ruby
<Cache_Money> I have an array of hashes. Inside each hash is a `values` key with an array of floats. I’d like to order the hash objects inside the outter array by the last item in the `values` key. Can anyone help me with a way to go about this?
<jhass> .sort_by {|hash| hash["values"].last }
<jhass> .sort_by returns a new sorted array, sort_by! sorts the existing array in place
jcalla has quit [Quit: Leaving]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cache_Money> jhass: Awesome, that worked perfectly! Thanks!!
fphilipe_ has joined #ruby
fredolinhares has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
hays has quit [Ping timeout: 248 seconds]
hays has joined #ruby
houhouli_ has joined #ruby
dragonkh has joined #ruby
<dragonkh> evening
dragonkh has left #ruby [#ruby]
houhoulis has quit [Ping timeout: 272 seconds]
yoshie902a has quit [Quit: yoshie902a]
hays has quit [Ping timeout: 245 seconds]
hays has joined #ruby
reber has quit [Remote host closed the connection]
evdubs has quit [Remote host closed the connection]
evdubs has joined #ruby
blackmesa has joined #ruby
jrafanie_ has quit [Quit: Textual IRC Client: www.textualapp.com]
doodlebug has quit [Read error: Connection reset by peer]
<havenwood> yosh, oh no, they left
<havenwood> anyhow, I got pulled into meetings and didn't finish it, but here's about half way to a YAML-based read/write model: https://gist.github.com/havenwood/f23bd816ce5535132fbcffe0d028179a
<havenwood> maybe i'll finish it and make it generalizable this weekend
mahlon_ is now known as mahlon
AJA4350 has joined #ruby
doodleb57 has joined #ruby
iNs has quit [Remote host closed the connection]
iNs has joined #ruby
c0dec has quit [Ping timeout: 245 seconds]
c0dec has joined #ruby
fphilipe_ has quit [Ping timeout: 272 seconds]
Exuma has joined #ruby
<Exuma> ruby 2.6.3 Q: If I have x = BigDecimal(100); y = x; and then I modify x... x -= BigDecimal(1)
<Exuma> will that modify y under any circumstnaces? im trying to read about clone and dup
<Exuma> and it is super confusing related to wording... the object_id isnt changing when i check it myself
<Exuma> so i am just not sure
jeremycw has quit [Ping timeout: 250 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #ruby
<jhass> ruby is entirely pass by reference, there's no pass by value whatsoever, all copying has to happen explicitly via .dup and .clone
<jhass> now BigDecimal#- returns a new instance, x -= y is just a shorthand for x = x - y
<Exuma> so why do the object_ids match?
<Exuma> jhass
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
<jhass> &>> require "bigdecimal"; x = BigDecimal(10); y = x; x -= 1; x.object_id == y.object_id
<rubydoc> # => false (https://carc.in/#/r/6ytj)
<Exuma> &>> require "bigdecimal"; x = BigDecimal(10); y = x.dup; y.object_id == x.object_id
<rubydoc> # => true (https://carc.in/#/r/6ytk)
tf2ftw has quit [Quit: This computer has gone to sleep]
spacesuitdiver has quit [Ping timeout: 246 seconds]
<jhass> ah looks like BigDecimal#dup just returns self because it's immutable
<Exuma> so basically im 100% safe not using .dup at all, anywhere dealing with bigdecimal?
<jhass> given they made it pointless to use it, yeah
<havenwood> &>> require 'bigdecimal'; require 'bigdecimal/util'; 0.to_d.frozen?
<rubydoc> # => true (https://carc.in/#/r/6ytl)
<havenwood> &>> require 'bigdecimal'; require 'bigdecimal/util'; require 'fiddle'; big_decimal = 0.to_d; Fiddle::Pointer.new(big_decimal.object_id << 1)[1] = 0; big_decimal.frozen?
<rubydoc> # => false (https://carc.in/#/r/6ytm)
esp32_prog has joined #ruby
<jhass> sshhh
<Exuma> what did that show
<havenwood> Exuma: nothing important
<havenwood> Exuma: you can unfreeze things if you use Fiddle
esp32_prog has quit [Ping timeout: 248 seconds]
<Exuma> haha, gotcha
<havenwood> Or freeze everything that wasn't frozen and thaw everything that was: require 'fiddle'; ObjectSpace.each_object { |object| Fiddle::Pointer.new(object.object_id << 1)[1] ^= 1 }
<havenwood> (Ruby won't take nicely to that.0
mochiyoda_ has quit [Ping timeout: 252 seconds]
polishdub has quit [Quit: leaving]
xco has joined #ruby
<xco> Hi
<xco> Can this be refactored futher?
<xco> (filetype == 'jpg' || filetype == 'jpeg' || filetype == 'gif' || filetype == 'png')
ricer2 has quit [Read error: Connection reset by peer]
<phaul> xco Array#any? {} Array#member? come to mind
<phaul> combined with %w(word word word)
<jhass> %(jpg jpeg gif png).include? filetype
<jhass> eh %w
<jhass> haven't seen anybody use member? :D
<phaul> you have now :)
xco has quit [Ping timeout: 272 seconds]
xco has joined #ruby
<jhass> no I haven't just mentioning it!
<xco> phaul: so i’d do something like %w(jpg jpeg).any? { filetype} right?
<phaul> no , follow jhass's example :) any? would require == check
<xco> my internet went off can you please copy and paste it so i see it?
<jhass> ?logs
<ruby[bot]> You can find a log of this channel at https://irclog.whitequark.org/ruby/
<xco> this is cool! thanks
<xco> ?logs
<ruby[bot]> You can find a log of this channel at https://irclog.whitequark.org/ruby/
<xco> :D
<xco> phaul: thanks
<xco> havenwood: you rock.
<phaul> !help
<ruby[bot]> phaul: You can find a list of my commands on http://ruby-community.com/ruboto/commands and my factoids on http://ruby-community.com/ruboto/facts
spacesuitdiver has joined #ruby
mikecmpbll has joined #ruby
<havenwood> ?factoids
<ruby[bot]> you can find an overview of the factoids I know about at http://ruby-community.com/ruboto/facts
<phaul> :( that's not what I expected tbh. I wanted Beatles and helpa
doodleb57 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
<havenwood> I need somebody! !help. Not just anybody. !help. You know I need someone. !help
doodlebug has quit [Read error: Connection reset by peer]
<jhass> ?helpa
<ruby[bot]> jhass: I don't know anything about helpa
<jhass> !fact add helpa I need somebody! !help. Not just anybody. !help. You know I need someone. !help
<ruby[bot]> jhass: I will remember that helpa is I need somebody! !help. Not just anybody. !help. You know I need someone. !help
<phaul> jhass: I think it's Radar's log bot
<jhass> I know :P
doodlebug has joined #ruby
cthulchu_ has quit [Ping timeout: 258 seconds]
fphilipe_ has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4351 is now known as AJA4350
Nicmavr has quit [Ping timeout: 245 seconds]
Nicmavr has joined #ruby
Swyper has joined #ruby
mochiyoda_ has joined #ruby
Kestrel-029 has joined #ruby
Nicmavr has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
xco has quit [Quit: xco]
blackmesa has quit [Ping timeout: 248 seconds]
fphilipe_ has quit [Ping timeout: 258 seconds]
Swyper has quit [Remote host closed the connection]
fredolinhares has quit [Quit: WeeChat 1.9.1]
spacesuitdiver has quit [Quit: Textual IRC Client: www.textualapp.com]
Exuma has quit [Quit: Textual IRC Client: www.textualapp.com]
nowhere_man has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
houhouli_ has quit [Remote host closed the connection]
Cache_Money has quit [Quit: Cache_Money]
doodlebug has quit [Ping timeout: 258 seconds]
jenrzzz has joined #ruby
doodleb80 has joined #ruby
fphilipe_ has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]