havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.2, 2.3.5 & 2.2.8: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
mim1k has quit [Ping timeout: 260 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz_ has quit [Ping timeout: 255 seconds]
TinkerTyper has quit [Quit: ZNC 1.7.x-nightly-20170908-e86efb08 - https://znc.in]
TinkerTyper has joined #ruby
TinkerTyper has quit [Client Quit]
jenrzzz has joined #ruby
TinkerTyper has joined #ruby
TinkerTyper has quit [Remote host closed the connection]
aspiers has quit [Quit: ZNC - http://znc.sourceforge.net]
TinkerTyper has joined #ruby
TinkerTyper has quit [Client Quit]
troys is now known as troys_
TinkerTyper has joined #ruby
ThomasQM has quit [Read error: Connection reset by peer]
Puffball has quit [Ping timeout: 264 seconds]
rrichardsr3 has joined #ruby
SteenJobs_ has joined #ruby
Puffball has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
cagomez has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
p0p0pr37 has quit [Remote host closed the connection]
gusrub has joined #ruby
gusrub has quit [Client Quit]
bmurt has joined #ruby
p0p0pr37 has joined #ruby
amirite has quit [Ping timeout: 248 seconds]
jtdoncas has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has quit [Ping timeout: 255 seconds]
rrichardsr3 has quit [Ping timeout: 240 seconds]
Xiti has quit [Quit: Xiti]
QualityAddict has joined #ruby
Xiti has joined #ruby
jtdoncas has quit [Ping timeout: 255 seconds]
eckhardt has joined #ruby
lagweezle is now known as lagweezle_away
faces has quit [Read error: Connection reset by peer]
faces has joined #ruby
enko has quit [Read error: Connection reset by peer]
chrisgopher has quit [Remote host closed the connection]
enko has joined #ruby
rrichardsr3 has joined #ruby
jtdoncas has joined #ruby
amirite has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
bronson has joined #ruby
enterprisey has joined #ruby
Coming has quit [Quit: Leaving]
astrobunny has joined #ruby
apparition has quit [Quit: Bye]
bronson has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
jenrzzz has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SteenJobs_ has quit [Quit: peaceee]
alfiemax has joined #ruby
Alaura has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
herbmillerjr has quit [Quit: Konversation terminated!]
jenrzzz has quit [Ping timeout: 255 seconds]
kies has quit [Ping timeout: 240 seconds]
herbmillerjr has joined #ruby
amirite has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
uneeb has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
alfiemax has joined #ruby
uZiel has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
jtdoncas_ has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
d^sh has joined #ruby
jtdoncas has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
alfiemax has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
wutschkef has quit [Ping timeout: 240 seconds]
jtdoncas has joined #ruby
__Yiota has quit [Remote host closed the connection]
wutschkef has joined #ruby
__Yiota has joined #ruby
gizmore|2 has joined #ruby
jtdoncas_ has quit [Ping timeout: 248 seconds]
p0p0pr37 has quit [Remote host closed the connection]
gizmore has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
p0p0pr37 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
jordanm has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 258 seconds]
amirite has joined #ruby
__Yiota has quit [Remote host closed the connection]
nadir has quit [Quit: Connection closed for inactivity]
__Yiota has joined #ruby
axsuul has joined #ruby
axsuul has quit [Excess Flood]
axsuul has joined #ruby
meadmoon has joined #ruby
marcux has quit [Quit: leaving]
marcux has joined #ruby
meadmoon has quit [Client Quit]
amirite has quit [Ping timeout: 240 seconds]
axsuul has quit [Ping timeout: 248 seconds]
amirite has joined #ruby
axsuul has joined #ruby
p0p0pr37_ has joined #ruby
p0p0pr37 has quit [Ping timeout: 240 seconds]
p0p0pr37_ is now known as p0p0pr37
chrisgopher has joined #ruby
amirite has quit [Remote host closed the connection]
chrisgopher has quit []
amirite has joined #ruby
neon_icon has quit [Quit: Leaving]
neon_icon has joined #ruby
neon_icon has quit [Client Quit]
neon_icon has joined #ruby
neon_iconstar has joined #ruby
neon_icon has quit [Read error: Connection reset by peer]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 1.9.1]
eckhardt has joined #ruby
wutschkef has quit [Ping timeout: 255 seconds]
harfangk has joined #ruby
Derperperd has quit [Quit: Peace out]
Derperperd has joined #ruby
wutschkef has joined #ruby
amirite has quit [Ping timeout: 255 seconds]
Derperperd has quit [Client Quit]
Derperperd has joined #ruby
amirite has joined #ruby
ramfjord has joined #ruby
Derperperd has quit [Client Quit]
amirite has quit [Ping timeout: 255 seconds]
Derperperd has joined #ruby
cdg has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cadillac_ has quit [Quit: I quit]
bronson has joined #ruby
cadillac_ has joined #ruby
A124 has joined #ruby
govg has quit [Ping timeout: 248 seconds]
kies has joined #ruby
DTZUZO has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
amirite has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
LastWhisper__ has quit [Quit: Leaving]
amirite has quit [Ping timeout: 240 seconds]
consti has joined #ruby
cadillac_ has quit [Read error: Connection reset by peer]
gix has quit [Ping timeout: 240 seconds]
QualityAddict has quit [Quit: Leaving]
Immune has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
gix has joined #ruby
chouhoulis has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
wutschkef has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
zarubin2 has quit [Ping timeout: 248 seconds]
zarubin has joined #ruby
nadir has joined #ruby
ixti has quit [Quit: WeeChat 1.9.1]
dinfuehr has quit [Ping timeout: 240 seconds]
wutschkef has joined #ruby
dinfuehr has joined #ruby
Derperperd has quit [Quit: Peace out]
Derperperd has joined #ruby
wutschkef has quit [Ping timeout: 248 seconds]
jtdoncas has quit [Ping timeout: 248 seconds]
jtdoncas has joined #ruby
harfangk has quit [Ping timeout: 255 seconds]
uZiel has joined #ruby
Derperperd has quit [Quit: Peace out]
neon_iconstar has quit [Ping timeout: 255 seconds]
Derperperd has joined #ruby
jtdoncas_ has joined #ruby
Derperperd has quit [Client Quit]
mim1k has joined #ruby
Derperperd has joined #ruby
cdg has quit [Remote host closed the connection]
jtdoncas has quit [Ping timeout: 258 seconds]
ramfjord has joined #ruby
wutschkef has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
tsglove has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
tsglove has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
wutschkef has quit [Ping timeout: 240 seconds]
neon_iconstar has joined #ruby
enko has quit [Quit: Textual IRC Client: www.textualapp.com]
alfiemax has quit [Remote host closed the connection]
whippythellama has quit [Quit: WeeChat 1.4]
wutschkef has joined #ruby
neon_iconstar has quit [Ping timeout: 255 seconds]
enko has joined #ruby
wutschkef has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
Burgestrand has joined #ruby
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
Derperperd has quit [Quit: Peace out]
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
ramfjord has quit [Ping timeout: 248 seconds]
Derperperd has joined #ruby
troys_ is now known as troys
basket has quit [Ping timeout: 258 seconds]
Derperperd has quit [Client Quit]
Derperperd has joined #ruby
bronson has joined #ruby
consti has quit [Quit: consti]
mson has quit [Quit: Connection closed for inactivity]
wutschkef has joined #ruby
govg has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
jtdoncas has joined #ruby
Derperperd has quit [Quit: Peace out]
marcux has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Remote host closed the connection]
Derperperd has joined #ruby
jtdoncas_ has quit [Ping timeout: 255 seconds]
nofxx has quit [Ping timeout: 248 seconds]
Derperperd has quit [Quit: Peace out]
Derperperd has joined #ruby
mim1k has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wutschkef has joined #ruby
tamouse__ has joined #ruby
jinie has quit [Ping timeout: 248 seconds]
tcopeland has quit [Ping timeout: 258 seconds]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
jinie has joined #ruby
Nobun has joined #ruby
<Nobun> Hi. again about embedding ruby.
Bock has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
wutschkef has quit [Ping timeout: 248 seconds]
<Nobun> please can someone tell me how ACTUALLY I can send a VALUE as string? becouse this code does not work:
eckhardt has joined #ruby
jtdoncas_ has joined #ruby
<Nobun> this is test.rb: http://dpaste.com/2NV91K2
neon_icon has joined #ruby
jtdoncas has quit [Ping timeout: 258 seconds]
<Nobun> application result: only "hello" is displayed (printed from class Octavia) but not "PQR" (as expected from main.c line 11
<Nobun> only "hellp" is displayed... sorry
<Nobun> (becouse I did this mistype)
<Nobun> so... rb_str_new_cstr("PQR") --> did not actually convert "PQR" string to value
<Nobun> I also tried rb_str_new2 and rb_str_new (with string length) but the same problem
ramfjord has joined #ruby
<Nobun> it is like the CoreVxa.projdir internal variable is always empty
<Nobun> even if should be initialized on initialize like it was in the Octavia class
<matthewd> Yeah, it seems more likely an ivar issue than a string allocation one
krz has joined #ruby
<matthewd> Is cv_init being invoked?
<Nobun> oh, matthewd ... nice to see you again.
wutschkef has joined #ruby
<Nobun> matthewd, I assume so...
tcopeland has joined #ruby
troys has quit [Quit: Bye]
<Nobun> rb_define_method(rbCoreVxa, "initialize", cv_init, 0);
<Nobun> it is defined as "initialize" method
bronson has quit [Remote host closed the connection]
<Nobun> so it should be invoked when ruby calls CoreVxa.new
<matthewd> I'd be adding a prinft/cout/whatever to confirm
<Nobun> well... I will add it... wait a moment...
ramfjord has quit [Ping timeout: 240 seconds]
<Nobun> yes, mattew, I confirm
<Nobun> printf("INIT is executed\n");
<Nobun> I added this in cv_init
<Nobun> and it is displayed
<matthewd> Oh!
<matthewd> You're setting the ivar on the class, not the instance
wutschkef has quit [Ping timeout: 240 seconds]
<matthewd> You want rb_iv_set(self, ...etc)
Cohedrin_ has joined #ruby
ta has quit [Remote host closed the connection]
<Nobun> YEAH. now it works
<Nobun> wow... it was painful :(
<Nobun> now trying to convert in c++
<Nobun> I saw that using module never allocates the variables like it happened here
<Nobun> so why I tried to switch to an actual class, but I faced the same problem. In this case using self seems working.
<Nobun> now trying to switch to the complete sample code I was trying yesterday evening
rrichardsr3 has joined #ruby
<matthewd> If you want a single global instance, maybe you do want a module.. but you can worry about that later
webguynow has quit [Ping timeout: 255 seconds]
krz has quit [Quit: WeeChat 1.7]
ur5us has quit [Remote host closed the connection]
<Nobun> yes... after all my main concern is that the code will work... even if not perfect
jenrzzz has quit [Ping timeout: 240 seconds]
wutschkef has joined #ruby
lexruee has quit [Ping timeout: 255 seconds]
<Nobun> hmm any idea how to return properly, for example, @projdir ?
tcopeland_ has joined #ruby
lexruee has joined #ruby
<Nobun> in a different function than initialize() I mean
tcopeland has quit [Ping timeout: 248 seconds]
tcopeland_ is now known as tcopeland
<Nobun> I'd like to implement the getters() and try if they work (together with instance_variable_get wich are used only for testing purposes)
<matthewd> return rb_iv_get(self, "@projdir"); ?
graft has quit [Ping timeout: 246 seconds]
<Nobun> hmm... yeah... I feel a bit stupid... I could gess it, this time :/
<matthewd> I'd generally advise against implementing in C(++) that which you can implement in ruby, fwiw
<Nobun> matthewd, you are right, but this class is needed becouse is a sort of workaround
<Nobun> unlike python and lua, infact, I didn't see any clear way to allow script to comunicate to the application
wutschkef has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
<Nobun> this way the script will be executed and the CoreVxa class (or module) will be used to obtain informations from application and to return informations to application
<matthewd> Implementing a class in C++ to talk to the rest of the C++ app is perfectly reasonable
<matthewd> That's not the part I was questioning -- just the part where you start manually implementing instance variable accessors
<Nobun> ah
paranoicsan has joined #ruby
<Nobun> can I do it in ruby... but how? As long as I am defining the CoreVxa class in C++ how I supposed to add method to the same class in Ruby? (sorry but I have a bit difficulties on understanding this language)
<Nobun> that should be very nice if I can avoid to implement some additional C++ code
<Nobun> that I could avoid using few lines of Ruby instead
cschneid_ has joined #ruby
<Nobun> ah but perhaps I can simply make a derived class....
<matthewd> class CoreVxa; attr_accessor :projdir; end
<Nobun> ah ok
<Nobun> and I can add this into Ruby even if CoreVxa is already defined?
<matthewd> You can just reopen the class and add methods at will
<matthewd> Yeah
<matthewd> (equally for something already defined in ruby code, or for core classes like String)
<Nobun> ah ok. so you can have multiple class SameClassName to add features at different points... interesting
cschneid_ has quit [Ping timeout: 255 seconds]
wutschkef has joined #ruby
<Nobun> but, however, to communicate with application (for the retval the script should be set in corevxa... for that value it is better to have a setter and not an attr_accessor so I can convert VALUE to string
<Nobun> (a setter in C++, I mean)
neon_icon has quit [Ping timeout: 260 seconds]
wutschkef has quit [Ping timeout: 258 seconds]
rabajaj has joined #ruby
enko has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enko has joined #ruby
anisha has joined #ruby
uneeb has quit [Read error: Connection reset by peer]
enko has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
wutschkef has joined #ruby
Burgestrand has quit [Quit: Closing time!]
wutschkef has quit [Ping timeout: 248 seconds]
elsevero has quit [Quit: elsevero]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
KevinSjoberg has joined #ruby
aupadhye has joined #ruby
milardovich has quit []
cdg has joined #ruby
wutschkef has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
jtdoncas_ has quit [Quit: WeeChat 1.5]
wutschkef has quit [Ping timeout: 258 seconds]
cdg has quit [Ping timeout: 258 seconds]
uZiel has joined #ruby
neon_icon has joined #ruby
jenrzzz has joined #ruby
waveprop has joined #ruby
armyriad has quit [Read error: Connection reset by peer]
armyriad has joined #ruby
KevinSjoberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrm has quit [Read error: Connection reset by peer]
nicolai86 has quit [Remote host closed the connection]
jrm has joined #ruby
KevinSjoberg has joined #ruby
nicolai86 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
KevinSjoberg has quit [Read error: Connection reset by peer]
mjolnird has joined #ruby
<waveprop> does ruby support functional paradigm
wutschkef has joined #ruby
kliq has joined #ruby
elsevero has joined #ruby
alex`` has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
elsevero has quit [Client Quit]
paranoicsan has quit [Quit: paranoicsan]
elcontrastador has joined #ruby
wutschkef has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
quobo has joined #ruby
Mon_Ouie has joined #ruby
<Nobun> matthewd: I cannot find a good way to convert RUBY string to c_string
<matthewd> StringValueCStr(v)
uZiel has joined #ruby
someuser has joined #ruby
<matthewd> Or StringValuePtr + StringValueLen if it could contain \0
andikr has joined #ruby
wutschkef has quit [Ping timeout: 248 seconds]
kliq has quit [Ping timeout: 240 seconds]
<Nobun> YEAH. Finally worked
<Nobun> StringValueCStr(v) works very fine
<Nobun> this is the final (working) code:
<Nobun> c++ code: http://dpaste.com/0FVF7GZ
sleetdrop has joined #ruby
<Nobun> ruby code (test.rb): http://dpaste.com/2M2MH83
Coming has joined #ruby
astrobunny has quit [Remote host closed the connection]
<Nobun> now I will work in the actual application... last question
ur5us has joined #ruby
astrobunny has joined #ruby
<Nobun> In my application I will need to run two scripts with this same method, and all of them will use this CoreVxa to communicate with application
Defenestrate has joined #ruby
<Nobun> is it good if I will add this CoreVxa class this way to both script?
<waveprop> /wc
waveprop has left #ruby [#ruby]
harfangk has joined #ruby
howdoi has joined #ruby
postmodern has quit [Quit: Leaving]
wutschkef has joined #ruby
astrobunny has quit [Ping timeout: 255 seconds]
ferr has joined #ruby
__Yiota has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
wutschkef has quit [Ping timeout: 240 seconds]
mark_66 has joined #ruby
ta has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rahul_bajaj has joined #ruby
rrichardsr3 has quit [Ping timeout: 258 seconds]
rabajaj has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
uZiel has quit [*.net *.split]
_aeris_ has quit [*.net *.split]
Burgestrand has joined #ruby
claudiuinberlin has joined #ruby
rabajaj has joined #ruby
kculpis has quit [Ping timeout: 248 seconds]
wutschkef has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
rahul_bajaj has quit [Ping timeout: 246 seconds]
_aeris_ has joined #ruby
nofxx has quit [Read error: No route to host]
wutschkef has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
imode has quit [Ping timeout: 255 seconds]
uZiel has joined #ruby
Guest97372 has joined #ruby
alex`` has joined #ruby
alex`` is now known as alexherbo2
ramfjord has joined #ruby
alexherbo2 is now known as alex``
enterprisey has joined #ruby
tamouse__ has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
alex`` has quit [Client Quit]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kliq has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
wutschkef has joined #ruby
bigkevmcd has quit [Ping timeout: 248 seconds]
wutschkef has quit [Ping timeout: 255 seconds]
ahrs has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
ahrs has joined #ruby
Guest97372 has quit [Ping timeout: 255 seconds]
harfangk has quit [Ping timeout: 248 seconds]
bigkevmcd has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
wutschkef has joined #ruby
bigkevmcd has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wutschkef has quit [Ping timeout: 264 seconds]
claudiuinberlin has joined #ruby
Guest97372 has joined #ruby
aufi has joined #ruby
marcux has joined #ruby
rrichardsr3 has joined #ruby
personofinterest has joined #ruby
nicolai86 has quit [Remote host closed the connection]
wutschkef has joined #ruby
rrichardsr3 has quit [Ping timeout: 246 seconds]
sysvalve has joined #ruby
nicolai86 has joined #ruby
wutschkef has quit [Ping timeout: 255 seconds]
cschneid_ has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
nicolai86 has quit [Remote host closed the connection]
bronson has joined #ruby
Cohedrin_ has joined #ruby
cschneid_ has quit [Ping timeout: 258 seconds]
aufi_ has joined #ruby
chmurifree is now known as chmuri
nicolai86 has joined #ruby
Guest97372 has quit [Ping timeout: 264 seconds]
aufi has quit [Ping timeout: 255 seconds]
Dimik has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
DTZUZO has quit [Ping timeout: 255 seconds]
guille-moe has joined #ruby
dminuoso_ has joined #ruby
wutschkef has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
<personofinterest> so i have an array with several items in it. when i call that array with a loop and push it to a defined method the array value is encapsulated in ["$arrayvalue"]. i've tried to strip it and chomp it but no luck. any ideas?
<elomatreb> You should show your code, that sounds a little vague
<personofinterest> sure
nicolai86_ has joined #ruby
mim1k has joined #ruby
wutschkef has quit [Ping timeout: 248 seconds]
rrichardsr3 has joined #ruby
uZiel has joined #ruby
<ruby[bot]> personofinterest: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/614986280ca3d8c548398da812867dd7
<ruby[bot]> personofinterest: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
nicolai86_ has quit [Remote host closed the connection]
Beams has joined #ruby
<personofinterest> error: /usr/lib/ruby/2.3.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): http://["google.com"]/test (URI::InvalidURIError)
<elomatreb> You're splatting with the * in the args, it would contain all arguments given to the method but the last
<elomatreb> You only have one, so it's a one-element array. Remove the *
redondos has joined #ruby
<personofinterest> thanks for that
nicolai86 has quit [Remote host closed the connection]
<personofinterest> it's working :D any recommendations to boost speed? i'm new to ruby.
<elomatreb> If you're interacting with a website, your script is most likely not the bottleneck
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
stoffus has joined #ruby
wutschkef has joined #ruby
Silthias1 has joined #ruby
Beams has quit [Quit: .]
Silthias has quit [Ping timeout: 246 seconds]
Beams has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
enterprisey has quit [Read error: Connection reset by peer]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has joined #ruby
wutschkef has joined #ruby
marcux has quit [Ping timeout: 258 seconds]
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
elcontrastador has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
astrobunny has joined #ruby
Beams has quit [Quit: .]
wutschkef has quit [Ping timeout: 258 seconds]
raynold has quit [Quit: Connection closed for inactivity]
quobo has quit [Quit: Connection closed for inactivity]
jenrzzz has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
goyox86_ has joined #ruby
kliq has quit [Ping timeout: 240 seconds]
paranoicsan has joined #ruby
lxsameer has joined #ruby
Beams has quit [Client Quit]
aspiers has joined #ruby
Beams has joined #ruby
goyox86_ has quit [Client Quit]
<Nobun> #python
<Nobun> sorry...
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wutschkef has joined #ruby
claudiuinberlin has joined #ruby
minimalism has quit [Quit: minimalism]
claudiuinberlin has quit [Client Quit]
claudiuinberlin has joined #ruby
astrobunny has quit [Remote host closed the connection]
kassav_ has joined #ruby
charliesome has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
simmaniac has joined #ruby
hogetaro has joined #ruby
tvw has joined #ruby
quobo has joined #ruby
dminuoso_ has quit [Quit: Reconnecting]
dminuoso_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sysvalve has quit [Ping timeout: 255 seconds]
sysvalve has joined #ruby
simmaniac has quit [Ping timeout: 255 seconds]
claudiuinberlin has joined #ruby
aufi_ has quit [Ping timeout: 258 seconds]
hogetaro has quit [Quit: Leaving...]
wutschkef has joined #ruby
simmaniac has joined #ruby
ramfjord has joined #ruby
kassav__ has joined #ruby
sysvalve has quit [Ping timeout: 240 seconds]
wutschkef has quit [Ping timeout: 255 seconds]
ams__ has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
kassav_ has quit [Ping timeout: 248 seconds]
aufi_ has joined #ruby
drbrain has quit [Ping timeout: 248 seconds]
drbrain has joined #ruby
drbrain has quit [Changing host]
drbrain has joined #ruby
wutschkef has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Silthias1 has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
marr has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
wutschkef has quit [Ping timeout: 255 seconds]
waveprop has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
drbrain has quit [Ping timeout: 240 seconds]
<waveprop> do i still need to read the pixake book before POODR if i did the codecademy course?
drbrain has joined #ruby
drbrain has quit [Changing host]
drbrain has joined #ruby
kliq has joined #ruby
hgost has joined #ruby
Silthias has joined #ruby
bruno- has joined #ruby
wutschkef has joined #ruby
mtkd has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
wutschkef has quit [Ping timeout: 255 seconds]
TomyLobo has joined #ruby
cschneid_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
cschneid_ has quit [Ping timeout: 240 seconds]
rgr has joined #ruby
blackmesa has joined #ruby
charliesome has joined #ruby
wutschkef has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
rgr_ has joined #ruby
bronson has joined #ruby
blackmesa1 has joined #ruby
wutschkef has quit [Ping timeout: 255 seconds]
rgr has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
alex`` has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
blackmesa1 has quit [Ping timeout: 240 seconds]
rahul_bajaj has joined #ruby
blackmesa1 has joined #ruby
blackmesa1 has quit [Remote host closed the connection]
ldepandis has joined #ruby
dionysus69 has joined #ruby
naprimer has quit [Quit: Leaving]
wutschkef has joined #ruby
kliq has quit [Ping timeout: 246 seconds]
blackmesa1 has joined #ruby
dinfuehr has quit [Ping timeout: 258 seconds]
dinfuehr has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
mark_66 has quit [Read error: Connection reset by peer]
neon_icon has quit [Ping timeout: 260 seconds]
mark_66 has joined #ruby
naprimer has joined #ruby
GodFather has joined #ruby
mattp_ has joined #ruby
maleghast has joined #ruby
wutschkef has joined #ruby
cschneid_ has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
kassav_ has joined #ruby
kassav__ has quit [Ping timeout: 255 seconds]
Mon_Ouie has joined #ruby
ur5us has quit [Remote host closed the connection]
FahmeF has joined #ruby
FahmeF has quit [Client Quit]
bkxd has quit [Ping timeout: 240 seconds]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 258 seconds]
ldepandis has quit [Ping timeout: 240 seconds]
guardianx has joined #ruby
Seenox has joined #ruby
apparition has joined #ruby
apparition has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 248 seconds]
maleghast has quit [Read error: Connection reset by peer]
apparition has joined #ruby
Coming_ has joined #ruby
guardianx has quit [Remote host closed the connection]
guardianx has joined #ruby
Coming has quit [Ping timeout: 255 seconds]
drbrain has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
drbrain has joined #ruby
drbrain has quit [Changing host]
drbrain has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
someuser has quit [Ping timeout: 260 seconds]
marr has joined #ruby
pagios has quit [Disconnected by services]
tcopeland has quit [Quit: tcopeland]
claudiuinberlin has joined #ruby
rahul_bajaj has quit [Quit: Leaving]
cschneid_ has joined #ruby
ldnunes has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
Defenestrate has quit [Quit: This computer has gone to sleep]
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
<leah2> oO ruby 2.5 wants to reverse backtraces?
Defenestrate has joined #ruby
Defenestrate has quit [Client Quit]
paranoicsan is now known as paranoicsan[Away
paranoicsan[Away is now known as paranoicsan
Defenestrate has joined #ruby
<dminuoso_> leah2: Yes.
<dminuoso_> leah2: And it's quite sensible. Often you end up with quite long backtraces, and it's most useful to the see the most recent stack frame immediately, rather than always being required to scroll.
<leah2> of all things to steal from python, why this :P
<leah2> i want to see the last output and then the error...
<dminuoso_> leah2: You still get that. ;-)
<leah2> no?
<leah2> i see the output and dozen lines of stacktrace and then the error?
<dminuoso_> Ah I see what you mean. From what I can see you can still get the old behavior back though.
<leah2> yeah, i guess
synthroid has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
<dminuoso_> Hash#transform_keys is sexy, I've been doing that in numerous applications.
synthroi_ has joined #ruby
<dminuoso_> obj = obj.transform_keys(&toInternal) that looks just right.
cschneid_ has joined #ruby
<tbuehlmann> to_internal?
<dminuoso_> tbuehlmann: Hah no, poor naming on my side I guess.
cttttt has quit [Ping timeout: 240 seconds]
<tbuehlmann> javascript-land I assume
cttttt has joined #ruby
<dminuoso_> How long will you be making fun of me for enjoying JavaScript? :(
synthroid has quit [Ping timeout: 240 seconds]
blackmesa1 has quit [Ping timeout: 246 seconds]
cschneid_ has quit [Ping timeout: 258 seconds]
shinnya has joined #ruby
charliesome has quit [Remote host closed the connection]
charliesome has joined #ruby
<tbuehlmann> sorry buddy
fyrril has joined #ruby
Beams has quit [Quit: .]
Beams has joined #ruby
bronson has joined #ruby
mostlybadfly has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
kliq has joined #ruby
nahra` has quit [Remote host closed the connection]
simmaniac is now known as sysvalve
nahra` has joined #ruby
dionysus69 has joined #ruby
nahra` has quit [Remote host closed the connection]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
Burgestrand has quit [Quit: Closing time!]
friday has quit [Changing host]
friday has joined #ruby
paranoicsan is now known as paranoicsan[Away
<noizex> I encountered some terrible coding that causes a bug when running aggregate sum() on a collection
<dminuoso_> noizex: Do you have a testcase?
<noizex> yeah
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<noizex> here is your test case: [19] pry(main)> [BigDecimal('1.0'), BigDecimal('2.0'), ''].sum
<noizex> TypeError: String can't be coerced into BigDecimal
<noizex> ;)
<noizex> assuming I can't easily modify the attribute that in some cases is equal '' what would be second best solution? filtering that out? collection can have several thousands entries
bmurt has joined #ruby
paranoicsan[Away is now known as paranoicsan
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John___ has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
<dminuoso_> noizex: The cleanest way would be to have a predicate lambda isEmpty/isNotEmpty
<dminuoso_> ary.filter(&:isNotEmpty).sum
<dminuoso_> err
<dminuoso_> ary.filter(&isNotEmpty).sum
bmurt has joined #ruby
<dminuoso_> Or ary.reject(&isEmpty).sum
<dminuoso_> Or don't let it happen in the first place.
kassav_ has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
Beams has quit [Quit: .]
<dminuoso_> noizex: https://eval.in/877208
kassav_ has joined #ruby
<dminuoso_> Is what I probably might do.
<noizex> yeah that makes sense
guardianx has quit []
<noizex> unfortunately not allowing this to happen touches some other legacy code and I'm not much into touching it
<noizex> despite it being completly wrong, no consistency at all, total is total not freaking ''
<noizex> I will just sanitize this collection then as you suggested
<dminuoso_> Then I suggest the isNumeric approach.
<noizex> thanks!
<noizex> tough there is one problem, I showed example with simple array
Beams has joined #ruby
<noizex> in reality, it's an attribute and it's dynamically resolved by using coll.sum(&attr_string_name.to_s)
ramfjord has joined #ruby
<dminuoso_> noizex: My suggestion is: dont have a one-trick-pony function like that.
<dminuoso_> Transform in multiple steps (and screw performance until profiling tells you to do differently)
<dminuoso_> collection.map(&func).select(&predicate).sum
<dminuoso_> Or better than sum
<dminuoso_> collection.map(&func).select(&predicate).inject(&:+)
<dminuoso_> collection.map(&func).select(&predicate).reduce(&:+)
guymanndude has joined #ruby
bash_n00b has joined #ruby
<bash_n00b> hey guys
<bash_n00b> I'm trying to write a ruby script
<bash_n00b> i'm requiring 'json'
<dminuoso_> noizex: But I have a highly FP approach to ruby these days.
<bash_n00b> but I get an error saying ./parser.rb:3:in `require': no such file to load -- rubygems (LoadError) from ./parser.rb:3
<bash_n00b> how can I import the json module into my ruby script?
<dminuoso_> bash_n00b: what ruby version are you running?
ramfjord has quit [Ping timeout: 255 seconds]
ldnunes has quit [Ping timeout: 248 seconds]
<bash_n00b> dminuoso_: ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
<dminuoso_> bash_n00b: You have a rather old ruby version (which at the time did not ship with JSON out of the box).
<dminuoso_> bash_n00b: Either install the json gem (which means you also need to require 'rubygems' in your project), but it's probably much better to upgrade to modern Ruby such as 2.4.2.
<bash_n00b> dminuoso_: ok
<bash_n00b> thanks
<guymanndude> Hi, I've developed a Ruby gem. I want to specify that it requires Ruby v2.0 or above. I know how to do this in my .gemspec file, however I'm wondering if there is a convention for showing this in the project's README
mson has joined #ruby
<guymanndude> like, in my *Install* section, can I just have a bulletpoint or line that says "Requires Ruby 2 or above" ?
<guymanndude> or is there a better way
yeticry_ has joined #ruby
<dminuoso_> guymanndude: There's no real convention wrt that. Personally I would not list any dependencies that are already covered in gemspecs
<guymanndude> ok thanks dminuoso_
<guymanndude> wrt updating the gemspec with ' spec.required_ruby_version = ">= 2.0.0"
<guymanndude> do I need to bump up the version on the minor gem then?
<guymanndude> minor version*
<dminuoso_> guymanndude: That ruby version is highly likely to be too open.
cschneid_ has joined #ruby
conta has joined #ruby
<dminuoso_> guymanndude: Ruby has a tendency to break things across minor releases.
yeticry has quit [Ping timeout: 248 seconds]
<guymanndude> dminuoso_: it's because YAML.safe_load isn't available to Ruby less than v2
chouhoulis has joined #ruby
<dminuoso_> guymanndude: Yes, but can you promise that it will be compatible to ruby 2.5, 2.6, 2.7, 2.8, an so forth?
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<guymanndude> I don't imagine Ruby would remove YAML.safe_load in those later versions...at least I hope not
<dminuoso_> guymanndude: Ah actually its probably fine.
<dminuoso_> Go for it. :)
im0nde has joined #ruby
<dminuoso_> Seems like a lot of projects do it like that.
<guymanndude> so should I bump up the minor version of my gem with this small update dminuoso_ ?
claudiuinberlin has joined #ruby
<dminuoso_> guymanndude: SemVer has you covered.
cschneid_ has quit [Ping timeout: 246 seconds]
<guymanndude> so...
<dminuoso_> guymanndude: As far as I can tell, according to SemVer a minor version bump is sufficient.
<guymanndude> I tried reading thru this, but it's not clear http://guides.rubygems.org/patterns/#semantic-versioning
<guymanndude> like it's not really a new feature per se
<dminuoso_> Though you could argue its not exactly backwards compatible
<dminuoso_> But its not an API change.
<guymanndude> idk. I guess I'll just ask my team in the PR. thanks tho
<dminuoso_> guymanndude: SemVer focuses on how stable the API is.
ldnunes has joined #ruby
yeticry has joined #ruby
<dminuoso_> If I use library XYZ, and I update its minor version, it should not require me to change my code that uses the same library.
<guymanndude> yup
rprimus has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
rfoust has joined #ruby
bash_n00b has quit [Quit: Page closed]
cdg has joined #ruby
DLSteve_ has joined #ruby
millerti has joined #ruby
bruno- has joined #ruby
guille-moe1 has joined #ruby
guille-moe has quit [Ping timeout: 248 seconds]
guille-moe1 is now known as guille-moe
cschneid_ has joined #ruby
pagios has joined #ruby
pagios has left #ruby [#ruby]
xco has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
_ppp has joined #ruby
fmcgeough has joined #ruby
<xco> i don’t know much about regexes. but this is what i want to do. i want to extract the user ID 981650945 from “http://0.0.0.0:3000/admin/users/981650945/books_read”. so far the only thing i tried is string[/\d+/] and i’m getting “0”, not what i want. string = “http://0.0.0.0:3000/admin/users/981650945/books_read
<dminuoso_> xco: Do you want the quick and dirty solution, or the proper solution?
<xco> i want both please (for learning purposes)
<xco> then i can compare and think around it
bmurt has quit [Remote host closed the connection]
<dminuoso_> xco: Use URI.parse, the resulting object has a #path method, which you can then split using '/'
bmurt has joined #ruby
<dminuoso_> Then you have a clean way of lensing into the value you want, without any silly regular expressions.
jordanm has joined #ruby
<dminuoso_> (Or you can use a regular expression against the #path)
<xco> dminuoso_: i don’t want to use URI
swat2 has joined #ruby
<dminuoso_> xco: %r{users/(\d+)/books_read} ?
jjaii9 has joined #ruby
<dminuoso_> xco: %r{/admin/users/(\d+)/books_read} perhaps might be a bit cleaner
lexruee has quit [Ping timeout: 248 seconds]
<dminuoso_> xco: %r{/admin/users/(?<user_id>\d+)/books_read} if you want a named capture
<xco> wait
<xco> i want the numbers only out of the string
elsevero has joined #ruby
<dminuoso_> That's what this does.
cschneid_ has joined #ruby
lexruee has joined #ruby
<xco> how do i use it again my string variable?
rabajaj has quit [Remote host closed the connection]
Nobun has quit [Quit: Salve a tutti]
<dminuoso_> xco: You could technically use #[] and then use magic variables, or better use .match and then use the resulting match object.
sepp2k has joined #ruby
<swat2> can someone guide me in the right direction of comparing two arrays of hashes ~28k in size. [{id: <int>, code: <int>, imglength: <int>}...] I need to know, what is different between ArrayA and ArrayB (Whats in B that isn't in A, What's in A that isn't in B, or if just the imglength has changed..)
cschneid_ has quit [Ping timeout: 240 seconds]
<dminuoso_> xco: https://eval.in/877259
<dminuoso_> xco: Im a big fan of using named captures, but you can also use unnamed captures (which are then referred to by position).
ptx0 has joined #ruby
rabajaj has joined #ruby
<dminuoso_> swat2: a - b, b - a
<dminuoso_> Or mmm.
roshanavand has quit [Quit: Leaving]
<dminuoso_> That last condition is a bit annoying.
<swat2> dminuoso_: i must be doing something wrong, I've tried that and it doesnt seem to yield the results i'm expecting
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<swat2> dminuoso_: the order of the arrays wont always be the same
<dminuoso_> swat2: #- does not care about the order of arrays.
<dminuoso_> swat2: #- gives you the complement of two arrays (treating them as sets)
Derperperd has quit [Changing host]
Derperperd has joined #ruby
wutschkef has joined #ruby
<dminuoso_> *gah. Difference
<swat2> hmm
<dminuoso_> So A - B is mathematically equivalent to A \ B.
<swat2> i'll check my dataset
griffindy has joined #ruby
<swat2> >.< ... looks like I went full retard :(
griffindy has quit [Client Quit]
<dminuoso_> swat2: Do you care about the position in the array at all?
<swat2> my .map used wrong field :(
<dminuoso_> ah. :)
<swat2> dminuoso_: nope I don't.. its to Queue images that have changed in size
<dminuoso_> swat2: Consider using Set instead of Array then.
<dminuoso_> Though keep in mind that a set cant have duplicates.
John___ has quit [Read error: Connection reset by peer]
<swat2> writing something for my friend to pull images out of his ERP system which stores them in MSSQL, and Uploads them to his website against his shopping cart software
<swat2> I wrote it for him years ago using PHP scripts, but new version of software and shopping cart, different structure, felt like i wanted to give it a birthday and write in ruby as a learning experience for me too
<swat2> Not really looked into Set's... will google that
cdg has quit [Remote host closed the connection]
wutschkef has quit [Ping timeout: 255 seconds]
im0nde has quit [Ping timeout: 255 seconds]
im0nde_ has joined #ruby
guymanndude has quit [Ping timeout: 260 seconds]
ta has quit [Remote host closed the connection]
ferr has quit [Read error: Connection reset by peer]
ferr1 has joined #ruby
<swat2> dminuoso_: so are you suggesting I could just do arraya.to_set ?
im0nde_ is now known as im0nde
<dminuoso_> swat2: naah, I wouldn't generate an array to begin with :p
<swat2> and the same w/ arrayb and then compare them thatway ?
<dminuoso_> Or just ignore it and use arrays away.
<swat2> so instead of using a .map, on my Model I could just do ProductImageMap.all.to_set
polishdub has joined #ruby
amirite has joined #ruby
bronson has joined #ruby
cschneid_ has joined #ruby
jrafanie has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
jobewan has joined #ruby
eaxxae has joined #ruby
simmaniac has joined #ruby
<dminuoso_> swat2: There's little point to coerce an array to set unless you wanted the special behavior that set gives you.
eaxxae has quit [Client Quit]
<swat2> wise words, I'm coercing the data into an array of hashes by means of a .map to get the data in a way it can be compared
cschneid_ has quit [Ping timeout: 258 seconds]
<swat2> so if using Set is a better option that's more flexible, then I'm all ear..err eyes
bronson has quit [Ping timeout: 248 seconds]
Rapture has joined #ruby
sysvalve has quit [Ping timeout: 240 seconds]
eaxxae has joined #ruby
amirite has quit [Ping timeout: 248 seconds]
claudiuinberlin has joined #ruby
Defenestrate has quit [Quit: This computer has gone to sleep]
rfoust has quit [Ping timeout: 258 seconds]
tcopeland has joined #ruby
wutschkef has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rfoust has joined #ruby
cschneid_ has joined #ruby
claudiuinberlin has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
<swat2> dminuoso_: Thank you. With your asurance that I was on the right track, I've found and fixed the two errors in my code. hope you have a great day/night :)
swat2 has quit [Quit: WeeChat 0.4.2]
uZiel has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
dminuoso_ has quit [Ping timeout: 240 seconds]
simmaniac has quit [Ping timeout: 240 seconds]
sysvalve has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
FrostCandy has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
kculpis has joined #ruby
kculpis has quit [Max SendQ exceeded]
kculpis has joined #ruby
amirite has joined #ruby
paranoicsan has quit [Ping timeout: 248 seconds]
kculpis has quit [Max SendQ exceeded]
Cohedrin_ has joined #ruby
Cohedrin_ has quit [Client Quit]
kculpis has joined #ruby
Beams has quit [Quit: .]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
naftilos76 has joined #ruby
marr has quit [Ping timeout: 255 seconds]
amirite has quit [Ping timeout: 240 seconds]
jrafanie has joined #ruby
pygospa has quit [Ping timeout: 248 seconds]
claudiuinberlin has joined #ruby
dminuoso_ has joined #ruby
wutschkef has joined #ruby
naftilos76 has quit [Client Quit]
jjaii9 has quit [Read error: Connection reset by peer]
jinie has quit [Ping timeout: 255 seconds]
jjaii9 has joined #ruby
cschneid_ has quit [Ping timeout: 258 seconds]
Beams has joined #ruby
pygospa has joined #ruby
jrafanie has quit [Client Quit]
cschneid_ has joined #ruby
jinie has joined #ruby
jrafanie has joined #ruby
gil_ has quit [Ping timeout: 264 seconds]
orbyt_ has joined #ruby
gusrub has joined #ruby
ferr1 has quit [Quit: WeeChat 1.9.1]
shinnya has quit [Ping timeout: 248 seconds]
gil_ has joined #ruby
eaxxae has quit []
enko has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
InfinityFye has joined #ruby
ych has joined #ruby
ych has quit [Remote host closed the connection]
rippa has joined #ruby
elsevero has quit [Quit: elsevero]
shekhspear has joined #ruby
hs366 has quit [Quit: Leaving]
rabajaj has quit [Quit: Leaving]
aupadhye has joined #ruby
im0nde has quit [Quit: im0nde]
synthroi_ has quit [Remote host closed the connection]
shekhspear has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
dminuoso_ has quit [Remote host closed the connection]
shekhspear has joined #ruby
aupadhye has quit [Client Quit]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElDoggo has joined #ruby
ElDoggo has quit [Remote host closed the connection]
cadillac__ has joined #ruby
blackmesa1 has joined #ruby
wald0 has joined #ruby
<wald0> !a = 0.00009885 ; p a
blackmesa has joined #ruby
<wald0> a -> 9.885e-05 (wtf?)
<wald0> why my float is not 0.00009885 but this strange value instead?
cadillac_ has quit [Ping timeout: 255 seconds]
cadillac__ is now known as cadillac_
blackmesa1 has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<havenwood> wald0: It's a notation that means the same number.
cdg_ has joined #ruby
<havenwood> >> '%.8f' % 0.00009885
<ruby[bot]> havenwood: # => "0.00009885" (https://eval.in/877335)
jjaii9 has quit [Read error: Connection reset by peer]
jjaii9 has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
wutschkef has quit [Ping timeout: 260 seconds]
<wald0> havenwood: so how i can use/convert it to the "real" value? i want to use that variable to say 0.000098 not a different thing
<havenwood> wald0: You want it to look a certain way in your REPL?
<havenwood> wald0: Or what do you mean?
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
wutschkef has joined #ruby
<wald0> im trying to write a bot that needs to put a value to the API of a website, this value is actually 0.9885e-05, but i want it to be 0.00009885
cagomez has joined #ruby
<wald0> mmh, maybe converting it to a string...
synthroid has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wald0> nope
* wald0 cries
<havenwood> wald0: did you see my Kernel#sprintf (%) example above?
<wald0> yes but i dont se how to use it here
<wald0> i did some tests without success, its always converted to that strange thing
<adaedra> with the % ?
<adaedra> the strange thing is the scientific notation :o)
aufi_ has quit [Quit: Leaving]
<adaedra> 9.885 x 10^-5
<wald0> well, im not sure how the api of the website will interpret scientific notations :/
apparition has quit [Quit: Bye]
<adaedra> that's where havenwood's proposition with % should help you
DenSchub has quit [Max SendQ exceeded]
<wald0> ah! i was able to use it now
<wald0> sems like it cannot be saved? i need to always use it in the moment that i want to use it? :/
<adaedra> how do you try to assign it?
DenSchub has joined #ruby
<wald0> a function (class) returns the result.to_f
<wald0> so my variable = calling that function
<adaedra> that saves the Float value, you have to use % in your assignation if you want to keep the formatted string
selim has quit [Ping timeout: 240 seconds]
<wald0> var = '%.8f' % function(param) --> String can't be coerced tinto Float
selim has joined #ruby
<adaedra> Looks like you're already returning a String object
<wald0> doens't looks like, i have: return result["arr_entry"].to_f
<adaedra> TIL JSON accepts scientific notation
<adaedra> Well, inspect the value to be sure
mark_66 has quit [Remote host closed the connection]
<wald0> well, seems like there happened an operation with these values without trigger an error
marxarelli|afk has quit [Max SendQ exceeded]
marxarelli has joined #ruby
andikr has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 260 seconds]
troys has joined #ruby
jjaii9 has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 258 seconds]
fChanX has joined #ruby
<fChanX> Hello :)
orbyt_ has joined #ruby
<fChanX> Can anyone vouch for "https://learnrubythehardway.org/book/"?
[Butch] has joined #ruby
nahra has joined #ruby
bronson has joined #ruby
Beams has quit [Quit: .]
mtkd has quit [Ping timeout: 248 seconds]
rrichardsr3 has joined #ruby
<wald0> well, i just want to send the correct parameter via the website API
<wald0> oops sorry, just answering something in the wrong scrolling level :)
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fChanX> :p
mtkd has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
pygospa has quit [Ping timeout: 248 seconds]
<havenwood> fChanX: It's not idiomatic Ruby. It seems to intentionally be Ruby from a Python perspective.
<havenwood> fChanX: I'd suggest Learn to Program by Chris Pine if you don't know other langs or Well-Grounded Rubyist if you do.
ShalokShalom_ has joined #ruby
<havenwood> >> wald0 Use BigDecimal
<ruby[bot]> havenwood: # => uninitialized constant BigDecimal (NameError) ...check link for more (https://eval.in/877359)
pygospa has joined #ruby
<havenwood> >> require 'bigdecimal'; require 'bigdecimal/util'; 0.000098858.to_d.to_digits # wald0
<ruby[bot]> havenwood: # => "0.000098858" (https://eval.in/877360)
dminuoso has quit [Changing host]
dminuoso has joined #ruby
ShalokShalom has quit [Ping timeout: 264 seconds]
<fChanX> Thanks havenwood!
synthroid has quit [Remote host closed the connection]
adlerdias has joined #ruby
synthroid has joined #ruby
adlerdias has left #ruby [#ruby]
rekkoha has quit [Remote host closed the connection]
dminuoso_ has joined #ruby
conta has quit [Quit: conta]
ShalokShalom_ is now known as ShalokShalom
blackmesa has quit [Ping timeout: 255 seconds]
synthroid has quit [Ping timeout: 240 seconds]
kassav_ has quit [Quit: kassav_]
wutschkef has quit [Ping timeout: 240 seconds]
elcontrastador has joined #ruby
cschneid_ has quit [Remote host closed the connection]
MrBusiness3 has quit [Read error: Connection reset by peer]
jjaii9 has joined #ruby
MrBusiness3 has joined #ruby
marr has joined #ruby
thinkpad has quit [Ping timeout: 240 seconds]
millerti has quit [Ping timeout: 255 seconds]
wutschkef has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
jjaii9 has quit []
rrichardsr3 has quit [Quit: He who dares .... wins.]
blackmesa has joined #ruby
ramfjord has joined #ruby
uZiel has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
lagweezle_away is now known as lagweezle
conta has joined #ruby
Mekkis has quit [Ping timeout: 264 seconds]
wutschkef has quit [Ping timeout: 255 seconds]
anisha has quit [Quit: This computer has gone to sleep]
agent_white has quit [Quit: bbl]
Mekkis has joined #ruby
wutschkef has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
<cagomez> why use a private attr_reader? I just notice that it allows us to access a variable using `foo` instead of `@foo`. am I glossing over some semantics/context?
Danny has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Danny is now known as Guest6096
kahra has joined #ruby
<fChanX> The book "Well-Grounded Rubyist" is good.
wutschkef has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
bmurt has joined #ruby
Guest6096 has left #ruby [#ruby]
ramfjord has quit [Ping timeout: 255 seconds]
alfiemax has joined #ruby
<dminuoso_> fChanX: Yes it quite is.
<dminuoso_> I keep recommending it, but I've never read it.
* dminuoso_ pokes a hole into baweaver
Danny1 has joined #ruby
DTZUZO has joined #ruby
wutschkef has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<adaedra> Please stop making holes in our operators, dminuoso_.
ahrs has quit [Remote host closed the connection]
<fChanX> I would do the same lol
Mon_Ouie has joined #ruby
shekhspear has quit [Remote host closed the connection]
ahrs has joined #ruby
shekhspear has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
wutschkef has quit [Ping timeout: 258 seconds]
thinkpad has joined #ruby
shekhspear has quit [Remote host closed the connection]
shekhspear has joined #ruby
kahra has quit [Quit: WeeChat 1.9.1]
xco has quit [Quit: xco]
<havenwood> ruby-install --latest ruby-2.5.0-preview1 # \o/
uZiel has quit [Remote host closed the connection]
<dminuoso_> havenwood: if you survive, let me know.
[Butch] has quit [Read error: Connection reset by peer]
Dimik has joined #ruby
<dminuoso_> If you dont, can I have your stuff?
* havenwood deploys to prod
wutschkef has joined #ruby
<havenwood> rvm get head && rvm install ruby-2.5.0-preview1
amirite has joined #ruby
ElDoggo has joined #ruby
postmodern has joined #ruby
alfiemax has quit [Remote host closed the connection]
<havenwood> rbenv install ruby-2.5.0-preview1 # after updating ruby-build, however you do that
<havenwood> PS: If you haven't already: gem update --system # http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
jenrzzz has joined #ruby
<havenwood> 42.yield_self(&:itself) #=> 42
<havenwood> 42.yield_self.first #=> 42
uZiel has joined #ruby
raynold has joined #ruby
DTZUZO has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
ta has joined #ruby
[Butch] has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
ta has quit [Remote host closed the connection]
ta has joined #ruby
Danny1_ has joined #ruby
fChanX has left #ruby [#ruby]
kliq has quit [Read error: Connection reset by peer]
cagomez has quit [Remote host closed the connection]
<dminuoso_> havenwood: that reminds me
Danny1_ has quit [Client Quit]
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
<dminuoso_> I wanted to implement Proc#to_yaml and Proc.from_yaml
Danny1_ has joined #ruby
cagomez has joined #ruby
<dminuoso_> What could possibly go wrong.
Danny1 has quit [Ping timeout: 258 seconds]
<havenwood> dminuoso_: DId you see the Ruby Quiz along those lines?: http://rubyquiz.com/quiz38.html
<dminuoso_> havenwood: yield_self as a poor-mans |> ?
<dminuoso_> That reads so... horrible.
d10n-work has joined #ruby
<havenwood> <3 |>
<dminuoso_> havenwood: Yes, but Im adressing it the proper way.
<dminuoso_> RubyVM::InstructionSequence is my bread and butter.
<havenwood> mmmm
<havenwood> \o/
<dminuoso_> Currently devising a method of plugging in digitally signing the proc.
<dminuoso_> (So that it's actually safe to to_yaml/from_yaml)
<dminuoso_> havenwood: waaaait. yield_self is destructive?
<dminuoso_> how freaking annoying is that.
gregf_ has quit [Ping timeout: 260 seconds]
<dminuoso_> Oh it doesn't - it helps if you can read.
hahuang65 has joined #ruby
ramfjord has joined #ruby
Guest97372 has joined #ruby
shekhspear has quit [Remote host closed the connection]
shekhspear has joined #ruby
<havenwood> >> require 'json'; require 'objspace'; JSON.load ObjectSpace.dump ->{}
<ruby[bot]> havenwood: # => {"address"=>"0x40be3da0", "type"=>"DATA", "class"=>"0x40a5ebc4", "struct"=>"proc", "references"=>["0 ...check link for more (https://eval.in/877462)
uZiel has quit [Remote host closed the connection]
hahuang65 has quit [Client Quit]
<havenwood> dminuoso_: clearly we need an ObjectSpace.load
<dminuoso_> Clearly.
thinkpad has quit [Ping timeout: 248 seconds]
<dminuoso_> havenwood: Using ObjectSpace.load we could implement the "swipe" action you see folks on the series "24", when somebody says "Give me your terminal", and they just swipe it across screens.
shekhspear has quit [Ping timeout: 255 seconds]
rprimus has quit [Quit: leaving]
Authenticator has joined #ruby
claudiuinberlin has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
chouhoulis has joined #ruby
claudiuinberlin has quit [Client Quit]
ahrs has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
ahrs has joined #ruby
rprimus has joined #ruby
synthroid has joined #ruby
uZiel has joined #ruby
<postmodern> just double checking that this isn't a bug. Specifying the search: or ndots: options with Resolv::DNS.new causes it to stop returning any records. https://gist.github.com/postmodern/4a649d679dbde8dff6a3278dac7f18b0
danielpclark has quit [Quit: Leaving]
jrafanie has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.9.1]
uZiel has quit [Remote host closed the connection]
Guest97372 has quit [Ping timeout: 255 seconds]
simmaniac has joined #ruby
alfiemax has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
sysvalve has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
<havenwood> postmodern: Seems it only works if you supply :nameserver, :search *and* :ndots.
faces has quit [Ping timeout: 240 seconds]
<havenwood> Resolv::DNS.new(nameserver: '8.8.8.8', search: %w[.], ndots: 1).getaddresses('twitter.com') #=> [#<Resolv::IPv4 104.244.42.1>, #<Resolv::IPv4 104.244.42.129>]
<havenwood> "Must contain :nameserver, :search and :ndots keys."
alfiemax has quit [Remote host closed the connection]
<postmodern> ahh that's odd
Cohedrin_ has joined #ruby
kang0 has joined #ruby
<kang0> which projects you are working with
AndBobsYourUncle has joined #ruby
DTZUZO has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
weaksauce has joined #ruby
kang0 has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
orbyt_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Client Quit]
Danny1_ has quit [Remote host closed the connection]
bmurt has joined #ruby
troys is now known as troys_
Danny1 has joined #ruby
Danny1 has quit [Remote host closed the connection]
Danny1 has joined #ruby
blackmesa has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
Guest97372 has joined #ruby
simmaniac is now known as sysvalve
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AxelAlex has joined #ruby
conta has quit [Ping timeout: 264 seconds]
imode has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
ledestin has joined #ruby
bronson has joined #ruby
jamesaxl has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
kahra has joined #ruby
Danny1 has quit []
kahra has quit [Client Quit]
kahra has joined #ruby
kahra has quit [Client Quit]
jamesaxl has quit [Client Quit]
jamesaxl has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
mtkd has quit [Ping timeout: 258 seconds]
wutschkef has joined #ruby
mtkd has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
claudiuinberlin has joined #ruby
faces has joined #ruby
jamesaxl has joined #ruby
Bock has quit [Ping timeout: 240 seconds]
kriskropd has joined #ruby
kriskropd has quit [Changing host]
kriskropd has joined #ruby
amirite has quit [Remote host closed the connection]
uZiel has joined #ruby
amirite has joined #ruby
kriskropd has quit [Client Quit]
Ikri has quit [Ping timeout: 240 seconds]
Ikri has joined #ruby
dionysus70 has joined #ruby
uZiel has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 258 seconds]
dionysus70 is now known as dionysus69
lexruee has quit [Quit: ZNC 1.6.5-frankenznc - http://znc.in]
lexruee has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
mkaito has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
mkaito has joined #ruby
dminuoso_ has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
John___ has joined #ruby
uZiel has joined #ruby
minimalism has joined #ruby
cdg has joined #ruby
cdg_ has quit [Ping timeout: 246 seconds]
jamesaxl has quit [Quit: WeeChat 1.9.1]
jamesaxl has joined #ruby
cdg has quit [Ping timeout: 258 seconds]
eroux has joined #ruby
ur5us has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chrisgop_ has joined #ruby
weaksauce has quit [Ping timeout: 264 seconds]
chrisgop_ has left #ruby [#ruby]
swills has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
swills has joined #ruby
eaxxae has joined #ruby
kriskropd has joined #ruby
jrafanie has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
emulator4 has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
sagax has joined #ruby
emulator3 has quit [Ping timeout: 240 seconds]
MarkBilk__ has joined #ruby
bkxd has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
MarkBilk_ has quit [Ping timeout: 246 seconds]
synthroid has quit [Remote host closed the connection]
synthroid has joined #ruby
txdv has quit [Quit: WeeChat 1.6-rc1]
jphase has quit [Remote host closed the connection]
mr_sourcerer has joined #ruby
tvw has quit [Remote host closed the connection]
eaxxae has quit [Ping timeout: 240 seconds]
synthroid has quit [Ping timeout: 260 seconds]
cschneid_ has joined #ruby
dmtd has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
emulator4 has quit [Ping timeout: 255 seconds]
jphase has joined #ruby
kies has quit [Ping timeout: 258 seconds]
ams__ has quit [Quit: Connection closed for inactivity]
InfinityFye has quit [Quit: Leaving]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FastJack has quit [Read error: Connection reset by peer]
FastJack has joined #ruby
goyox86_ has joined #ruby
goyox86_ has quit [Ping timeout: 248 seconds]
shekhspear has joined #ruby
alfiemax has quit [Remote host closed the connection]
wutschke1 has joined #ruby
shekhspear has quit [Remote host closed the connection]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
Ltem has joined #ruby
wutschkef has quit [Ping timeout: 240 seconds]
Inside has joined #ruby
statelesscode has quit [Ping timeout: 240 seconds]
rabajaj has joined #ruby
synthroid has joined #ruby
orbyt_ has joined #ruby
shekhspear has joined #ruby
AxelAlex has quit [Quit: AxelAlex]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shinnya has joined #ruby
emulator3 has joined #ruby
fmccann has joined #ruby
imode has quit [Ping timeout: 255 seconds]
hahuang65 has joined #ruby
jrafanie has joined #ruby
<irated> Does cephfs do write-behind by default
fmccann_ has joined #ruby
naitian has quit [Ping timeout: 264 seconds]
<havenwood> irated: cephfs?
cdg has joined #ruby
eroux has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
<baweaver> Ceph Filesystem
goyox86_ has joined #ruby
<baweaver> Though I don't know how that relates to Ruby
SuperTaz has joined #ruby
cdg_ has joined #ruby
<baweaver> It'd probably be a better question to ask on their support channels irated
naitian has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
eroux has joined #ruby
eckhardt has joined #ruby
SuperTaz has quit [Quit: Textual IRC Client: www.textualapp.com]
kies has joined #ruby
synthroid has quit [Remote host closed the connection]
SuperTaz has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
gheegh has joined #ruby
<dminuoso> baweaver, do you know what relates to ruby?
serhart has joined #ruby
bronson has quit [Ping timeout: 258 seconds]
<irated> wrong chat
<irated> sorry guys
<irated> :P
<irated> to many irc channels open
<baweaver> Not a problem mate
fmccann has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmccann_ has quit [Quit: fmccann_]
fmccann has joined #ruby
fmccann_ has joined #ruby
elsevero has joined #ruby
<Kanibal> dman[m]: is that some sort of perl code (?)
fmccann has quit [Client Quit]
<Kanibal> *dminuoso
<Kanibal> sorry
jrafanie_ has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
nowhere_man has quit [Remote host closed the connection]
snath has joined #ruby
fmccann_ has quit [Ping timeout: 255 seconds]
wutschke1 has quit [Ping timeout: 255 seconds]
snath has left #ruby [#ruby]
jrafanie has quit [Ping timeout: 248 seconds]
sunrunner20 has quit [Read error: Connection reset by peer]
kliq has joined #ruby
sunrunner20 has joined #ruby
nowhere_man has joined #ruby
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
jrafanie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has joined #ruby
<dminuoso> Kanibal, much better.
<dminuoso> Kanibal, it's Befunge.
<Kanibal> Befunge?
<Kanibal> ah
bkxd has quit [Ping timeout: 246 seconds]
Ishido has quit [Remote host closed the connection]
<Kanibal> I guess it's the Ackermann function !1 (ofc I didn't just Google that, who'd do that!)
<zeroDivisible> Folks, just wondering - I'm getting random IOErrors when writing to socket when talking to redis. Suspecting something on the OS level. How could I approach debugging this? Would you have any hints maybe?
<zeroDivisible> *IOError (closed stream)
<matthewd> zeroDivisible: What exactly are the errors, and what's your ruby version?
<matthewd> If it's 2.4.1 or 2.3.4, try upgrading to the latest point release
<zeroDivisible> Ruby 2.1.1, when using Redis Ruby gem. It mostly works ok, but very rarely I'm getting IOError, which I can't explain - and there's nothing in Redis server logs.
<zeroDivisible> *2.1.10 - can't use newer sadly :(
Ishido has joined #ruby
<matthewd> Hmm.. I'm not sure whether that version has the bug I'm thinking of. I would've guessed it was too old, but maybe not.
<dminuoso> zeroDivisible, are you in a multithreaded environment?
<dminuoso> zeroDivisible, and what's the underlying redis-rb gem version?
<zeroDivisible> re: multithreaded - very much so. Not a webapp but a bit complex multithreaded / multiprocess job framework (mostly grown in house). 3.3.3 is the version of the redis-rb gem.
<zeroDivisible> I'm basically trying to understand how I can approach debugging this as my knowledge isn't the greatest in that area.
jhass has quit [Ping timeout: 240 seconds]
wutschkef has joined #ruby
gheegh has joined #ruby
<dminuoso> I wonder whether this is related to https://github.com/rails/rails/issues/10989
<dminuoso> matthewd seems to have re-opened this issue, he ought to know more about this.
synthroid has quit []
jhass has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
mtkd has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
mtkd has joined #ruby
SuperLag has quit [Quit: Lost terminal]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<matthewd> I don't think that involved IOErrors -- in fact, I think IOErrors were the *solution* to that problem
sysvalve has quit [Quit: Leaving]
AndBobsYourUncle has quit [Quit: Textual IRC Client: www.textualapp.com]
<dminuoso> matthewd, yes precisely. If that solution is to throw IOErrors...
<dminuoso> matthewd, I've seen numerous guides all pointing at casually catching IOError everywhere just in case the connection was cut
<dminuoso> Maybe I just got my head twisted, I don't know.
<matthewd> zeroDivisible: I wouldn't imagine your OS is lying to you (though then again, if you're stuck on an old unsupported ruby, who knows what your surrounding environment looks like)
<matthewd> zeroDivisible: I would think the more probable explanations are that the connection really has gone away, or ruby's confused
troys_ is now known as troys
<matthewd> 2.1.10 was released at the same time as 2.2.7, which definitely has a bug that manifests in this way ("ruby's confused") -- so it's fairly possible it did get the same backport
Rapture has quit [Ping timeout: 248 seconds]
<zeroDivisible> matthewd: Makes sense. I was wondering whether something on the OS level could be causing those issues, but the rest of the env is relatively up to date. I'll try poking around a bit here, our current appraoch is to just catch those errors, fully disconnect and reconnect. It works, it just feels bad :/ Will at least try to strace to see how sockets are getting closed / open.
cagomez has quit []
<dminuoso> zeroDivisible, it
<dminuoso> it's possible but unlikely
lxsameer has quit [Ping timeout: 246 seconds]
<zeroDivisible> matthewd: would you have a reference to the bug somehwere handy? I'll google if not.
jhass has quit [Ping timeout: 258 seconds]
blackmesa has quit [Ping timeout: 248 seconds]
Cohedrin_ has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 258 seconds]
jhass has joined #ruby
arup_r has quit []
Cohedrin_ has joined #ruby
blackmesa has joined #ruby
bvcosta has joined #ruby
ramfjord has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
Ltem has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
MrBusiness3 has quit [Quit: https://www.youtube.com/watch?v=xIIqYqtR1lY -- Suicide is Painless - Johnny Mandel]
FrostCandy has quit []
amirite has quit [Ping timeout: 258 seconds]
mim1k has joined #ruby
SuperLag has joined #ruby
Derperperd has quit [Quit: Peace out]
<matthewd> zeroDivisible: One thing to try would be downgrading to 2.1.8
<matthewd> (though I don't know what other fixes you'd be giving up by doing so)
[Butch] has quit [Quit: I'm out . . .]
Derperperd has joined #ruby
<matthewd> zeroDivisible: https://bugs.ruby-lang.org/issues/13632 is the bug I'm thinking of
ldnunes has quit [Quit: Leaving]
pygospa has quit [Ping timeout: 255 seconds]
lxsameer has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
nemesit|znc has quit [Ping timeout: 240 seconds]
<matthewd> But that blames https://bugs.ruby-lang.org/issues/13076, which only seems to have been backported as far as 2.2
pygospa has joined #ruby
herbmillerjr has quit [Remote host closed the connection]
MrBusiness has joined #ruby
chouhoulis has quit [Remote host closed the connection]
herbmillerjr has joined #ruby
roshanavand has joined #ruby
lxsameer has quit [Quit: WeeChat 1.7]
Defenestrate has joined #ruby
amirite has joined #ruby
goyox86_ has quit [Ping timeout: 240 seconds]
biberu has quit []
gizmore|2 is now known as gizmore
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fyrril has quit [Quit: Leaving]
enterprisey has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 248 seconds]
ElDoggo has quit []
goyox86_ has joined #ruby
goyox86_ is now known as goyox86
rabajaj has quit [Quit: Leaving]
kliq has quit [Ping timeout: 260 seconds]
bvcosta has quit []
Defenestrate has quit [Quit: Leaving]
enterprisey has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
alex`` has quit [Ping timeout: 240 seconds]
weaksauce has joined #ruby
goyox86 has quit [Quit: goyox86]
gheegh has joined #ruby
minimalism has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
DLSteve_ has quit [Quit: All rise, the honorable DLSteve has left the channel.]
tcopeland has quit [Quit: tcopeland]
bronson has joined #ruby
jphase has quit [Remote host closed the connection]
Azure has quit [Quit: Oops.]
jphase has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
fmcgeough has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
konsolebox has quit [Ping timeout: 248 seconds]
AxelAlex has joined #ruby
blackmesa has quit [Quit: WeeChat 1.9.1]
mr_sourcerer has quit [Remote host closed the connection]
shekhspear has quit []
SeepingN has joined #ruby
konsolebox has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
Azure has joined #ruby
QualityAddict has joined #ruby
emulator3 has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Ping timeout: 255 seconds]
amirite has quit [Remote host closed the connection]
amirite has joined #ruby
marcux has joined #ruby
Ropeney has joined #ruby
<zeroDivisible> matthewd: thank you for this. I'll try to dig deeper there.
jenrzzz has quit [Ping timeout: 255 seconds]
amirite has quit [Ping timeout: 255 seconds]
<matthewd> zeroDivisible: If you can artificially reproduce the problem, maybe you can test with a newer ruby, even if you can't deploy / run your full app on it
sepp2k has quit [Quit: Leaving.]
wutschkef has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
wutschkef has joined #ruby
jenrzzz has joined #ruby
troys is now known as troys_
goyox86 has joined #ruby
jordanm has quit [Remote host closed the connection]
TomyLobo has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nadir has quit [Quit: Connection closed for inactivity]
mson has joined #ruby
workmad3 has joined #ruby
thinkpad has joined #ruby
n35xdxb0 has joined #ruby
tcopeland has joined #ruby
mynameisdebian has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
goyox86 has quit [Quit: goyox86]
troys_ is now known as troys
elsevero has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Remote host closed the connection]
goyox86_ has joined #ruby
<mynameisdebian> I was trying to install Rails on a server that has Ruby 2.0.0 installed. It told me, "Rails requires Ruby version something", so I researched the issue and found that I am supposed to install Rails 4.2. In attempting to do so I am now being told that Nokogiri requires Ruby 2.1. I know it's sort of a "thing" with Ruby that there never be a way to set things up without resolving multiple issues, but is there maybe a way to
<mynameisdebian> install Rails and have it resolve the dependencies itself, or to know what version I am supposed to install? I'm pretty sure people were using Rails under Ruby 2.0.0. It seems incredibly unsophisticated that the installer that knows my version of Ruby is too low for Rails should also know before even starting that it is also too low for Nokogiri. Does anyone know how I can get a Rails environment installed without fuss?
elsevero has joined #ruby
<mynameisdebian> Unfortunately I'm more into writing programs and web apps than I am into learning Ruby internals. I would have thought a language designed to be easy would not be difficult to install? Unfortunately that is almost never the case. How does a Rails developer set up a dev environment?
cagomez has joined #ruby
<mynameisdebian> unfortunately I cannot go above Rails 2.0.0
<baweaver> Ruby 2.0 is also multiple years old and long since out of band for support.
<mynameisdebian> well, that's what Amazon EC2 supports on their Amazon Linux AMI
<baweaver> Can't?
<mynameisdebian> I don't believe I can upgrade.
<baweaver> You can.
<baweaver> You have shell access to EC2 instances to run things like Chef and friends, or really even a bash script in initscript
jobewan has quit [Ping timeout: 240 seconds]
<baweaver> or just bake a new AMI to deploy from so you don't have to bother with that
<mynameisdebian> So, what is the command? I tried "yum install ruby -y" and it told me I have the latest version
AndBobsYourUncle has joined #ruby
<baweaver> but that may be a bit beyond you starting out
<baweaver> See that link up there?
<baweaver> Ubuntu is based on Debian which is close enough to CoreOS which is based on CentOS that that guide should work.
<baweaver> Short version: your problem is Redhat blows at keeping things up to date, and that trickles down from RHEL6 -> CentOS -> CoreOS (EC2 AMI Base)
imode has joined #ruby
<baweaver> Well, maybe not 6. I think 6 was 1.8.6
<baweaver> Then you _really_ would have had some fun there
agent_white has joined #ruby
naprimer2 has joined #ruby
<havenwood> mynameisdebian: This isn't particularly Ruby-related, but don't use Amazon Linux.
<mynameisdebian> I could wipe out Amazon's default install of Ruby and start over with RVM or something like that, but my whole thing here was to get a development environment up and running quick. I chose the Amazon AMI because it included Ruby. I guess I'm mostly confused that it's so hard to simply install Rails with what I already have. I have Ruby 2.0.0 which Rails supports. It should be easy to get Rails running on it
<havenwood> mynameisdebian: Why are you using Amazon Linux?
<baweaver> In general use the newest version of things available, not necessarily what your OS has in its packages (packages are out of date most of the time)
<havenwood> mynameisdebian: Amazon Linux doesn't include many nice, up-to-date packages nor does it have the stability of intentionally-ancient CentOS.
<mynameisdebian> havenwood: simply because it had Ruby already installed. I would normally use Debian but I thought I was being clever using Amazon's features and that installing Rails would be a breeze.
<baweaver> Ruby 2.0.0 has been EOL for years now.
<havenwood> mynameisdebian: Fedora or Archlinux will treat you better.
polishdub has quit [Quit: leaving]
<havenwood> mynameisdebian: They have solid installs of modern Ruby.
<havenwood> And install gems for the local user by default.
<havenwood> Or even OpenSUSE, there are lots of options.
<havenwood> I'd recommend avoiding Amazon Linux.
mynameisdebian has quit [Read error: Connection reset by peer]
naprimer has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<baweaver> havenwood: went and scared them off
<havenwood> oops!
* havenwood puts on softer gloves
<baweaver> in general I agree though, CoreOS is crappy
mynameisdebian has joined #ruby
<mynameisdebian> I'm not sure if I'm just ranting here.. It just seems really strange that a command which would have installed Rails back when Ruby 2.0.0 was not EOL would not give me all kinds of problems. It seems like the Rails installer has some "logic" to it, yet never produces the obvious result
<mynameisdebian> I guess it's more complicated than that
<havenwood> mynameisdebian: Ruby 2.0 is past end-of-life. Use an operating system that supports modern packages if you want to use modern libraries.
<baweaver> The more removed by time a version is the more likely you get random nonsense like that.
<havenwood> mynameisdebian: Use a supported version of Ruby!
<mynameisdebian> okay, so Fedora or Arch then. Not Arch?
<mynameisdebian> I mean, "Not Debian"?
<matthewd> Debian should be fine
<Ropeney> Def don't suggest you be using Arch
* baweaver doesn't think the distro matters
<baweaver> All package managers kinda suck at keeping things modern
<havenwood> mynameisdebian: Debian has a fine Ruby. It's setup for a system install, but you can always install Ruby yourself.
<matthewd> Anything with a currently-supported ruby available is fine
<baweaver> RHEL being one of the worst
<baweaver> and anything that descends from it
<matthewd> baweaver: Well, RHEL has a separate thing for more recent ruby etc
<mynameisdebian> Thanks guys, I think that helps
<havenwood> Ropeney: I'd strongly suggest Arch over Amazon Linux.
<havenwood> Pick your poison.
<baweaver> BSD! BSD!
<mynameisdebian> want to mention that I've used Arch and appreciated never once having a package not work exactly as expected
<matthewd> mynameisdebian: However, for a development environment, a non-system ruby is generally the recommendation
<Ropeney> I'd take into account the current difficulties and not suggest an even more difficult distro as an alternative :)
<Ropeney> my opinion either way
<havenwood> FreeBSD has a nice, modern Ruby.
<Ropeney> we all have them
<mynameisdebian> what does "non-system ruby" mean?
<havenwood> OpenBSD! \o/
<matthewd> RVM etc
<baweaver> install from source
<baweaver> or rvm
<havenwood> Jeremy Evens actually maintains the OpenBSD Ruby afaik.
<matthewd> Basically: RVM, rbenv, or chruby
<baweaver> or rbenv or whatever else
<mynameisdebian> system ruby is what the package manager installs then?
<havenwood> chruby!
<matthewd> Yes
<Ropeney> *cough* docker *cough*
amirite has joined #ruby
<mynameisdebian> I would prefer to use Docker for the experience, if I wasn't so desperate to get my environment up
<havenwood> mynameisdebian: Typically, yes.
goyox86_ has quit [Ping timeout: 240 seconds]
goyox86___ has joined #ruby
<mynameisdebian> BTW you guys are all pretty nice compared to some other channels
<Ropeney> mynameisdebian https://blog.codeship.com/running-rails-development-environment-docker/ takes a few minutes and GG
<mynameisdebian> Ropeney: bookmarked :)
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
n35xdxb0 has quit [Quit: WeeChat 1.9.1]
__Yiota has joined #ruby
n35xdxb0 has joined #ruby
amirite has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
gheegh has joined #ruby
goyox86___ has quit [Quit: goyox86___]
<wald0> "order = function.new_order(args)", the variable order should be an array with multiple values, if i use "order << function.new_order(args)", another entry will be added to the array? so i can access to the multiple added orders as p order[1]["value"] ?
goyox86___ has joined #ruby
goyox86___ is now known as goyox86
enterprisey has joined #ruby
<baweaver> wald0: what now? That's a pretty dense sentance.
<baweaver> << is basically pushing something into an array
<baweaver> = is setting something equal to something else
amirite has joined #ruby
knight33 has joined #ruby
minimalism has quit [Quit: minimalism]
cschneid_ has joined #ruby
goyox86 has quit [Quit: goyox86]
goyox86 has joined #ruby