havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.2, 2.3.5 & 2.2.8: https://www.ruby-lang.org || Paste >3 lines of text to: https://gist.github.com || Rails questions? Ask in: #RubyOnRails || Logs: https://irclog.whitequark.org/ruby || Books: https://goo.gl/wpGhoQ
jrabe has quit []
<axisys> need help with installing rvc.. I am getting nokogiri requires Ruby version >= 2.1.0 .. but then it will break puppet .. on centos 7
jrabe has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<axisys> let me know if I should really taking it over to #centos channel
<axisys> s/taking/take/
vtx has joined #ruby
ycyclist has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
alnewkirk has quit [Ping timeout: 258 seconds]
<RickHull> you can use a prior version of Nokogiri maybe, but watch out for CVEs
<RickHull> if you want to avoid Centos system dependencies, you can build out your entire ruby environment pretty easily, for certain values of easily
<RickHull> probably you want to check with #centos first
hotpancakes has quit [Client Quit]
<RickHull> you won't get much help in here for ruby < 2.2
<latemus> i am writing a rack application. so i'm coding everthing in a class. i'd like to create methods within the class, and use them within the class. is this possible?
chmurifree has joined #ruby
<latemus> i can't seem to figure out the convention for calling methods within the class itself so they run when the class is instatniated. what should i look up.
alnewkirk has joined #ruby
goyox86 has quit [Quit: goyox86]
<axisys> RickHull: yes if I upgrade ruby .. then puppet will fail
<RickHull> axisys: almost certainly the recent versions of puppet run fine on ruby 2.4+
<axisys> puppet for centos 7 based on //yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
<RickHull> you could just run whatever ruby you want, and `gem install puppet`
<RickHull> (presumably) if you want to deal with centos dependencies, then check with #centos
fmcgeough_ has quit [Quit: fmcgeough_]
alnewkirk has quit [Ping timeout: 240 seconds]
Ropeney has joined #ruby
marr has quit [Ping timeout: 258 seconds]
<axisys> hmm.. did not think of `gem install puppet'
<RickHull> well, be careful mixing centos packages with newer gems
<axisys> RickHull: let me try on a centos 7 VM
fmcgeough has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alnewkirk has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<axisys> so on a fresh new centos 7 VM .. obviously there is no gem
<axisys> so installing yum install -y rubygems installs a olderversion
<axisys> can gem upgrade itself from there? like pip?
jenrzzz has quit [Ping timeout: 240 seconds]
<RickHull> yeah
<RickHull> gem update --system
<RickHull> or gem install rubygems-update
<RickHull> (last I checked, and sudo as necessary)
Psybur has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
<axisys> cool!
<axisys> btw, this is what I meant.. http://dpaste.com/0CHWEVT.txt
<axisys> ok.. so gem update --system got me to 2.6.14 .. now gem install rvc says missing ruby.h .. do I install the header files with gem or yum?
tvw has quit [Remote host closed the connection]
<RickHull> who owns `which ruby` ?
<RickHull> if it's yum's ruby, then you'll want something like ruby-devel package
<axisys> root
lordpdd has joined #ruby
<RickHull> i mean, what subsystem
<RickHull> it's possible you installed your own ruby, e.g. with ruby-build or ruby-install
<RickHull> presumably it's yum's ruby
cdg has quit [Ping timeout: 246 seconds]
eckhardt has joined #ruby
eroux has quit [Quit: ZZZzzz… ZZZzzz…]
<RickHull> yeah, so try to find the development packages for yum's ruby
<axisys> ruby-devel
alnewkirk has quit [Ping timeout: 255 seconds]
<axisys> so back to same error.. nokogiri requires Ruby version >= 2.1.0.
<RickHull> latemus: can you paste your attempts?
<RickHull> and there is no newer ruby for centos 7?
<RickHull> ruby2.2 or something maybe?
Technodrome has joined #ruby
<RickHull> what is your ruby --version ?
<axisys> doing a yum upgrade
fmcgeough has quit [Quit: fmcgeough]
jphase has quit [Remote host closed the connection]
porfa has quit [Quit: porfa]
chouhou__ has quit [Remote host closed the connection]
<lordpdd> what's a good place to ask a question about activerecord?
alnewkirk has joined #ruby
Devalo has joined #ruby
<axisys> RickHull: still 2.0
<axisys> :-)
MrBusiness has quit [Ping timeout: 246 seconds]
npgm has quit [Quit: Connection closed for inactivity]
<RickHull> lordpdd: here or #rubyonrails
<RickHull> axisys: you will probably want a newer ruby. 2.0 way EOL
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> you can install one in your homedir pretty easily
<axisys> RickHull: I need to use rvc for a whole team ..
megamosaren has quit [Ping timeout: 258 seconds]
<RickHull> i would upgrade centos or look for a newer ruby package
<axisys> RickHull: I did
alnewkirk has quit [Ping timeout: 248 seconds]
Devalo has quit [Ping timeout: 248 seconds]
<RickHull> i mean, to a newer centos
<axisys> RickHull: yum upgrade does that
<RickHull> ruby 2.0 is like 7 years old maybe?
<axisys> lol
<RickHull> recent centos should be running 2.4
<RickHull> check on that
<axisys> RickHull: let me check with #centos.. thanks
vtx has quit [Quit: vtx]
alnewkirk has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys is now known as troys_
alnewkirk has quit [Ping timeout: 240 seconds]
PresidentBiscuit has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
coderphive has joined #ruby
<RickHull> ruby 2.0 was released early 2013, it's not *that* old, but it is EOL
<lordpdd> I'm using AR 3.2 and I'm having a problem with `serialize :field, JSON` - it works locally but on other machines/servers I get a JSON parsing error "JSON::ParserError: input must be a string or IO" has anyone had this issue before?
eckhardt has quit [Quit: Textual IRC Client: www.textualapp.com]
alnewkirk has joined #ruby
<zanoni> I'm not that familiar with rack but the error I keep getting shows this GET request, and it's like the two paths are merged, yet I see nothing about the route in it - 2017-10-27 00:54:20 +0000: Rack app error handling request { GET /vagrant/TestRails/MediaExplorer/vagrant/TestRails/Music/Bugg.....}
quobo has quit [Quit: Connection closed for inactivity]
blackmesa has quit [Quit: WeeChat 1.9.1]
alnewkirk has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
alnewkirk has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
troys_ is now known as troys
alnewkirk has quit [Ping timeout: 240 seconds]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
brian_penguin has joined #ruby
alnewkirk has joined #ruby
megamosaren has joined #ruby
d^sh has quit [Ping timeout: 240 seconds]
alnewkirk has quit [Ping timeout: 240 seconds]
juggler has joined #ruby
d^sh has joined #ruby
brian_penguin has quit [Quit: Leaving]
ogres has joined #ruby
alnewkirk has joined #ruby
coderphive has quit [Quit: coderphive]
coderphive_ has joined #ruby
gusrub has quit []
thomasv314 has joined #ruby
uZiel has joined #ruby
enterprisey has quit [Remote host closed the connection]
enterprisey has joined #ruby
alnewkirk has quit [Ping timeout: 252 seconds]
coderphive_ has quit [Quit: ZNC - http://znc.in]
coderphive has joined #ruby
bwilson has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
Cerbb has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
halt has quit [Ping timeout: 248 seconds]
halt has joined #ruby
alnewkirk has joined #ruby
kies has quit [Ping timeout: 248 seconds]
coderphive has quit [Changing host]
coderphive has joined #ruby
fullstack has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
gizmore|2 has quit [Ping timeout: 252 seconds]
juggler has quit [Ping timeout: 240 seconds]
fullstack has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
lordpdd has quit [Quit: Page closed]
alnewkirk has joined #ruby
QualityAddict has joined #ruby
joker5bb has joined #ruby
imode has quit [Ping timeout: 246 seconds]
joker5bb has quit [Remote host closed the connection]
mjolnird has quit [Quit: Leaving]
alnewkirk has quit [Ping timeout: 255 seconds]
jameser has joined #ruby
PresidentBiscuit has quit [Remote host closed the connection]
code_zombie__ has joined #ruby
orbyt_ has joined #ruby
alfiemax has joined #ruby
alnewkirk has joined #ruby
code_zombie_ has quit [Ping timeout: 246 seconds]
mn3m has quit [Ping timeout: 240 seconds]
joker5bb has joined #ruby
enterprisey has quit [Ping timeout: 246 seconds]
pryorda has quit [Quit: WeeChat 1.4]
alfiemax has quit [Ping timeout: 240 seconds]
MrBusiness has joined #ruby
govg has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
guardianx has joined #ruby
vipaca has joined #ruby
mn3m has joined #ruby
guardianx is now known as spooderman
govg has joined #ruby
astrobunny has joined #ruby
astrobunny has quit [Remote host closed the connection]
ArtCorvelay has joined #ruby
astrobunny has joined #ruby
tastytf has joined #ruby
kies has joined #ruby
enterprisey has joined #ruby
<Iambchop> axisys: there is a newer package for ruby in the scl repos: https://www.softwarecollections.org/en/scls/rhscl/rh-ruby23/
govg has quit [Ping timeout: 260 seconds]
meinside has quit [Quit: Connection closed for inactivity]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ArtCorvelay has quit [Quit: WeeChat 1.9.1]
alnewkirk has quit [Ping timeout: 260 seconds]
alnewkirk has joined #ruby
basket has quit [Ping timeout: 248 seconds]
mn3m has quit [Ping timeout: 248 seconds]
troys is now known as troys_
alnewkirk has quit [Ping timeout: 258 seconds]
alfiemax has quit [Remote host closed the connection]
alnewkirk has joined #ruby
zanoni has quit [Ping timeout: 255 seconds]
ap4y1 has quit [Ping timeout: 260 seconds]
dviola has quit [Quit: WeeChat 1.9.1]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
megamosaren has quit [Ping timeout: 240 seconds]
<jidar> rhel 7.4 defaults to ruby Version : 2.0.0.648, Release : 30.el7
<jidar> where that actually is, I do not know
<jidar> and yea, there's the SCL repos
alfiemax has joined #ruby
alnewkirk has joined #ruby
<RickHull> is there some Bill Gates like figure at the top of Red Hat we can shake our collective fists at?
<RickHull> jidar: this sort of thing is why (docker, rvm, chruby, etc) exist
<RickHull> debian, arch, etc
<RickHull> fedora too I guess
cschneid_ has joined #ruby
<RickHull> jidar: what about the epel repos?
exchgr has quit [Ping timeout: 246 seconds]
* RickHull casts package.r(epel)
<RickHull> *POOF*
DTZUZO has joined #ruby
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
exchgr has joined #ruby
<RickHull> jidar: I would suggest using ruby-install to install some rubies to /opt/rubies, owned by root
<jidar> hurm? I don't have any issue with my versions, I was simply adding information to the conversation ;)
<RickHull> and use sudo gem install from there, and make sure your users update their login environments and paths accordingly
<RickHull> jidar: oh, carry on :)
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
gix has quit [Ping timeout: 240 seconds]
alnewkirk has quit [Ping timeout: 260 seconds]
gix has joined #ruby
alnewkirk has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
uZiel has joined #ruby
alnewkirk has quit [Ping timeout: 248 seconds]
alnewkirk has joined #ruby
QualityAddict has quit [Quit: Leaving]
alnewkirk has quit [Ping timeout: 258 seconds]
bmurt has joined #ruby
alnewkirk has joined #ruby
quiller has quit [Ping timeout: 240 seconds]
spooderman has quit []
alnewkirk has quit [Ping timeout: 240 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alnewkirk has joined #ruby
alfiemax_ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 248 seconds]
alnewkirk has quit [Ping timeout: 240 seconds]
rideh has quit [Ping timeout: 255 seconds]
rideh has joined #ruby
alnewkirk has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
kapil___ has joined #ruby
<RickHull> what's the right way to get sudo gem install working with chruby? sudo bash, then go in root's environment?
fullstack has quit [Ping timeout: 255 seconds]
<RickHull> like, have a protected set of ruby environments in /opt (or wherever)
<RickHull> only root can update
<RickHull> and users can opt in to *wink*
<RickHull> s/root/wheel group/ # yada yada
alnewkirk has quit [Ping timeout: 248 seconds]
alnewkirk has joined #ruby
fullstack has joined #ruby
Technodrome has joined #ruby
nofxx has quit [Remote host closed the connection]
Devalo has joined #ruby
astrobunny has quit [Remote host closed the connection]
nofxx has joined #ruby
quobo has joined #ruby
cdg has joined #ruby
Devalo has quit [Ping timeout: 240 seconds]
alnewkirk has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 258 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax_ has quit [Remote host closed the connection]
alnewkirk has joined #ruby
cschneid_ has quit [Remote host closed the connection]
bruno-_ has joined #ruby
cschneid_ has joined #ruby
<dminuoso> RickHull: It's just a function (which should have been more appropriately named nth or nthP): def nth(n) -> (e) { e[n] }; end
<dminuoso> Sorry about the delay, apparently the human body requires sleep every 24 hours.
<RickHull> the beatings will continue until morale improves
<dminuoso> So it's basically the array analog of a path.
enterprisey has quit [Ping timeout: 248 seconds]
<RickHull> ah cool. I'm with you that elixir is nicer for this style
<dminuoso> RickHull: You can also define Integer#to_proc instead. It allows for fun things such as: list.map(&0) or list.map(&nth(0)
<dminuoso> RickHull: No its not. Ever tried doing function composition with elixir?
<RickHull> i think so
<dminuoso> RickHull: Is there a way as concise as my Proc#* ? :-)
bruno- has quit [Ping timeout: 258 seconds]
<RickHull> I haven't looked at this in a while: https://github.com/rickhull/conway_deathmatch/tree/elixir
<RickHull> it might not build
<dminuoso> RickHull: |> is basically just a poor mans excuse for having no function composition. ;-)
<RickHull> <3 |>
cschneid_ has quit [Ping timeout: 255 seconds]
<dminuoso> Well, we will get it in ruby 2.5 :P
<dminuoso> The less elegant version of it, but we will have a ruby version of |> soon. :)
DarkBushido has quit [Ping timeout: 240 seconds]
cschneid has quit [Ping timeout: 246 seconds]
<dminuoso> Though I really do wish Elixir had the power to compose two functions together easily without creating some helper module R with some function compose, R.compose(A.func, B.func) is just horrid.
aphelion has quit [Ping timeout: 240 seconds]
Apocalypse has quit [Ping timeout: 255 seconds]
epochwolf has quit [Ping timeout: 255 seconds]
rideh has quit [Ping timeout: 252 seconds]
code_zombie__ has quit [Quit: Leaving]
cout has quit [Ping timeout: 260 seconds]
alnewkirk has quit [Ping timeout: 258 seconds]
<RickHull> on a scale of php to unicorns and rainbows, where is horrid?
<dminuoso> RickHull: Around Perl.
k3rn31 has joined #ruby
<RickHull> i hear good things about perlnukem 6
<dminuoso> I've even seen fancy ruby constructs such as: R. aFunc . bFunc
<dminuoso> Where method_missing is overloaded to return certain proxy objects
<dminuoso> (Which would compose)
<dminuoso> Which is stronger than Proc#* because you can freely compose methods without having to build procs/lambdas from them
<baweaver> so there's a method to the madness?
<RickHull> the story of ruby
<RickHull> (tm)
enterprisey has joined #ruby
alnewkirk has joined #ruby
armyriad has quit [Quit: Leaving]
armyriad has joined #ruby
<RickHull> dminuoso: where I'm returning from a block, how can I make the lambda approach work better?
<dminuoso> RickHull: Last night I was sure you could tackle those .each things with transducers more elegantly.
<RickHull> i vaguely understood transducers like 6 months ago
DarkBushido has joined #ruby
DarkBushido has quit [Changing host]
DarkBushido has joined #ruby
<RickHull> haven't thought about that in a while
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rideh has joined #ruby
<RickHull> i'm not happy with #bf_search and #df_search, they feel rough but sufficient
<dminuoso> RickHull: Let me emphasize again that this was just a personal opinion. Your code looked very clean.
<RickHull> i'm looking for enhancements
<RickHull> PRs welcome :)
cout has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
alnewkirk has joined #ruby
<dminuoso> Ignore the fact that its in JS, its one of the better articles on the subject.
<RickHull> what about monads in ruby, what is the signature?
<dminuoso> RickHull: Something where #flat_map makes sense on.
<RickHull> hm, that's new here
<dminuoso> For Ruby that only applies to Array (which is a full fledged monad)
<RickHull> what is the test for monadry in ruby?
epochwolf has joined #ruby
<RickHull> i can see where Array#flat_map makes sense
<dminuoso> RickHull: You identify whether it is indeed a monadic object in the category of endofunctors.
<RickHull> endofunctors? *barf*
<dminuoso> RickHull: Endofunctors are basically things where .map makes sense on. ;-)
<RickHull> Enumerables, kinda?
<dminuoso> (That is a simplified version, but it works well enough for programming)
cschneid has joined #ruby
<dminuoso> No.
<RickHull> :(
aphelion has joined #ruby
<dminuoso> RickHull: the idea of map is not about iterating. its about applying a function to "its content"
<RickHull> map x to y
<dminuoso> with x and y being functions, yes.
<dminuoso> ;)
<RickHull> what about f(x) = x^3
<RickHull> is that a map? or an endofucntor?
<dminuoso> RickHull: Neither.
anisha_ has joined #ruby
<RickHull> seems pretty close
<dminuoso> RickHull: think of an endofunctor as any type of object that can "contain values" in *some* form
<dminuoso> For example: Array can contain many values
<dminuoso> Box can contain one value
Apocalypse has joined #ruby
<dminuoso> Maybe *may* contain a value, but perhaps it doesnt.
<dminuoso> Future contains a value (in the future)
alnewkirk has quit [Ping timeout: 240 seconds]
<dminuoso> And in each case map would apply a function to "its content", satisfying the special property of the type (array having many, Future having one.. in the future, maybe possibly having none)
<dminuoso> Any such type that can contain values, and apply functions to its content (via map) is basically an endofunctor - or short "functor" (when programmers say functor they always mean endofunctor)
<RickHull> *nod*
ogres has quit [Quit: Connection closed for inactivity]
<RickHull> "a generic container class" but not really
<RickHull> what's wrong with that idea?
aupadhye has joined #ruby
alnewkirk has joined #ruby
<RickHull> f(x) = x^3 is the map part, container class is the endofunctor part
<RickHull> ?
<RickHull> i would think Enumerable is monadic (sp?)
Dimik has joined #ruby
<RickHull> what disqualifies Enumerable from monadry?
aupadhye has quit [Ping timeout: 248 seconds]
LocaMocha has joined #ruby
troys_ is now known as troys
<dminuoso> RickHull: In reality there are many more endofunctors, but that is at least one type that we usually concern us ourselves with as programmers.
<dminuoso> RickHull: In addition that #map must follow some axioms
<dminuoso> If * is function composition, then .map(f * g) must be the same as .map(g).map(f) in ruby terms (this is called a covariant functor)
<dminuoso> Or if its a contravariant functor, then .map(f * g) must be the same as .map(f).map(g)
<dminuoso> (Function composition is in reverse direction, so f * g would be `f after g`)
<RickHull> * is multiplication?
<dminuoso> Also .map(&:itself) must produce the same output unchanged.
<dminuoso> RickHull: Function composition
<dminuoso> Technically it should be written as .map(&(f * g)), .map(&f) and .map(&g) because ruby is stupid :P
<RickHull> oh duh, sorry, you said that already :)
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
<dminuoso> So basically the functor in addition respects the order of functions applied to its contents (whether you chain them through multiple invocations of map, or whether you compose them first, and then use it with map)
AnoHito has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
oleo has quit [Quit: Leaving]
<RickHull> so what about Enumerable?
<RickHull> how do we apply monadic theory or definitions?
<dminuoso> RickHull: The reason that `map` doesnt map values but rather the function is shadowed by the fact that ruby's map first maps the function, and immediately applies it to the 'container'
jphase has joined #ruby
<RickHull> hmmm....
<dminuoso> RickHull: Monads are kind of like functors, except in addition to #map they also support #flatten and follow some special laws.
<dminuoso> But they are hard to explain, they are far more easily "discovered" by yourself if you are told to do some certain things.
<RickHull> i recall in previous examinations, apply() is a sensible operation
<RickHull> (maybe errantly)
astrobunny has joined #ruby
<dminuoso> RickHull: ever done promises in JavaScript?
<RickHull> newp
<RickHull> I've horsed around with them in Ruby or Elixir IIRC
alnewkirk has joined #ruby
astrobun_ has joined #ruby
aupadhye has joined #ruby
LocaMocha has quit [Ping timeout: 240 seconds]
astrobunny has quit [Read error: Connection reset by peer]
Technodrome has joined #ruby
LocaMocha has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
<dminuoso> RickHull: The thing about Enumerable is that strictly speaking you could construct classes that don't respect the axioms I mentioned: a.map(&(f * g)) == a.map(&g).map(&g) (or the other way around, but contravariant functors are somewhat rare in programming)
<dminuoso> But are still Enumerable.
<dminuoso> A random example: An unordered list.
<dminuoso> Would be quite enumerable, but it will *not* respect the order of composition in the slightest.
<RickHull> hm, sounds like a Bag
<RickHull> hm, order of composition?
<dminuoso> a.map(&(f * g)) == a.map(&g).map(&g)
<dminuoso> And if a = a.map(&:itself)
<RickHull> a.map(&f).map(&g) ?
<dminuoso> And if a == a.map(&:itself)
<dminuoso> Those are the basic requirements of a functor.
<dminuoso> Err yes.
<dminuoso> Well
<dminuoso> a.map(&g).map(&f)
<dminuoso> Yours would be one of those really rare contravariant functors.
<dminuoso> (Not rare in mathematics, but rare in programming)
<RickHull> a.map(&:itself) -- no problem there right?
<RickHull> i mean, with a hypothetical Enumerable#itself
<dminuoso> RickHull: I wouldn't know?
<dminuoso> Object#itself exists.
<dminuoso> ;-)
<dminuoso> >> 1.itself
<ruby[bot]> dminuoso: # => 1 (https://eval.in/888040)
<RickHull> well presumably, I would think
<dminuoso> RickHull: The thing is, you could implement #each to call and then perhaps destroy objects.
<dminuoso> RickHull: So no. It doesn't naturally follow that a == a.map(&:itself)
<RickHull> >> [1,2,3].map { |i| i.itself } == [1,2,3]
<ruby[bot]> RickHull: # => true (https://eval.in/888041)
<dminuoso> ruby[bot]: Like I said: Array *is* a functor.
<dminuoso> So it respects that law.
<RickHull> *nod*
<dminuoso> But you can think of constructions that do not.
<RickHull> ok, sure
alnewkirk has quit [Ping timeout: 258 seconds]
<RickHull> so something tighter than Enumerable could be a Monad
<RickHull> and possibly broader or more expressive than an Array
MrBismuth has joined #ruby
<RickHull> monads are just arrays, who knew?!
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dimik has quit [Ping timeout: 240 seconds]
<RickHull> dminuoso: I am being silly of course, somewhat devil's advocate. Thank you very much for this explanation!
MrBusiness has quit [Ping timeout: 252 seconds]
alnewkirk has joined #ruby
<dminuoso> RickHull: I just thought of one.
<dminuoso> RickHull: Think about ObjectSpace, you could trivially implement Enumerable by defining .each to be .each_object
* RickHull nod
<dminuoso> RickHull: And because I'm a bit evil, I define my own itself function like this:
<dminuoso> Or ignore it. Just assume that there's another thread in parallel creating objects.
<dminuoso> RickHull: Or just any unordered list
Sammichmaker has joined #ruby
<RickHull> i confused monad for functor or endofunctor above
<dminuoso> If no order is imposed, its random. So you could end up with something like list == list.map(&itself) evaluating to (1,2,3) == (1,3,2)
<RickHull> what is the relationship between these terms?
<dminuoso> RickHull: Every monad is also an endofunctor.
dionysus69 has quit [Ping timeout: 246 seconds]
<dminuoso> RickHull: But that's not helpful.
kculpis has quit [Ping timeout: 255 seconds]
<RickHull> how does endofunctor relate to functor?
<RickHull> might as well be talking ectoplasm ;)
<dminuoso> RickHull: Essentially a monad is an endofunctor equipped with #flatten (sometimes also called join) in addition
<dminuoso> (And following additional axioms wrt to join()
* RickHull nod
<dminuoso> RickHull: But that is a really dull definition that is not helpful.
<RickHull> it helps circle in the beast
<dminuoso> The monad interface of Array for example models indeterministic computation.
<dminuoso> (Considering your library I expect you to know what that is)
<RickHull> i know what a NFA is
<RickHull> NFSA?
DTZUZO has quit [Ping timeout: 240 seconds]
andikr has joined #ruby
<dminuoso> RickHull: Same idea
alnewkirk has quit [Ping timeout: 246 seconds]
<RickHull> what is indeterministic about Array, and in- vs non- ?
<dminuoso> RickHull: It's not array that is indeterministic.
alex`` has joined #ruby
Silthias has joined #ruby
alex`` is now known as alexherbo2
alexherbo2 is now known as alex``
<dminuoso> RickHull: https://gist.github.com/dminuoso/9fed2def767c2a5c7c8ed98ad726f697 is this trivial to understand?
Silthias1 has quit [Ping timeout: 258 seconds]
<RickHull> yes, lovely, separate behavior from objectness
<RickHull> verbs from nouns
<RickHull> ?
ColeHub has joined #ruby
<dminuoso> RickHull: So assume you have some [initialPosition], you can just call .map(&nextPosition) and you get an entire array of possible next positions.
<RickHull> yeah, a nice general interface
<RickHull> like REST/HTTP
<dminuoso> The idea is that you dont *know* which move the opponent will do, so you have no option but to compute an array of all simultaneously.
<dminuoso> And that is non-deterministic computation
alnewkirk has joined #ruby
<RickHull> hm, that is not satisfying. I could check them all in series in some order
<dminuoso> RickHull: Its not about efficiency, its just the concept.
<RickHull> expressing the parallelism of the problem?
<dminuoso> Yeah pretty much.
<dminuoso> RickHull: So until now this is just a functor. However you have a problem.
<dminuoso> What if you want to check all the possible layouts 2 moves from now?
<RickHull> n^2
aufi has joined #ruby
<dminuoso> Given some initial = [initialPosition], if you did initial.map(&nextPosition) you now have an array of an array of positions.
<dminuoso> So you can't simply to initial.map(&nextPosition).map(&nextPosition)
<RickHull> hmmm
<dminuoso> So in order to do this, array is equipped with flat_map, (which is just map(...).flatten ), which can do this - thus modelling non deterministic computation
<RickHull> flatten jumbles things?
<dminuoso> RickHull: flatten knows how to peel off one layer
<dminuoso> It turns Array<Array<ChessboardPosition>> into Array<ChessboardPosition>
<RickHull> hm, sounds like curry
<RickHull> FWIW rfold and lfold are dim lightbulbs in the foggy recesses
<dminuoso> Wait, now we are talking about catamorphisms?
<RickHull> no, don't mind my ramblings
alfiemax has joined #ruby
<RickHull> I have dipped my toes into functional programming but not recently; been shaking the rust off here :)
<dminuoso> RickHull: What is important, is to understand is that Array is not naturally a functor or monad. It's possible that there's multiple functors or monads you can construct with Array.
konsolebox has quit [Ping timeout: 258 seconds]
<RickHull> that makes sense enough. I can imagine a contract, and Array happens to be able satisfy it in a simple way and possibly others
<dminuoso> Right. But most of the time there is only one useful thing to do.
<RickHull> and if EnumerableFunctor were a mixin like Enumerable but cared enough, it might satisfy all of the reqs
alnewkirk has quit [Ping timeout: 258 seconds]
<dminuoso> RickHull: Such a thing would be called: OrderedList.
imode has joined #ruby
<dminuoso> Or rather, it would have to be an OrderedEnumerable
<RickHull> to me that is Enumerable in the platonic sense
<dminuoso> RickHull: Consider Set.
<dminuoso> A wildly underused class.
<dminuoso> It's an Enumerable, but unordered.
<RickHull> possibly enumerable rather than necessarily?
<RickHull> isn't the enumeration 0, 1, 2, 3 ... ?
<dminuoso> >> require 'set'; Set.ancestors
<ruby[bot]> dminuoso: # => [Set, Enumerable, Object, Kernel, BasicObject] (https://eval.in/888042)
<dminuoso> RickHull: It is unordered.
<RickHull> it doesn't guarantee an order?
<dminuoso> That's what unordered means.
<dminuoso> You have to assume the order is random everytime you iterate.
<RickHull> i have a sense that Enumerable means top to bottom
<RickHull> we can assign a number to it
<RickHull> and sort on it
<dminuoso> RickHull: Nope, Enumerable just means you can iterate over it.
<dminuoso> RickHull: Which implies you can do things such as filtering
<dminuoso> (Because you can inspect each object)
<RickHull> i mean enumerable in the platonic sense
<RickHull> am I wrong there?
<dminuoso> RickHull: You are.
<RickHull> bah
<RickHull> boo! *shakes fist*
<RickHull> so just countable basically
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RickHull> and we define #each
<dminuoso> Right.
alnewkirk has joined #ruby
banisterfiend has joined #ruby
bwilson has quit [Quit: bwilson]
<RickHull> so what about unordered nondeterministic cool things? do they get a cool name?
<dminuoso> RickHull: The best example to get a good grasp of what monads are, is to keep the non-deterministic computation in mind (where your computation function takes an input, and generates an array of results), and then study JavaScript promises.
<RickHull> it seems like a nice property
<dminuoso> Or implement a logger done the functional programming way.
<dminuoso> You will invent the monad yourself.
cschneid_ has joined #ruby
<RickHull> all of functional programming is just take the problem, split it into parts, solve them (map), and then join back together (reduce)
<RickHull> it's like a burrito, right?
cschnei__ has joined #ruby
guacamole has joined #ruby
cschneid_ has quit [Ping timeout: 252 seconds]
snickers has joined #ruby
Silthias1 has joined #ruby
cschnei__ has quit [Ping timeout: 252 seconds]
* RickHull removes tongue from cheek
<RickHull> it's late, thanks again, cheers!
Silthias has quit [Ping timeout: 240 seconds]
troys has quit [Quit: Bye]
Ltem has joined #ruby
mjolnird has joined #ruby
alnewkirk has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
rabajaj has joined #ruby
conta has joined #ruby
alnewkirk has joined #ruby
nertzy has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
alnewkirk has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
ajaysingh has joined #ruby
alnewkirk has joined #ruby
|ifei5good has quit [Ping timeout: 248 seconds]
|ifei5g00d has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
Immune has quit [Ping timeout: 248 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
postmodern has quit [Quit: Leaving]
oetjenj has joined #ruby
alnewkirk has joined #ruby
enterprisey has quit [Remote host closed the connection]
ColeHub has quit [Ping timeout: 240 seconds]
alnewkirk has quit [Ping timeout: 240 seconds]
nofxx has quit [Ping timeout: 255 seconds]
claudiuinberlin has joined #ruby
alnewkirk has joined #ruby
rann has quit []
rann has joined #ruby
mark_66 has joined #ruby
mim1k has quit [Ping timeout: 252 seconds]
marr has joined #ruby
mlehrer has quit [Ping timeout: 260 seconds]
alnewkirk has quit [Ping timeout: 240 seconds]
cschneid_ has joined #ruby
Burgestrand has joined #ruby
cschnei__ has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
nofxx has joined #ruby
alnewkirk has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
cschnei__ has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
fullstack has quit [Ping timeout: 264 seconds]
fullstack has joined #ruby
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
mim1k has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
minimalism has joined #ruby
Xeago has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
alnewkirk has joined #ruby
mikecmpbll has joined #ruby
ben___ has joined #ruby
ben___ is now known as bnagy
ARCADIVS has joined #ruby
bnagy has quit [Client Quit]
alnewkirk has quit [Ping timeout: 240 seconds]
alnewkirk has joined #ruby
oetjenj has quit [Ping timeout: 240 seconds]
apeiros_ is now known as apeiros
porfa has joined #ruby
oetjenj has joined #ruby
quiller has joined #ruby
alnewkirk has quit [Ping timeout: 248 seconds]
fclausen has quit [Quit: leaving]
porfa has quit [Quit: porfa]
alnewkirk has joined #ruby
Freshnuts has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
alex`` has quit [Ping timeout: 255 seconds]
tvw has joined #ruby
megamosaren has joined #ruby
alnewkirk has quit [Ping timeout: 246 seconds]
alnewkirk has joined #ruby
porfa has joined #ruby
drbroiler has joined #ruby
oetjenj has quit [Ping timeout: 255 seconds]
alfiemax has quit [Remote host closed the connection]
oetjenj has joined #ruby
07IABNK87 has joined #ruby
ajaysingh has quit [Ping timeout: 260 seconds]
Serpent7776 has joined #ruby
oetjenj_ has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
jaruga has joined #ruby
imode has quit [Ping timeout: 258 seconds]
oetjenj has quit [Ping timeout: 255 seconds]
biberu has joined #ruby
alnewkirk has joined #ruby
axsuul has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
axsuul has joined #ruby
oetjenj_ has quit [Ping timeout: 246 seconds]
Beams has joined #ruby
07IABNK87 has quit [Remote host closed the connection]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 246 seconds]
fullstack has quit [Ping timeout: 264 seconds]
oetjenj has joined #ruby
nertzy has joined #ruby
dev_ has joined #ruby
alfiemax has joined #ruby
nowhereman has quit [Ping timeout: 240 seconds]
porfa has quit [Quit: porfa]
fullstack has joined #ruby
alnewkirk has quit [Ping timeout: 248 seconds]
vqrs has joined #ruby
dhollin3 has joined #ruby
guille-moe has joined #ruby
alnewkirk has joined #ruby
dhollinger has quit [Ping timeout: 248 seconds]
megamosaren has quit [Ping timeout: 252 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
megamosaren has joined #ruby
lxsameer has joined #ruby
tvw has quit [Read error: Connection reset by peer]
<dev_> hello
<dev_> i need some help
<dev_> with the task
<apeiros> dev_: hi. ok?
<apeiros> that sounds like homework?
<dev_> in the main.rb, compute_price(vehicle), compute_prices functions
<dev_> yes
alnewkir1 has joined #ruby
alnewkirk has quit [Ping timeout: 255 seconds]
<apeiros> and your problem is?
<dev_> i'm newbie of ruby, if do this task correctly?
<dev_> i have some doubts with functions
<dev_> the generated result to output.json
nowhereman has joined #ruby
<apeiros> Date will not include hours/minutes/seconds
<apeiros> there's two other classes which do: DateTime and Time
|ifei5g00d has quit [Ping timeout: 240 seconds]
<dev_> thanks
<apeiros> I think you also don't consider this part of the exercise in your code: "you should consider if it wouldn't be cheaper to take the daily or weekly price instead"
<dev_> but the results are the same with DateTime and Date, i checked
<apeiros> and some cosmetics: don't use parse for a standardized format. the time is given in iso8601, both DateTime and Time have .iso8601 parsing methods explicitly
<dev_> yes i have a problem with how to define this "you should consider if it wouldn't be cheaper to take the daily or weekly price instead", any hints
<apeiros> re results the same: then maybe you're doing something wrong in the calculations too. try to calc by hand and see whether you get the expected result from your code.
<apeiros> another cosmetic issue: result = []; enum.each do … result << value; end --> result = enum.map { … value }
<apeiros> gotta go for lunch now, somebody else can probably help you in the meantime.
<dev_> thank you!
FahmeF has joined #ruby
guacamole has joined #ruby
|ifei5g00d has joined #ruby
fullstack has quit [Ping timeout: 240 seconds]
FahmeF_ has quit [Ping timeout: 240 seconds]
megamosaren has quit [Ping timeout: 240 seconds]
fullstack has joined #ruby
FahmeF_ has joined #ruby
FahmeF has quit [Ping timeout: 252 seconds]
RickHull has quit [Ping timeout: 260 seconds]
meinside has joined #ruby
jameser_ has joined #ruby
__Yiota has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
<dev_> any help ?
hippyphysicist has joined #ruby
alnewkir1 has quit [Ping timeout: 248 seconds]
s2013 has joined #ruby
hippyphysicist has quit [Quit: Leaving]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FahmeF has joined #ruby
porfa has joined #ruby
FahmeF_ has quit [Ping timeout: 246 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
claudiuinberlin has joined #ruby
zoras has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
FahmeF_ has joined #ruby
FahmeF has quit [Ping timeout: 240 seconds]
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
astrobun_ has quit [Remote host closed the connection]
cadillac_ has quit [Ping timeout: 248 seconds]
charliesome has joined #ruby
milardovich has joined #ruby
cadillac_ has joined #ruby
rikkipitt has joined #ruby
hippyphysicist__ has joined #ruby
hippyphysicist__ has quit [Read error: Connection reset by peer]
mn3m has joined #ruby
FahmeF_ has quit [Remote host closed the connection]
nowhereman has quit [Quit: Konversation terminated!]
nowhereman has joined #ruby
tvw has joined #ruby
alfiemax has quit [Remote host closed the connection]
rabajaj has quit [Remote host closed the connection]
anisha_ has quit [Read error: Connection reset by peer]
anisha has joined #ruby
rikkipitt has quit [Ping timeout: 248 seconds]
mn3m has quit [Quit: mn3m]
mn3m has joined #ruby
mim1k_ is now known as mim1k
andikr has quit [Remote host closed the connection]
gix has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
tcopeland has quit [Quit: tcopeland]
ldnunes has joined #ruby
milardovich has quit [Remote host closed the connection]
gix has joined #ruby
DTZUZO has joined #ruby
mn3m_ has joined #ruby
FahmeF has joined #ruby
rikkipitt has joined #ruby
mn3m_ has quit [Remote host closed the connection]
mn3m has quit [Ping timeout: 240 seconds]
dkam has quit [Quit: Lingo: www.lingoirc.com]
nowhereman has quit [Quit: Konversation terminated!]
nowhereman has joined #ruby
tastytf has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
zanoni has joined #ruby
mn3m_ has joined #ruby
mn3m_ is now known as mn3m
fullstack has quit [Ping timeout: 255 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
fullstack has joined #ruby
workmad3 has quit [Quit: Lost terminal]
workmad3 has joined #ruby
charliesome has quit [Ping timeout: 264 seconds]
<dev_> can someone help with the task?
voiceftp has quit [Remote host closed the connection]
voiceftp has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zoras has quit []
vqrs has quit [Read error: Connection reset by peer]
milardovich has quit [Remote host closed the connection]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has joined #ruby
<apeiros> dev_: did you make any progress since we last talked?
duckpuppy has joined #ruby
<dev_> i'm stuck with "you should consider if it wouldn't be cheaper to take the daily or weekly price instead"
vqrs has joined #ruby
<apeiros> dev_: take case with id 1, daily price is 4500, weekly price is 12000 - after how many days is daily price more expensive than weekly?
rikkipitt has quit [Quit: Leaving...]
<apeiros> (and I think case with id = 2 misses a zero in the weekly price…)
<dev_> and i get output
<dev_> {"results":[{"vehicle_id":1,"total_price":9000},{"vehicle_id":2,"total_price":13500}]}
<dev_> i think it is not correct
<apeiros> ok. lets solve one thing after the other. so I'd suggest you start by answering my question.
<dev_> 2.625
<dev_> ?
<apeiros> ok, so after how many days would you therefore switch from daily to weekly price?
<dev_> 2
<apeiros> yeah, after 2 days, or starting from day 3
<apeiros> so seems to me like you know how to solve that part
<dev_> this i understood, i'm at a loss how to implement it in a code
workmad3 has quit [Ping timeout: 248 seconds]
<apeiros> how did you do it by hand?
<dev_> yes
<apeiros> that wasn't a yes/no question ;-)
<apeiros> *how*
administrador has joined #ruby
<apeiros> the naive implementation usually starts with simply translating what you did by hand into program code
milardovich has joined #ruby
<dev_> 4500 * 7 / 12000
<dev_> = 2.625
<apeiros> that looks like an equation you can put into code. no?
workmad3 has joined #ruby
<apeiros> (note: I would do it differently, but that's an optimization)
<dev_> "total_price": 18625 of id: 1
milardovich has quit [Remote host closed the connection]
Siyfion has joined #ruby
milardovich has joined #ruby
Bish has quit [Ping timeout: 264 seconds]
scorphus has quit [Ping timeout: 264 seconds]
SHyx0rmZ has quit [Ping timeout: 264 seconds]
Bish has joined #ruby
nowhereman has quit [Ping timeout: 258 seconds]
Dimik has joined #ruby
administrador has quit [Quit: administrador]
<dev_> i do not know
oetjenj has quit [Ping timeout: 240 seconds]
biberu has quit []
oetjenj has joined #ruby
<apeiros> ok, lets phrase it differently. you'd use weekly price if daily price surpasses the weekly price, right?
<dev_> yes
<dev_> you see the problem ?
<apeiros> no. care to show it to me?
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
tcopeland has joined #ruby
biberu has joined #ruby
oetjenj has quit [Ping timeout: 258 seconds]
claudiuinberlin has joined #ruby
oetjenj has joined #ruby
mim1k_ is now known as mim1k
ogres has joined #ruby
alfiemax_ has joined #ruby
oetjenj_ has joined #ruby
ajaysing_ has joined #ruby
oetjenj has quit [Ping timeout: 255 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
ajaysing_ has quit [Remote host closed the connection]
oetjenj_ has quit [Ping timeout: 248 seconds]
oetjenj has joined #ruby
Defenestrate has joined #ruby
Defenestrate has joined #ruby
Defenestrate has quit [Changing host]
alfiemax_ has quit [Remote host closed the connection]
oetjenj has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
oetjenj has joined #ruby
bruno-_ has quit [Ping timeout: 260 seconds]
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
drbroiler has quit [Ping timeout: 240 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 264 seconds]
mim1k has joined #ruby
shinnya has joined #ruby
John___ has joined #ruby
Siyfion has quit [Quit: Textual IRC Client: www.textualapp.com]
s2013 has joined #ruby
SegFaultAX has quit [K-Lined]
smlx has quit [K-Lined]
russt has quit [K-Lined]
russt has joined #ruby
smlx has joined #ruby
charliesome has joined #ruby
oetjenj has quit [Ping timeout: 240 seconds]
SegFaultAX has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
porfa has quit [Quit: porfa]
shoogz has quit [Quit: shoogz out]
bmurt has joined #ruby
oetjenj has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
shoogz has joined #ruby
shoogz has quit [Changing host]
shoogz has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
uZiel has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
<latemus> i'm getting this "body"=>"#<StringIO:0x00000001cf43f0>" and i dont know what the hell a StringIO class object is
<latemus> oh, i call .gets and .string on it
cschneid_ has joined #ruby
<latemus> nm
cschneid_ has quit [Read error: Connection reset by peer]
claudiuinberlin has joined #ruby
cschneid_ has joined #ruby
porfa has joined #ruby
Psybur has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
conta has quit [Quit: conta]
<apeiros> &ri StringIO latemus
dviola has joined #ruby
cschneid_ has quit [Ping timeout: 258 seconds]
jphase has joined #ruby
oetjenj has quit [Ping timeout: 255 seconds]
oetjenj has joined #ruby
Technodrome has joined #ruby
s2013 has joined #ruby
snickers has quit [Ping timeout: 248 seconds]
cdg has joined #ruby
alnewkirk has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ajaysing_ has joined #ruby
oetjenj has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
shinnya has quit [Ping timeout: 248 seconds]
oetjenj has joined #ruby
claudiuinberlin has joined #ruby
oleo has joined #ruby
orbyt_ has joined #ruby
synthroid has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oetjenj has quit [Ping timeout: 258 seconds]
thomasv314 has joined #ruby
chouhoulis has joined #ruby
oetjenj has joined #ruby
mson has joined #ruby
Technodrome has joined #ruby
ajaysing_ has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
aupadhye has quit [Ping timeout: 248 seconds]
uZiel has joined #ruby
oetjenj has quit [Ping timeout: 264 seconds]
govg has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oetjenj has joined #ruby
Defenestrate has quit [Quit: This computer has gone to sleep]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
mim1k has quit [Ping timeout: 258 seconds]
yokel has quit [Remote host closed the connection]
mim1k has joined #ruby
yokel has joined #ruby
_whitelogger_ has joined #ruby
_whitelogger has quit [Remote host closed the connection]
_whitelogger has joined #ruby
cschneid_ has joined #ruby
_whitelogger_ has quit [Ping timeout: 246 seconds]
bruno- has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ResidentBiscuit has quit [Ping timeout: 248 seconds]
cschneid_ has quit [Ping timeout: 252 seconds]
ResidentBiscuit has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
_whitelogger has joined #ruby
thomasv314 has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jidar has quit [Ping timeout: 248 seconds]
_whitelogger_ has joined #ruby
_whitelogger has quit [Ping timeout: 258 seconds]
oetjenj has joined #ruby
fullstack has quit [Ping timeout: 252 seconds]
mjolnird has quit [Quit: Leaving]
kculpis has joined #ruby
chouhoul_ has joined #ruby
fullstack has joined #ruby
oetjenj_ has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
oetjenj__ has joined #ruby
uZiel has joined #ruby
oetjenj has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
oetjenj__ has quit [Client Quit]
oetjenj has joined #ruby
oetjenj_ has quit [Ping timeout: 248 seconds]
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
oetjenj has joined #ruby
oetjenj has quit [Client Quit]
cadillac_ has joined #ruby
bilal80 has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
FrostCandy has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
ldnunes has quit [Ping timeout: 248 seconds]
apparition has joined #ruby
rippa has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
chouhoul_ has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
ldnunes has joined #ruby
guacamole has joined #ruby
cschneid_ has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
pygospa has quit [Remote host closed the connection]
cschneid_ has quit [Client Quit]
ta has quit [Remote host closed the connection]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
DTZUZO has quit [Ping timeout: 248 seconds]
nowhereman has joined #ruby
apeiros has quit [Remote host closed the connection]
lexruee has quit [Ping timeout: 260 seconds]
jamied has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
ta has joined #ruby
jamied has left #ruby ["Textual IRC Client: www.textualapp.com"]
sammy has joined #ruby
lexruee has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
sammy is now known as sammy77
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaruga has quit [Quit: jaruga]
ARCADIVS has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
mark_66 has quit [Remote host closed the connection]
shoogz has quit [Quit: shoogz out]
lxsameer has quit [Quit: WeeChat 1.7]
shoogz has joined #ruby
shoogz has quit [Changing host]
shoogz has joined #ruby
|ifei5g00d has quit [Ping timeout: 258 seconds]
DoubleMalt has joined #ruby
|ifei5g00d has joined #ruby
claudiuinberlin has joined #ruby
dalitom has joined #ruby
vipaca has joined #ruby
<dalitom> hey guys
shinnya has joined #ruby
<dalitom> anyone knows good example of using expect in Ruby
<dalitom> ?
moei has joined #ruby
dionysus69 has joined #ruby
Technodrome has joined #ruby
ARCADIVS has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
mostlybadfly has joined #ruby
lolkikes has joined #ruby
|ifei5g00d has quit [Ping timeout: 240 seconds]
DTZUZO has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Ping timeout: 258 seconds]
shinnya has quit [Ping timeout: 248 seconds]
|ifei5g00d has joined #ruby
Serpent7776 has quit [Quit: Leaving]
eckhardt has joined #ruby
nick123 has quit [Ping timeout: 248 seconds]
Silthias1 has quit [Quit: Leaving.]
|ifei5good has joined #ruby
lolkikes has quit [Ping timeout: 246 seconds]
|ifei5g00d has quit [Ping timeout: 248 seconds]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
alfiemax_ has joined #ruby
FiendKing04 has quit [Ping timeout: 258 seconds]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
vipaca has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
nick123 has joined #ruby
<havenwood> dalitom: Are you talking about RSpec when you say expect?
alfiemax_ has quit [Remote host closed the connection]
<dalitom> hi havenwood, well I looking for solution to ssh to server as user and run su commands
orbyt_ has joined #ruby
<dalitom> interaction with the server
anisha has quit [Quit: This computer has gone to sleep]
thinkpad has quit [Ping timeout: 260 seconds]
porfa has quit [Quit: porfa]
Devalo has joined #ruby
mikecmpbll has joined #ruby
DoubleMalt has quit [Ping timeout: 248 seconds]
lel has joined #ruby
guacamol_ has joined #ruby
thomasv314 has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
troys has joined #ruby
oetjenj has joined #ruby
raynold has joined #ruby
eckhardt_ has joined #ruby
__Yiota has quit [Quit: Textual IRC Client: www.textualapp.com]
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guacamol_ has quit [Quit: My face has gone to sleep. ZZZzzz…]
guacamole has joined #ruby
eckhardt has quit [Ping timeout: 260 seconds]
<dalitom> please guys help... how to do interactive ssh with Ruby
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
Burgestrand has quit [Quit: Closing time!]
Devalo has quit [Ping timeout: 260 seconds]
<Iambchop> dalitom: an example of using net-ssh to run a command with sudo and provide the password when prompted: https://irb.rocks/execute-sudo-commands-with-net-ssh/
Silthias has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
Silthias1 has joined #ruby
<dalitom> Iambchop: Thank you!!!!! Let me check it out
Beams has quit [Quit: .]
lxsameer has quit [Quit: WeeChat 1.9.1]
<Iambchop> dalitom: if you have trouble, upload a gist of your code and ask for more help here :)
Silthias has quit [Ping timeout: 248 seconds]
<dalitom> Iambchop: Thank you so much for support .... let me try example you have sent
bigkevmcd has quit [Quit: Outta here...]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has joined #ruby
vipaca has joined #ruby
cschneid_ has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
guille-moe has quit [Ping timeout: 255 seconds]
porfa has joined #ruby
SeepingN has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dalitom> Iambchop: I do not understand this I am sorry :(
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dalitom> Iambchop: can you please help me
<Iambchop> dalitom: do you have some code you tried?
Silthias1 has left #ruby [#ruby]
<dalitom> yes
<dalitom> can I paste in here
<dalitom> ?
joker5bb has quit [Remote host closed the connection]
<matthewd> ?gist dalitom
<ruby[bot]> dalitom: https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
claudiuinberlin has joined #ruby
thomasv314 has joined #ruby
<dalitom> all I want is to ssh as default user and execute root commands
synthroid has quit [Remote host closed the connection]
thomasv314 has quit [Read error: Connection reset by peer]
thomasv314 has joined #ruby
<Iambchop> dalitom: "/n" instead of "\n" do you need to interact with the commands or just run them? capture output?
milardovich has joined #ruby
<dalitom> Iambchop: I just need to pass "yum install" commands
weaksauce has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ldnunes has quit [Ping timeout: 240 seconds]
<dalitom> Iambchop: It would be nice to capture output but not mandatory
sammy77 has quit [Quit: Textual IRC Client: www.textualapp.com]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
megamosaren has joined #ruby
MyMind has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
Sembei has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
guacamole has joined #ruby
ldnunes has joined #ruby
exchgr has quit [Quit: ZNC - http://znc.in]
exchgr has joined #ruby
ldnunes has quit [Ping timeout: 255 seconds]
nowhereman has quit [Ping timeout: 240 seconds]
vipaca has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasv3_ has joined #ruby
porfa has quit [Quit: porfa]
porfa has joined #ruby
thomasv314 has quit [Ping timeout: 264 seconds]
megamosaren has quit [Ping timeout: 240 seconds]
sunrunner20 has quit [Read error: Connection reset by peer]
snickers has joined #ruby
<dalitom> Iambchop: OMG... thank you so much.. let me see if i understand this lol
snickers has quit [Client Quit]
selim has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
orbyt_ has joined #ruby
sunrunner20 has joined #ruby
drbroiler has joined #ruby
selim has joined #ruby
apparition has quit [Quit: Bye]
porfa has quit [Quit: porfa]
weaksauce has joined #ruby
megamosaren has joined #ruby
porfa has joined #ruby
porfa has quit [Client Quit]
aufi has quit [Quit: Leaving]
<dalitom> Iambchop: Sorry to bother you... I took some of your code but still was not sure what to do
<dalitom> Iambchop: can you please check it out
thomasv3_ has quit [Read error: Connection reset by peer]
mostlybadfly has quit [Quit: Connection closed for inactivity]
vondruch has joined #ruby
thomasv314 has joined #ruby
nick123 has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
jrafanie has joined #ruby
porfa has joined #ruby
chouhoul_ has joined #ruby
thomasv314 has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 255 seconds]
edward__ has joined #ruby
duckpupp1 has joined #ruby
LocaMocha has quit [Ping timeout: 264 seconds]
edward__ has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duckpuppy has quit [Ping timeout: 246 seconds]
naprimer3 has quit [Quit: Leaving]
tomphp has joined #ruby
tomphp has quit [Client Quit]
nick123 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
tomphp has joined #ruby
uZiel has quit [Remote host closed the connection]
thomasv314 has joined #ruby
synthroid has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
naprimer has joined #ruby
tomphp has joined #ruby
cschneid_ has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
imode has joined #ruby
edward__ has joined #ruby
tomphp has joined #ruby
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
csk157 has joined #ruby
duckpuppy has joined #ruby
orbyt_ has joined #ruby
duckpupp1 has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
cschneid_ has joined #ruby
tvw has quit [Remote host closed the connection]
Immune has joined #ruby
cschneid_ has quit [Remote host closed the connection]
fullstack has quit [Ping timeout: 255 seconds]
fullstack has joined #ruby
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vipaca has joined #ruby
<haylon> Are there any native thor tasks for Rubocop? Otherwise would I have to just run it as Thor::RakeCompat?
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Caius has quit [Ping timeout: 260 seconds]
mn3m has quit [Ping timeout: 248 seconds]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imode has quit [Ping timeout: 255 seconds]
imode has joined #ruby
Technodrome has joined #ruby
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
thomasv3_ has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
csk157_1 has joined #ruby
dionysus69 has joined #ruby
Qommand0r has joined #ruby
csk157 has quit [Ping timeout: 240 seconds]
thomasv314 has quit [Ping timeout: 255 seconds]
<dev_> stuck in compute_price method
<dev_> i get {"results":[{"vehicle_id":1,"total_price":9000},{"vehicle_id":2,"total_price":13500}]}
_main_ has joined #ruby
_main_ has quit [Read error: Connection reset by peer]
<dev_> but result should be { "results": [ { "vehicle_id": 1, "total_price": 18625 }, { "vehicle_id": 2, "total_price": 15000 } ] }
_main_ has joined #ruby
uZiel has joined #ruby
vipaca has joined #ruby
megamosaren has quit [Quit: Leaving]
__main__ has quit [Ping timeout: 240 seconds]
vipaca has quit [Client Quit]
_main_ has quit [Read error: Connection reset by peer]
_main_0 has joined #ruby
cschnei__ has joined #ruby
milardovich has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vipaca has joined #ruby
imode has quit [Ping timeout: 246 seconds]
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
weaksauce has quit [Read error: Connection reset by peer]
guacamole has joined #ruby
postmodern has joined #ruby
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasv3_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Technodrome has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
thomasv314 has joined #ruby
<dev_> any help?
troys is now known as troys_
csk157_1 has quit [Read error: Connection reset by peer]
csk157_1 has joined #ruby
<SeepingN> I dont' see any difference aside from strange whitespace
tomphp has quit [Read error: Connection reset by peer]
mostlybadfly has joined #ruby
tomphp has joined #ruby
csk157_1 has quit [Client Quit]
al2o3-cr has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
cschnei__ has quit [Remote host closed the connection]
harfangk has joined #ruby
cschnei__ has joined #ruby
harfangk_ has joined #ruby
harfangk__ has joined #ruby
harfangk___ has joined #ruby
mson has quit [Quit: Connection closed for inactivity]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 260 seconds]
vipaca has joined #ruby
porfa has quit [Quit: porfa]
alfiemax has quit [Remote host closed the connection]
cschnei__ has quit [Remote host closed the connection]
Devalo has joined #ruby
cschnei__ has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
ldnunes has quit [Quit: Leaving]
cschnei__ has quit [Read error: Connection reset by peer]
cschnei__ has joined #ruby
alfiemax has joined #ruby
tomphp has quit [Ping timeout: 248 seconds]
Devalo has quit [Ping timeout: 248 seconds]
orbyt_ has joined #ruby
workmad3 has joined #ruby
Caius has joined #ruby
Caius has quit [Changing host]
Caius has joined #ruby
mn3m has joined #ruby
DoubleMalt has joined #ruby
code_zombie has joined #ruby
Asher has joined #ruby
biberu has quit []
alfiemax has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 240 seconds]
porfa has joined #ruby
milardovich has quit []
Asher1 has joined #ruby
Asher has quit [Ping timeout: 252 seconds]
nowhereman has joined #ruby
administrador has joined #ruby
Asher1 has quit [Client Quit]
Fraeon has quit [Ping timeout: 260 seconds]
dexter1 has joined #ruby
jxv has joined #ruby
dexter1 has quit [Client Quit]
dexter1 has joined #ruby
dexter1 is now known as DTZUZUU
Asher has joined #ruby
sepp2k has joined #ruby
mn3m has quit [Ping timeout: 255 seconds]
Asher1 has joined #ruby
Asher1 has quit [Client Quit]
Asher has quit [Ping timeout: 255 seconds]
bruno- has quit [Quit: Lost terminal]
Psybur has quit [Ping timeout: 248 seconds]
jottr_ has joined #ruby
|ifei5good has quit [Ping timeout: 240 seconds]
synthroid has quit []
Freshnuts has quit [Quit: Leaving]
enterprisey has joined #ruby
mn3m has joined #ruby
cdg has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jottr has quit [Ping timeout: 264 seconds]
bruno- has joined #ruby
TheRock has joined #ruby
<TheRock> Hello , can i know if iphone 8 can run ruby ?
<TheRock> chinese version
jottr_ has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
cdg has joined #ruby
dalitom has quit [Ping timeout: 260 seconds]
mn3m has quit [Ping timeout: 248 seconds]
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
troys_ is now known as troys
Devalo has joined #ruby
ResidentBiscuit has quit [Read error: Connection reset by peer]
dev_ has quit [Quit: Page closed]
alnewkirk has quit [Ping timeout: 258 seconds]
Devalo has quit [Ping timeout: 248 seconds]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mson has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 1.9.1]
chouhoulis has joined #ruby
vipaca has joined #ruby
porfa has quit [Quit: porfa]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.9.1]
Freshnuts has joined #ruby
<SeepingN> it cannot
<SeepingN> how would you "run ruby" on a phone anyway
<TheRock> because the guy says it can
<SeepingN> oh that guy
<TheRock> You can listen, use translate https://www.youtube.com/watch?v=fhMM1biWi20
<SeepingN> yeah naw
|ifei5g00d has joined #ruby
<TheRock> so you was wrong
jottr_ has quit [Ping timeout: 248 seconds]
shinnya has joined #ruby
tcopeland has quit [Quit: tcopeland]
<mozzarella> of course you can run ruby on a phone
administrador has quit [Quit: administrador]
Devalo has joined #ruby
jottr_ has joined #ruby
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
orbyt_ has joined #ruby
Psybur has joined #ruby
Devalo has quit [Remote host closed the connection]
enterprisey has quit [Remote host closed the connection]
Devalo has joined #ruby
DebianUser_ has joined #ruby
DebianUser_ has quit [Remote host closed the connection]
DebianUser_ has joined #ruby
cdg has quit [Remote host closed the connection]
enterprisey has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has quit [Ping timeout: 240 seconds]
mochiyoda_ has quit [Ping timeout: 246 seconds]
sagax has quit [Quit: Konversation terminated!]
mochiyoda_ has joined #ruby
FrostCandy has quit []
<SeepingN> and do what though
<SeepingN> a ruby based app? how painfully slow would that be
<mozzarella> wouldn't be any slower than a desktop ruby app… obviously taking into account the difference in hardware
<TheRock> I want to install ruby on iphone 8 china version
<mozzarella> quick before your government blocks it TheRock
mim1k has joined #ruby
<SeepingN> can't say I have used even 1 desktop GUI ruby app
<SeepingN> and simulating a command line on iOS in which to run text based ruby things seems very odd.
<TheRock> But i heard ruby is faster than c++ and assembler is that true ???
<mozzarella> usually it's just bindings for gtk/qt (on the desktop)
<havenwood> ?troll TheRock
<ruby[bot]> havenwood: I don't know anything about troll
<SeepingN> much troll
<havenwood> !troll TheRock
TheRock was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<mozzarella> yeah now he definitely crossed the line
<SeepingN> ah QT, ok
<SeepingN> so yeah, pass. lol
<mozzarella> why can't they be more subtle
<SeepingN> but I want to compile machine language on my iphone 9x
mochiyoda_ has quit [Quit: Konversation terminated!]
mochiyoda_ has joined #ruby
<mozzarella> you want an assembler on your phone?
mim1k has quit [Ping timeout: 260 seconds]
DebianUser_ has quit [Remote host closed the connection]
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
enterprisey has quit [Ping timeout: 240 seconds]
<havenwood> I have our prod rails app running on my phone.
sagax has joined #ruby
DebianUser_ has joined #ruby
c-c has joined #ruby
<c-c> Hi
<c-c> So is it impossible to do non-blocking read on pipes in ruby 2.3?
|ifei5g00d has quit [Ping timeout: 255 seconds]
<c-c> I attempted io.read_nonblocking, with and without a begin-resque-select, different getc and read ways. They all behave identically to me on linux.
<c-c> ie. the process sits there and waits until something writes in the pipe
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vipaca has joined #ruby
|ifei5g00d has joined #ruby
alfiemax has joined #ruby
voiceftp has quit [Remote host closed the connection]
<zanoni> What's the best way to see what is going on with Rack middleware? Something is making Thin freeze but I'm not sure how to debug Rack
voiceftp has joined #ruby
vipaca has quit [Client Quit]
porfa has joined #ruby
Ltem has quit [Quit: Leaving]
alfiemax has quit [Ping timeout: 260 seconds]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
DoubleMalt has quit [Ping timeout: 255 seconds]
Heph_ has joined #ruby
alfiemax has joined #ruby
jphase has quit [Ping timeout: 240 seconds]
voiceftp has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 240 seconds]
cadillac_ has quit [Ping timeout: 255 seconds]
voiceftp has joined #ruby
cadillac_ has joined #ruby
k3rn31 has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
Kestrel-029 has quit [Read error: Connection reset by peer]
mkroman has quit [Quit: pa bangu noroi banzu]
mkroman has joined #ruby
guacamole has quit [Client Quit]
vipaca has joined #ruby
|ifei5g00d has quit [Ping timeout: 240 seconds]
Nicmavr has joined #ruby
DebianUser_ has quit [Quit: DebianUser_]
Nicmavr is now known as Guest81114
Guest81114 has quit [Changing host]
Guest81114 has joined #ruby
Guest81114 is now known as Kestrel-029
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
workmad3 has joined #ruby
<latemus> the following code never runs the second is_a method, why? --->>> val = ( (value.is_a? Hash) || (val.is_a? Array) )
tcopeland has joined #ruby
guacamole has joined #ruby
<mozzarella> because value.is_a? Hash
workmad3 has quit [Ping timeout: 248 seconds]
lacour has joined #ruby
John___ has quit [Read error: Connection reset by peer]
<latemus> mozzarella: i should have mentioned that value = []
troulouliou_div2 has joined #ruby
<mozzarella> what about val?
<latemus> val is being assigned the boolean result
DebianUser_ has joined #ruby
<mozzarella> no, in your condition
<mozzarella> on the right side of your ||
<latemus> oh man, thanks
<latemus> lol
<c-c> Hm, maybe I should turn it around and try not resque the begin block read_nonblock
<c-c> *rescue
<baweaver> also that's an odd way to write parens there latemus
<latemus> baweaver: how so
<baweaver> val = value.is_a?(Hash) || value.is_a?(Array)
<baweaver> Someone's been writing Lisp
<baweaver> well, lisp would be: (or (is_a? value Hash) (is_a? value Array))
<latemus> lol
<latemus> i was using them to group for boolean flow control. but yes, using them the way you did is cleaner
<latemus> i have corrected my code :)
cyberRodent has quit [Ping timeout: 255 seconds]
<latemus> interesting, that's the first time i've seen a problem with not explitictly using parens to pass a value in to a method
<baweaver> Though to be fair you could also: value.is_a?(Enumerable)
<latemus> baweaver: that's even better
cyberRodent has joined #ruby
<latemus> i skipped that class in my mind and went straight up to object, wwhoops
<baweaver> well it's not a class so... :P
<latemus> really??
<latemus> what is it
<latemus> mixin huh
<latemus> nice
<latemus> you're a tricky one baweaver
<baweaver> Module
<baweaver> but yeah
<c-c> Wow. I got it now.
<baweaver> -able is a pretty good hint :D
<baweaver> and if you want some fun with Enumerable these articles are good ones: https://medium.com/@baweaver/reducing-enumerable-the-basics-fa042ce6806
<baweaver> Basically how do you make Enumerable methods using only reduce
<baweaver> probably going to write slice, each_cons, partition, and methods like that this weekend
hahuang65 has quit [Ping timeout: 255 seconds]
<c-c> To read from a pipe in a non-blocking fashion: begin; msg = iopipe.read_nonblock(maxbytes); rescue IO::WaitReadable; next; end
troys is now known as troys_
<c-c> I wonder if thats "dirty"?
<Papierkorb> That's a busy loop. Yes that's "dirty".
<Papierkorb> Use `IO.select` to wait for it (or many more) to become readable.
<c-c> Papierkorb: I don't want to wait.
<c-c> I want to pass out of the begin-rescue if read_nonblock doesn't return anything.
<Papierkorb> You can also give it a zero-timeout to not wait, but just check
<c-c> In other words - if there is nothing to read_nonblock, continue
<c-c> oh, timeout...
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Psybur has quit [Ping timeout: 264 seconds]
<c-c> Papierkorb: so you're implying: add a row "IO.select([iopipe], 0)" or something like that in there?
<Papierkorb> It's basically how I'd do it, yes
<c-c> ok let me try that
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* latemus can't wait to get into pipes
<c-c> Whoa nelly! Now its no longer blocking or waiting in any way: "L/MIN: 1334340"
shinnya has quit [Ping timeout: 248 seconds]
<c-c> (thats actually 1/6th of the loops per minute)
Paraxial has quit [Quit: The Lounge - https://thelounge.github.io]
Paraxial has joined #ruby
Technodrome has joined #ruby
troys_ is now known as troys
orbyt_ has joined #ruby
<c-c> Here is my example solution for non-blocking read of a named pipe (its not the full class but you can get the idea)
<Papierkorb> erm, you use the IO.select instead of the exception stuff
jphase has joined #ruby
<c-c> Papierkorb: um, I've no idea how to do this otherwise
<Papierkorb> have you tried?
<c-c> I wonder what you might mean by "the exeption stuff"?
<c-c> *exception
<Papierkorb> begin .. rescue .. end
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ledestin has joined #ruby
<Papierkorb> Exceptions are for exceptional circumstances. reading something while knowing full well there might be nothing to read isn't exceptional.
<c-c> Papierkorb: sorry if this offends you, I can't seem to find another way to do a non-blocking read of a named pipe in ruby
<c-c> Papierkorb: have you seen another type of working solution elsewhere?
thinkpad has joined #ruby
jphase has quit [Ping timeout: 258 seconds]
<c-c> Papierkorb: I've wrestled with this quite a while
jphase has joined #ruby
<Papierkorb> Have you actually checked, what select does? What it returns?
<c-c> ah, what the hell, I'll commit and try that one more time
alfiemax has joined #ruby
drbroiler has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<c-c> Well, interestingly, replacing that begin-rescue -loop with a select([iopipe], [],[],0) is 3 times faster
alfiemax has quit [Ping timeout: 248 seconds]
<Papierkorb> exceptions are expensive
gnufied has quit [Ping timeout: 246 seconds]
marr has quit [Ping timeout: 248 seconds]
<c-c> - the downside is the select never returns any string
<Papierkorb> it's not supposed to. its job is to tell you about your file handle states
bwilson has joined #ruby
Qommand0r has quit [Quit: WeeChat 1.9.1]
<c-c> Naw, I can't get that to work.
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<c-c> select just returns the same array of IO objects I pass it.
sepp2k has quit [Read error: Connection reset by peer]
<Papierkorb> Have you read the docs?
<c-c> Let me turn this around for a second, if you don't mind.
<c-c> Papierkorb: have you actually written a select using logic for named pipes?
<c-c> +non-blocking
<Papierkorb> yes. doesn't matter if it's a named pipe, select only cares about handles.
<c-c> well, I've read the docs around quite a few times.
Defenestrate has joined #ruby
<c-c> I guess I must be stupid, but that begin-rescue-next is the best thing I've gotten to actually work without blocking.
<Papierkorb> ... the first paragraph is all you need to know
Yxhuvud has quit [Remote host closed the connection]
goyox86 has joined #ruby
<c-c> I was trying to $ man 2 select but that returns nothing
<Papierkorb> ...
s3nd1v0g1us has joined #ruby
s3nd1v0g1us has quit [Max SendQ exceeded]
<Papierkorb> While IO.select uses select(2) internally, what does it matter?
<Papierkorb> I even posted the docs link above
<c-c> I was hoping it would explain why does that IO.select seem to return the io handle when its value is nil
charliesome has joined #ruby
bwilson has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
tvw has joined #ruby
mim1k has joined #ruby
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hahuang65 has quit [Ping timeout: 248 seconds]
jxv has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
lacour has quit [Quit: Leaving]
troulouliou_div2 has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 248 seconds]
mson has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby