DarthGandalf has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 256 seconds]
redlegion has joined #ruby
nowhere_man has joined #ruby
DarthGandalf has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
lazyatom has joined #ruby
apeiros_ has joined #ruby
heinrich5991 has quit [Ping timeout: 256 seconds]
heinrich5991 has joined #ruby
a-l-e has quit [Remote host closed the connection]
a-l-e has joined #ruby
apeiros_ has quit [Ping timeout: 264 seconds]
tdy has quit [Ping timeout: 240 seconds]
<balo>
nikivi: amount.to_i ?
<balo>
i don't fully understand the issue :D
<balo>
it's a hash, not printed in any way as far as i can see
<nikivi>
thans that worked balo
<nikivi>
didnt think of converting to integer
bijan_ has joined #ruby
_whitelogger has joined #ruby
Burgestrand has quit [Quit: Closing time!]
hipertracker_ has joined #ruby
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
pskosinski has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby
bijan_ has quit [Remote host closed the connection]
heinrich5991 has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 252 seconds]
heinrich5991 has joined #ruby
dionysus69 has joined #ruby
bijan_ has joined #ruby
bijan_ has quit [Ping timeout: 255 seconds]
deathwishdave has joined #ruby
tristanp has joined #ruby
bijan_ has joined #ruby
nakul_ has quit [Quit: Leaving]
tristanp has quit [Ping timeout: 272 seconds]
bijan_ has quit [Ping timeout: 256 seconds]
jottr has joined #ruby
heinrich5991 has quit [Ping timeout: 252 seconds]
jottr has quit [Client Quit]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heinrich5991 has joined #ruby
deathwishdave has joined #ruby
hipertracker_ has quit [Ping timeout: 265 seconds]
bijan_ has joined #ruby
surrounder has joined #ruby
bijan_ has quit [Read error: Connection reset by peer]
bijan_ has joined #ruby
deathwishdave has quit [Ping timeout: 240 seconds]
jyaworski has quit [Ping timeout: 260 seconds]
jyaworski has joined #ruby
<za1b1tsu>
Any cool way/ good practice to check the arguments giving to def initialiaze? I want intiialization to fail on certain conditions, but I can't seem to find a nice clean way of doing it
cschneid_ has joined #ruby
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heinrich5991 has quit [Ping timeout: 268 seconds]
cschneid_ has quit [Ping timeout: 256 seconds]
heinrich5991 has joined #ruby
apeiros_ has quit [Ping timeout: 276 seconds]
bak1an has joined #ruby
sonne has joined #ruby
paraxial has quit [Ping timeout: 264 seconds]
paraxial has joined #ruby
tristanp has joined #ruby
apeiros_ has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
apeiros_ has quit [Ping timeout: 265 seconds]
AJA4350 has joined #ruby
Burgestrand has joined #ruby
apeiros_ has joined #ruby
apeiros_ has quit [Ping timeout: 240 seconds]
Puffball has quit [Remote host closed the connection]
apeiros_ has joined #ruby
vondruch has joined #ruby
<rindolf>
za1b1tsu: hi
<za1b1tsu>
hi rindolf
<rindolf>
za1b1tsu: there may be a gem for it
<za1b1tsu>
I solved it, diferently, I perform some checks
<za1b1tsu>
I don't want to install too many gems
<za1b1tsu>
rindolf: but thank you for intereset
<rindolf>
za1b1tsu: you're welcome
apeiros_ has quit [Ping timeout: 265 seconds]
Burgestrand has quit [Quit: Closing time!]
bmurt has joined #ruby
RedNifre has quit [Ping timeout: 272 seconds]
Burgestrand has joined #ruby
vondruch has quit [Quit: vondruch]
tdy has joined #ruby
wildermind has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
tdy has quit [Ping timeout: 240 seconds]
cfjk has joined #ruby
savolla has joined #ruby
kevinsjoberg has joined #ruby
tristanp has joined #ruby
RedNifre has joined #ruby
NL3limin4t0r has joined #ruby
tristanp has quit [Ping timeout: 272 seconds]
heinrich5991 has quit [Ping timeout: 256 seconds]
cagomez has joined #ruby
heinrich5991 has joined #ruby
cagomez has quit [Ping timeout: 276 seconds]
SolarAquarion has joined #ruby
apeiros_ has joined #ruby
alem0lars has joined #ruby
t0x has quit [Quit: Connection closed for inactivity]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hipertracker has joined #ruby
heinrich5991 has quit [Ping timeout: 256 seconds]
nowhere_man has joined #ruby
heinrich5991 has joined #ruby
redlegion has quit [Ping timeout: 250 seconds]
justinmcp has joined #ruby
bmurt has joined #ruby
redlegion has joined #ruby
lightstalker has quit [Ping timeout: 268 seconds]
redlegion has quit [Remote host closed the connection]
alem0lars has quit [Ping timeout: 272 seconds]
sticaz has joined #ruby
nakul_ has joined #ruby
mostlybadfly has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
dellavg_ has quit [Ping timeout: 260 seconds]
unsymbol has joined #ruby
faitswulff has joined #ruby
heinrich5991 has quit [Ping timeout: 240 seconds]
RedNifre has quit [Ping timeout: 256 seconds]
Cybergeek has joined #ruby
heinrich5991 has joined #ruby
Burgestrand has quit [Quit: Closing time!]
deathwishdave has joined #ruby
Rapture has joined #ruby
Rapture has quit [Client Quit]
Rapture has joined #ruby
Burgestrand has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
heinrich5991 has quit [Ping timeout: 256 seconds]
GodFather has joined #ruby
heinrich5991 has joined #ruby
nakul_ has quit [Ping timeout: 256 seconds]
DTZUZO has quit [Read error: Connection reset by peer]
pkayokay has joined #ruby
Puffball has joined #ruby
<pkayokay>
Hi! Any recommendations for Ruby Books?
kevinsjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cthulu202 has quit [Quit: Nowhere special. I always wanted to go there.]
Cthulu201 has joined #ruby
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
lightstalker has joined #ruby
Rapture has quit [Read error: Connection reset by peer]
Rootsudo has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
zapata has joined #ruby
chmurifree has left #ruby ["Leaving"]
jokke has joined #ruby
<jokke>
hi
<jokke>
i'm trying to get smtp on mastodon working with my local postfix server
Nicmavr has quit [Read error: Connection reset by peer]
<jokke>
sorry, this error: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number
Nicmavr has joined #ruby
pkayokay has quit []
redlegion has joined #ruby
twobitsprite has joined #ruby
<twobitsprite>
What's the right way to do something like this: foo = ENV["FOO"] || "foo"
<twobitsprite>
ENV will always return "" if the varibale isn't set, so I always get foo = ""
<havenwood>
twobitsprite: ENV.fetch 'FOO', 'foo'
<twobitsprite>
havenwood: awesome, thanks
<havenwood>
jokke: Poodles!
pkayokay has joined #ruby
<havenwood>
jokke: How'd you install Ruby? What version of rest-client?
hipertracker has quit [Quit: hipertracker]
<jokke>
not sure it's rest client
Inline has joined #ruby
<jokke>
i'm just running mastodon in a docker container
<havenwood>
jokke: oh, the SO wasn't related?
hipertracker has joined #ruby
<jokke>
kinda
<jokke>
same error
<havenwood>
gotcha
hipertracker has quit [Client Quit]
Caerus has quit [Ping timeout: 240 seconds]
hipertracker has joined #ruby
hipertracker has quit [Client Quit]
RedNifre has joined #ruby
pkayokay has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
<havenwood>
jokke: What do you get for?: ruby -ropenssl -rfiddle -e "puts Fiddle::Function.new(Fiddle.dlopen(nil)['SSLeay_version'], [Fiddle::TYPE_INT], Fiddle::TYPE_VOIDP).call(0)"
pkayokay has joined #ruby
<havenwood>
jokke: I get: OpenSSL 1.0.2p 14 Aug 2018
peirama has quit [Remote host closed the connection]
cgfbee has quit [Ping timeout: 256 seconds]
r3m has joined #ruby
Beams has quit [Quit: .]
za1b1tsu has quit [Ping timeout: 252 seconds]
deathwishdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has joined #ruby
cgfbee has joined #ruby
bijan_ has joined #ruby
RedNifre has quit [Quit: Q]
orbyt_ has joined #ruby
bijan_ has quit [Ping timeout: 256 seconds]
TheBloke has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
bijan_ has joined #ruby
CaptainAmari has joined #ruby
<CaptainAmari>
Hi there, I'm not too familiar with good ruby design so I have a question. How common is to catch (or raise) exceptions as part of my code?
<CaptainAmari>
I mean catching an error or raising one as an expected behavior
lxsameer has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
IanMalcolm has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<mroutis>
CaptainAmari, it is a common practice, not for flow control, tho
<CaptainAmari>
mroutis, thanks. thing is im using tracepoint to catch all exceptions (with :raise). I only want to catch unhandled exceptions, but it seems like it cant be done in ruby. So I might just catch all exceptions and assume they are bad :(
<mroutis>
mhm, can you share an example of what you are trying to do? or a little bit more of context
Zaab1t has quit [Quit: Zaab1t]
<CaptainAmari>
true, what i said probably makes no sense. On the high level what im writing is a debugger that needs to detect unhandled exceptions.
<CaptainAmari>
It then crashes the program and tries a different input
SeepingN has joined #ruby
<CaptainAmari>
Technically I could probably wrap all code inside a begin..rescure block, but any internal bubbles would never get to me
<CaptainAmari>
no but *
<CaptainAmari>
nevermind i dont want to complicate things. I will probably just catch all exceptions and allow filtering
<nickjj>
i'm working with an ancient rails 2.3 app and supposedly one of the gems it uses is called `hawler` but it won't gem install hawler due to it not existing -- does anyone remember a gem of that name (or a similar name) from back in the day?
<nickjj>
all i have to work with is a text file of the output of `gem list` and hawler 0.3 is referenced
<frozenclusterd>
havenwood: no, behavior is same for both true and false
<frozenclusterd>
if i do puts search('good') it prints true, and puts search('bad') it returns false... but whenever I use that function in the if, its always true
<havenwood>
frozenclusterd: puts returns: nil
<havenwood>
frozenclusterd: swap `puts` for `p`
Some-body_ has joined #ruby
lomex has joined #ruby
Mon_Ouie has joined #ruby
<frozenclusterd>
havenwood: same
DarthGandalf has quit [Ping timeout: 264 seconds]
<frozenclusterd>
good prints true, bad prints false, but in the if they still exec true not else
Some-body_ is now known as DarthGandalf
<havenwood>
frozenclusterd: Show the code that's producing the unexpected result?
<frozenclusterd>
havenwood: its in the codeshare
<frozenclusterd>
the add function
<havenwood>
!xkcd 1780
<havenwood>
frozenclusterd: IO#readlines has newlines by default. I suspect that's your issue.
<havenwood>
frozenclusterd: In modern Ruby, you can: File.readlines(blarg, chomp: true)
<frozenclusterd>
like 2.5.1 modern? :)
<havenwood>
frozenclusterd: yup!
<frozenclusterd>
sweet let me try that
mroutis has quit [Remote host closed the connection]
<havenwood>
frozenclusterd: And you don't need the intermediary Array with #readlines. If you want you can just use #foreach.
<havenwood>
frozenclusterd: File.foreach filename, chomp: true do |line|
<havenwood>
frozenclusterd: (I'd suggest `line` or something more descriptive instead of `x` for clarity.)
tdy has quit [Ping timeout: 265 seconds]
twobitsp1ite has quit [Ping timeout: 268 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
<apeiros>
the codeshare thing doesn't even load for me ("over capacity")
<frozenclusterd>
yeah it happens if you refresh should show
<apeiros>
oh, that's live
<frozenclusterd>
havenwood: :( still no go
<frozenclusterd>
with chomp
tdy has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
<frozenclusterd>
I went to debug with `p` inside of the function and it works now...
lxsameer has joined #ruby
<frozenclusterd>
i must have did the chomp weird or not saved properly
<frozenclusterd>
havenwood: thank you for the help
lxsameer has quit [Ping timeout: 255 seconds]
postmodern has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Emmanuel_Chanel has joined #ruby
s2013 has joined #ruby
orbyt_ has joined #ruby
segy has quit [Max SendQ exceeded]
akaiiro has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
Emmanuel_Chanel has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segy has joined #ruby
alfiemax_ has quit [Ping timeout: 268 seconds]
s2013 has joined #ruby
bga57 has quit [Quit: Leaving.]
za1b1tsu has quit [Ping timeout: 265 seconds]
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eckhardt_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
frozenclusterd has quit [Remote host closed the connection]
apeiros has quit []
code_zombie has quit [Quit: Leaving]
mikecmpbll has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lytol_ has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
alex`` has quit [Ping timeout: 255 seconds]
za1b1tsu has quit [Ping timeout: 240 seconds]
rindolf has quit [Ping timeout: 252 seconds]
bga57 has joined #ruby
hipertracker has quit [Quit: hipertracker]
CaptainAmari has quit [Quit: Leaving]
mostlybadfly has quit [Quit: Connection closed for inactivity]
eckhardt_ has joined #ruby
lomex has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reber has quit [Remote host closed the connection]
orbyt_ has joined #ruby
duderonomy has joined #ruby
t0x has quit [Quit: Connection closed for inactivity]
nima_m has quit [Quit: Connection closed for inactivity]
za1b1tsu has joined #ruby
GodFather has joined #ruby
jcarl43 has quit [Ping timeout: 252 seconds]
ellcs has joined #ruby
za1b1tsu has quit [Ping timeout: 264 seconds]
akaiiro has quit [Ping timeout: 265 seconds]
lxsameer has joined #ruby
lxsameer has quit [Ping timeout: 264 seconds]
cagomez has quit [Remote host closed the connection]