havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.4.0, 2.3.3 & 2.2.6: 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
sanguisdex has quit [Client Quit]
banisterfiend has quit [Quit: Textual IRC Client: www.textualapp.com]
lightstalker has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
balazs has joined #ruby
ifctj has quit [Ping timeout: 252 seconds]
danielpclark has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
zazen has quit [Quit: WeeChat 1.0.1]
cdg_ has quit [Ping timeout: 240 seconds]
patarr has quit [Ping timeout: 248 seconds]
cschneid_ has joined #ruby
lenwood has quit [Ping timeout: 255 seconds]
malconis_ has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
saslam has joined #ruby
cschneid_ has quit [Ping timeout: 255 seconds]
sanguisdex has joined #ruby
sanguisdex has quit [Client Quit]
hutch34 has joined #ruby
charliesome has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amagawdd has quit [Ping timeout: 248 seconds]
alveric1 has joined #ruby
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
alveric has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<jaegerca> If I have a service that accepts data, but I want to be able to have it accept data in different way, like an activerecord object vs the results of an sql query, vs serialized attributes, what pattern would I use to deal with this?
D100 has joined #ruby
griffindy has joined #ruby
JeanCarloMachado has joined #ruby
whathappens has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
whathapp_ has joined #ruby
charliesome has joined #ruby
saslam has quit [Ping timeout: 240 seconds]
djuber` has joined #ruby
biberu has quit []
saneax is now known as saneax-_-|AFK
Burgestrand has quit [Quit: Closing time!]
jhack has quit [Quit: jhack]
simmib_ has joined #ruby
JoshS has joined #ruby
amagawdd has joined #ruby
djmax_ has joined #ruby
<djmax_> anyone know how to fix SSL errors with https://api.rubygems.org on alpine?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
simmib_ has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
whathapp_ has quit [Quit: Leaving...]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
fullstack has quit [Changing host]
fullstack has joined #ruby
rewolf_ has joined #ruby
rewolf_ is now known as rewolf
jenrzzz has joined #ruby
marr has quit [Ping timeout: 256 seconds]
JeanCarloMachado has joined #ruby
gusrub has quit [Remote host closed the connection]
OTORelic has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Ping timeout: 252 seconds]
<havenwood> djmax_: Do you have the ca-certificates package installed through your package manager? Are you using the latest version of RubyGems?
pawnbox has joined #ruby
<havenwood> (2.6.10)
redhedded1 has joined #ruby
djmax_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
sanguisdex has joined #ruby
username_ has quit [Ping timeout: 256 seconds]
KnownSyntax has joined #ruby
username1 has quit [Ping timeout: 264 seconds]
yfeldblu_ has joined #ruby
sanguisdex has quit [Client Quit]
amagawdd has quit [Remote host closed the connection]
herbmillerjr has quit [Quit: Konversation terminated!]
pawnbox has quit [Ping timeout: 240 seconds]
amagawdd has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
amagawdd has quit [Ping timeout: 240 seconds]
saslam has joined #ruby
Lord_of_Life has quit [Excess Flood]
herbmillerjr has joined #ruby
blackbom1 has joined #ruby
jaegerca has quit [Remote host closed the connection]
Lord_of_Life has joined #ruby
kht has quit [Ping timeout: 240 seconds]
blackbombay has quit [Ping timeout: 264 seconds]
boombox_ has joined #ruby
pawnbox has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
pawnbox has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
Azure has joined #ruby
gusrub has joined #ruby
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
blackbom1 has quit [Ping timeout: 256 seconds]
tvw has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 258 seconds]
gusrub has quit [Ping timeout: 252 seconds]
notmike has joined #ruby
<notmike> Ruby is dumb. A dying language. So sad.
blackbombay has joined #ruby
xen0fon has joined #ruby
boombox_ has quit [Remote host closed the connection]
_aeris_ has quit [Ping timeout: 240 seconds]
<havenwood> notmike: Please don't troll. See the rules in the topic.
jenrzzz has quit [Ping timeout: 240 seconds]
<notmike> Excuse me. Don't call me a troll. That's so disrespectful.
<notmike> Please read the rules.
jackjackdripper has quit [Quit: Leaving.]
<havenwood> !troll notmike
notmike was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
ecuanaso has joined #ruby
saslam has quit [Ping timeout: 240 seconds]
Chagel has joined #ruby
harai_ has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
_aeris_ has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Yacker has joined #ruby
Yacker has quit [Client Quit]
pawnbox has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
harai_ has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Remote host closed the connection]
charliesome has joined #ruby
cahoots has quit [Ping timeout: 248 seconds]
Phenix has quit []
cahoots has joined #ruby
matthewd has quit [Ping timeout: 255 seconds]
ecuanaso has joined #ruby
MontyPiethon has joined #ruby
matthewd has joined #ruby
d^sh has quit [Ping timeout: 245 seconds]
MontyPiethon has quit [Quit: WeeChat 1.4]
d^sh has joined #ruby
antoniobeyah has quit [Quit: Connection closed for inactivity]
johnmilton has joined #ruby
cahoots has quit [Ping timeout: 264 seconds]
MontyPiethon has joined #ruby
jameser has joined #ruby
howdoi has joined #ruby
pawnbox has joined #ruby
milardovich has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
johnmilton has quit [Remote host closed the connection]
duderonomy has quit [Ping timeout: 255 seconds]
pawnbox has quit [Ping timeout: 258 seconds]
djbkd has quit [Quit: My people need me...]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ecuanaso has joined #ruby
MontyPiethon has quit [Quit: WeeChat 1.4]
MontyPiethon has joined #ruby
montyboy has joined #ruby
MontyPiethon has quit [Client Quit]
shinnya has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
minimalism has joined #ruby
hutch34 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 245 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
harfangk has joined #ruby
madsa has joined #ruby
tlahtoani is now known as monshelzina
monshelzina is now known as tlahtoani
cgibsonmm has joined #ruby
griffindy has quit [Ping timeout: 260 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
cgibsonmm has quit [Remote host closed the connection]
govg has quit [Ping timeout: 264 seconds]
skweek has quit [Ping timeout: 240 seconds]
cgibsonmm has joined #ruby
cgibsonmm has quit [Remote host closed the connection]
cgibsonm_ has joined #ruby
saslam has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ecuanaso has joined #ruby
nobitanobi has joined #ruby
ramfjord has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Ping timeout: 245 seconds]
izaac has quit [Ping timeout: 240 seconds]
d^sh has quit [Ping timeout: 240 seconds]
saslam has quit [Ping timeout: 240 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matp has quit [Remote host closed the connection]
jshjsh has joined #ruby
matp has joined #ruby
d^sh has joined #ruby
cahoots has joined #ruby
JoshS has quit [Ping timeout: 240 seconds]
elado has joined #ruby
izaac has joined #ruby
bruce_lee has quit [Ping timeout: 276 seconds]
bruce_lee has joined #ruby
<elado> I'm having an issue with some http requests from ruby, and I'm not sure why. code like `require 'open-uri'; open('https://google.com').read` fails with `Net::OpenTimeout: execution expired` on my computer but works on others. ruby 2.4.0 on macOS 10.12.3. any pointers on how to debug this?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 248 seconds]
harai_ has quit [Ping timeout: 264 seconds]
kohta has joined #ruby
<elado> similar requests from node.js or simple curl work. also, some requests do work for me (e.g. https://twitter.com).
gloscombe_ has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
genpaku has quit [Remote host closed the connection]
enterprisey has joined #ruby
xall has joined #ruby
djuber` has quit [Ping timeout: 255 seconds]
sanguisdex has joined #ruby
sanguisdex has quit [Client Quit]
blackwind_123 has quit [Ping timeout: 248 seconds]
kohta has left #ruby ["Textual IRC Client: www.textualapp.com"]
harai_ has joined #ruby
pawnbox has joined #ruby
jshjsh has quit [Ping timeout: 256 seconds]
blackbom1 has joined #ruby
NickShumer has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
govg has joined #ruby
blackbombay has quit [Ping timeout: 245 seconds]
acalycine has joined #ruby
hutch34 has joined #ruby
arescorpio has joined #ruby
<acalycine> I have a list of names and their corresponding shortened names. I want to see if a variable matches any keys in the list and if it does, make that variable match the shortened name (value) instead. Here's my hash that contains them: https://gist.github.com/tnmto/5f8d93b0a0db8f59ff4a15a61e08dbce.
cgibsonm_ has quit [Remote host closed the connection]
Chagel has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
ecuanaso has joined #ruby
amclain has quit [Quit: Leaving]
Chagel has joined #ruby
djuber` has joined #ruby
Phenix has joined #ruby
ramfjord has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
Chagel has joined #ruby
cahoots has quit [Ping timeout: 240 seconds]
<baweaver> acalycine: what have you tried?
ramfjord has quit [Ping timeout: 240 seconds]
<baweaver> and notice the use of the word "if" in your original question
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
<acalycine> Yep, I could use a set of conditions, it's probably the second part when the variable will be redefined I have some trouble with
<baweaver> then you've already figured it out
<baweaver> if you have conditionals you already know the conditions by which it's redefined
<baweaver> what's the issue?
<baweaver> Give it about 10-15m of thinking, using a conditional, and see what you come up with
ta has quit [Read error: Connection reset by peer]
<baweaver> share the code back here once you have.
ta has joined #ruby
<baweaver> part of programming is being able to think these things through, so I want to see what happens when you've had some time to contemplate it.
jameser_ has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
GarouDan has quit [Quit: Konversation terminated!]
needhelp has joined #ruby
pawnbox has joined #ruby
needhelp is now known as Guest13669
<Guest13669> hi, i'm a pretty new ruby coder, i wonder how i can add different parts of an array? like it's ["1", "2", "3", "3", "2", "1"], and i want to 1 + 2 + 3 and 3 + 2 + 1 then compare the sums
jtdowney has quit [Quit: ZNC]
pawnbox has quit [Ping timeout: 264 seconds]
<Guest13669> should i use array.inject or something?
yfeldblu_ has quit [Remote host closed the connection]
Ropeney has joined #ruby
<tlahtoani> ["1", "2", "3"].map { |x| Integer(x) }.inject(0, :+)
NickShumer has quit [Ping timeout: 260 seconds]
jtdowney has joined #ruby
<baweaver> tlahtoani: ineffecient.
<acalycine> Get nil output, have a feeling I'm not using select? right. https://gist.github.com/tnmto/3fbb4ce8b54b6591853236f2d9c63140
<baweaver> ["1", "2", "3", "3", "2", "1"].reduce(0) { |a, s| a + s.to_i }
<zacts> hello rubyists
<zacts> is it worthwhile to read the source code of gems to learn how to program Ruby?
<zacts> like to gain ideas.
<baweaver> In some ways
<baweaver> read Eloquent Ruby to get a good overall view
<zacts> ah ok
<zacts> cool
<tlahtoani> Who actually cares about efficiency in a small case like this
<acalycine> Good practice?
<baweaver> It's also bad form
<baweaver> don't loop twice when you only need one
jared_nyc has joined #ruby
<Guest13669> im a noob i just want my kyu :D will get more efficient when im on rails
<tlahtoani> Pretty sure any JIT implementation will just optimize it to virtually the same thing anyway
<baweaver> Guest13669: Learn ruby first, it'll make things easier
triangles2 has joined #ruby
<baweaver> Getting a solid ground helps a lot in Rails later.
<baweaver> I've interviewed several who mention that they know Rails but don't really know Ruby. Does not make a good impression.
<Guest13669> yea im starting in ruby now dont plan on rails for many months maybe a year
<baweaver> Probably won't take that long
<baweaver> &ri Hash
<tlahtoani> Ruby probably won't take more than a few months
<baweaver> acalycine: read it
<baweaver> pay attention to accessors
triangles has quit [Ping timeout: 248 seconds]
<baweaver> [] specifically
amagawdd has joined #ruby
<baweaver> If it's your first, yeah, it'll take a bit
djuber` has quit [Ping timeout: 255 seconds]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest13669> baweaver: how do i get 2 numbers output from that command? right now i just get 12
<lupine> probably best to steer clear of rails ;)
<baweaver> What's the exact problem description?
<baweaver> Also, read through:
<baweaver> &ri Enumerable
charliesome has joined #ruby
<Guest13669> In Russia regular bus tickets usually consist of 6 digits. The ticket is called lucky when the sum of the first three digits equals to the sum of the last three digits. Write a function to find out whether the ticket is lucky or not.
<Guest13669> then they test with a lot of numbers so i can't really fool it
nofxx has joined #ruby
<baweaver> Then find a way to get the array into two parts
pilne has joined #ruby
<baweaver> &ri Array
<baweaver> Read into that
<baweaver> look for ways to get parts of an Array
<Guest13669> ty
pawnbox has joined #ruby
pawnbox has quit [Ping timeout: 258 seconds]
Chagel has quit [Ping timeout: 245 seconds]
arescorpio has quit [Quit: Leaving.]
Chagel has joined #ruby
wilbert has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
amagawdd has quit [Remote host closed the connection]
danielpclark has quit [Remote host closed the connection]
gix has quit [Ping timeout: 240 seconds]
ecuanaso has joined #ruby
gix has joined #ruby
hahuang62 has quit [Read error: Connection reset by peer]
hahuang65 has joined #ruby
reverberations has joined #ruby
<acalycine> Yep, I don't understand at all why the "block" in my command wouldn't work.
<acalycine> `teamnames.select{|k,v| k = longteam}`
djbkd has joined #ruby
<acalycine> One of the keys does equal "West Coast", if I'm understanding correctly that ^ basically says "select where k is equal to "West Coast""
<nofxx> acalycine: ==
<acalycine> Or should it be |v|?
<acalycine> Oh.
<nofxx> if it's they keys you're search your code is correct
Anonymoose2 has quit [Ping timeout: 248 seconds]
<nofxx> you're searching*
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acalycine> that's what i'm searching
wilbert has quit [Ping timeout: 245 seconds]
<acalycine> But, that does work. Thanks.
danielpclark has joined #ruby
yfeldblum has joined #ruby
<nofxx> acalycine: try using spaces around brackets, it's more readable .select { |k, _v| .....
<nofxx> and after commas
<acalycine> I was doing that, but the docs didn't do that
<acalycine> "h.select {|k,v| k > "a"}"
<acalycine> What the docs say
<nofxx> ruby docs? strange. I'm pretty sure spaces is the convention
<acalycine> Same.
<acalycine> My linter or whatever said what you said as well
<nofxx> yup... the _ is vor unused var
<nofxx> you can't not put it there, it wont split key/val
<acalycine> Ah.
<elomatreb> nofxx: Spaces before the pipes is one convention (rubocop), there are alternatives
<nofxx> elomatreb: reads better imho
<elomatreb> Sure, I agree, I just wanted to highlight that there is no "official" style for Ruby
<baweaver> .....you do realize that he's simulating a literal hash[key] right?
<baweaver> Which is why I linked to Hash
<elomatreb> No backlog, sorry
<baweaver> lines 5 to 9 can be replaced literally with teamnames[longteam]
JoshS has joined #ruby
<baweaver> I was just hoping that they'd find that in the Hash documentation I'd linked
cgibsonmm has joined #ruby
pawnbox has joined #ruby
<baweaver> Anyways, acalycine, you really should just go through a Ruby tutorial.
CloCkWeRX has joined #ruby
<baweaver> and then this one if you want to go deeper into it and how to write Ruby like Ruby: https://www.amazon.com/Eloquent-Ruby-Addison-Wesley-Professional/dp/0321584104
<baweaver> you'll save yourself several hours of questions by going through one
<baweaver> The other common recommendation is the Pickaxe book: https://www.amazon.com/Programming-Ruby-1-9-2-0-Programmers/dp/1937785491
saslam has joined #ruby
danielpclark has quit [Remote host closed the connection]
* baweaver should make a book list for Ruby as well
<baweaver> I haven't read the Pickaxe book yet, but I tend to read most new Ruby books as they come out
danielpclark has joined #ruby
xall has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
xall has joined #ruby
gnufied__ has quit [Ping timeout: 255 seconds]
cgibsonmm has quit [Remote host closed the connection]
Guest13669 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
brandon_ has quit [Ping timeout: 255 seconds]
xall has quit [Ping timeout: 245 seconds]
brandon_ has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
triangles3 has joined #ruby
hutch34 has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
johnny56_ has joined #ruby
kht has joined #ruby
triangles2 has quit [Ping timeout: 248 seconds]
tmtwd has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
zapata has quit [Quit: WeeChat 1.7]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
markholmes has joined #ruby
danielpclark has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
nofxxx has joined #ruby
nofxx has quit []
bruce_lee has quit [Read error: Connection reset by peer]
danielpclark has joined #ruby
VladGh has quit [Ping timeout: 255 seconds]
Channel6 has joined #ruby
shinnya has quit [Ping timeout: 264 seconds]
triangles3 has quit [Quit: Leaving]
VladGh has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
kht has quit [Ping timeout: 256 seconds]
nobitanobi has joined #ruby
xall has joined #ruby
xall_ has joined #ruby
xall has quit [Ping timeout: 240 seconds]
xall_ has quit [Ping timeout: 256 seconds]
dagelf has quit [Remote host closed the connection]
dagelf has joined #ruby
tlahtoani has quit [Quit: Connection closed for inactivity]
huddy has quit [Quit: Connection closed for inactivity]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AnoHito_ has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
charliesome has joined #ruby
AnoHito_ has joined #ruby
patarr has joined #ruby
cschneid_ has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
nobitanobi has quit [Remote host closed the connection]
kht has joined #ruby
Channel6 has quit [Quit: Leaving]
jetpack_joe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
blackbom1 has quit [Ping timeout: 245 seconds]
ifctj has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
kht has quit [Ping timeout: 245 seconds]
pawnbox has joined #ruby
Phenix is now known as Teddy
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
sanguisdex has joined #ruby
saslam_ has joined #ruby
sanguisdex has quit [Client Quit]
saslam has quit [Ping timeout: 240 seconds]
dc4 has joined #ruby
Toordog- has joined #ruby
<Toordog-> hi, i'm following a short tutorial about using ruby to perform api call and use URI.encode_www_form but for some reason, the line from the tutorial is not working. https://hastebin.com/depikuqopu.coffeescript
<Toordog-> ruby -ruri -e 'puts RUBY_VERSION; puts URI.encode_www_form(:query => %Q'["and", ["=", "certname", "#{node['name']}"],["<", "timestamp", "#{ftime_now}"],[">", "timestamp", "#{ftime_past}"],["=", "latest-report?", "true"]]', :'summarize-by' => 'certname', :'count-by' => 'resource')'
Teddy is now known as RasAIGhoul
Jackneill has joined #ruby
<apeiros> "unterminated string meets end of file"
<apeiros> you open a string and don't close it
lizard2010 has joined #ruby
lizard2010 has quit [Read error: Connection reset by peer]
saslam_ has quit [Ping timeout: 248 seconds]
<apeiros> and yeah, if you use -e '', then you should not use ' inside the code
<Toordog-> aww ok
<Toordog-> can i escape it?
<apeiros> '\''
<Toordog-> ok
<apeiros> IMO better use another delimiter
pawnbox has quit [Remote host closed the connection]
<apeiros> %Q{} instead of %Q'' f.ex.
<apeiros> the %Q is pointless when using ' anyway
<apeiros> i.e. use " where possibe, %Q{} where you have "s in the value
tmtwd has quit [Ping timeout: 245 seconds]
<Toordog-> what do you mean with "s ?
<Toordog-> or plurial of " ?
<apeiros> yupp
<apeiros> *plural
harfangk has joined #ruby
RasAIGhoul is now known as idoIator
<Toordog-> just not too sure where to use {}
<apeiros> instead of %Q'string' you do %Q{String}
<Toordog-> %Q{[.... "true"]]} ?
<apeiros> nested {} are no problem as long as they're balanced
<apeiros> >> %Q{foo {bar} baz}
<ruby[bot]> apeiros: # => "foo {bar} baz" (https://eval.in/730157)
<apeiros> >> %Q{"foo" {"bar"} "baz"}
<ruby[bot]> apeiros: # => "\"foo\" {\"bar\"} \"baz\"" (https://eval.in/730158)
<Toordog-> :query => %Q{["and", ["=", "certname", "#{node["name"]}"],["<", "timestamp", "#{ftime_now}"],[">", "timestamp", "#{ftime_past}"],["=", "latest-report?", "true"]]}, :"summarize-by" => "certname", :"count-by" => "resource")
Jackneill has quit [Remote host closed the connection]
cgibsonmm has joined #ruby
<Toordog-> of course i have the opening ( of the URI.encode_www_form at the beginning
<Toordog-> <main>': undefined local variable or method `node' for main:Object (NameError)
swills has quit [Ping timeout: 240 seconds]
<Toordog-> wait a sec, it is probably coming from my parent code
hutch34 has joined #ruby
Tempesta has quit [Quit: See ya!]
yfeldblum has joined #ruby
Jackneill has joined #ruby
ejnahc has quit [Ping timeout: 245 seconds]
ejnahc has joined #ruby
jshjsh has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
toretore has joined #ruby
JoshS has quit [Ping timeout: 264 seconds]
pilne has quit [Quit: Quitting!]
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
<karapetyan> hi guys!
Tempesta has joined #ruby
enterprisey has quit [Remote host closed the connection]
cgibsonmm has quit [Remote host closed the connection]
clauswitt has joined #ruby
<apeiros> hi girl
Cohedrin_ has joined #ruby
clauswitt has quit [Client Quit]
pawnbox has joined #ruby
<Toordog-> is there a way to display my URI as it would in a browser?
djbkd has quit [Quit: Leaving...]
<apeiros> Toordog-: not sure where your problem is with that - `puts your_uri` should do it
pawnbox has quit [Ping timeout: 260 seconds]
<Toordog-> just i get an error now : Missing required query parameter 'summarize_by'
<Toordog-> seems like my query is badly form
shinnya has joined #ruby
<apeiros> you understand that this information without any context does not in any way help me understand your problem, yes?
<Toordog-> sorry, you are right, i'm trying to build a request on puppetdb: uri = URI.parse('http://puppetmaster.localdomain.loc:8080/pdb/query/v4/event-counts')
nadir has quit [Quit: Connection closed for inactivity]
<Toordog-> the book i'm following was written for a previous version of the API i think
<Toordog-> from the puppetdb documentation about converting from previous version to latest, i don't see anything wrong other than the URL to reach the endpoint that changed.
<apeiros> so the complaint comes from puppetdb, not ruby?
<Toordog-> but the ruby function to encode the URI is confusing me and i cannot figure out how the url would look like to compare with the doc
<Toordog-> apeiros i try to resolve an issue with puppetdb api query, but i use ruby to do it ...
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> that much I understood. but is it a ruby exception because a ruby method misses a parameter, or is it the puppetdb API which returns an error?
ta has quit [Read error: Connection reset by peer]
<Toordog-> at this point the puppetdb return an error because i malform my URI, I would like to be able to translate the parameter pass in the function encode_www_form into the final URI so i can compare with teh doc if something is wrong.
<Toordog-> is it possible?
djbkd has joined #ruby
tomphp has joined #ruby
blackbom1 has joined #ruby
karapetyan has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
lenwood has joined #ruby
ta has joined #ruby
blackbom1 has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
brent__ has joined #ruby
yfeldblum has quit [Quit: Leaving...]
Burgestrand has joined #ruby
blackwind_123 has joined #ruby
hahuang65 has quit [Ping timeout: 255 seconds]
brent__ has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
karapetyan has joined #ruby
<apeiros> Toordog-: sorry, reallife interrupted
karapetyan has quit [Remote host closed the connection]
<Toordog-> don't worry :) middle of the night for me,
<apeiros> Toordog-: yes, it is possible. all stuff you transmit via http is just text after all (well, or binary, but encode_www_form isn't binary)
<Toordog-> ok
karapetyan has joined #ruby
<apeiros> hm, and http2 is binary too I guess. but I assume you're not using http2 :D
karapetyan has quit [Remote host closed the connection]
<Toordog-> i don't believe i use http2
<Toordog-> or i haven't seen it specified anywhere
<apeiros> I'm not even sure net/http supports it yet
phaza_ has joined #ruby
pawnbox has joined #ruby
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
lxsameer has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
patarr has joined #ruby
Mia has quit [Ping timeout: 245 seconds]
karapetyan has joined #ruby
cschneid_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
patarr has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
<acalycine> Does Hash#each allow you to recursively look through for a certain value? I want to match the "homeTeamName" in this: https://gist.github.com/tnmto/5a49b5a2e287035f62e3266768344a0a
minimalism has quit [Quit: minimalism]
nobitanobi has joined #ruby
karapetyan has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
<apeiros> acalycine: #each does not do recursion, no
<apeiros> but you can use each to build your recurring iterator
gloscombe_ has joined #ruby
<acalycine> How so?
<apeiros> acalycine: your datastructure does not look like a tree, though. so not sure why you'd want recursion.
krz has joined #ruby
<Toordog-> going to sleep. nighty night ! ;)
<matthewd> acalycine: You really don't need to "look through" a Hash
karapetyan has joined #ruby
cahoots has joined #ruby
<matthewd> acalycine: That's.. the point of a hash.
karapetyan has quit [Remote host closed the connection]
<acalycine> But there's multiple entries for "homeTeamName"?
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<acalycine> If my input was "CARL", how could I find where that is?
<matthewd> "find where"?
EckT has joined #ruby
gloscombe_ has quit [Read error: Connection reset by peer]
<acalycine> Yeah, I don't get the terminology. My end goal is to fetch the "matchID" of the {} that contains the matching "homeTeamName"
<acalycine> So, 20170140101
<matthewd> Okay, so you need to find the array entry that has the homeTeamName you're looking for
<acalycine> Yep.
nobitanobi has quit [Ping timeout: 252 seconds]
gloscombe_ has joined #ruby
<matthewd> So, to find it, you'll need a method that can detect the entry you're looking for
<matthewd> On the Array.
<acalycine> Ah.
<apeiros> acalycine: in a single hash, there's only *one* entry with a key
<apeiros> you have an *array* of hashes
<acalycine> Understood
<apeiros> this is not recursion
Devalo_ has quit [Remote host closed the connection]
<apeiros> this is a flat search/filter
<apeiros> and that'd be Array#select or #find, depending on whether you want all, or the first which matches
<acalycine> Isn't it looking through the arrays and matching values?
<apeiros> it is looking through the array, finding one hash/many hashes which have a matching value under their "homeTeamName" key
<matthewd> apeiros isn't playing my "unsubtly use the method names in a sentence" game ;)
Toordog- has quit [Read error: Connection reset by peer]
<apeiros> matthewd: sorry, being distracted a bit :-S
<acalycine> So not Hash#, but Array#.
<acalycine> I'm looking through the wrong docs then.
cahoots has quit [Ping timeout: 245 seconds]
<apeiros> matthewd: I'll leave the game up to you :) I should probably put my attention on this comparatively important deploy anyway :D
<acalycine> &ri Array
<matthewd> acalycine: You'll need to get the value from each hash, to decide whether it's the one you're looking for -- but the main point is the iteration over the array
<matthewd> apeiros: Heh, you were being actually helpful, so ¯\_(ツ)_/¯
<apeiros> matthewd: sure, but it's IMO better if it's a single person who has a plan than rando's shouting stuff (even if helpful)
<apeiros> at least I hate it when I have a plan on how to lead somebody to their solution and others disrupt it with helpful shouts :)
<matthewd> acalycine: Is this your data, btw, or from elsewhere?
<acalycine> From somewhere else.
<matthewd> Okay, I won't bother telling you that the venueName choices seem unwise, then :)
<acalycine> Haha, how so?
<matthewd> Sponsorships change; these are likely to not line up year to year
<acalycine> True.
<acalycine> I call it Docklands
hyperionel has joined #ruby
<acalycine> Why's the method called "find" but the example uses ".detect"? http://ruby-doc.org/core-1.9.3/Enumerable.html#method-i-find
marr has joined #ruby
<matthewd> It's an alias; both are valid
<acalycine> Oh.
<acalycine> Wow, it worked.
rippa has joined #ruby
harai_ has quit [Ping timeout: 276 seconds]
cgibsonmm has joined #ruby
<apeiros> ruby sadly has a ton of non-semantically-required aliases
<apeiros> (example of semantically required aliases: ==, eql?, equal? for classes where they do the same)
Mutter has joined #ruby
Fernando-Basso has joined #ruby
krz has quit [Quit: WeeChat 1.7]
cgibsonmm has quit []
Mutter has quit [Client Quit]
Mutter has joined #ruby
Mutter has quit [Client Quit]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
grh has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mutter has joined #ruby
Jackneill has quit [Remote host closed the connection]
hutch34 has joined #ruby
blackbom1 has joined #ruby
Mutter has quit [Client Quit]
jenrzzz has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
ponga has quit [Client Quit]
JoshS has joined #ruby
ifctj has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
bungoman has quit [Read error: Connection reset by peer]
jshjsh has quit [Ping timeout: 240 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
groovy2shoes has joined #ruby
Jackneill has quit [Remote host closed the connection]
jshjsh has joined #ruby
idoIator has quit [Quit: Connection closed for inactivity]
charliesome has joined #ruby
JoshS has quit [Ping timeout: 240 seconds]
Jackneill has joined #ruby
Devalo has joined #ruby
kloeri has joined #ruby
Devalo has quit [Ping timeout: 264 seconds]
zeroDi has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davezd has joined #ruby
charliesome has joined #ruby
marr has quit [Ping timeout: 252 seconds]
pawnbox has quit [Remote host closed the connection]
xen0fon has quit [Ping timeout: 255 seconds]
ledestin has quit [Quit: Textual IRC Client: www.textualapp.com]
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
cyphase has quit [Ping timeout: 252 seconds]
Burgestrand has quit [Quit: Closing time!]
cyphase_eviltwin has joined #ruby
milardovich has joined #ruby
browndawg has joined #ruby
brent__ has joined #ruby
hahuang65 has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
pawnbox has joined #ruby
brent__ has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 252 seconds]
izaac has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 240 seconds]
milardovich has quit [Ping timeout: 252 seconds]
izaac has joined #ruby
blackmesa has joined #ruby
Jackneill has quit [Remote host closed the connection]
sepp2k has joined #ruby
patarr has joined #ruby
lxsameer has quit [Ping timeout: 245 seconds]
patarr has quit [Ping timeout: 240 seconds]
jameser_ has quit [Ping timeout: 276 seconds]
aryaching has joined #ruby
brent__ has joined #ruby
aryaching_ has quit [Ping timeout: 240 seconds]
brent__ has quit [Ping timeout: 248 seconds]
ych has joined #ruby
ocbtec has joined #ruby
r__rios has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
Jackneill has joined #ruby
r__rios has joined #ruby
Jackneill has quit [Remote host closed the connection]
Jackneill has joined #ruby
marr has joined #ruby
davezd has quit [Ping timeout: 240 seconds]
nofxxx has quit [Ping timeout: 240 seconds]
dc4 has quit [Ping timeout: 248 seconds]
ifctj has joined #ruby
nankyokusei has joined #ruby
JeanCarloMachado has joined #ruby
grh has quit [Ping timeout: 245 seconds]
phaza has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phaza_ has quit [Ping timeout: 255 seconds]
Jackneill has quit [Remote host closed the connection]
nankyokusei has quit [Remote host closed the connection]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackwind_123 has quit [Ping timeout: 264 seconds]
blackwind_123 has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lenwood has quit [Ping timeout: 240 seconds]
Chagel has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Excess Flood]
balo has joined #ruby
BackEndCoder has joined #ruby
balo has quit [Client Quit]
hutch34 has joined #ruby
ocbtec has quit [Quit: leaving]
ych has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
balo has joined #ruby
govg has quit [Ping timeout: 240 seconds]
lyda has joined #ruby
<lyda> i need to use mmap in ruby and am not finding any current implementations.
<lyda> this one won't build with the ruby 2.3.1: https://github.com/tenderlove/mmap
c355e3b has joined #ruby
cyphase_eviltwin has quit [Ping timeout: 256 seconds]
<apeiros> lyda: I'd ping tenderlove about it. he's pretty active.
<lyda> digging around some more it seems like it's the gem that's out of date.
tk__ has joined #ruby
Jackneill has joined #ruby
gloscombe_ has quit [Quit: gloscombe_]
Devalo has joined #ruby
cyphase has joined #ruby
patarr has joined #ruby
Devalo has quit [Ping timeout: 264 seconds]
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nicolai86 has quit [Quit: ZNC - http://znc.in]
patarr has quit [Ping timeout: 240 seconds]
nicolai86 has joined #ruby
cyphase has quit [Ping timeout: 240 seconds]
<lyda> apeiros: thanks. filed a ticket.
ych has joined #ruby
<matthewd> oh, hah... yeah, that's not gonna work
xen0fon has joined #ruby
<matthewd> lyda: If you'd like to make a PR to fix it, I think the VERSION constant needs to move to a new mmap/version.rb
blackbom1 has quit [Ping timeout: 256 seconds]
gnufied__ has joined #ruby
xen0fon has quit [Remote host closed the connection]
xen0fon has joined #ruby
xen0fon has quit [Read error: Connection reset by peer]
cyphase has joined #ruby
xen0fon has joined #ruby
xen0fon1 has joined #ruby
swills has joined #ruby
gnufied__ has quit [Ping timeout: 255 seconds]
<lyda> so 2,4d and s/Mmap::VERSION/'0.2.7'/ ?
xen0fon1 has quit [Client Quit]
karapetyan has joined #ruby
haxrbyte has joined #ruby
xen0fon has quit [Ping timeout: 240 seconds]
marr has quit [Read error: Connection reset by peer]
haxrbyte has quit [Client Quit]
banisterfiend has joined #ruby
nowhereman has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
dviola has joined #ruby
karapetyan has joined #ruby
<alex``> how convert [1,2,3,2,3,1,4] → [[1,2,3],[2,3],[1,4]]
<alex``> ?
jameser has joined #ruby
milardovich has joined #ruby
<matthewd> alex``: Look through the methods on Array and Enumerable for something that seems relevant
<alex``> I don’t see xD
<matthewd> alex``: Okay... describe what you want it to do
<alex``> i want convert list of headers to table of contents
<lyda> matthewd: thanks. did it with the version.rb way.
<matthewd> lyda: It needs to do in an mmap/ subdirectory
<matthewd> lyda: Otherwise this gem would be publishing a top-level 'version' file that would be require-able from anywhere
<lyda> hm... it's already been fixed in another PR: https://github.com/tenderlove/mmap/pull/4/files
<matthewd> Hmm.. that's a bad fix, for the above reason
govg has joined #ruby
<lyda> and it seems to have a similar issue?
<lyda> yes.
<lyda> ok. i'll try again. :)
<matthewd> Yep. And the require_relative change seems unnecessary. Yours, but with the file moved, should be good.
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman has quit [Ping timeout: 248 seconds]
<matthewd> alex``: Oh, then maybe I'm mis-guessing the rule you want applied from the single example you've shown
<matthewd> alex``: Can you describe the actual rule in words? Then we can try to find a suitable method.
jameser has joined #ruby
tdy has quit [Quit: WeeChat 1.7]
tk__ has left #ruby ["ばいばい"]
karapetyan has quit [Remote host closed the connection]
<lyda> that change did include a manifest change i was missing however.
<matthewd> Ah, indeed
jameser has quit [Client Quit]
hinbody has quit [Quit: leaving]
snath has joined #ruby
snath has left #ruby [#ruby]
clauswitt has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
<lyda> hm. it uses hoe i think to build the external .so.
<lyda> which isn't working on os x.
lxsameer has joined #ruby
<lyda> ah. no. rake compile works. rake on it's own does not.
cyphase has quit [Ping timeout: 255 seconds]
Jackneill has quit [Read error: Connection reset by peer]
clauswitt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
futilegames has joined #ruby
nobitanobi has joined #ruby
__Yiota has joined #ruby
cyphase has joined #ruby
Azure has quit [Ping timeout: 252 seconds]
Jackneill has joined #ruby
milardovich has quit [Ping timeout: 240 seconds]
nobitanobi has quit [Ping timeout: 240 seconds]
futilegames has quit [Ping timeout: 245 seconds]
lenwood has joined #ruby
<danielpclark> exit
Azure has joined #ruby
JeanCarloMachado has joined #ruby
Lord_of_Life has quit [Excess Flood]
__Yiota has quit [Read error: Connection reset by peer]
Jackneill has quit [Remote host closed the connection]
hotpancakes has joined #ruby
ecuanaso has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
UserJosh has joined #ruby
Lord_of_Life has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jshjsh has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
jameser has joined #ruby
UnknownSoldier has joined #ruby
karapetyan has joined #ruby
jameser has quit [Client Quit]
hotpancakes has quit []
JeanCarloMachado has quit [Ping timeout: 256 seconds]
jameser has joined #ruby
<lyda> so if you install a gem from source, how do you get it to compile (assuming it has bits in c)?
<lyda> bundle install doesn't seem to do it.
polysics has joined #ruby
cyphase has quit [Ping timeout: 240 seconds]
jameser has quit [Client Quit]
blingrang has quit [Quit: WeeChat 1.3]
karapetyan has quit [Ping timeout: 276 seconds]
Jackneill has joined #ruby
<matthewd> lyda: Oh. It should.. but that depends on the gemspec telling it what to do.
<matthewd> Looks like the recent-ish addition of the gemspec was pretty half-hearted
<lyda> i was guessing that.
<lyda> is there a ...
jameser has joined #ruby
<lyda> right, thanks.
<lyda> i looked at the bundle gemspec / version.rb for the version stuff.
jameser has quit [Client Quit]
cyphase has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
<matthewd> It's documented in http://guides.rubygems.org/gems-with-extensions/#gem-specification, but yeah, my default solution for that sort of thing is to just find something similar to steal from :)
__Yiota has joined #ruby
jameser has joined #ruby
jhack has joined #ruby
simmib has joined #ruby
balazs has quit [Remote host closed the connection]
jhack has quit [Client Quit]
jhack has joined #ruby
acalycine has quit [Quit: bye]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
jameser has joined #ruby
jameser has quit [Client Quit]
hutch34 has quit [Ping timeout: 240 seconds]
blackbom1 has joined #ruby
jameser has joined #ruby
markholmes has quit [Ping timeout: 255 seconds]
jetpack_joe has joined #ruby
milardovich has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
millerti has joined #ruby
milardovich has quit [Ping timeout: 258 seconds]
Devalo has joined #ruby
kobain has joined #ruby
leitz has joined #ruby
renchan has joined #ruby
Devalo has quit [Ping timeout: 264 seconds]
jameser has joined #ruby
dionysus69 has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
jameser has quit [Client Quit]
jameser has joined #ruby
whiteline_ has joined #ruby
polysics has quit [Remote host closed the connection]
whiteline_ has quit [Remote host closed the connection]
polysics has joined #ruby
byte512 has joined #ruby
JoshS has joined #ruby
jared_nyc has quit [Quit: Connection closed for inactivity]
jshjsh has joined #ruby
tlahtoani has joined #ruby
pawnbox has quit [Remote host closed the connection]
UserJosh has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
polysics has quit [Ping timeout: 245 seconds]
JoshS has quit [Ping timeout: 256 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
jameser has joined #ruby
shinnya has joined #ruby
Rodya_ has joined #ruby
markholmes has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
nankyokusei has quit [Ping timeout: 256 seconds]
govg has quit [Ping timeout: 240 seconds]
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
dionysus70 is now known as dionysus69
milardovich has joined #ruby
milardovich has quit [Read error: Connection reset by peer]
<leitz> I think my brain is melting. I've been watching Robert Martin's Clean Code videos and reading the book. Working on the same code I started two years ago when I started getting into Ruby. Trying to face all the refactoring that needs to be done...
blackmesa has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
milardovich has quit [Client Quit]
iwmrby has joined #ruby
jhack has quit [Quit: jhack]
nankyokusei has joined #ruby
renchan has quit [Remote host closed the connection]
nobitanobi has joined #ruby
nobitanobi has quit [Read error: No route to host]
nobitanobi has joined #ruby
<leitz> Is it reasonable to have an instance of a class be passed to a different class for modifications?
polysics has joined #ruby
nobitanobi has quit [Ping timeout: 255 seconds]
pawnbox has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
simmib has quit [Remote host closed the connection]
JoshS has joined #ruby
simmib has joined #ruby
markholmes has quit [Remote host closed the connection]
jshjsh has quit [Ping timeout: 256 seconds]
EckT_ has joined #ruby
blackmesa has joined #ruby
EckT has quit [Ping timeout: 248 seconds]
simmib has quit [Remote host closed the connection]
simmib_ has joined #ruby
jay_east has joined #ruby
djuber` has joined #ruby
jay_east has quit [Max SendQ exceeded]
karapetyan has joined #ruby
Azure has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
leitz has quit [Quit: Nappy time]
simmib_ has quit [Ping timeout: 260 seconds]
railswebdev has joined #ruby
Guest69 has joined #ruby
grh has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
polysics has quit []
sylario has joined #ruby
vnzvg has joined #ruby
karapetyan has quit [Remote host closed the connection]
jameser has joined #ruby
ryan_notabot has joined #ruby
lenwood has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
ryan_notabot has quit [Remote host closed the connection]
ryan_notabot has joined #ruby
Azure has joined #ruby
DLSteve has joined #ruby
jameser has quit [Max SendQ exceeded]
karapetyan has joined #ruby
pragmaticus has joined #ruby
Rodya_ has quit [Quit: Leaving...]
mwlang has joined #ruby
blackbom1 has quit [Ping timeout: 252 seconds]
tomphp has joined #ruby
matp has quit [Remote host closed the connection]
matp has joined #ruby
ifctj has quit [Ping timeout: 258 seconds]
karapetyan has quit [Ping timeout: 245 seconds]
leitz has joined #ruby
leitz has quit [Client Quit]
EckT_ has quit [Read error: Connection reset by peer]
UnknownSoldier is now known as Mumm-ra
EckT has joined #ruby
nadir has joined #ruby
pawnbox has joined #ruby
jameser has joined #ruby
nobitanobi has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
pilne has joined #ruby
montyboy has quit [Ping timeout: 245 seconds]
xen0fon has joined #ruby
montyboy has joined #ruby
hutch34 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
Mumm-ra is now known as Tau
dviola has quit [Quit: WeeChat 1.7]
xall_ has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
dionysus69 has joined #ruby
lenwood has joined #ruby
JeanCarloMachado has joined #ruby
vnzvg has quit [Remote host closed the connection]
karapetyan has joined #ruby
EckT_ has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EckT has quit [Ping timeout: 264 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
xall_ has quit [Ping timeout: 240 seconds]
ocbtec has joined #ruby
adfg has joined #ruby
montyboy has quit [Ping timeout: 240 seconds]
montyboy has joined #ruby
pawnbox has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 248 seconds]
xen0fon has quit [Ping timeout: 255 seconds]
naftilos76 has joined #ruby
jshjsh has joined #ruby
Silthias1 has joined #ruby
Devalo has joined #ruby
Silthias has quit [Ping timeout: 256 seconds]
JoshS has quit [Ping timeout: 245 seconds]
hutch34 has joined #ruby
govg has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
xall_ has joined #ruby
EckT_ has quit [Quit: -a- IRC for Android 2.1.32]
Devalo has quit [Ping timeout: 264 seconds]
nankyokusei has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 258 seconds]
karapetyan has joined #ruby
lenwood has quit [Ping timeout: 255 seconds]
shinnya has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
nobitanobi has quit [Remote host closed the connection]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leitz has joined #ruby
patarr has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
adfg has quit [Remote host closed the connection]
pawnbox has joined #ruby
karapetyan has quit [Remote host closed the connection]
<leitz> If you want to include a mixin that is a separate file, you also have to require it?
hutch34 has quit [Ping timeout: 240 seconds]
blackbom1 has joined #ruby
simmib has joined #ruby
patarr has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
chouhoulis has joined #ruby
jackjackdripper has joined #ruby
jackjackdripper has quit [Client Quit]
blackbom1 has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
chouhoulis has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
xall_ has quit [Ping timeout: 256 seconds]
karapetyan has joined #ruby
leitz has quit [Quit: Nappy time]
karapetyan has quit [Ping timeout: 240 seconds]
simmib has quit [Remote host closed the connection]
simmib_ has joined #ruby
simmib_ has quit [Remote host closed the connection]
simmib_ has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
renchan has joined #ruby
tlahtoani has quit [Quit: Connection closed for inactivity]
Anonymoose2 has joined #ruby
simmib_ has quit [Remote host closed the connection]
simmib_ has joined #ruby
reverberations has quit [Ping timeout: 240 seconds]
Channel6 has joined #ruby
dcluna has quit [Ping timeout: 240 seconds]
dcluna has joined #ruby
<apeiros> include operates on modules
<apeiros> require operates on files
<apeiros> so yes, you have to load the code containing the module before including it
<apeiros> oh dear, they went offline again?
simmib_ has quit [Ping timeout: 256 seconds]
hanmac has quit [Ping timeout: 256 seconds]
roflmyeggo has joined #ruby
malconis has joined #ruby
simmib has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
simmib has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
ryan_notabot has quit [Ping timeout: 240 seconds]
mtkd has joined #ruby
elado has quit []
bkxd has joined #ruby
nowhereman has joined #ruby
hanmac has joined #ruby
xall_ has joined #ruby
JeanCarloMachado has joined #ruby
bkxd has quit [Ping timeout: 258 seconds]
Guest69 has joined #ruby
ddffg has joined #ruby
railswebdev has joined #ruby
Vile` has joined #ruby
spiette has quit [Ping timeout: 248 seconds]
nankyokusei has joined #ruby
mwlang has quit [Quit: mwlang]
bkxd has joined #ruby
danielpclark has quit [Ping timeout: 240 seconds]
harai_ has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
lanc has joined #ruby
lanc has left #ruby [#ruby]
armyriad has quit [Ping timeout: 255 seconds]
lanc has joined #ruby
chouhoulis has joined #ruby
iwmrby has quit [Quit: WeeChat 1.7]
danielpclark has joined #ruby
xen0fon has joined #ruby
dviola has joined #ruby
szulak has joined #ruby
Guest83899 is now known as c-c
bkxd has joined #ruby
skweek has joined #ruby
pancakebreakfast has joined #ruby
pancakebreakfast has quit [Client Quit]
bkxd has quit [Ping timeout: 240 seconds]
FMan has quit [Quit: Nettalk6 - www.ntalk.de]
Tau has quit [Remote host closed the connection]
Technodrome has joined #ruby
<Technodrome> Good day
Guest13669 has joined #ruby
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
hanmac has left #ruby [#ruby]
karapetyan has joined #ruby
bkxd has joined #ruby
djuber` has quit [Ping timeout: 264 seconds]
tomphp has joined #ruby
verumnost has joined #ruby
agent_white has joined #ruby
Tempesta has quit [Quit: See ya!]
<verumnost> can someone tell me why this happens http://stackoverflow.com/questions/21384040/why-the-terminal-shows-a-b-c-d-when-pressing-the-arrow-keys in IRB only for me ?
<agent_white> Mornin' folks
<verumnost> I am using terminal & iterm and everything works fine in shell except in irb when I am pressing arrows and get ^[[D^[[C^[[B^[[A in return
bkxd has quit [Ping timeout: 240 seconds]
<agent_white> verumnost: What terminal are you using?
Tempesta has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
<verumnost> agent_white: iterm & terminal (osx)
<agent_white> verumnost: Type in "echo $0"
<agent_white> What's the output?
<verumnost> zsh
<agent_white> Ah. You using zsh on purpose?
<verumnost> and with backticks in irb
<verumnost> => "sh\n"
FMan has joined #ruby
<verumnost> strange
<agent_white> verumnost: Try switching over to bash!
<agent_white> It's likely just how zsh is interpreting the keys.
Derperperd has quit [Ping timeout: 260 seconds]
<Nilium> Why would zsh be interpreting keys for irb?
<verumnost> I am using http://ohmyz.sh
<agent_white> Nilium: Because zsh is handling the IO and passing it into irb. Right?
<Nilium> No.
<agent_white> (I'm not entirely sure, just after a quick gooble search I'm seeing some other issues similar that have been solved with switching over to bash)
<verumnost> tbh I've been using it for a year like this
<verumnost> zsh I mean
<verumnost> I don't know what happened
<agent_white> Oh! So it's been fine before? And did you try seeing what happens when you switch to using bash?
<agent_white> Nilium sounds like he knows better than I.
ryan_notabot has joined #ruby
<verumnost> agent_white: yes and no
karapetyan has quit [Remote host closed the connection]
<Nilium> What OS are you using?
<Nilium> Nevermind, I see osx above.
<verumnost> yeap
karapetyan has joined #ruby
<agent_white> verumnost: Yeah I'm not sure; just looks like it has something to do with zsh not using readline() but its own version of it (ZLE).
* agent_white shrugs
<Nilium> When you start irb, do you have a prompt showing irb(main):001:0> or something?
bkxd has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
<verumnost> Nilium: yes of course
<Nilium> K, so it's at least running irb and not straight ruby.
<Nilium> And running it in bash does work?
govg has quit [Ping timeout: 240 seconds]
<verumnost> you mean If I execute "bash"
<verumnost> and then irb ?
<Nilium> Yes.
<verumnost> I tried that and same thing happens
<verumnost> and also with sh
<Nilium> Can you start a new terminal that goes directly to bash without hitting zsh?
<verumnost> bash prompt appears like "bash-3.2$"
<verumnost> hmm I have no idea how
<verumnost> let me try
bkxd has quit [Ping timeout: 240 seconds]
govg has joined #ruby
grh has quit [Ping timeout: 240 seconds]
<Nilium> And how'd you install Ruby?
<Nilium> Also, other option would be to just disable oh-my-zsh and start a new terminal.
<Nilium> oh-my-zsh adds aliases for a few things that can interfere with things. I usually just comment them out, but I mostly just want to rule out zsh because I don't think it's the cause.
karapetyan has quit [Ping timeout: 240 seconds]
<verumnost> rvm
hutch34 has joined #ruby
cdg has joined #ruby
<verumnost> I would have uninstalled it at first but I have been using it for a year
<Nilium> Can you disable rvm and start irb?
<verumnost> what does it have to do ? rvm is for keeping different ruby versions
<Nilium> It does some interesting things to your shell to do that.
<Nilium> Also, type 'alias' in your shell and see if irb, cd, ruby, etc. show up
sfiguser__ has joined #ruby
_sfiguser has quit [Ping timeout: 240 seconds]
<verumnost> no they are not there
<verumnost> at least irb
<verumnost> ha
<verumnost> Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
<verumnost> I don't know what happened this time , first time I see this
<verumnost> You may follow 'rvm notes' for dependencies and/or read the docs page https://rvm.io/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.
Derperperd has joined #ruby
<Nilium> Did you update OS X recently?
<verumnost> yes
<Nilium> That probably did it.
<verumnost> apple fucked me
<verumnost> I see
<Nilium> Weird part is, bash should've complained
last_staff has joined #ruby
<Nilium> Wait, do you have system bash or a more recent version installed?
cats has quit [Quit: BURN HIS HOUSE DOWN]
bkxd has joined #ruby
<Nilium> System bash wouldn't complain, an updated version would because it'd be built against a non-system readline.
cats has joined #ruby
<verumnost> I have no idea
<verumnost> I mean bash is one of the things it just works
hutch34 has quit [Ping timeout: 240 seconds]
GodFather has joined #ruby
Mr_Pancake has quit [Ping timeout: 276 seconds]
Mr_Pancake has joined #ruby
grh has joined #ruby
karapetyan has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
browndawg has quit [Quit: Leaving]
_sfiguser has joined #ruby
sfiguser__ has quit [Ping timeout: 260 seconds]
roflmyeggo has quit [Remote host closed the connection]
dviola has quit [Quit: WeeChat 1.7]
diego1 has joined #ruby
diego1 has quit [Client Quit]
karapetyan has quit [Ping timeout: 255 seconds]
karapetyan has joined #ruby
dionysus69 has joined #ruby
<verumnost> seems like rvm reinstall all --force is required
Devalo has quit []
<verumnost> rvm pkg install readline first
<verumnost> wtf
<agent_white> verumnost: PS - You should try out pry :) It's irb but more sparkles.
rvca has joined #ruby
bkxd has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.5]
<verumnost> binding.pry ?
bkxd has quit [Ping timeout: 256 seconds]
nowhereman has quit [Quit: Konversation terminated!]
nowhereman has joined #ruby
chouhoulis has quit [Remote host closed the connection]
danielpclark has quit [Ping timeout: 256 seconds]
karapetyan has quit [Remote host closed the connection]
brent__ has quit [Remote host closed the connection]
montyboy has quit [Ping timeout: 245 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
karapetyan has joined #ruby
johnny56_ has joined #ruby
verumnost has quit [Ping timeout: 264 seconds]
grh has quit [Ping timeout: 248 seconds]
minimalism has joined #ruby
bkxd has joined #ruby
dkphenom has joined #ruby
hyperionel has quit [Remote host closed the connection]
nowhereman has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danielpclark has joined #ruby
nertzy has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
montyboy has joined #ruby
JuliusDelta has joined #ruby
rvca has quit [Quit: Leaving]
blackbom1 has joined #ruby
cdg has quit [Remote host closed the connection]
rvca has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
byte512 has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
blackbom1 has quit [Ping timeout: 248 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
r__rios has quit [Ping timeout: 248 seconds]
r__rios has joined #ruby
dopamean_ has joined #ruby
D100 has quit [Quit: Leaving]
madhatter has joined #ruby
wilbert has joined #ruby
JoshS has joined #ruby
JeanCarloMachado has quit [Remote host closed the connection]
nankyokusei has quit [Remote host closed the connection]
madhatter has quit [Client Quit]
bkxd has quit [Ping timeout: 252 seconds]
madhatter has joined #ruby
jshjsh has quit [Ping timeout: 256 seconds]
dviola has joined #ruby
xall_ has quit [Ping timeout: 255 seconds]
JeanCarloMachado has joined #ruby
JuliusDelta has quit [Remote host closed the connection]
JuliusDelta has joined #ruby
<darix> binding.irb?
dionysus69 has joined #ruby
grh has joined #ruby
minimalism has quit [Ping timeout: 258 seconds]
JuliusDelta has quit [Ping timeout: 255 seconds]
Guest69 has joined #ruby
bkxd has joined #ruby
dionysus69 has quit [Quit: dionysus69]
railswebdev has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
grh has quit [Ping timeout: 255 seconds]
zzxc has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<zzxc> Hey everyone, what do people recommend for a development set up now adays?
<szulak> sublime & terminal ;)
wilbert has quit [Ping timeout: 256 seconds]
<zzxc> Huh, thats the first reference I've heard to sublime in probably 6 months.
<szulak> Did you give it a try>
<szulak> ?
<zzxc> szulak: Yeah I used sublime for a long time, but mostly for Python. I thought it had been dethroned in favor of Atom though.
<szulak> well, there is never-ending war between Sublime, Atom, Brackets and whatever else exist. I gave each of them 2 weeks, and stayed with Sublime.
dkphenom has joined #ruby
<zzxc> I understand that. Sublime was nice. Hell of a lot faster and more stable than Atom in my experience.
hutch34 has joined #ruby
<szulak> that's right
pilne has quit [Quit: Quitting!]
bkxd has joined #ruby
<szulak> if you're looking for fully featured IDE, as far as I know the only meaningful choice would be RubyMine
agent_white has quit [Quit: bbl]
<zzxc> I've been trying to get spacemacs set up, but thus far every time I fix something two issues pop up. It might just might just be that I don't grock something correctly.
<zzxc> This is my first project I've tried building using Ruby so that is entirely like.
dkphenom has quit [Ping timeout: 252 seconds]
pilne has joined #ruby
grh has joined #ruby
<zzxc> As for RubyMine: I'm a huge fan of IDEs. Its kind of needed for some languages like Java, but I'd rather not take that route unless I can't find a better option.
bkxd has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
* Nilium switched to spacemacs for a couple months then went back to vim.
<Nilium> Oddly enough, an emacs package server breaking is what caused it -- I couldn't get emacs to start because spacemacs tried to auto-update, installed truncated files, and basically left everything inoperable
<Nilium> So I went back to vim and didn't bother trying to fix it.
ta has quit [Quit: Leaving...]
phenix has joined #ruby
<zzxc> Nilium: Yeah I'm not a huge fan of how they have there package system set up. I understand why they automcatically clear out other packages, unless you specific otherwise, but its a pain to get anything but what they have set up working.
<Nilium> Yeah. It's really nice, magit's probably the only thing I sorely miss though.
Cohedrin_ has joined #ruby
<Nilium> Vim emulation was handy but certain things were unbelievably slow (e.g., g/blah/norm! xyz is a guaranteed coffee break if it hits enough lines).
xlegoman has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
<zzxc> Yeah I use spacemacs currently for Rust and well Orgmode. Its a pretty nice system for the most part, but it has its pitfalls. Plus I loathe lisp with a passion.
JuliusDelta has joined #ruby
<Nilium> The lisp bit doesn't bother me as much, and I mainly work in Go, so emacs and vim both have good options there.
<zzxc> Vim is still kind of in the were position where key pieces are still being updated for async in vim 8.
<Nilium> Org mode was also nice
bkxd has joined #ruby
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
<Nilium> Especially having things like easy to modify tables. That was pretty great.
<Nilium> Even better since we use GitLab and it can actually render those docs
<zzxc> Yep. Jekyll also supports orgmode.
govg has quit [Ping timeout: 264 seconds]
grh has quit [Ping timeout: 240 seconds]
<Nilium> I think the only other thing I didn't like at the time was that I couldn't find a good way to get it to work in a terminal. Startup time's not great on spacemacs, and I couldn't work out the whole emacs server thing at the time.
<Nilium> I should probably look at setting that up again.
bkxd has quit [Ping timeout: 240 seconds]
Zamyatin has joined #ruby
ta has joined #ruby
karapetyan has joined #ruby
<zzxc> Yep. Well I might hit up the spacemacs gitter account and see if they can help me troubleshoot if I can't any hints.
rrios has joined #ruby
blackbom1 has joined #ruby
<Nilium> I should check that out some time. My mistake might've just been going it alone on the whole thing.
<zzxc> Haha yeah. Chat rooms are great for that type of thing. I'm just sad IRC seem to be falling by the wayside.
<zzxc> Anyways got to go. Girlfriend just got up, said shes dying, and wants food.
<Nilium> Ciao
dviola has quit [Quit: WeeChat 1.7]
<zzxc> Take it easy Nilium & szulak
r__rios has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
gix has quit [Ping timeout: 240 seconds]
johnny56_ has joined #ruby
govg has joined #ruby
bkxd has joined #ruby
blackmesa has joined #ruby
blackbom1 has quit [Ping timeout: 276 seconds]
minimalism has joined #ruby
gix has joined #ruby
ocbtec has quit [Quit: leaving]
bkxd has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
xen0fon has quit [Quit: xen0fon]
mas886 has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
leah2 has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 260 seconds]
Azure has quit [Read error: Connection reset by peer]
Azure|dc has joined #ruby
bkxd has joined #ruby
<mas886> I'm on a class called "Res" which have some functions on it, how do I run a program from this own class calling it's methods without getting "undeclared"?
<mas886> maquing a "require" of the same class doesn't seem to work...
ur5us has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
leah2 has joined #ruby
UnknownSoldier has joined #ruby
bkxd has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
chouhoulis has joined #ruby
johnny56_ has joined #ruby
hutch34 has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
<toretore> ?code mas886
<ruby[bot]> mas886: We can't help you without your code, please post it to https://gist.github.com
Xeago has quit [Changing host]
Xeago has joined #ruby
Azure|dc has quit [Ping timeout: 248 seconds]
BackEndCoder has quit [Excess Flood]
minimalism has quit [Quit: minimalism]
Guest69 has joined #ruby
railswebdev has joined #ruby
Azure has joined #ruby
BackEndCoder has joined #ruby
last_staff has quit [Quit: last_staff]
hutch34 has quit [Ping timeout: 248 seconds]
brent__ has joined #ruby
minimalism has joined #ruby
hutch34 has joined #ruby
brent__ has quit [Ping timeout: 245 seconds]
bkxd has joined #ruby
__Yiota has joined #ruby
Cohedrin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin_ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
jshjsh has joined #ruby
clauswitt has joined #ruby
chouhoulis has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 256 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zzxc> \q
<zzxc> err sorry about that
bkxd has joined #ruby
zeroDi has quit [Ping timeout: 264 seconds]
JuliusDelta has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
JuliusDelta has joined #ruby
<Guest13669> ok i found out how to split arrays
<Guest13669> how do i add each array?
JuliusDelta has quit [Client Quit]
nankyokusei has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<apeiros> Guest13669: add each array to what?
<baweaver> Guest13669 we told you last night
<baweaver> &ri Enumerable#reduce
<baweaver> read
<Guest13669> it's hard to read the documentation 😢
<Guest13669> it's poorly formatted
karapetyan has quit [Ping timeout: 255 seconds]
<toretore> first you should define exactly what "add each array" means
xen0fon has joined #ruby
ifctj has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
<apeiros> Guest13669: ok, 5min no answer to my question - got other stuff to do. and there are others who can help.
malconis has joined #ruby
<Guest13669> apeiros: sorry i got yelled at before i could answer
karapetyan has joined #ruby
smithers399 has joined #ruby
<baweaver> That's not yelling, that's just reminding you that we've covered this.
zeroDi has joined #ruby
rippa has quit [Read error: Connection reset by peer]
nankyokusei has joined #ruby
bkxd has joined #ruby
jshjsh has quit [Ping timeout: 240 seconds]
pawnbox has quit [Quit: gotta go guys.]
<Guest13669> it wont work on 2 arrays, i have ("123321").split("").each_slice(3).to_a so far
<smithers399> i love this programming language, what can we do to make it great again?
<toretore> >> ("123321").split("").each_slice(3).to_a
<ruby[bot]> toretore: # => [["1", "2", "3"], ["3", "2", "1"]] (https://eval.in/730415)
patarr has joined #ruby
sneakerhax has quit [Ping timeout: 255 seconds]
<toretore> Guest13669: ok, so you have an array of two arrays what next?
<Guest13669> i need to get the sum of the 2 arrays then compare them to eachother if equal return true else return false
tristanp has quit [Remote host closed the connection]
Nilium has quit [Remote host closed the connection]
<Guest13669> im not sure how i address each array separately
<Guest13669> or if its needed
malconis has quit [Ping timeout: 240 seconds]
FastJack has quit [Quit: brb]
bkxd has quit [Ping timeout: 256 seconds]
<toretore> >> arrays = ("123321").split("").each_slice(3).to_a; array1 = arrays[0]; array2 = arrays[1];
<ruby[bot]> toretore: # => ["3", "2", "1"] (https://eval.in/730416)
<toretore> ok, now you have array1 and array2
ur5us has quit [Remote host closed the connection]
<toretore> you already know how to use map and reduce to calculate the sum
<Guest13669> yea do i use it on a new line or?
ifctj has quit [Ping timeout: 255 seconds]
<baweaver> >> cs = 'chars'; [cs.split(''), cs.split, cs.chars]
<ruby[bot]> baweaver: # => [["c", "h", "a", "r", "s"], ["chars"], ["c", "h", "a", "r", "s"]] (https://eval.in/730417)
patarr has quit [Ping timeout: 258 seconds]
davezd has joined #ruby
msmith has joined #ruby
rippa has joined #ruby
msmith has quit [Remote host closed the connection]
malconis has joined #ruby
msmith_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
tlahtoani has joined #ruby
bkxd has joined #ruby
ddffg has quit [Ping timeout: 264 seconds]
ddffg has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
Derperperd has quit [Ping timeout: 260 seconds]
szulak has quit [Quit: Textual IRC Client: www.textualapp.com]
Jackneill has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 248 seconds]
bkxd_ has joined #ruby
davezd has quit [Quit: Leaving]
clauswitt has quit [Ping timeout: 264 seconds]
FastJack has joined #ruby
ddffg has quit [Ping timeout: 256 seconds]
ddffg has joined #ruby
WebDawg has quit [Ping timeout: 255 seconds]
tabakhase has quit [Ping timeout: 255 seconds]
chouhoulis has joined #ruby
WebDawg has joined #ruby
tabakhase has joined #ruby
chouhoulis has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
JoshS has joined #ruby
ddffg has quit [Ping timeout: 240 seconds]
nertzy has joined #ruby
renchan has quit [Ping timeout: 248 seconds]
mas886 has quit [Ping timeout: 258 seconds]
enterprisey has quit [Ping timeout: 240 seconds]
nertzy has quit [Ping timeout: 240 seconds]
enterprisey has joined #ruby
smithers399 has quit [Quit: Page closed]
msmith_ has quit [Remote host closed the connection]
smithers399 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
millerti has joined #ruby
enterprisey has quit [Remote host closed the connection]
Andrevan has joined #ruby
Andrevan has quit [Changing host]
Andrevan has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
smithers399 has quit [K-Lined]
dmarr has quit [Quit: Goodbye]
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
nowhereman has joined #ruby
_aeris_ has quit [Ping timeout: 240 seconds]
_aeris_ has joined #ruby
matp has quit [Remote host closed the connection]
matp has joined #ruby
jshjsh has joined #ruby
nowhereman has quit [Remote host closed the connection]
JoshS has quit [Ping timeout: 256 seconds]
nertzy has joined #ruby
nankyokusei has quit [Remote host closed the connection]
Nilium_ has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tristanp has joined #ruby
tristanp has quit [Remote host closed the connection]
millerti has joined #ruby
tristanp has joined #ruby
Derperperd has joined #ruby
nertzy has quit [Ping timeout: 258 seconds]
<Guest13669> still can't address 2 arrays like what is the name of each array
<ljarvis> Guest13669: could you be more specific?
nertzy has joined #ruby
<Guest13669> http://pastebin.com/XEYn9yKW this is what i got so far i just need the correct array names
<ruby[bot]> Guest13669: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/242dc7e959b763146de99655904455cc
<ruby[bot]> Guest13669: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<apeiros> Guest13669: you have to assing the array to variables
<apeiros> objects don't have names
<apeiros> variables do
<Guest13669> ty
<ljarvis> oO
xlegoman has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
phenix has quit [Quit: Connection closed for inactivity]
<Guest13669> how tho? i still kinda cant do anything with the arrays like wouldn't i already need a name if i wanna assign them to variables
<ljarvis> Guest13669: what does this return? ("123456").split("").each_slice(3).to_a
<Guest13669> [["1", "2", "3"], ["4", "5", "6"]]
<ljarvis> right, so an array with 2 arrays inside it, correct?
<Guest13669> yeah
nertzy has quit [Ping timeout: 258 seconds]
<ljarvis> Guest13669: do you know how variable assignment works?
<Guest13669> kinda dont know what a variable is
<ljarvis> in your code, hey and bye are variables
<Guest13669> yeah
rkazak has quit [Read error: Connection reset by peer]
<ljarvis> think of them as labels that are assigned to objects. Do you know what objects are?
<Guest13669> object is like the backbone of ruby, like everything is an object i've heard
<ljarvis> ok, so talk me through your code. On line 2 you refer to array0, which is a variable you haven't yet defined. What made you do that?
<Guest13669> just tried to call the first array or the first array within the array kinda
rkazak has joined #ruby
<ljarvis> ok, but array0 doesn't exist. It doesn't yet mean anything. On line one you have an expression, do you know what that is?
Pongles has quit [Ping timeout: 260 seconds]
<Guest13669> no sorry
anotherpi has joined #ruby
<anotherpi> hello!
<ljarvis> that's ok, it's not important. What is important is that the expression `("123456").split("").each_slice(3).to_a` returns the array you mention. The problem is that the return value isn't assigned anywhere. So it's evaluated but nothing ever happens to it
<ljarvis> Guest13669: make sense?
Pongles has joined #ruby
<Guest13669> yeah so i gotta continue writing stuff on the first line before i can use the arrays?
<ljarvis> bingo. You need to assign it to a variable. You already know how to do that since you do it on line 2 and 3. So give that a go and update your code, then show us what you have
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> remember to do it on gist.github.com and not pastebin :)
<anotherpi> i use guard and emacs. the guard emacs notifier is (for me) anoying. i would like to disable it, did someone have the same problem before ?
<Guest13669> thansk i'll try :D
<ljarvis> anotherpi: I'm not sure, but there's a guard IRC channel that might be able to help -- #guard
mikeXsh has quit [Quit: Connection closed for inactivity]
<anotherpi> oh, ok thanks :)
marsjaninzmarsa has quit [Remote host closed the connection]
JoshS has joined #ruby
msmith has joined #ruby
jshjsh has quit [Ping timeout: 256 seconds]
marsjaninzmarsa has joined #ruby
Mon_Ouie has joined #ruby
genpaku has joined #ruby
Nilium_ is now known as Nilium
<Guest13669> i gotta confess i don't know how, i'm searching like mad on google but people just do it manually like they don't plan on getting random numbers
<ljarvis> what are you searching for?
karapetyan has joined #ruby
<Guest13669> variable ruby, object into variable ruby, array into variable ruby, stuff like that
<ljarvis> ok, is this definitely the code you want? `("123456").split("").each_slice(3).to_a`
<Guest13669> well 123456 will be a random number
<Guest13669> it will be (ticket)
<ljarvis> ok, but you want to split this random number in half correct?
<Guest13669> well i want to split it into 3 numbers usually
<ljarvis> ok, can this ticket only ever be 6 digits long?
patarr has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
<Guest13669> it will be up to 8 in 1 case and as low as nothing in another case
<Guest13669> but generally 6
<ljarvis> ok, but lets assume it's 7 at some point, that'll return this: [["1", "2", "3"], ["4", "5", "6"], ["7"]] -- is that what you want?
msmith has quit [Remote host closed the connection]
xlegoman has joined #ruby
msmith has joined #ruby
msmith has quit [Remote host closed the connection]
<Guest13669> as long as i can discard the last array
JeanCarloMachado has quit [Ping timeout: 258 seconds]
<ljarvis> ok, and if it's 2, you have [["1", "2"]] -- correct?
<Guest13669> yeah
<ljarvis> I'm trying to identify why your code splits the ticket into arrays of 3 numbers and then sums them before comparing the numbers. What's the goal?
<Guest13669> In Russia regular bus tickets usually consist of 6 digits. The ticket is called lucky when the sum of the first three digits equals to the sum of the last three digits. Write a function to find out whether the ticket is lucky or not. Return true if so, otherwise return false.
patarr has quit [Ping timeout: 256 seconds]
<ljarvis> brilliant, ok. So, if there's not 6 digits we're not lucky, and can always return false, yeah?
<Guest13669> yea
<ljarvis> ok lets start small, do you know what a function is?
pancakebreakfast has joined #ruby
<Guest13669> well not really tbh
<ljarvis> ok. Is this specifically a Ruby test? are you learning Ruby?
<Guest13669> yeah, maybe i should read more before i do tests idk
<ljarvis> well it depends if it's a Ruby test. I would argue that if it is, it's a bad one. Because Ruby doesn't really have "functions" -- so I imagine if it was a Ruby test, it would not be worded this way
<ljarvis> Where did this test come from?
hutch34 has joined #ruby
<Guest13669> codewars
<ljarvis> What language?
<Guest13669> a lot of languages but also ruby
cyphase has quit [Ping timeout: 240 seconds]
<ljarvis> So this test is part of the codewars Ruby tutorial? if so I don't remember it
<ljarvis> perhaps you could link to it?
<Guest13669> it's just a kata i thought i could do lol
<anotherpi> ljarvis: 12300321 is a lucky ticket too
<ljarvis> ah it's a kata, ok
<Guest13669> logistics was easy but coding it is hard
<ljarvis> well snap they do actually call it a function, sigh
TheMoonMaster has quit [Quit: Later!]
<ljarvis> Guest13669: where did you get the each_slice code from?
tristanp has quit [Remote host closed the connection]
<Guest13669> stackexchange i think, found it by googling it
<ljarvis> ok, I really think the best advice I can give is to go through the beginners tutorial on Ruby. This will teach things like variables, objects, expressions and functions/methods, which are basic building blocks
<ljarvis> this test isn't hard, but it's impossible if you don't know these basics
bokayio has quit [Ping timeout: 240 seconds]
nikivi has quit [Ping timeout: 260 seconds]
tristanp has joined #ruby
hutch34 has quit [Ping timeout: 248 seconds]
<ljarvis> and you should be wary copy pasting code. for example, the code you grabbed from stack exchange whilst valid, isn't helpful for this test
toretore has quit [Ping timeout: 260 seconds]
jason^ has quit [Ping timeout: 240 seconds]
pleiosaur has quit [Ping timeout: 240 seconds]
<Guest13669> hmm
bokayio has joined #ruby
nikivi has joined #ruby
pleiosaur has joined #ruby
jason^ has joined #ruby
JeanCarloMachado has joined #ruby
centrx has quit [Remote host closed the connection]
Andrevan has quit [Quit: WeeChat 1.7]
brent__ has joined #ruby
tristanp has quit [Remote host closed the connection]
<anotherpi> Guest13669: i just code the solution
<anotherpi> do you want it?
<ljarvis> uh
<ljarvis> come on..
<anotherpi> lol?
<Guest13669> i wanna look at it i wont cheat i will just see how it's done i wont submit it for fake kyu
<anotherpi> it's an exercice, may you want to do it by yourself
<anotherpi> ok, may i can help you instead :p
brent__ has quit [Ping timeout: 255 seconds]