baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
MuffinPimp has quit [Quit: Goodbye.]
dar123 has joined #ruby
MuffinPimp has joined #ruby
jottr has joined #ruby
cthu| has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 252 seconds]
Puffball has quit [Remote host closed the connection]
DTZUZO has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
bga57 has quit [Quit: Leaving.]
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
knight33 has joined #ruby
<skwurl> Anyone mind reviewing this bit. still learnign about the loop thing wondering if this is best use? https://codeshare.io/5Oz8Rr
<skwurl> also interesting that it doesnt actually write to file until program ends. why?
blackmes1 has joined #ruby
orbyt_ has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
ascarter_ has joined #ruby
bga57 has joined #ruby
ascarter has quit [Ping timeout: 276 seconds]
peter62 has joined #ruby
<SeepingN> flush the output
bmurt has joined #ruby
NightMonkey has quit [Quit: ZNC - http://znc.in]
NightMonkey has joined #ruby
skwurl has quit [Quit: WeeChat 2.2]
<Eiam> writes are expensive
<Eiam> you generally want to avoid them as much as possible, (i/o in general) ^ skwurl
SeepingN has quit [Quit: The system is going down for reboot NOW!]
blackmes1 has quit [Ping timeout: 252 seconds]
peter62 has quit [Ping timeout: 260 seconds]
AJA4350 has quit [Quit: AJA4350]
Azure has joined #ruby
cd has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MoritaShinobu has joined #ruby
darkhanb has joined #ruby
gnufied has quit [Ping timeout: 250 seconds]
marmotini_ has joined #ruby
gnufied has joined #ruby
gnufied has quit [Client Quit]
bmurt has quit [Quit: Textual IRC Client: www.textualapp.com]
jottr has joined #ruby
esrse has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 252 seconds]
fluxAeon has joined #ruby
dbz has joined #ruby
nicesignal has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dreamthese has joined #ruby
nicesignal has quit [Ping timeout: 245 seconds]
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marmotini_ has quit [Ping timeout: 244 seconds]
jottr has joined #ruby
za1b1tsu_ has joined #ruby
bmurt has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
braincrash has quit [Quit: bye bye]
braincrash has joined #ruby
gix has quit [Disconnected by services]
dmitch has quit [Quit: Textual IRC Client: www.textualapp.com]
SuperLag has quit [Read error: Connection reset by peer]
SuperLag has joined #ruby
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blood has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
blood has quit [Client Quit]
Nicmavr has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
duderonomy has joined #ruby
fluxAeon has quit [Ping timeout: 252 seconds]
duderonomy has quit [Ping timeout: 268 seconds]
Lytol has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
rgiscard has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
elphe has joined #ruby
jottr has joined #ruby
tpendragon has quit [Remote host closed the connection]
duderonomy has joined #ruby
ur5us has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 244 seconds]
reber has joined #ruby
rgiscard has quit [Quit: Bye.]
dar123 has joined #ruby
dellavg_ has joined #ruby
tpendragon has joined #ruby
savolla has joined #ruby
sagax has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
sauvin has joined #ruby
marz_d`ghostman has joined #ruby
<marz_d`ghostman> I have Sync = Rise::MirrorManager::Sync; Rspec.describe Sync do . . . and rubocop is saying that the Rspec.describe line is too long. It's just like 22 characters though. How do I rectify it?
tdy1 has joined #ruby
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
dbz has quit [Ping timeout: 240 seconds]
duderonomy has quit [Ping timeout: 252 seconds]
P1RATEZ has quit []
wasanzy has quit [Ping timeout: 256 seconds]
clemens3 has joined #ruby
troys has quit [Ping timeout: 244 seconds]
doubledup has joined #ruby
tdy1 is now known as tdy
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doubledup has quit [Quit: Leaving]
apeiros has quit [Remote host closed the connection]
elphe has quit [Ping timeout: 240 seconds]
dar123 has quit [Read error: Connection reset by peer]
dar123 has joined #ruby
jottr has joined #ruby
savolla has quit [Ping timeout: 252 seconds]
stoffus has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elphe has joined #ruby
connor_goodwolf has quit [Ping timeout: 252 seconds]
crankhar1er has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
jinie_ has quit [Quit: ZNC 1.6.1 - http://znc.in]
elphe has quit [Ping timeout: 260 seconds]
snickers has joined #ruby
dellavg_ has quit [Ping timeout: 268 seconds]
elphe has joined #ruby
connor_goodwolf has joined #ruby
wojnar has joined #ruby
impermanence has joined #ruby
wojnar has quit [Ping timeout: 268 seconds]
elphe has quit [Ping timeout: 268 seconds]
ta_ has joined #ruby
im0nde has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clemens3 has quit [Ping timeout: 252 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
elphe has joined #ruby
nowhereman_ has quit [Ping timeout: 252 seconds]
nowhere_man has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
dbz has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
vonfry has joined #ruby
yohji has joined #ruby
clemens3 has joined #ruby
schneider- has joined #ruby
dbz has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 252 seconds]
schneider- has quit [Client Quit]
nowhere_man has joined #ruby
vondruch has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
za1b1tsu_ has quit [Quit: WeeChat 2.1]
mikecmpbll has joined #ruby
ShekharReddy has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
<universa1> marz_d`ghostman: ignore the warning? are you sure it is complaining about the length of the name, and not about the block length?
<universa1> *length of line
apeiros has joined #ruby
venmx has joined #ruby
jottr has joined #ruby
duderonomy has joined #ruby
User458764 has joined #ruby
jottr has quit [Ping timeout: 252 seconds]
dbz has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 252 seconds]
jottr has joined #ruby
dbz has quit [Ping timeout: 268 seconds]
jottr has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
elphe has joined #ruby
AJA4350 has joined #ruby
jottr has joined #ruby
prestorium has quit [Ping timeout: 240 seconds]
clemens3 has quit [Remote host closed the connection]
prestorium has joined #ruby
clemens3 has joined #ruby
elphe has quit [Ping timeout: 252 seconds]
jottr has quit [Ping timeout: 252 seconds]
ansraliant has quit [Quit: My planet needs me]
jottr has joined #ruby
vonfry has quit [Ping timeout: 246 seconds]
vonfry has joined #ruby
Beams has joined #ruby
jottr has quit [Quit: WeeChat 2.2]
ua_ has quit [Quit: Leaving]
apeiros has quit []
discopatrick has joined #ruby
ua has joined #ruby
al2o3-cr has quit [Ping timeout: 246 seconds]
prestorium has quit [Ping timeout: 252 seconds]
prestorium has joined #ruby
al2o3-cr has joined #ruby
blackmes1 has joined #ruby
apeiros_ has joined #ruby
ta_ has quit [Quit: Leaving...]
wildermind has joined #ruby
ta_ has joined #ruby
ShekharReddy has quit [Quit: Connection closed for inactivity]
MoritaShinobu has quit [Ping timeout: 240 seconds]
al2o3-cr has quit [Ping timeout: 246 seconds]
MoritaShinobu has joined #ruby
al2o3-cr has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
apparition has joined #ruby
Cork has quit [Ping timeout: 245 seconds]
unCork has joined #ruby
unCork is now known as Cork
roshanavand has quit [Ping timeout: 252 seconds]
GodFather has joined #ruby
blackmes1 has joined #ruby
sameerynho has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
esrse has quit [Ping timeout: 246 seconds]
GodFather has quit [Ping timeout: 245 seconds]
tdy has joined #ruby
elphe has joined #ruby
GodFather has joined #ruby
elphe has quit [Ping timeout: 252 seconds]
tdy has quit [Ping timeout: 252 seconds]
jcalla has joined #ruby
ellcs has joined #ruby
GodFather has quit [Ping timeout: 252 seconds]
<ellcs> Hello! can anyone explain what the error "continuation called across stack rewinding barrier" within the context of Continuation means? :)
akem__ has quit [Ping timeout: 272 seconds]
bmurt has joined #ruby
bkxd has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
graphene has quit [Remote host closed the connection]
bmurt has joined #ruby
graphene has joined #ruby
<havenwood> ellcs: Continuation's Kernel#callcc is obsolete. The deprecation warning says to use Fiber instead.
<ellcs> havenwood: Thanks for replying! :
<ellcs> I actually have the same error when using Fibers.
<havenwood> ellcs: Is the code that reproduces the error with fibers sharable?
<ellcs> Yes, a friend did post it online.
<ellcs> Feeling kind of stupid, not sharing it directly. >.<
GodFather has joined #ruby
<havenwood> ellcs: I guess Gtk is forking? You can resume a Fiber in a forked process, or you get that ^ error.
<havenwood> >> fiber = Fiber.new { sleep }; fork { fiber.resume }
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> >> fiber = Fiber.new { sleep }; fork { fiber.resume }
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> Well, the bot isn't working, but it reproduces the error.
hogetaro has joined #ruby
<havenwood> #!> `resume': fiber called across stack rewinding barrier (FiberError)
<ellcs> that is indeed a hot hint
<ellcs> thank you havenwood! :)
<havenwood> ellcs: no prob - you're welcome
<havenwood> "You can't resume a Fiber**" I mean >.>
<havenwood> I said that backwards.
<havenwood> Seems you got what I meant :)
<ellcs> I think so :D
akem has joined #ruby
roshanavand has joined #ruby
bkxd has joined #ruby
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has quit [Ping timeout: 268 seconds]
<JJonah> Am I missing a simpler way to achieve this?
<JJonah> p a.group_by(&:itself).transform_values(&:count) #=> {1=>3, 2=>2, 3=>2}
<JJonah> a = [1,2,1,1,3,2,3]
<al2o3-cr> JJonah: a.each_with_object(Hash.new 0) { |e, h| h[e] += 1 }
knight33 has joined #ruby
<JJonah> al2o3-cr: thanks, but the original is shorter and more declarative than that version. i should have been clearer in that i was asking if i'd missed a built-in method that achieve the result directly.
<havenwood> JJonah: Just a nit, but: transform_values(&:size)
<apeiros_> :D
* apeiros_ pondered saying that too
apeiros_ is now known as apeiros
<JJonah> havenwood: right, ty
<JJonah> nits always welcome
<apeiros> wasn't there a count_by/sum_by or similar method supposed to end in Enumerable? did it get axed or is that for a future version?
<havenwood> apeiros: I think it got held up by naming concerns.
<apeiros> #histogram would also be a nice name for it.
<JJonah> apeiros: that's what i thought and i why i asked... but i don't see it....
<apeiros> ooooh, ok. good names are important.
<apeiros> yeah, I'm in the histogram group
<havenwood> I was talking about it with David, the last commenter on that issue - and he liked "Tally"
<apeiros> also I wish ruby doc system had a way to do doc-only aliases and then we'd drop a shitload of aliases (can still have a shim require to add them back in for backwards compat)
<havenwood> apeiros: agreed - it gets confusing which are pure aliases and which have slight differences
<havenwood> I do actually kinda like: tally(&:itself)
<havenwood> histogram(&:itself)
<havenwood> either way!
<apeiros> imo histogram(&:itself) --> histogram()
<havenwood> mm
elphe has joined #ruby
<apeiros> or am I missing something?
<apeiros> (entirely possible, I'm on the verge of losing my sanity over some work here…)
<JJonah> havenwood: histogram > tally imo because it suggests there is a count for each element in a way Tally sort of does but not necessarily. the problem with histogram is that it suggests the visual representation of the data rather than the data itself which is what this is. also, since group_by already exists as well as some other "_by" methods i think "count_by" might be a winner for consistency reasons. even though histogram is
<JJonah> slightly more suggestive.
<havenwood> apeiros: some were suggesting #histogram and #histogram_by, but I guess i could see them combined with a blockless variant
<havenwood> dunno!
<apeiros> well, I'll wait patiently and hope they find a way. while I prefer histogram/_by, tally is fine by me too.
<havenwood> tally and tally_ho
ascarter has joined #ruby
ascarter_ has quit [Ping timeout: 260 seconds]
gnufied has joined #ruby
jlebrech has joined #ruby
<jlebrech> is there a http client that can cache it's requests? or how to use a separate cache with one?
<havenwood> jlebrech: Mechanize and Typhoeus can and it's a work-in-progress for HTTP.rb.
<al2o3-cr> jlebrech: Typhoeus
<jlebrech> thanks :)
<havenwood> jlebrech: That ^ spreadsheet has a "response caching" column way over on the right.
<jlebrech> thanks so much, i'll try typheous :)
<jlebrech> yeah just found it
<jlebrech> I was using excon and the proxy config confused me. i want to config caching in app and use that :)
GodFather has joined #ruby
<apeiros> oh wow, only typheous and mechanize. interesting
GodFather has quit [Ping timeout: 252 seconds]
vonfry has quit [Ping timeout: 272 seconds]
vonfry has joined #ruby
desperek has joined #ruby
bkxd has quit [Ping timeout: 268 seconds]
vonfry has quit [Ping timeout: 272 seconds]
vonfry has joined #ruby
teclator has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
ellcs has quit [Ping timeout: 272 seconds]
nowhere_man has joined #ruby
fluxAeon has joined #ruby
dar123 has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wasanzy has joined #ruby
Pisuke has quit [Ping timeout: 245 seconds]
vonfry1 has joined #ruby
vonfry has quit [Ping timeout: 244 seconds]
ascarter has quit [Remote host closed the connection]
vonfry1 has quit [Ping timeout: 246 seconds]
vonfry1 has joined #ruby
vonfry1 has quit [Client Quit]
apeiros has quit [Remote host closed the connection]
prestorium has quit [Ping timeout: 260 seconds]
SuperLag has quit [Quit: leaving]
SuperL4g has quit [Quit: WeeChat 2.2]
chouhoulis has joined #ruby
SuperLag has joined #ruby
SuperL4g has joined #ruby
rippa has joined #ruby
apeiros has joined #ruby
mike11 has joined #ruby
fluxAeon has quit [Ping timeout: 245 seconds]
bkxd has joined #ruby
blackmes1 has joined #ruby
jlebrech has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
dar123 has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
blackmes1 has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.2]
apeiros has joined #ruby
al2o3-cr has joined #ruby
clemens3 has quit [Ping timeout: 240 seconds]
cthulchu_ has joined #ruby
klaas has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fmccann has joined #ruby
blackmes1 has quit [Ping timeout: 252 seconds]
apparition has quit [Quit: Bye]
stoffus has quit [Quit: leaving]
marmotini_ has joined #ruby
cthu| has joined #ruby
greengriminal has joined #ruby
duderonomy has joined #ruby
<greengriminal> Hey all quick question wrt rounding in Ruby 2.3.4. I'm doing the following `2.3465.round(3)` my output is 2
<greengriminal> My expectation would be it should return: `2.347`.
cthulchu_ has quit [Ping timeout: 245 seconds]
duderonomy has quit [Client Quit]
bkxd has quit [Ping timeout: 240 seconds]
yohji has quit [Remote host closed the connection]
cthulchu_ has joined #ruby
ivanskie has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> 23>> 2.3465.round(3)
<ruby[bot]> havenwood: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
<havenwood> #=> 2.347
<havenwood> greengriminal: Your expectation is correct.
<greengriminal> Hrmmm, so I wonder why I'm getting `2`
blackmes1 has joined #ruby
cthu| has quit [Ping timeout: 272 seconds]
<greengriminal> Its all good. False alarm
troys has joined #ruby
clemens3 has joined #ruby
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
orbyt_ has joined #ruby
dbz has joined #ruby
darkhanb has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mike11 has quit [Quit: Leaving.]
orbyt_ has joined #ruby
elphe has quit [Ping timeout: 268 seconds]
dbz has quit [Remote host closed the connection]
dbz has joined #ruby
dbz has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
tfitts_ has joined #ruby
DTZUZO has quit [Ping timeout: 272 seconds]
skwurl has joined #ruby
<skwurl> hi!
<skwurl> anyone use ruby shoes. looking into a little gui programming with ruby. whats the best way?
<skwurl> having issues with ruby shoes on a arch linux.
<dalpo> skwurl: I haven't experience, but the gtk gem seems very well supported
Beams has quit [Quit: .]
<skwurl> hmm, okay ill check that out. thanks.
<skwurl> anyone working on any interesting ruby projects?
yokel has quit [Ping timeout: 252 seconds]
yokel has joined #ruby
knight33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DTZUZO has joined #ruby
wolfshappen has quit [Ping timeout: 245 seconds]
Lytol has joined #ruby
<JJonah> Metaprogramming question. Consider this (it works): https://hastebin.com/inurepozin.rb. Is there any way I can get this same effect but without having to place the `extend` at the bottom of the class def? Basically what I want is for the extend to "execute" only after the final `end` of the class, no matter where it is. Pretty sure this isn't possible but figured I'd ask.
bkxd has joined #ruby
wolfshappen has joined #ruby
marz_d`ghostman has quit [Quit: Page closed]
roshanavand has quit [Quit: Lost terminal]
dmitch has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
fredlinhares has joined #ruby
skwurl has quit [Ping timeout: 240 seconds]
duderonomy has joined #ruby
<havenwood> JJonah: Use `prepend` instead of `extend`.
<JJonah> havenwood: that didn't work. note the calling is actually altering the existing methods to make them memoized...
<havenwood> JJonah: Ah, I see what you're saying.
doubledup has joined #ruby
snickers has joined #ruby
<havenwood> JJonah: how about like this?: https://hastebin.com/xolapedona.rb
<havenwood> JJonah: ah, you're trying to avoid the #memoize method then?
<JJonah> havenwood: not per se, i'm trying to avoid repeating in unnecessarily in the context of an immutable value object, where i know it's safe to memoize every single method. the example i posted is perhaps confusing in that it has only a single method, but that was just to illustrate...
<JJonah> so i want an wasy way to mark an entire class as memoizable. my initial post achieves that but at the cost of breaking the ruby style guide convention of "extend goes at the top"
<JJonah> it also makes it easier to miss if you're casually scanning the source
blackmes1 has quit [Ping timeout: 240 seconds]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
nowhere_man has joined #ruby
knight33 has joined #ruby
knight33 has quit [Max SendQ exceeded]
dbugger_ has joined #ruby
mikecmpbll has joined #ruby
blackmes1 has joined #ruby
nowhere_man has quit [Ping timeout: 252 seconds]
<havenwood> JJonah: I'll show you how to do it if you solemnly swear you are up to no good...
<havenwood> JJonah: I'd avoid doing this... but fwiw: https://hastebin.com/burilejuxu.rb
<havenwood> it technically works >.>
<al2o3-cr> havenwood: that was the only other option i could see also.
<havenwood> JJonah: You can't wait until a class closes to run your #extended or #included unless you use some tricks like TracePoint.
<havenwood> al2o3-cr: Aye, I can't think of anything less obtuse.
lomex has joined #ruby
lomex has quit [Client Quit]
<al2o3-cr> i can't think of anything else, that is what i had in mind.
Cthulu201 has quit [Read error: Connection reset by peer]
Cthulu201 has joined #ruby
wasanzy has quit [Ping timeout: 256 seconds]
gnufied has quit [Ping timeout: 244 seconds]
discopatrick has quit [Quit: Connection closed for inactivity]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
greengriminal has quit [Client Quit]
greengriminal has joined #ruby
arup_r has joined #ruby
dmitch has quit [Ping timeout: 244 seconds]
gnufied has joined #ruby
fluxAeon has joined #ruby
wildermind has quit [Quit: Connection closed for inactivity]
bmurt has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<JJonah> havenwood: that is devilishly brilliant. but i can't in good conscious use that in production code, right?
cajone has joined #ruby
cajone has left #ruby [#ruby]
maryo has joined #ruby
<maryo> I wanted to install latest stable version of ruby in a linux box (CentOS). What is the recommended way to install ruby? and should it be installed as a root user?
a_ has joined #ruby
venmx has quit [Ping timeout: 250 seconds]
arup_r has quit []
<a_> can someone help me understand why I need ['results'
<a_> in this snipplet: https://dpaste.de/s4Zh
a__ has joined #ruby
<a__> sorry about that- got disconnected
a_ has quit [Ping timeout: 256 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #ruby
apeiros has quit [Ping timeout: 252 seconds]
maryo has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
fluxAeon has quit [Ping timeout: 245 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
apeiros has quit [Ping timeout: 268 seconds]
nowhere_man has joined #ruby
blackmes1 has quit [Quit: WeeChat 2.2]
sonOfRa has quit [Remote host closed the connection]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sonOfRa has joined #ruby
BloopMonster has joined #ruby
dbugger_ has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
greengriminal has joined #ruby
MoritaShinobu has quit [Quit: Leaving]
jcalla has quit [Quit: Leaving]
grenierm has joined #ruby
grenierm has left #ruby [#ruby]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Eiam> a__: because the return value of content_views is a hash with a results key it looks like?
<Eiam> oh
<Eiam> i misread
agent_white has quit [Quit: brb]
<a__> thanks- I'm new to ruby so trying to make sense of this
SeepingN has joined #ruby
<Eiam> line 9 isnt the type error, its line 11
<Eiam> whats the output of @cvs.class
agent_white has joined #ruby
Inline has joined #ruby
<a__> I understand line 11 is where the TypeError happens- I didn't do a good job of labeling that snipplet
<a__> 1 sec
<Eiam> suspect your c['name'] is trying to access an array, by converting 'name' into an int, which is failing
<a__> yes- it's an Array
greengriminal has quit [Quit: Leaving]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #ruby
bkxd has joined #ruby
<a__> "suspect your c['name'] is trying to access an array, by converting 'name' into an int, which is failing"
<a__> Eiam: right so how does adding a ['results'] at the end of that call help?
apeiros has joined #ruby
beowuff has joined #ruby
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tdy has joined #ruby
clemens3 has quit [Ping timeout: 268 seconds]
doubledup has quit [Quit: Leaving]
AJA4350 has quit [Quit: AJA4350]
AJA4350 has joined #ruby
im0nde has quit [Ping timeout: 260 seconds]
dviola has joined #ruby
im0nde has joined #ruby
sepp2k has joined #ruby
Puffball has joined #ruby
Fernando-Basso has joined #ruby
desperek has quit [Quit: xoxo]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
sgen has joined #ruby
Puffball has quit [Remote host closed the connection]
reber has quit [Remote host closed the connection]
streiu has joined #ruby
vikaton has joined #ruby
impermanence has quit [Ping timeout: 268 seconds]
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
elphe has joined #ruby
venmx has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marmotini_ has quit [Remote host closed the connection]
jasmith has quit [Quit: Leaving]
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
nowhere_man has quit [Ping timeout: 268 seconds]
mzo has joined #ruby
mzo has quit [Client Quit]
chouhoulis has quit [Ping timeout: 268 seconds]
mzo has joined #ruby
ua has quit [Ping timeout: 252 seconds]
nowhere_man has joined #ruby
beefjoe has joined #ruby
nowhere_man has quit [Ping timeout: 246 seconds]
<cthulchu_> hey ma folks!
<cthulchu_> I need to write a very simple http rest client. but I suspect there's a library (gem) implementing it
<cthulchu_> in a non-blocking way that is
<cthulchu_> suggestions?
a__ has quit [Quit: Page closed]
<havenwood> cthulchu_: Typhoeus
<cthulchu_> errr
<cthulchu_> I need the opposite of that
<cthulchu_> I need a listener
<havenwood> cthulchu_: So not a client but a server?
<cthulchu_> indeed
<cthulchu_> but a very simple one
<cthulchu_> no auth, no ssl
<havenwood> cthulchu_: Routes?
<cthulchu_> clients?
<havenwood> cthulchu_: Those are clients, yes.
<cthulchu_> I don't need clients
<cthulchu_> I need a server
<havenwood> cthulchu_: Write a little Rack server, unless there's more you need.
<cthulchu_> what's rack?
<havenwood> cthulchu_: It's the gem we use in Ruby for webservers. It has a standard spec for web requests.
<orbyt_> Just use sinatra..
<cthulchu_> looks like more than what I need
<havenwood> cthulchu_: This is a simple webserver in Rack: run -> _ { [200, {'Content-Type' => 'text/plain'}, ['ok']] }
<havenwood> cthulchu_: Put that ^ in a config.ru, and run: rackup
<havenwood> cthulchu_: If you want routes and such, Roda is quite nice.
<cthulchu_> I'm gonna send json objects to my server from localhost and I need them in an array
<cthulchu_> a web-server sounds like an overkill
<cthulchu_> but maybe
<havenwood> cthulchu_: You could always use CGI.
<cthulchu_> yeah
<havenwood> cthulchu_: A Rack app isn't very heavy weight.
<cthulchu_> yeah
<cthulchu_> I think I'll glance into CGI and then if I don't enjoy it, I'll go with Rack
<cthulchu_> thanks
<havenwood> cthulchu_: This is a look at Hello World in various Rack adapters: https://github.com/luislavena/bench-micro
<havenwood> cthulchu_: Each of these can be easily run: https://github.com/luislavena/bench-micro/tree/master/apps
<cthulchu_> yeah, I like remaining on the lower level, so probably will go with cgi
<havenwood> cthulchu_: If you don't need performance, cgi is an option.
<havenwood> cthulchu_: I'd suggest Rack.
<havenwood> cthulchu_: Then Roda, when you realize you'd like routing and a plugin or two. :P
<havenwood> cthulchu_: http://roda.jeremyevans.net/
<havenwood> plugin :json
sgen has quit [Ping timeout: 268 seconds]
<streiu> I want one page to serve as the skeleton of my website. It has to be editable, I should be able to delete or add items after logging into ssl
<cthulchu_> I don't need routing. It's an insanely simple API endpoint
<cthulchu_> I honestly don't like Ruby as a backend support for a web-property
<cthulchu_> I usually go with Node for that
<cthulchu_> or PHP if I don't care
<cthulchu_> I think that CGI article is exactly what I need and actually wanted to try for a while
<cthulchu_> also it doesn't hut to implement rounting manually. A good exercise.
<havenwood> cthulchu_: An aside, but you can serve up the current directory super easy: ruby -run -ehttpd
<cthulchu_> errr
<cthulchu_> wow
<cthulchu_> really?
<havenwood> yerp
<havenwood> super handy
<cthulchu_> is it native?
<havenwood> it's un un.rb stdlib, so you an -run
<cthulchu_> right
<cthulchu_> very interesting
<cthulchu_> thanks
<havenwood> cthulchu_: de nada
<cthulchu_> cool
<havenwood> cthulchu_: For options check: ruby -run -e help httpd
<cthulchu_> I shouldn't really ask questions here at the end of the workday. Now I wanna code.
<cthulchu_> that CGI stuff is sooo interesting
<cthulchu_> oh, so CGI still needs a web-server
<cthulchu_> but I suspect Ruby has some trivial web-server
<cthulchu_> more like a network listener
nowhere_man has joined #ruby
<cthulchu_> yeah, that dude used apache
<cthulchu_> hell apache is like 20 times more than what I need
ivanskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cthulchu_> yeah well if I can't have a tiny webserver, I will go with Rack
<cthulchu_> I think it's a lot smaller than apache and stuff like it
beowuff has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
donofrio has quit [Remote host closed the connection]
beefjoe has quit [Quit: <3]
sgen has joined #ruby