<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…]
<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.
<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
<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
<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>
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.
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]
<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>
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?
<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
<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…]
<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]
<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]
<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
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?
<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]
<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]
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…]
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…]