jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
tubuliferous_ has joined #ruby
Inside has joined #ruby
jaequery has joined #ruby
tristanp has quit [Remote host closed the connection]
tristanp has joined #ruby
safe has quit [Read error: Connection reset by peer]
tubuliferous_ has quit [Quit: ZNC - http://znc.in]
andywojo has joined #ruby
rubie has joined #ruby
User__ has joined #ruby
tristanp has quit [Ping timeout: 260 seconds]
Dimik has quit [Ping timeout: 248 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
systemsgotyou has quit [Ping timeout: 240 seconds]
rkazak has quit [Quit: Sleep.....ing....]
rkazak has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
htmldrum has quit [Ping timeout: 268 seconds]
htmldrum_ has quit [Ping timeout: 244 seconds]
shazaum has joined #ruby
shazaum has quit [Changing host]
shazaum has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<shevy> will we see more games using ruby once mruby will be more stable and well known?
abort has quit [Quit: leaving]
abort has joined #ruby
gizmore has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
htmldrum_ has quit [Ping timeout: 264 seconds]
Balzrael has quit [Remote host closed the connection]
cd-rum has joined #ruby
GodFather has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
tristanp has joined #ruby
statelesscode has joined #ruby
GodFather has joined #ruby
chouhoulis has joined #ruby
saneax is now known as saneax_AFK
spider-mario has quit [Remote host closed the connection]
tristanp has quit [Ping timeout: 260 seconds]
northfurr has quit [Quit: northfurr]
mistermocha has joined #ruby
Ebok has joined #ruby
dvinciguerra has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Remote host closed the connection]
<benzrf> is mruby that fast
chouhoulis has joined #ruby
sandstrom has joined #ruby
stannard has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
hahuang61 has joined #ruby
kam270 has joined #ruby
davedev24 has joined #ruby
ruby-lang201 has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby-lang201> So, which is the correct operator, "+=" or "=+". I do an add one in a for loop with +=, and I get undefined method `+', but I do =+ and it works. Every resource on operators for Ruby I've looked at say it is +=.
<Ox0dea> ruby-lang201: It is `+=`; you're invoking it on something that doesn't respond to the + method.
pawnbox has joined #ruby
<ruby-lang201> is =+ appropriate at all?
<Ox0dea> It's an assignment, with the value being something that responds to unary +.
<Ox0dea> Anything can have a unary + method, but it really only makes sense for numeric values.
<ruby-lang201> For what reasons would I not be able to use the + method in my script?
<shevy> benzrf should be
hahuang61 has quit [Ping timeout: 264 seconds]
<shevy> I don't see many games written in or using ruby altogether... one was battle of antargis but the author semi-abandoned it...
Es0teric has quit [Quit: Computer has gone to sleep.]
<Ox0dea> ruby-lang201: You can't invoke + on something that doesn't respond to that method. `nil` is such a something.
shellie_ has joined #ruby
zenlot has joined #ruby
zenlot6 has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 248 seconds]
<shevy> ruby-lang201 look! class Foo; def self.+; puts 'HIO'; end; end; Foo.+() # => "HIO"
Ebok has quit [Quit: Leaving]
<ruby-lang201> Thank you very much for that, it makes sense now
northfurr has joined #ruby
bronson has joined #ruby
r0b3rt has joined #ruby
ruby-lang201 has quit [Ping timeout: 250 seconds]
User__ has quit [Read error: Connection reset by peer]
moei has joined #ruby
CloCkWeRX has joined #ruby
TheGreatGudsby is now known as BadBoy21
diegoaguilar has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
moei has quit [Client Quit]
diegoaguilar has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
GodFather has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
LoneHerm_ has quit [Read error: Connection reset by peer]
diegoaguilar has quit [Remote host closed the connection]
perturbation has quit [Quit: Leaving]
idefine has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
SCHAAP137 has quit [Quit: Leaving]
davedev24 has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uglybandersnatch has joined #ruby
rubie has joined #ruby
rbennacer has quit [Remote host closed the connection]
pawnbox has joined #ruby
<brent_> Ox0dea
finisherr has quit [Quit: finisherr]
<Ox0dea> Hi, brent_.
<brent_> i was working on that hangman cpu logic you looked at briefly yesterday
<brent_> i'm struggling to get it to work and was hoping you could take another look
LoneHerm_ has joined #ruby
idefine has quit [Ping timeout: 248 seconds]
<Ox0dea> brent_: Ah, well, I wrote up a thing showing how I'd go about and just forgot to link it yesterday.
<Ox0dea> I guess I won't show you unless you wanna see it, but yeah, I'll take a look.
uglybandersnatch has quit [Ping timeout: 268 seconds]
<brent_> http://hastebin.com/nupaxapili.rb basically i need it to filter out any words from the dictionary that have had a letter guessed, and also filter otu words that have a correct letter guessed that shows up at an index that the secret_word doesn't have
<brent_> so basically if i've guessed 'r' and the word is 'road', it should filter out words from the dictionary like "rear", but it currently does not
LoneHerm_ has quit [Remote host closed the connection]
ljames has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
moei has joined #ruby
<Ox0dea> brent_: You didn't retain anything we talked about regarding `group_by(&:itself)`. :/
<brent_> hmm
<brent_> let me think
cpup has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
Es0teric has joined #ruby
cpup has joined #ruby
leon_e has joined #ruby
trinaldi has quit [Quit: WeeChat 1.5-dev]
<Ox0dea> brent_: `max_by(&:size)` on a Hash will always just give you back the first key-value pair; do you know why?
finisherr has joined #ruby
arescorpio has joined #ruby
rubie has quit [Remote host closed the connection]
<brent_> i do not
yatish27 has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
<Ox0dea> Do you know about Enumerable?
UndergroundRails has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
xcesariox has joined #ruby
<brent_> kind of
idefine has joined #ruby
<brent_> I know it's a class of methods, but thats about it
<Ox0dea> Well, #max_by on a Hash essentially converts it to a nested Array first, with the inner Arrays being the key-value pairs.
Trynemjoel has joined #ruby
<Ox0dea> >> h = {a: 1, b: 2, c: 3}; h.to_a
<ruby[bot]> Ox0dea: # => [[:a, 1], [:b, 2], [:c, 3]] (https://eval.in/543082)
<Ox0dea> As you can see, they all have size 2, so `max_by(&:size)` is just a really verbose way of saying `first`, which isn't at all what you want for #guess there.
northfurr has quit [Ping timeout: 244 seconds]
triangles has joined #ruby
sudoubuntu has joined #ruby
xlegoman has quit [Quit: xlegoman]
<brent_> i see
<brent_> letters.group_by{ |letter| letter }.values.max_by(&:size).first
jaequery has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
<Ox0dea> Yep, that's more what you're looking for.
<brent_> okay
<brent_> so that helps w/ the cpu picking the most frequent letter
<Ox0dea> Okay if I show mine?
<brent_> please do
sandstrom has quit [Quit: My computer has gone to sleep.]
<brent_> though, the problem i'm struggling w/ is the excluding words that have a correctly guessed letter at the wrong index
<Ox0dea> Hm... do you want to avoid using reglar expressions?
<Ox0dea> They're really good for this sort of thing.
rbennacer has joined #ruby
jaequery has quit [Ping timeout: 248 seconds]
<brent_> i'm still learnign regex
<brent_> i would be fine using them
Trynemjoel has joined #ruby
<brent_> but i really want to get to the bottom of this while staying along the lines of my current logic
<brent_> just so i can understand what i'm missing
<brent_> been banging my head trying to get it right
Es0teric has quit [Quit: Computer has gone to sleep.]
GnuYawk has quit [Ping timeout: 276 seconds]
<brent_> the rspec requires a #candidate_words
shazaum has quit [Quit: Leaving]
xcesariox has quit [Remote host closed the connection]
<brent_> to filter out the possible words, then optimal guess is ussed in #guess
djbkd has joined #ruby
northfurr has joined #ruby
<brent_> so i'm trying to get #candidate words to take intio consideration when a correctly guessed word is showing up at incorrect index's and remove those words as well
Trynemjoel has quit [Ping timeout: 244 seconds]
djbkd has quit [Client Quit]
<Ox0dea> #word_checker is only checking for inclusion; you need to do a position-wise comparison.
<Ox0dea> Something like `word.chars.zip(local_bard).all? { |a, b| ... }` would be more correct.
<Ox0dea> With `...` being a check for either equality or a wildcard (a blank in the puzzle).
Trynemjoel has joined #ruby
northfurr has quit [Ping timeout: 276 seconds]
<brent_> can you explain, how word_checker isn't checkign posiiton. My understanding of current code is local_board should be an array similar to ['r', nil, nil, 'r'] and the .map it's comparing to would be returning ['r', nil, nil, nil]
<brent_> in an example of 'road' and 'rear'
ur5us has joined #ruby
siaw has quit [Quit: siaw]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
stannard has quit [Remote host closed the connection]
moss has quit [Quit: QUITTING]
ur5us has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Trynemjoel has quit [Ping timeout: 264 seconds]
A124 has quit [Read error: Connection reset by peer]
<Ox0dea> You're right; that doesn't seem to be the problem.
jaequery has joined #ruby
northfurr has joined #ruby
leon_e has quit [Quit: Konversation terminated!]
rubie has joined #ruby
jonatin has left #ruby ["Textual IRC Client: www.textualapp.com"]
ur5us has quit [Ping timeout: 248 seconds]
rubie has quit [Remote host closed the connection]
A124 has joined #ruby
yatish27 has joined #ruby
idefine_ has joined #ruby
IrishGringo has quit [Ping timeout: 248 seconds]
northfurr has quit [Ping timeout: 244 seconds]
Trynemjoel has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
TinkerTyper has quit [Ping timeout: 244 seconds]
idefine has quit [Ping timeout: 276 seconds]
northfurr has joined #ruby
<brent_> phew, was hoping i wasn't misunderstanding it that much
TinkerTyper has joined #ruby
<Ox0dea> How come the board isn't just an instance variable?
<brent_> it could be
TriggerPhish has joined #ruby
<brent_> i just wanted a quick tester method
<brent_> so i didn't have to mess w/ other methods to update the instance variable
<brent_> while i'm trying to figure this out
gregf has joined #ruby
pawnbox has joined #ruby
ljames has joined #ruby
yatish27 has quit [Remote host closed the connection]
blackmesa has joined #ruby
<Ox0dea> brent_: I wonder if fixing Line 58 is the missing ingredient.
silentpost has joined #ruby
<brent_> idxs.empty?
yatish27 has joined #ruby
<brent_> :(
<brent_> syntax!!!!!
stannard has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
<Ox0dea> You're missing a =.
TriggerPhish has quit [Quit: Page closed]
<brent_> i see
<brent_> i just changed it to idxs.empty?
<Ox0dea> Well, all right.
<brent_> so small
<brent_> it helped it pass most of the tests, but still get an error w/ the dictionary of [foo, bar]
<brent_> and a handled_guess('o' [1, 2])
<brent_> candiate_words is still returning both foo and bar
blackmesa has quit [Ping timeout: 268 seconds]
davedev24 has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
davedev24 has quit [Ping timeout: 268 seconds]
<Ox0dea> brent_: Er... not for me?
<brent_> let me send you the rspec error
<brent_> and thanks so much for your time
andywojo has joined #ruby
rbennacer has quit [Remote host closed the connection]
GnuYawk has joined #ruby
hahuang61 has joined #ruby
<Ox0dea> Weird that it's returning "e" instead of "l"; you're subtracting `@guessed_hash.keys` there.
andywojo has quit [Ping timeout: 260 seconds]
<brent_> yeah
<brent_> thought that was weird as well
<brent_> hangman is going to haunt my dreams
merida has joined #ruby
northfurr has quit [Quit: northfurr]
zast has joined #ruby
madgen_ has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Quit: Leaving.]
GnuYawk has quit [Ping timeout: 252 seconds]
<shevy> lol
statelesscode_ has joined #ruby
statelesscode has quit [Ping timeout: 260 seconds]
statelesscode_ is now known as statelesscode
idefine_ has quit [Ping timeout: 244 seconds]
idefine has joined #ruby
IrishGringo has joined #ruby
<shevy> brent_ I am watching tales from the crypt - and writing ruby code! it's a scary combination
davee_ has joined #ruby
<brent_> that little story teller gives the me creeps
<brent_> lol, how do i type the before me
idefine_ has joined #ruby
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
<shevy> lol
mistermocha has joined #ruby
northfurr has joined #ruby
sudoubuntu has joined #ruby
idefine has quit [Ping timeout: 264 seconds]
idefine has joined #ruby
crdpink2 has joined #ruby
drbrain has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
crdpink has quit [Ping timeout: 248 seconds]
mistermocha has quit [Ping timeout: 248 seconds]
<brent_> if you got any knowledge to drop on my predicament i would apprecaite any help i could get
idefine_ has quit [Ping timeout: 276 seconds]
<brent_> shevy ^
Cohedrin has joined #ruby
bratchley has joined #ruby
dikaio has joined #ruby
duderonomy has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<shevy> I have no idea about rspec, it always felt so boring to write test when you could write code instead!
tristanp has joined #ruby
<brent_> lol, i agree. more of a, do you see why i would be getting those failures
<shevy> no idea but apparently your code is not working
<brent_> i needed that
GnuYawk has joined #ruby
<brent_> Ox0dea did you give up on it? It's okay if you did
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Ox0dea> brent_: There's just so much implicit state.
yatish27 has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
<Ox0dea> I tried to find the bug, but they run when you look at them.
<shevy> lol
<shevy> does the game work yet without rspec
yatish27 has joined #ruby
elifoster has quit [Ping timeout: 276 seconds]
merida has quit [Remote host closed the connection]
LoneHerm_ has quit [Read error: Connection reset by peer]
<brent_> haven't got there yet. the rspecs are given as a requirement to get them to pass
statelesscode has quit [Quit: statelesscode]
LoneHer__ has joined #ruby
fullofcaffeine has joined #ruby
<shevy> make the game first!
<Ox0dea> brent_: Here's my go at simplifying it: https://eval.in/543094
<Ox0dea> All the tests pass, but I don't what Phase I and Phase II were.
Dopagod has joined #ruby
GnuYawk has quit [Ping timeout: 260 seconds]
<brent_> intresting
<brent_> i need to read what .zip is
braincras has quit [Quit: bye bye]
<brent_> do you want me to send you the link to the phase1/2?
<Ox0dea> No. :P
<brent_> lol
<brent_> good choice
yatish27 has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
<brent_> did you get the same failures i was w/ my code?
<Ox0dea> The last two initially failed because I forgot to subtract the letters already in `board`.
<Ox0dea> But you're doing that, so I don't know what's going on. :/
fullofca_ has joined #ruby
<brent_> poop
<brent_> i'm going to show it to a TA tomorrow and see what they think
<brent_> i'll probably work on a simplified version structured around your code
<shevy> they will hire Ox0dea right away
fullofc__ has joined #ruby
<brent_> and see if i can get it to work
fullofcaffeine has quit [Ping timeout: 264 seconds]
UndergroundRails has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
kam270 has quit [Ping timeout: 248 seconds]
<Ox0dea> Like I said, I can't tell whether some of that complexity was informed by the prior phases. If not, though, it could definitely stand to be simplified. :)
braincrash has joined #ruby
<brent_> haha i'm sure it can
pawnbox has joined #ruby
fullofca_ has quit [Ping timeout: 246 seconds]
<brent_> i'm reading about .zip in ruby docs, but not quite sure what it's doing
BadBoy21 is now known as TheGreatGudsby
jt__ has joined #ruby
blackmesa has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
rubie has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<Ox0dea> It "zips up" the elements of two (or more) arrays by alternately picking from them, like how a zipper works by "grabbing" a tooth from the left, right, left...
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> >> letters = %w[a b c]; numbers = [1, 2, 3]; letters.zip numbers
<ruby[bot]> Ox0dea: # => [["a", 1], ["b", 2], ["c", 3]] (https://eval.in/543098)
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
barajasfab has joined #ruby
<Ox0dea> I'm using it to get element-wise comparison against the board letters for each candidate word.
jt__ has quit [Ping timeout: 246 seconds]
<shevy> oh new rubygems
finisherr has quit [Ping timeout: 248 seconds]
<brent_> i like the zipper analogy
Tempesta_ has joined #ruby
<Ox0dea> It's rare, but sometimes things have just the right name.
blackmesa has quit [Ping timeout: 252 seconds]
IrishGringo has quit [Ping timeout: 260 seconds]
Kiwi_sherbet has joined #ruby
Chagel has joined #ruby
<brent_> on handle response
Tempesta has quit [Ping timeout: 276 seconds]
chouhoul_ has joined #ruby
jaequery has joined #ruby
idefine has joined #ruby
andywojo has joined #ruby
chouhoulis has quit [Ping timeout: 248 seconds]
maletor has joined #ruby
<brent_> nevermind
spuk has quit [Ping timeout: 264 seconds]
<brent_> i understand whats happening there. much simpler
rbennacer has joined #ruby
spuk has joined #ruby
<Ox0dea> I suppose `chars.each_index` would've been a little more intention-revealing than `size.times`.
jaequery has quit [Client Quit]
grissom has joined #ruby
tristanp has quit [Read error: Connection reset by peer]
lyoshajapan has joined #ruby
tristanp has joined #ruby
<grissom> hello Im looking for pairprogramming, my level intermediate - target, practice rspec testing, lang: english, anyone?
<lyoshajapan> whats your timezone?
<brent_> Ox0dea welll utilized your code and added the additional functionality to pass the other phases
andywojo has quit [Ping timeout: 276 seconds]
rbennacer has quit [Ping timeout: 264 seconds]
<grissom> my 5.36 am
jaequery has joined #ruby
<brent_> very frustrating that i was getting those errors seemingly out of nowhere, hoping the TA can help me point out the problem
cdg has joined #ruby
jaequery has quit [Client Quit]
Kiwi_sherbet has quit [Remote host closed the connection]
gix has quit [Ping timeout: 260 seconds]
<Ox0dea> brent_: Do let me know if y'all end up finding the cause. I imagine it's to do with the way you track indices. That said, I think it's lame that the tests force that implementation detail in the first place.
<brent_> yeah, i was doing a battleship game the other day
<brent_> and and was adding "bonus" functionality by adding a cpu class and it messed up all the rspecs
fn2187 has joined #ruby
<brent_> what do you mean by the way i track indices?
<brent_> i would love to give it anotherlook if you have a suggestionw her ei should start
<Ox0dea> Well, I suppose I don't see why it needs to be tracked at all.
<Ox0dea> #handle_response is the only method concerned with them, and its purpose is to prune the candidate list.
Tempesta_ is now known as Tempesta
<brent_> ahh, yeah. one of the test cases in an earlier phase requires indices to be returned
grissom has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<brent_> one last question about one of your blocks
<brent_> word.chars.zip(board).all? { |a, b| !b || a == b }
gix has joined #ruby
diegoaguilar has joined #ruby
<brent_> so say i have board = [r, nil, nil, nil], word = road, i would get [[r, r], [nil, o], [nil, a], [nil, r]], correct.
<brent_> ?
<brent_> what is executing in the all? block?
<brent_> would a, b == r, r for the first one?
pawnbox has joined #ruby
Dopagod has quit [Read error: Connection reset by peer]
<brent_> wait, the board would be the second elements, now i understand why you have !b
fullofc__ has quit [Remote host closed the connection]
cdg has quit [Remote host closed the connection]
<Ox0dea> I think you got it. :)
stryek has quit [Ping timeout: 264 seconds]
fullofcaffeine has joined #ruby
<brent_> is !b preferred of b.nil?
<Ox0dea> No. :P
solocshaw has quit [Ping timeout: 250 seconds]
<Ox0dea> It's a stylistic thing, but the closest thing we have to an "official" style guide recommends #nil? ther.
<Ox0dea> *there
<brent_> right
<brent_> i also noticed you don't use parens on your method args
stryek has joined #ruby
<brent_> i thought style guide recommended parnes
<brent_> is that just your preference?
<Ox0dea> It's called "Seattle style".
<Ox0dea> Use as few parentheses as possible.
<brent_> hmmm
<brent_> intresting
<brent_> are you from seattle or just coincidence ?
blackgoat has quit [Ping timeout: 244 seconds]
<brent_> looking for a member name that could be you
silentpost has quit [Ping timeout: 248 seconds]
<Ox0dea> The answer to your question was "mu".
<Ox0dea> https://en.wikipedia.org/wiki/Mu_(negative)#.22Unasking.22_the_question
<Ox0dea> I'm not from Seattle, but nor is my use of Seattle style coincidental.
maletor has quit [Quit: Computer has gone to sleep.]
<brent_> feels like a riddle
<Ox0dea> Welcome to Zen Buddhism.
kfpratt has joined #ruby
TheGreatGudsby has quit [Remote host closed the connection]
<brent_> seems like you're at least on my same time zone
TheGreatGudsby has joined #ruby
<Ox0dea> I suppose I probably just picked it up because it meant less typing, but it ended up being a visual thing as well.
<brent_> so thats good for me, bad for you
<Ox0dea> I'd ignore you if I didn't love you. <3
saneax_AFK is now known as saneax
jaequery has joined #ruby
<brent_> good to hear. don't hesitate to let me know if you don't have time. Appreciate your help once again. i'm going to rest my brain for the night
<brent_> have a good night Ox0dea!
<Ox0dea> And you, brent_. Rest well.
rubie has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #ruby
User458764 has joined #ruby
tildes has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
htmldrum_ has quit [Ping timeout: 264 seconds]
lyoshajapan has quit [Ping timeout: 260 seconds]
davedev24 has joined #ruby
davedev24 has quit [Client Quit]
dikaio has left #ruby ["Textual IRC Client: www.textualapp.com"]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
Ropeney has quit [Quit: Leaving]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
smathy_afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
barajasfab has quit [Quit: Leaving]
blackmesa has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
bb010g has joined #ruby
Tempesta_ has joined #ruby
LoneHer__ has quit [Read error: Connection reset by peer]
cabargas has joined #ruby
nocontrol has joined #ruby
lyoshajapan has joined #ruby
elifoster has joined #ruby
Tempesta has quit [Ping timeout: 276 seconds]
lkba_ has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
merida has joined #ruby
rubie has joined #ruby
lyoshajapan has quit [Ping timeout: 276 seconds]
lkba has quit [Ping timeout: 276 seconds]
LoneHerm_ has joined #ruby
astrobunny has joined #ruby
ozzloy_ is now known as ozzloy
krz has joined #ruby
ozzloy has quit [Changing host]
ozzloy has joined #ruby
lyoshajapan has joined #ruby
idefine has quit []
bluOxigen has joined #ruby
crameth has joined #ruby
lyoshajapan has quit [Ping timeout: 252 seconds]
uglybandersnatch has joined #ruby
lyoshajapan has joined #ruby
moei has quit [Quit: Leaving...]
lyoshajapan has quit [Ping timeout: 244 seconds]
moei has joined #ruby
zast has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
kfpratt has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
scepticulous has joined #ruby
sarlalian has quit [Ping timeout: 252 seconds]
brendan- has quit [Ping timeout: 252 seconds]
devbug has joined #ruby
brt has quit [Ping timeout: 260 seconds]
devbug_ has joined #ruby
jcdesimp_ has quit [Quit: Leaving...]
lyoshajapan has joined #ruby
Chagel has quit [Ping timeout: 268 seconds]
devbug has quit [Client Quit]
bronson has joined #ruby
devbug has joined #ruby
moei has joined #ruby
moei has quit [Client Quit]
moei has joined #ruby
Tempesta_ is now known as Tempesta
sarlalian has joined #ruby
fullofcaffeine has joined #ruby
uglybandersnatch has quit [Ping timeout: 244 seconds]
lyoshajapan has quit [Ping timeout: 244 seconds]
chipotle has quit [Quit: cheerio]
bronson has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 268 seconds]
andywojo has joined #ruby
Don_John has quit [Read error: Connection reset by peer]
devbug has quit [Read error: Connection reset by peer]
hk238 has joined #ruby
yatish27 has joined #ruby
andywojo has quit [Ping timeout: 260 seconds]
Tempesta_ has joined #ruby
Nanuq has joined #ruby
Inside has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
blackmesa has joined #ruby
Tempesta_ has quit [Client Quit]
pawnbox has joined #ruby
Tempesta has quit [Ping timeout: 268 seconds]
scepticulous has quit [Ping timeout: 276 seconds]
yatish27 has quit [Ping timeout: 246 seconds]
bkxd has joined #ruby
bkxd_ has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
lyoshajapan has joined #ruby
mistermocha has joined #ruby
Dimik has joined #ruby
lyoshaja_ has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 264 seconds]
agit0 has quit [Quit: zzzZZZ….]
mistermocha has quit [Ping timeout: 250 seconds]
arescorpio has quit [Quit: Leaving.]
fullofcaffeine has quit [Remote host closed the connection]
nocontrol has quit [Remote host closed the connection]
Chagel has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
yfeldblum has joined #ruby
mistermocha has joined #ruby
astrobunny has quit [Remote host closed the connection]
mistermocha has quit [Ping timeout: 250 seconds]
lyoshaja_ has quit []
yfeldblum has quit [Ping timeout: 268 seconds]
patrick-sartent has joined #ruby
astrobunny has joined #ruby
bkxd_ has quit [Ping timeout: 260 seconds]
sq271 has quit [Quit: leaving]
bkxd has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jt__ has joined #ruby
Chagel_ has joined #ruby
LoneHerm_ has quit [Read error: Connection reset by peer]
Chagel has quit [Ping timeout: 240 seconds]
brent_ has quit [Quit: Connection closed for inactivity]
hahuang61 has joined #ruby
atmosx has quit [Quit: rage rage against the dying of the light...]
davee_ has quit [Ping timeout: 250 seconds]
fexilal has joined #ruby
valetudo has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
sinanislekdemir has joined #ruby
agit0 has joined #ruby
User458764 has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
kriskropd has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
nocontrol has joined #ruby
Tempesta has joined #ruby
htmldrum has quit [Ping timeout: 268 seconds]
htmldrum_ has quit [Ping timeout: 276 seconds]
ccmc has quit [Quit:]
Blaguvest has quit [Remote host closed the connection]
chipotle has joined #ruby
CloCkWeRX has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
blackmesa has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
aganov has joined #ruby
nando293921 has quit [Remote host closed the connection]
htmldrum_ has quit [Ping timeout: 276 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
abc has joined #ruby
abc is now known as Guest35337
elifoster has quit [Ping timeout: 250 seconds]
kriskropd has joined #ruby
Guest35337 has quit [Client Quit]
agit0 has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 264 seconds]
rbennacer has joined #ruby
agit0 has joined #ruby
The_Phoenix has joined #ruby
r0b3rt has quit [Ping timeout: 276 seconds]
Dopagod has joined #ruby
Dopagod has quit [Client Quit]
rbennacer has quit [Ping timeout: 260 seconds]
GnuYawk has joined #ruby
fedexo has quit [Read error: Connection reset by peer]
liquid-silence has joined #ruby
liquid-silence has joined #ruby
CloCkWeRX has joined #ruby
hahuang61 has quit [Ping timeout: 248 seconds]
hahuang61 has joined #ruby
toretore has quit [Remote host closed the connection]
anisha has joined #ruby
Evey_Hammond has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
nocontrol has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
blackgoat has joined #ruby
nocontrol has joined #ruby
nocontro_ has joined #ruby
nocontr__ has joined #ruby
nocontrol has quit [Ping timeout: 244 seconds]
nocontro_ has quit [Ping timeout: 244 seconds]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Dimik> maybe some one is awake
<Dimik> how can i select id from table in sql in ruby and then add a number to it
andywojo has joined #ruby
Regulati_ has joined #ruby
jalnt has joined #ruby
jalnt has quit [Client Quit]
<tildes> Dimik, do you already have a sql database in place?
RegulationD has quit [Ping timeout: 260 seconds]
ljames has quit [Ping timeout: 276 seconds]
spuk has quit [Ping timeout: 276 seconds]
binaryplease1 has quit [Read error: Connection reset by peer]
bronson has joined #ruby
binaryplease1 has joined #ruby
liquid-silence has quit [Read error: No route to host]
andywojo has quit [Ping timeout: 276 seconds]
priodev has joined #ruby
<tildes> Dimik, besides the DB, you will also need to start it, and connect to it. I would guess using Rails and ActiveRecord ORM could be the quickest way to get you started?
bronson has quit [Ping timeout: 252 seconds]
x77686d has quit [Quit: x77686d]
x77686d has joined #ruby
x77686d has quit [Client Quit]
BlindSight has quit [Remote host closed the connection]
BlindSight has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
valetudo has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
ljames has joined #ruby
merida has quit [Remote host closed the connection]
<Dimik> tildes, yes i have a db in place i'm using sqlite3 without rails
<Dimik> i'm using something like session_id = db.execute ("SELECT ses_id FROM fd ORDER BY id DESC LIMIT 1")
<Dimik> to get the last ses_id (which is integer in sqlite3 table) number
blackmesa has joined #ruby
<Dimik> the problem is it comes back as an array i guess and i can't seem to get around it to += 1 it
valetudo has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
ur5us has joined #ruby
<Dimik> so i tried like .to_i and to_int.to_i and .map(&to_i) without any luck
cabargas has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
firstdayonthejob has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
chipotle has quit [Quit: cheerio]
chipotle has joined #ruby
<Dimik> never mind i just saved myself a headache by creating a separate session_id table with autoincrement in sql
tildes has quit [Ping timeout: 260 seconds]
htmldrum_ has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 248 seconds]
nocontr__ has quit [Read error: Connection reset by peer]
htmldrum has joined #ruby
htmldrum_ has joined #ruby
patrick_star has joined #ruby
merida has joined #ruby
<Dimik> can't believe i spent 3 hours on such simple solution
nocontrol has joined #ruby
alem0lars__ has joined #ruby
mistermocha has joined #ruby
kam270 has joined #ruby
<Caerus> Dimik, what were you getting back? seems like limit '1' should only give you one
htmldrum has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
htmldrum_ has quit [Ping timeout: 276 seconds]
mark3 has joined #ruby
<Caerus> at any rate, if the return (for whatever reason) is an array then you should be able to do session_id.last
phredus has joined #ruby
mistermocha has quit [Ping timeout: 260 seconds]
merida has quit [Remote host closed the connection]
<Dimik> getting something like no implicit conversion of fixnum into array
<Dimik> when trying to +=1
<Caerus> your issue was finding out why db.execute on that query was returning an array.
<Dimik> yeah
<Dimik> i guess
<Dimik> i never got around it
joonty has joined #ruby
<Caerus> did you inspect it?
<Dimik> puts out a single number
pawnbox has quit [Remote host closed the connection]
<Dimik> i don't know how else to inspect it
roshanavand has joined #ruby
<Caerus> so after db.execute session_id.class == Array?
chipotle has quit [Quit: cheerio]
the_drow has joined #ruby
TheGreatGudsby is now known as GitGud
last_staff has joined #ruby
Jackneill has joined #ruby
<Dimik> session_id.kind_of?(Array)
<Dimik> True
yatish27 has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
<Caerus> that is so weird. how bout session_id.size
<Dimik> 1
<Dimik> i broke my head trying to figure this thing out
<Caerus> then you can get away with the ugly session_id.last += 1
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<Dimik> yeah i tried that
<Dimik> same error
<Dimik> no implicit conversion of fixnum into array
yatish27 has quit [Ping timeout: 250 seconds]
<Dimik> anyway having a separate table fixed it
<Dimik> on that note i'm calling it a night
<Dimik> thank you!
<Caerus> yeah i saw, but it was interesting to find out why you were getting an array :P
<Dimik> yeah it's always about the challenge ;p
GitGud is now known as TheGreatGudsby
<Caerus> my wild guess is Database has execute return an array so you would have to do conversion.
wethu has joined #ruby
nocontro_ has joined #ruby
last_staff1 has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
last_staff has quit [Ping timeout: 244 seconds]
last_staff1 is now known as last_staff
<Caerus> ow, he left.
nocontr__ has joined #ruby
nocontrol has quit [Ping timeout: 252 seconds]
nocontro_ has quit [Ping timeout: 244 seconds]
atmosx has joined #ruby
weckl has joined #ruby
chouhoulis has joined #ruby
tildes has joined #ruby
<tildes> Dimik, ok I got it
baweaver has quit [Remote host closed the connection]
<Caerus> think he needed to do db.prepare (sql query)
<tildes> Dimik, to update your record in DB (as you are not using ORM) you would need to use a sql statement called 'UPDATE'
<Caerus> tildes, he left.
<tildes> Caerus, oh ok :)
chouhoulis has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
blackmesa has joined #ruby
<Caerus> so tildes as learning exercise, all he needed to do was change the query?
pawnbox has joined #ruby
<tildes> Caerus, it depends on what he actually wanted to do. if he wanted to store value back in DB, he would need some way to update the record. that's what I thought he wanted, but I'm not longer sure
<tildes> to update the record, he could use raw sql, as he was using raw sql already in the select clause. he could use a gem, such as sequel, or ORM such as activerecord or datamapper to make things neater
<tildes> if he wanted to retrieve the value, and just add +1, he would need to look into Array methods.
<Caerus> by the looks of it he wanted to create a new session hence the += session_id
<tildes> for sql databases, select returns rows (technically, another table), and even if there is just one, that would be stored in a ruby array
rbennacer has quit [Ping timeout: 244 seconds]
hightower3 has joined #ruby
JohnBat26 has joined #ruby
<tildes> (at least I think so, I have only occasionally used raw sql with ruby, and always over ActiveRecord in those cases)
Chagel_ has quit [Ping timeout: 246 seconds]
<tildes> Caerus, could be. then he would probably want to store that in DB too
dc2 has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
<tildes> oh, and of course to store it in DB, he would need to retrieve the value from array as well.
<Caerus> man that kind of raw sql reminds me of that time i did php back in the day, so cringeworthy..
<Caerus> so he would need to do a select query to get the last session_id
<tildes> it would have been helpful if he had shown what the db... command returned him in irb
nocontr__ has quit [Ping timeout: 260 seconds]
<Caerus> then a second query to create a new session
<tildes> my guess is he would get the id as int just from session_id = db.execute ("SELECT ses_id FROM fd ORDER BY id DESC LIMIT 1").first
<Caerus> i suggested .last
<tildes> Caerus :D
<Caerus> no game. which was weird. he didn't really show code so it's all 'learning' conjecture
blackmesa has joined #ruby
<tildes> In any case if I wanted to learn ruby again, (or a similar language), I would start with tutorials, and learning the basic data types and their methods well
<tildes> I probably would not start with creating sessions, unless that was in some tutorial...
dgncn has quit [Excess Flood]
<tildes> Caerus: too bad I can't see the entire log (even though I ddin't switch off the computer), that's how I didn't notice that he left either. :-(
<tildes> if you aren't prepared to show the code, chances are you will not get specific enough answers :-(
<Caerus> to each his own i guess, i have a friend that refuses to read programming books and only learns by bashing his head trying code.
nocontrol has joined #ruby
htmldrum_ has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
dgncn has joined #ruby
<tildes> Caerus any specific reason why?
<Caerus> but as i've seen happen, specially with ruby on ra'ils, things can go awry really fast if you don't try to do things 'the ruby way
<Caerus> uhm, dunno, i guess the best books are in english and his isn't good.
<tildes> yes, if you can get things done faster, it applies to the nasty things as well :D
jt__ has quit [Remote host closed the connection]
last_staff has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
<Caerus> he was doing some java mvc just for fun and i noticed he had a lot of infringements of mvc
<tildes> Caerus: there are blogs in many languages, and even google translate is pretty decent at these things... it's a pity though, without good english it's hard even to get started
pawnbox has joined #ruby
doublemalt__ has joined #ruby
<Caerus> i've always thought programming wasn't really meant for people that don't like to read, specially being a full stack requires a lot of documentation reading
andywojo has joined #ruby
Chagel has joined #ruby
<tildes> what I also see, is that if you can't write clearly in human languages, chances are your code will not be human-readable either
<tildes> reading does help, but people are all different. I know a pretty decent front-end developer, who mostly watches tutorial videos and tries out stuff himself
<tildes> no books, ever, but he is still quite decent
<Caerus> tildes, come to think of it, you're right. i've never thought of it
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doublemalt_ has quit [Ping timeout: 248 seconds]
Guest91417 has joined #ruby
jpinnix_______ has quit [Ping timeout: 260 seconds]
zzak___ has quit [Ping timeout: 260 seconds]
braderhart has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 244 seconds]
jhass has quit [Ping timeout: 260 seconds]
nemesit|znc has quit [Ping timeout: 260 seconds]
LoneHermit has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
<tildes> Caerus, you know, if your book-averse friend does speak a big language (e.g. Spanish) and wants to learn a popular language (e.g. Java), video tutorials could come to his resque
braderhart has joined #ruby
jpinnix_______ has joined #ruby
zzak___ has joined #ruby
<tildes> (I kind of feel empathetic about that head being bashed needlessly already. :D )
dionysus69 has quit [Remote host closed the connection]
<tildes> (or maybe even an English video could be easier to follow than a book, spoken language is often more simple. sometimes you get subtitles)
dionysus69 has joined #ruby
<Caerus> tildes, yeah hes spanish native, they taught him java ee @ college
<tildes> Caerus, bueno, miles de online recursos, for sure! :)
<tildes> Caerus I learned java in the university too, unfortunately, nothing about style
<tildes> something about patterns, nothing about testing
<Caerus> he just got a jr dev job and will be doing jdb jdf and all that
<tildes> well that's great! hope he has good colleagues who are willing to share knowledge
LoneHermit has quit [Ping timeout: 244 seconds]
Chagel_ has joined #ruby
jhass has joined #ruby
<Caerus> i was doing the whole ruby propaganda to make him come so we could learn it by heart and do joint projects but the book thing made it really hard to fly
mdw has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
nemesit|znc has joined #ruby
last_staff has joined #ruby
chipotle has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
uglybandersnatch has joined #ruby
bronson has joined #ruby
blackmesa has joined #ruby
uglybandersnatch has quit [Ping timeout: 276 seconds]
bronson has quit [Ping timeout: 252 seconds]
astrobunny has quit [Remote host closed the connection]
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
astrobunny has joined #ruby
nanoz has joined #ruby
zenergi has quit [Quit: Lost terminal]
chipotle has quit [Quit: cheerio]
qhp has quit [Ping timeout: 244 seconds]
siaw has joined #ruby
chipotle has joined #ruby
SCHAAP137 has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
astrobunny has quit [Ping timeout: 244 seconds]
qhp has joined #ruby
chouhoulis has joined #ruby
niksrc has joined #ruby
last_staff has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
al2o3-cr has joined #ruby
nanoz has quit [Ping timeout: 264 seconds]
car has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
devbug_ has quit [Ping timeout: 248 seconds]
chouhoulis has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
ur5us has quit [Remote host closed the connection]
lkba has joined #ruby
jt__ has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 248 seconds]
kam270 has quit [Remote host closed the connection]
merida has joined #ruby
car has quit [Ping timeout: 252 seconds]
User458764 has joined #ruby
mistermocha has joined #ruby
lkba_ has joined #ruby
nicoulaj has joined #ruby
AndChat-43764 has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
lkba has quit [Ping timeout: 248 seconds]
yatish27 has joined #ruby
lkba_ has quit [Ping timeout: 276 seconds]
LoneHermit has joined #ruby
yatish27 has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
araujo has joined #ruby
LoneHermit has quit [Ping timeout: 250 seconds]
araujo has quit [Max SendQ exceeded]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
_blizzy_ has joined #ruby
sandstrom has joined #ruby
infernix has quit [Ping timeout: 244 seconds]
araujo has quit [Max SendQ exceeded]
lkba has joined #ruby
tildes has quit [Ping timeout: 276 seconds]
araujo has joined #ruby
G has quit [Remote host closed the connection]
AndChat-43764 has quit [Ping timeout: 264 seconds]
car has joined #ruby
cd-rum has joined #ruby
anisha has quit [Ping timeout: 250 seconds]
Asher has quit [Quit: Leaving.]
sepp2k has joined #ruby
cd-rum_ has joined #ruby
anisha has joined #ruby
cd-rum has quit [Ping timeout: 246 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
myntcake has quit [Ping timeout: 244 seconds]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
Spami has joined #ruby
jt__ has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
infernix has joined #ruby
_blizzy_ has quit [Quit: Leaving]
dvinciguerra has joined #ruby
Moosashi has joined #ruby
andywojo has joined #ruby
spider-mario has joined #ruby
Moosashi has quit [Client Quit]
krz has quit [Ping timeout: 248 seconds]
nocontrol has quit [Ping timeout: 252 seconds]
Moosashi has joined #ruby
andywojo has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
last_staff has joined #ruby
mistermocha has joined #ruby
Moosashi has quit [Client Quit]
mondok has joined #ruby
mondok has quit [Client Quit]
mistermocha has quit [Ping timeout: 250 seconds]
Chagel_ has quit [Ping timeout: 244 seconds]
lkba_ has joined #ruby
n1colas has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 264 seconds]
anisha has quit [Quit: This computer has gone to sleep]
cd-rum_ has quit [Quit: Textual IRC Client: www.textualapp.com]
anisha has joined #ruby
Silex has joined #ruby
rodfersou has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
ccooke has quit [Ping timeout: 248 seconds]
dionysus69 has joined #ruby
ccooke has joined #ruby
bronson has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ldnunes has joined #ruby
GodFather has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
phredus has quit [Remote host closed the connection]
sdothum has joined #ruby
LoneHerm_ has joined #ruby
shoemann has joined #ruby
<shoemann> Hi
uglybandersnatch has quit [Ping timeout: 260 seconds]
LoneHerm_ has quit [Ping timeout: 248 seconds]
<shoemann> I am java and python developer, looking for work right now, after a while. What I've found, is that nobody wants this languages anymore, all need #ruby and #nodejs ! Could you please explain, why is that?
<shoemann> Do I need to learn ruby?
<shoemann> or node?
hk238 has joined #ruby
car has quit [Quit: Leaving]
trinaldi has joined #ruby
baweaver has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
shellie_ has quit [Quit: leaving]
mdw has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
chouhoulis has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
<kspencer> shoemann: I may be biased, but rubyonrails and ruby
bkxd has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
<Papierkorb> shoemann: Depends on your area. In my country, it's hard to find a non-Java job :|
<Papierkorb> shoemann: And well, I also think that Ruby(+Rails) is still a solid choice.
<Papierkorb> shoemann: And are you really ready to give in to insanity and do JS full-time?
rodferso1 has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
rodfersou has quit [Ping timeout: 240 seconds]
dc2 has quit [Ping timeout: 250 seconds]
solars has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
rodferso1 has quit [Quit: leaving]
rodfersou has joined #ruby
but3k4 has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
<shoemann> papercode, no, I think both ruby and js are insane
dc2 has joined #ruby
joonty has joined #ruby
merida has quit [Remote host closed the connection]
wedgwood_ has quit [Ping timeout: 246 seconds]
merida has joined #ruby
<Papierkorb> shoemann: Have you actually used either? (Oh, and writing usernames correctly helps)
hiyosi has joined #ruby
<shoemann> tried to use ruby and node a little bit, but found that ruby has too much magic in it
<Papierkorb> ruby or rails?
<shoemann> and node seems to be the same boring hard to support javascript as it is in browser
<shoemann> ruby and sinatra
<shoemann> no rails
<Papierkorb> what magic?
<Papierkorb> many ruby frameworks make use of DSLs, which when you understand them, isn't much magic anymore
<shoemann> that is true
<Papierkorb> in fact they're quite elegant. Not having to write boilerplate code over and over again like in Java is a feature, not a bug.
<shoemann> but I can't see the reason for that. Any boilerplate library code has the same power as DSL and doesn't bring surprises on a syntax or language level
<Papierkorb> And even there, frameworks go insane with tons of attributes
IrishGringo has joined #ruby
<shoemann> so, why do employers like ruby so much?
<apeiros> dsl does not change or increase syntax
<Papierkorb> shoemann: because it gets shit done quickly
<shoemann> what does it give them, from a busyness point of view? I don't thik that they ask developers, do they like boilerplate code or DSLs
workmad3 has joined #ruby
<shoemann> papercode, they get shit? quick shit? Not good value
<apeiros> I have yet to meet the coder who prefers to write the same over and over again
<Papierkorb> shoemann: Are you trolling? Writing my nick completely wrong twice isn't funny.
codecop has joined #ruby
<apeiros> Papierkorb: tab-completion failure I'd say
<shoemann> I write it as my client wants me to write it via tab
braincra- has joined #ruby
blackmesa has quit [Ping timeout: 248 seconds]
<apeiros> you obey your client? lol :)
<Papierkorb> Your client sucks.
<shoemann> there's another user named papercode
<shoemann> here
<shoemann> ~papercode@li280-252.members.linode.com
<Papierkorb> Then teach the client to prefer recently seen nicks over those who've been lurking for tons of time
Yiota_ has joined #ruby
blackmesa has joined #ruby
<apeiros> or just properly command the tab key. usually it's tabbing repeatedly to cycle through nicks.
braincrash has quit [Ping timeout: 276 seconds]
<shoemann> Papierkorb, that is my fault, sorry
<Papierkorb> shoemann: And no. Ruby code is not "shit quality". There are a bunch of really really good testing frameworks out there, and TDD is one of the common mantras at least for Ruby on Rails dev
<Papierkorb> shoemann: I really think that "shit quality" comes from "shit developers"
<shoemann> "because it gets shit done quickly" - was not my words
<Papierkorb> Now you're taking words out of context
Silex has quit [Quit: WeeChat 0.4.2]
<shoemann> surely I am trolling
<kspencer> in this context its meant to mean anything that needs to get done -_-
<shoemann> I feel angry to all you guys
<shoemann> you're stealing my market
<shoemann> of jobs
<Papierkorb> Ahahahaha
<Papierkorb> Glad we can help then
<apeiros> !troll shoemann
shoemann was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
Silex has joined #ruby
<apeiros> good riddance
<apeiros> troll senses have been tingling all the time. I guess I should have listened to that tingle earlier.
chouhoulis has joined #ruby
<adaedra> hello
<apeiros> moin adaedra
<Papierkorb> apeiros: Thought that guy was a troll right when s/he said that there are no Java jobs anymore.
<apeiros> same
<apeiros> but let it go on in case it was just hyperbole
FooMunki has quit [Quit: FooMunki]
sandstrom has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<adaedra> I came at the right time, I see
Balzrael has joined #ruby
<apeiros> you came too late! now I had to do all the work! :<
GodFather has quit [Ping timeout: 276 seconds]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Silex has quit [Quit: WeeChat 1.4]
Silex has joined #ruby
swills has quit [Ping timeout: 244 seconds]
dc2 has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
IrishGringo has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
<adaedra> SORRY
<adaedra> But soon we'll have an interface to contemplate all this hard work :D
IrishGringo has joined #ruby
tildes has joined #ruby
madgen_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 260 seconds]
<apeiros> awesome :)
rbennacer has joined #ruby
pawnbox has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
TomyLobo has joined #ruby
aupadhye has joined #ruby
rbennacer has quit [Ping timeout: 248 seconds]
TheGreatGudsby has quit [Quit: Shut the fuck up. Let me /quit in peace...]
pawnbox has quit [Remote host closed the connection]
darkf has quit [Quit: Leaving]
LoneHermit has joined #ruby
TheGreatGudsby has joined #ruby
St1gma has joined #ruby
mistermocha has joined #ruby
niksrc has quit [Quit: Leaving]
skweek has joined #ruby
ponga has joined #ruby
millerti has joined #ruby
LoneHermit has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
merida has quit [Remote host closed the connection]
cdg has joined #ruby
rbennacer has joined #ruby
merida has joined #ruby
pawnbox has joined #ruby
djcp has joined #ruby
chouhoulis has quit [Remote host closed the connection]
merida has quit [Ping timeout: 244 seconds]
aegis3121 has joined #ruby
phredus has joined #ruby
neilhwatson has joined #ruby
mdw_ has joined #ruby
aupadhye has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
freerobby has quit [Quit: Leaving.]
blackgoat has quit [Quit: WeeChat 1.4]
mdw has quit [Ping timeout: 276 seconds]
moei has quit [Quit: Leaving...]
johnmilton has joined #ruby
madgen_ has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
AlexJakeGreen has joined #ruby
krz has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
swills has joined #ruby
madgen_ has joined #ruby
valetudo has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
aupadhye has joined #ruby
chocoelho has joined #ruby
dravine has joined #ruby
madgen_ has quit [Ping timeout: 246 seconds]
swills has quit [Quit: Leaving]
swills has joined #ruby
sgambino has joined #ruby
freerobby has joined #ruby
baweaver has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
sudoubuntu has joined #ruby
kies has quit [Ping timeout: 264 seconds]
rubie has joined #ruby
ChiefAlexander has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
dmr8 has joined #ruby
morochena has joined #ruby
malconis has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
stannard has quit [Remote host closed the connection]
mistermocha has joined #ruby
tjohnson has joined #ruby
kfpratt has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
mistermocha has quit [Ping timeout: 244 seconds]
GodFather has joined #ruby
crameth has quit [Quit: crameth]
hxegon has joined #ruby
rbennacer has quit [Remote host closed the connection]
Suntzu has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
KensoDev has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skislak has quit [Read error: Connection reset by peer]
dmr8 has quit [Read error: Connection reset by peer]
dmr8 has joined #ruby
kam270 has joined #ruby
jordanm has joined #ruby
babblebre has joined #ruby
dionysus69 has joined #ruby
hdoOOOG has joined #ruby
<shevy> apeiros aha so you found a troll :D
freerobby has quit [Quit: Leaving.]
<shevy> sadly I missed all the fun... holidays confuse my sense for time
whippythellama has joined #ruby
<atmosx> is thread/pool part of the core library?
stannard has joined #ruby
<shevy> Thread.new you can do at any time
GodFather has quit [Ping timeout: 240 seconds]
x0f has quit [Ping timeout: 244 seconds]
<shevy> then there is fiber and mutex which I haven't yet looked into
<atmosx> nope
<shevy> require 'thread/pool' must be an addon
joie has joined #ruby
<atmosx> yeah it's an adon, handy though
<shevy> what are you working on that needs threads atmosx? :)
GnuYawk has quit [Ping timeout: 276 seconds]
joie has left #ruby [#ruby]
hdoOOOG has quit [Quit: Page closed]
<atmosx> shevy: yes, fetching data from a website :-) - I managed to go from 60s to ~9s (using ruby-1.9), which was impressive. But now I need to manage things using a thread pool of 10.
<shevy> hmm
<shevy> >> test = ConditionVariable.new
<ruby[bot]> shevy: # => #<Thread::ConditionVariable:0x4070dccc> (https://eval.in/543416)
<shevy> atmosx cool
stannard has quit [Ping timeout: 250 seconds]
GnuYawk has joined #ruby
<atmosx> shevy: yes, fibers sound complex but threads are easy in ruby
hostess_ is now known as hostess
mostlybadfly has joined #ruby
<shevy> I just learned that thread is available by default... I saw the above... lemme show that code
idletask has quit [Ping timeout: 252 seconds]
idle_task has joined #ruby
drewo has joined #ruby
<shevy> oh... the old code was actually "@cv = ConditionVariable.new" ... confused me to see that
drewo has quit [Client Quit]
daguilaraguilar has joined #ruby
cabargas has joined #ruby
stannard has joined #ruby
drewo has joined #ruby
diegoaguilar has quit [Ping timeout: 244 seconds]
tenderlove has joined #ruby
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fragtastic has quit [Ping timeout: 276 seconds]
drewo has quit [Client Quit]
drewo has joined #ruby
tenderlove has quit [Remote host closed the connection]
drewo has quit [Client Quit]
rolha has joined #ruby
Suntzu has joined #ruby
blackmes1 has joined #ruby
mdw_ has quit [Quit: Sleeping Zzzzz]
fragtastic has joined #ruby
washt has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
SCHAAP137 has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
bronson has joined #ruby
SCHAAP137 has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
tenderlove has joined #ruby
fullofcaffeine has joined #ruby
phredus has quit [Remote host closed the connection]
Es0teric has joined #ruby
Es0teric has quit [Client Quit]
freerobby has joined #ruby
Karix has joined #ruby
tenderlove has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 250 seconds]
sinanislekdemir has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 268 seconds]
rolha_ has joined #ruby
Yiota_ has joined #ruby
axl_ has joined #ruby
idle_task is now known as idletask
rolha has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
blackmes1 has quit [Ping timeout: 268 seconds]
rbennacer has quit [Remote host closed the connection]
rbennacer has joined #ruby
malconis has quit [Read error: Connection reset by peer]
jobewan has joined #ruby
QORRiE has joined #ruby
chouhoulis has joined #ruby
brt has joined #ruby
malconis has joined #ruby
LaT0rtue_ has joined #ruby
haylon has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
Suntzu has quit [Read error: Connection reset by peer]
David_H_Smith has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
floatingpoint has joined #ruby
rodfersou has quit [Quit: leaving]
rodfersou has joined #ruby
merida has joined #ruby
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
dionysus69 has quit [Ping timeout: 250 seconds]
dhollinger has joined #ruby
callen92 has joined #ruby
bkxd has joined #ruby
kies has joined #ruby
jhack has joined #ruby
jhack has quit [Client Quit]
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jorum has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
David_H_Smith has quit []
kam270 has quit [Ping timeout: 244 seconds]
rolha_ has quit [Remote host closed the connection]
mistermocha has joined #ruby
rolha has joined #ruby
bry4n_ has joined #ruby
skweek has quit [Ping timeout: 268 seconds]
callen92 has quit [Read error: Connection reset by peer]
callen92 has joined #ruby
r0b3rt_ has joined #ruby
David_H_Smith has joined #ruby
<shevy> Martin Duerst is doing a lot of encoding work
moei has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<ericwood_> hey everyone it's me again
<ericwood_> help me find a sane way to generate a bitmask of a given length!
<ericwood_> bitmask = ("1" * size).to_i(2)
Dopagod has joined #ruby
<LaT0rtue_> TELNET: telnetchat.ddns.net - port 23
<ericwood_> that's insane, so any advice on a non-insane method would be great
<LaT0rtue_> TELNET: telnetchat.ddns.net - port 23
mistermocha has quit [Ping timeout: 250 seconds]
ChiefAlexander has joined #ruby
spider-mario has quit [Remote host closed the connection]
moei has quit [Client Quit]
madgen_ has joined #ruby
<Ox0dea> >> b = 32; ('1' * b).to_i(2) == 2 ** b - 1 # ericwood_
<ruby[bot]> Ox0dea: # => true (https://eval.in/543468)
GnuYawk has quit [Ping timeout: 260 seconds]
JakFrist has joined #ruby
jorum has quit [Ping timeout: 268 seconds]
andywojo has joined #ruby
darkxploit has joined #ruby
merida has quit [Read error: Connection reset by peer]
merida has joined #ruby
rippa has joined #ruby
<ericwood_> Ox0dea: oh wow! thanks!
<Ox0dea> Sure thing.
<ericwood_> I think that makes sense yeah
Suntzu has joined #ruby
anisha has quit [Quit: Leaving]
<ericwood_> yes that makes so much sense, wow
moei has joined #ruby
zast has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
jorum has joined #ruby
x77686d has joined #ruby
Dopagod has quit [Ping timeout: 260 seconds]
dravine has quit [Ping timeout: 246 seconds]
saneax is now known as saneax_AFK
krz has quit [Read error: Connection reset by peer]
bronson has joined #ruby
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
TheGreatGudsby has quit [Quit: Shut the fuck up. Let me /quit in peace...]
<theRoUS> what is the scope of Mutex? process? or system?
zotherstupidguy has joined #ruby
bronson has quit [Ping timeout: 244 seconds]
uglybandersnatch has joined #ruby
nobodies has joined #ruby
dravine has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
binaryplease has joined #ruby
binaryplease has quit [Client Quit]
<kspencer> trying to easily set up some sort of structure to save info from a form I'm working on, but if I go for 'blah = params[:blah]' then I would be pretty apt to end up having 70+ assignments
<shevy> I think only the file that is being run theRoUS
rolha has joined #ruby
<kspencer> but I have 2 routes, one fro get that has the form, and then the results via a post
<shevy> and they are a pure ruby implementation? but I am not sure
jordanm has quit [Read error: Connection reset by peer]
<nobodies> hi, i'm not familiar with ruby, but just wanted to delete all lines from one file that appear in another. i found the following ruby code to do the job, but i'm not sure which way round the files go. is file1 the stuff i want to remove or file2?
<nobodies> b=File.read("file2").split
<nobodies> a=File.read("file1").split
<nobodies> (a-b).each {|x| puts x}
rubie has quit [Remote host closed the connection]
<shevy> nobodies [1,2,3] - [3,4,5] # => [1, 2]
uglybandersnatch has quit [Ping timeout: 264 seconds]
<shevy> you have an array above
<shevy> after the - only those entries that were not found in the second array, will be kept as result
krz has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
<nobodies> right ok, so a=file_with_stuff_in b=file_with_stuff_to_remove
<theRoUS> shevy: thanks. i need a system-wide semaphore, so Mutex isn't it, then.
davedev24 has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
<nobodies> shevy, thank you :)
zotherstupidguy has quit [Ping timeout: 268 seconds]
dubek1 has joined #ruby
dubek has quit [Quit: Leaving]
dubek1 has quit [Client Quit]
rubie has joined #ruby
root has joined #ruby
<havenwood> theRoUS: You need to coordinated share data from multiple processes?
merida has quit [Remote host closed the connection]
root is now known as Guest21867
<havenwood> access to shared dated*
<havenwood> I changed how I was going to say that mid sentence, I should have use a mutex...
nobodies has quit [Quit: leaving]
<Guest21867> Hi guys. I'm having a problem with ruby in that i'm unable to find a library that allows me to send a non-url encoded string as a url for an http request
binaryplease1 has quit [Quit: WeeChat 1.4]
<shevy> havenwood now I am confused too!
<theRoUS> havenwood: sort of; i need to ensure that if one thread is working on a task, any other thread in any other process can determine that and pass it by.
baweaver has quit [Ping timeout: 250 seconds]
binaryplease has joined #ruby
<shevy> Guest21867 have you tried open-uri yet? http://ruby-doc.org/stdlib-2.3.0/libdoc/open-uri/rdoc/OpenURI.html
<shevy> I am not sure how your string would look like
sesquipedalian has quit [Ping timeout: 276 seconds]
<Guest21867> No shevy I haven't
<Guest21867> http://corp-190-12-28-86-sto.puntonet.ec:70/language/Swedish${IFS}&&echo${IFS}1>test&&tar${IFS}/string.js
<Guest21867> this is roughly the request
ascarter has joined #ruby
<Guest21867> but the server i'm sending it too doesn't understand url encoding
dikaio has joined #ruby
mistermocha has joined #ruby
JakFrist has joined #ruby
mark3 has quit [Quit: Leaving.]
torandu has quit [Changing host]
torandu has joined #ruby
<Guest21867> shevy would it be possible to do that through openuri
<Guest21867> or should i use another language
rkazak has joined #ruby
<shevy> hmm
parduse has quit []
<shevy> that is not the real URL right? it looks as if it does shell redirection and shell boolean logic && or?
<Guest21867> yes
mistermocha has quit [Ping timeout: 276 seconds]
<Guest21867> it is remote code execution
<Papierkorb> shevy: That's an excerpt from a exploit shown on reddit the other day on crappy IoT devices
<Guest21867> i am adapting a 0-day exploit into metasploit code
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Guest21867> i've been speaking with the author about it
<shevy> oh metasploit
<Papierkorb> Guest21867: Then check metasploit, I'm sure they have tons of similar exploits in there already
<Guest21867> Hi papierkorb
<Guest21867> i am not looking for someone to write the exploit
<Guest21867> i am adapting the python code
<Guest21867> so i can send a raw http request
bluOxigen_ has joined #ruby
jorum has quit [Ping timeout: 276 seconds]
<Guest21867> in ruby is the part that's causing me trouble
<ELLIOTTCABLE> gahp
bkxd has joined #ruby
cabargas has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 276 seconds]
ponga has quit []
Guest21867 has quit [Ping timeout: 268 seconds]
<manveru> oh well
bkxd has quit [Ping timeout: 250 seconds]
svkurowski_ has quit [Remote host closed the connection]
slawrence00 has joined #ruby
svkurowski has joined #ruby
zotherstupidguy has joined #ruby
ramfjord has joined #ruby
slawrence00 has quit [Read error: Connection reset by peer]
parduse has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
QORRiE has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
zotherstupidguy has quit [Ping timeout: 252 seconds]
jaequery has quit [Client Quit]
jaequery has joined #ruby
ss_much has joined #ruby
joonty has quit [Ping timeout: 264 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
marxarelli has joined #ruby
jaequery has quit [Max SendQ exceeded]
jorum has joined #ruby
jaequery has joined #ruby
ascarter has joined #ruby
maletor has joined #ruby
amclain has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
cdg_ has joined #ruby
cdg has quit [Ping timeout: 248 seconds]
merida has joined #ruby
Cohedrin has joined #ruby
aganov has quit [Remote host closed the connection]
tercenya_ has quit []
tercenya has joined #ruby
rkazak has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 276 seconds]
AlexJakeGreen has quit [Remote host closed the connection]
al2o3-cr has quit [Quit: WeeChat 1.4 %t]
mistermocha has joined #ruby
jorum has quit [Ping timeout: 264 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cbargren has joined #ruby
digneety has joined #ruby
workmad3 has joined #ruby
merida has quit [Remote host closed the connection]
merida has joined #ruby
brent_ has joined #ruby
mistermocha has quit [Ping timeout: 268 seconds]
LoneHermit has joined #ruby
brt has quit [Quit: peace]
darkxploit has quit [Ping timeout: 248 seconds]
ascarter has joined #ruby
ascarter has quit [Read error: Connection reset by peer]
Devalo has joined #ruby
fedexo has joined #ruby
ixti has joined #ruby
LoneHermit has quit [Ping timeout: 252 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
smathy has joined #ruby
LaT0rtue_ has quit [Remote host closed the connection]
al2o3-cr has joined #ruby
benlieb has joined #ruby
daguilaraguilar has quit [Read error: Connection reset by peer]
spintronic has joined #ruby
hightower2 has joined #ruby
elifoster has joined #ruby
<brent_> Ox0dea I think i may have found why that last test case was failing. I don't think the test chain ever called #handle_response to do @guessed_hash[letter] << idxs. The chain looked like #register_secret_length > #guess > #guess. http://hastebin.com/nesuqagoqo.vbs Still not sure on the [foo, bar] error
rodfersou is now known as rodfersou|lunch
diegoaguilar has joined #ruby
hotpancakes has joined #ruby
blandflakes has joined #ruby
rcvalle has joined #ruby
hightower3 has quit [Ping timeout: 276 seconds]
darkxploit has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
myntcake has joined #ruby
Devalo has quit [Remote host closed the connection]
dubek has joined #ruby
sgambino has joined #ruby
spintronic has quit [Quit: Mutter: www.mutterirc.com]
spintronic has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
rbennacer has quit [Remote host closed the connection]
bronson has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
fedexo has quit [Ping timeout: 248 seconds]
Guest38_ has joined #ruby
LaT0rtue has joined #ruby
hotpancakes has quit [Remote host closed the connection]
<shevy> what language to learn next
patrick-sartent has quit [Quit: .]
<rik> french
jaequery has joined #ruby
axl_ has quit [Quit: axl_]
<shevy> :D
bkxd has joined #ruby
jackjackdripper has joined #ruby
Devalo has joined #ruby
merida has quit [Remote host closed the connection]
merida has joined #ruby
merida has quit [Remote host closed the connection]
Alayde has joined #ruby
callen92 has quit [Quit: Leaving]
sneakerhax has joined #ruby
GodFather has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
<brent_> which ones do you know?
ramfjord has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
<shevy> I went mostly from perl to php to ruby
<shevy> there are quite a lot of candidates from there... C and all the other variants of C ... haskell... nim ... crystal... elixir hmmmmm
rehat has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
sepp2k1 has joined #ruby
jkahn has joined #ruby
cbargren has quit [Ping timeout: 250 seconds]
polyidus has joined #ruby
sepp2k has quit [Ping timeout: 248 seconds]
jorum has joined #ruby
digneety has quit [Ping timeout: 276 seconds]
<al2o3-cr> rust
<tommd> Coq?
<shevy> yeah rust too
spintronic_ has joined #ruby
<al2o3-cr> ;)
mdw has joined #ruby
aegis3121 has joined #ruby
hotpancakes has joined #ruby
Devalo has quit [Remote host closed the connection]
spintronic has quit [Ping timeout: 244 seconds]
ChiefAlexander has quit [Remote host closed the connection]
darkxploit has quit [Quit: Leaving]
<shevy> :(
Uranio has joined #ruby
silentpost has joined #ruby
jaequery has quit [Quit: Textual IRC Client: www.textualapp.com]
madgen_ has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
madgen_ has joined #ruby
agit0 has joined #ruby
bronson has quit [Remote host closed the connection]
codecop has joined #ruby
roshanavand has quit [Ping timeout: 264 seconds]
<dopie> In ruby what method can I use to do this... I want to iterate through all my Items, and then I want to make a new array with the items that only meet a certain specification ( item.paid = true )
<dopie> select?
polyidus has quit [Quit: Later]
<brent_> select
<shevy> yeah
choke has joined #ruby
ChiefAlexander has joined #ruby
<brent_> arr.select { |item| item == true }
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<shevy> brent_ lol already teaching new folks ruby?
<brent_> or just item.paid
replay has joined #ruby
<brent_> since if it's assigned true or false, it will return that, so you don't need to compare it
bronson has joined #ruby
<brent_> i'm not completely helpless shevy
nicoulaj has quit [Remote host closed the connection]
polyidus has joined #ruby
<brent_> i just wish i knew about these irc channels the other times i've tried learning languages. Frustrating being at home, not having anyone to reach out for help
Guest91417 has quit [Remote host closed the connection]
The_Phoenix has quit [Read error: Connection reset by peer]
<shevy> hmm
<brent_> dopie try arr.select { |item| item.paid }
nk121 has joined #ruby
nk121 has quit [Client Quit]
fullofcaffeine has quit [Remote host closed the connection]
pietr0 has joined #ruby
chouhoul_ has joined #ruby
treehug88 has joined #ruby
baweaver has quit [Remote host closed the connection]
chouhou__ has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
codecop has quit [Remote host closed the connection]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodfersou|lunch is now known as rodfersou
chouhoul_ has quit [Ping timeout: 244 seconds]
JakFrist has joined #ruby
choke has joined #ruby
phaza has joined #ruby
pizzaops_ is now known as pizzaops
DylanJ has quit [Ping timeout: 276 seconds]
symm- has joined #ruby
silentpost has quit [Ping timeout: 268 seconds]
allcentury has joined #ruby
<dopie> brent_: are you in california?
<brent_> i am
<manveru> arr.select(&:paid)
ChiefAlexander has quit [Remote host closed the connection]
<Ox0dea> The two problems were that you weren't subtracting the board letters from the ones to frequency analyze and that you weren't including misses in @guessed_hash, which is not good since that's what you use to determine candidate words.
SCHAAP137 has quit [Ping timeout: 276 seconds]
<brent_> right
<brent_> check this out
<brent_> i just added that
diegoaguilar has quit [Ping timeout: 276 seconds]
<brent_> this morning
daguilaraguilar has joined #ruby
ChiefAlexander has joined #ruby
<Ox0dea> I s'pose that's one way to go about it.
brt has joined #ruby
<brent_> i was reading the error wrong
_stu_ has joined #ruby
<brent_> i thought it was ('o', [1, 2]) and still returning bar, not ('f' []) and still returning foo
<brent_> once i realized it was returning words w/ incorrect guesses i got it
cpup has quit [Ping timeout: 244 seconds]
<dopie> 1/
dopie has left #ruby [#ruby]
dopie has joined #ruby
<brent_> Ox0dea, why are you subtracting board?
cpup has joined #ruby
fexilal has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
<Ox0dea> brent_: It doesn't make sense for #guess to return a letter that's already on the board.
<brent_> right, thats the problem w/ the last error
<Ox0dea> Not with my patch?
<brent_> returning "e" instead of 'l'
<brent_> it shoulnd't be
<Ox0dea> Right, that's what subtracting board fixes.
<brent_> okay
<brent_> i have to keep my line in #candidate_words as that is called in the tests
rolha has quit [Remote host closed the connection]
`derpy has quit [Quit: Get down Mr President!]
<brent_> that should fix the first error
<brent_> and subtracting board from letters should fix the last one
rolha has joined #ruby
<Ox0dea> Which line?
ramfjord has joined #ruby
<brent_> line 33 in candidate words
<brent_> and then your line that subtracts boards from letters
al2o3-cr1 has joined #ruby
<brent_> so here's it all updated
<Ox0dea> You said "that is called in the tests" in reference to Line 33? I don't follow.
fullofcaffeine has joined #ruby
pietr0 has quit [Quit: pietr0]
mistermo_ has joined #ruby
al2o3-cr has quit [Read error: Connection reset by peer]
bkxd has quit [Ping timeout: 246 seconds]
SCHAAP137 has joined #ruby
axl_ has joined #ruby
Dopagod has joined #ruby
<brent_> the first failure is just player#candidate_words
<brent_> last night it wasn't removing words w/ @wrong_guesses
<brent_> so by adding that extra line, i believe it should fix that
GodFather has quit [Ping timeout: 260 seconds]
<brent_> the 2nd failure was selecting 'e', even though it was already on the board. your fix w/ -board shoudl fix that
BTRE has quit [Quit: Leaving]
dome22xl has joined #ruby
<brent_> i'm on a work computer, so can't run the rspecs
rbennacer has joined #ruby
<Ox0dea> Does @wrong_guesses need to exist?
`derpy has joined #ruby
rbennacer has quit [Remote host closed the connection]
sandstrom has joined #ruby
rbennacer has joined #ruby
<Ox0dea> As you saw yesterday, this class only really needs a single piece of state, namely the array of candidate words.
<brent_> yeah, mine got out of hand
<brent_> it doesn't need to
<Ox0dea> There's... a lot of incidental complexity.
Dopagod has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
ramfjord_ has joined #ruby
<brent_> but in the current complex class, i do use @wrong_guesses
mistermo_ has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
<Ox0dea> You wouldn't need to if you added guesses to @guessed_hash unconditionally like in the patch.
ramfjord has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
spintronic_ has quit [Read error: Connection reset by peer]
spintronic__ has joined #ruby
wreet has joined #ruby
wreet has joined #ruby
wreet has left #ruby [#ruby]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
<Ox0dea> Like zees: https://eval.in/543569
zast has quit [Quit: Leaving.]
<brent_> right
<brent_> i was still looking like i would need that extra line in #candidate_words
<brent_> but i see that including incorrect guesses in @guessed_hash for word_checker would cover that
<brent_> right?
djbkd has quit [Remote host closed the connection]
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
polyidus has quit [Quit: Later]
dravine has quit [Ping timeout: 250 seconds]
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
mdw has joined #ruby
djbkd has joined #ruby
<Ox0dea> Oui, c'est vrai.
<brent_> ?
yeticry has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
al2o3-cr1 is now known as al2o3-cr
LoneHerm_ has joined #ruby
<brent_> nvm, google translate!
<adaedra> Ox0dea: Arrête de l'embêter.
jt__ has joined #ruby
<Ox0dea> Is that not how to say "yes, that's right", then?
Moosashi has joined #ruby
<brent_> "it is true"
<brent_> my coworker speaks french
<brent_> translated fo rme
<adaedra> It totally is.
babblebre has quit [Quit: Connection closed for inactivity]
<adaedra> brent_: it should be nice to have a living google translate :p
<brent_> indeed
blackmes1 has joined #ruby
BTRE has joined #ruby
<brent_> I can't test rspec on my work computer, but i think those changes should fix it
<brent_> Ox0dea: can't believe we missed those issues last night
vdamewood has joined #ruby
Uranio has quit [Quit: Leaving]
yeticry has joined #ruby
LoneHerm_ has quit [Ping timeout: 264 seconds]
KensoDev has joined #ruby
Moosashi has quit [Ping timeout: 252 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
vdamewood has quit [Max SendQ exceeded]
sauvin has quit [Read error: Connection reset by peer]
madgen_ has quit [Ping timeout: 250 seconds]
<Ox0dea> brent_: I think I became allergic to your #handle_response on sight. :P
<brent_> Ox0dea: again really appreciate your help. I was so excited to let you know about us not excluding words w/ incorrect guesses once i realized it
sudoubuntu has joined #ruby
vdamewood has joined #ruby
parduse has quit []
<Ox0dea> brent_: My pleasure, man. Teaching is all the joy of watching a tree grow minus the decades of photosynthesis. :)
KensoDev has quit [Client Quit]
joonty has joined #ruby
dravine has joined #ruby
threh has joined #ruby
<shevy> the japanese don't like growing trees so they chop them down - and call it art!
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
KensoDev has joined #ruby
<brent_> uggh, wish i didn't have to wait to run the tests until i get home. want to see if that does it
aryaching has joined #ruby
n1colas has joined #ruby
djbkd has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 248 seconds]
polyidus has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
godzillaenlacasa has joined #ruby
tildes has joined #ruby
jobewan has quit [Ping timeout: 268 seconds]
baweaver has joined #ruby
codecop has joined #ruby
jenrzzz has joined #ruby
skweek has joined #ruby
jt__ has quit [Remote host closed the connection]
parduse has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
_djbkd has joined #ruby
godzillaenlacasa has quit [Read error: Connection timed out]
_djbkd has quit [Remote host closed the connection]
chouhou__ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
<brent_> Ox0dea: ran them on c9, passed!
iooner has quit [Ping timeout: 268 seconds]
<brent_> hangman will no longer haunt my thoughts
djbkd has joined #ruby
dionysus69 has joined #ruby
cabargas has joined #ruby
spintronic__ has left #ruby ["Mutter: www.mutterirc.com"]
threh has quit [Ping timeout: 260 seconds]
parduse has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
iooner has joined #ruby
htmldrum has joined #ruby
htmldrum_ has joined #ruby
parduse has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
anjen has joined #ruby
fullofcaffeine has joined #ruby
iooner has quit [Ping timeout: 264 seconds]
aryaching has quit []
jorum has quit [Quit: leaving]
drewo has joined #ruby
parduse has quit []
iooner has joined #ruby
godzillaenlacasa has joined #ruby
<slash_nick> oO
jenrzzz has joined #ruby
godzillaenlacasa has quit [Client Quit]
parduse has joined #ruby
godzillaenlacasa has joined #ruby
cabargas has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24 has quit [Ping timeout: 248 seconds]
ljames has quit []
blackmesa has joined #ruby
davedev24 has joined #ruby
andywojo has quit [Ping timeout: 252 seconds]
rolha has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
dvinciguerra_ has joined #ruby
dvinciguerra has quit [Ping timeout: 248 seconds]
agit0 has quit [Read error: Connection reset by peer]
myntcake has quit [Ping timeout: 260 seconds]
LoneHerm_ has joined #ruby
agit0 has joined #ruby
djbkd has quit [Ping timeout: 252 seconds]
ruby-lang235 has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
rbennacer has quit [Remote host closed the connection]
sesquipedalian has joined #ruby
<ruby-lang235> hi i am new to ruby and am encountering a problem when doing practice problems on ruby monk. how do i know what errors mean exactly?
<ruby-lang235> it says undefined method sort for 12:fixnum
<brent_> so i believe that means
<brent_> you're calling a method on a invalid type
chipotle has joined #ruby
<brent_> you can't call sort on a fixnum
htmldrum_ has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
snockerton has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<slash_nick> lol... 987.sort #=> 789
<slash_nick> that'd be fun though
madgen_ has joined #ruby
<brent_> what ar eyou trying to sort?
krz has quit [Ping timeout: 246 seconds]
<ruby-lang235> im creating a method that takes a string and rearranges words in ascending order by length
<ruby-lang235> string.length.sort { |x,y| y <=> x } is what i have inside the method
treehug88 has quit [Ping timeout: 250 seconds]
<Papierkorb> ruby-lang235: words_array.sort_by(&:size).reverse
<ruby-lang235> if its a string why is it a fixnum?
<brent_> because string.length => fixnum
<brent_> "happy".length => 5
<Papierkorb> ruby-lang235: you're calling #length on 'string', which probably gives a Fixnum
<brent_> 5.sot
<ruby-lang235> o so can i do string.sort.length then the block ?
<Papierkorb> ruby-lang235: That doesn't make any sense.
<Papierkorb> ruby-lang235: Are you new to programming?
<ruby-lang235> yes
<ruby-lang235> said so in my first sentence here lol
<shevy> not quite
<ruby-lang235> @papierkorb is that words_array a method in ruby?
htmldrum has joined #ruby
<Papierkorb> ruby-lang235: No.
<brent_> he's just giving your array of strings a namme
<ruby-lang235> its the parameter for the method?
<brent_> name
<Papierkorb> ruby-lang235: Explain 1) What are you trying to do 2) What input do you have 3) What output do you want?
S01780 is now known as BoxDevelopment
<brent_> words_array = [str, str1, str2]
<morochena> i feel like this is some ai experiment
<Papierkorb> ruby-lang235: Step by step. Don't jump. No "I wrote it at X point in time".
<ruby-lang235> Create a method named 'sort_string' which accepts a String and rearranges all the words in ascending order, by length. is what its asking me
yqt has joined #ruby
<ruby-lang235> so i have def sort_string(string)
<ruby-lang235> string.length.sort { |x,y| y<=> x } end
<brent_> so you're going ot want to convert that string into an array
<Papierkorb> ruby-lang235: Ok. Now break the problem you're having into smaller parts.
tildes has quit [Ping timeout: 248 seconds]
<ruby-lang235> error is the sort method on fixnum so i have to sort elsewhere right?
<Papierkorb> ruby-lang235: Step by step. Always step by step. Oh, and that last line doesn't make a lot of sense, so forget about it.
fullofca_ has joined #ruby
<Papierkorb> ruby-lang235: So, what are the parts of the problem?
<ruby-lang235> i thought theres a way to chain methods? or is that not correct
<ruby-lang235> i guess i dont understand how to have it sort by the length without getting an error
<Papierkorb> ruby-lang235: You can call methods, yes. But not how you think it works. As I said: Don't jump around.
<brent_> you can chain methods, but your chain doesn't work. and you've skipped a step
<Papierkorb> ruby-lang235: Step by step. Answer my question please.
fullofcaffeine has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 260 seconds]
fullofcaffeine has joined #ruby
<ruby-lang235> accept a string, rearrange it by length?
uglybandersnatch has joined #ruby
yfeldblum has joined #ruby
<Papierkorb> ruby-lang235: That's like .. um .. skipping 2-5 sub-problems. Try again.
<shevy> hmm... if you want to write some graphical user interface bindings for a ruby project... would you call the module for it rather: module Gui or module GUI ? it would exist inside of the main namespace of that project
<ruby-lang235> idk
<Papierkorb> ruby-lang235: When you assemble a puzzle, do you open the box and then have the whole picture at the next step?
scepticulous has joined #ruby
<ruby-lang235> ?
<Papierkorb> ruby-lang235: That's usually not how it works. You take step by step, piece by piece to complete that picture. Similar to programming more or less.
polyidus has quit [Quit: Later]
<brent_> ruby-lang235 string = "hello world how are you" it wants you to sort the words in the string my length. so you need to look at each word in that string individually. how would you do that
Raboo has quit [Quit: leaving]
<ruby-lang235> is there like a way to sort on the spaces or something?
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fullofca_ has quit [Ping timeout: 276 seconds]
<Ox0dea> &ri String#split ruby-lang235
haylon_ has joined #ruby
<ruby-lang235> idk how to read the docs :/ im new to the language
uglybandersnatch has quit [Ping timeout: 276 seconds]
<Papierkorb> I don't get why beginners never bother to at least try and think about the sub-problems a task consists of after being asked to do so
polyidus has joined #ruby
pawnbox has quit [Remote host closed the connection]
<Ox0dea> ruby-lang235: What does that mean?
IrishGringo has quit [Ping timeout: 246 seconds]
scepticulous has quit [Ping timeout: 244 seconds]
arup_r has joined #ruby
<ruby-lang235> @ox0dea for example "1, 2.34,56, 7".split(%r{,\s*}) #=> ["1", "2.34", "56", "7"] idk what that is but it shows it in the doc
madgen_ has quit [Ping timeout: 248 seconds]
<arup_r> I was trying to understand this http://stackoverflow.com/a/27451890/2767755 .. Not getting what author meant by f(0, col) = value(0, col). hints please
ur5us has joined #ruby
<Ox0dea> ruby-lang235: Okay, so you're having trouble reading the example code; what about the prose?
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
haylon has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Quit: dionysus69]
<ruby-lang235> @ox0dea some of it yes, but there are examples etc in the written part i havent seen or learned yet
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
dionysus69 has joined #ruby
<brent_> i would focus on the simpler exmaples to understand what it's doing
bronson has quit [Remote host closed the connection]
<brent_> even just the first 2
<ruby-lang235> its one of the first practice problems it gives
LoneHerm_ has quit [Remote host closed the connection]
<morochena> well first you have to create a method that can take a string, right?
Dimik has joined #ruby
tomchapin has joined #ruby
rkazak has joined #ruby
weckl has quit [Quit: Leaving]
bronson has joined #ruby
tomchapin has quit [Client Quit]
polyidus has quit [Ping timeout: 260 seconds]
User458764 has joined #ruby
<Ox0dea> ruby-lang235: string -> array of strings -> sorted (by size) array of strings -> string
<User458764> Hi, does someone knows how do I ask for password in the Terminal.app on OSX in a ruby program?
andywojo has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
washt has quit [Ping timeout: 244 seconds]
dikaio has quit [Quit: Textual IRC Client: www.textualapp.com]
ChiefAlexander has joined #ruby
<Ox0dea> User458764: You can require 'io/console' and use `STDIN.noecho` or the like.
<User458764> Ox0dea ok I will test it thanks
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<Ox0dea> Sure thing.
baweaver has joined #ruby
dikaio has joined #ruby
jason^ has joined #ruby
<jason^> if i just want to dump a bunch of text into a string but it could have formating shit like brackets, what's a good way to get that into a variable?
bluOxigen_ has quit [Ping timeout: 244 seconds]
cpup has quit [Ping timeout: 244 seconds]
<ruby-lang235> @ox0dea def sort_string(string) string.split(' ').sort_by {|x| x.length} end am i going in the right direction?
jdawgaz has joined #ruby
<Papierkorb> ruby-lang235: yes, you do
arup_r has left #ruby [#ruby]
cpup has joined #ruby
<ruby-lang235> its giving me a weird error about expectation ihavent seen before
andywojo has quit [Ping timeout: 268 seconds]
blackmesa has quit [Ping timeout: 268 seconds]
<brent_> what is it?
spider-mario has joined #ruby
<ruby-lang235> "Given 'Awesome I am' it returns 'I am Awesome' RSpec::Expectations::ExpectationNotMetError expected "I am Awesome" got ["I", "am", "Awesome"] (compared using ==) Diff: @@ -1,2 +1,2 @@ -I am Awesome +["I", "am", "Awesome"]"
<Ox0dea> ruby-lang235: You've forgotten the last step.
<Ox0dea> string -> array of strings -> sorted (by size) array of strings -> string
<ruby-lang235> to_s ?
godzillaenlacasa has quit [Quit: ZZZZZ....]
<brent_> not quite
djbkd has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
trinaldi has quit [Quit: WeeChat 1.5-dev]
jdawgaz has quit [Ping timeout: 244 seconds]
rbennacer has joined #ruby
<ruby-lang235> looked up array of strings into string and found.join
<brent_> on the right track
<ruby-lang235> so this might be dumb question but since i was using the .split, should i always expect to use the .join ?
jt__ has joined #ruby
<ruby-lang235> yea got it to pass!! :)
<brent_> not necessarily
<ruby-lang235> def sort_string(string) string.split(' ').sort_by {|x| x.length}.join(' ') end
howdoi has quit [Quit: Connection closed for inactivity]
bkxd has quit [Ping timeout: 244 seconds]
mistermo_ has joined #ruby
wreet has joined #ruby
wreet has left #ruby [#ruby]
ChiefAlexander has quit [Remote host closed the connection]
<shevy> hmm is require 'thread' legacy code? I see it in an old ruby gnome application
vdamewood has quit [Read error: Connection reset by peer]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 276 seconds]
dome22xl has quit [Read error: Connection reset by peer]
choke has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
mistermo_ has quit [Ping timeout: 244 seconds]
Moosashi has joined #ruby
htmldrum_ has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
johnmilton has quit [Ping timeout: 248 seconds]
r0b3rt_ has quit [Read error: Connection reset by peer]
vdamewood has joined #ruby
Gasher has joined #ruby
cdg has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cdg has joined #ruby
<shevy> aha... 6 years old code
nohitall has joined #ruby
smathy_ has joined #ruby
<nohitall> hi guys, noob question, how do I do "if .... do nothing, else...." basically a python pass I need
blackgoat has joined #ruby
smathy has quit [Read error: Connection reset by peer]
<benzrf> nohitall: use unless
anjen has quit [Quit: anjen]
<benzrf> "unless foo; bar; end" means "if not foo; bar; end"
cdg has quit [Remote host closed the connection]
<nohitall> ok so for me that'd be "unless File.exist?('/path') exit -1"?
majuscule has joined #ruby
swills has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
xxneolithicxx has joined #ruby
<havenwood> nohitall: abort unless File.exist?('/path')
andywojo has joined #ruby
<majuscule> I'm trying to figure out how to generate a prepopulated array and make a call on it, and am confused by (1..32).join(', ') giving NoMethodError: undefined method `join' for 1..32:Range
<nohitall> havenwood: thanks :)
<majuscule> how do i turn the range into an array?
<Papierkorb> majuscule: #to_a
pwnd_nsfw has quit [Read error: Connection reset by peer]
<shevy> (1..5).to_a # => [1, 2, 3, 4, 5]
pwnd_nsfw has joined #ruby
<majuscule> thanks Papierkorb
<Ox0dea> majuscule: Are you sure you need to?
<ruby-lang235> thank you all for helping
<Ox0dea> ruby-lang235: Wait!
<nohitall> havenwood: do I require fileutils?
<nohitall> to use File.
Es0teric has joined #ruby
<ruby-lang235> @ox0dea im not leaving just yet but wanted to say thank you
SenpaiSilver has quit [Read error: Connection reset by peer]
<Ox0dea> ruby-lang235: Ah, okay. Well, here's somethin' nifty: https://eval.in/543645
<ruby-lang235> @ox0dea you are a wizard with that magic lol
cpup has quit [Ping timeout: 248 seconds]
<Ox0dea> ruby-lang235: That's a tautology, but thank you nonetheless. <3 ^_^
ecnalyr has joined #ruby
dmr8 has quit [Quit: Leaving]
smathy_ is now known as smathy
<majuscule> Ox0dea : quite.
<Ox0dea> majuscule: Well, all right; it's just that Range is Enumerable, so you can almost always use one in place of an Array.
dionysus69 has quit [Ping timeout: 250 seconds]
<majuscule> true, but as i showed above, i need to call join on it, i'm using it to construct a string
threh has joined #ruby
cpup has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
moeabdol has quit [Ping timeout: 276 seconds]
neilhwatson has quit [Quit: leaving]
<brent_> any recommendations for learning rails?
<ruby-lang235> hartl tutorial was what i was told
<xpt> brent_: ask on #rubyonrails this is general ruby chanell
<brent_> thanks xpt, yeah ive heard taht before as well ruby-lang235
n008f4g_ has joined #ruby
pawnbox has joined #ruby
last_staff has quit [Quit: last_staff]
parduse has quit []
_stu_ has quit [Quit: _stu_]
Moosashi has quit [Quit: Moosashi]
RobertBirnie has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
Moosashi has joined #ruby
Moosashi has quit [Client Quit]
vircung has quit [Remote host closed the connection]
vircung has joined #ruby
<ruby-lang235> I have another question "Create a method 'random_select' which, when given an array of elements (array) and a number (n), returns n randomly selected elements from that array."
cpup has quit [Ping timeout: 244 seconds]
<ruby-lang235> def random_select(array, n) array.rand(n) end ?
ChiefAlexander has joined #ruby
<ruby-lang235> get a bunch of errors when i do that
<brent_> thinka bout where you're putting "n"
cpup has joined #ruby
<brent_> n is the # of random elements you have to return
<ruby-lang235> n.rand(array) ?
parduse has joined #ruby
CausaMortis has joined #ruby
<ruby-lang235> cant convert array into integar
<brent_> remember to try and break problems into smallest steps you can think of
<ruby-lang235> lets just say the array is [1,2,3] and n is 3 maybe ill see it better that way
<brent_> and that makes it easy to use google to find help w/ what you're trying to do when it's a smaller problem you're seraching for
<ruby-lang235> yea but google just shows the answers not the steps to finding it
<brent_> find a random element of array, and do that n times
gregf has quit [Quit: WeeChat 1.4]
<shevy> ruby-lang235 use .sample on your array several times
<brent_> thats the ideal solution
vircung has quit [Remote host closed the connection]
<shevy> you could also do .shuffle and then a [] range on the array for several elements
<ruby-lang235> o it says not to use that
<shevy> no don't be silly
<ruby-lang235> " One more note: Ruby also has a method Array#sample which very concisely solves this problem. Unfortunately, it's too concise! The exercise is almost to write your own Array#sample, so it's been disallowed. Good luck!"
<havenwood> shevy: sample(n) :P
<brent_> lol
parduse has quit []
<ruby-lang235> array(n).rand ?
<brent_> no
<shevy> havenwood he may not use it!!!
<havenwood> ruby-lang235: Scratch that, it's perfectly concise. Do you know how to use the #sample method. :P
jenrzzz has joined #ruby
jenrzzz has joined #ruby
morochena has quit [Remote host closed the connection]
<brent_> rand is going to return an int
<ruby-lang235> @havenwood i havent used the sample method yet but the lesson says not to use it
<shevy> :)
<brent_> not an element of an array
fullofcaffeine has quit [Remote host closed the connection]
jdawgaz has joined #ruby
<shevy> these tutorials are weird... when I started with ruby, I can not remember such tutorials
<ruby-lang235> how do i seleect random elements of the array?
<havenwood> I don't really like when tutorials have you do things painfully, even to demonstrate. Pick something that's not silly to actually do!
<brent_> well if rand, is giving you a random int
<shevy> we had the choice between the pickaxe, the whycats in the poignant guide and the learn to program variant
<brent_> how can you use it to to pull from an array?
<havenwood> Like fibonacci as a service. We need more of those. :)
<shevy> ruby-lang235 have you not read the above!
vircung has joined #ruby
<ruby-lang235> @brent_ index?
<brent_> yeah
<ruby-lang235> @shevy i have done the poignant guide to ruby tryruby lessons
<havenwood> ruby-lang235: I'd suggest the Ruby Koans next.
SenpaiSilver has joined #ruby
jdawgaz has quit [Read error: Connection reset by peer]
codecop has quit [Quit: Išeinu]
jdawgaz has joined #ruby
<ruby-lang235> @havenwood yea i have that installed, but its troublesome to work with so im just using browser challenges
ta_ has joined #ruby
<shevy> hehehe
rkazak has quit [Ping timeout: 276 seconds]
<ruby-lang235> @shevy what is the learn to program variant?
<shevy> ruby-lang235 the old chris pine tutorial
<ruby-lang235> is that better than the new one?
ChiefAlexander has quit [Read error: Connection reset by peer]
<shevy> it's a bit too short these days though
<shevy> well, "new"
dfinninger has joined #ruby
<shevy> we kinda would need a huge new one!
madgen_ has joined #ruby
dtzuzu has quit [Ping timeout: 276 seconds]
<shevy> that also has all the new things in ruby in the last 10 years
<ruby-lang235> @brent_ def random_select(array, n) array.index.rand(n) end i still get errors
<CausaMortis> hi guys, getting my feet wet with ruby and I was wondering if there are any nice vagrant boxes out there that I can use rather than manually building one myself
hahuang61 has quit [Ping timeout: 246 seconds]
<shevy> ruby-lang235 why do you not use .shuffle
<brent_> first stop, using n as your rand argument
<havenwood> CausaMortis: A recent Fedora or Arch box would have nice Ruby packages ready to go.
<ruby-lang235> isn't that what it is asking? 'n' number of times?
hahuang61 has joined #ruby
jdawgaz has quit [Ping timeout: 264 seconds]
jkahn has quit [Ping timeout: 264 seconds]
<ruby-lang235> @shevy i didnt want just the answer lol
<ruby-lang235> ty though
<shevy> there are many ways
<brent_> so look up what the argument for rand is used for
<shevy> so this is one answer
<brent_> rand(9) woudl return an int between 0-9
<brent_> not run it 9 times
Moosashi has joined #ruby
<ruby-lang235> its not easy for me to undestand the docs when it has things explaining it that i don't know ;/
bkxd has joined #ruby
<brent_> i just explained what the argument is for
<shevy> lol
yfeldblum has quit [Ping timeout: 250 seconds]
<shevy> ruby-lang235 what do you think would rand(3) give back
<CausaMortis> havenwood, thanks that could prove useful. Still curious why I am unable to find a nice base box for ruby
hahuang61 has quit [Ping timeout: 276 seconds]
doublemalt__ has quit [Ping timeout: 252 seconds]
<havenwood> CausaMortis: Either is nice base box for Ruby with the latest stable Ruby as a package.
<brent_> try things out in irb
<havenwood> CausaMortis: Looking for something additional in particular?
<brent_> in your terminal
<brent_> or repl.it
<ruby-lang235> n.rand(array) ?
Moosashi has quit [Client Quit]
doublemalt__ has joined #ruby
<smathy> Why do people guess at syntax.
<shevy> ruby-lang235 did you purposely not read what brent_ wrote
<havenwood> CausaMortis: ^ I haven't vetted this in particular but you can do somthing along those lines.
<ruby-lang235> @shevy i read it, maybe i dont understand it
<shevy> ruby-lang235 if anthing, rand() wants a number, so in your case, array.size would pass a number to rand()
rehat has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
<ruby-lang235> how do i get a random element from the array?
DylanJ has joined #ruby
<shevy> I have no idea why you use n. though, rand() on n is not the same as the main rand(); the latter is just Kernel.rand(), you can avoid typing prefaced "Kernel." because it is included by default
<ruby-lang235> idk what any of that means
<brent_> i highly recommend putting things in irb in terminal or repl.it online. help you test things to understand what its doing
<ruby-lang235> i have gitbash and irb has an error
<smathy> I highly recommend actually learning Ruby.
<ruby-lang235> @smathy im trying
<shevy> I highly recommend being genuine
<havenwood> ruby-lang235: What's the class of this literal?: 1
<ruby-lang235> @smathy if you don;t know what half the doc means what good is reading it?
<Ox0dea> ruby-lang235: Do you know how to access Array elements?
RobertBirnie has quit [Ping timeout: 248 seconds]
<havenwood> ruby-lang235: What's the class of this literal?: []
<smathy> ruby-lang235, that link is not to just docs.
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<CausaMortis> havenwood, thats great thank you :) I guess it is worth figuring vagrant out a bit more and just roll my own
<brent_> ruby-lang235 go here and try using rand in different ways https://repl.it/
ChiefAlexander has joined #ruby
<Ox0dea> ruby-lang235: Given `nums = [1,2,3,4]`, how do you get hold of the 3?
<havenwood> CausaMortis: I'd recommend ruby-install and chruby if you roll your own. :)
Moosashi has joined #ruby
<havenwood> CausaMortis: Here's an example of chruby with Archlinux: https://gist.github.com/jhass/8839655bb038e829fba1
<shevy> ruby-lang235 is no longer answering :(
bronson has quit [Remote host closed the connection]
RobertBirnie has joined #ruby
<smathy> That's something to smile at, he's surely reading the fabulous manual.
Moosashi has quit [Client Quit]
<shevy> you are an optimist!
sepp2k1 has quit [Quit: Leaving.]
pietr0 has joined #ruby
<smathy> I am.
<smathy> I wouldn't still be here in IRC otherwise.
jkahn has joined #ruby
dopie has quit [Quit: Lost terminal]
<shevy> haha
dopie has joined #ruby
Jackneill has quit [Ping timeout: 244 seconds]
axl_ has quit [Ping timeout: 248 seconds]
axl_ has joined #ruby
agent_white has joined #ruby
johnmilton has joined #ruby
<brent_> dopie, why did you ask bout CA earlier?
dtzuzu has joined #ruby
Don_John has joined #ruby
_blizzy_ has joined #ruby
ldnunes has quit [Quit: Leaving]
rodfersou has quit [Quit: leaving]
johnmilton has quit [Max SendQ exceeded]
rolha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta_ has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
rolha has joined #ruby
yfeldblum has joined #ruby
ruby-lang235 has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
johnmilton has quit [Max SendQ exceeded]
fullofcaffeine has joined #ruby
brt has quit [Quit: peace]
hahuang61 has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnmilton has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
brt has joined #ruby
floatingpoint has joined #ruby
<shevy> hmm
tenderlove has joined #ruby
TheGreatGudsby has joined #ruby
<shevy> I am digging in other people's code... Thread.list.each {|t| t.kill }
<shevy> is that common? to manually kill all threads upon a quit event?
tenderlove has quit [Remote host closed the connection]
<smathy> Nope.
<smathy> Well, sorry, it might be common.
htmldrum has joined #ruby
htmldrum_ has joined #ruby
<shevy> I don't have much experience with threads
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> what I know is that... this old ruby-gnome thread code works... my code on the other hand does not... now I dissect
tenderlove has joined #ruby
rolha has quit [Remote host closed the connection]
<shevy> hmm ... the code seems unnecessary
<apeiros> it might be common, it's not a good idea.
rolha has joined #ruby
darkf has joined #ruby
<benlieb> do folks here think of nil as "no value" or "unknown" value?
tenderlove has quit [Remote host closed the connection]
<tobiasvl> benlieb: no value
<smathy> shevy, threads are all killed when the parent process exits. That's why `.join` exists.
<benlieb> From the postgres channel: "conceptually, a NULL represents a value that isn't known; you're asking for rows where user_id is not 1508. For rows that where user_id is NULL, the value *could* be 1508, it's just not known. So those rows aren't returned."
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tobiasvl> benlieb: SQL is a bit different.
<benlieb> I was surprised that this line ignores rows where user_id is NULL AppLog.where(kind: 'max preview plays reached').where.not(user_id: 1508)
<tobiasvl> but sure, nil can mean "undefined" which is a nebulous term in computer science
<tobiasvl> benlieb: you can give https://en.wikipedia.org/wiki/Null_pointer a read
<tobiasvl> "Null pointers have different semantics than null values. A null pointer in most programming languages means "no value", while a null value in a relational database means "unknown value". This leads to important differences in practice: most programming languages will treat two null pointers as equal, but a relational database engine does not regard two null values as equal (since they represent unknown val
<tobiasvl> ues, it is unknown whether they are equal)."
choke has joined #ruby
<shevy> smathy yeah... I wondered about that too just now ... the code I removed was https://gist.github.com/shevegen/86279be1e4e70564c3a3 and it still seems to work just fine
elifoster has quit [Ping timeout: 248 seconds]
<smathy> benlieb, no, NULL can't be 1508, but NULL isn't a value, and `user_id != 1508` is really saying: "give me all records where the value of user_id is not 1508" - but because NULL is not a value then it is not returned in that set.
<benlieb> tobiasvl: how would I transform that AR query to get "what I want", which is everything where the user_id isn't specifically 1508
<tobiasvl> benlieb: no idea. what's AR?
<tobiasvl> sounds like #RubyOnRails
aupadhye has quit [Ping timeout: 268 seconds]
<shevy> benlieb to me nil is the default non-state state :)
<smathy> tobiasvl++ :)
<benlieb> yeah, this issue really spans three channels...
<benlieb> AR = ActiveRecord
<smathy> benlieb, ruby isn't one of them though :)
zeroDivisible has joined #ruby
<shevy> there lies insanity!
<tobiasvl> benlieb: doesn't really span this record, even though you tried to say that NULL and nil are the same ;)
eljimmy has quit [Read error: Connection reset by peer]
<tobiasvl> nil is, conceptually, no value. no idea what NULL is in activerecord.
x77686d has quit [Quit: x77686d]
TheGreatGudsby is now known as SpikeSpiegel
<smathy> shevy, yeah, I can't speak for the Gtk.main_quit - not having that might create a memory leak, but yeah, the Thread....exit is definitely not required.
davee_ has joined #ruby
_stu_ has joined #ruby
<benlieb> tobiasvl: it's just an ORM, but your comments have been very helpful. I'll have to chew on why SQL like to think of NULL as "unknown", I like what smathy says that NULL in SQL is more like not a value
<shevy> ok
<smathy> Not "more like", that's specifically what it means :P
<smathy> (but yes, wrong channel)
boontdustie has quit [Remote host closed the connection]
<shevy> more like will stick :D
boontdustie has joined #ruby
drewo has quit [Quit: WeeChat 1.2]
agent_white has quit [Quit: brb]
drewo has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
Moosashi has joined #ruby
babblebre has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
Moosashi has quit [Quit: Moosashi]
jenrzzz has joined #ruby
dfinninger has quit []
pawnbox has joined #ruby
drewo has quit [Quit: WeeChat 1.2]
ChiefAlexander has quit [Quit: Leaving...]
daguilaraguilar has quit [Ping timeout: 260 seconds]
drewo has joined #ruby
djbkd has quit [Remote host closed the connection]
daguilaraguilar has joined #ruby
davedev24 has quit []
djbkd has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Moosashi has joined #ruby
tenderlove has joined #ruby
dgncn has quit [Excess Flood]
tenderlove has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 276 seconds]
dgncn has joined #ruby
johnmilton has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
rbennacer has quit [Remote host closed the connection]
trinaldi has joined #ruby
chipotle_ has joined #ruby
pietr0 has quit [Quit: pietr0]
chipotle has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
bronson has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
dome22xl has joined #ruby
uglybandersnatch has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
mistermo_ has joined #ruby
Gasher has quit [Quit: Leaving]
johnmilton has quit [Quit: Namaste]
sp4rrow has joined #ruby
GodFather has joined #ruby
Moosashi has quit [Quit: Moosashi]
bry4n_ has quit [Ping timeout: 260 seconds]
eljimmy has joined #ruby
jaruga has joined #ruby
mistermo_ has quit [Ping timeout: 252 seconds]
kies has quit [Ping timeout: 260 seconds]
CausaMortis has quit [Ping timeout: 244 seconds]
dhollinger has quit [Quit: WeeChat 1.4]
djbkd has joined #ruby
pietr0 has joined #ruby
pietr0 has quit [Client Quit]
pietr0 has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
LaT0rtue has quit [Ping timeout: 244 seconds]
jkahn has quit [Ping timeout: 260 seconds]
stannard has quit [Remote host closed the connection]
pietr0 has quit [Client Quit]
pawnbox has joined #ruby
lxsameer has quit [Quit: Leaving]
growGROW has joined #ruby
drale2k has quit [Quit: ZNC - http://znc.in]
drale2k has joined #ruby
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
joonty has quit [Ping timeout: 268 seconds]
n008f4g_ has quit [Ping timeout: 252 seconds]
devbug has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
swills has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Remote host closed the connection]
darkf has quit [Read error: Connection reset by peer]
tubulife| has quit [Remote host closed the connection]
darkf has joined #ruby
dome22xl has quit [Read error: Connection reset by peer]
davee_ has quit [Quit: Leaving]
devbug has quit [Ping timeout: 250 seconds]
silentpost has joined #ruby
jkahn has joined #ruby
<shevy> oh strange
<shevy> there was a non existing method call in the thread
alem0lars__ has quit [Quit: Leaving]
<shevy> and I did not see it because of the thread not reporting the error
<shevy> using Thread.abort_on_exception = true fixed that
<shevy> but that was a strange experience...
whippythellama has quit [Quit: WeeChat 1.4]
mwlang has joined #ruby
uglybandersnatch has quit [Ping timeout: 248 seconds]
spider-mario has quit [Read error: Connection reset by peer]
spider-mario has joined #ruby
replay has quit [Ping timeout: 260 seconds]
freerobby has quit [Quit: Leaving.]
yfeldblum has quit [Ping timeout: 250 seconds]
axl_ has quit [Quit: axl_]
zenlot6 has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
sq271 has joined #ruby
zenlot has quit [Ping timeout: 264 seconds]
baweaver has quit [Remote host closed the connection]
sandstro_ has joined #ruby
wethu has joined #ruby
sandstrom has quit [Ping timeout: 260 seconds]
threh has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
hiyosi has joined #ruby
stannard_ has joined #ruby
dvinciguerra__ has joined #ruby
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hello9 has joined #ruby
xxneolithicxx has quit [Quit: Leaving.]
<hello9> mates
<hello9> any idea why the '^' as a string is being encoded as '\S\' and how I can prevent that?
dvinciguerra_ has quit [Ping timeout: 244 seconds]
<apeiros> hello9: in which context?
n008f4g_ has joined #ruby
neanderslob_ is now known as neanderslob
<hello9> trying to assign a value to a class attribute, all letters and numbers are working, but special chars get encoded
<smathy> hello9, show code.
<apeiros> then it'd be because of whatever code you have. ruby doesn't do that on its own.
<apeiros> so ^, show code
<jt__> http://pastebin.com/, is this just creating a method named '<<'? What's the deal with returning self at the end?
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dtzuzu has quit [Ping timeout: 250 seconds]
sandstro_ has quit [Quit: My computer has gone to sleep.]
<Ox0dea> jt__: Try again.
<smathy> jt__, that's the pastebin homepage.
zeroDivisible has quit [Quit: WeeChat 1.3]
<jt__> err, sorry. Here http://pastebin.com/X9nQKc7Y
<ruby[bot]> jt__: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1c80858db4c06370d556
<ruby[bot]> jt__: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
pawnbox has joined #ruby
<smathy> Heh, it's a TRAP!
solocshaw has joined #ruby
<Ox0dea> jt__: Methods return the last evaluated expression; it explicitly returns `self` so that calls to #<< can be chained if so desired.
<apeiros> jt__: yes, that's creating a method named <<
<smathy> jt__, yes, just creating a method, returning self because that's what it wants to return.
<apeiros> and ^
<smathy> Wow, hive mind.
<Ox0dea> Where?
<smathy> apeiros, and me, you're on the outs.
stannard_ has quit [Remote host closed the connection]
pikajude has quit [Quit: Quit]
<smathy> I didn't want to say anything, but it's your wanton mix of O and 0
ta_ has joined #ruby
pikajude has joined #ruby
pikajude has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
voodo has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
threh has joined #ruby
bkxd has joined #ruby
godzillaenlacasa has joined #ruby
solocshaw1 has joined #ruby
solocshaw has quit [Ping timeout: 248 seconds]
solocshaw1 is now known as solocshaw
jaruga has quit [Quit: jaruga]
<shevy> come on people! hello9 and jt__ say something
<hello9> something
<hello9> ;-D
ur5us has quit [Remote host closed the connection]
Rixius|Alt has joined #ruby
<hello9> apeiros, thanks, i kept exploring and *think* i found the issue
<Ox0dea> hello9: I'd like to know your findings; that's a very strange bug.
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hello9> its what apeiros said, in the code itself
voodo has quit [Read error: Connection reset by peer]
<Ox0dea> The bug was in the code itself?!
valetudo has quit [Ping timeout: 244 seconds]
voodo has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
RobertBirnie has joined #ruby
Azure has joined #ruby
<shevy> we will never see any code :(
mistermo_ has joined #ruby
mistermo_ has quit [Remote host closed the connection]
ur5us has joined #ruby
mistermo_ has joined #ruby
mistermocha has quit [Ping timeout: 246 seconds]
* smathy doesn't think there was ever any code
valetudo has joined #ruby
haylon_ has left #ruby ["WeeChat 1.4"]
CloCkWeRX has joined #ruby
barajasfab has joined #ruby
<smathy> Only in IRC, blogs are all true.
bronson has joined #ruby
<Ox0dea> Twitter posts as well.
jackjackdripper has quit [Quit: Leaving.]
<apeiros> youtube comments are truth
roshanavand has joined #ruby
LaT0rtue has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
ecnalyr has quit []
Regulati_ has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
jackjackdripper has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
ur5us has joined #ruby
dextertzu has quit [Read error: Connection reset by peer]
allcentury has joined #ruby
stannard has joined #ruby
wreet has joined #ruby
wreet has left #ruby [#ruby]
<smathy> :)
dextertzu has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
kies has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
uglybandersnatch has quit [Ping timeout: 244 seconds]
uglybandersnatch has joined #ruby
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
stannard has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
saneax_AFK is now known as saneax
Balzrael has quit [Remote host closed the connection]
pawnbox has joined #ruby
Suntzu has joined #ruby
hotpancakes has quit [Remote host closed the connection]
pocketprotector has quit [Ping timeout: 276 seconds]
roshanavand has quit [Quit: This computer has gone to sleep]
<shevy> haha
roshanavand has joined #ruby
davedev24 has joined #ruby
Guest38_ has quit [Read error: Connection reset by peer]
pocketprotector has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
millerti has joined #ruby
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
ur5us has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 276 seconds]
hello9 has quit [Quit: Leaving]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
ellistaa has joined #ruby
<ellistaa> i feel like this code smells … https://gist.github.com/ellismarte/07e727ebf56b57ebce5b
kam270 has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
<Ox0dea> 1 isn't prime.
<shevy> seems a bit verbose
DLSteve has joined #ruby
roshanavand has joined #ruby
<apeiros> ellistaa: I suppose `require 'prime'` is verboten?
<shevy> alert! german word!
roshanavand has quit [Client Quit]
<ellistaa> Ox0dea: oh yeah
<shevy> call the Kindergarten cops!
<ellistaa> shevy true
rolha has quit [Quit: Textual IRC Client: www.textualapp.com]
hahuang61 has quit [Ping timeout: 248 seconds]
<Ox0dea> ellistaa: I quite like this approach: https://eval.in/543676
hxegon has quit [Ping timeout: 264 seconds]
<Ox0dea> Leave off the explicit check for 3; start your counter there instead and increment by 2.
<ellistaa> looks good
AustinMatherne has quit [Quit: Lost terminal]
<ellistaa> yeah thats a good point
LaT0rtue has quit [Ping timeout: 264 seconds]
baweaver has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 268 seconds]
CloCkWeRX has joined #ruby
Ropeney has joined #ruby
blackmesa has joined #ruby
ivanskie has joined #ruby
symm- has quit [Ping timeout: 248 seconds]
baweaver has quit [Ping timeout: 250 seconds]
neanderslob has quit [Ping timeout: 248 seconds]
neanderslob_ has joined #ruby
neanderslob_ is now known as neanderslob
yfeldblum has joined #ruby
_blizzy_ has quit [Quit: Leaving]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
x77686d has joined #ruby
davedev24 has quit [Remote host closed the connection]
LaT0rtue has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
hightower2 has quit [Ping timeout: 260 seconds]
threh has quit [Ping timeout: 250 seconds]
voodo has quit [Quit: Linkinus - http://linkinus.com]
hotpancakes has joined #ruby
straying has joined #ruby
hotpanca_ has joined #ruby
hotpancakes has quit [Remote host closed the connection]
sp4rrow has joined #ruby
stannard has joined #ruby