havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
djbkd has quit [Remote host closed the connection]
user083 has quit [Ping timeout: 264 seconds]
<shevy> dtordable I went to make a nap but slept for like 2 hours or so :(
<dtordable> Hello Mr shevy
<dtordable> I'm advancing
<dtordable> RoR is not so difficult
<shevy> Darmani that is good, but only save what you really need, in your case, only keep vowels as part of your hash. remember to make the data structures have the data you need - there are shortcuts to check for vowel
<shevy> >> x = 'abcdef'; x.split(//).select {|letter| letter =~ /[aeiou]/ }
<ruboto> shevy # => ["a", "e"] (https://eval.in/496452)
<shevy> dtordable but boring!
<dtordable> And tomorrow it's the time for Ruby!
symm-_ has quit [Ping timeout: 265 seconds]
<Ox0dea> >> 'abcdef'.scan /[aeiou]/
<ruboto> Ox0dea # => ["a", "e"] (https://eval.in/496453)
<shevy> a ruby sunday
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
<dtordable> An array...
blur3d has joined #ruby
dwfait has quit [Quit: dwfait]
<dtordable> shevy I'm studying
Dimik has joined #ruby
<shevy> good!
<dtordable> I said to myself: why learning other languages but ruby? Hahaha
<shevy> yeah
<shevy> if it will be a better language
<shevy> PHP
<dtordable> RoR can be boring, yeah, but can Ruby can do for me?
<shevy> dunno, depends on what you really need to do
<shevy> these questions are hard because only you can assess what you need!
mistermo_ has joined #ruby
<dtordable> Illumination
<dtordable> Hahaha
<shevy> 3D printing will surely become more commonly available, then we no longer just program, we actually can "program" inanimate objects
mistermo_ has quit [Remote host closed the connection]
<dtordable> ...
<dorei> if it cant has infinite loops, it aint a program :p
senayar has joined #ruby
<shevy> :D
mistermo_ has joined #ruby
devbug has joined #ruby
ibouvousaime has joined #ruby
<dtordable> while true
<shevy> probably not possible to have one with .each over a finite collection
<dtordable> print "y\n"
RegulationD has joined #ruby
elton has joined #ruby
<shevy> very good :P
sandstrom has quit [Quit: My computer has gone to sleep.]
<dorei> shevy: no infinite loops => halt problem is decidable => no turing machine :p
mistermo_ has quit [Remote host closed the connection]
<dtordable> We are a vast automaton
<dtordable> There's an infinite loop in life
<shevy> we had a lot of automatons
sankaber has quit [Remote host closed the connection]
<shevy> if it talks like a duck, walks like a duck ...
<shevy> in 1739!
sankaber has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
<dtordable> shevy who passed you that? And
<dtordable> Is a type of drug
<dtordable> ?
radgeRayden has joined #ruby
elton has quit [Ping timeout: 246 seconds]
<Ox0dea> dtordable: Are you actually a determinist?
atomical_ has joined #ruby
<dtordable> I'm not Mr Wolfram, no
<Ox0dea> > We are a vast automaton
<Ox0dea> What did you mean?
<dtordable> There are some random devices on me
<dtordable> For example
<Ox0dea> Sources of entropy, you mean?
<dtordable> Every . morning I eat myelin
<dtordable> And yeah, they have an entropy
<shevy> dtordable dunno, there was once a lecture about early automatons, I remember the duck because it was so funny, there also was zeman's turtle or so though
<Ox0dea> shevy: "Automata" is such a nice word.
<dtordable> Nah
<dtordable> I could be dead
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has quit [Ping timeout: 260 seconds]
<dtordable> Ppl don't let me suicide
<shevy> 1959!
<dtordable> Medics are bad people
<shevy> Ox0dea awful word
ruid has quit [Ping timeout: 240 seconds]
<shevy> your fetish?
<Ox0dea> Early automata?
<shevy> that sex doll link
<Ox0dea> I'll get the mods.
<shevy> awesome
<dtordable> Lol
mary5030 has quit [Ping timeout: 272 seconds]
<dtordable> Sex devices
<Ox0dea> dtordable: What's the matter, man?
<shevy> there were really cool devices in the past, like sketchpad
<dtordable> Nah
<Ox0dea> You don't want to tell me?
<dtordable> My ancient masturbation gloves are the best lol
<Ox0dea> shevy: 14th-century wizardry: http://i.imgur.com/pqRr7MW.gif
<dtordable> I'm going to sleep
<shevy> lol
<shevy> I think I had a similar one once
<shevy> had a different name though
<shevy> house-sized computing!
<Ox0dea> "Depends on the size of the chair."
<Ox0dea> M$ would've become insolvent if he'd fucked that up, I reckon.
samba_ has joined #ruby
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 250 seconds]
symm- has joined #ruby
<dtordable> Microsoft paintbrush does that also
duckpuppy has joined #ruby
<shevy> hehe
jdawgaz has joined #ruby
marr has quit [Ping timeout: 246 seconds]
unident77 has joined #ruby
dtordable has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
dtordable has joined #ruby
<Ox0dea> dtordable: Do you think you're dead?
Encapsulation has quit [Ping timeout: 272 seconds]
scottschecter has quit [Quit: Leaving]
<dtordable> It was the plan last 2nd of September
<Ox0dea> #3spooky5me
<dtordable> Committed suicide
samba_ has left #ruby ["WeeChat 1.3"]
PedramT has joined #ruby
ruid has joined #ruby
spider-mario has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 250 seconds]
<dtordable> 2 cigarettes
<Ox0dea> You were gonna off yourself with two cigarettes?
<dtordable> The rest pipe alike...
atomical has joined #ruby
<dtordable> No
<dtordable> It wasn't like that
krobzaur_ has quit [Ping timeout: 265 seconds]
<dtordable> First I tried to jump the window
<dtordable> Not allowed
<shevy> people really have weird ideas
<shevy> var .= some_method(some_args) if some_condition
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dtordable> So I began to eat pills
roshanavand has quit [Read error: Connection reset by peer]
<shevy> dtordable matrix!
<shevy> did you use the red or the blue one
<dtordable> So medics got me
atomica__ has joined #ruby
<dtordable> Slept me
PedramT has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
<dtordable> And well
<shevy> this one is more understandable https://bugs.ruby-lang.org/issues/11934
<shevy> "Foo = 2 #=> cannot redefine a constant"
<shevy> :D
atomical_ has quit [Ping timeout: 265 seconds]
sktng has joined #ruby
<dtordable> The medic that kicked me out from the hospital when I advised of a suicide
<dorei> is there some ruby stdlib/core method for 2s complement ?
<sktng> hello, in ruby how can I have two constructors - for example, I want to have the default initialize constructor and additional from_url method which can construct the same object by splitting the url in tokens?
<dorei> >> ->x { (255 - x + 1) .to_s(16) }.(12)
<ruboto> dorei # => "f4" (https://eval.in/496457)
varunwachaspati has quit [Quit: Connection closed for inactivity]
<dtordable> Appeared (in August it was)
<dorei> something like that in a less cryptic way
nocd has joined #ruby
<sktng> s/and/an
atomical has quit [Ping timeout: 250 seconds]
alakra has quit [Ping timeout: 260 seconds]
<Ox0dea> > formamide_concentration = formamide_concentration.to_f
<shevy> dorei haha I was about to ask what the above is ...
<dtordable> More to say: my wife said today that divorces from me, but she closed the window lol
TheMoonMaster has quit [Ping timeout: 260 seconds]
<Ox0dea> I think `foo .= bar` is great, but I hadn't considered `foo = .bar`. I hope one of them makes it in.
<dorei> shevy: signed int as two's complement for 8bit cpu :p
<dorei> -12 is 0xF4
<Ox0dea> >> (-12 % 256).to_s 16 # dorei
<ruboto> Ox0dea # => "f4" (https://eval.in/496458)
xlegoman has joined #ruby
<dorei> oh, xor :D
<Ox0dea> No?
<dorei> :)
<dorei> why not
<dorei> if it works
<dorei> it works :)
<Ox0dea> Why did you mention XOR?
<dorei> isnt % a xor? no?
<Ox0dea> No, it's the modulus.
<dorei> modulus
<Ox0dea> And Ruby "wraps" negatives, which is great.
<dorei> so, using modulus you can get 2s complement
<dorei> interesting
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alakra has joined #ruby
TheMoonMaster has joined #ruby
ElFerna has joined #ruby
ruid has quit [Ping timeout: 264 seconds]
vdamewood has quit [Ping timeout: 246 seconds]
_Tariq has joined #ruby
<Ox0dea> dtordable: What if there are no computers in Heaven?
<_Tariq> Hey
bkxd_ has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
<dtordable> Ox0dea I don't like computers lol
<_Tariq> I have written a web server in Ruby and now need to write automated tests, but I don't know what to test
<_Tariq> Should I just use Cabaraya
<Ox0dea> _Tariq: Precision matters.
<_Tariq> What do you mean?
<Ox0dea> *Capybara
<_Tariq> ah
<_Tariq> Got it
<Ox0dea> You mean you wrote a web server like nginx?
jamesalexanderdi has joined #ruby
<_Tariq> Er, no. I just used socket.
Xeago has quit [Remote host closed the connection]
chipotle has joined #ruby
<_Tariq> I should throw up some code shouldn't I/
<_Tariq> *?
<shevy> nah, you asked a simple question, you only have to find someone able to answer it
<_Tariq> Ah, got it
underplank has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Remote host closed the connection]
chipotle has joined #ruby
<_Tariq> Anyway, here's my code
ibouvousaime has quit [Ping timeout: 246 seconds]
braincra- has joined #ruby
krobzaur_ has joined #ruby
<_Tariq> My server isn't complicated. It's probably too simple even.
<_Tariq> But how am I supposed to test it? If I have to set up Capybara and have a virtual browser head to it, then I will.
braincrash has quit [Ping timeout: 256 seconds]
sankaber has joined #ruby
greenride has joined #ruby
<greenride> Out of curiosity, are more recent versions of Ruby significantly faster than previous versions?
sankaber has quit [Client Quit]
<greenride> Has anyone compiled benchmarks?
ibouvousaime has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
<Ox0dea> greenride: 1.8 to 1.9 was a huge leap, and 1.9 to 2.0 was also "significant".
<_Tariq> Okay, quick question: is there any program that can generate automated tests?
<_Tariq> I hope this isn't a stupid question
roshanavand has joined #ruby
<shevy> greenride I found http://www.madebymarket.com/blog/dev/ruby-web-benchmark-report.html was ok-ish, almost 2 years old by now
chipotle has quit [Ping timeout: 264 seconds]
<Ox0dea> _Tariq: You don't really need a headless browser to test your server just yet. Something simpler to ensure it's correctly received and responding to requests would suffice.
<shevy> _Tariq I guess they all require of you to do the grunt work and specify in detail what you want to test :(
<Ox0dea> *receiving
<_Tariq> Ox0dea: any suggestions as to what that simpler thing would be?
<dtordable> Last cigarette hexadecimal number
<Ox0dea> _Tariq: Use a unit testing framework like minitest, connect to your server, validate some assertions.
<Ox0dea> dtordable: Last cigarette before... bed?
Xeago has joined #ruby
<dtordable> 3 packets today
<Ox0dea> Marlboro man?
<_Tariq> Hm...okay, let me research how I can connect to a server using minitest
<_Tariq> er
<_Tariq> within Rspec
<Ox0dea> _Tariq: No. :P
<dtordable> Not that, sir
<Ox0dea> _Tariq: Yes.
<dtordable> Ox0dea, Camel
<Ox0dea> dtordable: Turkish Jade?
<dtordable> I don't smoke marlboro
<Ox0dea> Turkish Jade is a discontinued Camel.
<dtordable> Not interested
<Ox0dea> _Tariq: Something as simple as `conn = Net::HTTP.new 'localhost', 2000` would do for starters.
<_Tariq> Yeah, got it
<_Tariq> I found a Stackoverflow post that suggests the same thing
<Ox0dea> Or, well, `let(:conn) { ... }`, but yeah.
<Ox0dea> Or `subject` or... whatever the hell else RSpec has added. :P
<dtordable> Ox0dea, my next tobacco will be pipe tobacco sir
<dtordable> W0Larsen is called
<Ox0dea> That looks fancy.
<dtordable> Have to grew beard urgently
underplank has quit [Quit: underplank]
baweaver has joined #ruby
<dtordable> But the window plan is more better, rotflmao
bithon has quit [Ping timeout: 240 seconds]
underplank has joined #ruby
<Ox0dea> Imagine surviving.
<greenride> shevy: Thanks for that link. The results are almost unbelievable.
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<greenride> shevy: Can't believe JRuby with Torqbox is the fastest.
ElFerna has quit [Ping timeout: 240 seconds]
<dtordable> Ox0dea, no more tobacco now available on me
<Ox0dea> dtordable: Gonna install Windows?
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
Symbiosisz has quit [Ping timeout: 272 seconds]
_Tariq has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
<dtordable> Ox0dea, don't even have a computer lol
baweaver has quit [Ping timeout: 245 seconds]
elton has joined #ruby
<dtordable> Ox0dea, if that's the case got a legal windows 8 pro with me...
sktng has quit [Quit: Page closed]
FooMunki has quit [Read error: Connection reset by peer]
<Ox0dea> dtordable: Wat.
<Ox0dea> How're you on IRC without a computer?
<dtordable> As my friends, the ms friends, Windows is not so bad...
<dtordable> Ox0dea, with this tablet...
<dtordable> Lol
underplank has quit [Quit: underplank]
Jardayn has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
<dtordable> Well
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dtordable> Ox0dea, can I get now the elevator?
<dtordable> ...
<dtordable> To heaven
<dtordable> ...
justbleed has joined #ruby
FooMunki has joined #ruby
roshanavand has joined #ruby
unident77 has quit [Quit: Leaving]
Symbiosisz has joined #ruby
<Ox0dea> dtordable: Using that elevator before it opens of its own accord makes it go the other way.
<Ox0dea> Or something.
__chris has joined #ruby
<shevy> greenride well I guess he does not include the startup time for jruby
__chris has quit [Client Quit]
roshanavand has quit [Ping timeout: 246 seconds]
<greenride> shevy: He does. I understand that's an issue. I was interested in steady state though.
djbkd has joined #ruby
Xeago has joined #ruby
user083 has joined #ruby
<dtordable> Ox0dea, lol... Im crying now...
__chris has joined #ruby
<dtordable> Need a bottle of whisky for a moment...
__chris has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
<Ox0dea> Shh bby is ok
<Ox0dea> (Sorry.)
<Ox0dea> JRuby is gonna be duper-fast some day.
<dtordable> What's bby?
__chris has joined #ruby
<dtordable> Let me read
<Ox0dea> "You are not your own." -- Corinthians 6:19
djbkd has quit [Ping timeout: 265 seconds]
<Ox0dea> You don't just go around breaking other people's shit, do ya?
duncannz has joined #ruby
<greenride> Ox0dea: Is anyone using JRuby + Truffle in prod today?
<chrisseaton> greenride: I hope not - it's not ready
dwfait has joined #ruby
djbkd has joined #ruby
arescorpio has joined #ruby
ElFerna has joined #ruby
elton has quit [Remote host closed the connection]
elton has joined #ruby
ss_much has joined #ruby
duoi has quit [Remote host closed the connection]
|\|370 has quit [Remote host closed the connection]
Meow-J has joined #ruby
einarj has joined #ruby
iateadonut has joined #ruby
iateadonut has left #ruby [#ruby]
duoi has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
duoi has quit [Changing host]
duoi has joined #ruby
dtordable has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
bkxd has quit [Ping timeout: 246 seconds]
einarj has quit [Ping timeout: 250 seconds]
ReK2 has joined #ruby
ReK2 has joined #ruby
bkxd has joined #ruby
senayar has quit [Remote host closed the connection]
TomyLobo has quit [Ping timeout: 264 seconds]
nocd has quit [Quit: nocd]
nerfando has joined #ruby
<shevy> :)
waka has quit [Ping timeout: 255 seconds]
zast has joined #ruby
lictor36 has quit [Quit: lictor36]
jdawgaz has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<Ox0dea> >> require 'prime'; ':)'.bytes.reduce(:^).prime?
<ruboto> Ox0dea # => true (https://eval.in/496580)
vikaton has joined #ruby
zast has left #ruby [#ruby]
nerfando has quit [Quit: Lost terminal]
<chrisseaton> In /(?a)[[:alpha:]]+/, what is ?a called? I think it means treat code ranges as ASCII, and there is also ?u which I think means unicode, and ?d which I don't know. Does anyone know where I can find documentation for this? It's hard to Google
elton has quit [Remote host closed the connection]
nerfando has joined #ruby
<apeiros> chrisseaton: ?a isn't anything
<apeiros> it's (?…) which is a non-capturing group
<apeiros> and "a" is the content of that non-capturing group
<Ox0dea> apeiros: Nope, this is apparently a thing.
<Ox0dea> I'd never seen it either.
<apeiros> and in the given expression it's pretty pointless. could just write "a" instead of "(?a)"
<chrisseaton> but /(?a)[[:alpha:]]+/ and /(?d)[[:alpha:]]+/ match "a\u3042" differently
<apeiros> actually (?:…)
<Ox0dea> >> begin; eval "/(?b)/"; rescue SyntaxError; $!; end # apeiros
<ruboto> Ox0dea # => #<SyntaxError: (eval):1: undefined group option: /(?b)/> (https://eval.in/496581)
<apeiros> Ox0dea: oh, you mean it's not a typo?
<Ox0dea> >> /(?a)/ # no error
<ruboto> Ox0dea # => /(?a)/ (https://eval.in/496582)
<Ox0dea> apeiros: Apparently not?
<apeiros> interesting… new thing to learn then
<apeiros> I missed the "missing" : for what I said (but apparently it's not missing)
<apeiros> I presume `ri Regexp` yields no answer?
<chrisseaton> i couldn't find anything that looked relevant
<chrisseaton> of course it's very hard to skim or search for it
<apeiros> given that (?a) is valid and (?b) is not, I'd search expressly for (?a)
<Ox0dea> That error message is the only relevant occurrence of "group option" in MRI's source tree. :/
<Ox0dea> Oh, duh.
elton has joined #ruby
<Ox0dea> >> [*?a..?z].select { |c| begin; eval "/(?#{c})/"; rescue SyntaxError; end }
<ruboto> Ox0dea # => ["a", "d", "i", "m", "u", "x"] (https://eval.in/496583)
<Ox0dea> /(?x)/ == //x
<apeiros> so a way to set flags
<apeiros> but `a` isn't a flag?
<Ox0dea> Right.
<Ox0dea> Yeah, that's an anomaly.
<apeiros> >> /x/a
duckpuppy has joined #ruby
<ruboto> apeiros # => /tmp/execpad-b9802d971659/source-b9802d971659:2: unknown regexp option - a (https://eval.in/496584)
<Ox0dea> Bug?
<apeiros> and what were the jap encoding flags? j & s?
<apeiros> don't remember what `d` would do either…
nerfando has quit [Quit: Textual IRC Client: www.textualapp.com]
<chrisseaton> RubySpec has /(?a)[[:alpha:]]+/ , and then the same with ?d and ?u - ?d matches ?u in behaviour
nerfando has joined #ruby
<apeiros> oh dear
<apeiros> (?a) is apparently a short form for (?a:)
charliesome has joined #ruby
<apeiros> so it is indeed a non-capturing group. just that it doesn't capture "a". it seems empty. now the question is what effect it has
Yzguy has joined #ruby
<choke> looks like it's also used with the test method from the kernel
<apeiros> hm, not quite correct
<apeiros> it seems (?:…) only affects within parens
<choke> ie: test ?d, "/dev"
<apeiros> and without the :, it affects the rest of the regex
<apeiros> i.e., /(?i:foo)bar/ only foo is case-insensitive
<apeiros> and with /foo(?i)bar/ only bar is case-insensitive
<Ox0dea> Wow.
<chrisseaton> it's just re-using the capturing group syntax isn't it
<apeiros> presumably you'd disable it with (?-i)
cdg has quit [Remote host closed the connection]
waka has joined #ruby
cdg has joined #ruby
duckpuppy has quit [Ping timeout: 272 seconds]
<apeiros> yupp. just verified.
aspiers has quit [Ping timeout: 240 seconds]
<Ox0dea> Regexen are just FSAs, after all, but Onigmo takes it to the limit. :P
<apeiros> >> ["foobarbaz" =~ /foo(?i)bar(?-i)baz/, "fooBARbaz" =~ /foo(?i)bar(?-i)baz/, "fooBARBAZ" =~ /foo(?i)bar(?-i)baz/]
<ruboto> apeiros # => [0, 0, nil] (https://eval.in/496585)
<apeiros> the remaining mystery would be the purpose of the a flag
Yzguy has quit [Client Quit]
<chrisseaton> apeiros Ox0dea oh my god I figured this all out in 2014 and must have forgotten about it https://github.com/jruby/joni/issues/13
<choke> Yeah appears to be a capture group for sure... "Z_123: foobar"[/^Z.*(?=:)/] would return Z_123
<Ox0dea> apeiros: /* limits \d, \s, \w and POSIX brackets to ASCII range */
<Ox0dea> chrisseaton just about nailed it.
<apeiros> chrisseaton: so `a` is ascii flag?
<apeiros> indeed :)
<apeiros> well, that explains why it's not documented
<shevy> hehe
<apeiros> as of 1.9, \d, \s and \w are always ascii, even with //u
<apeiros> you have to use \p and/or [[:foo:]] style char-classes to have unicode matches for those
<apeiros> 18>> "ä" =~ /\w/u
<ruboto> apeiros # => 0 (https://eval.in/496586)
<apeiros> >> "ä" =~ /\w/u
<ruboto> apeiros # => nil (https://eval.in/496587)
<apeiros> >> "ä" =~ /\p{word}/u
<ruboto> apeiros # => 0 (https://eval.in/496588)
cdg has quit [Ping timeout: 250 seconds]
<Ox0dea> >> '' << 0x0dea =~ /\p{Number}/
dwfait has quit [Ping timeout: 265 seconds]
<ruboto> Ox0dea # => 0 (https://eval.in/496589)
dwfait_ has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
<chrisseaton> Ox0dea: is \p a 'posix range'?
<Ox0dea> chrisseaton: In the examples above, you mean?
<chrisseaton> yeah
<Ox0dea> POSIX "groups" is a little better.
<Ox0dea> I don't think they have to occur sequentially.
TheMoonMaster has quit [Ping timeout: 265 seconds]
alakra has quit [Ping timeout: 260 seconds]
<Ox0dea> Er, the \p is "property", it turns out.
<Darmani> How does one use the With_Object method in Ruby? Is that just used to pass variables to a block or something?
__chris has quit [Quit: This computer has gone to sleep]
<apeiros> Darmani: there's no "With_Object" method in plain ruby. must come from whatever you use. check its docs.
<apeiros> oh dear. CASE!
<Darmani> I'm not the best at understanding something just by reading it... Sometimes I need it explained in different ways to get it...
<Ox0dea> apeiros: Darmani rather obviously meant Enumerable#with_object.
<apeiros> it matters. lol…
dopie has quit [Quit: Lost terminal]
<Ox0dea> You're not wrong.
<apeiros> yes, yes. I'm apparently tired.
<Ox0dea> Darmani: Do you know how, for instance, #each works?
<apeiros> should have seen that, even if I'm not wrong.
<Darmani> yes. It iterates over each item in an array right?
<Ox0dea> Darmani: Could you elaborate a bit?
<Darmani> (1..5).each do |num| puts num end
<Ox0dea> Darmani: What does `num` contain there?
<Darmani> Uh... The items in the array? o.o
<Darmani> What do you mean?
<choke> technically speaking, with that example you don't have an array.. so what array?
<Darmani> -___-
<Darmani> [1, 2, 3, 4, 5].each do |num| puts num end
<Darmani> happyy?
<shevy> you did well
<Ox0dea> >> [*1..5] # Darmani
<ruboto> Ox0dea # => [1, 2, 3, 4, 5] (https://eval.in/496590)
<Darmani> yeah you could do that too I guess...
__chris has joined #ruby
bkxd_ has joined #ruby
<Darmani> How does this help me understand what "with_object" does? T.T
<Ox0dea> Darmani: https://eval.in/496591
bkxd has quit [Ping timeout: 246 seconds]
<Ox0dea> I was just showing you that for your bag of tricks.
<Darmani> oh.
<Darmani> Cool.
<Darmani> What is the :foo supposed to be?
<Ox0dea> Instead of `*args`, that could've been `|a, b|`, and then you'd have access to them individually.
<Ox0dea> A placeholder.
psyq has quit [Quit: Conversation terminated]
<Darmani> wait...
<choke> << to_three = Enumerator.new do |y| 3.times do |x| y << x end end to_three.with_object("foo")
<Ox0dea> The magic happens when you make it something mutable.
<Darmani> What is the placeholder for...?
cdg has joined #ruby
<Ox0dea> To show you what's being yielded to the block.
dlitvak has joined #ruby
yqt has quit [Ping timeout: 265 seconds]
cdg has quit [Remote host closed the connection]
yeticry has quit [Read error: Connection reset by peer]
devbug has quit [Ping timeout: 250 seconds]
<Darmani> Alright...... Well I need to study it for a while. I'm kinda slow when it comes to this stuff >.<
<Darmani> Thanks though! (:
<Ox0dea> Darmani: Remember this from earlier? https://eval.in/496424
<Darmani> yuss. I still have it open on my tabs lol
<Ox0dea> Well, that's just a fancy-schmancy, "functional" way of writing this: https://eval.in/496592
<Ox0dea> Many would argue that the latter is clearer.
kobain has joined #ruby
<Darmani> ohhhhhhhhhhhh.
<Ox0dea> But it's three different expressions, and only monsters use semicolons.
ElFerna has quit [Ping timeout: 272 seconds]
<Darmani> So you could add anything in there to go with the individual chars?
Zamerick has quit [Ping timeout: 246 seconds]
yeticry has joined #ruby
<Ox0dea> Darmani: The argument to #with_object gets yielded to the block *along with* each element of the Enumerator; what happens after that is your prerogative, yes.
<Darmani> Okay I get it.
<Darmani> Now I just have to put it into practice.
<Ox0dea> It's only good for hisograms.
<Ox0dea> :P
<Ox0dea> *histograms, even.
<Darmani> But wait explain this to me.
danielpclark has joined #ruby
underplank has joined #ruby
<Darmani> this is a really stupid question.
<Darmani> well.
<Darmani> Never mind.
<Darmani> I'll look it up. Lol
devbug has joined #ruby
KineticX has quit [Remote host closed the connection]
roshanavand has joined #ruby
KineticX has joined #ruby
krobzaur_ has quit [Ping timeout: 246 seconds]
KineticX_ has joined #ruby
<blub> b
<blub> oops
<Ox0dea> Darmani: It's virtually always used with some collection type to sort of "mask" some imperative procedure.
tmtwd has quit [Ping timeout: 256 seconds]
<Ox0dea> blub: Mutation is fine if it's referentially transparent, right?
<Darmani> Okay.
<Darmani> Let me practice a bit.
<blub> i think so
<blub> altho you lose persistence
<Ox0dea> blub: I know a monkey who can fix that.
KineticX has quit [Ping timeout: 240 seconds]
<Darmani> this is a stupid question
<Darmani> but you seem like a nice guy
<Darmani> So...
<Ox0dea> blub is female.
<Darmani> What's an enumerator? Lol...
<Darmani> I meant you dude lol
roshanavand has quit [Ping timeout: 245 seconds]
bofh has joined #ruby
stannard has joined #ruby
<Ox0dea> An Enumerator, in a nutshell, is something that can give you its next element.
<Ox0dea> >> e = [1,2,3].to_enum; [e.next, e.next, e.next]
<ruboto> Ox0dea # => [1, 2, 3] (https://eval.in/496593)
<bofh> Hi there, could you please help me to resolve the problem " /usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'listen' (~> 2.7) - did find: [listen-3.0.5] (Gem::LoadError)" ?
<choke> The docs state that it's a class that allows both internal and external iteration
KineticX_ has quit [Ping timeout: 272 seconds]
<bofh> I have listend 3.0.5 installed, so I wonder what might be wrong there with the gem resolving
<Ox0dea> >> e = [1,2,3].to_enum; e.next + e.next + e.next # Darmani: This is slightly more demonstrative.
<ruboto> Ox0dea # => 6 (https://eval.in/496594)
<choke> though technically, its a person employed to take census of the population...
<shevy> bofh I think the ~> means that it wants that version range, so only 2.x but not 3.x
<Darmani> o.o
QpQ4 has joined #ruby
<Darmani> So... It's the placeholder that comes from an iteration method?
<bofh> hmm, how can i install that version without a package manager of my distro?
<Darmani> Like .each do |word| <<--- that?
<Ox0dea> No, not quite.
<Darmani> T.T
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> The distinction between Array, Enumerable, and Enumerator is a little subtle, but they're really quite different things.
<Ox0dea> That they interact so seamlessly is both gift and curse.
<Darmani> Wonderful. Lets make things more complicated.
<Ox0dea> It actually makes things simpler, only that's hard to see until you understand how. :/
<shevy> Darmani it's his job ;)
<Ox0dea> Textbook catch-22, really.
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<choke> >> e = [1,2,3].each # returns an enumerator object
<ruboto> choke # => #<Enumerator: [1, 2, 3]:each> (https://eval.in/496595)
blackjid has quit [Max SendQ exceeded]
bofh has left #ruby [#ruby]
jdawgaz has joined #ruby
<Darmani> I'm afraid to ask more questions.
blackjid has joined #ruby
<Darmani> So I'm just going to google until I find the answer.
* Darmani is a noob
<Darmani> yeah. I'm reading it(:
<Ox0dea> > Fear is the mind-killer. Fear is the little-death that brings total obliteration.
c355e3b has quit [Quit: Connection closed for inactivity]
<Ox0dea> The French say orgasm is the little death. Take your pick, I suppose.
<choke> should also read this Darmani http://ittybiz.com/how-to-stop-being-scared/
<shevy> Darmani did you work through the chris pine tutorial as of yet?
dorei has quit []
<Darmani> LMAO
<Darmani> How to stop being scared
<Darmani> jesus that's funny.
<Darmani> shevy: Are you being serious? Is that a thing?
<choke> I'm assuming he means: https://pine.fm/LearnToProgram/
<shevy> Darmani yeah it was a very simple oldschool tutorial in the old days
<shevy> the second half is good
<shevy> https://pine.fm/LearnToProgram/chap_10.html procs and blocks for instance
senayar has quit [Ping timeout: 265 seconds]
<Darmani> Well now I have another book to read...
<Darmani> I went through the Bastards book of Ruby.
<Darmani> That was pretty helpful.
<choke> welcome to the club -- i seem to read like 3 books a week... and not all of them are 100% picture books
<Darmani> I also took Codecademy's course on it. And I went through the tutorials on RubyMonk.com
<shevy> that online tutorial above is really like a one hour read only, perhaps two
<Darmani> choke: That's funny xP
<shevy> yeah, people these days use those other resources
<shevy> they forget about the oldschool!
nopolitica has joined #ruby
<choke> Darmani, it was supposed to be funny... 'cause I read too many picture books with my daughter
<shevy> stackoverflow also changed the flow of questions coming through
nopolitica has quit [Client Quit]
<Darmani> I'd rather be reading picture books lol
<Darmani> I started learning programming as an act of desperation from being 22 and not knowing what to do with my life.
<choke> okay, so take pictures of each page in your book, print them out -- bind them together.. and start reading -- and it'll technically be a picture book ;)
<Darmani> It's been a wonderful journey ever since. <<--- sarcasm
psy_ has quit [Ping timeout: 264 seconds]
<choke> Darmani, I have an 8 year old learning to program -- it's really not that difficult. I taught my mom some basic PHP in order to fix her schools joomla website ( when she was an office-admin @ a high school )
<Darmani> choke: That is such a dad joke. You better watch yourself. You're turning into an uncool dad =P
<choke> I'm a programmer, I was always the uncool dad
<Darmani> lmaooo that's not true
<Darmani> honestly I tell people I'm learning programming and they think I'm some kind of god
stannard has quit [Remote host closed the connection]
psy_ has joined #ruby
<Darmani> They look at me and think... oh shit this nigga must be smart
<Darmani> if they only knew...
<choke> lol, my mom types 8 words a minute with 3 errors... you don't have to be smart to program -- just be willing to learn. Now she'll never be a professional developer, but only because she doesn't want to be so she doesn't keep learning.
_Tariq has joined #ruby
<choke> 20 years in the industry, i read read read 'cause we're always students
<pontiki> best industry ever, there's *always* something new
<_Tariq> Why is it that a class is unable to read anything from variables located in the main
<_Tariq> pontiki: Problem is finding out what you need to learn.
<pontiki> learn it all
<Darmani> yeah I feel you. Don't get me wrong I love learning and I like programming more than I thought I would. It's like learning to put together a puzzle. I enjoy that kind of thing.
<choke> when i started PHP, I downloaded a bunch of open source applications and combed through the code. I learned a lot doing that....
<Darmani> You're an inspiration to us all Choke.
marsjaninzmarsa has quit [Max SendQ exceeded]
<choke> AND when you learn one language, other languages are easier... in the last year I've learned the Ruby + Rails, new DB systems, Redis ( not really a language ), Objective-C, Swift, and a few others
<Darmani> Must be nice.
marsjaninzmarsa has joined #ruby
<choke> Nah, it's hell -- my fiance hates me because I spend more time with my "wife" ( the computer ) than her
<Darmani> lmaoo
Dimik has quit [Ping timeout: 260 seconds]
<Ox0dea> _Tariq: Classes introduce a new scope.
<_Tariq> So how am I going to get variables within the main then?
<Darmani> choke: she sounds like a handful xD
<_Tariq> Or should I just turn them into "constants"?
<pontiki> pass them in
<_Tariq> huh
<_Tariq> Let me do that then
<_Tariq> I'll just need to modify some of my code to do it
<Ox0dea> Or just properly architect your thing. :P
<choke> Nah I think that's me Darmani
elton has quit [Remote host closed the connection]
krobzaur_ has joined #ruby
<_Tariq> Yeah, Ox0dea, I'm rewriting the code just so that I can get it to a point when I can write a test for it
<_Tariq> No way I want this to be my wife.
elton has joined #ruby
<Ox0dea> _Tariq: Do that from the first next time. :)
marsjaninzmarsa has quit [Max SendQ exceeded]
<Ox0dea> Ease of testing is a solid indicator of quality.
blackjid has quit [Max SendQ exceeded]
blackjid has joined #ruby
marsjaninzmarsa has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
<_Tariq> Ox0dea: Well, let's see if this code can be salvaged
<Darmani> FFS
<Darmani> why doesn't this work
* Darmani pulls out a gun
<Darmani> Someone tell me why or I'm gonna starts shooting
<Ox0dea> ...
<Ox0dea> _Tariq: Savaging it might be a suitable alternative, but not yet. :P
unident77 has joined #ruby
<Ox0dea> Here meaning "ripping it to shreds", to clarify.
<_Tariq> I actually don't like that, because it's admitting defeat
<apeiros> Darmani: not cool
TheHodge has quit [Quit: Connection closed for inactivity]
<Darmani> apeiros: What's that? o.o
<apeiros> your "Darmani pulls out a gun" + "…or I'm gonna starts shooting". not cool.
<_Tariq> Start shooting.
<_Tariq> Guns are cool.
<_Tariq> It's the bullets that are bad.
<Darmani> apeiros: Lol
DEA7TH has quit [Quit: DEA7TH]
<apeiros> _Tariq: metaphors of violence are unwelcome here.
<_Tariq> Oh
<_Tariq> Oops.
<Ox0dea> _Tariq: It's morality's fault, really.
<_Tariq> Fair enouhg
<Ox0dea> *mortality's
<_Tariq> *enough
<Darmani> apeiros: You do understand it was intended with humor right?
<Darmani> Please tell me that doesn't actually offend you.
<apeiros> Darmani: you understand it's still not funny and still NOT WELCOME, do you?
<Ox0dea> shevy: Pass the popcorn.
<Darmani> Lol being the newcomer here I'm say I'm sorry I offended you. My apologies.
<Ox0dea> Everything went better than expected.
<Darmani> Although you should reconsider being on the internet, other people won't give a shit what you think.
dlitvak has quit [Remote host closed the connection]
<Ox0dea> So close.
<apeiros> you did not offend me. there's quite a difference between what you did and me being offended. anyway, lets hope you understood the basic "metaphors of violence are not welcome here".
* apeiros puts it to a rest at that point.
dlitvak has joined #ruby
<Ox0dea> Darmani: The Internet is also notorious for not giving a shit about your inability to differentiate between String and Enumerator.
<Darmani> Ha.
elton_ has joined #ruby
djbkd_ has joined #ruby
<Darmani> That has nothing to do with what I said earlier though. But if you want to pretend the two are similar be my guest =P
<Ox0dea> Darmani: What's the harm in being kind?
<Ox0dea> They do both boil down to a similar precept.
<Darmani> How do you mean?
djbkd has quit [Ping timeout: 260 seconds]
elton has quit [Ping timeout: 265 seconds]
<choke> and on that note, i'll brb. need to load my bowl...
QpQ4 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani> Ox0dea: Elaborate dear friend, I wanted to hear what you had to say :[
haraigoshi has quit [Ping timeout: 255 seconds]
<Darmani> Unless you're not interested in which case never mind =P
blur3d has quit [Quit: blur3d]
krobzaur_ has quit [Ping timeout: 272 seconds]
<Ox0dea> Darmani: It's politically charging the channel's vibe in which I'm not particularly interested at the moment.
<Darmani> Ah, forgive me you're probably right. These type of discussions are my favorite but I will table my interest for now.
<_Tariq> Right now, I'm just staring at the effect
<_Tariq> *error message
<_Tariq> undefined method "with object".
<_Tariq> Maybe you should not call that method and try a different way.
<Darmani> _Tariq: You're probably right.
<Ox0dea> Darmani: I suspect there must be some happy medium between unfettered freedom of expression and tyrannical censorship, but I've never really seen it in practice.
elton_ has quit [Remote host closed the connection]
<Ox0dea> This channel leans just a little to the right on that scale, and that's something up with which you'll have to put.
<apeiros> Ox0dea: there isn't. for the simple reason that the happy medium is individual and not universal.
<Darmani> Ox0dea: That's fine. I wasn't aware of the nature of this channel. I tend to be a bit animated and silly, I try not to take myself too seriously. But with that said I will keep that in mind.
<Ox0dea> Darmani: It's remarkably easy to be "animated and silly" without introducing the specter of gun violence.
<choke> learning toward the right ( tyrannical censorship ) is actually a good thing in a channel such as this ( this should be said in the offtopic channel anyway ) in that it guides the community of the chat to be be conscientious of what is said to be a conducive environment to seek assistance.
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<apeiros> anyway, deepening that train of thought would be OT quickly.
<Ox0dea> Trains travel horizontally.
unident77 has quit [Quit: Leaving]
<apeiros> choke: that's one aspect of it. the other is how this world currently functions. in a "better" world, less "censorship" would be necessary.
<Ox0dea> Why's that?
<apeiros> e.g. if nobody ever used a weapon to cause harm, Darmani's above expression wouldn't have been an issue.
<Darmani> Ox0dea: The spectre? What are you Shakespeare? And who are you to judge me so easily for making a joke that you don't appreciate? Humor is in the eye of the beholder. If you don't appreciate it I understand but I won't curb my sense of humor because you get offended.
cdg has joined #ruby
<_Tariq> I don't think it matters.
<Darmani> That's what it really comes down to.
<_Tariq> If this chat doesn't like it, there's nothing that can be done.
<Ox0dea> Darmani: If you genuinely believe that the breadth of a person's vocabulary can be used as fodder for insult, you should reconsider.
<_Tariq> Other than, perhaps, make a new chat.
<_Tariq> People have the right to regulate chats.
braincra- has quit [Quit: bye bye]
<_Tariq> And sometimes, it gets abused, but that's how rights work.
<_Tariq> So just deal with it.
<_Tariq> And just move on with our lives.
<Darmani> Ox0deal: Forgive me that bit wasn't meant to be insulting. I particularly enjoyed that bit I was just teasing.
<_Tariq> Oh dear.
<apeiros> ?tabnick Darmani
<ruboto> Darmani, pro-tip - use tab completion for nicks. avoids typos in nicks.
<Ox0dea> There's a lot of subliminal love happening here.
<choke> ^ learn something new every day, apeiros -- I genuinely didn't know that existed.
<Darmani> ruboto: That's useful. Thank you ^.^
<Ox0dea> ?bot
<ruboto> I don't know anything about bot
<apeiros> assuming the zero-deal wasn't supposed to be a joke…
darkf has joined #ruby
<shevy> actually, I like the nick "Ox0deal" :)
<Darmani> oh shit is that darkf :O
<Darmani> Hi darkf ^^
<darkf> hello Darmani
<Darmani> I didn't know you frequent this channel ^^
<darkf> eh, more like I speak here from time to time, and sometimes do ruby
<shevy> choke oh yeah that also reminds me of the "learn a new programming language every year"
<darkf> why stop at every year? :)
* darkf probably learned about 4 or 5 last year.
<choke> same here darkf
cdg has quit [Ping timeout: 250 seconds]
* Darmani hates you both
<choke> now i'm going back to hone my skills a bit in core ruby for a more advanced understanding... But I learned enough to get the api I needed to write written
<shevy> it is not yet too late
<shevy> you can still go back to php full time!
<choke> I actually had a job offer for Walt Disney to be a senior developer for them with PHP. I turned them down.
<choke> I get php offers in my email at least 3-4 times a week
<Ox0dea> Walt Disney the guy?
<choke> Walt Disney the company
<Ox0dea> There's no such thing.
<Darmani> walt disney the company lmao
<Ox0dea> <3
* Ox0dea tosses supreme topkeks like confetti
<_Tariq> Why did you leave PHP?
<_Tariq> If you are getting offers 3-4 times a week
<_Tariq> then you must be a PHP rock star?
<_Tariq> Why retire?
<_Tariq> why give up the dream?
<Ox0dea> Because Walt Disney the company.
<choke> I had a job doing PHP, then we bought this app... So had to learn Objective-C for the iOS side of the app... and the api was written in RoR -- So learned that in order to further develop the API instead of re-building in PHP
<choke> and now, I don't see me wanting to write PHP if I don't have to...
<choke> the ruby syntax is just so beautiful
<_Tariq> But all those php offers...:(
marsjaninzmarsa has quit [Excess Flood]
<_Tariq> Ah well
<_Tariq> Good luck with your API
<choke> Yeah, for start-ups mostly that really don't pay much ( usually less than what I make already )
marsjaninzmarsa has joined #ruby
<_Tariq> In that case, yeah, dismiss those offers
<choke> Now if i get one that puts me @ 150K+ a year -- I might consider it
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<_Tariq> How in the world do these random startups email you anyway?
<choke> They find me through linked in
marsjaninzmarsa is now known as marsjanin
<choke> I actually forgot that I had a linked in until about a year and a half ago when I had a random company send me a message lol
toretore has quit [Ping timeout: 240 seconds]
krobzaur has joined #ruby
agent_white has joined #ruby
djbkd_ has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
<Ox0dea> Is Erlang the highest versioned programming language at 18?
djbkd has joined #ruby
braincrash has joined #ruby
QpQ4 has joined #ruby
<choke> I'd have to research that...
greenride has left #ruby [#ruby]
<Ox0dea> Ruby 2, Python 3, ? 4, Rails 5, Perl 6, PHP 7.
shellie_ has joined #ruby
jackcom has joined #ruby
<choke> yeah it might be...
<choke> yeah too many of them... problem with a lot of those, is it doesn't list the latest version either so you have to do further checking lol
<apeiros> also good luck on figuring what a universal "version number" is for all those languages
duckpuppy has joined #ruby
cdg has joined #ruby
krobzaur has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
bkxd_ has quit [Ping timeout: 255 seconds]
<apeiros> ruby is arguably at version 9000 (jruby)
<choke> lol
<apeiros> and where's C atm? version 2011?
senayar has joined #ruby
adgtl has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
adgtl has quit [Remote host closed the connection]
bkxd_ has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
dwfait_ has quit [Quit: dwfait_]
George_ has quit [Ping timeout: 252 seconds]
FooMunki has quit [Quit: FooMunki]
__chris has quit [Quit: This computer has gone to sleep]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
alakra has joined #ruby
defendguin has quit [Ping timeout: 260 seconds]
TheMoonMaster has joined #ruby
<_Tariq> Whenever I start a server for an RSpec test, the test itself hangs
<_Tariq> Well, no, not starting the server
<_Tariq> accepting connections to the server
<_Tariq> "@client = @server.accept"
<_Tariq> It's just awaiting input
<Ox0dea> _Tariq: You should run your server in a separate terminal.
<_Tariq> Wait, not in the RSpec test?
<Ox0dea> No.
<_Tariq> So, er...
<_Tariq> how do I start the server?
danielpclark has quit [Remote host closed the connection]
<_Tariq> Never mind
<_Tariq> I'll think about this tomorrow
_Tariq has quit [Remote host closed the connection]
atomica__ has quit [Ping timeout: 260 seconds]
bkxd_ has quit [Ping timeout: 250 seconds]
anaeem1_ has joined #ruby
roshanavand has joined #ruby
<Darmani> YUSS
<Darmani> Okay.
<Darmani> I think I understand Enumerator.
<Ox0dea> Prove it.
<Darmani> I mean... It's kind of like the one you made..
<Darmani> But I did it all by myself ._.
<apeiros> Ox0dea, confrontational as ever :-p
arescorpio has quit [Quit: Leaving.]
<Ox0dea> apeiros: I reckon Darmani took it for the light-hearted ribbing I intended.
dlitvak has joined #ruby
<Darmani> I did.
<Ox0dea> <3
anaeem1_ has quit [Ping timeout: 272 seconds]
<Ox0dea> Darmani: Are you sure you want `split(" ")`?
marcdel has joined #ruby
<Darmani> I wouldn't get necessarily offended by something like that. People on the internet can say what they want and it doesn't bother me. That's a sign of a mature, grown ass adult.
<apeiros> oh, I wasn't concerned
<Darmani> unnecessarily*
<Ox0dea> apeiros: Concerned about what?
<Darmani> And yeah Ox0dea... What else would I use?
<Ox0dea> Darmani: Well, it depends what you're going for.
<apeiros> about Darmani taking it the wrong way
adgtl has joined #ruby
<Darmani> Well I was trying to split it by each word...
adgtl has quit [Changing host]
adgtl has joined #ruby
<Darmani> I usually use split when I am dividing words or letters from a selection o.o
roshanavand has quit [Ping timeout: 260 seconds]
marcdel_ has joined #ruby
senayar has quit [Remote host closed the connection]
<Ox0dea> Darmani: Aye, providing a single space will split on any run of whitespace, and an empty string will split at character boundaries, but we have String#chars for that.
<Ox0dea> >> "foo \s\t\n bar \s\t\n baz".split(' ')
<ruboto> Ox0dea # => ["foo", "bar", "baz"] (https://eval.in/496597)
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<Darmani> I guess.
<Darmani> Why are you nitpicking me
<Darmani> WHY CANT YOU JUST BE HAPPY FOR ME
senayar has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
<Ox0dea> ¡¿Por que no los dos?!
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
<Ox0dea> I'm not even sure Spanish orthography has the interrobang.
<Darmani> Puedes hablar espanol??
dlitvak has quit [Ping timeout: 250 seconds]
rkazak_ has quit [Quit: Sleep.....ing....]
<Ox0dea> Un muy poquito de la chingada.
<Darmani> LMAOO
<Ox0dea> <3
senayar has joined #ruby
<Darmani> you're an idiot xD
<Ox0dea> ^_^
arup_r has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
sorbo_ has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
LMity has joined #ruby
* apeiros sobs… wants +L
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
jamesalexanderdi has quit [Quit: WeeChat 1.3]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
elton has joined #ruby
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
<apeiros> there we go.
<apeiros> now if only xenoblade wasn't a thing…
QpQ4 has quit [Quit: Textual IRC Client: www.textualapp.com]
rkazak has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
RubOnR has joined #ruby
<pontiki> consolidating bans?
<apeiros> no, just cleaned out.
cdg has quit [Ping timeout: 260 seconds]
<pontiki> such discipline :D
<apeiros> required. banlist was full :(
<pontiki> whoa
<apeiros> hence the xenoblade comment. I wanted to work on ruboto the last few days, but instead spent the time playing 0:-)
RubOnR has quit [Ping timeout: 252 seconds]
<pontiki> hee
robbyoconnor has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
robbyoconnor has joined #ruby
underplank has quit [Quit: underplank]
colegatron has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Remote host closed the connection]
<shevy> playing is easier than coding!
robbyoconnor has joined #ruby
<Ox0dea> <obligatory Dark Souls>
<choke> Not if you make coding a game.
<Ox0dea> Not if you're playing Dark Souls.
<apeiros> dark souls… that game made fun of me by removing enemies because I was too bad at it :<
<Ox0dea> Heh.
tomchapin has joined #ruby
<Darmani> YUSSS
<Darmani> I DID IT
<Ox0dea> Let's see.
<Darmani> I swear to God I've been staring at the screen for like an hour trying to figure this out
<Ox0dea> > This shitpost is blocked in your country.
<Darmani> o.O?
<apeiros> looks correct
<apeiros> want feedback on it?
<Ox0dea> Darmani: https://eval.in/496599
<Ox0dea> It's not quite correct.
<Ox0dea> And the formatting gave me Kaposi's sarcoma.
<Darmani> Lol
<Darmani> "[
<Darmani> :[
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit []
marcdel_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> what part is incorrect? do they want more than just aeiouAEIOU,?
<Ox0dea> Darmani: Character classes don't have the same semantics as Arrays.
<Ox0dea> apeiros: The comma is a mistake.
<Darmani> oh really?
<apeiros> interesting mistake. I assumed they wanted to count "," for some reason
<Darmani> should I just put the letters in the there without a space or anything?
<apeiros> yes
elton has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
<Ox0dea> Darmani: You're specifying precisely which characters to match.
<apeiros> also note that some characters in [] have special meaning
elton has joined #ruby
<Darmani> I'm not too familiar with Regex's... I have a basic understanding but that's it :[
<shevy> Darmani here you can test your regex live http://rubular.com/
<apeiros> curious for the reasoning to put a single coma then :D
<apeiros> I mean, why not separate all chars?
<Ox0dea> Conflation with arrays.
<apeiros> like [a,e,i,o,u…]
<Darmani> shevy: That's useful. Thanks ^^
astrobunny has quit [Read error: Connection reset by peer]
<Ox0dea> >> [*?a..?z].join.scan(/[a-z&&[^aeiou]]/).join # Darmani
<ruboto> Ox0dea # => "bcdfghjklmnpqrstvwxyz" (https://eval.in/496600)
astrobunny has joined #ruby
<Ox0dea> There's a demonstration of character class ranges and intersection.
<apeiros> apparently we can't copy links from safari's address bar anymore :-S
<Ox0dea> apeiros: For your own safety.
<choke> people still use safari?
<apeiros> I mean, we can, just not if you got there via search
<apeiros> choke: people still use IE
<choke> Microsoft is still a company?
bkxd has joined #ruby
colegatron has joined #ruby
zenspider has joined #ruby
elton has quit [Ping timeout: 265 seconds]
zenspider has quit [Client Quit]
<apeiros> !fact add regex Resources for regular expressions: http://ruby-doc.org/core/Regexp.html || http://rubular.com/ || http://www.regular-expressions.info
<ruboto> apeiros, I will remember that regex is Resources for regular expressions: http://ruby-doc.org/core/Regexp.html || http://rubular.com/ || http://www.regular-expressions.info
TheMoonMaster has quit [Ping timeout: 240 seconds]
alakra has quit [Ping timeout: 272 seconds]
LMity has quit [Quit: Nettalk6 - www.ntalk.de]
bkxd has quit [Ping timeout: 256 seconds]
<Darmani> Is this cleaner?
<Ox0dea> Darmani: hsh[obj] += 1 if obj =~ /[aeiou]/i
s2013 has joined #ruby
<Darmani> beautiful.
<Darmani> Why do you have an i at the end of your regex though?
<Ox0dea> You too.
<Ox0dea> Case-[i]nsensitive.
<Darmani> :O
<Darmani> cool.
tomchapin has joined #ruby
elton has joined #ruby
tomchapin has quit [Client Quit]
xnp70 has joined #ruby
lxsameer has joined #ruby
nitrix is now known as Master
Master is now known as Guest90251
Guest90251 is now known as nitrix
mostlybadfly has joined #ruby
<Ox0dea> Darmani: In case you've ever wanted to know this: https://eval.in/496605
<Darmani> lmao
<Darmani> that hurt to read
<Ox0dea> You loved it.
<Darmani> In a strange way yes. Lol
cdg has quit [Remote host closed the connection]
bkxd has joined #ruby
duckpuppy has quit [Ping timeout: 276 seconds]
<Ox0dea> Oh, hey, your solution doesn't report vowels which occur zero times.
<Ox0dea> Seems like the sort of thing a vowel histographer might wish to know.
scripore has quit [Quit: This computer has gone to sleep]
<Darmani> report vowels which occur zero times?
<Darmani> ohh
<Darmani> hmm.
<Darmani> Hang on.
<Ox0dea> Standing by.
<Darmani> I like you. You're funny.
elton has quit [Remote host closed the connection]
elton has joined #ruby
mary5030 has joined #ruby
<Darmani> gahh.
<Darmani> How would I do that...
<Darmani> hmmmm.
<Darmani> Ox0dea: I need a hint ._.
<Ox0dea> Darmani: Voila!
<Darmani> o.O?
<choke> haha! i understand Ox0dea
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> choke: It's like I planned it.
<choke> i know right?
s2013 has joined #ruby
s2013 has quit [Client Quit]
elton has quit [Ping timeout: 265 seconds]
<Darmani> ....
<Darmani> don't make me pull out my gun
<Darmani> Lol =P
<choke> if you really feel like destroying your computer, go right ahead
<Darmani> It's the only one I had so... I can't Q.Q
<choke> here's another hint: 496605
<shevy> are you still at your vowel problem
<Darmani> No I figured that out...
<Darmani> but then Ox0dea said to print out the vowels even if they don't appear...
<Darmani> And now I'm back to square one.
<choke> except you're not ;) you just think you are
<Darmani> what kind of hint is that?
<Darmani> That's a goddamn number
nerium has quit [Quit: nerium]
<Darmani> -.-
<Ox0dea> Darmani: Numbers are meaningless, you say?
<choke> you'll have that Voilà! moment in regard to 496605 soon
<Darmani> I'll figure it out on my own -__-
bluOxigen has joined #ruby
akem has joined #ruby
<choke> if only i knew how to eval in 496605 to achieve your goals.
<Ox0dea> >> n = 465600723595460 and 7.times.reduce('') { |s| n, b = n.divmod 128; s << b }
<ruboto> Ox0dea # => "Darmani" (https://eval.in/496606)
<choke> lol
<Darmani> ???????????????
<Ox0dea> Arithmetic is neat shit, eh?
<Darmani> No
<Ox0dea> Oh.
<choke> I especially like how it turns out to be +1 exactly of the answer for which Darmani seeks
<Darmani> I'm going to watch the Office on Netflix.
<Darmani> I'll come back to this with a fresh mind.
<Ox0dea> I still love you, but definitely a little less.
<Darmani> lmao oh no. I exist for your love please don't take it away from me.
<Darmani> by the way
<Darmani> I know this is wrong
<Darmani> but this is where my mind thought to go to solve it lol
mary5030 has quit [Remote host closed the connection]
dopie has joined #ruby
minimalism has quit [Quit: minimalism]
<Ox0dea> Darmani: I didn't even know it was a thing, but I just got the results of my biopsy: your code gave me Stage V.
<choke> lol
davedev24 has quit []
<Ox0dea> But really, though, String#count is pretty nifty.
<choke> yep
<Darmani> fuck you D:
<Darmani> IM NOT AS GOOD AS YOU
<Darmani> T.T
<Ox0dea> The thing about Hashes constructed with a default value (`Hash.new 0`) is that they only display those keys who've had values explicitly assigned to them.
<Darmani> So?
elton has joined #ruby
<Darmani> What are you telling me.
<Ox0dea> That's why your original approach wasn't displaying, for instance, `"u" => 0` if the input didn't contain any Us.
<Darmani> And the values only get assigned if they match the Regex...
<Ox0dea> Just so. <3
<Darmani> But... What do I do then?
roshanavand has joined #ruby
<Ox0dea> The Office isn't gonna watch itself.
<Darmani> lmao
<Darmani> you're the worst.
<Darmani> I hope your hair turns into spaghetti and your teeth fall out.
<Ox0dea> I vaguely recall that reference.
<Darmani> Is that too offensive? Man that might have been too much.
<Ox0dea> My feels are in smithereens.
<Darmani> xD
adgtl_ has joined #ruby
smactive has joined #ruby
TheMoonMaster has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
adgtl has quit [Ping timeout: 250 seconds]
akem has quit [Quit: Bye]
rubber has quit [Ping timeout: 245 seconds]
claw has quit [Ping timeout: 255 seconds]
alakra has joined #ruby
claw has joined #ruby
yardenbar has joined #ruby
TheMoonMaster has quit [Ping timeout: 272 seconds]
Waheedi has quit [Quit: Waheedi]
Exce1l has joined #ruby
djbkd has quit [Quit: Leaving...]
dgynn has quit [Quit: dgynn]
uber has joined #ruby
uber is now known as Guest1996
alakra has quit [Ping timeout: 276 seconds]
Coldblackice has quit [Read error: Connection reset by peer]
xnp70 has quit [Read error: No route to host]
elton has quit [Remote host closed the connection]
Coldblackice has joined #ruby
loatbac has joined #ruby
<loatbac> hello
Exce1l has quit [Quit: Exce1l]
elton has joined #ruby
loatbac has quit [Client Quit]
sameerynho has joined #ruby
bluOxigen has left #ruby [#ruby]
lxsameer has quit [Ping timeout: 256 seconds]
rkazak_ has joined #ruby
RegulationD has joined #ruby
govg has quit [Ping timeout: 265 seconds]
Salehi has joined #ruby
Salehi has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 272 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
bithon has joined #ruby
sameerynho has quit [Ping timeout: 265 seconds]
grayjedi has joined #ruby
rheddry is now known as levifig
grayjedi has quit [Client Quit]
mistermocha has quit [Remote host closed the connection]
djbkd has joined #ruby
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dwfait has joined #ruby
lxsameer has joined #ruby
smactive has quit [Remote host closed the connection]
<slash_nick> Darmani: I hope your dog dies
<slash_nick> (mine was worse)
Jordan-Ch has joined #ruby
KramerC has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
elton has quit []
PedramT has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
KramerC has joined #ruby
robbyoconnor has joined #ruby
Jordan-Ch has quit []
TheMoonMaster has joined #ruby
cantaberry has quit []
PedramT has quit [Remote host closed the connection]
alakra has joined #ruby
PedramT has joined #ruby
PedramT has quit [Remote host closed the connection]
steffkes has joined #ruby
duckpuppy has joined #ruby
PedramT has joined #ruby
arup_r has joined #ruby
govg has joined #ruby
TheMoonMaster has quit [Ping timeout: 264 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
puria has joined #ruby
TheMoonMaster has joined #ruby
TheMoonMaster has quit [Changing host]
TheMoonMaster has joined #ruby
einarj has joined #ruby
weaksauce has quit [Ping timeout: 276 seconds]
vdamewood has joined #ruby
einarj has quit [Ping timeout: 264 seconds]
ibouvousaime has joined #ruby
agent_white has left #ruby [#ruby]
djbkd has quit [Quit: Leaving...]
armyriad has quit [Ping timeout: 265 seconds]
roshanavand has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
roshanavand has quit [Ping timeout: 276 seconds]
haraigoshi has joined #ruby
s00pcan_ has quit [Ping timeout: 256 seconds]
rippa has joined #ruby
Coldblackice has joined #ruby
AndChat209684 has joined #ruby
DoubleMalt has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
bluOxigen_ has joined #ruby
Coldblackice has joined #ruby
kam270 has joined #ruby
kam270 has quit [Max SendQ exceeded]
speakingcode has quit [Ping timeout: 250 seconds]
kam270 has joined #ruby
speakingcode has joined #ruby
<shevy> lol
<shevy> slash_nick is my man
sandstrom has joined #ruby
codecop has joined #ruby
charliesome has joined #ruby
PedramT has quit [Remote host closed the connection]
pawnbox has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
ibouvousaime has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
tvw has joined #ruby
TheMoonMaster has quit [Ping timeout: 260 seconds]
alakra has quit [Ping timeout: 245 seconds]
underplank has joined #ruby
underplank has quit [Client Quit]
Jet4Fire has joined #ruby
tmtwd has quit [Ping timeout: 276 seconds]
underplank has joined #ruby
AndChat|209684 has joined #ruby
underplank has quit [Client Quit]
AndChat-209684 has joined #ruby
underplank has joined #ruby
duncannz has quit [Remote host closed the connection]
AndChat209684 has quit [Ping timeout: 246 seconds]
djbkd has joined #ruby
AndChat|209684 has quit [Ping timeout: 264 seconds]
devbug has quit [Read error: Connection reset by peer]
Darmani has quit [Ping timeout: 252 seconds]
smactive has joined #ruby
Guest45580 has joined #ruby
underplank has quit [Quit: underplank]
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
Guest45580 has left #ruby [#ruby]
arup_r has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
s00pcan_ has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
smactive has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
underplank has joined #ruby
mistermocha has joined #ruby
s00pcan_ has quit [Ping timeout: 240 seconds]
solocshaw has joined #ruby
nbdy has joined #ruby
Jackneill has joined #ruby
s00pcan_ has joined #ruby
FernandoBasso has joined #ruby
senayar_ has joined #ruby
senayar_ has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 245 seconds]
underplank has quit [Quit: underplank]
nbdy has quit [Quit: Textual IRC Client: www.textualapp.com]
underplank has joined #ruby
tmtwd has joined #ruby
spider-mario has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
underplank has quit [Quit: underplank]
ss_much has quit [Quit: Connection closed for inactivity]
UtkarshRay has joined #ruby
bMalum has joined #ruby
arup_r has joined #ruby
adgtl_ has quit [Remote host closed the connection]
cyfr0n has joined #ruby
duckpuppy has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenlot2 is now known as zenlot
cyfr0n has quit [Quit: Leaving]
SCHAAP137 has joined #ruby
cyfr0n has joined #ruby
TheMoonMaster has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
einarj has joined #ruby
jbrhbr has joined #ruby
TheMoonMaster has quit [Ping timeout: 246 seconds]
einarj has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak_ has quit [Quit: Sleep.....ing....]
Jet4Fire has quit []
PedramT has joined #ruby
kmckelvin has joined #ruby
roshanavand has quit [Ping timeout: 265 seconds]
TheMoonMaster has joined #ruby
Ishido has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
bMalum has joined #ruby
sandstrom has joined #ruby
AndChat-209684 has left #ruby ["Leaving"]
<pontiki> cpl nosleep reporting in
futilegames has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
PedramT has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
futilegames has left #ruby [#ruby]
PedramT has joined #ruby
cpup has joined #ruby
PedramT_ has joined #ruby
PedramT has quit [Remote host closed the connection]
callumacrae has quit [Ping timeout: 245 seconds]
TheMoonMaster has quit [Ping timeout: 246 seconds]
fantazo has joined #ruby
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
thejamespinto has quit [Remote host closed the connection]
PedramT_ has quit [Remote host closed the connection]
PedramT has joined #ruby
callumacrae has joined #ruby
hanmac has quit [Ping timeout: 240 seconds]
hanmac has joined #ruby
hanmac has left #ruby [#ruby]
hanmac has joined #ruby
scripore has joined #ruby
TheMoonMaster has joined #ruby
scripore has quit [Ping timeout: 256 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
vasilakisfil_ has joined #ruby
PedramT has quit [Remote host closed the connection]
duckpuppy has joined #ruby
charliesome has joined #ruby
kam270 has quit [Quit: Leaving]
alakra has joined #ruby
sameerynho has joined #ruby
duckpuppy has quit [Ping timeout: 250 seconds]
lxsameer has quit [Ping timeout: 264 seconds]
bMalum has joined #ruby
einarj has joined #ruby
djbkd has quit [Remote host closed the connection]
scripore has joined #ruby
arup_r has quit [Remote host closed the connection]
RegulationD has joined #ruby
arup_r has joined #ruby
jbrhbr has quit [Quit: Leaving.]
arup_r has quit [Remote host closed the connection]
lxsameer__ has joined #ruby
arup_r has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
arup_r has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 276 seconds]
dwfait has quit [Quit: dwfait]
shredding has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
bluOxigen_ has quit [Ping timeout: 240 seconds]
FooMunki has joined #ruby
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
govg has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
speakingcode has quit [Ping timeout: 260 seconds]
elaptics`away is now known as elaptics
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
sameerynho has joined #ruby
yfeldblum has joined #ruby
pandaant has joined #ruby
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
colegatron has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
thejamespinto has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
lxsameer__ has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
govg has joined #ruby
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
thejamespinto has quit [Ping timeout: 255 seconds]
arup_r has joined #ruby
alakra has quit [Ping timeout: 260 seconds]
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
TheMoonMaster has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
dwfait has joined #ruby
Xentil has joined #ruby
lipoqil has joined #ruby
alakra has joined #ruby
mistermocha has joined #ruby
TheMoonMaster has joined #ruby
djbkd has joined #ruby
DEA7TH has joined #ruby
colegatron has joined #ruby
<jackcom> excuting cmd on windows is not good?
<jackcom> for doing ruby?
mistermocha has quit [Ping timeout: 276 seconds]
<Zarthus> you're going to have to elaborate more. What is not good? What are you executing?
Coldblackice has quit [Read error: Connection reset by peer]
Coldblackice has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Coldblackice has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
TheMoonMaster has quit [Ping timeout: 260 seconds]
Coldblackice has joined #ruby
alakra has quit [Ping timeout: 256 seconds]
Coldblackice has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 256 seconds]
Guest38495 has joined #ruby
shredding has quit [Ping timeout: 264 seconds]
dwfait has quit [Quit: dwfait]
alakra has joined #ruby
duckpuppy has joined #ruby
bluOxigen has joined #ruby
alakra has quit [Ping timeout: 256 seconds]
<Zarthus> Does anyone know if issues will arise if I called a class `Module'? Would one instead consider putting effort into renaming them into addons/extensions/plugins to avoid the confusion with the keyword?
dwfait has joined #ruby
<ljarvis> Zarthus: yes, and it's not a keyword
<ljarvis> it's already a class
<ljarvis> so you'd be re-opening it
<Zarthus> it's namespaced under 'managers', so that collission hopefully won't happen. regardless, it will still lead to much confusion I think.
<ljarvis> >> class Module; def foo; "bar"; end; end; Class.new.foo
<ruboto> ljarvis # => "bar" (https://eval.in/496636)
sandstrom has joined #ruby
<ljarvis> yes, the namespacing will only mask issues
<Zarthus> I've considered appending to the name to avoid calling it Module directly, but that's more of a hack than anything - and does not solve the confusion issues. So I think I'll go ahead and just rename them to something else.
duckpuppy has quit [Ping timeout: 240 seconds]
* Zarthus should have thought about naming this a bit more in retrospect
<ljarvis> so you have your own type of modules in your project?
<ljarvis> what about Package?
kam270 has joined #ruby
kam270 has quit [Max SendQ exceeded]
bkxd has quit [Ping timeout: 265 seconds]
<Zarthus> yeah, the idea is that I can load enhancements dynamically per-user. I'm not sure how fitting package would be considering they're more small scripts than larger packages. I went with module because you can configure them to be loaded or unloaded at any time.
<Zarthus> pretty much like how Cinch handles it, except then you can modify loaded plugins during runtime
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dwfait has quit [Remote host closed the connection]
<ljarvis> so plugin? :D
<Zarthus> (i'm sure cinch can do this too, but I'm used to defining loaded plugins at the beginning and then never touching them again)
<ljarvis> yeah cinch can do that
<ljarvis> the plugin list is merely an array
dwfait has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<ljarvis> or at least, that's how I originally built it
volty has joined #ruby
<ljarvis> maybe it changed though
<Zarthus> As far as dictionary definitions go, Module was the one that felt most on point. but once the user is familiar with how it behaves I doubt naming between extension/module/plugin matters a whole lot.
<Zarthus> I'll roll with Plugin I suppose.
<Zarthus> thanks - I'm glad I asked or I might've ran into colissions ^^
<volty> hi, standard way to escape chars to use with Dir[path]? Shellescape, or there's something else?
<ljarvis> Zarthus: yep true, I like extension too
<Zarthus> extension feels a bit long too type, but it can be shortened easily to ext
<ljarvis> volty: you probably dont want shellescape
ElFerna has joined #ruby
<ljarvis> volty: what do you want to escape?
arup_r has quit [Remote host closed the connection]
<volty> ljarvis: some messy paths, with parenthesis inside, thx
tvw has quit [Remote host closed the connection]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
Guest38495 has quit [Ping timeout: 264 seconds]
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
ayonkhan has joined #ruby
arup_r has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
ayonkhan has quit [Client Quit]
pandaant has quit [Quit: Lost terminal]
arup_r has joined #ruby
sdothum has joined #ruby
<volty> shellwords is fine with use with Dir[], but I'll go back and use Find.find
ferr has joined #ruby
nerium has joined #ruby
cyfr0n has quit [Quit: Leaving]
adgtl has joined #ruby
bithon has quit [Quit: WeeChat 1.3]
bithon has joined #ruby
<apeiros> Ox0dea: not in ?regex, but could have a htmlregex/regexhtml for that
c355e3b has joined #ruby
bradleyprice has quit []
cyfr0n has joined #ruby
roshanavand has joined #ruby
ElFerna has quit [Ping timeout: 255 seconds]
nerium has quit [Quit: nerium]
Domaldel has quit [Quit: Leaving]
aspiers has joined #ruby
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
dionysus69 has joined #ruby
dmr8 has joined #ruby
nertzy has joined #ruby
arup_r has quit [Remote host closed the connection]
arup_r has joined #ruby
volty has quit [Quit: Konversation terminated!]
duckpuppy has joined #ruby
bithon has quit [Quit: WeeChat 1.3]
dwfait has quit [Remote host closed the connection]
bithon has joined #ruby
ElFerna has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
dlitvak has joined #ruby
toretore has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
aspiers has quit [Ping timeout: 265 seconds]
bithon has quit [Quit: WeeChat 1.3]
TheMoonMaster has joined #ruby
aspiers has joined #ruby
bithon has joined #ruby
ElFerna has quit [Ping timeout: 276 seconds]
dlitvak has quit [Ping timeout: 255 seconds]
PedramT has joined #ruby
alakra has joined #ruby
thejamespinto has joined #ruby
adgtl has quit [Ping timeout: 250 seconds]
thejamespinto has quit [Ping timeout: 276 seconds]
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
sandstrom has joined #ruby
bakingbread is now known as icedp
Zamerick has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
aspiers has quit [Ping timeout: 272 seconds]
roshanavand has quit [Read error: Connection reset by peer]
kirun has joined #ruby
roshanavand has joined #ruby
adgtl has joined #ruby
DEA7TH has quit [Ping timeout: 264 seconds]
dronov has joined #ruby
DEA7TH has joined #ruby
DEA7TH has quit [Client Quit]
Eric___ has joined #ruby
mistermocha has joined #ruby
dronov has quit [Quit: WeeChat 1.3]
dronov has joined #ruby
dronov has quit [Client Quit]
dronov has joined #ruby
PedramT has quit [Read error: Connection reset by peer]
ibouvousaime has joined #ruby
PedramT has joined #ruby
dronov has quit [Client Quit]
aspiers has joined #ruby
dronov has joined #ruby
aryaching has joined #ruby
dronov has quit [Client Quit]
jdawgaz has joined #ruby
dlitvak has joined #ruby
mistermocha has quit [Ping timeout: 265 seconds]
dronov has joined #ruby
dronov has quit [Client Quit]
dronov has joined #ruby
Eric___ has quit [Ping timeout: 260 seconds]
dronov has quit [Client Quit]
arup_r has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 272 seconds]
<jackcom> Zarthus: hello, on windows i have encoding error like cp949 :(
<Zarthus> What editor do you use?
arup_r has joined #ruby
<jackcom> vim and cmd
arup_r has quit [Read error: Connection reset by peer]
<jackcom> gvim and cmd Zarthus
<jackcom> encoding error on windows Zarthus
<Zarthus> I can't say I personally can help here, but I reckon if you gist the error message and some code perhaps users can assist you better.
arup_r has joined #ruby
<jackcom> i must use mac or linux instead of windows? Zarthus
<demophoon> jackcom: what error are you seeing?
<jackcom> encoding error cpc949 error?
<demophoon> try reloading the file with utf-8 endoding in vim
<demophoon> :e ++enc=utf-8
<jackcom> ok thanks demophoon i will try it
<demophoon> then saving and seeing if the error persists
kobain has joined #ruby
<jackcom> UnicodeEncodeError: 'cp949' codec can't encode character '\u20a9' in position 90: illegal multibyte sequence demophoon
arup_r has quit []
<jackcom> error message
<demophoon> pastebin the code?
<jackcom> i delete it because of too angry
<jackcom> demophoon:
<jackcom> i m very angry because error occurs continuously. demophoon
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wsewolod has quit [Ping timeout: 240 seconds]
duckpuppy has joined #ruby
dwfait has joined #ruby
TomyLobo has joined #ruby
dwfait has quit [Ping timeout: 245 seconds]
duckpuppy has quit [Ping timeout: 265 seconds]
SCHAAP137 has quit [Read error: Connection reset by peer]
ibouvousaime has quit [Ping timeout: 264 seconds]
nocd has joined #ruby
PedramT has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
atomical has joined #ruby
Eric____ has joined #ruby
Eric____ has left #ruby [#ruby]
nocd has quit [Ping timeout: 260 seconds]
Eric____ has joined #ruby
djbkd has quit [Quit: Leaving...]
aspiers has quit [Ping timeout: 246 seconds]
pskosinski has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
kmckelvin has quit [Quit: WeeChat 1.3]
sankaber has joined #ruby
pskosinski has joined #ruby
Eric____ has quit [Ping timeout: 250 seconds]
Eric____ has joined #ruby
bMalum has quit [Ping timeout: 276 seconds]
Jekert has joined #ruby
ferr has quit [Ping timeout: 260 seconds]
bMalum has joined #ruby
Eric____ has quit [Client Quit]
Eric____ has joined #ruby
ibouvousaime has joined #ruby
arup_r has joined #ruby
ammar has quit [Remote host closed the connection]
Eric____ has quit [Client Quit]
haraigoshi has quit [Ping timeout: 272 seconds]
atomical_ has joined #ruby
Jardayn has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
choke has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
zotherstupidguy has joined #ruby
atomical has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
defendguin has joined #ruby
cpup has quit [Ping timeout: 264 seconds]
minimalism has joined #ruby
cpup has joined #ruby
rob_ has joined #ruby
iateadonut has joined #ruby
<rob_> hi
howdoi has joined #ruby
<rob_> if my class is essentially an array, am i better off using forwardable or including enumberable and defining an 'each' method, or is there some other preferred method?
ammar has joined #ruby
praveen has joined #ruby
bMalum has quit [Ping timeout: 240 seconds]
defendguin has quit [Quit: Leaving.]
KineticX has joined #ruby
fungoat has joined #ruby
Eric____ has joined #ruby
duckpuppy has joined #ruby
KineticX has quit []
fungoat has quit [Client Quit]
impwzi has joined #ruby
<impwzi> i have a serious question that is a case frustrating me for some quite time now. I really want to learn programming but everytime i start, i become impatient in a few matter of minutes and i start losing focus. Deep inside i want to learn but i dont know why i cant find the needed focus. any advice please from developers experience?
bkxd has joined #ruby
Eric____ has quit [Client Quit]
Eric____ has joined #ruby
atomical_ has joined #ruby
duckpuppy has quit [Ping timeout: 255 seconds]
<impwzi> anyone?
<jackcom> impwzi: ok
<ammar> l
<jackcom> what language you can do?
<jackcom> now?
govg has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 246 seconds]
<impwzi> javascript a bit , stuck at this closure thing callback i feel my brain is limited or something
<jackcom> no
<jackcom> impwzi: your brain is good
<jackcom> i think so
<jackcom> you can do it
cyfr0n has quit [Read error: Connection reset by peer]
<jackcom> but now you have no master
RegulationD has joined #ruby
<impwzi> yes
houhoulis has joined #ruby
PedramT has quit [Remote host closed the connection]
<jackcom> i can teach you $500 per month
<jackcom> you can give me $500? impwzi
aryaching_ has joined #ruby
<jackcom> i can teach you with $500 per month
atomical has quit [Ping timeout: 265 seconds]
<impwzi> i cant afford this
<havenwood> jackcom: Stop that.
aryaching has quit [Ping timeout: 264 seconds]
<jackcom> havenwood: oh
<jackcom> i m poor
<jackcom> so i must earn money. havenwood
<jackcom> :(
<havenwood> jackcom: Learn Ruby before you start tutoring in it.
<impwzi> anyways i was serious about my question
<jackcom> impwzi: ok there is procedure.
tcrypt has quit [Ping timeout: 250 seconds]
<jackcom> Do it step by step impwzi
tylersmith has joined #ruby
<impwzi> i think the key is finding focus and patience which i dont have
<jackcom> how old? impwzi
<impwzi> 34
<jackcom> oh you graduate from university of computer?
RegulationD has quit [Ping timeout: 245 seconds]
<jackcom> impwzi:
<impwzi> no i am new to programming
<jackcom> yeah
<jackcom> you must go to university to learn programming
<jackcom> you must discuss with friend and professor
<jackcom> anyway why you want learn programming? impwzi
<impwzi> ok now fuck off
<havenwood> impwzi: People have different strategies for concentrating. I like to change location frequently. Coffee helps.
<havenwood> Please be nice.
nullwarp has joined #ruby
<impwzi> havenwood: sorry but the guy here is irritating and wasting my time. apologies
<havenwood> impwzi: No prob!
<havenwood> impwzi: Yeah, sorry about that.
Waheedi has joined #ruby
<jackcom> maybe problem of psycology :(
<jackcom> it is not problem of programming impwzi
scripore has joined #ruby
govg has joined #ruby
PedramT has joined #ruby
Eric____ has quit [Quit: leaving]
_Tariq has joined #ruby
<_Tariq> Hello
<havenwood> _Tariq: hi
kp666 has joined #ruby
aspiers has joined #ruby
<_Tariq> I am trying to write an automated test test for a server
<_Tariq> but when I start accepting connections for the server, the test hangs
<_Tariq> it doesn't go further
<havenwood> rob_: Enumerable with #each and maybe even #to_ary for implicit conversions seems reasonable on the face of it to me. Or maybe even consider making it an Enumerator? Hard to say without knowing more.
<havenwood> _Tariq: Say more about the webserver? Getting any errors?
scripore has quit [Quit: Leaving]
<_Tariq> The server works, I'm sure of it. I tested it manually
<_Tariq> It's the automated testing that's horrible to do.
<_Tariq> Should I throw up some code?
praveen has quit [Remote host closed the connection]
ElFerna has joined #ruby
<havenwood> _Tariq: Code is good! :)
dtordable has joined #ruby
PedramT has quit [Ping timeout: 246 seconds]
<rob_> havenwood: im wondering if i need to have Days and Repos
aspiers has quit [Ping timeout: 272 seconds]
<jackcom> havenwood: i respect you :)
<jackcom> really
<_Tariq> As soon as I run the test, the test just "hangs"
arup_r has quit [Remote host closed the connection]
<_Tariq> doing nothing as it waits for a response
<_Tariq> from, what?
<_Tariq> And it's hanging if I ever have the server 'accept' stuff from a client
ferr has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
ElFerna has quit [Ping timeout: 272 seconds]
dorei has joined #ruby
<jackcom> impwzi: you got it?
<havenwood> jackcom: If someone expresses that they're frustrated with you, leave them alone!
bluOxigen has quit [Ping timeout: 255 seconds]
<jackcom> havenwood: :( ok
<jackcom> :P
praveen has joined #ruby
ItSANgo has quit [Quit: Leaving...]
<dtordable> People give each other a hugh
Guest1996 is now known as rubber
<dtordable> I call all of you 'sir'
<dtordable> You all got it...
Jekert has quit [Read error: Connection reset by peer]
<havenwood> _Tariq: Are you using TCPServer directly just to learn?
<_Tariq> Yes
<_Tariq> Is that a problem?
<_Tariq> Like, was I not supposed to use TCPServer?
<havenwood> _Tariq: No, it's fine to use just lower level than Rack, which is the most popular way to Ruby webserver.
<_Tariq> Yeah, if I wanted a real webserver, I would not be using some TCPServer
<havenwood> _Tariq: :D
antgel has joined #ruby
rubber is now known as rubber-soul
<havenwood> _Tariq: Then this is a good place to ask! It's a bit between shifts at the moment but hang around. :)
<dtordable> Passenger was called?
aspiers has joined #ruby
unreal_ has quit [Quit: Very funny Scotty. Now beam down my clothes!]
mistermocha has joined #ruby
jottr has joined #ruby
unreal has joined #ruby
lxsameer__ has joined #ruby
<_Tariq> Okay, so all I just want to do is run an automated test
<_Tariq> but
<_Tariq> it seems very...hard to set up
<_Tariq> since I can't start the server in the same automated test
<_Tariq> without it hanging
<_Tariq> Is there another way to test a server?
sameerynho has quit [Ping timeout: 260 seconds]
impwzi has quit [Ping timeout: 252 seconds]
aryaching_ has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 272 seconds]
lxsameer__ has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
praveen has quit [Remote host closed the connection]
praveen has joined #ruby
rodfersou has joined #ruby
mary5030 has quit [Remote host closed the connection]
praveen has quit [Remote host closed the connection]
bMalum has joined #ruby
dlitvak has quit [Remote host closed the connection]
davedev24 has joined #ruby
codecop has quit [Ping timeout: 245 seconds]
jackcom has quit [Quit: jackcom]
praveen has joined #ruby
atomical_ has quit [Max SendQ exceeded]
duckpuppy has joined #ruby
dwfait has joined #ruby
bkxd has joined #ruby
praveen has quit [Ping timeout: 250 seconds]
atomical has joined #ruby
_Tariq has quit [Remote host closed the connection]
dwfait has quit [Ping timeout: 255 seconds]
duckpuppy has quit [Ping timeout: 260 seconds]
bkxd has quit [Ping timeout: 240 seconds]
_Tariq has joined #ruby
iateadonut has joined #ruby
iateadonut has quit [Client Quit]
<_Tariq> Hello?
praveen has joined #ruby
arup_r has joined #ruby
rodfersou has quit [Quit: leaving]
usr12 has joined #ruby
<usr12> Hi, how can I set 'gem' to use '$HOME/bin/ruby' instead of '/usr/bin/ruby'
kp666 has quit [Ping timeout: 255 seconds]
adgtl has quit [Remote host closed the connection]
SenpaiSilver has quit [Quit: Leaving]
SenpaiSilver has joined #ruby
tvw has joined #ruby
ElFerna has joined #ruby
rippa has joined #ruby
thejamespinto has joined #ruby
ElFerna has quit [Ping timeout: 255 seconds]
ferr has quit [Ping timeout: 272 seconds]
aspiers has quit [Ping timeout: 240 seconds]
TheHodge has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
_Tariq has quit [Remote host closed the connection]
kent\n_ is now known as kent\n
kent\n has quit [Changing host]
kent\n has joined #ruby
s1kx has joined #ruby
atomical has quit [Max SendQ exceeded]
bMalum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ReK2 has quit [Ping timeout: 264 seconds]
<dtordable> usr12 setting the PATH variable
<dtordable> The order counts
smactive has joined #ruby
vikaton has joined #ruby
ElFerna has joined #ruby
rippa has quit [Read error: Connection reset by peer]
<usr12> dtordable: I don't know how to do that. Can you help me?
<dtordable> What shell you use?
<usr12> zsh
<dtordable> AFAIK try to install rvm
atomical has joined #ruby
<havenwood> usr12: One simple option for switching with zsh is chruby: https://github.com/postmodern/chruby#readme
kp666 has joined #ruby
<usr12> i can use bash too
<havenwood> usr12: It adds gem dirs to PATH and sets your RUBY_ vars. It also supports bash.
smactive has quit [Ping timeout: 255 seconds]
kp666 has quit [Max SendQ exceeded]
rippa has joined #ruby
<dtordable> Sets a ruby in your path
<havenwood> usr12: It's tested against bash 3/4 and zsh and is quite minimalist but works well for simply switching to arbitrary Rubies.
kp666 has joined #ruby
<usr12> okay
ReK2 has joined #ruby
arup_r has quit [Remote host closed the connection]
fantazo has quit [Quit: Verlassend]
<usr12> oh, I don't have root permission on this server, I can't install chruby
<dtordable> Get rvm
<usr12> I'll try it
<havenwood> usr12: You can install it to a local prefix.
<dtordable> Also that
<havenwood> usr12: RVM won't support switching to an already-installed Ruby but it's both an installer and switcher. RVM actually ships with chruby integration via MRVM.
ddfreyne has joined #ruby
<havenwood> usr12: PREFIX=$HOME/.chruby make install
<havenwood> usr12: Or wherever you'd like to put it.
<dtordable> Clever tip...
<usr12> havenwood: thank you, it works
_Tariq has joined #ruby
<_Tariq> hi
<havenwood> _Tariq: hi
<havenwood> usr12: you're welcome!
dionysus69 has quit [Ping timeout: 260 seconds]
diegoviola has joined #ruby
codecop has joined #ruby
arup_r has joined #ruby
<_Tariq> Okay, looking at Sackoverflow
rkazak_ has joined #ruby
praveen has quit [Remote host closed the connection]
praveen has joined #ruby
<usr12> i don't really understand how to use this chruby
<usr12> I hae now folder ~/.chruby
<havenwood> usr12: So you source the `share/chruby/chruby.sh` in one of your dotfiles so it sources each time you start your terminal.
<havenwood> usr12: Then you can use the `chruby` function from your terminal.
<havenwood> usr12: To set a default version for a folder also source the `share/chruby/auto.sh` file in your dotfile.
<_Tariq> Hey havenwood
<havenwood> usr12: So .zshrc and .bashrc typically.
<_Tariq> when you are done with usr12, can you help me?
lello62 has joined #ruby
lello62 has left #ruby [#ruby]
<havenwood> _Tariq: I'm just having breakfast in a sec but I'd be happy to take a look after if someone doesn't beat me to it!
tvw has quit [Ping timeout: 255 seconds]
<_Tariq> Sure
atomical has quit [Max SendQ exceeded]
ReK2 is now known as ReKWiLdS
<shevy> havenwood don't forget coffee
<_Tariq> wait
<_Tariq> no
<_Tariq> I need to edit this
<havenwood> usr12: Then use a `.ruby-version` file to set the default. If you don't need to switch Rubies (just need one?) you could not use a switcher at all.
rkazak_ has quit [Ping timeout: 260 seconds]
<_Tariq> Updated.
atomical has joined #ruby
duckpuppy has joined #ruby
<usr12> I'll try
tvw has joined #ruby
<havenwood> usr12: Once you get those two files sourced and your ~/.ruby-version file setup it's pretty simple. Or yeah you could use RVM which is probably simpler for a newcomer to get onboarded with but is much more complex overall. Your choice!
<havenwood> usr12: Like I said though, if you don't need to switch Rubies and just want to set a single default it might be worth just setting up a single Ruby.
nocd has joined #ruby
nocd has left #ruby [#ruby]
krobzaur has joined #ruby
<havenwood> usr12: What OS/distro? How'd you install the current Rubies? Do you need more than one?
<usr12> I try to explain my situation.
<usr12> I have Debian but i don't have root access
<usr12> /usr/bin/ruby version is 1.9.9
ta0 has joined #ruby
<usr12> I want to install jekyll but it requies 2.0.0
<usr12> so I installed ruby 2.3 to my home folder
<usr12> but now I try to get "gem" to use $HOME/bin/ruby instead of /usr/bin/ruby
duckpuppy has quit [Ping timeout: 246 seconds]
<usr12> I have never used ruby before
dlitvak has joined #ruby
<usr12> whoops, /usr/bin/ruby is 1.9.3
RegulationD has joined #ruby
<usr12> havenwood: http://pastebin.com/nj1FSuSu
<ruboto> usr12, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<usr12> oh sorry
colegatron has quit [Ping timeout: 264 seconds]
<havenwood> usr12: Here's an updated gist showing a non-root installation of Ruby 2.3 with ruby-install and chruby (I haven't tested it yet).
<usr12> havenwood: thank you very much
jbrhbr has joined #ruby
<havenwood> usr12: You're welcome! Please let me know if it works (or if it doesn't I'll help you fix it).
<usr12> I will
RegulationD has quit [Ping timeout: 256 seconds]
lele has quit [Ping timeout: 264 seconds]
dlitvak has quit [Remote host closed the connection]
<usr12> havenwood: it says unknown ruby
lele has joined #ruby
xlegoman has quit [Ping timeout: 240 seconds]
<usr12> maybe chruby doesn't know that I have ruby installed in $HOME/bin/ruby
dlitvak has joined #ruby
bluOxigen has joined #ruby
dlitvak has quit [Remote host closed the connection]
<havenwood> usr12: Did you follow the ruby-install steps to install 2.3.0 to ~/.rubies though?
<havenwood> usr12: (Just fixed a typo in that portion of the instructions.)
m3_del has joined #ruby
<havenwood> usr12: Those instructions cover installing 2.3 to ~/.rubies with ruby-install. Then chruby will detect it.
<havenwood> usr12: Hopefully you already have most or all of the deps installed: sudo apt-get install -y build-essential libffi-dev libgdbm-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev zlib1g-dev
<usr12> oh sorry, i didn't see that second gist
colegatron has joined #ruby
<havenwood> usr12: Updated it one more time to include the --no-install-deps flag because I imagine that'd failed when one is missing.
<havenwood> usr12: See if all is well after the second part. :)
<usr12> it's asking sudo password
<usr12> I miss some dependencies?
<havenwood> usr12: Use the updated gist. (Yeah, you must be missing deps.)
<havenwood> usr12: You can skip the deps... (maybe, depends on what's missing) but you'll not be getting what you're missing.
shakes has joined #ruby
<havenwood> usr12: A way to work around that would be to use a statically linked Ruby binary. Know which deps you're missing?
<usr12> no I don't know
<havenwood> usr12: If it's say libgdbm you'll probably be fine but if you're missing build-essential or libssl-dev I'd think that'd be a big problem.
<usr12> I never get this working. I just have to wait that debian updates it's ruby to 2.0
<havenwood> usr12: If you can install packages... that's a whole different story!
<havenwood> usr12: Can you install packages? (I thought you didn't have root.)
<usr12> I can only compile things to my home folder
<havenwood> usr12: I don't follow how the updated Debian Ruby package helps?
<havenwood> usr12: Ah, you'll just get it?
emilford has joined #ruby
govg has quit [Remote host closed the connection]
SenpaiSilver has quit [Read error: Connection timed out]
<usr12> havenwood: I mean that I would just like to use jekyll
<havenwood> usr12: I'd have thought an existing ruby-dev install would have covered the dep bases? Sorry, not the easy path without access to your package manager!
<usr12> but it needs ruby 2.0.0
<usr12> oh, i don't really know
<usr12> im new to this whole thing
emilford has quit [Client Quit]
<_Tariq> good luck usr12
<havenwood> usr12: Your going to probably want to be able to install packages! I'd suggest taking care of that side of things first. :)
<havenwood> You're*
<usr12> do you mean .deb packages?
<havenwood> usr12: sudo apt-get install
<havenwood> usr12: ya, packages
emilford has joined #ruby
<usr12> i don't have permission to use sudo
<havenwood> usr12: That's a problem!
<usr12> yes
<havenwood> usr12: really ties your hands
<usr12> havenwood: anyway thank you for your help and patience with my issue
framling has quit [Ping timeout: 265 seconds]
frog0909 has joined #ruby
<havenwood> usr12: You can get around it... but it's a pain. If you can't get Ruby deps installed the only thing I can think is Traveling Ruby or an offline installation of RVM with RVM or TravisCI's statically linked Ruby binary.
<_Tariq> Alright, havenwood
<usr12> yeah
<_Tariq> How was your breakfast?
<havenwood> usr12: Or if you can get your server administrator to install the deps I listed above you could follow the gist to build it yourself.
<havenwood> _Tariq: I haven't eaten any.
<_Tariq> oh
<_Tariq> got it
<usr12> havenwood: thank you
<havenwood> usr12: np
<havenwood> _Tariq: eating now, bbiab!
<_Tariq> got it
pepe76 has joined #ruby
<pepe76> ciao
pepe76 has left #ruby [#ruby]
atomical has quit [Max SendQ exceeded]
atomical has joined #ruby
jokke has quit [Quit: WeeChat 1.3]
yardenbar has joined #ruby
defendguin has joined #ruby
emilford has quit [Quit: leaving]
jokke has joined #ruby
ziyadb has joined #ruby
PedramT has joined #ruby
Tref has joined #ruby
usr12 has quit [Quit: leaving]
<havenwood> shevy: Fresh cup brewed!
<havenwood> _Tariq: Taking a look at your gist.
ChameleonSix has joined #ruby
<ChameleonSix> Hello
<ChameleonSix> Can you recommend me a good book about hacking with ruby
<ChameleonSix> besides koans which isnt a book
PedramT has quit [Ping timeout: 260 seconds]
xlegoman has joined #ruby
xlegoman has quit [Remote host closed the connection]
<_Tariq> havenwood: I'm about to eat right now
<havenwood> _Tariq: When you're back I'll eat again.
<_Tariq> Oh god
<havenwood> ;)
<_Tariq> I'll be back quickly
<ChameleonSix> hmm
<ChameleonSix> any good book about ruby
<ChameleonSix> in koans many things arent explained
<havenwood> ChameleonSix: Chris Pine's "Learn to Program" is frequently recommended for being kind to beginners and from there "The Well-Grounded Rubyist, Second Edition" jumps right into things.
<ChameleonSix> ok
<ChameleonSix> tnx
<ChameleonSix> also for making a web sever in ruby
<ChameleonSix> do i need to learn .net
<ChameleonSix> ?
<havenwood> ChameleonSix: Here are some book links: http://ruby-community.com/pages/links
<havenwood> ChameleonSix: What? No.
<ChameleonSix> hmm
dlitvak has joined #ruby
<ChameleonSix> you sure
<Ox0dea> It's a tro^Hap!
<havenwood> ChameleonSix: Okay, you win. You need to learn .Net. Particularly F#. So go do that!
<havenwood> ChameleonSix: Good idea.
<ChameleonSix> c#
<havenwood> ChameleonSix: That'll help you when you return to Ruby, older and wiser.
<ChameleonSix> ?
<havenwood> ChameleonSix: F#
<ChameleonSix> what is that
<havenwood> ChameleonSix: http://fsharp.org
<ChameleonSix> isnt c more popular
s1kx has quit [Quit: bai]
s1kx has joined #ruby
<havenwood> ChameleonSix: Live in the now, man.
<ChameleonSix> hmm
<ChameleonSix> c is now?
<havenwood> ChameleonSix: Think later in the alphabet.
<havenwood> ChameleonSix: Or C with some symbols after it.
<ChameleonSix> lol
<ChameleonSix> i know
<Ox0dea> >> ?C.succ
<ruboto> Ox0dea # => "D" (https://eval.in/496724)
<ChameleonSix> f is like an upgrade
<Ox0dea> ChameleonSix: Learn D.
<havenwood> >> ?D.succ.succ << ?#
<Ox0dea> F is too much of an upgrade just yet.
<ruboto> havenwood # => "F#" (https://eval.in/496726)
<ChameleonSix> why
<Ox0dea> Beause reasons, silly.
dlitvak has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
<ChameleonSix> they are similar to c#
<ChameleonSix> ?
<Ox0dea> They are similar to a Turing machine.
<Ox0dea> All of them.
<ChameleonSix> lol
<havenwood> ChameleonSix: We've already decided you're to learn F#. Report back once you're mission is complete.
<havenwood> your*
<ChameleonSix> ok
<toretore> i only use z#
<ChameleonSix> yes sir
<ChameleonSix> lol
<Ox0dea> ChameleonSix: Godspeed.
<Ox0dea> Hop to it!
<havenwood> toretore: Time traveller!
<toretore> that's one of the features of z#
<Ox0dea> toretore: http://chrisdone.com/z/
<ChameleonSix> anyway
<ChameleonSix> can buffer overflow be exploited using ruby or c only?
<Ox0dea> It's an offside-rule Lisp; what could possibly go right?
<ChameleonSix> Im reading some book about hacking
atomical has quit [Max SendQ exceeded]
<_Tariq> hi
duckpuppy has joined #ruby
dwfait has joined #ruby
<_Tariq> havenwood: Are you there?
<ChameleonSix> why are all hacking books written in c
<ChameleonSix> :(
<_Tariq> ChameleonSix: Speed.
<ChameleonSix> i should learn c ?
<_Tariq> At least, that's my guess.
<ChameleonSix> or d
<ChameleonSix> lol
<havenwood> ChameleonSix: Should you learn Japanese or Italian? Both!
bkxd has joined #ruby
<Ox0dea> ChameleonSix: https://eval.in/496729
<havenwood> ChameleonSix: See what you enjoy
<Ox0dea> Look at all that hacking!
<ChameleonSix> Ok
atomical has joined #ruby
<ChameleonSix> But Italian sucks
<ChameleonSix> lol
<ChameleonSix> Anyway can a buffer overflow be exploited using ruby?
f00dMonsta_ has joined #ruby
<toretore> BufferOverflow.new('www.google.com').exploit!
<Ox0dea> ChameleonSix: ^
<toretore> everything is easy in ruby
<Ox0dea> That's a bingo.
<jhass> ?metasploit
<ruboto> Please join #metasploit for help with it.
<ChameleonSix> im banned
<toretore> no shit
<jhass> reflect on why
<ChameleonSix> idk
<jhass> you do
<ChameleonSix> i do
<havenwood> _Tariq: The gist doesn't run because it can't find pages.rb. Looking to see if I can tell from what you've gisted but I'm not sure what's going on. If you could get it down to a working example that fails how you're failing I bet you can get somebody to explain why.
<ChameleonSix> there are things no one wants to help with
<_Tariq> Hm, let me find pages.rb
<_Tariq> Then
<ChameleonSix> i guess
<_Tariq> Also
<_Tariq> I did not know you can run gists
<havenwood> _Tariq: Or if you can, remove things until you have just the broken part left. A minimal example is valuable!
<Ox0dea> _Tariq: That's not how havenwood meant.
<jhass> ChameleonSix: tbh and direct at this point it's much more about your attitude and the resulting level of your questions
<havenwood> _Tariq: You can clone then run a gist.
<ChameleonSix> hmm ok
<ChameleonSix> Im new to this
<jhass> you said you have a book, read it. read it again until you understand what it tells you
<ChameleonSix> so basically you are saying that anything can be done with ruby
duckpuppy has quit [Ping timeout: 255 seconds]
f00dMonsta has joined #ruby
<ChameleonSix> it is written in c
aryaching has joined #ruby
<jhass> your question shows that there's less than no understanding of what a buffer overflow is
<ChameleonSix> i must learn c first
f00dMonsta__ has quit [Ping timeout: 246 seconds]
<ChameleonSix> i understand what is that
dwfait has quit [Ping timeout: 272 seconds]
<jhass> whatever you think what you need to do, do it, don't talk about it. Nobody cares
<ChameleonSix> when a program doesnt have space to write
<jhass> you don't
<ChameleonSix> lol
s2013 has joined #ruby
<_Tariq> havenwood: The only thing that is broken is just the test
<ChameleonSix> memory leak
<Ox0dea> ChameleonSix: Can't the program just use a different sheet of paper?
<_Tariq> But
<_Tariq> I uploaded pages.rb
<jhass> !mute ChameleonSix
<Ox0dea> Oh.
bkxd has quit [Ping timeout: 276 seconds]
<jhass> ChameleonSix: ping me when you have an actual question about Ruby. Write the question to me first and I decide whether you show that you invested effort with it
<_Tariq> Actually, if you are cloning it, you might want to change '../pages'
<jhass> Ox0dea: don't feed
f00dMonsta_ has quit [Ping timeout: 246 seconds]
<Ox0dea> >> 0xfeeder
<ruboto> Ox0dea # => (1044190/1) (https://eval.in/496735)
<havenwood> Ox0dea: How Rational!
<_Tariq> Since the "spec" file was meant to be located in an individual spec folder.
f00dMonsta_ has joined #ruby
<_Tariq> As a side note, how many trolls does this chat get every year?
<havenwood> _Tariq: The #ruby-community channel is focused on such things. Good place to discuss that kinda thing.
<_Tariq> Ah
<_Tariq> The implication being, "Don't talk about that here."
<_Tariq> Got it
<_Tariq> My bad.
<havenwood> And then there's the #ruby-offtopic channel for hangman or all sorts of stuff.
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> ^^^ aha! I knew it!!! unicode hangman!!!!!
f00dMonsta has quit [Ping timeout: 246 seconds]
<toretore> and #ruby-dating for finding a like-minded partner
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy> I already have jhass :)
cb_ has joined #ruby
cb_ has joined #ruby
<_Tariq> So, havenwood
<_Tariq> What might be going on wrong with my test code?
agent_white has joined #ruby
jbrhbr has quit [Quit: Leaving.]
f00dMonsta__ has joined #ruby
tubuliferous_ has joined #ruby
<havenwood> _Tariq: Getting any errors or it just stalls or what? What's not as expected?
<_Tariq> The server itself works fine
<_Tariq> It's the automated tests that stall
<_Tariq> When I run it, it stalls
<_Tariq> does nothing
<havenwood> _Tariq: On line 38 or where?
<_Tariq> Line 38
<_Tariq> of server_spec
dlitvak has joined #ruby
f00dMonsta_ has quit [Ping timeout: 256 seconds]
ChameleonSix has left #ruby [#ruby]
<havenwood> _Tariq: So a blocking #accept? Familiar with #accept_nonblock? It seems you don't want blocking?
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
XangadiX has joined #ruby
<_Tariq> What's block?
s2013 has joined #ruby
dlitvak has quit [Remote host closed the connection]
<_Tariq> What does accept_nonblock do?
<havenwood> _Tariq: Jesse Storimer has a great, very accessible ebook called "Working with TCP Sockets" that I'd highly recommend if you want a nice, crisp read.
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cb_ has quit [Remote host closed the connection]
f00dMonsta_ has joined #ruby
<havenwood> _Tariq: Check the sample chapter ^ pages 32 and 33.
<havenwood> _Tariq: But it's absolutely worth a read if you're interested in TCPSockets! :)
atomical has quit [Max SendQ exceeded]
<toretore> it's a great read. the others are as well: http://www.jstorimer.com/collections/ebooks
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
<_Tariq> Got ti
<_Tariq> *it
praveen has quit []
<_Tariq> But that doesn't necessarily help out the existing problem
<_Tariq> of getting a test to work
<_Tariq> Let me try to change accept to accept_nonblock
ta0 has quit [Ping timeout: 272 seconds]
<toretore> that won't help because you don't understand what it means
atomical has joined #ruby
<_Tariq> ...you're right toretore
f00dMonsta__ has quit [Ping timeout: 245 seconds]
f00dMonsta has joined #ruby
jdawgaz has joined #ruby
<toretore> as for testing, you should probably extract your own logic away from the networking logic, because that's not what you want to test
<toretore> tcp is known to work
haraigoshi has joined #ruby
jdawgaz has quit [Client Quit]
<_Tariq> Right, I don't want to test out stuff that has already been proven to work
<_Tariq> But
jdawgaz has joined #ruby
<_Tariq> I don't know exactly how to extract out the networking logic
<havenwood> udp work to known
<_Tariq> Unless you're literally asking me to stuff the networking logic in its own class
<_Tariq> and then just perform methods on that class.
<_Tariq> instead of doing everything in a single class.
<_Tariq> But that just look messy.
f00dMonsta_ has quit [Ping timeout: 245 seconds]
jdawgaz has quit [Client Quit]
ElFerna has quit [Ping timeout: 264 seconds]
cb_ has quit [Remote host closed the connection]
harai has joined #ruby
yardenbar has quit [Ping timeout: 255 seconds]
<toretore> from what i can see of your code, the only really test-worthy part at this point is the Page class
vasilakisfil_ has quit [Quit: Konversation terminated!]
<_Tariq> And the pages are just accessors
TheNet has joined #ruby
<_Tariq> which also don't really need to be tested
dionysus69 has joined #ruby
<toretore> well then you don't have anything to test ;)
<_Tariq> well, they contain data that can be extracted using getter methods
<_Tariq> ...well, uh
<_Tariq> but the assignment said to write tests
<_Tariq> So this is problematic.
<_Tariq> Hm.
<_Tariq> Maybe I should write tests from now on?
<_Tariq> With new functionality?
<_Tariq> (If I'm using somebody else's code like socket, no tests needed)
<_Tariq> (but if I'm writing my code, test ahoy?)
<toretore> try to decouple as much as you can, it'll make it easier to test
haraigoshi has quit [Ping timeout: 272 seconds]
f00dMonsta_ has joined #ruby
Darmani has joined #ruby
atomical has quit [Max SendQ exceeded]
<Darmani> Hello everyone ^^
PedramT has joined #ruby
TomPeed has joined #ruby
<dorei> hello, is there anything at ruby core/stdlib to help me deal with endianness?
alakra has quit [Ping timeout: 260 seconds]
TheMoonMaster has quit [Remote host closed the connection]
sandstrom has joined #ruby
sorbo_ has joined #ruby
<toretore> _Tariq, to actually test against the socket you will have to use threads or non-blocking behavior, which is less than straight forward
f00dMonsta has quit [Ping timeout: 246 seconds]
<Ox0dea> dorei: You should find Array#pack and String#unpack to be of some utility.
<toretore> _Tariq, hence, it's easier if you can manage to test without actually going through a socket
<_Tariq> And since the assignment recommends I don't use threads, non-blocking behavior seems like something I don't want to touch
<_Tariq> I just don't feel confident with unit tests
<_Tariq> since integration tests are guaranteed to show that something works
ElFerna has joined #ruby
<_Tariq> But I suppose I might as well do the integration tests manually
<dorei> Ox0dea: i was hopping to avoid them
<Ox0dea> dorei: That's a shame.
<toretore> _Tariq, if you know how to use threads safely then go for it, but if not you will have problems
craysiii has joined #ruby
mistermocha has joined #ruby
<_Tariq> I don't know how to use threads. :P
howdoi has quit [Quit: Connection closed for inactivity]
f00dMonsta__ has joined #ruby
<_Tariq> I guess the last thing I'm wondering is that if I split out the networking logic into its own class of "Server"
llua has joined #ruby
<_Tariq> what should I call the other "logic" class?
<Ox0dea> Handler.
atomical has joined #ruby
f00dMonsta_ has quit [Ping timeout: 246 seconds]
<shevy> hehehe
<shevy> now we see why we have fancy names for gems
firstdayonthejob has quit [Ping timeout: 245 seconds]
<Darmani> Ox0dea: Breh
<toretore> the Server class shouldn't deal with sockets; just have it respond to methods and test that those return what they should
<Darmani> I know this is wrong but am I thinking in the right direction?
<toretore> server = Server.new(pages); assert_equal page_1, server.page_for('GET', '/page_1')
ta0 has joined #ruby
atomical has quit [Max SendQ exceeded]
<Ox0dea> Darmani: What's all this, then?
<Darmani> That's the problem from last night... You wanted me to count the vowels even if they don't appear ._.
<Ox0dea> Darmani: Voila!
astrobunny has quit [Ping timeout: 272 seconds]
<Ox0dea> Why do you hate String#count?
<Darmani> I don't know what that is...
ur5us has joined #ruby
<Darmani> Q.Q
<Darmani> No really.
ur5us has quit [Remote host closed the connection]
atomical has joined #ruby
ur5us has joined #ruby
<Darmani> I know about the "count" method
<Darmani> but not String#count...?
<shevy> Darmani what does it do
alakra has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
<Darmani> what does what do
<Darmani> the count method?
<shevy> yeah
<shevy> don't google!
<Darmani> I know what it does -.-
<Darmani> It returns a number depending on what you call it on.
<shevy> :)
<shevy> I'll call it on cats
ElFerna has quit [Quit: WeeChat 1.3]
<Darmani> o.o
<Darmani> okay.
dwfait has joined #ruby
TheMoonMaster has joined #ruby
<_Tariq> also, thanks, toretore, now I got a good sense of what to do next
FooMunki has joined #ruby
<Ox0dea> >> h = Hash.new 0; h['a'] += 0; h # Darmani
<ruboto> Ox0dea # => {"a"=>0} (https://eval.in/496747)
<Ox0dea> See what's going on there?
alakra has quit [Ping timeout: 272 seconds]
<Ox0dea> Even though the assignment was a no-op, the key has been explicitly assigned to, so it shows up.
PedramT has quit [Remote host closed the connection]
<Ox0dea> I'm not saying you should pursue that line of thinking in fixing your program, but it's something to think about.
<Darmani> wait.
defendguin has quit [Quit: Leaving.]
<Darmani> I just tried that though and it set everything to 0...
<Darmani> If you set the Hash to 0 o.o
<Darmani> or not the hash but I mean the incrementation hsh[obj] += 0
FooMunki has quit [Client Quit]
FooMunki has joined #ruby
Lewix has quit [Ping timeout: 276 seconds]
<dorei> Ox0dea: i've found a way without pack/unpack :)
<dorei> >> ->val{ ((val << 8) | ((val >> 8) & 0x00FF)).to_s(16)[2..-1] }.(0x3172)
<ruboto> dorei # => "7231" (https://eval.in/496749)
yardenbar has joined #ruby
ta has quit [Read error: Connection reset by peer]
atomical has quit [Max SendQ exceeded]
<Ox0dea> dorei: Are you using the wrong language? :P
kobain has quit [Ping timeout: 240 seconds]
zast has joined #ruby
ta has joined #ruby
<Ox0dea> Darmani: It doesn't set everything to 0, but it does explicitly set every key. You gon' need one o' them conditionals.
<dtordable> Ox0dea, hello
atomical has joined #ruby
FooMunki has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
<Darmani> Ox0dea: okay thanks man. I'm gonna have to study a bit.
<Darmani> I'm not getting it ^^
puria has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 260 seconds]
FooMunki has joined #ruby
hahuang61 has joined #ruby
karapetyan has joined #ruby
Lewix has joined #ruby
jbrhbr has joined #ruby
<dorei> >> ["3172"].pack('H*').unpack('n*').pack('v*').unpack('H*')
<ruboto> dorei # => ["7231"] (https://eval.in/496750)
SenpaiSilver has joined #ruby
deuterium has quit [Ping timeout: 260 seconds]
vdamewood has quit [Quit: Life beckons.]
Zamerick has quit [Ping timeout: 246 seconds]
marr has joined #ruby
voker57 has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zamerick has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
__chris has joined #ruby
s2013 has joined #ruby
jbrhbr has quit [Quit: Leaving.]
weemsledeux has joined #ruby
<Ox0dea> Yikes.
Tref has quit [Quit: tref]
nfk has joined #ruby
alakra has joined #ruby
<Ox0dea> dorei: If you're working with bytes at the string level, why not use stringy operations?
<_Tariq> Oh.
<_Tariq> This looks like very cool code
<_Tariq> but I can't really use it in good faith
<_Tariq> since this is an assignment
<_Tariq> But
<_Tariq> I love it, toretore! Thanks.
<toretore> of course, it's just to demonstrate the concept
<_Tariq> Hopefully I can learn from it and implement it on my own
<_Tariq> Yea
<_Tariq> Now I have a better sense of what you were talking about
<toretore> i wouldn't hand this in for an assignment either, it just got me curious
<dorei> Ox0dea: what do you mean?
shakes has quit [Quit: Leaving]
<Ox0dea> >> '3172'.scan(/../).reverse.join # dorei
<ruboto> Ox0dea # => "7231" (https://eval.in/496752)
<Ox0dea> Is that not fit for your purpose?
Yzguy has joined #ruby
Wsewolod has joined #ruby
__chris has quit [Quit: This computer has gone to sleep]
<Darmani> Ox0dea: Brehh
<Darmani> This is gonna sound weird.
<Darmani> But can you give me a problem to solve?
<Ox0dea> Darmani: Make an RPN calculator.
<Darmani> the fuck is that? Lol
XangadiX has quit [Ping timeout: 276 seconds]
<Ox0dea> dorei: https://eval.in/496753
<Ox0dea> That should work for an integer of any size.
__chris has joined #ruby
__chris has quit [Client Quit]
<shevy> Darmani do you not have any problems that you want to solve by programming?
cb_ has joined #ruby
cb_ has quit [Changing host]
cb_ has joined #ruby
framling has joined #ruby
aibot has quit [Ping timeout: 246 seconds]
<Darmani> shevy: Uh... no... Like what?
vikaton has quit [Quit: Connection closed for inactivity]
<agent_white> Sort your music library? Fix tags on your music? Make a music player? Make it in ncurses? Then a GUI? In shoes? Contribute to shoes?
<agent_white> etc.
<Ox0dea> Darmani: Do you upgrade your system often? Automate it!
<Darmani> woah. woah. woah.
<Darmani> jesus
<Ox0dea> Do you sports?
<Darmani> do I sports?? lmao
<Darmani> yeah me sports frankenstein =P
<Ox0dea> Write a program that alerts you every time Curry drains it from the parking lot.
<Darmani> I don't feel like I'm talented enough to write any of those.. I guess I could try though..
<Ox0dea> There's no official API, but you wouldn't have to resort to scraping either.
<agent_white> Write a... shell!
<Ox0dea> Ride a seahorse!
sandstrom has quit [Quit: My computer has gone to sleep.]
<Darmani> whats a shell...
<agent_white> Upside down!
<Darmani> Lol
<shevy> Darmani dunno, just write things you want to solve into a file, after a while you'll have a LOT of things to want to work on
<Ox0dea> $ echo "all the world's ills" > todo
<Darmani> shevy: Okay.
<Darmani> Well a music player sounds like fun..
<Darmani> I guess I could start there...
<Ox0dea> How is that going to cure cancer?
tvw has quit [Remote host closed the connection]
<Darmani> Music cures cancer
<agent_white> Music therapy!
<Darmani> didn't you know?
tubuliferous_ has quit [Ping timeout: 260 seconds]
<Ox0dea> >> '#2deep4me'.gsub /\d/, &:succ
<ruboto> Ox0dea # => "#3deep5me" (https://eval.in/496754)
yardenbar has quit [Ping timeout: 272 seconds]
<shevy> Darmani ok that's a good start
<Darmani> I've never built like a real program before...
<Darmani> How do you start. Lol
<agent_white> I started with an IRC client. It was fun, besides the ncurses.
emilford has joined #ruby
<Darmani> What is ncurses?
ruby-lang913 has joined #ruby
<agent_white> TUI library.
ruby-lang913 has quit [Client Quit]
<Darmani> oh great
<Darmani> more words that I don't understand
<toretore> ncurses fills you with curses?
<agent_white> Google what you ask me. Enlighten your human!
<agent_white> toretore: I thought it was no-curses. I think I was wrong.
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai has quit [Ping timeout: 246 seconds]
baweaver has joined #ruby
<shevy> Darmani well, it's a bit difficult to jump into curses, perhaps start simpler. write a ruby class that holds a playlist, like audio file, which you can then lateron make use for to play audio files
emilford has quit [Client Quit]
zeroDivisible has quit [Quit: WeeChat 1.3]
lemur has joined #ruby
zeroDivisible has joined #ruby
<Darmani> shevy: Alright..
zeroDivisible has quit [Client Quit]
alakra has quit [Ping timeout: 240 seconds]
zeroDivisible has joined #ruby
s2013 has joined #ruby
baweaver has quit [Ping timeout: 245 seconds]
emilford has joined #ruby
PedramT has quit []
s2013 has quit [Client Quit]
cb_ has quit []
s2013 has joined #ruby
defendguin has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Kn|t3 has joined #ruby
yardenbar has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
<Ox0dea> Darmani: How about an IRC bot that periodically does sentiment analysis of the conversation and reports its findings?
<Darmani> Ox0dea: Lmao
alakra has joined #ruby
<Darmani> We'll call it "sensebot"
<Ox0dea> > The beatings will continue until morale improves.
ihsw has joined #ruby
<Darmani> morale has been improving ever since I got here =P
<ihsw> hi, when i run `rbenv install 2.3.0` it stops after 'Downloading...'
dlitvak has joined #ruby
<ihsw> there is no 'Installing'
ur5us has quit [Ping timeout: 264 seconds]
arup_r has quit []
zeroDivisible has quit [Quit: WeeChat 1.3]
alakra has quit [Ping timeout: 265 seconds]
weaksauce has joined #ruby
<shevy> Darmani a basic irc bot would also be fine, just get to the point where it can connect, say "hello" and then log out again. that way you learn a bit about sockets/connection
duckpuppy has joined #ruby
<Darmani> shevy: Could you maybe show me an example?
<Darmani> ._.
hahuang61 has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
tubuliferous_ has joined #ruby
<ihsw> why does rbenv fail silently without errors :(
<diegoviola> just use chruby
anisha has joined #ruby
<ihsw> diegoviola: gotta use rbenv for work
<diegoviola> why though?
anisha has quit [Remote host closed the connection]
<diegoviola> chruby never gave me any problems, always worked perfectly
<Ox0dea> Darmani: Here's a first brush at a ruboto clone: https://eval.in/496755
duckpuppy has quit [Ping timeout: 276 seconds]
emilford has quit [Ping timeout: 245 seconds]
cdg has joined #ruby
<Ox0dea> Don't actually run it.
<havenwood> ihsw: Maybe mention to work that it fails silently without errors. Also ask them why it ships its own OpenSSL instead of using the package manager's and why it has a C extension replacement for a shell builtin while you're at it? :P
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darmani> Ox0dea: :o
bkxd has quit [Ping timeout: 250 seconds]
s2013 has joined #ruby
<Darmani> that's so cool.
<havenwood> ihsw: You can use ruby-install to install for rbenv (unless you're also married to ruby-build due to work).
RegulationD has joined #ruby
<ihsw> havenwood: welp, i'm open to other's, but i'm not at all familiar with ruby enough to suggest alternatives nor am i in any position to do so (new hire).
<havenwood> ihsw: To install for rbenv with ruby-install: ruby-install --install-dir ~/.rbenv/versions/2.3.0 ruby 2.3.0
<ihsw> also, i kind of figured it out. ruby-install and building rubies in general requires curl, build-essential, and some other blah-dev libraries.
<havenwood> ihsw: ruby-install unlike ruby-build fetches deps for you
<ihsw> wait, this is ruby-build.
<ihsw> rbenv and ruby-build require a bunch of libs to work. https://github.com/tcnksm/dockerfile-rbenv/blob/master/Dockerfile
<havenwood> ihsw: Right, but ruby-install will fetch the dependencies via your package manager unlike ruby-build.
<havenwood> ihsw: It's made by the author of chruby but works fine with rbenv or with no switcher at all.
<ihsw> yeah i get that, certainly more sensible.
darkf has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 265 seconds]
ChameleonSix has joined #ruby
ChameleonSix has left #ruby [#ruby]
ChameleonSix has joined #ruby
ChameleonSix has left #ruby [#ruby]
ChameleonSix has joined #ruby
jbrhbr has joined #ruby
ziyadb has quit [Quit: Connection closed for inactivity]
XangadiX has joined #ruby
ChameleonSix has quit [Client Quit]
<ihsw> so after i run rbenv install 2.3.0, rbenv local 2.3.0, and rbenv rehash -- ruby -v says command not found. what's wrong here?
nlsun has quit [Quit: ZNC - http://znc.in]
<ihsw> ~/.rbenv/versions shows 2.3.0 there, and rbenv which ruby shows ~/.rbenv/versions/2.3.0/bin/ruby
pawnbox has quit [Remote host closed the connection]
<havenwood> ihsw: rehash with more vigor
nlsun has joined #ruby
<havenwood> ihsw: dunno :O
pawnbox has joined #ruby
<ihsw> rbenv rehash --vigor executes successfully, but `ruby -v` still doesn't work. :(
bluOxigen has quit [Ping timeout: 260 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
<havenwood> ihsw: Maybe they'll never realize you're using chruby if you?: alias rbenv="chruby"
<havenwood> ihsw: :P
<ihsw> :X
<havenwood> ihsw: I don't know enough about rbenv but I'd be happy to help with chruby. If you hang around here an rbenv user might come along.
<diegoviola> why would they care what you use?
<ihsw> welp i think i've isolated it, /etc/profile.d/rbenv.sh is being ignored (i forgot to chmod +x it?) and i appended `eval "$(rbenv init -)"` to /.bashrc instead of /root/.bashrc
crazydiamond has quit [Remote host closed the connection]
<_Tariq> Is there a joke license I could use?
<Ox0dea> _Tariq: WTFPL.
<_Tariq> Like one that is valid so somebody could use it
jbrhbr has quit [Quit: Leaving.]
<_Tariq> I suppose that could work as a good joke
<_Tariq> But I've heard it so many times that I kinda forgot it as a joke
ChameleonSix has joined #ruby
<_Tariq> Actually, I'm not sure if the text of the WTFPL is licensed under the WTFPL
<Ox0dea> > Everyone is permitted to copy and distribute verbatim or modified copies of this license document...
<Ox0dea> _Tariq: You just do what the fuck you want to.
ur5us has joined #ruby
alakra has joined #ruby
<_Tariq> dorei: That sounds awesome.
unident77 has joined #ruby
<_Tariq> I was thinking about licensing small gists with the GPL
<_Tariq> copying and pasting the whole GPL
<_Tariq> but I think this license probably is more sensible
<Ox0dea> You could also just refrain.
ChameleonSix has left #ruby [#ruby]
<_Tariq> What do you mean by refrain?
<Ox0dea> Just don't.
<havenwood> Gem::Licenses::IDENTIFIERS.include? 'WTFPL' #=> true
ibouvousaime has quit [Ping timeout: 260 seconds]
<_Tariq> Fair enough, Ox0dea. I just don't like the idea of having to copy and paste licenses with every single code
<Ox0dea> Good idea.
<_Tariq> I would rather say, "This is MIT/GPL/etc. You know what it is."
<Ox0dea> No, that doesn't work either.
<_Tariq> :(
<Ox0dea> Just don't license snippets?
<_Tariq> But what if someone wants to copy and paste my snippet?
<Ox0dea> They'll do it.
<havenwood> Or creative commons them.
_Tariq has quit [Remote host closed the connection]
aibot has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
ChameleonSix has joined #ruby
ibouvousaime has joined #ruby
ChameleonSix has left #ruby [#ruby]
dmr8 has quit [Quit: Leaving]
[ddmp] has joined #ruby
decoponio has quit [Quit: Leaving...]
[ddmp] has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
ziyadb has joined #ruby
<Darmani> Ox0dea: question
<Darmani> does it matter what port I use for the bot?
XangadiX has quit [Ping timeout: 240 seconds]
<Ox0dea> Yeah.
steffkes has quit [Ping timeout: 260 seconds]
<Darmani> It has to be 6667?
<Ox0dea> No.
<Ox0dea> > All freenode servers listen on ports 6665, 6666, 6667, 6697 (SSL only), 7000 (SSL only), 7070 (SSL only), 8000, 8001 and 8002.
<Darmani> ah.
<Darmani> okay
pawnbox has quit [Remote host closed the connection]
<Darmani> another question
<Darmani> How can you call .puts on s like a method?
<Darmani> what is that doing exactly?
<Ox0dea> >> require 'socket'; TCPSocket.ancestors # Darmani
<ruboto> Ox0dea # => [TCPSocket, IPSocket, BasicSocket, IO, File::Constants, Enumerable, Object, Kernel, BasicObject] (https://eval.in/496756)
<Ox0dea> See the IO?
<Ox0dea> Everything descended from IO has a #puts method.
<Darmani> I see it...
<Darmani> So you're saying you have all those modules included with your bot?
centrx has joined #ruby
ChameleonSix has joined #ruby
<Ox0dea> No, all of those sans the Socket ones are in core.
lemur has quit [Read error: Connection reset by peer]
<Darmani> ah.
<Darmani> ok.
<Ox0dea> >> require 'socket'; TCPSocket.instance_method(:puts).owner
<ruboto> Ox0dea # => IO (https://eval.in/496757)
<eam> well that's a handy thing
quaristice has joined #ruby
gvillalta99 has joined #ruby
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
<Darmani> breh
<Darmani> What is the code on line 5
<Darmani> whats it do
ChameleonSix has quit [Client Quit]
<Darmani> from here https://eval.in/496755
thejamespinto has quit []
<centrx> Darmani, What does the Ruby do, or what does the IRC command do?
sergey_makagon has joined #ruby
<Ox0dea> Darmani: That's just IRC ceremony.
quaristice has quit [Client Quit]
<Darmani> what is IRC ceremony
<Darmani> SPEAK ENGLISH
lola has joined #ruby
<lola> Sup
<agent_white> Darmani: Have you telnetted into IRC before?
<yorickpeterse> Darmani: calm down
<lola> Can anyone help me
<agent_white> !ask | lola
<yorickpeterse> ?ask lola
<ruboto> lola, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<lola> I cant execute rb script on fedora
<Darmani> yorickpeterse: I'm calm lol I pretend to be overdramatic.
<lola> i will paste the error sec
aryaching has quit [Ping timeout: 260 seconds]
<Darmani> agent_white: No..
pawnbox has joined #ruby
<Darmani> I haven't telnetted into anything before
<agent_white> Darmani: Try this. `telnet irc.freenode.org 6667`. Then, inside the quotes on lines 4-6, enter each of those in. One atta time. And see what happens :)
<Darmani> I'm not sure what that word even means T.T
<lola> until_loop.rb:7: void value expression
<lola> it says this
<Ox0dea> Darmani: Why do you flaunt your ignorance?
kirun has quit [Quit: Client exiting]
[dmp] has quit [Quit: WeeChat 1.3]
<Darmani> Ox0dea: I wouldn't call that flaunting. It's called honesty.
[dmp] has joined #ruby
<lola> ?
<lola> no feeding
<agent_white> lola: Paste your code into a pastebin/gist/etc. so we can see what's happening.
<lola> that isnt the problem
<lola> the perms are
<lola> i cant execute it
<Darmani> agent_white: Hang on I'm still reading the documentation on Socket's and what not.
<lola> even the most simple code
<yorickpeterse> lola: put your code and the error on gist.github.com
<yorickpeterse> just the error makes it impossible to tell
<agent_white> lola: until_loop.rb:7: void value expression
<lola> ok
<lola> yes
<agent_white> Darmani: Try the telnet first. Will take you 2 seconds.
yfeldblum has joined #ruby
<Darmani> fine....
<Ox0dea> lola: `++` is not Ruby.
<lola> ah += 1
guacamole has joined #ruby
<lola> i am learning too much languages with my friend ChameleonSix
ta0 has quit [Ping timeout: 256 seconds]
<Ox0dea> Clearly.
<lola> yes
guacamole has joined #ruby
<Ox0dea> >> +break
<ruboto> Ox0dea # => /tmp/execpad-2047d8f2a549/source-2047d8f2a549:2: void value expression (https://eval.in/496759)
<Ox0dea> There's your "void value expression".
<Ox0dea> Your code was being interpreted as `$i + +break`.
<Darmani> agent_white: Like this? http://ideone.com/hBOhPl
guacamole has quit [Client Quit]
<lola> tnx
lola has quit [Quit: Page closed]
<Ox0dea> Darmani: TCPServer?
<Darmani> hm? o.o
pawnbox has quit [Ping timeout: 272 seconds]
<Ox0dea> Why does that say TCPServer?
<Darmani> I don't know isn't that how it works?
<Darmani> Is it supposed to say Telnet?
<agent_white> Darmani: Are you on windows?
<Ox0dea> It's supposed to say TCPSocket.
<Darmani> oh.
<Ox0dea> How did that even happen?
<Darmani> changed it.
<Darmani> agent_white: Yes
<agent_white> Darmani: Yeah I didn't mean change your code... I meant to open up a terminal/command prompt, and try to telnet into freenode.
<Darmani> Ox0dea it doesnt matter lol
<Darmani> agent_white: oh.
<Ox0dea> Darmani: If you're going to be a "copy-paste programmer", you should probably git gud at copying and pasting.
<Darmani> I've never done that lol
magaudet has quit [Ping timeout: 264 seconds]
<shevy> you copy paster you!
<shevy> you java programmer you!!!
<Darmani> Ox0dea: nigga if that was your pathetic attempt to insult try again sonn
kobain has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Darmani: What time do you open?
<Ox0dea> Oh, I thought you said "try again soon".
<Ox0dea> That would've been much funnier.
bkxd has joined #ruby
<Darmani> Ox0dea: It would have
<Darmani> If you could read
<Ox0dea> Alas, illiteracy becomes me.
<Darmani> agent_white: I'll try that.
s2013 has joined #ruby
hahuang61 has joined #ruby
<Darmani> Ox0dea: Alas, this poor illiterate fool falls face first into his own pile of shame.
<Darmani> Tsk tsk..
<Ox0dea> The alliterative illiterate.
<Ox0dea> I like it.
<Darmani> xP
<Ox0dea> Did you just die with your tongue out?
tmtwd has joined #ruby
<Darmani> Ox0dea: Is that a problem?
s2013 has quit [Client Quit]
ChameleonSix666 has joined #ruby
<ChameleonSix666> Hello my frineds
<ChameleonSix666> I have changed a nick
<Ox0dea> ChameleonSix666: Are you a practicing Satanist?
<ChameleonSix666> no
<Ox0dea> Prove it.
<ChameleonSix666> i will remove 2 six
<ChameleonSix666> i just noticed
<ChameleonSix666> Satan will help me learn ruby
sandstrom has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
<Darmani> LMAO
ChameleonSix666 has quit [Client Quit]
<Darmani> are you a practicing satanist
<Darmani> roflll
<eam> it's four sixes not three, nothing to worry about
<Darmani> What is a practicing satanist?
<eam> Darmani: not yet a professional
<Darmani> Is that conversation too racy for this channel? xP
<shevy> everything goes
<Darmani> except guns.
<Darmani> Lol
<eam> we can't talk about guns?
<shevy> yeah guns don't walk
<Darmani> apparently.
<eam> even these guns? *flex*
<Darmani> Lmao
<Darmani> especially not that
ChameleonSix4 has joined #ruby
<ChameleonSix4> better
<Darmani> because those don't exist
<Darmani> :O
<eam> someone call a vet because these puppies are sick *kisses biceps*
* Darmani deflates your arm
<shevy> bodybuilders as programmers!
<ChameleonSix4> lol
<eam> I use the ARM platform
<ChameleonSix4> why
<eam> with a math coprocessor it's good for heavy lifting
<Ox0dea> Do you even liftM?
<ChameleonSix4> Ox0dea no feeding
<eam> working out complex sets
<shevy> haha
<ChameleonSix4> Is anyone on
<Ox0dea> >> 0xfeed_a_bear
<ruboto> Ox0dea # => (4276988906/1) (https://eval.in/496764)
ta has quit [Read error: Connection reset by peer]
ta has joined #ruby
codecop has quit [Remote host closed the connection]
luluapple has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
mary5030 has joined #ruby
tomchapin has joined #ruby
ChameleonSix4 has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
<ruurd> on what?
<ruurd> on a roll?
<ruurd> on the phone?
rob_ has left #ruby [#ruby]
pawnbox has joined #ruby
SenpaiSilver has quit [Read error: Connection timed out]
yardenbar has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 240 seconds]
armyriad has joined #ruby
centrx has quit [Remote host closed the connection]
dtordable has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
dtordable has joined #ruby
centrx has joined #ruby
<shevy> haha
dtordable has quit [Client Quit]
dtordable has joined #ruby
firstdayonthejob has joined #ruby
peeja has joined #ruby
rkazak_ has joined #ruby
duncannz has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan_ has quit [Ping timeout: 264 seconds]
XangadiX has joined #ruby
smactive has joined #ruby
sergey_makagon has quit []
<Darmani> okay.
<Darmani> What the fuck should I be studying
<Darmani> I have no idea.
<Darmani> ugggg
<Darmani> fuck it I'm gonna go play Black Ops.
hahuang61 has quit [Ping timeout: 264 seconds]
<shevy> ^^^ this is why we can't have nice things
zast has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 260 seconds]
TheNet has quit [Remote host closed the connection]
dwfait has quit [Remote host closed the connection]
morfin60 has quit [Ping timeout: 264 seconds]
DeezCodez has joined #ruby
jdawgaz has joined #ruby
<DeezCodez> So, I've asked this question a couple of times, but never got a decent answer. But... After learning the basics, where do I go? I know how to hack together a website in Rails, but where do I go to learn HOW to program. How to break down problems and know WHAT to program not just what an array or a hash is.
mostlybadfly has quit [Quit: Connection closed for inactivity]
TomyLobo has quit [Ping timeout: 276 seconds]
<shevy> DeezCodez you need to have some problem that you can solve programmatically
duckpuppy has joined #ruby
Xeago has joined #ruby
DCodez has joined #ruby
<dorei> DeezCodez: i think the answer is domain specific, try project euler if you're math inclined
<jhass> DeezCodez: scratch your own itch. Solve a problem you have personally, contribute to a project that lacks something you want. If it's reasonably small asks others how they would've solved it after you've done so
DeezCodez has quit [Ping timeout: 252 seconds]
<Ox0dea> Or that.
<DCodez> Sorry, I got booted off, it's me with a different name.
<shevy> ...
rns has joined #ruby
bkxd has joined #ruby
tomchapin has joined #ruby
harai has joined #ruby
<DCodez> I want to code the dice game "Farkle"
<DCodez> But have no idea where to start.
<shevy> did you start with the code already
<shevy> what are the characteristics? model them into corresponding code
<shevy> how many players, win condition, fancy audios being played... I dunno what you do in a dice game... roll dice?
<DCodez> This is what I need help with. Thinking about the problem.
<DCodez> yep.
Dimik has joined #ruby
<DCodez> I want 1 -2 players
<shevy> good! class Player
<rns> I'm in a virtualenv developing a django app, but I'm using the Heroku toolbelt. It says it needs Ruby 1.9+ so I went ahead an upgraded using sudo apt-get install ruby1.9.3. The upgrade worked, but my current ruby version running is still 1.8 and the Heroku toolbelt therefore won't work. Anyone know how I can get the newest version of Ruby that I just installed to actually run?
yfeldblum has quit [Remote host closed the connection]
<DCodez> win conditions are when a player reaches 10,000 points.
yfeldblum has joined #ruby
<shevy> good, so you need a way to keep track of points. write all of this down in a specification file and have the code keep track of the points
<DCodez> I have things written on paper, but I need to know how to convert it to code.
duckpuppy has quit [Ping timeout: 260 seconds]
<DCodez> Honestly, it might be a crazy hard thing to accomplish. There is a lot going on I guess.
<shevy> yeah, games are hard work :(
zenspider has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
<DCodez> I am idealess other than that though.
<shevy> I remember in one of my first games, I kept on adding feature after feature willy nilly until it was an incoherent mess
<shevy> then I also lost fun with it... and abandoned it
choke has joined #ruby
RegulationD has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
devbug has joined #ruby
<DCodez> I can see that happening. I have done that with several rails projects. I don't want to just hack something together you know. I want to really learn Ruby and programming.
jottr has quit [Quit: WeeChat 1.3]
Waheedi has left #ruby [#ruby]
<DCodez> But would you get the number of players for a game in the Player class?
Wsewolod has quit [Ping timeout: 250 seconds]
TheNet has joined #ruby
dtordable has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
RegulationD has quit [Ping timeout: 276 seconds]
build22 has joined #ruby
karapetyan has quit [Remote host closed the connection]
<shevy> dunno
<shevy> I would most likely first finish with the design specifications first
<shevy> but I have no idea what the game is, nor how it works
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> what you wrote so far can be like: class Player; def initialize; @n_players = 2; @n_points = 0; almost done!
mistermocha has joined #ruby
<DCodez> It's kind of like yahtzee
<DCodez> So you have six dice and after your first roll, you decide if you want to roll again, and with which dice.
nerfando has quit [Ping timeout: 260 seconds]
harai54 has joined #ruby
Azure has joined #ruby
build22 has left #ruby [#ruby]
<shevy> good - model that process into methods
<shevy> roll_dice() # without the ()
<shevy> and so on
unident77 has quit [Quit: Leaving]
harai has quit [Ping timeout: 250 seconds]
<DCodez> def dice_roll
<DCodez> 1 + rand(6)
<DCodez> end
<shevy> good
yqt has joined #ruby
<shevy> so you do this six times to simulate your dice, and keep track of the results
mistermocha has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
Xeago has quit [Remote host closed the connection]
FernandoBasso has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 245 seconds]
XangadiX has quit [Ping timeout: 260 seconds]
zenlot has quit [Ping timeout: 260 seconds]
zencognito has joined #ruby
emilford has joined #ruby
<shevy> hmm if I have... module Foo; class Bar, how can I get the string 'Foo::Bar' programmatically?
<dorei> shevy: somewhere in rails
Rutix has quit []
Xeago has joined #ruby
zenlot has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
peeja has quit [Ping timeout: 240 seconds]
<shevy> well http://pastie.org/10668520 returns it... but I forgot how
Kn|t3 has quit [Ping timeout: 252 seconds]
<Radar> .inspect
<Radar> ?
<shevy> oh
<shevy> yep that was it, thanks Radar!
dravine has quit [Ping timeout: 246 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DCodez has quit [Ping timeout: 252 seconds]
<rns> I'm in a virtualenv developing a django app, but I'm using the Heroku toolbelt. It says it needs Ruby 1.9+ so I went ahead an upgraded using sudo apt-get install ruby1.9.3. The upgrade worked, but my current ruby version running is still 1.8 and the Heroku toolbelt therefore won't work. Anyone know how I can get the newest version of Ruby that I just installed to actually run?
dravine has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<Radar> rns: Depends on how that 1.8 version was installed.
<Radar> rns: Guessing it was an apt-get'd package as well
<rns> Radar, not really sure
<Radar> rns: `which ruby` plz
<rns> ?
DoubleMalt has quit [Remote host closed the connection]
lkba has joined #ruby
<rns> ah, got it
<Radar> rns: Literally type "which ruby" into a te... yeah
<rns> says /usr/bin/ruby
<Radar> right
<Radar> so that looks like it might be apt-get'd installed too.
<Radar> sudo apt-get remove ruby1.9.3 ruby
<rns> ok done
<rns> now what?
<Radar> rns: what does 'which ruby' show now?
<rns> same
CloCkWeRX has joined #ruby
<Radar> swearing intesifies
<Radar> Follow this guide and install a version of Ruby.
<Radar> Something else has installed Ruby on that machine and I don't know what it could be.
<Radar> sudo apt-get remove ruby1.8 for good measure too
TheNet has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
<pipework> Personally, I'd be careful about removing those packages before checking what depends on them. Keep the system rubies if anything does, but also install chruby and ruby-install.
<rns> Radar, thanks, but I just ended up pointing to the new version using 'sudo ln -sf /usr/bin/ruby1-9 /usr/bin/ruby'
<rns> thanks for the help
emilford has quit [Quit: leaving]
<rns> all is working now
<Radar> that's one way to do it I guess.
peeja has joined #ruby
zeroDivisible has joined #ruby
defendguin has quit [Quit: Leaving.]
nertzy has joined #ruby
nertzy has quit [Client Quit]
pawnbox has joined #ruby
cdg has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 255 seconds]
XangadiX has joined #ruby
XangadiX has quit [Client Quit]
s00pcan_ has joined #ruby
TheNet has joined #ruby
AccordLTN has joined #ruby
AccordLTN has quit [Client Quit]
framling has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
colegatron has quit [Ping timeout: 240 seconds]
framling has joined #ruby
s00pcan has quit [Remote host closed the connection]
s00pcan has joined #ruby
scripore has joined #ruby
s00pcan_ has quit [Ping timeout: 265 seconds]
mattwildig has joined #ruby
ur5us has quit [Remote host closed the connection]
einarj has quit [Remote host closed the connection]
bkxd has joined #ruby
ur5us has joined #ruby
pawnbox has joined #ruby
nerfando has joined #ruby
nerfando has quit [Client Quit]
nerfando has joined #ruby
symm- has quit [Quit: Leaving...]
sorbo_ has quit []
colegatron has joined #ruby
bkxd has quit [Ping timeout: 255 seconds]
pawnbox has quit [Ping timeout: 246 seconds]
ur5us has quit [Ping timeout: 240 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
TheNet has quit [Quit: Leaving...]
rns has quit [Ping timeout: 256 seconds]
al2o3-cr has quit [Ping timeout: 240 seconds]
charliesome has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
firstdayonthejob has quit [Ping timeout: 240 seconds]
PaulCapestany has quit [Quit: .]
PaulCapestany has joined #ruby
peeja has quit [Ping timeout: 260 seconds]
techietrash has quit [Quit: Bye! <(^_^<)]