havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.1, 2.3.4 & 2.2.7: 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
moei has joined #ruby
Neo95 has quit [Ping timeout: 240 seconds]
edward__ has joined #ruby
<edward__> Anyone working on anything right now?
7GHAAG92P has joined #ruby
paradisaeidae has joined #ruby
AndyWojo has joined #ruby
<Radar> edward__: probably
<Radar> I was working on a gnarly CSV importer issue on Friday, but today I am planning out a junior engineering program at where I work
ayonkhan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weaksauce has joined #ruby
<imode> working on an e-commerce site with sinatra and redis.
xco has quit [Quit: xco]
bruno- has quit [Ping timeout: 240 seconds]
nicesignal has joined #ruby
bruno- has joined #ruby
edward__ has quit [Quit: Leaving]
numbdewd has quit [Quit: *poof*]
nicesignal has quit [Client Quit]
nadir has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
marr has quit [Ping timeout: 260 seconds]
imode has quit [Ping timeout: 240 seconds]
imode has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
Puffball has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
konsolebox has joined #ruby
cadillac_ has quit [Ping timeout: 255 seconds]
pi4 has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
theRealGent has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
pi2 has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
AxelAlex has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
mtkd has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
7GHAAG92P has quit [Quit: ChatZilla 0.9.93 [Firefox 55.0.3/20170824123605]]
kreantos has joined #ruby
_sfiguser has quit [Ping timeout: 240 seconds]
kreantos has quit [Ping timeout: 260 seconds]
<tamouse__> that's cool, radar
Neo95 has joined #ruby
<Radar> So very cool :D
nicesignal has joined #ruby
Neo95 has quit [Ping timeout: 248 seconds]
masterasia has quit [Read error: Connection reset by peer]
_sfiguser has joined #ruby
dreamthese has joined #ruby
_sfiguser has quit [Client Quit]
numbdewd has joined #ruby
dreamthese has quit [Client Quit]
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dreamthese has joined #ruby
dreamthese has left #ruby [#ruby]
18VAB36IN has joined #ruby
paradisaeidae has joined #ruby
dreamthese has joined #ruby
tvw has quit [Ping timeout: 252 seconds]
dreamthese has quit [Client Quit]
nicesignal has quit [Quit: WeeChat 1.4]
someuser has quit [Ping timeout: 252 seconds]
jameser has joined #ruby
Azure has joined #ruby
davic_ has joined #ruby
ovaltine has quit [Ping timeout: 240 seconds]
ovaltine has joined #ruby
davic has quit []
davic_ is now known as davic
hutch34 has joined #ruby
d^sh has quit [Ping timeout: 252 seconds]
gizmore has quit [Ping timeout: 240 seconds]
d^sh has joined #ruby
gizmore has joined #ruby
WeiJunLi has quit [Ping timeout: 240 seconds]
ornerymoose has quit [Quit: ornerymoose]
imode has quit [Ping timeout: 252 seconds]
tacoboy has quit [Ping timeout: 255 seconds]
hutch34 has quit [Read error: Connection reset by peer]
hutch34 has joined #ruby
hutch34 has quit [Ping timeout: 255 seconds]
SuperLag has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
brent__ has joined #ruby
karmayogi23 has quit [Quit: karmayogi23]
hutch34 has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
sarbs has quit [Read error: Connection reset by peer]
tacoboy has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
tacoboy has quit [Read error: Connection reset by peer]
nicesignal has joined #ruby
nicesignal has quit [Client Quit]
ahrs has quit [Remote host closed the connection]
nicesignal has joined #ruby
sarbs has joined #ruby
nicesignal has quit [Client Quit]
ahrs has joined #ruby
nicesignal has joined #ruby
AxelAlex has quit [Remote host closed the connection]
agent_white has joined #ruby
AxelAlex has joined #ruby
goyox86 has joined #ruby
goyox86 has quit [Client Quit]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
goyox86_ has joined #ruby
goyox86_ has left #ruby [#ruby]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has joined #ruby
goyox86_ has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
ramfjord_ has quit [Ping timeout: 246 seconds]
orbyt_ has joined #ruby
armando has quit [Quit: ZNC 1.7.x-nightly-20170828-c1e80b22 - https://znc.in]
nobody has joined #ruby
<nobody> anyone here?
<nobody> I really need an answer to this question
umaaji has joined #ruby
<nobody> will give $20 cash if someone gets it
<nobody> just message me directly
bronson has joined #ruby
<Radar> nobody: paypal.me/ryanbigg
<Radar> nobody: https://gist.github.com/radar/f3fa097cd1ade88e0defd909ffc80980 This code goes into your Rake task.
<Radar> That will redefine the methods for _all_ instances of Foo.
<agent_white> BAM.
<Radar> Updated the Gist to show an example of overriding the method on just one instance.
<nobody> hmm
<Radar> Looking forward to your payment shortly.
<nobody> wait
<Radar> Oh but I am
<imode> uh.
<agent_white> Radar Wayne unholstered.
bronson has quit [Ping timeout: 240 seconds]
<imode> https://ptpb.pw/Hg5N/ruby have fun, nobody.
<nobody> the rake task is defined, the test take is invoked. and I have no reference to the instance itself
<Radar> imode: what's with the return?
<imode> Radar: personal style. idgaf if anybody uses it.
<Radar> imode: I believe rubocop would complain about it.
<nobody> task*
<imode> Radar: don't really care, tbf.
<Radar> nobody: it would help if you would give a more concrete example.
<Radar> This foo + bar thing never helps anyway
<nobody> ok, let me modify my question on stackoverflow
<Radar> imode: I should've used the def <instance>.bar stuff. Silly mistake.
<nobody> i will raise the bounty to $50 also
<imode> heh.
<imode> rather than creating a metaclass.
<Radar> Brain oozing out my ear from reviewing all these applications today.
<Radar> imode: indeed
<imode> nobody: rather than creating a metaclass, you can take a look at that ptpb link. you can just define new methods on the fly for instances, much like you can in prototypical languages such as javascript.
kreantos has joined #ruby
<imode> also, just ask a question next time. :P
<Radar> imode: They said that they don't have any reference to the instance itself.
<imode> aight.
<Radar> imode: also: happy to share the bounty with you if they pay up.
<imode> nah I'm good.
<Radar> :ok_hand:
<nobody> i will pay up, this is a pretty high priority ask... trust me
<imode> so you have no access to the instance.. hrm.
<Radar> nobody: well I was always taught "trust nobody" and now I guess that particular prophecy is coming true.
<nobody> heh
kreantos has quit [Ping timeout: 252 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramortegui has quit [Ping timeout: 252 seconds]
__Yiota has joined #ruby
<nobody> hope this is a bit more clear
<imode> you could probably replace Foo.new with an anonymous class redefinition of foo.
<imode> oh, during the "test" task.
<imode> nobody: do you actually have access to this source? because you can just open up foo again at the top of the file.
<imode> but I'm also assuming you want it to be temporary.
<nobody> the thing is that im writing a test for particular class. and one particular value needs to be changed everytime the test runs. so, i have a method called setup_test... and I use the output of that method to override a particular method
<nobody> yeah
<imode> lemme whip something up.
<nobody> nice
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
segy has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 255 seconds]
gix has joined #ruby
segy has joined #ruby
claw has quit [Ping timeout: 264 seconds]
hutch34 has quit [Ping timeout: 264 seconds]
pharma_joe has joined #ruby
<Radar> nobody: what testing framework are you using?
<Radar> and can you share with us what setup_test is?
<tamouse__> something smelly
<imode> yeah why would you need to do this.
<imode> what stops you from just grabbing an instance?
<nobody> sorry i just stepped away
<nobody> rspec
SteenJobs_ has joined #ruby
<Radar> nobody: y u no mock the value using RSpec?
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<nobody> let me think for a second
<imode> so I have something rough.
<nobody> yes
<imode> just need to work it into a oneliner.
<Radar> nobody: Also, I'm thinking that you're running the rake task as a part of your RSpec testing, possibly using something like `rake something`?
<nobody> yeah
<Radar> If so: Why do it that way? Why not abstract the logic out to a class and then test that within the RSpec test? Have the rake task just be light and call that class + method directly?
umaaji has quit [Quit: Leaving...]
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicesignal has quit [Quit: WeeChat 1.4]
<nobody> i could do that, but the rake tasks are pretty nasty and overly complicated, it isn't trivial to abstract the logic out of it... if that makes sense...
pharma_joe has joined #ruby
nicesignal has joined #ruby
<imode> change your Foo.new to...
<nobody> setup_test is basically setting up some infrastructure stuff
<imode> proc {x = Foo.new; y = class << x; self; end; y.send(:define_method, :bar){2}; x}.call
<imode> there's probably a better way to do that.
<Radar> nobody: At this rate it sounds like it'd be worth hiring a consultant for an hour and getting them to look at your code.
<imode> a full example.
<nobody> im open to the option of hiring a consultant, i don't know how to go about by that... i can send some emails around and share the actual code there
dviola has quit [Quit: WeeChat 1.9]
<imode> dur. https://ptpb.pw/tTOe/ruby better version.
<imode> nobody: this way you can always generate modified instances of "Foo" to pass to your something task. if you really want to do it this way.
<nobody> im looking at it, just a sec
<imode> pretty much just uses the same syntax as earlier, but wrapped in a proc that you can call to get a new instance. if you really want to make it prettier, define a dedicated function to for getting new modified Foo instances.
<nobody> I am not sure if I follow... do I do this during the setup_test part? or when I define the rake task
govg has quit [Ping timeout: 240 seconds]
<imode> wat.
<imode> under your task :something.
<imode> InvokeSomething(Foo.new)
<imode> you want that instance of Foo to be modified to return 2 when 'bar' is called, right?
claw has joined #ruby
s00pcan has quit [Ping timeout: 240 seconds]
r_hector has quit [Quit: Leaving.]
<nobody> yeah
<imode> if so, then just replace the Foo.new beside InvokeSomething with that proc+call I defined on line 10.
<imode> InvokeSomething will be passed an instance of Foo with its 'bar' method modified to return 2. all other instances will be unaffected.
<imode> savvy?
MarkBilk has joined #ruby
<imode> not really sure why you can't just plop down a foo = Foo.new; prior to InvokeSomething, but go figure.
s00pcan has joined #ruby
<nobody> wait, maybe I wasn't clear.. but the value for bar will be determined during setup_test
<imode> where is setup_test? I don't use rake.
<nobody> i see
<nobody> sorry for confusion, I just modified the question again
umaaji has joined #ruby
<imode> o..kay. so you want all instances generated after setup_test to be created with the modified bar method, and after 'rake something', you want to go back to the original version.
<imode> am I correct on that.
<nobody> yeah
orbyt_ has joined #ruby
<imode> are you able to modify your something task.
<imode> as in, the source for it.
<nobody> yeah I can
<imode> okay. do this.
<nobody> to a certain extent that is
<imode> and that certain extent is..?
<nobody> can't modify InvokeSomething
<imode> you can't modify the actual definition of InvokeSomething or the call to InvokeSomething.
<nobody> definition
<imode> that's.. fine.
<nobody> thanks for helping me out btw, i appreciate it
<imode> np.
<imode> can you do this?
ornerymoose has joined #ruby
<imode> now, if any Foos are instantiated inside InvokeSomething's definition, they will not be affected, but I assume that doesn't matter because you're passing a new foo into InvokeSomethig anyway.
cadillac_ has quit [Ping timeout: 248 seconds]
<nobody> I might be able to
agent_white has quit [Quit: bai]
<imode> try it and get back to me. you can define any method you want to on any class instance via def <your_variable_here>.<your_method_name>() <method_body>; end
cadillac_ has joined #ruby
<nobody> that's cool. that gave me an idea. i would have see if this is possible. the only thing is that i was hoping to modify the rake task during invokation of another rake task, but im guessing that's not trivial
<imode> modifying a class definition and undoing it within a method is.. hm.
<imode> give me a moment.
jackjackdripper has quit [Quit: Leaving.]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
armando has joined #ruby
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<imode> so you can clearly see that I'm using the same method definition, yet I'm actually modifying the global class definition rather than individual instances.
<nobody> cool
<nobody> didn't know you could do that
<imode> welcome to ruby metaprogramming. :P
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<imode> so you don't have to mess with your rake tasks.
<imode> you can just plop the Foo.send stuff in your do_some_testing method or wherever, just prior to when you invoke the "something" task.
ShalokShalom has joined #ruby
<imode> you could wrap those calls in a method so you wouldn't have to do send every time.
uZiel has joined #ruby
agent_white has joined #ruby
* imode ponders a way to make that prettier.
lexruee has joined #ruby
howdoi has joined #ruby
paradisaeidae has quit [Ping timeout: 252 seconds]
18VAB36IN has quit [Ping timeout: 260 seconds]
xco has joined #ruby
goyox86_ has quit [Quit: goyox86_]
paradisaeidae has joined #ruby
belmoussaoui__ has joined #ruby
paradisaeidae_ has joined #ruby
s00pcan has quit [Ping timeout: 248 seconds]
KeyJoo has quit [Ping timeout: 255 seconds]
s00pcan has joined #ruby
ta_ has quit [Remote host closed the connection]
<imode> I could probably extend that to take a hash, map over the keys and values, yield, then map over them again to restore the original methods.
paradisaeidae has quit [Ping timeout: 240 seconds]
paradisaeidae_ has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
<nobody> imode, interesting
<nobody> meta-magic-programming
fullstack has quit [Ping timeout: 252 seconds]
bruno-_ has joined #ruby
paradisaeidae has joined #ruby
paradisaeidae_ has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
<imode> https://ptpb.pw/lnS7/ruby well, it's a start.
mark_on_the_moon has joined #ruby
mark_on_the_moon has quit [Changing host]
mark_on_the_moon has joined #ruby
paradisaeidae_ has quit [Client Quit]
paradisaeidae has quit [Client Quit]
Joufflu has quit [Read error: Connection reset by peer]
oleo has quit [Quit: irc client terminated!]
Joufflu has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
mark_on_the_moon has quit [Ping timeout: 240 seconds]
<imode> you could get by by storing the methods that are missing in a list, then checking if the method name is in that list. if so, just nix it.
<imode> rather than swapping it out.
xco has quit [Ping timeout: 240 seconds]
<imode> this way you could add new definitions alongside old ones.
fullstack has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<imode> https://ptpb.pw/nCAn/ruby yay, you can take new definitions now.
twillkens has quit [Ping timeout: 248 seconds]
anisha has joined #ruby
mkali has joined #ruby
aupadhye has joined #ruby
Macaveli has joined #ruby
<zenspider> no reason to exit if it isn't a class
<imode> meh. valid point.
<zenspider> something like: o = o.singleton_class unless o.is_a? Module
alex`` has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
ahrs has quit [Remote host closed the connection]
paranoicsan has joined #ruby
MrBusiness3 has joined #ruby
ahrs has joined #ruby
govg has joined #ruby
snickers has joined #ruby
ana_ has joined #ruby
SeepingN has joined #ruby
rikai has quit [Quit: No Ping reply in 180 seconds.]
Roa has quit [Ping timeout: 248 seconds]
leonthemisfit has quit [Ping timeout: 248 seconds]
MrBismuth has quit [Ping timeout: 264 seconds]
leonthemisfit has joined #ruby
leonthemisfit has quit [Changing host]
leonthemisfit has joined #ruby
rikai has joined #ruby
Roa has joined #ruby
inukshuk has quit [Ping timeout: 255 seconds]
eckhardt has joined #ruby
CustosLimen has quit [Ping timeout: 240 seconds]
mark_on_the_moon has joined #ruby
inukshuk has joined #ruby
mark_on_the_moon has quit [Changing host]
mark_on_the_moon has joined #ruby
xco has joined #ruby
roshanavand has joined #ruby
MrBismuth has joined #ruby
MrBusiness3 has quit [Ping timeout: 240 seconds]
mark_on_the_moon has quit [Ping timeout: 248 seconds]
andikr has joined #ruby
xco_ has joined #ruby
ramortegui has joined #ruby
Pisuke has quit [Ping timeout: 246 seconds]
xco has quit [Ping timeout: 240 seconds]
xco_ is now known as xco
DTZUZO has quit [Ping timeout: 240 seconds]
CrazyEddy has quit [Remote host closed the connection]
Pisuke has joined #ruby
enterprisey has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
conta has joined #ruby
Ishido has joined #ruby
CrazyEddy has joined #ruby
fullstack has quit [Ping timeout: 246 seconds]
fullstack has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nrdb has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
TomyWork has joined #ruby
CrazyEddy has quit [Ping timeout: 246 seconds]
Neo95 has joined #ruby
SteenJobs_ has joined #ruby
roshanavand has quit [Quit: roshanavand]
alex``` has joined #ruby
alex``` is now known as alexherbo2
runescape07rsps has quit [Quit: Leaving]
enterprisey has quit [Remote host closed the connection]
Neo95 has quit [Ping timeout: 240 seconds]
alexherbo2 is now known as alex```
houhoulis has joined #ruby
CrazyEddy has joined #ruby
roshanavand has joined #ruby
mtkd has quit []
mtkd has joined #ruby
Mon_Ouie has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has joined #ruby
anisha_ has joined #ruby
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
SeepingN has joined #ruby
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
claudiuinberlin has joined #ruby
Guest40 has joined #ruby
Guest40 has quit [Client Quit]
aihwh has joined #ruby
Guest40 has joined #ruby
<aihwh> hello everyone, I have a problem with an array in Ruby
Guest40 has quit [Client Quit]
Guest40 has joined #ruby
claudiuinberlin has quit [Client Quit]
<imode> aihwh: ask and ye shall receive an answer!
<aihwh> https://pastebin.com/xpXN5FcH this is the array
Guest40 has quit [Client Quit]
<aihwh> and in a sec i'll paste my function
<ruby[bot]> aihwh: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8bc1e57f0ddbc020bae1bb93ca549556
<ruby[bot]> aihwh: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<aihwh> uhm
anisha has quit [Ping timeout: 255 seconds]
<aihwh> ty
Guest40 has joined #ruby
<imode> alright, so this is a hash, not an array.
<imode> rather, a hash of hashes.
Guest40 has quit [Client Quit]
bronson has quit [Ping timeout: 255 seconds]
<aihwh> function: https://pastebin.com/ZaTVQDRH sorry for not uploading to git
<ruby[bot]> aihwh: as I told you already, please use https://gist.github.com
ta_ has joined #ruby
<aihwh> imode: hm, yes
<aihwh> whenever i try to run the ruby script I get this error: `get_market_summary': undefined method `blank?' for nil:NilClass (NoMethodError)
Mon_Ouie has quit [Ping timeout: 248 seconds]
<aihwh> i searched on Google and unique solution to this do not exists
<aihwh> but from what i've read, i understood it is related probably with (deprecated?) ruby versions? and i shall use "try" / "present?" instead?
<imode> aihwh: there's not much I can say without more code. for example, I need to see get_url and call_api.
<aihwh> to use data from that hash
<aihwh> imode: oki, hold up a sec
<aihwh> this is get_url https://pastebin.com/gXW5bh72
<ruby[bot]> aihwh: as I told you already, please use https://gist.github.com
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<aihwh> just reinstalled a new version of manjaro and keyboard layout isn't set
<aihwh> it's underscore, not "-"
<PacificSalmon> linux life
guille-moe has joined #ruby
<aihwh> yup
fabio_ros has joined #ruby
xco has quit [Quit: xco]
<PacificSalmon> sorry. but first pastebin has no reference to get_market_summary. the gist is different code. can you paste one contained example to gist please
<PacificSalmon> URIs[params[:api_type].to_sym][params[:action].to_sym]
<PacificSalmon> don't do this
<PacificSalmon> to_sym on dynamic/user input
mark_66 has joined #ruby
aufi has joined #ruby
<PacificSalmon> on ruby 1.9 it's a security problem. on ruby 2.X+ (dont know what point release) it's less of a problem but still not a good idea
<aihwh> i see, thanks for the heads up, i'll modify
<PacificSalmon> where does the NoMethodError come from
tvw has joined #ruby
<aihwh> script.rb:147:in `get_market_summary': undefined method `blank?' for nil:NilClass (NoMethodError)
<PacificSalmon> ah
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<PacificSalmon> sorry i dont know. you don't call that method specifically. and get_api is still on pastebin. if you want the best help then don't make it so hard to read your code
Fysicus has quit [Quit: The Truth Is Just An Excuse For A Lack Of Imagination]
claudiuinberlin has joined #ruby
<aihwh> hm, PacificSalmon: what do you mean get_api?
<aihwh> call_api?
<imode> aihwh: show us where blank? is called.
armyriad has quit [Ping timeout: 240 seconds]
<PacificSalmon> here there is call to get_url: https://gist.github.com/anonymous/3d1c5fd2af37b454a86d8f01fb267b98 then get_url is on the pastebin
<PacificSalmon> it's confusing
Mon_Ouie has joined #ruby
guille-moe has quit [Quit: guille-moe]
Dimik has quit [Ping timeout: 240 seconds]
Burgestrand has joined #ruby
<aihwh> imode: i don't understand..
<PacificSalmon> thanks but issue is none of these examples call .blank?, & your examples aren't standalone. you are making it very diffilcult to help you
<aihwh> i'm sorry :)
<PacificSalmon> it's most likely a simple 1 line fix
<aihwh> i've modified the script..
<aihwh> PacificSalmon: probably
<aihwh> it's not .blank?
<aihwh> it'
<aihwh> it's .first
<aihwh> reuploading again
<aihwh> PacificSalmon: let me upload the whole code
<PacificSalmon> ok
<imode> yes please.
<PacificSalmon> even stacktrace
<PacificSalmon> stacktrace would be very useful
<aihwh> require "bittrex" is not mandatory
<PacificSalmon> summary = call_api(market_summary_url).first
<aihwh> you don't have to download it
<PacificSalmon> call_api is returning nil
<aihwh> PacificSalmon: yes, that's the problem...
<aihwh> it's returning a false value
<aihwh> but everything seems to be ok
armyriad has joined #ruby
<PacificSalmon> parsed_body["result"] if parsed_body["success"]
armyriad has quit [Remote host closed the connection]
<PacificSalmon> parsed_body["success"] is probably false
<PacificSalmon> so nil is being returned silently there
<aihwh> i see
<aihwh> let me show you the whole error
<PacificSalmon> you should fix call_api
<PacificSalmon> all your code expects it to not return nil
<PacificSalmon> raise an error, see why it failed
supriyanto has joined #ruby
armyriad has joined #ruby
<aihwh> if clicking on that link and add a comma
<aihwh> you will see the output is false
<PacificSalmon> your API call has failed
<aihwh> if clicking on without the comma, output > true
<PacificSalmon> you need to handle that
<aihwh> ok
<aihwh> i'm on it
Mon_Ouie has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
Bish has quit [Ping timeout: 252 seconds]
huyderman has joined #ruby
FahmeF has joined #ruby
<aihwh> hm
<aihwh> url = BASE_URL + URIs[params[:api_type].to_sym][params[:action].to_sym]
Bish has joined #ruby
<aihwh> what if get_url is actually the one with problems?
<aihwh> PacificSalmon: imode
<aihwh> can't see anything wrong for call_api
numbdewd has quit [Ping timeout: 240 seconds]
<PacificSalmon> follow this path: L251 => L147. L147 is where you fail. It's because call_api is returning nil, since result['success'] is false. it's not really a ruby problem. you are not using their API properly. but you should raise an error instead of silently returning nil. so you can easily see the problem.
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<PacificSalmon> >> "1" if false
<ruby[bot]> PacificSalmon: # => nil (https://eval.in/854793)
<PacificSalmon> you're doing that.
<aihwh> i understand..
ovaltine has quit [Ping timeout: 246 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
houhoulis has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
xall has joined #ruby
ovaltine has joined #ruby
<aihwh> PacificSalmon:
<aihwh> puts (parsed_body["success"] ? "Success".green : "Failed".red)
<aihwh> click on the second link to see it failing
claudiuinberlin has quit [Ping timeout: 240 seconds]
<matthewd> aihwh: Change your script to introduce a deliberate error
<PacificSalmon> both work for me
<aihwh> PacificSalmon: second one? add a comma to it at the end of link
<PacificSalmon> ah. yeah. fails
<aihwh> yes..
<aihwh> i think the problem is with get_url
kreantos has joined #ruby
<matthewd> If the file you're looking at isn't calling #blank?, and the error is complaining about code calling #blank?, ISTM the most likely explanation is that you aren't looking at the same code that's being executed
<PacificSalmon> ` puts (parsed_body["success"] ? "Success".green : "Failed".red)` it's not a good idea. you should raise an exception, then when handling the exception in a rescue block, print a message like that. the point is you may you not be able to continue because of this error. so printing a message, then continuing is not solving the issue. you'll just run into a weirder error later.
CustosLimen has joined #ruby
<aihwh> i see..
<aihwh> oh, i need 5 minutes to clear my head, then i'll look into some documentation
dionysus69 has quit [Remote host closed the connection]
<aihwh> thank you :)
<PacificSalmon> welcome
dionysus69 has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
charliesome has joined #ruby
mikecmpbll has joined #ruby
charliesome has quit [Ping timeout: 248 seconds]
frozengeek has joined #ruby
frozengeek has quit [Client Quit]
Mon_Ouie has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
ams__ has joined #ruby
mim1k has joined #ruby
imode has quit [Ping timeout: 264 seconds]
<aihwh> PacificSalmon:
<aihwh> Fetching Market Summary...
<aihwh> ["https://bittrex.com/api/v1.1/public/getmarketsummary?market=BTC-BAT,", {"success"=>false, "message"=>"INVALID_MARKET", "result"=>nil}]
<aihwh> Failed
<aihwh> so the error appears in call_api
tomphp has joined #ruby
<aihwh> i have a q: is the comma added to the link a normal thing in ruby?
<aihwh> matthewd:
tomphp has quit [Client Quit]
tomphp has joined #ruby
<aihwh> what if is added here because of the hashes?
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
<matthewd> I'm not interested in debugging code you haven't convinced me matches what you're running
cconstantine has quit [Ping timeout: 240 seconds]
frozengeek has joined #ruby
<aihwh> ok, could you explain me how to use raise Exception for handling errors instead of printing messages?
paranoicsan has left #ruby [#ruby]
<matthewd> First, add a puts to the top of the file, run it, and prove you see that output
<aihwh> ok
frozengeek has quit [Client Quit]
frozengeek has joined #ruby
funkytwig has quit [Remote host closed the connection]
roshanavand has quit [Quit: roshanavand]
marr has joined #ruby
rabajaj has joined #ruby
<aihwh> matthewd: i did, it is not working and can't see the output
<aihwh> the error is also different
rabajaj has quit [Client Quit]
<matthewd> gist the code and the error
rabajaj has joined #ruby
vayan has quit [Ping timeout: 248 seconds]
djbkd has joined #ruby
Siyfion has joined #ruby
vayan has joined #ruby
<matthewd> Okay, so the right file is being executed
sepp2k has joined #ruby
<matthewd> As the error says, there's a bug on line 74, so fix that
<aihwh> ok
<matthewd> The comma in the URL is there because you're putting it there, in your command line
<aihwh> matthewd: i see..
<matthewd> @currency is "BAT,"
<aihwh> oh
<aihwh> so it was a typing error
xall_ has joined #ruby
<aihwh> matthewd: thank you so much! :)
<aihwh> i fixed the error on line 74, gave the correct parameters to command
<aihwh> and now everything seems to be working
<matthewd> Still doesn't explain why your previous 'blank?' error was occurring, when you don't call such a method :/
xall has quit [Ping timeout: 252 seconds]
frozengeek has quit [Quit: frozengeek]
<aihwh> it was nothing, when searching on google/stackoverflow for my error
evie_hammond has quit [Ping timeout: 260 seconds]
frozengeek has joined #ruby
<aihwh> i came across answers stating that getting datas from an array, could be done with present?
<aihwh> i put blank? there just as a test, the error was actually "first", not "blank" nor "present"
<aihwh> bittrex_bot.rb:147:in `get_market_summary': undefined method `first' for nil:NilClass (NoMethodError)
<aihwh> but i seems it got past that
<matthewd> Ah, so you wasted an hour and a half because you lied
<aihwh> indeed, i was decieved and not looking at the correct errors..
<aihwh> matthewd: ha :D
umaaji has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
<PacificSalmon> aihwh: blank? comes from activesupport. it's not part of standard ruby. same for present?. so that's most likely why those methods never worked.
<aihwh> PacificSalmon: i see.. thank you very much :)
<aihwh> both of you, for showing interest and having patience with me
<PacificSalmon> for your script i think i would raise for cases where API fails, print an error and stack trace THEN exit(false) at the end. don't try to recover, since it's interactive anyway
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
lxsameer has joined #ruby
<PacificSalmon> but not sure what works best for you. your script only looks good for happy paths.
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
ramfjord has joined #ruby
benjen has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
Beams has joined #ruby
kassav_ has joined #ruby
benjen has joined #ruby
SteenJobs_ has quit [Quit: SteenJobs_]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
SteenJobs_ has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
cadillac_ has quit [Ping timeout: 240 seconds]
SteenJobs_ has quit [Quit: SteenJobs_]
bronson has joined #ruby
cadillac_ has joined #ruby
Qchmqs__ has joined #ruby
rabajaj has quit [Quit: Leaving]
Qchmqs__ is now known as Qchmqs
bronson has quit [Ping timeout: 260 seconds]
ana_ has quit [Remote host closed the connection]
jaruga_________ has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
frozengeek has quit [Read error: Connection reset by peer]
frozengeek has joined #ruby
frozengeek has quit [Client Quit]
ayonkhan has joined #ruby
jinie has joined #ruby
frozengeek has joined #ruby
frozengeek has quit [Client Quit]
ayonkhan has quit [Client Quit]
ana_ has joined #ruby
ferr has joined #ruby
dc_99 has joined #ruby
dc_99 has quit [Client Quit]
paranoicsan has joined #ruby
mtkd has quit []
romankapitonov has joined #ruby
nobody has quit [Ping timeout: 248 seconds]
pandaant has joined #ruby
djbkd has joined #ruby
<darix> PacificSalmon: be optimistic. things will never fail!
Paraxial has joined #ruby
agent_white has quit [Quit: brb]
ShekharReddy has joined #ruby
Mortomes|Work has joined #ruby
Paraxial has quit [Remote host closed the connection]
agent_white has joined #ruby
akkad has quit [Excess Flood]
Paraxial has joined #ruby
drcode has joined #ruby
ShalokShalom_ has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShalokShalom has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Neo95 has joined #ruby
akkad has joined #ruby
ur5us has quit [Remote host closed the connection]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
xall_ has quit [Quit: xall_]
Neo95 has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 248 seconds]
mark_on_the_moon has joined #ruby
hutch34 has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
frozengeek has joined #ruby
supriyanto has quit [Quit: Leaving]
tekk has quit [Quit: ZNC - http://znc.in]
Zaab1t has joined #ruby
<Zaab1t> Hi there. How's ruby doing on the asyncronous (hype)front?
ramfjord has joined #ruby
ramfjord_ has joined #ruby
numbdewd has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
uZiel has joined #ruby
<matthewd> Zaab1t: About twelve, I think
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
mark_on_the_moon has quit [Ping timeout: 252 seconds]
Defenestrate has joined #ruby
apparition47 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
frozengeek has quit [Quit: frozengeek]
frozengeek has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
ramfjord_ has quit [Ping timeout: 246 seconds]
ramfjord has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
xco has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Ishido has quit [Remote host closed the connection]
akkad has quit [Excess Flood]
Ishido has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
Stickwalker has joined #ruby
Stickwalker has quit [Client Quit]
xco has quit [Quit: xco]
akkad has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
Mortomes|Work has quit [Ping timeout: 260 seconds]
paranoicsan is now known as paranoicsan[Away
frozengeek has quit [Quit: frozengeek]
crst has quit [Remote host closed the connection]
frozengeek has joined #ruby
sagax has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
houhoulis has joined #ruby
Neo95 has joined #ruby
paranoicsan[Away is now known as paranoicsan
ramfjord has joined #ruby
ramfjord_ has joined #ruby
pandaant has quit [Quit: Lost terminal]
ramfjord_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
Mon_Ouie has joined #ruby
Neo95 has quit [Ping timeout: 260 seconds]
Miron has quit [Ping timeout: 255 seconds]
cats has quit [Ping timeout: 255 seconds]
TomyWork has quit [Remote host closed the connection]
cats has joined #ruby
Miron has joined #ruby
TomyWork has joined #ruby
WebDawg has quit [Ping timeout: 240 seconds]
WebDawg has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
mikecmpb_ has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
quobo has joined #ruby
ayonkhan has joined #ruby
t-recx has joined #ruby
Neo95 has joined #ruby
gheegh has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
karmayogi23 has joined #ruby
alex``` has quit [Quit: WeeChat 1.9]
alex`` has quit [Quit: WeeChat 1.9]
aihwh has quit [Quit: Leaving.]
aihwh has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
paranoicsan is now known as paranoicsan[Away
houhoulis has quit [Remote host closed the connection]
Neo95 has quit [Ping timeout: 240 seconds]
alex`` has joined #ruby
DTZUZO has joined #ruby
ayonkhan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mb____ has joined #ruby
paranoicsan[Away is now known as paranoicsan
mb____ has left #ruby [#ruby]
bruno-_ has quit [Ping timeout: 252 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kreantos_ has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
KeyJoo has joined #ruby
kreantos has quit [Ping timeout: 240 seconds]
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
numbdewd has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 246 seconds]
kobain has joined #ruby
ramfjord_ has quit [Ping timeout: 246 seconds]
tomphp has joined #ruby
Pumukel has quit [Ping timeout: 246 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
jameser has joined #ruby
Neo95 has joined #ruby
nobody has joined #ruby
crst has joined #ruby
Tempesta has quit [Quit: See ya!]
__Yiota has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nobody has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
sylario has joined #ruby
Neo95 has quit [Ping timeout: 252 seconds]
nadir has quit [Quit: Connection closed for inactivity]
snickers has quit [Ping timeout: 248 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
Neo95 has joined #ruby
tomphp has quit [Client Quit]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
WeiJunLi has joined #ruby
ornerymoose has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
ornerymoose has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
dn` has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 240 seconds]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
someuser has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gheegh has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k_ is now known as mim1k
Neo95 has quit [Ping timeout: 255 seconds]
gheegh has quit [Client Quit]
ldnunes has joined #ruby
gheegh has joined #ruby
Tempesta has joined #ruby
gheegh has quit [Client Quit]
joast has quit [Quit: Leaving.]
gheegh has joined #ruby
gheegh has quit [Client Quit]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
gheegh has joined #ruby
gheegh has quit [Client Quit]
joast has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
ramfjord_ has quit [Ping timeout: 255 seconds]
Neo95 has joined #ruby
gheegh has joined #ruby
gheegh has quit [Client Quit]
gheegh has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
uZiel has quit [Ping timeout: 268 seconds]
frozengeek has quit [Read error: Connection reset by peer]
frozengeek has joined #ruby
gheegh has quit [Client Quit]
dn` has joined #ruby
ShalokShalom_ is now known as ShalokShalom
gheegh has joined #ruby
joast has quit [Quit: Leaving.]
WeiJunLi has quit [Remote host closed the connection]
gheegh has quit [Client Quit]
ta_ has quit [Remote host closed the connection]
bruno- has quit [Read error: Connection reset by peer]
gheegh has joined #ruby
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
gheegh has quit [Client Quit]
tsglove has quit [Quit: Leaving]
Defenestrate has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
gheegh has joined #ruby
bruno- has joined #ruby
gheegh has quit [Client Quit]
tomphp has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
gheegh has joined #ruby
xco has joined #ruby
riton has joined #ruby
tsglove has joined #ruby
<riton> hi guys, I need to use Etc.getpwnam() function in Ruby 2.x. I'm wondering. Is this function thread safe ?
paranoicsan is now known as paranoicsan[Away
ramfjord_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
akkad has quit [Excess Flood]
aupadhye has quit [Ping timeout: 240 seconds]
kn-928 has joined #ruby
<dminuoso> riton: Generally ruby does not have thread safety. A few specialties are implicitly thread safe due to how the GVL is used though.
paranoicsan[Away is now known as paranoicsan
<dminuoso> riton: What race condition are you worried about?
futilegames has joined #ruby
futilegames has left #ruby [#ruby]
<riton> the one related to the use of static buffers in the gLibc
<SpComb> but that function will be locked by the GVL
<riton> SpComb: where do you see that ?
<matthewd> SpComb: Only one instance of ruby-land `Etc.getpwnam` could be calling it at one time, but another unlocked thread could call the same libc function
<SpComb> it's an MRI C function. Between the call to getpwnam and setup_passwd (which I assume copies the strings), it's implicitly locked against any other ruby threads
<SpComb> yeah, not safe against other non-ruby threads, if that's a concern
akkad has joined #ruby
<riton> SpComb: my concern is only about ruby threads
<riton> SpComb: I'm trying to understand what you've just said by reading the link you pointed out
bruno- has quit [Read error: Connection reset by peer]
<matthewd> Oh, then yeah, you can trust it to the GVL
bruno- has joined #ruby
aufi has quit [Ping timeout: 248 seconds]
oleo has joined #ruby
nadir has joined #ruby
<riton> SpComb: a "quite important" detail is that I'm using JRuby (in PuppetServer)
<SpComb> riton: then you can ignore all of those links
<dminuoso> riton: JRuby has such lock. So you need to implement mutual exclusion yourself.
<dminuoso> *no such lock
<riton> ok
<riton> SpComb: dminuoso: thanks !
<matthewd> Then you'd need to check the jruby source, but it seems safe to assume that whatever underlying Java API they're using to implement it is already threadsafe
<SpComb> yeah, I would be surprised if the jruby implementation of that didn't use getpwnam_r
bruno- has quit [Read error: Connection reset by peer]
<dminuoso> SpComb: Checkout #jruby - its a good place to ask jruby specific questions
ramfjord has joined #ruby
ramfjord_ has joined #ruby
bruno- has joined #ruby
<riton> the method is synchronized so (if my Java memory is still here) it's thread safe
<dminuoso> synchronized
<dminuoso> riton: yup
<dminuoso> riton: So you gain the same guarantee as MRI it would seem
jaruga_________ is now known as jaruga
bruno- has quit [Read error: Connection reset by peer]
<riton> dminuoso: SpComb : matthewd : thanks for your time
riton has left #ruby ["WeeChat 1.9"]
ramfjord_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
<SpComb> so I'm surprised
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
paranoicsan is now known as paranoicsan[Away
dionysus69 has quit [Ping timeout: 240 seconds]
Guest40 has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
mtkd has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
paranoicsan[Away is now known as paranoicsan
bruno- has joined #ruby
roshanavand has joined #ruby
twillkens has joined #ruby
Guest40 has quit [Ping timeout: 240 seconds]
quobo has quit [Quit: Connection closed for inactivity]
bruno- has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
ayonkhan has joined #ruby
Burgestrand has quit [Quit: Closing time!]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
crst has quit [Remote host closed the connection]
bruno- has joined #ruby
ianfleeton has joined #ruby
ianfleeton has quit [Client Quit]
bruno- has quit [Read error: Connection reset by peer]
ianfleeton has joined #ruby
ferr has quit [Quit: WeeChat 1.9]
jameser has joined #ruby
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
Qchmqs has quit [Remote host closed the connection]
skweek has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
bruno- has joined #ruby
ana_ has quit [Quit: Leaving]
andikr has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 240 seconds]
govg has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
mark_66 has quit [Remote host closed the connection]
govg has quit [Ping timeout: 240 seconds]
jameser has quit [Ping timeout: 240 seconds]
logicscience has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
govg has joined #ruby
dionysus69 has joined #ruby
bruno- has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
nobody has joined #ruby
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
paranoicsan has quit [Quit: paranoicsan]
conta has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
bruno- has joined #ruby
nobody has quit [Ping timeout: 240 seconds]
griffindy has joined #ruby
griffindy has quit [Client Quit]
anisha_ has quit [Ping timeout: 255 seconds]
m27frogy has joined #ruby
ramfjord_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 260 seconds]
bruno- has quit [Read error: Connection reset by peer]
Mon_Ouie has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
crankharder has quit [Ping timeout: 248 seconds]
zacts has quit [Quit: WeeChat 1.9]
FahmeF has quit []
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
goyox86_ has joined #ruby
zacts has joined #ruby
kn-928 has quit [Ping timeout: 252 seconds]
m27frogy has quit [Ping timeout: 260 seconds]
m27frogy has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
hutch34 has joined #ruby
aufi has joined #ruby
<PacificSalmon> "Generally ruby does not have thread safety." .. is this really true? imo all core data structures and even stdlib ones (Set etc) should make every effort to be thread safe out of the box, so the programmer doesn't have to worry about it.
ramfjord has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 246 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
<matthewd> Depends how you define a few of those words, but basically yes
<PacificSalmon> so Array and so on are all non-threadsafe?
<matthewd> Again, it depends, but yes
<PacificSalmon> do you have an example where it depends, or can elaborate more please
<matthewd> Hash (and Array, I believe) is not threadsafe by spec, but is safe in practice in MRI, because of the GVL
nowhere_man has quit [Read error: Connection reset by peer]
<PacificSalmon> so, then, MRI has thread safety via the GVL for core ruby data structures. is that true?
<matthewd> So concurrent reads/writes can't actually crash MRI, but the same operations on a truly multithreaded runtime like jruby are allowed to misbehave (while not making those implementations non-conformant)
<PacificSalmon> by can't crash you mean can't race condition?
<matthewd> Yes, though I was more emphasising the fact that other runtimes can crash-crash
<matthewd> As in segfault, AIUI
<PacificSalmon> okay. well, good to know. then only jruby/rbx have a need to care about thread safety around core structures. and maybe they take their own steps to solve that, or are you on your own?
romankapitonov has quit [Quit: Textual IRC Client: www.textualapp.com]
snickers has joined #ruby
<PacificSalmon> i like the model where core data structures are safe by the default, so i guess i prefer MRI's model in this specific example.
<matthewd> It's my understanding that Word Of God says they're allowed to crash, and MRI's apparent thread-safety is a side effect / implementation detail, which could go away
<dminuoso> PacificSalmon: No, MRIs GVL is not a strength. Its entirely a weakness.
<PacificSalmon> hm. okay.
<dminuoso> PacificSalmon: Ruby shouldn't need a lock to protect its internals, JRuby doesn't for example.
<PacificSalmon> iirc it's mostly for C extension authors they do not want to change this. as well as not having to deal with complexities of threaded programming.
<dminuoso> PacificSalmon: This lock comes with a steep price: At no moment may two ruby threads of the same process execute ruby-land things.
<PacificSalmon> sure.
tomphp has joined #ruby
<dminuoso> Which means that most benefits of threads are limited to blocking I/O.
<PacificSalmon> they're still concurrent at least.
<dminuoso> But ruby-land methods dont execute atomically, which means you still have no benefits.
sepp2k has joined #ruby
<matthewd> Even C-land methods don't execute atomically in practice
snickers has quit [Client Quit]
tomphp has quit [Client Quit]
roshanavand has quit [Quit: roshanavand]
SeepingN has joined #ruby
<PacificSalmon> not sure. i personally don't have much of a problem with rubys threaded implementation but only ever used them in Fiber-like way.
orbyt_ has joined #ruby
tomphp has joined #ruby
apparition47 has quit [Quit: Bye]
nowhere_man has joined #ruby
conta3 has joined #ruby
roshanavand has joined #ruby
<PacificSalmon> there's also Kernel.fork, and CoW GC. i know it's not threads, but still something if on Unix-y OS.
<PacificSalmon> which jruby cannot do :)
tomphp has quit [Client Quit]
milardovich has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
spheric has joined #ruby
belmoussaoui__ has quit [Quit: belmoussaoui__]
theRealGent has joined #ruby
<PacificSalmon> thanks for the info. i will probably mutex all global data structures i have, for jruby&rbx.
BTRE has quit [Quit: Leaving]
tomphp has joined #ruby
theRealGent has quit [Remote host closed the connection]
BTRE has joined #ruby
FrostCandy has joined #ruby
ramfjord_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
kassav_ has quit [Quit: kassav_]
ShalokShalom has quit [Ping timeout: 248 seconds]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd> PacificSalmon: Better to use Concurrent::{Array,Hash,Map} -- they have the locks they need, but only where needed
bruno- has joined #ruby
<PacificSalmon> it's not an option in my case. too much of a dependency. i hope some of those changes go back into official ruby instead.
Mon_Ouie has joined #ruby
<PacificSalmon> but i'll see if a copy&paste just what i need. cheers
<matthewd> You're going to have problems when they finish moving more of stdlib out into gems then, I guess
<PacificSalmon> i don't think so... the stdlib will still be the stdlib, but distribution method will be different.
bruno- has quit [Read error: Connection reset by peer]
<matthewd> (as concurrent-ruby is small, I take it "too much" is actually "a dependency at all")
frozengeek has quit [Quit: frozengeek]
<PacificSalmon> ok, in another way: i don't want a third party library to solve this problem for me. i would make efforts to use thread-local state, or a mutex instead.
<PacificSalmon> or some part of Ruby. it's nothing against concurrent-ruby. i just don't want to depend on it in the project where this stuff matters.
cadillac_ has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 260 seconds]
ShalokShalom has joined #ruby
<PacificSalmon> interestinh
cadillac_ has joined #ruby
mim1k has joined #ruby
eyda|mon has quit [Quit: WeeChat 1.7.1]
WeiJunLi has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
ozcanesen has joined #ruby
segy has quit [Read error: Connection reset by peer]
fabio_ros has quit [Quit: Leaving.]
gheegh has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 260 seconds]
Beams has quit [Quit: .]
segy has joined #ruby
<darix> PacificSalmon: instead you reimplemenet all the things ;)
milardovich has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 248 seconds]
<PacificSalmon> but i'm only interested in `Set`. on JRuby it looks very simple ('include JRuby::Synchronized'). rbx i dunno what's going on there. could be a lot of stuff to copy over.
uZiel has joined #ruby
mikecmpb_ has quit [Ping timeout: 248 seconds]
gothicsouth has joined #ruby
<PacificSalmon> nothing to do with NIH. the context is people already complain about too many dependencies of proj i want to add it to. i don't want to make it worse. and in my case, it looks overkill to depend on concurrent-jruby in its entireity.
<PacificSalmon> concurrent-ruby*
kreantos_ has quit [Remote host closed the connection]
aufi has quit [Ping timeout: 248 seconds]
kreantos has joined #ruby
<darix> PacificSalmon: i have the opposite problem here... people here reimplement all the stuff in a barely enough fashion ;)
kreantos_ has joined #ruby
<PacificSalmon> hmm. ok
<matthewd> I'd expect the average many-dep-tree project to already have concurrent-ruby (or its predecessor, threadsafe) somewhere in there
<PacificSalmon> im not an app. i'm a library
<PacificSalmon> and people say, too many deps. can you cut them. all the time
segy has quit [Read error: Connection reset by peer]
<matthewd> Yeah, I'm not unfamiliar with such complaints
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kreantos has quit [Ping timeout: 240 seconds]
kreantos_ has quit [Ping timeout: 260 seconds]
<PacificSalmon> yeah. quite strange. it's common in npm land to depend on a gazillion things, and for a 'package' to just be a function.
segy has joined #ruby
<PacificSalmon> minimalists
ramfjord has joined #ruby
ramfjord_ has joined #ruby
<workmad3> PacificSalmon: and just look at the fun the npm community had with that with lpad :)
<darix> PacificSalmon: you mean like gitlab nowadays ...87mb checkedout from their git ... 188MB JS libraries pulled via yarn. (and that is only production stuff no dev stuff)
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<PacificSalmon> crazy
frozengeek has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
SeepingN has joined #ruby
milardovich has joined #ruby
cconstantine has joined #ruby
TheLemonMan has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 268 seconds]
ayonkhan_ has joined #ruby
yokel has quit [Remote host closed the connection]
<TheLemonMan> hello, I'm trying to slurp the output of the 'ag' tool from a ruby script but for somehow the stdout is always empty...here's my script https://gist.github.com/LemonBoy/ac09aece2714f01a3ee61f11938c16c7
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
<TheLemonMan> strace shows no write() at all which is pretty weird
yokel has joined #ruby
ayonkhan has quit [Ping timeout: 246 seconds]
WeiJunLi has quit [Ping timeout: 252 seconds]
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
phinxy has joined #ruby
<PacificSalmon> is it waiting for input maybe?
konsolebox has quit [Ping timeout: 252 seconds]
<TheLemonMan> not really
_sfiguser has joined #ruby
xco has left #ruby [#ruby]
quobo has joined #ruby
ramfjord_ has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
konsolebox has joined #ruby
belmoussaoui has joined #ruby
mim1k has joined #ruby
anisha has joined #ruby
conta1 has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
anisha has quit [Ping timeout: 248 seconds]
bronson has joined #ruby
<TheLemonMan> meh, 'ag' was being a dick since stdin was connected to a pipe
conta1 has quit [Ping timeout: 255 seconds]
TheLemonMan has left #ruby [#ruby]
<PacificSalmon> ok
joast has joined #ruby
ramfjord_ has joined #ruby
ramfjord has joined #ruby
bronson has quit [Ping timeout: 255 seconds]
skweek has quit [Ping timeout: 248 seconds]
gothicsouth has joined #ruby
saltsa has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
aihwh has quit [Ping timeout: 240 seconds]
zachk has joined #ruby
ramfjord_ has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
joast has quit [Ping timeout: 248 seconds]
gusrub has joined #ruby
t-recx has quit [Ping timeout: 240 seconds]
kn-928 has joined #ruby
belmoussaoui has quit [Quit: belmoussaoui]
belmoussaoui has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
kreantos has joined #ruby
ayonkhan_ has quit [Read error: Connection reset by peer]
imode has joined #ruby
kn-928 has quit [Ping timeout: 246 seconds]
ayonkhan has joined #ruby
_sfiguser has joined #ruby
kreantos has quit [Ping timeout: 248 seconds]
phinxy has quit [Quit: Leaving]
belmoussaoui has quit [Read error: Connection reset by peer]
gusrub has quit [Remote host closed the connection]
AndChat182964 has joined #ruby
<AndChat182964> Anyone looking for assistant?
<AndChat182964> I want to learn code by work
kmhn has quit [Remote host closed the connection]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
joast has joined #ruby
__Yiota has joined #ruby
ramfjord_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
<PacificSalmon> AndChat182964: i would recommend to try contributing to an open source project instead, but for a more 1-1 scenario maybe search twitter for 'ruby mentors', or 'remote pair programming'.
konsolebox has quit [Ping timeout: 240 seconds]
goyox86_ has quit [Ping timeout: 240 seconds]
jaruga has quit [Quit: jaruga]
t-recx has joined #ruby
Azure has joined #ruby
TomyLobo has joined #ruby
ledestin has joined #ruby
goyox86_ has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
FastJack has quit [Remote host closed the connection]
konsolebox has joined #ruby
ledestin has quit [Ping timeout: 240 seconds]
twillkens has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
goyox86_ has quit [Quit: goyox86_]
konsolebox has quit [Ping timeout: 240 seconds]
mkali has quit [Remote host closed the connection]
funkytwig has joined #ruby
skweek has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
twillkens has quit [Ping timeout: 240 seconds]
mkali has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
konsolebox has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
enterprisey has quit [Remote host closed the connection]
maryo has joined #ruby
lxsameer has joined #ruby
ianfleeton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ianfleeton has joined #ruby
Ishido has quit [Remote host closed the connection]
zautomata has joined #ruby
armyriad has quit [Quit: Leaving]
FastJack has joined #ruby
armyriad has joined #ruby
Ishido has joined #ruby
SeepingN has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
JeanCarloMachado has joined #ruby
goyox86_ has joined #ruby
AnoHito has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
skweek has joined #ruby
cdg has joined #ruby
sonOfRa_ has joined #ruby
wsmoak_ has joined #ruby
[diecast]__ has joined #ruby
jimeh_ has joined #ruby
olivierjanss_ has joined #ruby
solidsnack_ has joined #ruby
andersh_ has joined #ruby
Tony-St4rk_ has joined #ruby
pwillard_ has joined #ruby
jxf_ has joined #ruby
caw__ has joined #ruby
SteenJobs_ has joined #ruby
hlmjr has joined #ruby
kmhn has joined #ruby
Rush has joined #ruby
rikai_ has joined #ruby
tvl has joined #ruby
ur5us has joined #ruby
ovaltine1 has joined #ruby
claw_ has joined #ruby
s00pcan_ has joined #ruby
genpaku_ has joined #ruby
pavelz_ has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
tvw has quit [Remote host closed the connection]
mkali has quit [Quit: mkali]
ramfjord_ has quit [Ping timeout: 255 seconds]
jsrn_ has joined #ruby
universal has joined #ruby
rgr has joined #ruby
rcs_ has joined #ruby
brucebag_ has joined #ruby
soahccc_ has joined #ruby
Kilobyte22 has joined #ruby
web_nanners has joined #ruby
Zarthus_ has joined #ruby
Bilge- has joined #ruby
ikopico_ has joined #ruby
saneax___ has joined #ruby
sonne_ has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
WebDawg has quit [*.net *.split]
ovaltine has quit [*.net *.split]
rikai has quit [*.net *.split]
s00pcan has quit [*.net *.split]
claw has quit [*.net *.split]
pavelz has quit [*.net *.split]
kies has quit [*.net *.split]
snapcase has quit [*.net *.split]
AnoHito_ has quit [*.net *.split]
saneax has quit [*.net *.split]
spider-mario has quit [*.net *.split]
sonne has quit [*.net *.split]
herbmillerjr has quit [*.net *.split]
genpaku has quit [*.net *.split]
Tony-St4rk has quit [*.net *.split]
pwillard has quit [*.net *.split]
[diecast] has quit [*.net *.split]
rcs has quit [*.net *.split]
typeVoid has quit [*.net *.split]
Zarthus has quit [*.net *.split]
webnanners has quit [*.net *.split]
olivierjanss has quit [*.net *.split]
brucebag has quit [*.net *.split]
reu has quit [*.net *.split]
tobiasvl has quit [*.net *.split]
Giphy[m] has quit [*.net *.split]
Bilge has quit [*.net *.split]
ikopico has quit [*.net *.split]
velu_aon[m] has quit [*.net *.split]
klaas has quit [*.net *.split]
universa1 has quit [*.net *.split]
sonOfRa has quit [*.net *.split]
qsx has quit [*.net *.split]
caw_ has quit [*.net *.split]
jimeh has quit [*.net *.split]
solidsnack has quit [*.net *.split]
andersh has quit [*.net *.split]
wsmoak has quit [*.net *.split]
jxf has quit [*.net *.split]
soahccc has quit [*.net *.split]
podman has quit [*.net *.split]
jsrn has quit [*.net *.split]
Kilo`byte has quit [*.net *.split]
Guest54664 has quit [*.net *.split]
brucebag_ is now known as brucebag
Bilge- is now known as Bilge
Zarthus_ is now known as Zarthus
ikopico_ is now known as ikopico
sonOfRa_ is now known as sonOfRa
brucebag has quit [Changing host]
brucebag has joined #ruby
genpaku_ is now known as genpaku
tvl is now known as tobiasvl
Tony-St4rk_ is now known as Tony-St4rk
olivierjanss_ is now known as olivierjanss
reu has joined #ruby
wsmoak_ is now known as wsmoak
andersh_ is now known as andersh
pwillard_ is now known as pwillard
jimeh_ is now known as jimeh
[diecast]__ is now known as [diecast]
solidsnack_ is now known as solidsnack
jxf_ is now known as jxf
JeanCarl1Machado has joined #ruby
WebDawg has joined #ruby
qsx has joined #ruby
mikecmpbll has joined #ruby
FiendKing04 has quit [Ping timeout: 255 seconds]
94KABDDRC has joined #ruby
kn-928 has joined #ruby
ayonkhan_ has joined #ruby
jnollette has quit [Ping timeout: 260 seconds]
dionysus69 has quit [Remote host closed the connection]
nahra` has joined #ruby
justinwe` has joined #ruby
dionysus69 has joined #ruby
cdg has quit [Remote host closed the connection]
armando- has joined #ruby
okdas has quit [Ping timeout: 240 seconds]
justinweiss has quit [Write error: Broken pipe]
knight_ has quit [Write error: Broken pipe]
ahrs has quit [Write error: Broken pipe]
justinmcp has quit [Write error: Broken pipe]
Yxhuvud has quit [Write error: Broken pipe]
Paraxial has quit [Quit: Ping timeout (120 seconds)]
armando has quit [Quit: ZNC 1.7.x-nightly-20170828-c1e80b22 - https://znc.in]
nahra has quit [Remote host closed the connection]
marr has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 252 seconds]
okdas has joined #ruby
okdas has quit [Changing host]
okdas has joined #ruby
Yxhuvud has joined #ruby
jnollette has joined #ruby
Paraxial has joined #ruby
knight_ has joined #ruby
justinmcp has joined #ruby
ahrs has joined #ruby
marr has joined #ruby
milardovich has joined #ruby
94KABDDRC has quit [Ping timeout: 246 seconds]
modin has quit [Ping timeout: 240 seconds]
Lyubo1 has quit [Ping timeout: 240 seconds]
ayonkhan has quit [Ping timeout: 253 seconds]
kies has joined #ruby
FiendKing04 has joined #ruby
typeVoid has joined #ruby
halt has quit [Ping timeout: 240 seconds]
mikeiniowa has quit [Ping timeout: 240 seconds]
daemonwrangler has quit [Ping timeout: 240 seconds]
hfp_work has quit [Ping timeout: 240 seconds]
diegok has quit [Ping timeout: 260 seconds]
bokayio has quit [Ping timeout: 240 seconds]
sagax has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
JeanCarl1Machado has quit [Quit: Lost terminal]
spider-mario has joined #ruby
pavelz_ is now known as pavelz
pavelz has quit [Changing host]
pavelz has joined #ruby
bokayio has joined #ruby
claudiuinberlin has joined #ruby
velu_aon[m] has joined #ruby
daemonwrangler has joined #ruby
halt has joined #ruby
Lyubo1 has joined #ruby
diegok has joined #ruby
PacificSalmon is now known as TastyTrout
hfp_work has joined #ruby
milardovich has quit [Ping timeout: 255 seconds]
ayonkhan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarl1Machado has joined #ruby
zautomata has quit [Ping timeout: 260 seconds]
Giphy[m] has joined #ruby
JeanCarl1Machado has quit [Client Quit]
WeiJunLi has joined #ruby
JeanCarl1Machado has joined #ruby
armyriad has quit [Ping timeout: 252 seconds]
armyriad has joined #ruby
ramfjord has joined #ruby
ramfjord_ has joined #ruby
maryo_ has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
maryo has quit [Ping timeout: 240 seconds]
gothicsouth has joined #ruby
S007 has quit [Ping timeout: 255 seconds]
ramfjord has quit [Ping timeout: 240 seconds]
ramfjord_ has quit [Ping timeout: 240 seconds]
ornerymoose has quit [Quit: ornerymoose]
JeanCarl1Machado has quit [Quit: Lost terminal]
JeanCarl1Machado has joined #ruby
twillkens has joined #ruby
JeanCarl1Machado has quit [Client Quit]
JeanCarloMachado has quit [Quit: Lost terminal]
JeanCarloMachado has joined #ruby
JeanCarloMachado has quit [Client Quit]
S007 has joined #ruby
JeanCarloMachado has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
raynold has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Client Quit]
goyox86_ has quit [Quit: goyox86_]
gothicsouth has joined #ruby
JeanCarloMachado has joined #ruby
JeanCarloMachado has quit [Client Quit]
JeanCarloMachado has joined #ruby
frozengeek has quit [Quit: frozengeek]
JeanCarloMachado has quit [Client Quit]
JeanCarloMachado has joined #ruby
modin has joined #ruby
johnny56 has quit [Quit: johnny56]
Mon_Ouie has quit [Ping timeout: 240 seconds]
SteenJobs_ has quit [Quit: peaceee]
griffindy has joined #ruby
Mon_Ouie has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
nobody has joined #ruby
bronson has joined #ruby
Cohedrin_ has joined #ruby
nobody has quit [Ping timeout: 240 seconds]
Dimik has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 240 seconds]
ged has quit [Read error: Connection reset by peer]
claudiuinberlin has joined #ruby
ged has joined #ruby
ayonkhan has joined #ruby
joelroa has joined #ruby
quobo has joined #ruby
Neo95 has quit [Ping timeout: 246 seconds]
nobody has joined #ruby
kn-928 has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gusrub has joined #ruby
claudiuinberlin has joined #ruby
nobody has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
cdg has joined #ruby
ornerymoose has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
ShekharReddy has quit [Quit: Connection closed for inactivity]
ayonkhan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus70 has joined #ruby
joelroa has quit [Quit: Textual IRC Client: www.textualapp.com]
snapcase has joined #ruby
klaas has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
dionysus70 is now known as dionysus69
conta3 has quit [Ping timeout: 252 seconds]
FastJack_ has joined #ruby
joelroa has joined #ruby
FastJack has quit [Read error: Connection reset by peer]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WeiJunLi has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 240 seconds]
raul782 has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
runescape07rsps has joined #ruby
Neo95 has joined #ruby
johnny56 has joined #ruby
al2o3-cr has quit [Ping timeout: 252 seconds]
ta_ has joined #ruby
raul782 has quit [Remote host closed the connection]
apeiros has quit [Ping timeout: 255 seconds]
WeiJunLi has joined #ruby
ayonkhan has joined #ruby
pi4 is now known as RedNifre
<RedNifre> Good evening!
al2o3-cr has joined #ruby
<RedNifre> I partially read the whole "Learning Ruby" book, ruby sure is nice.
ldnunes has quit [Ping timeout: 246 seconds]
<RedNifre> However, I miss some functional programming constructs like currying and partial function application
<RedNifre> I noticed that I can add those with the nice metaprogramming features, but are there any good FP libraries that you can recommend?
podman has joined #ruby
<TastyTrout> https://github.com/banister/funkify and there's Proc/lambda#curry.
aphelion has joined #ruby
BSaboia has joined #ruby
aphel has quit [Ping timeout: 246 seconds]
<RedNifre> Ah, looks perfect.
milardovich has quit []
AxelAlex has quit [Quit: AxelAlex]
<TastyTrout> yup. ruby-esque but quite old. not sure if it still works.
raul782 has joined #ruby
raul782 has quit [Remote host closed the connection]
millerti has joined #ruby
Zaab1t has quit [Quit: gnight]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has joined #ruby
maryo_ has quit [Quit: Leaving]
ayonkhan_ has joined #ruby
raul782 has joined #ruby
ldnunes has joined #ruby
kn-928 has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ayonkhan has quit [Ping timeout: 240 seconds]
TomyLobo has quit [Ping timeout: 264 seconds]
aphelion has quit [Ping timeout: 246 seconds]
ayonkhan_ has quit [Ping timeout: 240 seconds]
AndChat182964 has left #ruby ["Leaving"]
gheegh has joined #ruby
ayonkhan has joined #ruby
hutch34 has joined #ruby
aphelion has joined #ruby
<RedNifre> Regarding blocks and procs, is the & in `map &someProc` really needed? Why can't blocks and procs be used interchangeable?
alex`` has quit [Quit: WeeChat 1.9]
tomphp has joined #ruby
oleo has quit [Ping timeout: 255 seconds]
bruno- has joined #ruby
Azure|dc has joined #ruby
sp4rrow has joined #ruby
Rodya_ has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
gothicsouth has joined #ruby
Rodya_ has joined #ruby
Azure has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sepp2k has quit [Quit: Leaving.]
Rodya_ has quit [Ping timeout: 246 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
Ishido has quit [Remote host closed the connection]
<TastyTrout> it's a good question. blocks exist as syntax, until there's a Proc object that can represent the syntax as an object. the leading '&' is a bit context dependent. in a method definiton, eg: def foo(&bar); end the block will be captured in a Proc referenced by 'bar'. in your example, it's taking what may already be a Proc, and passing it as though it's a block. i'm not super well versed in this stuff, but that's my
<TastyTrout> vague recollection of it.
Ishido has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
<TastyTrout> i think it's also more performant to not create a Proc, since it requires capturing a binding and creating an object.
Puffball has quit [Remote host closed the connection]
JeanCarloMachado has quit [Quit: leaving]
ozcanesen has quit [Quit: ozcanesen]
JeanCarloMachado has joined #ruby
WeiJunLi has quit [Read error: Connection reset by peer]
Puffball has joined #ruby
raul782 has quit [Remote host closed the connection]
jinie has quit [Ping timeout: 246 seconds]
runescape07rsps has quit [Quit: Leaving]
WeiJunLi has joined #ruby
orbyt_ has joined #ruby
ldnunes has quit [Quit: Leaving]
jinie has joined #ruby
Cohedrin_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WeiJunLi has quit [Remote host closed the connection]
selim has quit [Ping timeout: 240 seconds]
kn-928 has quit [Quit: WeeChat 1.9]
bronson has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
selim has joined #ruby
ornerymoose has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
Neo95 has quit [Ping timeout: 240 seconds]
Neo95 has joined #ruby
hutch34 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
hutch34 has quit [Ping timeout: 246 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
imode has quit [Ping timeout: 252 seconds]
ramfjord_ has quit [Ping timeout: 248 seconds]
ramfjord has quit [Ping timeout: 248 seconds]
agent_white has quit [Quit: bbl]
hutch34 has quit [Ping timeout: 264 seconds]
abcd1234 has joined #ruby
ResidentBiscuit has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
ayonkhan_ has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
apeiros_ has joined #ruby
ayonkhan has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
ayonkhan_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
ramfjord_ has joined #ruby
someuser has quit [Ping timeout: 240 seconds]
rgr has quit [Quit: rgr]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZU has joined #ruby
cdg has joined #ruby
gusrub_ has joined #ruby
Neo95 has quit [Ping timeout: 248 seconds]
FrostCandy has quit []
gusrub has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 240 seconds]
Neo95 has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
__Yiota has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AxelAlex has joined #ruby
JeanCarloMachado has quit [Ping timeout: 260 seconds]
AxelAlex has quit [Client Quit]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
__Yiota has joined #ruby
zachk has quit [Quit: Leaving]
hutch34 has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
millerti has joined #ruby
jeremroberts has joined #ruby
ncthom91 has joined #ruby
jeremroberts has quit [Client Quit]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ResidentBiscuit has quit []
pharma_joe has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
ncthom91 has quit [Quit: Textual IRC Client: www.textualapp.com]
eckhardt has joined #ruby
Rodya_ has joined #ruby
Rodya_ has quit [Ping timeout: 246 seconds]
roshanavand has quit [Quit: roshanavand]
roshanavand has joined #ruby
t-recx has quit [Quit: t-recx]
gizmore has quit [Ping timeout: 240 seconds]
roshanavand has quit [Client Quit]
pharma_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
alveric1 has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
imode has joined #ruby
alveric has quit [Ping timeout: 246 seconds]
runescape07rsps has joined #ruby
gizmore has joined #ruby
goyox86_ has joined #ruby
pharma_joe has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
pharma_joe is now known as pharma_joe[away]
hutch34 has quit [Ping timeout: 240 seconds]
johnny56 has joined #ruby
XD_ has joined #ruby
XD__ has joined #ruby
mikecmpbll has joined #ruby
bronson has joined #ruby
runescape07rsps has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
XD_ has quit [Ping timeout: 248 seconds]
skweek has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
roshanavand has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
arescorpio has joined #ruby
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
JeanCarloMachado has joined #ruby
kreantos has joined #ruby
nertzy has quit [Ping timeout: 255 seconds]
XD__ has quit [Quit: Leaving]
runescape07rsps has joined #ruby
kreantos has quit [Ping timeout: 260 seconds]
KeyJoo has quit [Ping timeout: 248 seconds]
enterprisey has joined #ruby
Ishido has quit [Ping timeout: 240 seconds]
pharma_joe[away] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quobo has quit [Quit: Connection closed for inactivity]
pharma_joe has joined #ruby
ianfleeton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: inabit. zz.]