havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
ICantCook has joined #ruby
KineticX has quit []
sankaber has joined #ruby
felixdd has joined #ruby
moei has joined #ruby
atomical has quit [Ping timeout: 240 seconds]
<Radar> rvm? /me makes the sign of the cross
volty has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
sftrabbit has quit [Quit: sftrabbit]
<volty> what do you guys use to interface with sqlite ?
<Radar> volty: ActiveRecord typically, but that's through the Rails apps. If it's not Rails then it'd be Sequel.
dcunit3d has quit [Ping timeout: 260 seconds]
kalopsian has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
dcunit3d has joined #ruby
dopie has quit [Quit: Lost terminal]
stannard has joined #ruby
dopie has joined #ruby
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
dpg_ has quit [Ping timeout: 240 seconds]
<volty> Radar: thx, i am going to install it. Can you anyway suggest something very very simple? I am looking for a proof of concept on scanning tagged files, so I prefer just a db with one table, for now)
nerfando has quit [Max SendQ exceeded]
<Radar> volty: something very very simple for interacting with a DB? Sequel is simple.
nerfando has joined #ruby
<volty> ah, ok, I saw it's powerful, and was afraid would have to learn a lot, thx :)
jackjackdripper has quit [Quit: Leaving.]
guacamole has joined #ruby
stannard has quit [Ping timeout: 246 seconds]
ico has joined #ruby
s00pcan has quit [Remote host closed the connection]
nerfando has quit [Client Quit]
s00pcan has joined #ruby
ellistaa has quit [Quit: ellistaa]
jgt1 has joined #ruby
finisherr has quit [Quit: finisherr]
jgt has quit [Ping timeout: 265 seconds]
vishwa has left #ruby [#ruby]
antgel has quit [Ping timeout: 240 seconds]
<Radar> na it's syntax is fairly easy
chipotle has quit [Quit: cheerio]
hannelita has joined #ruby
gigetoo has quit [Ping timeout: 250 seconds]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Domaldel has joined #ruby
solocshaw has joined #ruby
FooMunki has left #ruby [#ruby]
gigetoo has joined #ruby
guacamole has quit [Ping timeout: 246 seconds]
guacamole has joined #ruby
chipotle has joined #ruby
dede has quit [Quit: Connection closed for inactivity]
lannonbr has quit [Read error: Connection reset by peer]
exceion_ has quit [Quit: leaving]
ph1nary has quit [Ping timeout: 276 seconds]
daivyk has quit [Ping timeout: 264 seconds]
DLSteve has joined #ruby
karapetyan has quit [Remote host closed the connection]
exceion has joined #ruby
Limix has quit [Quit: Limix]
psy_ has quit [Ping timeout: 265 seconds]
Darmani has joined #ruby
<Darmani> Hey kids ^^
guacamol_ has joined #ruby
axsuul has joined #ruby
<Radar> yeah I agree that Darma... OH HEY
defendguin has joined #ruby
<Darmani> Wha-? Lol
<Darmani> you agree that he is handsome, and charming and you wish you were just like him?
<Darmani> That's what you were going to say wasn't it?
dopie has quit [Quit: Lost terminal]
guacamole has quit [Ping timeout: 265 seconds]
dopie has joined #ruby
jbrhbr1 has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jbrhbr has quit [Ping timeout: 272 seconds]
rrichardsr3 has quit [Quit: He who dares .... wins.]
sankaber has joined #ruby
guacamole has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
d0nn1e has quit [Ping timeout: 255 seconds]
sankaber has quit [Client Quit]
guacamol_ has quit [Ping timeout: 255 seconds]
d0nn1e has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 264 seconds]
crdpink2 has quit [Quit: q term]
rkazak has joined #ruby
benlieb has quit [Quit: benlieb]
<shevy> he loves you
<jackcom> lol
antgel has joined #ruby
cbyrda has joined #ruby
haraigo has joined #ruby
atomical has joined #ruby
crdpink has joined #ruby
zambini has joined #ruby
Limix has joined #ruby
marr has quit [Ping timeout: 255 seconds]
bronson has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 250 seconds]
jbrhbr1 is now known as jbrhbr
antgel has quit [Ping timeout: 240 seconds]
haraigoshi has joined #ruby
atomical_ has quit [Ping timeout: 272 seconds]
<Darmani> @shevy I love him
<Darmani> nothing could keep us apart
<Ox0dea> Darmani: Nothing could bring you together.
<Ox0dea> Nothing ever really touches: https://www.youtube.com/watch?v=yE8rkG9Dw4s
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
haraigo has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
<Darmani> @Ox0dea - Lol that guy has never been laid.
<Darmani> Like ever.
<Ox0dea> I have proof to the contrary.
kalopsian has joined #ruby
<Darmani> Of course you do. Do you watch through his window with your binoculars?
<shevy> nerd video!!!
<Ox0dea> It's 2016.
<Ox0dea> s/binoculars/drone/
solocshaw has quit [Ping timeout: 265 seconds]
<Darmani> creep
<shevy> stalker!
<shevy> Darmani you are right down at my level :)
<Darmani> @shevy - He asked me for my number the other day
<Darmani> fuckin creep
<Darmani> lol
<Ox0dea> He gave it to me.
zambini has left #ruby [#ruby]
<Darmani> LOL
zambini has joined #ruby
<shevy> do not trust people on the internets!
<Darmani> that's too funny..
<Darmani> All hail Ox0dea, the king of witty banter.
harai has joined #ruby
bronson has joined #ruby
<Darmani> or queen* I should say.
bronson has quit [Remote host closed the connection]
<Ox0dea> > mfw I haven't yet claimed my prize for fluffiest female beard
haraigoshi has quit [Ping timeout: 260 seconds]
Guest11 has joined #ruby
Guest11_ has joined #ruby
bronson has joined #ruby
<binaryplease> Hi what library can I use to edit headers in emails saved as files (maildir, offlineimap)? I need to add a label to 'X-Keywords'
Insti has joined #ruby
Guest11_ has quit [Max SendQ exceeded]
Guest11 has quit [Max SendQ exceeded]
<shevy> binaryplease I am not sure but I think the "mail" gem should in principle allow you to re-edit these components... I am not sure if it works offline but you can probably load up a local email too, then modify it before re-saving it https://rubygems.org/gems/mail/
zast has joined #ruby
dstarh has joined #ruby
dcunit3d has joined #ruby
KnownSyntax has quit [Ping timeout: 255 seconds]
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
KnownSyntax has joined #ruby
Snowy has quit []
defendguin has quit [Quit: Leaving.]
<volty> i find sequel fantastic
<volty> a breeze
<Ox0dea> It's a great library.
symm- has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
huluhuluhulu has joined #ruby
fourq is now known as fourq|away
fourq|away is now known as fourq
ph1nary has joined #ruby
<volty> let's say I have BASE_DIR = '/home/volty/audio/rsc', is there a lib to strip it from a filename, or i have to subst it ?
jam_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
Limix has quit [Quit: Limix]
mary5030 has joined #ruby
ReK2 has quit [Quit: Konversation terminated!]
binaryplease1 has joined #ruby
astrobun_ has joined #ruby
bricker has quit [Ping timeout: 246 seconds]
<volty> nm, subst-ed it.
mchu has joined #ruby
ReK2 has joined #ruby
<binaryplease1> shevy: yes I can add headers, but I can't figure out how to write the file?
binaryplease has quit [Ping timeout: 250 seconds]
jam_ has quit [Ping timeout: 265 seconds]
spstarr has joined #ruby
<spstarr> Does File.basename work for directories?
tvw has quit [Remote host closed the connection]
<spstarr> if /foo/bar/baz/woot return 'woot' ?
<volty> yes, it operates on the string
<spstarr> thanks :)
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregf has quit [Quit: WeeChat 1.3]
tvw has joined #ruby
guacamol_ has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
mchu has quit [Quit: mchu]
guacamole has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
mistermocha has joined #ruby
ico has quit [Remote host closed the connection]
hxegon has quit [Quit: BRB]
hayden_ has quit [Quit: Connection closed for inactivity]
kies^ has quit [Ping timeout: 260 seconds]
astrofog has quit [Quit: Quite]
guacamole has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
Oog has joined #ruby
scottschecter has quit [Quit: Leaving]
mistermocha has quit [Remote host closed the connection]
astrobun_ has quit [Remote host closed the connection]
<Oog> why is the match with '(123) 456-7890'.scan(/(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}/) different than '(123) 456-7890'.match(/(\([0-9]{3}\) |[0-9]{3}-)[0-9]{3}-[0-9]{4}/)
karapetyan has quit [Ping timeout: 260 seconds]
<Oog> the first gives me "(123) " but the second gives me the whole number which is what i want... but as a scanner
tvw has joined #ruby
dorei has quit []
guacamol_ has quit [Ping timeout: 276 seconds]
<apeiros> Oog: did you read the docs for the two?
<Oog> yes
<apeiros> do you know what a capturing group is?
griffindy has joined #ruby
<Oog> yes the ()
<apeiros> "If the pattern contains groups, each individual result is itself an array containing one entry per group."
<apeiros> that's part of the docs for String#scan. your regex has a capturing group (or "group" as it is called in the docs) which matches the "(123) ". and hence that's what you get.
mistermocha has joined #ruby
<apeiros> i.e., it matches the full string too, but scan won't return the full match.
huluhuluhulu_ has joined #ruby
jam_ has joined #ruby
jam_ has quit [Read error: Connection reset by peer]
skade has joined #ruby
<spstarr> ok im still stuck on something
jam_ has joined #ruby
<spstarr> Dir.glob("/tmp/*").each { |path| File.basename(path) }
<spstarr> how do get it ti return it so it shows the path stripped?
huluhuluhulu has quit [Quit: Page closed]
huluhuluhulu_ is now known as huluhuluhulu
<spstarr> puts File.basename(path) shows it stripped
<apeiros> that's three "it" with each probably referring to something else… nice :-p
<spstarr> lol
cbyrda has quit [Quit: Gone]
<apeiros> I'll venture a guess: you want .map instead of .each
cbyrda has joined #ruby
<spstarr> is it a map though? but an array?
<apeiros> map is a method, not a datastructure.
<apeiros> you map the array, which returns an array.
<spstarr> bingo
<Oog> apeiros interesting... so with scan i cant get the full matches?
<apeiros> you can. read the docs.
<apeiros> it's there. including examples.
<volty> my advice is to forget about scan except for very simple parsing - that is going to remain simple
aaeron has joined #ruby
<volty> s/parsing/matching/
<apeiros> scan is great
<apeiros> but it helps to understand why there's scan and match and the difference between the two.
<volty> yap, just for certain matches
<apeiros> same as .match
dlitvak has joined #ruby
mistermocha has quit [Remote host closed the connection]
cbyrda has quit [Quit: Gone]
<apeiros> I almost only ever use .match if I want to chain .captures on it.
ss_much has joined #ruby
<volty> as long as you do not groups & subgroups
<volty> + have
cbyrda has joined #ruby
<apeiros> assuming subgroups = nested capturing groups - those are equivalently problematic in all matching methods in ruby (and honestly a bit of a sad story)
gregf has joined #ruby
B1n4r10 has joined #ruby
<apeiros> oh, actually, revoke that. quantified capturing groups are what I thought of.
<apeiros> nested capturing groups are fine.
<volty> scan is very nice when what you have to match is straightforward, i remember the nightmares when parens appear, you can easily get lost & tired. these are for long-time experts, imho
drocsid has quit [Ping timeout: 256 seconds]
<apeiros> uh, ok
<volty> when i am not in top form, and something not quite simple appears, i go with match, and later try the same with scan --- just for the beauty :)
<apeiros> you may want to use either composed regexen then or //x
<apeiros> so you don't get lost in your regex…
bkxd has joined #ruby
myntcake has joined #ruby
<volty> yes, that's a good advice :)
flappynerd has joined #ruby
<apeiros> you… can't do the same with match as you do with scan
<apeiros> if what you do can be done with match you probably shouldn't change it to scan.
dlitvak has quit [Ping timeout: 264 seconds]
<volty> yes, but you get the whole picture, through iteration (of trial & pass) - on more complex stuff, of course
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> yes, but it's like a challenge :)
rkazak has quit [Quit: Sleep.....ing....]
<volty> or play
binaryplease1 has quit [Ping timeout: 272 seconds]
<jbrhbr> volty: the /x suggestion is good if you find yourself confused, or you could build them up part by part, or you could use more string methods so your regex aren't as complicated
<apeiros> for playing around, there's pry
yfeldblum has quit [Ping timeout: 250 seconds]
<volty> i play by hand
<jbrhbr> and http://rubular.com/
jgt1 has quit [Ping timeout: 256 seconds]
<apeiros> and debuggex.com, and various others
<volty> ah, i have it implemented in qtruby (like rubular), though have to check it
Oog has quit []
bkxd has quit [Ping timeout: 246 seconds]
huluhuluhulu has left #ruby [#ruby]
guacamol_ has joined #ruby
guacamole has quit [Ping timeout: 260 seconds]
nerium has left #ruby [#ruby]
<volty> i see rubular got better, real time . i had the mine offer a choice of match | scan | split
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
sankaber has joined #ruby
gbgdev has quit [Remote host closed the connection]
jud has joined #ruby
rkazak has joined #ruby
guacamol_ has quit [Ping timeout: 272 seconds]
asmodlol has quit [Ping timeout: 265 seconds]
colegatron has quit [Ping timeout: 272 seconds]
guacamole has joined #ruby
finisherr has joined #ruby
asmodlol has joined #ruby
nb_bez___ has quit [Quit: Connection closed for inactivity]
CloCkWeRX has quit [Ping timeout: 255 seconds]
LMity has joined #ruby
CloCkWeRX has joined #ruby
speakingcode has quit [Ping timeout: 245 seconds]
bronson has quit [Remote host closed the connection]
speakingcode has joined #ruby
pdoherty has joined #ruby
Guest27082 has joined #ruby
bricker has joined #ruby
djbkd_ has joined #ruby
Puffball_ has quit [Quit: No Ping reply in 180 seconds.]
roshanavand has joined #ruby
Puffball has joined #ruby
ebbflowgo has joined #ruby
northfurr has quit [Quit: northfurr]
skade has quit [Quit: Computer has gone to sleep.]
crankharder has quit [Ping timeout: 260 seconds]
hannelita has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
crankharder has joined #ruby
rkazak has joined #ruby
dextertzu has joined #ruby
Guest27082 has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 240 seconds]
zambini has quit [Quit: Leaving.]
colegatron has joined #ruby
gizmore has joined #ruby
volty has quit [Quit: Konversation terminated!]
Rodya_ has joined #ruby
gizmore|2 has joined #ruby
gizless has quit [Ping timeout: 255 seconds]
mary5030_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
gizmore has quit [Ping timeout: 265 seconds]
kaykaykay has joined #ruby
kaykaykay was kicked from #ruby by ChanServ [Banned: goodbye]
TomPeed has joined #ruby
edwinvdgraaf has joined #ruby
axsuul has quit [Ping timeout: 256 seconds]
lemur has joined #ruby
Bloomer has joined #ruby
karapetyan has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
finisherr has quit [Quit: finisherr]
hannelita has joined #ruby
Domaldel has quit [Quit: Leaving]
Limix has joined #ruby
rahult has joined #ruby
lemur has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DLSteve has joined #ruby
shinnya has quit [Ping timeout: 246 seconds]
aaeron has quit [Quit: aaeron]
hahuang65 has quit [Quit: WeeChat 1.4]
karapetyan has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby
Jardayn has quit [Quit: Leaving]
hahuang65 has quit [Client Quit]
hannelita has quit [Ping timeout: 255 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
aaeron has joined #ruby
bricker has quit [Ping timeout: 264 seconds]
tvw has quit [Read error: Connection reset by peer]
gbgdev has joined #ruby
dlitvak has joined #ruby
tvw has joined #ruby
gbgdev has quit [Ping timeout: 264 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
northfurr has quit [Client Quit]
AnoHito_ has joined #ruby
D9 has joined #ruby
janebootydoe has quit [Ping timeout: 260 seconds]
_djbkd has joined #ruby
resin_ has joined #ruby
PaulCape_ has joined #ruby
smactive_ has joined #ruby
D9 has quit [Max SendQ exceeded]
jbrhbr has quit [Quit: Leaving.]
RazorX has joined #ruby
mayamai has joined #ruby
reaVer has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
kadoppe has quit [Ping timeout: 246 seconds]
TheBrayn has quit [Ping timeout: 246 seconds]
iamayam has quit [Ping timeout: 246 seconds]
artX000 has quit [Ping timeout: 246 seconds]
nug has quit [Ping timeout: 246 seconds]
rmrrn has quit [Ping timeout: 246 seconds]
hypnosb has quit [Ping timeout: 246 seconds]
smactive has quit [Read error: Connection reset by peer]
_mh_ has quit [Read error: Connection reset by peer]
Raboo has quit [Ping timeout: 246 seconds]
pragmatism has quit [Ping timeout: 246 seconds]
mame2 has quit [Ping timeout: 246 seconds]
resin has quit [Read error: Connection reset by peer]
RazorX- has quit [Read error: Connection reset by peer]
tw1sted has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 246 seconds]
Dimik has quit [Ping timeout: 246 seconds]
sdothum has quit [Ping timeout: 246 seconds]
shaman42 has quit [Ping timeout: 246 seconds]
reaVer_ has quit [Ping timeout: 246 seconds]
Veejay has quit [Ping timeout: 246 seconds]
_mh_ has joined #ruby
mame2 has joined #ruby
cfloare has quit [Ping timeout: 246 seconds]
abra0 has quit [Write error: Connection reset by peer]
inkky has quit [Read error: Connection reset by peer]
tockitj has quit [Ping timeout: 246 seconds]
rns has quit [Ping timeout: 246 seconds]
AnoHito has quit [Ping timeout: 246 seconds]
awk has quit [Ping timeout: 246 seconds]
D9 has joined #ruby
KillerFox has quit [Ping timeout: 246 seconds]
Raboo_ has joined #ruby
D9 is now known as 5EXAAP7S4
_mh_ has quit [Changing host]
_mh_ has joined #ruby
5EXAAP7S4 has quit [Max SendQ exceeded]
Raboo_ is now known as Raboo
KillerFox has joined #ruby
Veejay has joined #ruby
awk has joined #ruby
lysw123 has joined #ruby
PaulCapestany has quit [Ping timeout: 246 seconds]
mc_fail_ has quit [Ping timeout: 246 seconds]
abra0 has joined #ruby
rns has joined #ruby
mc_fail has joined #ruby
cfloare has joined #ruby
shaman42 has joined #ruby
atomical_ has joined #ruby
tw1sted has joined #ruby
awk is now known as Guest93461
atomical has quit [Ping timeout: 276 seconds]
Dimik has joined #ruby
pragmatism has joined #ruby
TheBrayn has joined #ruby
hypnosb has joined #ruby
gnarld_ has joined #ruby
kadoppe has joined #ruby
yfeldblum has joined #ruby
rmrrn has joined #ruby
rmrrn has quit [Changing host]
rmrrn has joined #ruby
inkky has joined #ruby
sdothum has joined #ruby
tockitj has joined #ruby
tvw has quit []
bricker has joined #ruby
robbyoconnor has quit [Ping timeout: 265 seconds]
gizmore has joined #ruby
mostlybadfly has joined #ruby
gizmore|2 has quit [Ping timeout: 256 seconds]
rakm has joined #ruby
Rodya_ has quit [Remote host closed the connection]
LMity has quit [Ping timeout: 272 seconds]
arescorpio has joined #ruby
pawnbox has joined #ruby
gizless has joined #ruby
gizmore|2 has joined #ruby
grill has joined #ruby
ljames has quit []
gizmore has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 255 seconds]
gizless has quit [Ping timeout: 240 seconds]
bkxd has joined #ruby
<Ebok> Alright there are two general commands I'm looking for. the first you call on an object to get a list of the instance variables, and the second is the method you call on an object to get a list fo the methods contains within.
<Ebok> Imma RubyDoc for this, but if someone replies here before I find them, sweet
Haris has quit [Ping timeout: 276 seconds]
bronson has joined #ruby
tomchapin has joined #ruby
harai has quit [Ping timeout: 276 seconds]
<havenwood> Ebok: #instance_variables and #methods
<havenwood> Ebok: This isn't homework, is it? :P
<Ebok> thankyou. And lol
<Ebok> Nope
<Ebok> this is a Ox0dea puzzle, that I needed some clarification on some internals for
<Ebok> ( I wish it was homework, that would be fun class )
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rakm has joined #ruby
<havenwood> >> methods.grep /instance/
<ruby[bot]> havenwood: # => [:instance_of?, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :remove ...check link for more (https://eval.in/501868)
bkxd has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
<havenwood> Ebok: you can grep for methods too, that's fast ^
<cscheib> Ox0dea has puzzles? where would those be at?
<cscheib> currently going through the book "Exercises for Programmers."
<Ebok> they're probably not puzzels to the initiated. :P
ebbflowgo has quit [Read error: Connection reset by peer]
<Ebok> Also, thankyou havenwood. I didnt even know what grep was until you used that
<Ebok> xD
ebbflowgo has joined #ruby
ebbflowgo has quit [Client Quit]
bronson has quit [Ping timeout: 256 seconds]
<cscheib> wut, didn't know about grep?
<Ebok> Nope.
<cscheib> need to look at learning the common CLI utils
<Ebok> I've got almost 65 days of programming knowhow.
<cscheib> super useful
<Ebok> I'll look into that.
<Ebok> Ah. Thats where that's from. Cool
gizmore|2 has quit [Ping timeout: 272 seconds]
<Ebok> I've seen grep used before, though I think it was when I was trying to debug errors I was getting when installing ruby into an ancient macbook.
hahuang61 has joined #ruby
<Ebok> Been too long.
jquerysucks has joined #ruby
jquerysucks was kicked from #ruby by ChanServ [Banned: goodbye]
atomical has joined #ruby
gizmore has quit [Ping timeout: 260 seconds]
<cscheib> think a couple of the codeschool/codeacademy/etc... type sites have some free CLI interactive tutorials
hahuang65 has quit [Ping timeout: 260 seconds]
<Ebok> I'll set aside some time to do that this weekend, thanks for the tip.
<cscheib> one of the few ways I can be helpful currently :P
<Ebok> ^_^
<cscheib> I come from an ops background, with multiple attempts to learn a number of languages, never got much past the superficial stuff in anything but perl
aspire has quit [Quit: Leaving]
<cscheib> and I've purged perl, mostly, heh
atomical_ has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
<Ebok> I had ten minutes of Java some nine years ago.
<Ebok> And about 30 minutes of combined learning for css and html
<Ebok> <_<; Otherwise, Its all about Ruby
<Ebok> Which is coming along, though I'm still slipping with some foundational logic.
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krz has joined #ruby
atomical_ has joined #ruby
atomical has quit [Ping timeout: 250 seconds]
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24 has quit []
Rodya_ has joined #ruby
hannelita has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Read error: Connection reset by peer]
welovfree has joined #ruby
welovfree has left #ruby ["Leaving"]
hannelita has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
dangeranger has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
cpup has joined #ruby
grill has joined #ruby
B1n4r10 has quit [Ping timeout: 260 seconds]
BTRE has quit [Quit: Leaving]
baweaver has quit [Ping timeout: 250 seconds]
harly has joined #ruby
artX000 has joined #ruby
grill has quit [Ping timeout: 240 seconds]
_djbkd has quit [Quit: My people need me...]
gnarld_ is now known as nug
dfinninger has joined #ruby
drocsid has joined #ruby
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
RobertBirnie has joined #ruby
atomical has joined #ruby
ur5us has quit [Remote host closed the connection]
noodle has quit [Quit: /quit]
hannelita has joined #ruby
drocsid has quit [Ping timeout: 245 seconds]
noodle has joined #ruby
atomical_ has quit [Ping timeout: 250 seconds]
iateadonut has joined #ruby
sdwrage has joined #ruby
PaulCape_ has quit [Quit: .]
PaulCapestany has joined #ruby
lysw123 has quit [Max SendQ exceeded]
<zacts> hi
<Radar> hi
<zacts> where may I find doc for the core ruby language itself, not of APIs, but things like Pragmas?
<zacts> (If this question even makes sense, I'm a newbie)
hannelita has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
<cscheib> zacts: ruby-lang.org ?
aaeron has quit [Quit: aaeron]
kalopsian has quit [Ping timeout: 256 seconds]
usershell has joined #ruby
vdamewood has joined #ruby
arup_r has joined #ruby
bluOxigen has joined #ruby
usershell has quit [Remote host closed the connection]
braincrash has joined #ruby
usershell has joined #ruby
crdpink has quit [Excess Flood]
crdpink has joined #ruby
stannard has joined #ruby
<cscheib> zacts: or maybe http://ruby-doc.org/core-2.3.0/
lacuna has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 250 seconds]
nfk|laptop has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 276 seconds]
stannard has quit [Ping timeout: 240 seconds]
myntcake has quit [Quit: Leaving]
yqt has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
B1n4r10 has joined #ruby
flappynerd has left #ruby [#ruby]
ziyadb has quit [Quit: Connection closed for inactivity]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DLSteve has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has quit [Quit: Leaving.]
terminalrecluse has joined #ruby
M-Technic has quit [Ping timeout: 260 seconds]
M-Technic has joined #ruby
lacuna has joined #ruby
kalopsian has joined #ruby
northfurr has joined #ruby
cornerma1 has joined #ruby
pawnbox has joined #ruby
ICantCook has quit [Quit: bye]
crdpink has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
cornerman has quit [Ping timeout: 255 seconds]
crdpink has joined #ruby
cornerma1 is now known as cornerman
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical_ has joined #ruby
UtkarshRay has joined #ruby
Limix has quit [Quit: Limix]
kp666 has joined #ruby
atomical has quit [Ping timeout: 260 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
ICantCook has joined #ruby
drocsid has joined #ruby
drocsid has quit [Client Quit]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
northfurr has quit [Quit: northfurr]
ror15 has joined #ruby
bluOxigen has quit []
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
northfurr has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
n00bdev has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
dangeranger has quit [Quit: Textual IRC Client: www.textualapp.com]
pawnbox has joined #ruby
B1n4r10 has quit [Ping timeout: 264 seconds]
kp666 has quit [Max SendQ exceeded]
baweaver has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest6520
northfurr has quit [Quit: northfurr]
ICantCook has quit [Quit: bye]
calderonroberto has joined #ruby
<zacts> cscheib: let me try ruby-doc.org/core-2.3.0
<zacts> cscheib: I guess there is this pragma just introduced in 2.3.0
<zacts> and I couldn't find good doc on it, or pragmas like it, in general
mahk has quit [Ping timeout: 240 seconds]
calderonroberto has quit [Client Quit]
aaeron has joined #ruby
Yzguy has joined #ruby
gix has quit [Ping timeout: 272 seconds]
<zacts> the frozen string literal pragma
<Ox0dea> zacts: "Pragma" isn't being used canonically within the source tree.
tmtwd has joined #ruby
<Ox0dea> They're just called magic comments there.
<zacts> ah ok
<Ox0dea> There's the massive list of supported "pragmas". :P
dlitvak has joined #ruby
<zacts> cool
gix has joined #ruby
mahk has joined #ruby
hannelita has joined #ruby
akem has joined #ruby
lacuna has quit [Remote host closed the connection]
kt2 has joined #ruby
northfurr has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
krz has quit [Ping timeout: 260 seconds]
hannelita has quit [Ping timeout: 240 seconds]
mahk has quit [Ping timeout: 260 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
aaeron has quit [Quit: aaeron]
bkxd has joined #ruby
bronson has joined #ruby
djbkd has joined #ruby
kalopsian has quit [Ping timeout: 255 seconds]
Rodya_ has joined #ruby
kalopsian has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
Yzguy has quit [Quit: Cya]
bkxd has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Ping timeout: 240 seconds]
Guest58 has joined #ruby
Guest58 has quit [Client Quit]
Guest58 has joined #ruby
Guest58 has quit [Client Quit]
akkad has quit [Excess Flood]
n00bdev has quit [Remote host closed the connection]
pdoherty has quit [Ping timeout: 264 seconds]
arescorpio has quit [Quit: Leaving.]
karapetyan has joined #ruby
akkad has joined #ruby
chouhoulis has quit [Remote host closed the connection]
darkf_ has joined #ruby
usershell has quit [Read error: Connection reset by peer]
darkf_ is now known as darkf
karapetyan has quit [Ping timeout: 260 seconds]
jam_ has quit [Remote host closed the connection]
usershell has joined #ruby
jhack has joined #ruby
jhack is now known as blah
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodolfowtf has quit [Remote host closed the connection]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has quit [Remote host closed the connection]
shadoi has quit [Quit: Leaving.]
ascarter_ has joined #ruby
Guest58 has joined #ruby
Guest58 has quit [Client Quit]
asmodlol has quit [Ping timeout: 265 seconds]
Rinalds has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
Guest93461 is now known as awk
zapata has quit [Quit: WeeChat 1.3]
Azure has quit [Ping timeout: 276 seconds]
Azure|dc has joined #ruby
haasn` is now known as haasn
zast has quit [Remote host closed the connection]
gambl0re has quit [Remote host closed the connection]
gambl0re has joined #ruby
northfurr has quit [Quit: northfurr]
blah is now known as jhac
jhac is now known as jhack
jhack has quit [Quit: jhack]
Nanuq has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
aganov has joined #ruby
Waheedi has joined #ruby
<Waheedi> whats that marshal data too short?
<Waheedi> never seen it in my life :)
aspire has joined #ruby
lxsameer has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nixawk has joined #ruby
<Waheedi> that happens when i do gem install builder -v 3.2.2
arup_r has joined #ruby
<nixawk> Python - paramiko can help us to get prompt_list in auth_interactive, and how to finish it with Ruby ?
<Ox0dea> Waheedi: Are you using an older version of Ruby?
hannelita has joined #ruby
<Waheedi> yes, I think i got over the error now but was wondering what was it
<Ox0dea> An ABI incompatibility, likely as not.
<nixawk> ruby 2.1.7p400
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Limix has joined #ruby
<nixawk> No prompt appers, only Net::SSH::AuthenticationFailed.
Haris has joined #ruby
Haris has quit [Changing host]
Haris has joined #ruby
dionysus69 has joined #ruby
dfinninger has quit [Remote host closed the connection]
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
hannelita has quit [Ping timeout: 264 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
northfurr has joined #ruby
<nixawk> If the username and/or password given to start are incorrect, authentication will fail. If authentication fails, aNet::SSH::AuthenticationFailed exception will be raised.
kalopsian has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
aspire has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
<nixawk> Is there a way to get server prompt string when authentication fails ?
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
pawnbox has joined #ruby
kalopsian has joined #ruby
dfinninger has quit [Remote host closed the connection]
Haris has left #ruby [#ruby]
sarkis has quit [Ping timeout: 276 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #ruby
Rodya_ has joined #ruby
asmodlol has quit [Ping timeout: 265 seconds]
lacuna has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
sarkis has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
aganov has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
n00bdev has joined #ruby
ur5us has joined #ruby
Lightsword has joined #ruby
<Lightsword> I’m trying to post a file to an embedded system that requires auth digest login, I have this so far but I get unauthorized for the post part(get’s seem to be ok) http://0bin.net/paste/r2UseeOWOjAU+0-g#aGDg5s8h3zZC1jQ+CJ9OcAtNmmDPnlcPfBV-M2J7Vp3 any idea what I’m doing wrong?
sarkis has joined #ruby
sigurding has joined #ruby
cbyrda has quit [Quit: Gone]
n00bdev has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 272 seconds]
m1dnight_ has quit [Quit: WeeChat 1.4-dev]
m1dnight_ has joined #ruby
sarkis has quit [Ping timeout: 256 seconds]
elaptics is now known as elaptics`away
tmtwd has quit [Ping timeout: 245 seconds]
nixawk has quit [Read error: Connection reset by peer]
nixawk has joined #ruby
usershell has quit [Read error: Connection reset by peer]
B1n4r10 has joined #ruby
mclong has quit [Ping timeout: 250 seconds]
usershell has joined #ruby
sarkis has joined #ruby
B1n4r10 has quit [Ping timeout: 265 seconds]
sarkis has quit [Ping timeout: 256 seconds]
Limix has quit [Quit: Limix]
northfurr has quit [Quit: northfurr]
clauswitt has joined #ruby
asmodlol has quit [Ping timeout: 272 seconds]
rkazak has quit [Quit: Sleep.....ing....]
mclong has joined #ruby
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djellemah_ is now known as djellemah
amclain has quit [Quit: Leaving]
asmodlol has joined #ruby
Guest58 has joined #ruby
Guest58 has quit [Client Quit]
pandaant has joined #ruby
hxegon has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
ur5us has joined #ruby
Xeago has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
nunchuck has quit [Ping timeout: 255 seconds]
nunchuck has joined #ruby
hxegon has quit [Ping timeout: 255 seconds]
kerunaru has joined #ruby
mclong has quit [Ping timeout: 250 seconds]
Spleeze has quit [Ping timeout: 260 seconds]
hxegon has joined #ruby
RobertBirnie has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
hannelita has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
jordanm has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
hxegon has quit [Ping timeout: 272 seconds]
colegatron has quit [Quit: Leaving]
dcbane has joined #ruby
dcbane has left #ruby [#ruby]
smactive_ has quit [Remote host closed the connection]
Chewy11212 has joined #ruby
<Chewy11212> Hello
hannelita has quit [Ping timeout: 264 seconds]
howdoi has joined #ruby
<Chewy11212> Can anyone help me with a simple problemo?
bkxd has joined #ruby
yardenbar has joined #ruby
<havenwood> Chewy11212: Say more about the problem?
<Chewy11212> Sure
<Chewy11212> First off here is the script I wrote so you can refernce
jam_ has joined #ruby
asmodlol has quit [Ping timeout: 240 seconds]
<Chewy11212> I am trying to create a check for a log in system
bronson has joined #ruby
<Chewy11212> However, when you get the password incorrect (lets say 5 times) it prints 5 times the def you go to when you do get it correct
asmodlol has joined #ruby
<Chewy11212> If you do not understand still, take the code I posted and run it in a ruby inteprerter and get the password wrong at least once and then get is correct, you will see
<Radar> Your variables are named quite strangely.
<Radar> While they have meaning for you, they don't for me.
<Chewy11212> What?
<Chewy11212> Why is it strange?
<Radar> @b2
Rodya_ has joined #ruby
<Chewy11212> Oh
<Radar> @b10
<Radar> @b99
<Radar> x,y
<Radar> etc
dpg_ has joined #ruby
<Chewy11212> the x,y was just a simple paramater
<Radar> Give them proper names and I can take a look. My brain is not good at this kinda thing 9 hours into my work day
<havenwood> Chewy11212: What are x and y?
<Chewy11212> in the accounts.each do |x,y|
<havenwood> Chewy11212: yup, in English what do you call those two things
<Radar> Yes, but what do they represent?
<shevy> "eks" and "why"!
bkxd has quit [Ping timeout: 245 seconds]
<Chewy11212> the parameters?
scepticulous has joined #ruby
<Chewy11212> Well that is what they are
n00bdev has joined #ruby
<havenwood> Chewy11212: The values, they are ___.
<Chewy11212> They repersent the hash key and value
<Chewy11212> key = x while value = y
<Chewy11212> I don't get where you are going with this...
bronson has quit [Ping timeout: 260 seconds]
<Radar> Chewy11212: Your variable names offend me on a deep level and I would prefer it if you would change them before asking for help here.
<Radar> Chewy11212: Is that clearer?
<havenwood> Chewy11212: Just that if you use descriptive English for your variables it'll be better.
<Chewy11212> Ohhhh
<Chewy11212> Lol, k
<Chewy11212> gotcha, let me re write it
<shevy> Chewy11212 it takes less brain processing power if you use no-think variables
<Chewy11212> Yep
<Radar> Thank you.
<shevy> you could also call the variables cats and dogs!
<eam> we believe in no-think lebowski
<Radar> I like naming my variables after greek gods or mountains
<shevy> haha
<Radar> sometimes a mix of the two
<Radar> zeus_kilamanjaro
rahult_ has joined #ruby
<St1gma> hey guys question. Suppose I have an object instance, one of the methods takes a couple of parameters which I want to have "checked". I created another method to "sanitize" the params and I'm using .map!. All good there, the problem is that the original method that calls sanize does not see the modified object.
rahult has quit [Ping timeout: 272 seconds]
<Radar> You know that variable holds a lot of data because zeus is a big deal in Greek Mythology.
<eam> Radar: ah, a hybrid compound word
Rodya_ has quit [Ping timeout: 264 seconds]
<eam> like television
<Radar> ?fake St1gma
<ruby[bot]> St1gma: Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<eam> roots in multiple languages
<Radar> eam: indeed
<eam> like using only $variables in ruby so your code is legal perl as well
<Radar> hahahahaha
sandstrom has joined #ruby
<Radar> installing nokogiri over a phone connection. wish me luck
sdwrage has joined #ruby
<Ox0dea> There's a story there.
<eam> hello? yes? Yes I'd like to install a gem
hxegon has joined #ruby
<shevy> may the XML be with you
klingeldraht has quit [Ping timeout: 250 seconds]
<Radar> "Operator, gem install nokogiri"
<pontiki> can you parse me now?
rahult_ has quit [Client Quit]
<Radar> Operator: "0111001100"
<pontiki> (probably only recognisable by NA users)
krz has joined #ruby
TomyLobo has quit [Ping timeout: 256 seconds]
<Chewy11212> Alrighty
<Chewy11212> Updated verison
<Chewy11212> It begins with the method 'login1'
<Chewy11212> not the method 'b99'
<Radar> Thank you.
<Radar> When will this ever be used?
<Chewy11212> That is a preventive mesure
<Chewy11212> Incase the program breaks
<Chewy11212> Wait
<Chewy11212> Nvm, I forgot to take that out
hxegon has quit [Ping timeout: 250 seconds]
<shevy> looks like a copy paste of the line before
<shevy> just not inside of .each
<Chewy11212> Exactly what it is
<Chewy11212> I had it coded a diffrent way before to try and fix the problem, then I undid that but I forgot about that piece of code
<shevy> puts "" should be superfluous, you can just do a puts if you only want a newline anyway
n00bdev has quit []
<Chewy11212> Shevy
<Ox0dea> Chewy11212: I don't get it. This validation method (`b99`, as you've very insightfully called it) should take a username and a password and return `@@accounts[username] == password`.
<Ox0dea> How does so much confusion arise organically?
<Chewy11212> organically?
rkazak has joined #ruby
<Chewy11212> Da fuq?
<Ox0dea> Like, without being coerced at gunpoint or something.
<Ox0dea> Did somebody make you write it like this?
<Ox0dea> Show us on the keyboard.
<Chewy11212> No, I wrote it like this
<Chewy11212> The method b99 doesn't return anything
<Chewy11212> All it does is just check and proceed to the correct next method
ohaibbq has joined #ruby
<Chewy11212> Anyways, try running it and getting the password wrong a few times, then correctly. You will see the problemo
Guest6520 is now known as saneax_AFK
solars has joined #ruby
lubekpl has joined #ruby
GriffinHeart has joined #ruby
arup_r has quit [Remote host closed the connection]
<Chewy11212> Any solutions?
solars has quit [Client Quit]
<Chewy11212> I suspect it loops because the .each do method fucks it up like that everytime it is re-run. I dunno how to fix it though
solars has joined #ruby
<Chewy11212> Besides just checking if the @@accounts[@name] = @pass is nil
<Chewy11212> But I want a little more secure method
mousier has joined #ruby
jas02 has joined #ruby
arup_r has joined #ruby
nixawk has quit [Read error: Connection reset by peer]
peeja has joined #ruby
nixawk has joined #ruby
pawnbox has quit [Remote host closed the connection]
jordanm has joined #ruby
firstdayonthejob has joined #ruby
pawnbox has joined #ruby
Feyn has joined #ruby
JohnT has joined #ruby
<harly> admin is x, and password is y. what is a better label for x?
<harly> oh wow. scroll buffer fail.
<harly> i'm confused at this paste. what is it meant to be doing? :)
finisherr has joined #ruby
JohnT has quit [Client Quit]
RobertBirnie has quit [Ping timeout: 245 seconds]
usershell has quit [Read error: Connection reset by peer]
peeja has quit [Ping timeout: 240 seconds]
<shevy> it is meant to show chaos-in-code
Waheedi has quit [Quit: Waheedi]
ruby-lang934 has joined #ruby
RobertBirnie has joined #ruby
finisherr has quit [Client Quit]
usershell has joined #ruby
ascarter_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ascarter_ has joined #ruby
usershell has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
ruby-lang934 has quit [Ping timeout: 252 seconds]
astrobun_ has joined #ruby
usershell has joined #ruby
Xeago has joined #ruby
kt2 has quit [Quit: ...]
gagrio has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ropeney has joined #ruby
speaking1ode has joined #ruby
Nanuq has joined #ruby
Guest58 has joined #ruby
<Ox0dea> Chewy11212: Still about?
kalopsian has quit [Ping timeout: 256 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
hannelita has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest84412
ohaibbq has quit [Quit: Leaving...]
mahlon has quit [Quit: nine foot long outhouse ladle]
<Ox0dea> Chewy11212: The problem is on Line 23.
ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
hannelita has quit [Ping timeout: 240 seconds]
dpg_ has quit [Ping timeout: 246 seconds]
<Ox0dea> You have a case of "accidental recursion".
<Ox0dea> Some say this is what happened to the universe.
<Ox0dea> Hydrogen was just minding its own business.
<Chewy11212> What>
<Chewy11212> Lol
<Chewy11212> Can you exaplin to me more in depth?
<Ox0dea> In the case of an incorrect password, login1 calls b99 calls login1 calls b99 calls...
TomyWork has joined #ruby
<Ox0dea> Then when the right password is supplied, the call stack bubbles up and you invoke `cp` n times.
<Chewy11212> ohhhhh
<Ox0dea> Changing Line 23 to `return login1` "solves" your problem.
<Ox0dea> I took some time to refactor your approach because sanity must prevail: https://eval.in/501915
Rodya_ has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
LiquidInsect has quit [Ping timeout: 260 seconds]
DoubleMalt has joined #ruby
GriffinHeart has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
DoubleMalt has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
aufi has joined #ruby
sandstrom has joined #ruby
jam_ has quit [Remote host closed the connection]
xet7 has quit [Ping timeout: 240 seconds]
zapata has joined #ruby
LiquidInsect has joined #ruby
finisherr has joined #ruby
arup_r has quit [Remote host closed the connection]
tulak has joined #ruby
kalopsian has joined #ruby
toretore has joined #ruby
Haris has joined #ruby
<Haris> hello all
roshanavand has joined #ruby
asmodlol has quit [Ping timeout: 255 seconds]
<Haris> is ruby built on python or the like ? its syntax resembles python a lot
rkazak has quit [Quit: Sleep.....ing....]
<Haris> that's not a useful Q though. ah well
<Ox0dea> Haris: Ruby is largely inspired by Perl, Smalltalk, and Lisp.
<Ox0dea> In that order.
<Haris> hmm
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
<kerunaru> Ruby is built on C, Haris
kalopsian has quit [Ping timeout: 256 seconds]
<Haris> cool
<Haris> Is ruby like .. an interpreter
roshanavand has quit [Remote host closed the connection]
nixawk has quit [Read error: Connection reset by peer]
<Haris> compile code before its used. everytime fresh compile, as python does
Spleeze has joined #ruby
roshanavand has joined #ruby
rocfig has joined #ruby
<kerunaru> Ruby is a scripting language
arup_r has joined #ruby
asmodlol has joined #ruby
<Haris> hmm
arup_r has quit [Read error: Connection reset by peer]
<Ox0dea> Haris: Both CPython and MRI are bytecode interpreters.
<Ox0dea> They "compile" your code to bytecode instructions and execute them on a virtual machine.
nixawk has joined #ruby
codecop has joined #ruby
n00bdev has joined #ruby
ahaha has joined #ruby
<kerunaru> Why those technical questions, Haris? :)
<Haris> I'm deploying a ruby based app catarse
<Ox0dea> > cat arse
<Haris> I was unable to handle its syntax or mods to its scripts, on first look
<adaedra> I think that's not the first time I hear of such project
<Haris> it resembled python, but catarse code seems awefully complex to me on first look
<shevy> wasn't the catarse problem a day ago here
<Haris> I needed to add translations to it, for the language I was enabling. couldn't understand how to, on first look
<Haris> even though I had the solution in an article
<shevy> Ox0dea lol
<Ox0dea> ^_^
arup_r has joined #ruby
<Haris> I was talking about catarse here yesterday
arup_r has quit [Read error: Connection reset by peer]
<shevy> ah yes
roshanav_ has joined #ruby
<Ox0dea> It was mentioned some time back as well.
arup_r has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
arup_r has quit [Read error: Connection reset by peer]
roshanavand has quit [Read error: Connection reset by peer]
usershell has quit [Remote host closed the connection]
rocfig has quit [Quit: This computer has gone to sleep]
speaking1ode has quit [Ping timeout: 245 seconds]
ahaha has quit [Remote host closed the connection]
<Haris> Your Ruby version is 2.2.4, but your Gemfile specified 2.1.0
koneko has joined #ruby
<Haris> and it saying ---> # bundle install
<Haris> Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
<Ox0dea> Silly Gemfile.
<shevy> Haris a dead end!
nunchuck has quit [Read error: Connection reset by peer]
<Haris> hmm ?
<Ox0dea> Haris: Press Ctrl-D in that terminal.
<Haris> I have work left yet
<jhass> the ruby version lock in Gemfile's is completely useless as it doesn't accept any version specifiers
<Haris> hmm
<Haris> it'll work ? with 2.2.4 or 2.2.3 ? I have both installed .. somewhere
<Ox0dea> Haris: Why are you root?
<jhass> ?root
<ruby[bot]> general advice in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<Haris> I'm the sys admin deploying this app
<Ox0dea> I fail to see the relevance.
<Haris> I can create password for the account I'm setting it up under
shredding has joined #ruby
<shevy> Haris well if one version specifies 2.1.0 and your ruby version is not 2.1.0 then it should not work
<jhass> well, I would expect 2.1.8 to work as well too
<Haris> so, I should just run rvm install 2.1.0 ?
<jhass> and probably even 2.2 and 2.3 will work, but you only have upstream promise for 2.1
<Haris> as root. that would make it globally available
<havenwood> Haris: Edit your Gemfile and run your tests.
<Haris> ok. one thing. where are gem files installed ? I installed them as root. I could install them as a normal user
<Haris> right now, the path I know is under /usr/local/rvm ?
* Haris creates password for normal user account
<kerunaru> It seems your are using rvm, so gems will be installed in ~/.rvm for each user
<kerunaru> I mean for the user installing a gem
Xeago has quit [Remote host closed the connection]
<kerunaru> (If you are root -> /root/.rvm/ if you are foo -> /home/foo/.rvm
<Haris> relevant to this... will the web server be able to pick them up ?
<Haris> for e.g., I have 3 or 5 separate ruby based apps I need to serve through say apache or gunicorn or etc etc
<Haris> for that matter, I wonder if its the web server or the app that needs to be able to know where gems are installed
tomaz_b has joined #ruby
arup_r has joined #ruby
<shevy> you are like the man with a thousand tasks!
<kerunaru> lol
<Haris> not far from truth
krz has quit [Ping timeout: 265 seconds]
arup_r has quit [Client Quit]
DoubleMalt has joined #ruby
chipotle has quit [Quit: cheerio]
<kerunaru> Haris, is the app a Rails app?
<Haris> YES
<Haris> yes+
xet7 has joined #ruby
<Haris> git project has changed. app is the same. this one uses relatively older version of ruby
<Haris> the other one from yesteday wanted ruby 2.2.3. this one wants 2.1.0
<harly> "I'm the sys admin deploying this app" i think i see the problem :)
<kerunaru> Although I think most of people here know Rails, I think you should go #rubyonrails and ask there too :P
<Haris> its economics, or wants. people want things done. but don't want to pay for it
<Haris> ah I see
<Haris> thank you
<shevy> I don't know rails :(
n00bdev has quit []
<Haris> there's too many programming languages to learn
Guest58 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Haris> your not done with one, and an app based on another is handed over to you
<shevy> specialize!
<shevy> ban some languages
<kerunaru> "I think MOST OF PEOPLE here know Rails"… not all people, shevy :P
bkxd has joined #ruby
sepp2k has joined #ruby
Hounddog has joined #ruby
<kerunaru> +1 shevy
<shevy> it's on my todo list!
<kerunaru> Specialization is the key to progress in this job lol
<harly> haris: our admins only provide us iwth a deploy infrastructure. we deploy our own apps. why are you expected to know something you didn't write? :)
<Haris> money, economics, wants of human beings
<harly> it's most economical to allow devs to deploy and own their own stuff. they built it and know it best.
<shevy> pretty diamonds!
<Haris> or not enough sales, but need work done
kalopsian has joined #ruby
Guest58 has joined #ruby
<harly> our admins would laugh all the way home if I told hem they had to own and deploy my app :)
Guest58 has quit [Client Quit]
<harly> now, if the db or file server goes down, then they're in the shit.
<Haris> yesterday, the app I was handed was from something like this ( https://marcclifton.wordpress.com/2013/07/26/getting-catarse-to-build-and-run/ ). taht didn't work, because it needed too many modifications after deployment to make it live. today I'v been handed this ( https://github.com/danielweinmann/catarse ) as a perhaps working copy of the same
krz has joined #ruby
LMity has joined #ruby
<Haris> that's because economics doesn't work there, as it does here :( .. and people accept that there
bkxd has quit [Ping timeout: 240 seconds]
<Haris> money from our economy is legally, and illegally flowing there. I either have the option to move there, or work in the existing economics, ways of people .. here. and immigration takes a heck lot of time and doing to get through these days. lol
Guest58 has joined #ruby
<Haris> people don't accept things here, as they do there. its different there
<kerunaru> But the quick installation section of the README.md it pretty straight forward… What problems did you get following it?
<Haris> the old one, or the new one ?
finisherr has quit [Quit: finisherr]
mark2 has joined #ruby
<kerunaru> The new one
<harly> the new one. config DB settings, bundle install, rake, then rails server
<Haris> I had trouble with parts after the rake db:seed part
karapetyan has joined #ruby
<Haris> yep, working on the new one. its installing gems yet
<Haris> ouch, no. I got error on running bundle install i.e., the error about being root and the version difference for ruby
<Haris> that's where I'm struggling yet
<kerunaru> Mmmm…
dcunit3d has joined #ruby
<kerunaru> I think you should not be doing this as root, but a regular user. That said, just install the require version of Ruby to run this app and see what happens
<ddv> Haris: create normal user, add a ruby version manager like chruby,rbenv etc.
<harly> well. it wants ruby 2.1.0. so have that installed. personally i use ruby-install (ruby-install ruby-2.1.0). then gem install bundler. then bundle install. as the user that will be executing rails server
<ddv> Haris: install a ruby
<ddv> etc
<harly> don't do any of that as root
<Haris> yep, making passwod for normal user, to work on its own shell
last_staff has joined #ruby
<harly> then ideally have an nginx sitting in front sending whatever externally into that unknown and untrusted catarse app
SCHAAP137 has joined #ruby
chussenot has joined #ruby
dlitvak has joined #ruby
<kerunaru> You have to keep in mind that rvm get loaded at log in a shell and each user is going to have ONLY what they'd installed
hannelita has joined #ruby
<kerunaru> So what root installed is not going to be available for others users
Haris2 has joined #ruby
<kerunaru> And viceversa
Haris has quit [Disconnected by services]
Haris2 is now known as Haris
LMity has quit [Ping timeout: 264 seconds]
Haris has quit [Changing host]
Haris has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
<Haris> lost msgs after --> <Haris>yep, making passwod for normal user, to work on its own shell <-- got dc
blaxter has joined #ruby
<harly> <harly> then ideally have an nginx sitting in front sending whatever externally into that unknown and untrusted catarse app
<harly> <kerunaru> You have to keep in mind that rvm get loaded at log in a shell and each user is going to have ONLY what they'd installed
<Haris> hmm
<harly> <kerunaru> So what root installed is not going to be available for others users (and viceversa)
zenlot1 is now known as zenlot
<Haris> another *ouch*
dlitvak has quit [Ping timeout: 276 seconds]
hannelita has quit [Ping timeout: 255 seconds]
asmodlol has quit [Ping timeout: 276 seconds]
<Haris> installing ruby, bundle, etc etc under the normal user now
nixawk has left #ruby [#ruby]
drptbl has joined #ruby
SOLDIERz has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Haris> have to call ISP. can't connect to German mirror of ruby 2.1.0. no other mirrors seem to be available, as per rvm
asmodlol has joined #ruby
joonty has joined #ruby
Rodya_ has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
Xeago has joined #ruby
SegFaultAX has quit [Ping timeout: 255 seconds]
pipework has quit [Quit: pipeworkin' it]
rcs has quit [Ping timeout: 260 seconds]
pipework has joined #ruby
Liothen has quit [Ping timeout: 260 seconds]
Liothen has joined #ruby
zacts has quit [Remote host closed the connection]
Rodya_ has quit [Ping timeout: 265 seconds]
zacts has joined #ruby
chussenot has quit [Quit: chussenot]
harai has joined #ruby
zacts is now known as Guest69790
sftrabbit has joined #ruby
SegFaultAX has joined #ruby
huyderman has joined #ruby
rcs has joined #ruby
rodfersou has joined #ruby
hayden_ has joined #ruby
Guest58 has quit [Remote host closed the connection]
chussenot has joined #ruby
webus has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
webus has left #ruby [#ruby]
marr has joined #ruby
Xeago has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
chussenot has quit [Client Quit]
djbkd has joined #ruby
dwfait has joined #ruby
chussenot has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
harai54 has joined #ruby
astrobun_ has quit [Remote host closed the connection]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
harai has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
kerunaru has joined #ruby
Snowy has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
DirtyFInn has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
vdamewood has quit [Quit: Life beckons.]
dn` has quit [Ping timeout: 276 seconds]
platzhirsch has joined #ruby
mikecmpbll has joined #ruby
koneko has quit [Quit: brb]
last_staff has quit [Quit: last_staff]
catbusters has quit [Max SendQ exceeded]
catbusters has joined #ruby
ledestin has joined #ruby
koneko has joined #ruby
Bloomer has quit [Read error: Connection reset by peer]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bloomer has joined #ruby
chussenot has quit [Quit: chussenot]
prestorium has joined #ruby
chussenot has joined #ruby
andikr has joined #ruby
tvw has joined #ruby
harai54 has quit [Ping timeout: 260 seconds]
joonty has quit [Ping timeout: 264 seconds]
FernandoBasso has joined #ruby
sirfilip has joined #ruby
<sirfilip> morning
Olipro has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
Chewy11212 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
lipoqil has joined #ruby
skullcrasher has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
<shevy> yo sir filip
dn` has joined #ruby
kalopsian has joined #ruby
futilegames has joined #ruby
<Ox0dea> Maybe it's sirfi lip?
hannelita has joined #ruby
TheHodge has joined #ruby
tomaz_b has quit [Quit: Leaving]
clauswitt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Hounddog has quit [Remote host closed the connection]
xet7 has quit [Ping timeout: 272 seconds]
<Ox0dea> "surfy": http://srfi.schemers.org/
chussenot has quit [Quit: chussenot]
<Ox0dea> shevy: Do you remember a while back talking about having a democratic standard library?
arup_r has joined #ruby
<shevy> I dunno
<shevy> popularity votes perhaps
<Ox0dea> Aye, that's democracy. :P
<shevy> some way to determine what is used by lots of people and what is not
Tempesta has joined #ruby
xet7 has joined #ruby
<Ox0dea> That's basically what Scheme has with the SRFI model.
<shevy> like get_opt_long or what the name was
skade has joined #ruby
<shevy> why is it that when I read scheme, I think of chicken
<Ox0dea> There's an implementation called CHICKEN?
<Ox0dea> That'd probably do it.
joonty has quit [Ping timeout: 260 seconds]
<Ox0dea> All-caps is that community's preferred orthography, to clarify the yelling.
<skullcrasher> would you recommend using rvm?
hannelita has quit [Ping timeout: 255 seconds]
<shevy> I don't think I am familiar with a SRFI model, how do they determine what will be included when they distribute standard scheme stuff?
Xeago has joined #ruby
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arup___ has joined #ruby
<Ox0dea> Well, it's up to implementations to decide which SRFIs to provide, but the proposals that've been accepted get their own number, which is effectively a form of standardization.
silverdust has quit [Ping timeout: 240 seconds]
Olipro has joined #ruby
hannelita has joined #ruby
<shevy> hmm
<shevy> skullcrasher I think havenwood here suggests something else these days... ruby-install I think or chruby... or something else haha, how many ruby versions do you have to manage?
Synthead has quit [Ping timeout: 265 seconds]
arup_r has quit [Ping timeout: 240 seconds]
<Ox0dea> skullcrasher: chruby + ruby-install = <3
<adaedra> ^
abochu has joined #ruby
abochu has quit [K-Lined]
kalopsian has quit [Ping timeout: 265 seconds]
<ddv> ^
abobastards has joined #ruby
abobastards is now known as abobastard
silverdust has joined #ruby
silverdust is now known as Guest46690
karapetyan has joined #ruby
antgel has joined #ruby
Guest46690 is now known as silverdust
catbusters has quit [Max SendQ exceeded]
silverdust has quit [Changing host]
silverdust has joined #ruby
catbusters has joined #ruby
<abobastard> anyone from australia?
abobastard is now known as ihateblackmigger
ihateblackmigger is now known as ihatemiggers
<adaedra> !kick ihatemiggers
ihatemiggers was kicked from #ruby by ruboto [ihatemiggers]
ihatemiggers has joined #ruby
ihatemiggers was kicked from #ruby by ChanServ [Banned: Unacceptable nick - http://ruby-community.com/pages/user_rules#rule_2_10]
<adaedra> apeiros: ^ ruby[bot] doesn't catch /nick ?
Bloomer has quit [Remote host closed the connection]
koneko has quit [Ping timeout: 256 seconds]
jam_ has joined #ruby
<shevy> >> RUBY_VERSION
<shevy> hmm
<adaedra> I think apeiros restricted that to registered people.
bigkevmcd has joined #ruby
<shevy> oh
bigkevmcd has quit [Excess Flood]
krz has quit [Quit: WeeChat 1.2]
<skullcrasher> shevy, actually 1 :D but I think I have problems because of a newer version and json 1.8.1 in my gemfile
blt has joined #ruby
Synthead has joined #ruby
<skullcrasher> so I thought I would install older ruby version for this probject, but for the others the latest
bigkevmcd has joined #ruby
duckson has joined #ruby
jam_ has quit [Ping timeout: 260 seconds]
arup_r has joined #ruby
anisha has joined #ruby
d0nn1e has quit [Ping timeout: 260 seconds]
arup___ has quit [Ping timeout: 250 seconds]
troulouliou_div2 has joined #ruby
d0nn1e has joined #ruby
clauswitt has joined #ruby
blackgoat has joined #ruby
chussenot has joined #ruby
bricker has quit [Ping timeout: 255 seconds]
felixdd has quit [Ping timeout: 265 seconds]
ldnunes has joined #ruby
skade has quit [Ping timeout: 256 seconds]
chipotle has joined #ruby
clauswitt has quit [Max SendQ exceeded]
chusucksdick has joined #ruby
<chusucksdick> is chu not on here?
clauswitt has joined #ruby
<adaedra> .ban chusucksdick !P Bad nick
chusucksdick was kicked from #ruby by ruby[bot] [Bad nick]
dlitvak_ has joined #ruby
<ddv> adaedra is busy today
<shevy> yeah
<adaedra> trolls are busy.
troulouliou_div2 has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
mondok has joined #ruby
bkxd has joined #ruby
skade has joined #ruby
usershell has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
kalopsian has joined #ruby
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gbgdev has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
Synthead has quit [Ping timeout: 265 seconds]
ascarter_ has joined #ruby
strain9 has joined #ruby
usershell has quit [Ping timeout: 265 seconds]
kerunaru has quit [Ping timeout: 250 seconds]
strain9 has quit [Quit: Page closed]
InvGhost has joined #ruby
futilegames has quit [Quit: futilegames]
strain9 has joined #ruby
<mikecmpbll> I have some ruby script which on occasion seems to hang. is there any way of inspecting the process to see what's going on?
<mikecmpbll> (what code it's executing or whatever)
<mikecmpbll> ubuntu
binaryplease has joined #ruby
<adaedra> you can strace it, you can put debug messages at key points
Synthead has joined #ruby
tvw has quit []
<adaedra> you can use tracer
<adaedra> &ri Tracer
rdark has joined #ruby
f4cl3y has joined #ruby
akkmaxon has joined #ruby
Domaldel has joined #ruby
c0m0 has joined #ruby
UtkarshRay has quit [Remote host closed the connection]
<adaedra> mh.
vikas027 has joined #ruby
bronson has joined #ruby
joonty has joined #ruby
mark2 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :verne.freenode.net"]
<mikecmpbll> @adaedra: thanks! checking out
<mikecmpbll> whoops, should have mentioned that i want to look at the already hanging process if possible
<mikecmpbll> but that's useful nonetheless
<adaedra> You can attach a process with strace.
pawnbox has quit [Remote host closed the connection]
<mikecmpbll> ah, cool, reading manpage now
pawnbox has joined #ruby
Rodya_ has joined #ruby
jgpawletko has joined #ruby
bronson has quit [Ping timeout: 272 seconds]
strain9 has quit [Quit: Leaving]
Rodya_ has quit [Ping timeout: 245 seconds]
<mikecmpbll> @adaedra: i wonder if you could help me interpret this strace output? https://gist.github.com/mikecmpbll/3bd1b77762ab5f314e0f
<mikecmpbll> it's just that repeating itself over and over
<adaedra> looks like it hangs on network reading
jgt has joined #ruby
<mikecmpbll> hmm
mondok has quit [Quit: Leaving]
lucasb has joined #ruby
dcunit3d has quit [Ping timeout: 246 seconds]
kerunaru has joined #ruby
rtl has quit [Ping timeout: 260 seconds]
FooMunki has joined #ruby
<toretore> mikecmpbll, gist the code?
<mikecmpbll> bit convoluted, mind
<mikecmpbll> i've spotted a couple of things since looking at it but not sure if they could be the cause. firstly i shouldn't be rescuing Exception ..
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<mikecmpbll> also i'm modifying @log_messages inside the thread without a mutex
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
bkxd has joined #ruby
dcunit3d has joined #ruby
dlitvak_ has quit [Ping timeout: 245 seconds]
jschmid has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
hannelita has quit [Remote host closed the connection]
pawnbox has joined #ruby
<toretore> mikecmpbll, it doesn't look like you actually need a Queue, as each thread has its own `group`
<mikecmpbll> oh yeah .. that's true.
<mikecmpbll> refactoring now.
Guest58 has joined #ruby
kknight has joined #ruby
dcunit3d has quit [Ping timeout: 276 seconds]
<toretore> how far does it get before it hangs?
UtkarshRay has joined #ruby
jas02 has joined #ruby
<toretore> i'd replace line 39 with a simple puts just to see if the problem is in this file or in one of the required ones
stamina has joined #ruby
<mikecmpbll> it _seems_ to finish doing all the processing
pawnbox has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 276 seconds]
<mikecmpbll> that's all exact code copy/pasted but there is a bit more below the joining of the threads in the actual thing
pawnbox has joined #ruby
<mikecmpbll> which it doens't reach
pawnbox has quit [Read error: Connection reset by peer]
<toretore> so one of the threads doesn't finish
pawnbox has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
<toretore> consumers << Thread.new{ Thread.current[:school] = school_name; ... }; consumers.each{|c| puts c[:school]; c.join }
<toretore> then you'll see which one it is
hannelita has joined #ruby
<toretore> actually you can just look at the log to see which one doesn't finish
skade has quit [Ping timeout: 240 seconds]
bigkevmcd has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 265 seconds]
chussenot has quit [Quit: chussenot]
kiidbrian has joined #ruby
skade has joined #ruby
bigkevmcd has joined #ruby
tesuji has joined #ruby
bigkevmcd has quit [Client Quit]
CloCkWeRX has joined #ruby
<Bish> [1,2,3].each do { |x| << is there an implicit x?
<toretore> no
<Bish> too bad.
sdothum has joined #ruby
<toretore> there are too many magic variables in ruby as it is
<Bish> i like magic variables
<toretore> i don't
<toretore> magic always comes back to bite you in ome way or another
tvw has joined #ruby
<Bish> how is an implicit x is going to bite me
<Bish> it bites me already, because i always have to type it
<toretore> in ways that you can't foresee
ziyadb has joined #ruby
<Bish> well thats super specific :D
<shevy> :D
<toretore> take instance_eval: it's very convenient and it makes your code look "elegant"
<Bish> is it a magic variable?
<toretore> until you try to use ivars or methods that it seems you should be able to
<toretore> and it doesn't work; and it's not even your code that called instance_eval so you have no idea why your code doesn't work
ruby[bot] has joined #ruby
platzhirsch has left #ruby [#ruby]
dlitvak_ has joined #ruby
<toretore> x = 5; [1,2,3].each{ puts x } #what should happen here?
<toretore> you get ambiguity, and ambiguity is a programmer's worst friend
lacuna has joined #ruby
lacuna has joined #ruby
<kiidbrian> you need a placeholder |x|
<adaedra> Bish: you can [1, 2, 3].each(&method(:puts))
dlitvak has quit [Ping timeout: 272 seconds]
sigurding has quit [Quit: sigurding]
andikr has quit [Read error: Connection reset by peer]
<Bish> toretore: [1,2,3].each { p block_params.first } what will happen here?
<Bish> i didn't say it has to be "x"
<lucasb> $_
<Bish> >> [1,2,3].each { p $_ }
<ruby[bot]> Bish: # => nil ...check link for more (https://eval.in/502101)
<lucasb> I was kidding!
<Bish> :3 i see
<shevy> your ambiguity sickens me!
<lucasb> Bish: but you can do 'while gets; print; end' <-- and that uses the implicit $_
lacuna has quit [Ping timeout: 246 seconds]
<Bish> oh wow thats super dirty :D
konsolebox has joined #ruby
<toretore> it is
<kiidbrian> i like dirty
Rodya_ has joined #ruby
<toretore> writing `while str = gets; print str; end` is such a big effort
<Bish> none said it was a good example for good use of magic variables
ph1nary has quit [Quit: Leaving]
konsolebox has quit [Max SendQ exceeded]
<kiidbrian> precisely
konsolebox has joined #ruby
konsolebox has quit [Remote host closed the connection]
Jackneill has joined #ruby
Rodya_ has quit [Ping timeout: 250 seconds]
jackcom has quit [Quit: jackcom]
jam_ has joined #ruby
<harly> *double checks i didn't step into #perl*
<Bish> *double checks if harly used i when he should've used he*
bkxd has quit [Ping timeout: 240 seconds]
<toretore> ruby -e 'do_what_i_think()'
bkxd has joined #ruby
<harly> *double checks $_ didn't step into perl*
<toretore> --do-it-faster --dont-make-any-mistakes
jackcom has joined #ruby
<KrzaQ> Where is File.write and File.read documented? I looked them up in the File class docs, but there's no such method and IO.write takes 1 argument, not two
jam_ has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 272 seconds]
chussenot has joined #ruby
<KrzaQ> I used ruby-doc.org (first result on google). Should I abandon it for the site you linked?
<shevy> spot the error!
<shevy> NAMESPACE = self.insect.to_s
<apeiros> shevy: you're writing biology stuff - is it really an error? :)
<apeiros> KrzaQ: what makes you think File#write took two args?
<adaedra> KrzaQ: use what fits you best. ruby-doc.org is official doc, rubydoc.info is maintained by yard team.
chrisarcand has quit [Quit: leaving]
AlphaAtom has joined #ruby
chrisarcand has joined #ruby
<shevy> apeiros hehe
<KrzaQ> apeiros: previous usage. I just wanted to look up which one was content and which one was filename
Snowy has quit [Remote host closed the connection]
<adaedra> KrzaQ: if you look for doc, you can also use the ri command.
<adaedra> ?ri
<ruby[bot]> adaedra: I don't know anything about ri
<adaedra> uh.
<KrzaQ> :D
casadei has joined #ruby
<adaedra> ?docs
<ruby[bot]> you can use http://ruby-doc.org or the command line tool "ri" which should be installed along with your ruby to access documentation. Ri example: "ri Array#length"
<KrzaQ> ri File#write
<KrzaQ> Nothing known about File
<KrzaQ> not exactly what I wanted
<adaedra> Ah, you don't have docs installed then
<KrzaQ> you're right, fixing it
<KrzaQ> uh
<KrzaQ> but it only shows me the one argument overload, even though File.write(name, data) clearly works
<apeiros> KrzaQ: how can previous usage make you think it took two args? it does not take two args. passing it two causes an exception.
blackmesa has joined #ruby
<apeiros> KrzaQ: are you really talking about File::write, not File#write?
<apeiros> (class method vs. instance method)
<KrzaQ> I have no idea, I provided the usage above
<apeiros> are you using it on File directly or on an instance
<KrzaQ> File.write(2 args)
jmignault has joined #ruby
sftrabbit has joined #ruby
<apeiros> I'll take that as a "I call it on File directly".
<apeiros> File::write is not coming from ruby.
minver has joined #ruby
<minver> I need to import Reviews to my App. And the API I'm using let med export the reviews as JSON or my app will get a POST callback when a review is created. What are the PROS and CONS with these two approaches? Export would be better in the beginning to populate the database.
<apeiros> File.method(:write).source_location will show you where it's coming from.
pawnbox has joined #ruby
<lucasb> apeiros: what do you mean it's not coming from ruby?
jottr has joined #ruby
<harly> >> p File.method(:write).source_location
<KrzaQ> it says nil :)
<ruby[bot]> harly: # => nil ...check link for more (https://eval.in/502117)
<harly> hmm
<apeiros> lucasb: I mean it's not part of ruby itself. it got added later.
<apeiros> oh wait…
<lucasb> I think it's ruby core
<apeiros> File.write actually got added
<apeiros> a while back even. memory playing tricks :D
<lucasb> ok :)
<apeiros> ah right, File.append is still missing.
<KrzaQ> okay. Tbh I find the documentation pretty weak in this case
<apeiros> KrzaQ: anyway, the point is - you're confusing *instance method* and *class method*
<apeiros> those are not the same.
<KrzaQ> at this point, I searched anything with "write"
dlitvak has joined #ruby
inkky has quit [Changing host]
inkky has joined #ruby
PedramT has joined #ruby
<apeiros> KrzaQ: that's also what I was asking you about before. it is NOT the same whether you do File.write(…) or File.open(…).write(…)
kknight has quit [Ping timeout: 256 seconds]
blackgoat has quit [Quit: WeeChat 1.3]
bkxd has quit [Quit: Lost terminal]
<KrzaQ> Well, if you look at my first line here, you will see File.write
<KrzaQ> Anyway, thanks.
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
sigurding has joined #ruby
jmignault has joined #ruby
<harly> i tink i've relied more on google for how to use File than official doco
<apeiros> KrzaQ: in documentation, use :: to indicate class method
<KrzaQ> I now know that I can use ri, which I have completely forgotten about
<harly> there are some elements of the doco that confuse me still.
PedramT has quit [Remote host closed the connection]
<KrzaQ> apeiros: sure, and # instance method, . is neither :P and I still think that write should be linked from File doc
PedramT has joined #ruby
kalopsian has joined #ruby
<apeiros> KrzaQ: no it should not. it's inherited.
<apeiros> KrzaQ: ri will search inheritance for you. but I'm happy that doc pages don't list all inherited methods on the same page.
<apeiros> methods from Kernel and Object alone would spam that quite a bit.
dlitvak_ has quit [Ping timeout: 260 seconds]
<KrzaQ> eh
<KrzaQ> go the qt/doxygen way, then: show all inherited methods upon request
JohnT has joined #ruby
<apeiros> on request would be acceptable
lkba has joined #ruby
myntcake has joined #ruby
skade has quit [Read error: Connection reset by peer]
nerium has joined #ruby
Feyn has quit [Quit: Leaving]
PedramT has quit [Ping timeout: 260 seconds]
skade has joined #ruby
karapetyan has quit [Remote host closed the connection]
BTRE has joined #ruby
PedramT has joined #ruby
karapetyan has joined #ruby
nerium has quit [Client Quit]
Snowy has joined #ruby
aupadhye has joined #ruby
peeja has joined #ruby
al2o3-cr has joined #ruby
usershell has joined #ruby
binaryplease has quit [Ping timeout: 264 seconds]
skade has quit [Ping timeout: 240 seconds]
dcunit3d has joined #ruby
peeja has quit [Ping timeout: 272 seconds]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Remote host closed the connection]
joonty has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
kt2 has joined #ruby
PedramT has quit [Ping timeout: 246 seconds]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
graffix222 has quit [Ping timeout: 260 seconds]
edwinvdg_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
blackwhitejewish has joined #ruby
blackwhitejewish was banned on #ruby by ChanServ [blackwhitejewish!*@*]
blackwhitejewish was kicked from #ruby by ChanServ [Banned: Good bye]
graffix222 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
skade has joined #ruby
anisha has quit [Ping timeout: 256 seconds]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
scepticulous has quit [Ping timeout: 260 seconds]
djbkd_ has quit [Ping timeout: 240 seconds]
<Bish> charlock holmes is a god sent!
bronson has joined #ruby
synthroid has joined #ruby
sankaber has joined #ruby
bronson has quit [Ping timeout: 260 seconds]
skade has quit [Ping timeout: 256 seconds]
Rodya_ has joined #ruby
usershell has quit [Quit: Leaving...]
usershell has joined #ruby
joonty has joined #ruby
Rodya_ has quit [Ping timeout: 264 seconds]
skade has joined #ruby
JohnT has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
howdoi has quit [Quit: Connection closed for inactivity]
sdothum has joined #ruby
usershel_ has joined #ruby
gbgdev has quit [Remote host closed the connection]
usershell has quit [Ping timeout: 240 seconds]
skade has quit [Ping timeout: 245 seconds]
FernandoBasso has quit [Quit: Leaving]
Limix has joined #ruby
<arup_r> I am not able to give proper name to my method. I am trying to stop user to send next invitation until he/she crossed 10 minutes from it's last invitation timestamp. My method logic is correct, but name is misleading. What should be the good name? https://gist.github.com/aruprakshit/9a778b36868a9891840c
sardaukar42 has joined #ruby
Limix has quit [Client Quit]
sardaukar42 has left #ruby [#ruby]
skade has joined #ruby
who42 has joined #ruby
mfb2 has quit [Remote host closed the connection]
mrgrieves has joined #ruby
mfb2 has joined #ruby
<harly> can_send_another_invitation? maybe?
<harly> but then that's misleading ont he first call :)
Limix has joined #ruby
PedramT has joined #ruby
duckpuppy has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 246 seconds]
<mrgrieves> hi, for some reason on my mac the system's ruby is being picked up instead of the rbenv ruby. Any ideas what I might be doing wrong?
<arup_r> yes harly, I gave it can_not_send_invitation? for now, no good name is comming on top of my head
<arup_r> :D
mfb2 has quit [Remote host closed the connection]
<shevy> def party_pooper
<harly> mrgrieves: what happens when you using rbenv to pick the ruby you want?
minver has quit [Quit: Page closed]
dstarh has joined #ruby
<Bish> invitationable?
<Bish> .3
<Bish> oh he sends the invitation, hmm.. geez
<Bish> *votes for party_pooper*
skade has joined #ruby
ramortegui has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
<mrgrieves> harly: http://pastebin.com/cSquJ6Hz
<ruby[bot]> mrgrieves: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/0d938d841bb06bf10a4e
<ruby[bot]> mrgrieves: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Melpaws has joined #ruby
bronson has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DirtyFInn has quit []
rodfersou has quit [Quit: leaving]
mfb2 has joined #ruby
mfb2 has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 260 seconds]
mfb2 has joined #ruby
<harly> mrgrieves: i use chruby not rbenv. but if rbenv thinks the right one is set, then it's could be an issue with your path?
sgambino has joined #ruby
dlitvak has quit [Remote host closed the connection]
Melpaws has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
mfb2_ has joined #ruby
mfb2 has quit [Ping timeout: 245 seconds]
tmtwd has joined #ruby
<skullcrasher> shevy, ruby-install + chruby worked nicely, thx :)
<skullcrasher> only problem now is integration into rubymine ... nvm
atomical has joined #ruby
<harly> ruby-intstall+chruby is the shizzle
blackmesa has joined #ruby
gbgdev has joined #ruby
Xeago has quit [Remote host closed the connection]
atomical_ has quit [Ping timeout: 246 seconds]
<astrobunny> ruby-install is pretty rad
karapetyan has joined #ruby
puria has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
kiidbrian has quit [Ping timeout: 240 seconds]
edwinvdgraaf has joined #ruby
Ishido has joined #ruby
edwinvdg_ has joined #ruby
skade has quit [Ping timeout: 276 seconds]
dlitvak_ has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
karapetyan has quit [Ping timeout: 260 seconds]
dorei has joined #ruby
duckpuppy has quit [Ping timeout: 255 seconds]
dhalsim has joined #ruby
jottr has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
workmad3 has quit [Quit: Lost terminal]
edwinvdgraaf has quit [Ping timeout: 272 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
jschmid has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
lurch_ has joined #ruby
allcentury has joined #ruby
pwnd_nsfw has quit [Remote host closed the connection]
Jammy_Work has quit [Read error: Connection reset by peer]
blaxter has quit [Quit: foo]
vikas027 has quit [Quit: Textual IRC Client: www.textualapp.com]
mousier has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
shredding has joined #ruby
Guest58 has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
skade has joined #ruby
linc01n has quit [Remote host closed the connection]
Rodya_ has joined #ruby
B1n4r10 has joined #ruby
fumk has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
toretore has quit [Ping timeout: 246 seconds]
hannelita has quit [Remote host closed the connection]
toretore has joined #ruby
duckpuppy has joined #ruby
blt has quit [Quit: WeeChat 1.3]
hannelita has joined #ruby
mrgrieves has quit [Quit: leaving]
sdwrage has joined #ruby
cdg has joined #ruby
Rodya_ has quit [Ping timeout: 276 seconds]
TomPeed has joined #ruby
jam_ has joined #ruby
chipotle has joined #ruby
spooq has quit [Read error: Connection reset by peer]
akem has quit [Ping timeout: 255 seconds]
binaryplease has joined #ruby
fumk has joined #ruby
grill has joined #ruby
spooq has joined #ruby
lxsameer has quit [Quit: Leaving]
blackmesa has quit [Ping timeout: 265 seconds]
ajf- has joined #ruby
<skullcrasher> hmm works well but no ide integration :/ don't know how to start debugging now -.-
<ljarvis> lol ide
<ljarvis> skullcrasher: debug by using debuggers (or simply puts statements to start). You don't need an ide
radgeRayden_ has quit [Read error: Connection reset by peer]
jam_ has quit [Ping timeout: 264 seconds]
dfinninger has joined #ruby
aegis3121 has joined #ruby
GinoManWorks has joined #ruby
sinkensabe has joined #ruby
dwfait has quit [Remote host closed the connection]
spooq has quit [Ping timeout: 255 seconds]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
Guest58 has joined #ruby
GriffinHeart has joined #ruby
dfinninger has quit [Remote host closed the connection]
jottr has joined #ruby
dfinninger has joined #ruby
bMalum has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
jgt has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
s00pcan has joined #ruby
Guest58 has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest58 has joined #ruby
PedramT has quit [Remote host closed the connection]
rodolfowtf has joined #ruby
nfk|laptop has joined #ruby
mary5030_ has quit [Remote host closed the connection]
PedramT has joined #ruby
ror15 has joined #ruby
mary5030 has joined #ruby
Guest58 has quit [Client Quit]
s00pcan has quit [Quit: Lost terminal]
dlitvak has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
s00pcan has joined #ruby
skade has quit [Ping timeout: 260 seconds]
dlitvak_ has quit [Ping timeout: 255 seconds]
atomical_ has joined #ruby
pdoherty has joined #ruby
burbus has joined #ruby
Haris has left #ruby [#ruby]
lubekpl has quit [Quit: Textual IRC Client: www.textualapp.com]
ta0 has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
aryaching has quit []
platzhirsch has joined #ruby
_Tariq has joined #ruby
<_Tariq> I am stuck with trying to name some variables
dwfait has joined #ruby
Toledo|gone has joined #ruby
failshell has joined #ruby
<_Tariq> Or rather, trying to name methods to make it clear what I'm doing
pawnbox has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 256 seconds]
pawnbox has joined #ruby
sarkis has joined #ruby
atomical_ has quit [Excess Flood]
pawnbox has quit [Remote host closed the connection]
howdoi has joined #ruby
pawnbox has joined #ruby
sankaber has joined #ruby
rippa has joined #ruby
atomical has joined #ruby
AlphaAtom has joined #ruby
myntcake has quit [Ping timeout: 264 seconds]
skade has joined #ruby
B1n4r10 has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
aryaching has joined #ruby
tulak has quit [Ping timeout: 245 seconds]
mohamedAziz111 has joined #ruby
zast has joined #ruby
bigkevmcd has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Client Quit]
FernandoBasso has joined #ruby
Limix has quit [Quit: Limix]
jottr has quit [Ping timeout: 264 seconds]
LMity has joined #ruby
<shevy> you must give fitting names
<shevy> ljarvis has yesterday or the day before determined that: def b99 is not a good name
nerium has joined #ruby
<ljarvis> wat
atomical_ has joined #ruby
blaxter has joined #ruby
benjohn has joined #ruby
polishdub has joined #ruby
clauswitt has quit [Quit: Textual IRC Client: www.textualapp.com]
nfk|laptop has joined #ruby
ilyasov has joined #ruby
ilyasov is now known as carella
pawnbox has quit [Remote host closed the connection]
<ddv> _Tariq: show us some code
pawnbox has joined #ruby
<_Tariq> Here is the code
atomical has quit [Ping timeout: 264 seconds]
<shevy> now you only have to find better names!
blackoperat has joined #ruby
blackoperat has quit [Client Quit]
sankaber has quit [Remote host closed the connection]
<aegis3121> _Tariq which ones aren't you sure of the name for?
sankaber has joined #ruby
bahar has quit [Ping timeout: 264 seconds]
<_Tariq> the method names in publish and insert_data
<_Tariq> and the method name "insert_data"
Bloomer has joined #ruby
LMity has quit [Ping timeout: 256 seconds]
bronson has quit [Remote host closed the connection]
ttrevenen has joined #ruby
hxegon has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
duckpuppy has joined #ruby
GriffinHeart has quit []
jgt has joined #ruby
akem has joined #ruby
blaxter has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
Rodya_ has joined #ruby
hxegon has quit [Ping timeout: 255 seconds]
B1n4r10 has joined #ruby
Xeago has joined #ruby
<lucasb> _Tariq: I have no idea what that code does, but what about names like get_result, generate_output...
<_Tariq> That could work, I should probably explain what it does
mchu has joined #ruby
<_Tariq> @narrative is an array of sentences. I join them together to make a string containing a narrative
<_Tariq> but this narrative has blanks where numbers can be inserted in
Xeago has quit [Remote host closed the connection]
<_Tariq> so I then create an ERB file with that narrative string
<_Tariq> and then output the result of that erb file, using data
akem has quit [Ping timeout: 250 seconds]
stannard has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby
Rodya_ has quit [Ping timeout: 256 seconds]
<_Tariq> the binding method is used in erb to let erb use all the "data" fed into the class
stannard has joined #ruby
Guest84412 is now known as saneax_AFK
dlitvak_ has joined #ruby
einarj has quit [Remote host closed the connection]
decoponio has joined #ruby
<_Tariq> lucasb: Does this makes a bit more sense? Should i show some automated tests?
<lucasb> ok, undertood. I just think that publish/insert_data sounds like you are pushing into something, while actually you are pulling out stuff from your object.
<lucasb> *understood
<_Tariq> What do you suggest would be a better name?
mrtomme has quit [Ping timeout: 246 seconds]
JohnT has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
flou has joined #ruby
mrtomme has joined #ruby
ttrevenen has quit [Remote host closed the connection]
<lucasb> like the ones I already said above: get_result, generate_output, etc. they sound like you getting stuff out of your object. but it's your choice :) btw, maybe you could join both publish and insert_data into a single method, I don't know.
yardenbar has quit [Ping timeout: 250 seconds]
<ljarvis> _Tariq: these methods are to be used in a template?
<_Tariq> ljarvis: Yeah, the user will be writing a "grammar" and then will use this class to turn their grammar into text
flou has quit [Client Quit]
<_Tariq> the user will also pass in a Hash containing data that the class will place into the output
<ljarvis> i mean, publish should just be called "result" imo
<ljarvis> since it returns the result of the template after the erb binding
<_Tariq> Yeah, I think I'll just do that then
asccigcc has joined #ruby
blaxter has joined #ruby
<ljarvis> def result; ERB.new(@narrative.join(" ")).result(binding); end
<_Tariq> I am just afraid having so much code on one line may be too much
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> ok, that's really not much code though. But you can obviously split it into 2 lines
blackmesa has joined #ruby
asccigcc has quit [Remote host closed the connection]
<_Tariq> Yeah I just checked. It's only 42 words.
bahar has joined #ruby
<_Tariq> So I'll just keep it as one line then.
<_Tariq> I guess it'll make it more clearer that I'm relying on ERB
<_Tariq> for this to work
asccigcc has joined #ruby
andikr has joined #ruby
<_Tariq> Thank you ljarvis, and lucasb
Limix has joined #ruby
duckpuppy has quit [Ping timeout: 260 seconds]
antgel has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
govg has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
govg is now known as Guest35156
ziyadb has quit [Quit: Connection closed for inactivity]
Guest35156 has quit [Client Quit]
spiman has joined #ruby
slawrence00 has joined #ruby
Jardayn has joined #ruby
cholq has joined #ruby
cholq has left #ruby [#ruby]
Melpaws has joined #ruby
spiman has quit [Client Quit]
troulouliou_div2 has quit [Remote host closed the connection]
govg_ has joined #ruby
edwinvdg_ has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
shevy has quit [Remote host closed the connection]
InvGhost has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Ping timeout: 264 seconds]
akemrir has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
who42 has quit [Ping timeout: 246 seconds]
shevy has joined #ruby
frem has joined #ruby
dlitvak has joined #ruby
dionysus69 has joined #ruby
<Melpaws> anyone familiar with viewpoint/ruby gem ? I need to only grab the first email in the folder but not sure of the syntax
lacuna has quit [Ping timeout: 245 seconds]
shevy has quit [Client Quit]
shevy has joined #ruby
govg_ has quit [Ping timeout: 264 seconds]
PedramT has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
PedramT has joined #ruby
<jackcom> i want make graph by ruby. is it possible?
dlitvak_ has quit [Ping timeout: 255 seconds]
hxegon_ has joined #ruby
lacuna has joined #ruby
<jackcom> No one is here?
<jackcom> :(
<TomPeed> yes its possible, and there are probably some good gems to help you
KineticX has joined #ruby
<jackcom> oh shevy and TomPeed thanks
<jackcom> :)
aryaching has joined #ruby
<jackcom> lol what is it? web site is just white. shevy
govg_ has joined #ruby
<shevy> don't be silly
joonty has quit [Quit: Leaving]
<shevy> if you would not be so lazy you would have clicked on the right links until you reached https://github.com/topfunky/gruff
<jackcom> hey shevy i can see example of using Gruff?
mrfilip has joined #ruby
<ljarvis> jackcom: stop trolling
<jackcom> ljarvis: i m serious now
akem has joined #ruby
marr has quit [Ping timeout: 265 seconds]
<ljarvis> then click on the link, where you'll see there's an example right there
<jackcom> i must make GUI app using gruff ljarvis
aegis3121 has joined #ruby
krz has joined #ruby
<KineticX> Hello guys
akemrir has quit [Quit: WeeChat 1.3]
<KineticX> hows life?
agentmeerkat has joined #ruby
<jackcom> oh nice ljarvis thanks
joonty has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
duckpuppy has joined #ruby
arup_r has joined #ruby
<KineticX> I have a string of text created from return data via an ajax call, example data = "<div> <p>hello world </p></div>" When i try to display it on the page it simply acts as raw text and is not rendered. How can i make the browser render my string as proper html
<ljarvis> KineticX: raw() or .html_safe if you're using rails
<jackcom> one more question, if i install ruby package, then how can i do? TomPeed
hannelita has quit [Ping timeout: 264 seconds]
kies^ has joined #ruby
sirfilip has quit [Ping timeout: 245 seconds]
Guest39409 is now known as Affix
<TomPeed> not sure what you're asking
Affix has quit [Changing host]
Affix has joined #ruby
kerunaru has joined #ruby
<jackcom> package like ’rubygems’, 'gruff'
<jackcom> TomPeed:
<TomPeed> ruby install gruff
<TomPeed> gem install gruff*
<ljarvis> gem install*
<adaedra> :)
<KineticX> so now im getting just the raw html and its not getting rendered in the browser
<jackcom> python use pip, and ruby use gem?
<shevy> jackcom have you not like asked this 10 days ago or so?
<adaedra> jackcom: did you made your research before asking?
<jackcom> yes, adaedra many times
<jackcom> by Google
InvGhost has joined #ruby
<jackcom> if i use mac, then i can install it by brew?
<adaedra> -_-
<jackcom> if i use mac, then i can install ‘gem’by brew?
<aegis3121> gem in included as part of a ruby package
mjc_ has joined #ruby
<KineticX> brew install gem maybe
bluOxigen has joined #ruby
<jackcom> oh KineticX thanks :)
<KineticX> aegis3121: use google its your best friend.
futilegames has joined #ruby
<aegis3121> ?
<KineticX> installing ruby is pretty stragiht forward.
<jackcom> i think that ruby programmer is very kind :)
arup_r has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
<shevy> how many of them are trolls
lannonbr has joined #ruby
lacuna has quit [Remote host closed the connection]
<KineticX> anyone know the answer to my question?
<havenwood> jackcom: RubyGems ships with Ruby. It's part of Ruby.
kiidbrian has joined #ruby
<aegis3121> ^
<jackcom> oh
<jackcom> thanks havenwood
<aegis3121> KineticX if you're using Rails, I'd suggest using #RubyOnRails
<KineticX> @havenwood not on ubuntu its nto
<jackcom> gem --help
<jackcom> RubyGems is a sophisticated package manager for Ruby. This is a
<jackcom> basic help message containing pointers to more information.
<KineticX> hi isnt a rails question this is a ajax.
<Papierkorb> KineticX: Are you using rails?
<KineticX> in conjunction with ruby
<Papierkorb> KineticX: Or some other web framework?
dfinninger has quit [Remote host closed the connection]
<jackcom> i can use ruby that is installed on mac?
<adaedra> yes.
<KineticX> I am using rails but the question i have is about rendering html in the dom from a string.
<Papierkorb> KineticX: Then your question is rails specific.
<aegis3121> Which sounds like a Rails View question
<adaedra> This is totally #RubyOnRails domain.
Limix has quit [Quit: Limix]
jas02 has quit [Quit: jas02]
<jackcom> strange. i install python with pip again to local folder. adaedra
<jackcom> i must install ruby to local folder?
<adaedra> We don't care about python.
<Papierkorb> is this jack thing a bot?
<havenwood> KineticX: Even on Ubuntu it's part of the Ruby package. (1.8 is dead.)
chouhoulis has joined #ruby
<KineticX> lol.
sftrabbit has quit [Quit: sftrabbit]
<KineticX> no its not havenwood
<havenwood> KineticX: It is.
<KineticX> you have to do apt-get install rubygems
dfinninger has joined #ruby
<havenwood> KineticX: Only with Ruby 1.8.
<jackcom> Papierkorb: i m serious. because i must make GUI app with ruby.
<KineticX> right but thats the default that comes with ubuntu
<havenwood> KineticX: No, no it isn't. Unless you live in the past.
<Papierkorb> jackcom: Then google a bit. It's not hard. "installing ruby on mac" is your search query.
<adaedra> There's ruby 2.0 pre-installed on recent OS X.
<jackcom> Papierkorb: ruby is installed to mac when it is made.
<Papierkorb> jackcom: We here can and will help, but we're entitled to expect that you show some effort first.
scepticulous has joined #ruby
jottr has joined #ruby
<jackcom> ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14] <—— adaedra it is ok to use?
huyderman has quit [Remote host closed the connection]
<adaedra> LAST TIME:
<adaedra> yes.
<jackcom> :(
<jackcom> i will make it from now thanks
<jackcom> :)
failshell has quit [Remote host closed the connection]
arup_r has joined #ruby
<adaedra> Seriously, next question we've already answered or which can be replied by a 15" google search and you're muted, jackcom.
<jackcom> which ruby
<lucasb> lol
El3ktra has quit [Ping timeout: 276 seconds]
<kiidbrian> lol
<toretore> my laptop is only 13" am i excepted from this rule?
<jackcom> which ruby
<jackcom> ‘/usr/local/bin/ruby <— it is installed to local folder
<jackcom> ok thanks adaedra :)
<ljarvis> 15 inch google search
finisherr has joined #ruby
<lucasb> jackcom: can i install rubi on windows too?
agentmeerkat has quit [Quit: Lost terminal]
<ljarvis> lucasb: what are you doing?
<lucasb> ljarvis: sorry, I just got bored. :)
<jackcom> yeah, i don’t use windows for text problem. cp949…..3@#@#SEFSses%%#@ed: lucasb
<adaedra> no need to feed.
sftrabbit has joined #ruby
<jackcom> windows terminal is very strange
rkazak has joined #ruby
<jackcom> i think that few people use windows terminal.
<adaedra> i think this is not this channel topic.
<jackcom> lucasb ask me that now. adaedra
failshell has joined #ruby
ajf- has quit [Ping timeout: 260 seconds]
TheAnachron has joined #ruby
momomomomo has quit [Quit: momomomomo]
failshell has quit [Remote host closed the connection]
_Tariq has quit [Remote host closed the connection]
<jackcom> gem install rake VS gem build package.gemspec <—— i think that both is installing package.
akkmaxon has quit [Quit: akkmaxon]
Ishido has joined #ruby
scepticulous has quit [Remote host closed the connection]
<adaedra> no. If you're trying to install gems, stick to the first one.
<jackcom> oh first
<jackcom> thanks
atomical_ has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
kies^ has quit [Ping timeout: 260 seconds]
moresilenter has joined #ruby
FooMunki has quit [Quit: FooMunki]
bweston92 has quit [Read error: Connection reset by peer]
atomical has joined #ruby
<moresilenter> anyone know how to get semantic completion going in vim? I've got YouCompleteMe going, and after reading about vim-ruby, I thought it'd work out of the box, but it doesn't seem to be
<jackcom> ‘/usr/local/Cellar/ruby/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- gruff (LoadError) <—— gem install gruff
mfb2_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
<jackcom> shevy: ?
Rodya_ has quit [Ping timeout: 255 seconds]
jam_ has joined #ruby
bronson has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
<shevy> jackcom bad
resin_ has quit [Quit: leaving]
<jackcom> lol then how can i do?
lacuna has joined #ruby
<shevy> you can't!
<jackcom> gem install gruff <—— it isn’t?
<shevy> yeah
Bloomer has quit [Read error: No route to host]
davedev24 has joined #ruby
chussenot has quit [Quit: chussenot]
Bloomer has joined #ruby
f4cl3y has quit [Ping timeout: 264 seconds]
<jackcom> extconf failed, exit code 1
<jackcom> Provided configuration options:
<jackcom> :(
<jackcom> i m failed
stamina has quit [Quit: WeeChat 1.3]
<jackcom> adaedra: you know it?
Encapsulation has joined #ruby
<jackcom> i failed
jam_ has quit [Ping timeout: 276 seconds]
<jackcom> ERROR: Error installing gruff:
<jackcom> ERROR: Failed to build gem native extension.
<adaedra> That's not enough to see what's happening. You should have more output, including names to locations on your hard drive with useful information.
<jackcom> ok thanks :) adaedra
<TomPeed> if you're going to troll atleast make it funny
<TomPeed> this is just retarded
<shevy> that's where he excels at!
resin has joined #ruby
finisherr has quit [Quit: finisherr]
CloCkWeRX has quit [Quit: Leaving.]
<adaedra> Still better than wording at it.
<adaedra> (I'm already out.)
<shevy> lol
blackwhitejewish has joined #ruby
blackwhitejewish was kicked from #ruby by ChanServ [Banned: Good bye]
joonty has quit [Quit: Leaving]
dfinninger has quit [Remote host closed the connection]
rob_ has left #ruby [#ruby]
aegis3121 has quit [Ping timeout: 272 seconds]
<adaedra> apeiros: it still doesn't put the +b $#ruby-banned back
aufi has quit [Quit: Konversation terminated!]
joonty has joined #ruby
<jackcom> installing gruff is difficult?
<adaedra> Took me 20 seconds to find the solution to your problem on google.
jottr has quit [Ping timeout: 240 seconds]
SCHAAP137 has quit [Remote host closed the connection]
<adaedra> Go do your research.
<jackcom> ok you too adaedra
<ljarvis> :D
<adaedra> me too?
kies^ has joined #ruby
<jackcom> searching same with me
bweston92 has joined #ruby
tesuji has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
Macaveli has joined #ruby
jbrhbr has joined #ruby
<arup_r> adaedra: use your +b power.. :p
atomical has quit [Ping timeout: 255 seconds]
edwinvdg_ has quit [Remote host closed the connection]
atomical has joined #ruby
dfinninger has joined #ruby
ta0 has quit [Ping timeout: 264 seconds]
aegis3121 has joined #ruby
SOLDIERz has quit [Ping timeout: 260 seconds]
failshell has joined #ruby
[Butch] has joined #ruby
platzhirsch has left #ruby [#ruby]
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 255 seconds]
cpup has quit [Ping timeout: 256 seconds]
shinnya has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
gagrio has quit [Ping timeout: 260 seconds]
cpup has joined #ruby
speaking1ode has joined #ruby
babblebre has joined #ruby
lucasb has quit [Quit: leaving]
<jackcom> i fail installing gruff on ubuntu. anyway i m very too sleepy now thanks adaedra :)
<adaedra> yeah, stop trolling.
chadhs has joined #ruby
speakingcode has quit [Ping timeout: 245 seconds]
<jackcom> anyway i want make GUI app with ruby. but i failed installing ‘gruff’ package. so i m very disappointed with that. :( it is not troll adaedra
momomomomo has joined #ruby
speakingcode has joined #ruby
speaking1ode has quit [Ping timeout: 240 seconds]
<adaedra> I don't believe you.
<jackcom> lol http://paste.ofcode.org/33BYthVvYLZErqefDLy3QsH <—— this is evidence
psy_ has joined #ruby
dfinninger has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
psy_ has quit [Max SendQ exceeded]
amclain has joined #ruby
psy_ has joined #ruby
<carella> try brew install imagemagick
<jackcom> anyway i m too hard now, so i can’t sit on chair. i must lie immediately
<jackcom> carella: me?
<carella> yes, if you're the one having issues with rmagick
agentmeerkat has joined #ruby
aegis3121 has quit [Ping timeout: 265 seconds]
<jackcom> checking for Magick-config... no No package 'MagickCore' found carella
blackmesa has quit [Ping timeout: 265 seconds]
duckpuppy has quit [Ping timeout: 245 seconds]
<carella> have you installed imagemagick?
<jackcom> no
mistermocha has joined #ruby
KineticX has quit []
<adaedra> that's what google would have told you to do if you'd have used it.
<jackcom> how can i know that imagemagick is installed already? carella
nfk|laptop has quit [Ping timeout: 264 seconds]
volty has joined #ruby
<carella> ok, bye
atomical_ has joined #ruby
dionysus69 has quit [Quit: dionysus69]
chussenot has quit [Quit: chussenot]
B1n4r10 has quit [Ping timeout: 255 seconds]
PedramT has quit [Ping timeout: 246 seconds]
<volty> Benchmark prints labels before executing the code. Any way to instruct it to print them afterwards ?
speaking1ode has joined #ruby
finisherr has joined #ruby
PedramT has joined #ruby
dfinninger has joined #ruby
akkmaxon has joined #ruby
atomical has quit [Ping timeout: 250 seconds]
speakingcode has quit [Ping timeout: 245 seconds]
jackcom has quit [Quit: jackcom]
dangerousdave has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching_ has quit [Read error: Connection reset by peer]
scottschecter has joined #ruby
failshell has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 240 seconds]
graffix222 has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
aryaching has joined #ruby
marr has joined #ruby
zambini has joined #ruby
mchu has quit [Quit: mchu]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mahlon has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
rkazak has quit [Ping timeout: 260 seconds]
mchu has joined #ruby
kt2 has quit [Quit: ...]
jbrhbr has quit [Quit: Leaving.]
Limix has joined #ruby
sepp2k has quit [Quit: Leaving.]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
troulouliou_div2 has joined #ruby
graffix222 has joined #ruby
mrfilip has left #ruby [#ruby]
mclong has joined #ruby
<dostoyevsky> Can one actually use dtrace to see ruby's stack traces? Does one need a driver of some kind? Or is that just: compile ruby with dtrace support?
malconis has quit [Read error: Connection reset by peer]
symm- has joined #ruby
Rodya_ has joined #ruby
malconis has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
The_Phoenix has joined #ruby
B1n4r10 has joined #ruby
RobertBirnie has joined #ruby
cpup has quit [Ping timeout: 276 seconds]
PedramT has quit [Ping timeout: 260 seconds]
Waheedi has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
atomical has joined #ruby
benjohn has quit [Read error: Connection reset by peer]
Rodya_ has quit [Ping timeout: 250 seconds]
muxcmux has joined #ruby
zast has quit [Remote host closed the connection]
bronson has joined #ruby
TomyLobo has joined #ruby
rehat has joined #ruby
atomical_ has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
muxcmux has quit [Client Quit]
aryaching has quit [Ping timeout: 246 seconds]
bricker has joined #ruby
dlitvak_ has joined #ruby
aryaching has joined #ruby
pdoherty has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lacuna has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Blaguvest has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 255 seconds]
cpup has joined #ruby
dhalsim has quit [Remote host closed the connection]
muxcmux has joined #ruby
muxcmux has quit [Client Quit]
<douglass_> how can I decrement a unicode character in ruby? is there a method analogous to next?
<ljarvis> .ord - 1 ?
<toretore> that doesn't make any sense. how would you decrement ☃?
<douglass_> i want to get the previous codepoint
sigurding has quit [Quit: sigurding]
asmodlol has quit [Ping timeout: 240 seconds]
<douglass_> ah for some reason i thought .ord was ascii-only, sorry
<douglass_> that works
<ljarvis> :)
iateadonut has quit [Quit: Leaving.]
<ljarvis> >> "☃".ord - 1
<ruby[bot]> ljarvis: # => 9730 (https://eval.in/502221)
shadeslayer has quit [Ping timeout: 240 seconds]
<douglass_> wait .chr is ascii-only though
shadeslayer has joined #ruby
<ljarvis> ya that wont work
<toretore> >> '☃'.succ
<ruby[bot]> toretore: # => "☄" (https://eval.in/502222)
kt2 has joined #ruby
<ljarvis> yep, but you can't do (ord - 1).chr because it'll presumably be out of character range
<douglass_> .succ is the same as next, ie the opposite of what i want
dpg_ has joined #ruby
asmodlol has joined #ruby
<toretore> i know, i'm just surprised it works, for some definition of "works"
InvGhost has quit [Read error: Connection reset by peer]
ericfreese has joined #ruby
<ljarvis> >> ["☃".ord - 1].pack("U*")
<ruby[bot]> ljarvis: # => "☂" (https://eval.in/502227)
<ljarvis> douglass_: work?
dwfait has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
<adaedra> Having fun?
<volty> what's the sequel way to insert if not present ? select....count > 0 ?
mistermocha has joined #ruby
ericfreese has quit [Quit: WeeChat 1.4]
<douglass_> ljarvis: yes thanks!
<ljarvis> >> ("☃".ord - 1).chr("UTF-8")
<ruby[bot]> ljarvis: # => "☂" (https://eval.in/502229)
<ljarvis> douglass_: or that ^
<ljarvis> forgot chr can take that argument
<ljarvis> volty: what database?
<volty> sqlite
<ljarvis> or do you want it agnostic?
<ljarvis> eh
<douglass_> ljarvis: that works too
<ljarvis> volty: do a select and insert separate
<volty> agnostic's better, @ ljarvis, thx
<eam> >> [*?⚀..?⚅]
<ruby[bot]> eam: # => ["⚀", "⚁", "⚂", "⚃", "⚄", "⚅"] (https://eval.in/502230)
ico has joined #ruby
edwinvdgraaf has joined #ruby
dfinninger has quit [Remote host closed the connection]
ericfreese has joined #ruby
<zambini> >> [*?⚀..?⚅].shuffle[0]
<ruby[bot]> zambini: # => "⚅" (https://eval.in/502231)
dlitvak_ has quit [Remote host closed the connection]
ericfreese has quit [Client Quit]
ericfreese has joined #ruby
zachk has joined #ruby
ericfreese has quit [Client Quit]
dlitvak has joined #ruby
momomomomo has quit [Quit: momomomomo]
momomomomo has joined #ruby
c0m0 has quit [Ping timeout: 250 seconds]
rakm has joined #ruby
jbrhbr has joined #ruby
kiidbrian has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Remote host closed the connection]
mhib has joined #ruby
duckpuppy has joined #ruby
harai54 has joined #ruby
zambini has left #ruby [#ruby]
zambini has joined #ruby
binaryplease has quit [Ping timeout: 240 seconds]
_djbkd has joined #ruby
SCHAAP137 has joined #ruby
lacuna has joined #ruby
nfk|laptop has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
mikecmpbll has joined #ruby
freerobby has joined #ruby
dcunit3d has quit [Ping timeout: 276 seconds]
aegis3121 has joined #ruby
failshell has joined #ruby
dhalsim has joined #ruby
kalzz has quit [Ping timeout: 240 seconds]
lucasb has joined #ruby
kalz has quit [Ping timeout: 264 seconds]
UtkarshRay has quit [Ping timeout: 250 seconds]
millerti has joined #ruby
futilegames has quit [Quit: futilegames]
firstdayonthejob has joined #ruby
Anderson69s has joined #ruby
roshanavand has joined #ruby
lurch_ has quit [Quit: lurch_]
duderonomy has quit [Quit: Textual IRC Client: www.textualapp.com]
skade has joined #ruby
dangerousdave has quit [Quit: Textual IRC Client: www.textualapp.com]
nfk|laptop has quit [Ping timeout: 260 seconds]
kerunaru has joined #ruby
momomomomo has quit [Quit: momomomomo]
skade has quit [Client Quit]
roshanavand has quit [Ping timeout: 240 seconds]
roshanav_ has quit [Ping timeout: 276 seconds]
aegis3121 has quit [Ping timeout: 272 seconds]
dfinninger has joined #ruby
kerunaru has quit [Client Quit]
sandstrom has quit [Quit: My computer has gone to sleep.]
nfk|laptop has joined #ruby
Snowy has quit []
elaptics`away is now known as elaptics
kt2 has quit [Quit: ...]
kt2 has joined #ruby
kt2 has quit [Client Quit]
dfinninger has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
bronson has joined #ruby
guacamole has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
aryaching has quit []
akkmaxon has quit [Quit: akkmaxon]
dfinninger has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
davedev24 has joined #ruby
bruce__lee has joined #ruby
Chewy11212 has joined #ruby
northfurr has quit [Client Quit]
freerobby has quit [Quit: Leaving.]
dcunit3d has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
bruce_lee has quit [Ping timeout: 245 seconds]
freerobby has joined #ruby
Rodya_ has joined #ruby
Bloodshot has joined #ruby
momomomomo has joined #ruby
arthurix has quit [Remote host closed the connection]
bluOxigen_ has joined #ruby
uri_ has joined #ruby
joonty has joined #ruby
bluOxigen has quit [Ping timeout: 272 seconds]
aegis3121 has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.4-dev]
arthurix has joined #ruby
jam_ has joined #ruby
caffeinic has quit [Remote host closed the connection]
freerobby has quit [Client Quit]
Rodya_ has quit [Ping timeout: 256 seconds]
Chewy11212 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jackjackdripper has joined #ruby
troulouliou_div2 has quit [Remote host closed the connection]
dlitvak_ has joined #ruby
last_staff has joined #ruby
jhn has joined #ruby
skade has joined #ruby
jam_ has quit [Ping timeout: 256 seconds]
arup_r has quit []
dlitvak has quit [Ping timeout: 264 seconds]
edwinvdgraaf has joined #ruby
Xeago has joined #ruby
jottr has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
bigkevmcd has quit [Ping timeout: 276 seconds]
B1n4r10 has quit [Ping timeout: 240 seconds]
ajf- has joined #ruby
karapetyan has quit [Remote host closed the connection]
sandstrom has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
uri_ has quit [Quit: --]
Toledo|gone has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
uri_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
Encapsulation has quit [Quit: Leaving]
caffeinic has joined #ruby
pulgolino has joined #ruby
davedev2_ has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
dlitvak_ has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
uri_ has quit [Client Quit]
fmcgeough has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
jottr has quit [Ping timeout: 240 seconds]
mhib has quit [Ping timeout: 265 seconds]
[Butch] has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
volty has quit [Quit: Konversation terminated!]
TomyLobo has joined #ruby
krobzaur has joined #ruby
kt2 has joined #ruby
techietrash has quit [Quit: Bye! <(^_^<)]
paultreny has quit [Quit: ¯\_(ツ)_/¯]
usershel_ has quit [Read error: Connection reset by peer]
usershell has joined #ruby
davedev24 has joined #ruby
<adaedra> >> [*?⚀..?⚅].sample
<ruby[bot]> adaedra: # => "⚃" (https://eval.in/502275)
<adaedra> zambini: ^
Martiini has joined #ruby
shadoi has joined #ruby
<zambini> :) Ruby has everything
davedev2_ has quit [Ping timeout: 260 seconds]
uri_ has joined #ruby
momomomomo has quit [Quit: momomomomo]
uri_ has quit [Client Quit]
pdoherty has quit [Ping timeout: 240 seconds]
psy_ has quit [Read error: No route to host]
joonty has quit [Ping timeout: 255 seconds]
baweaver has joined #ruby
krz has quit [Ping timeout: 245 seconds]
Encapsulation has joined #ruby
rehat has quit [Ping timeout: 265 seconds]
SCHAAP137 has quit [Ping timeout: 240 seconds]
chadhs has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
dorei has quit []
psyq has joined #ruby
asmodlol has quit [Ping timeout: 245 seconds]
dorei has joined #ruby
uri_ has joined #ruby
mhib has joined #ruby
failshell has quit []
uri_ has quit [Client Quit]
asmodlol has joined #ruby
FernandoBasso has quit [Quit: Leaving]
bluOxigen has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
baweaver has quit [Remote host closed the connection]
wolffles has joined #ruby
bluOxigen_ has quit [Ping timeout: 264 seconds]
ta has quit [Read error: Connection reset by peer]
JohnT has joined #ruby
ta has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
slawrence00 has quit [Ping timeout: 255 seconds]
<wolffles> cant figure out how to update my version of ruby
treehug88 has joined #ruby
<pipework> wolffles: how'd you install it?
<adaedra> how did you install ruby?
nfk|laptop has quit [Ping timeout: 264 seconds]
<adaedra> stop being so fast, pipework.
<wolffles> i think my mac came with it
<adaedra> 2.0 ?
<wolffles> yea
<adaedra> it may get updated with next OS X release. You can install another one with brew or ruby-install.
<pipework> wolffles: that's a system ruby, you should leave that as is. Install another with chruby and ruby-install.
<pipework> I install ruby-install and chruby with homebrew, myself.
<aegis3121> I tend to use rbenv for mine.
<pipework> adaedra: shims :(
<adaedra> if you need only one ruby, chruby is not really needed.
<pipework> rehashing :(
<TomPeed> do people still use rvm?
<adaedra> pipework: I think you're mistaken on the person.
<pipework> aegis3121: shims :(
Guest69790 has quit [Quit: leaving]
<pipework> adaedra: You are right!
<adaedra> TomPeed: some do. You can if you like the bloat.
<aegis3121> hah. It's true. it has its problems.
<pipework> TomPeed: I use RVM for head rubies and patches.
<aegis3121> But, that said, it feels fairly lightweight and easier to use, particularly coming from rvm.
Limix has quit [Quit: Limix]
<pipework> You can use it with chruby+ruby-install
<carella> What's wrong with rvm?
<pipework> carella: Big and wieldy.
zacts has joined #ruby
<adaedra> A bit bloated.
<pipework> chruby and ruby-install can both be read in a single sitting.
techietrash has joined #ruby
techietrash has quit [Changing host]
techietrash has joined #ruby
pdoherty has joined #ruby
<carella> Does not sound like constructive argument :)
paultreny has joined #ruby
Limix has joined #ruby
<pipework> carella: Less code, and simpler code isn't a great win when considering code you'll be depending on?
paultreny is now known as Guest18948
ur5us has joined #ruby
voidDotClass has joined #ruby
<voidDotClass> anyone know how to get rspec expects to work with boolean values? e.g i'm doing expect (! acct.valid?) but that seems to always work no matter what
<pipework> chruby and ruby-install each do a single thing well.
<adaedra> expect().to be_truthy
<adaedra> expect().to be_falsy
<aegis3121> or to be true, if you're looking for the actual thing
<aegis3121> expect().to be true/to be false
<pipework> aegis3121: Doesn't that raise warnings in rspec?
<aegis3121> Never has for me...
<pipework> complains about how you should use truthiness.
<pipework> I think you'd need expect(something).to eq(true) these days
baweaver has joined #ruby
<aegis3121> I dunno. We use Rspec 3.1.0 and have no complaints from RSpec about it.
sarkis has quit [Ping timeout: 255 seconds]
<pipework> `be true` works though.
<aegis3121> yep
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
<aegis3121> which is what we do, so.... safe lol
pandaant has quit [Remote host closed the connection]
<pipework> aegis3121: I was thinking be_true, which was deprecated and removed.
symbol_ has joined #ruby
<aegis3121> No worries :) Didn't realize it had, so still good to know.
northfurr has joined #ruby
Xeago has quit [Ping timeout: 272 seconds]
<voidDotClass> expect (acct.valid?).to eq false
<voidDotClass> NoMethodError:
<voidDotClass> undefined method `to' for false:FalseClass
guacamole has joined #ruby
<pipework> voidDotClass: Don't cross-post.
<pipework> One channel please.
sarkis has joined #ruby
shadoi has quit [Quit: Leaving.]
domgetter has joined #ruby
hannelita has joined #ruby
kadoppe has quit [Ping timeout: 250 seconds]
mchu has quit [Quit: mchu]
kadoppe has joined #ruby
jhn has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhn has joined #ruby
Rodya_ has joined #ruby
jgt has quit [Ping timeout: 255 seconds]
guacamol_ has joined #ruby
dhollinger has joined #ruby
PedramT has joined #ruby
arup_r has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
guacamole has quit [Ping timeout: 246 seconds]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
baweaver has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 256 seconds]
PedramT has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
preyalone has joined #ruby
<voidDotClass> Is there a recommended way of setting config to be shared between RSpec and Factorygirl? E.g a test password constant
sftrabbit has quit [Quit: sftrabbit]
Rodya_ has quit [Ping timeout: 264 seconds]
<f0ster> voidDotClass: env var ?
jhn has quit [Quit: Textual IRC Client: www.textualapp.com]
<voidDotClass> fold3 ty
<voidDotClass> oops, f0ster
<f0ster> np :)
cats is now known as SASL
dhollinger has quit [Ping timeout: 260 seconds]
cdg has quit [Remote host closed the connection]
PedramT has joined #ruby
cdg has joined #ruby
ta has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
ta has joined #ruby
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
sarkis has quit [Quit: WeeChat 1.4]
ericfreese has joined #ruby
PedramT has quit [Remote host closed the connection]
m1dnight_ has quit [Quit: WeeChat 1.4-dev]
ericfreese has quit [Client Quit]
m1dnight_ has joined #ruby
m1dnight_ has quit [Client Quit]
bruce__lee has quit [Changing host]
bruce__lee has joined #ruby
bruce__lee is now known as bruce_lee
PedramT has joined #ruby
<wolffles> i cant seem to call this method correctly… can someone show me what im doing wrong?
baweaver has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 276 seconds]
symm- has joined #ruby
chadhs has joined #ruby
uri_ has joined #ruby
gix has quit [Ping timeout: 246 seconds]
Xeago has joined #ruby
spider-mario has joined #ruby
norc has joined #ruby
who42 has joined #ruby
kith has quit [Quit: kith]
<norc> Ox0dea: #jruby is wonderful! Everybody there is just constantly talking about internals. :D
curses has joined #ruby
dlitvak has joined #ruby
acidrainfall has joined #ruby
zeroDivisible has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
dlitvak has joined #ruby
<acidrainfall> hey guys - erb question. I am passing in a value that may be defined, or undef. It's undef by default. I was using this format: http://fpaste.org/310916/14527986/ which didn't work. I've also tried if scope['::var'].defined? and that didn't work either.
<toretore> wolffles, you're probably passing an array
<acidrainfall> oh right, != undef is invalid - !=nil still came in true
<aegis3121> wolffles: You'r etrying to call #keys on an Array
malconis has quit [Ping timeout: 265 seconds]
<toretore> wolffles, choose either 1) pass 1 array with no splat or 2) pass as list of arguments with splat
malconis has joined #ruby
<toretore> wolffles, hint: the correct way is #1
<aegis3121> If he's wanting a Hash, he just...shouldn't splat it, though.
<norc> acidrainfall: I think you may want to ask your question in a puppet related place.
<acidrainfall> the issue is in the .erb template
<wolffles> the thing is the code itself is from ruby monk, they way they test it… the code executes jsut fine… however when i try to call it myself it wont work
<acidrainfall> I figured ruby might be more helpful
<acidrainfall> :(
<norc> acidrainfall: We could be
dhollinger has joined #ruby
<norc> acidrainfall: But undef is not a concept that Ruby has.
darkf has quit [Quit: Leaving]
edwinvdgraaf has quit [Read error: Connection reset by peer]
edwinvdgraaf has joined #ruby
<acidrainfall> how would you test for nil in a .erb?
<norc> .nil?
<acidrainfall> oh
<wolffles> im not sure thats why im asking
<acidrainfall> don't tell me it's that easy
<norc> acidrainfall: It is that easy.
<toretore> wolffles, show more code
dlitvak has quit [Remote host closed the connection]
<wolffles> more code from what?
<aegis3121> wolffles: https://eval.in/502312
<norc> &ri NilClass#nil?
<acidrainfall> norc: well damn.
djbkd has joined #ruby
<norc> &ri Object#nil?
<toretore> wolffles, well, first of all, i can't see anywhere in the code you posted that you actually call the method
who42 has quit [Read error: Connection reset by peer]
<norc> acidrainfall: These two methods allow for .nil? to work.
<norc> In all cases.
eqdw has joined #ruby
<norc> For any object.
<aegis3121> toretore the method #keys?
eqdw has left #ruby [#ruby]
eqdw has joined #ruby
<aegis3121> Should be line 8.
<eqdw> hi #ruby. I’m trying to solve a mystery.
<acidrainfall> norc: and the "if not nil" would be !object.nil?
<toretore> it was the butler
who42 has joined #ruby
<eqdw> work just suffered a severe P0 because we used “!=~” when we meant to use “!~”
<acidrainfall> norc: is that correct?
<eqdw> these two things do not do the same thing
who42 has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
<norc> acidrainfall: Or better use "unless" to negate.
<eqdw> “!=~” does not exist, as far as I can tell
<wolffles> toretore: i thought the mine.cost([{rice:2,noodles:2},{rice:1,noodles:1}])
<norc> acidrainfall: Yes it would.
<norc> eqdw: !~
<eqdw> and i’m trying to figure out, if it doesn’t exist, wtf does it do
<wolffles> was the calling
<acidrainfall> I could do unless.
<acidrainfall> Okay thanks a lot
who42 has joined #ruby
<aegis3121> wolffles: If you're expecting an array of Hashes, I would call like so: cost({a: 2}, {b: 3}) The splat will create an Array, no need to pass it as one.
<norc> acidrainfall: Also just for competions sake
m1dnight_ has joined #ruby
<eqdw> pry-doc shows me the C for =~ and !~ but says !=~ doesn’t exist
<toretore> wolffles, whoops, sorry, didn't see that
who42 has quit [Read error: Connection reset by peer]
<eqdw> but “123” !=~ /1/ returns true
<norc> acidrainfall: obj == nil is also possible (but dont do that. just use .nil?)
<wolffles> ahh
<eqdw> !=~ is also ungooglable so
<aegis3121> Or, don't splat and just force it as an array cost[{a: 2}, {b: 3}]
<wolffles> ill try taht aegis3121:
<acidrainfall> norc: :) thank you
who42 has joined #ruby
who42 has quit [Read error: Connection reset by peer]
<eqdw> I’m going to dive through MRI source soon but was hoping y’all might have pointers ?
<toretore> wolffles, so which part of this is your code and which is not?
<domgetter> Is !=~ a method? I thought it was just !~
<norc> eqdw: I have plenty.
<norc> eqdw: What do you need?
who42 has joined #ruby
who42 has quit [Read error: Connection reset by peer]
<eqdw> domgetter: !=-~ is a method but it does not do what you think it does
who42 has joined #ruby
who42 has quit [Read error: Connection reset by peer]
<eqdw> norc: definition of String#!=~
<wolffles> toretore: anything with “mine “ ,in it pretty much the last 2 lines
<toretore> eqdw, !=~ doesn't make any sense, replace it with something else
who42 has joined #ruby
<lucasb> maybe it's the the unary "~"
<eqdw> toretore: yes. We did that. But I’m trying to figure out why “123” !=~ /1/ returns true instead of nomethoderror
<eqdw> oh
<eqdw> oh my god
zambini has left #ruby [#ruby]
zambini has joined #ruby
<eqdw> OH MY GOD
<eqdw> lucasb: <3
<eqdw> I bet you’re right
<toretore> wolffles, ok so the Restaurant class is something you get from a lib?
symbol_ has quit [Ping timeout: 250 seconds]
<norc> eqdw: Do you want to be spoon fed or just pointers to help you get there by yourself?
who42 has quit [Read error: Connection reset by peer]
<eqdw> norc: the latter
<eqdw> but I think lucas just solved it
who42 has joined #ruby
who42 has quit [Read error: Connection reset by peer]
<domgetter> !=~ is solved
<wolffles> toretore: i got it from rubymonk
<acidrainfall> norc: is $var = '' equal to $var = nil?
who42 has joined #ruby
<norc> acidrainfall: Nope.
<acidrainfall> figured
<acidrainfall> thanks
<norc> acidrainfall: You can test this fairly easily:
mohamedAziz111 has quit [Ping timeout: 260 seconds]
<toretore> wolffles, does that mean you can't change it?
<norc> >> ''.nil?
<ruby[bot]> norc: # => false (https://eval.in/502319)
<toretore> (i don't know what rubymonk is)
<norc> eqdw: In all implementions, the ruby methods get added at the very bottom.
who42 has quit [Read error: Connection reset by peer]
<norc> eqdw: Look for your ruby method name there, and then follow the breadcrumbs.
<wolffles> toretore: thats there code im just figuring out why i cant call the method, but they can check the answer and say it works.
<wolffles> toretore: i just want to know how they called the method
superscott has joined #ruby
who42 has joined #ruby
dhalsim has quit [Remote host closed the connection]
who42 has quit [Read error: Connection reset by peer]
djbkd has quit [Ping timeout: 265 seconds]
<toretore> wolffles, ok, so the reason you're having this problem is because you don't understand how splat (*args) works
<norc> acidrainfall: There is only one value in Ruby that is nil. nil itself.
who42 has joined #ruby
<toretore> wolffles, a splat will take all arguments given to a method call and gather them in an array
<norc> acidrainfall: Also there are only 2 values in Ruby that evaluate to falsey: nil and false.
who42 has quit [Read error: Connection reset by peer]
<domgetter> wolffles: If I have def add(*numbers)...end, then add(1, 2, 3) will work, but add( [1, 2, 3] ) will not work
<norc> acidrainfall: And that is probably all there is to say about nil.
<toretore> wolffles, you are giving it 1 argument, which then gets put into a single-element array
<superscott> odd question, but has anybody ever had Process.alive? give you the incorrect status of a process? I'm thinking this is more than likely a fault of the OS, but just wondering if anybody else has seen Ruby do anything weird in that area.
who42 has joined #ruby
<toretore> wolffles, the only element in this array is another array, because that's what you're passing
<norc> superscott: Which ruby implementation are you on?
who42 has quit [Read error: Connection reset by peer]
uri_ has quit [Quit: --]
<superscott> norc: 2.2.2
<superscott> mir
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<superscott> mri
joonty has joined #ruby
elaptics is now known as elaptics`away
<toretore> wolffles, thus, inside the method, orders == [[{rice:2,noodles:2},{rice:1,noodles:1}]]
who42 has joined #ruby
who42 has quit [Read error: Connection reset by peer]
who42 has joined #ruby
<eqdw> thanks everyone
agentmeerkat has quit [Ping timeout: 265 seconds]
kalopsian has quit [Ping timeout: 240 seconds]
eqdw has left #ruby [#ruby]
who42 has quit [Read error: Connection reset by peer]
<norc> &ri Process#alive?
<`derpy> No results
burbus has quit [Quit: Leaving]
<toretore> >> [[{rice:2,noodles:2},{rice:1,noodles:1}]].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + @menu[key]*order[key] }; end # wolffles
<voidDotClass> hmm, i'm trying to use factorygirl with rspec, for some reason i keep getting nameError unitialized for :bob even though I'm defining :bob in my factory.rb
<ruby[bot]> toretore: # => undefined method `keys' for [{:rice=>2, :noodles=>2}, {:rice=>1, :noodles=>1}]:Array (NoMethodError) ...check link for more (https://eval.in/502320)
who42 has joined #ruby
<toretore> >> [{rice:2,noodles:2},{rice:1,noodles:1}].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + @menu[key]*order[key] }; end # wolffles
<ruby[bot]> toretore: # => undefined method `[]' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/502321)
<voidDotClass> it was working a couple mins ago, i've done something and now its not working
<toretore> shit
<norc> superscott: There is no such method.
who42 has quit [Read error: Connection reset by peer]
<toretore> oh
<norc> superscott: Have you been naughty and monkey patched a core ruby class?
<norc> And then complain that it may not work?
<toretore> >> menu=[rice:3,noodles:2]; [{rice:2,noodles:2},{rice:1,noodles:1}].inject(0) do |total_cost, order| total_cost + order.keys.inject(0) {|cost, key| cost + menu[key]*order[key] }; end # wolffles
who42 has joined #ruby
<ruby[bot]> toretore: # => no implicit conversion of Symbol into Integer (TypeError) ...check link for more (https://eval.in/502322)
who42 has quit [Read error: Connection reset by peer]
<toretore> ok i stop now
<superscott> norc: oh sorry, i misspoke, Thread.alive? is what i was referring to
<norc> toretore: You can play with ruby[bot] in a query. :)
who42 has joined #ruby
<wolffles> toretore: but you see what i mean now?
who42 has quit [Read error: Connection reset by peer]
<toretore> wolffles, that doesn't have anything to do with the original problem
<toretore> wolffles, do you understand what i was saying about splat?
karapetyan has joined #ruby
who42 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
uri_ has joined #ruby
who42 has quit [Read error: Connection reset by peer]
<norc> superscott: Im looking at the implementation now. At first glance I cannot see how this method could possible be bugged.
FernandoBasso has joined #ruby
<norc> superscott: Do you have a test case?
northfurr has quit [Quit: northfurr]
<wolffles> toretore: yeah, but i didnt just do this call and give up, ive been trying to solve it through trial and error cuz it doesnt make sense anymore
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
who42 has joined #ruby
<wolffles> ive done your method and it still doesnt return the “cost” its suppose to
<wolffles> im still missing something
<toretore> wolffles, yes, but it returns a different error
<norc> superscott: Or maybe your thread is stopped?
<superscott> norc: i don't think it's bugged in Ruby, because it normally works as expected. i think i'm hitting some weird OS issue
<toretore> so now you've solved one problem and can move on to the next
usershell has quit [Remote host closed the connection]
Blaguvest has quit [Remote host closed the connection]
<norc> superscott: There is no interaction with the OS in this part that I can see.
<superscott> norc: do you have a link to the file you're looking at?
SCHAAP137 has joined #ruby
<norc> superscott: It is just a wrapper for this: https://github.com/ruby/ruby/blob/trunk/thread.c#L2639
<wolffles> toretore: i see what your saying now the new error would be []': no implicit conversion of Symbol into Integer?
joonty has quit [Ping timeout: 260 seconds]
<norc> superscott: So the only possible way this method could return a faulty value is if the thread was not changed properly.
<toretore> wolffles, https://eval.in/502326
sftrabbit has joined #ruby
<superscott> norc: okay. i see what you're saying now.
<toretore> wolffles, [rice: 3, noodles: 2]
karapetyan has quit [Ping timeout: 260 seconds]
mondok has joined #ruby
<superscott> norc: can you think of a random example where that might be the case?
dlitvak has joined #ruby
<norc> superscott: Do you want just random examples from the top off my head, or something likely?
shadoi has joined #ruby
firstdayonthejob has joined #ruby
<superscott> norc: lol either is fine :D
uri_ has quit [Quit: --]
djcp has quit [Quit: WeeChat 1.0.1]
<norc> superscott: Any number of buffer overflows in absolutely unrelated codes can do bizarre things. That is the completely random example
<superscott> lol
<superscott> <3 :D
<wolffles> … :’[ so many hours wasted toretore all so it can be fixed by putting puts *i cri*
djcp has joined #ruby
<toretore> wolffles, no, that was not the problem
<toretore> read the code carefully
<norc> superscott: On a more realistic note... how is your thread stopped?
dlitvak has quit [Remote host closed the connection]
gix has joined #ruby
resin has left #ruby [#ruby]
roshanavand has joined #ruby
<superscott> norc: the thread is being killed with: Process.kill(:SIGKILL, thread.pid)
<norc> What
ixti has quit [Quit: WeeChat 1.3]
roshanavand has quit [Remote host closed the connection]
minimalism has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
<toretore> superscott, maybe it's time to gist some code
robbyoconnor has quit [Ping timeout: 250 seconds]
<superscott> norc: yeah. =/ i kinda think that might be the wrong thing to be doing -- i'm working with some legacy code
<norc> superscott: Are you absolutely sure you want that code to execute?
<norc> Cuz Im just askin...
uri_ has joined #ruby
<superscott> norc: yeah we're keeping track of which pid is being killed, as far as i can tell
<norc> superscott: Can you tell me what "pid" stands for?
<superscott> norc: process id
<norc> superscott: Now do me a favour and read out the following aloud:
<norc> &ri Process#kill
<`derpy> No results
<norc> &ri Process::kill
pdoherty has quit [Ping timeout: 272 seconds]
<superscott> norc: lol oh my. that might explain some things.
<norc> And tell me whether your code makes any sense to you still.
SuperTux88 has quit [Quit: WeeChat / ZNC]
Xeago has quit [Remote host closed the connection]
<norc> superscott: Once you have settled with your mistake, feel free to ask the real question you need the answer to. ;-)
roshanavand has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 272 seconds]
ixti has joined #ruby
rkazak has joined #ruby
<superscott> norc: well, how we're using it is how it's shown in the docs? http://ruby-doc.org/core-2.2.2/Process.html#method-c-kill unless i'm misunderstanding what you're saying?
<norc> superscott: Threads are not Processes.
<norc> Repeat after me.
<lucasb> yeah, chapter 2 of tanenbaum OS book :)
<superscott> norc: right. okay. i'm with you now.
ldnunes has quit [Quit: Leaving]
moresilenter has quit [Ping timeout: 252 seconds]
<norc> superscott: Process.kill ends is the same as int kill(pid_t pid, int sig); which works on processes.
yardenbar has joined #ruby
<norc> superscott: So are you now ready to ask the important question? ;-)
SASL is now known as cats
<superscott> norc: so do ruby threads have their own process id?
<norc> superscott: Do cats have their own dog name?
<cats> I swear half of my pings come from this channel
agentmeerkat has joined #ruby
<toretore> lol
<norc> cats: Be glad you dont hang around ##networking
hannelita has quit [Ping timeout: 245 seconds]
fourq is now known as fourq|away
<superscott> norc: but i thought a ruby thread was spun up as a child process of the main ruby process? or am i completely going off the rails here
<superscott> and going off the rails is probably a bad phrase to use in a ruby channel
yqt has joined #ruby
yfeldblum has joined #ruby
<domgetter> superscott: No, ruby Threads are what are known as "green threads". they are part of the parent process
<domgetter> they don't use their own cores, but they're good for asynchonous IO like grabbing a bunch of data from different places
<superscott> domgetter: okay cool. thank you. i think it's coming together now -- still trying to understand what we had was ever working.
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
robbyoconnor has joined #ruby
<domgetter> It's possible that it was "working" just fine, just not as fast as you thought
<norc> superscott: Next I have a question.
kies^ has quit [Ping timeout: 250 seconds]
<norc> &ri Thread#pid
<`derpy> No results
<norc> &ri Thread::pid
<`derpy> No results
<norc> superscott: Have you fucked with the Thread class by any chance=
mchu has joined #ruby
aegis3121 has joined #ruby
<superscott> norc: yeah, i think the variables in the code are not actually what classes they are
<norc> superscott: Sharing completely wrong pseudo code is a good way of wasting our time.
<superscott> norc: it's not pseudo code, it's actually what i have in front of me. so i think this is partly why i'm confused right now
last_staff has quit [Quit: last_staff]
<superscott> because we're calling Processes threads, and Threads processes in our code
<norc> superscott: Alright I apologize then.
shadoi has quit [Quit: Leaving.]
govg_ has quit [Quit: leaving]
jackjackdripper has quit [Quit: Leaving.]
<norc> superscott: Are you guys working on VxWorks 653 by any chance?
<superscott> norc: no worries, it's all good. you're helping me figure it out, so i'm thankful :D
<norc> Because that is about the only context in the world this mixup I can understand this in.
govg has joined #ruby
<superscott> norc: no haha, i think somebody just threw up code and didn't realize the names were incorrect
<norc> superscott: I recommend you start by prying into the code.
<superscott> norc: yeah agreed. i think i know where i need to start digging now. thanks for you help good sir :D
<norc> superscott: And by prying I meant use the gem "pry"
blackmesa has quit [Ping timeout: 240 seconds]
<superscott> norc: yeah pry is life
<norc> &ri Thread#stop
<`derpy> No results
kalopsian has joined #ruby
<norc> &ri Thread#exit
<norc> superscott: Just for reference by the way.
<superscott> norc: thanks
cpup has quit [Ping timeout: 264 seconds]
ico has quit [Remote host closed the connection]
babblebre has quit [Quit: Connection closed for inactivity]
Rodya_ has joined #ruby
freerobby has joined #ruby
B1n4r10 has quit [Ping timeout: 255 seconds]
dlitvak has joined #ruby
arup_r has quit []
Xeago has joined #ruby
baweaver has joined #ruby
nettoweb has quit [Ping timeout: 240 seconds]
jam_ has joined #ruby
dlitvak has quit [Remote host closed the connection]
mhib has quit [Ping timeout: 260 seconds]
fourq|away is now known as fourq
The_Phoenix has quit [Read error: Connection reset by peer]
Rodya_ has quit [Ping timeout: 260 seconds]
yardenbar has quit [Ping timeout: 265 seconds]
Dimik has joined #ruby
roshanavand has joined #ruby
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
malconis has quit [Remote host closed the connection]
emilford has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
<voidDotClass> what's wrong with this: expect acct.password.to eq(TEST_PW)
malconis has joined #ruby
dlitvak has joined #ruby
<voidDotClass> gives: ArgumentError: bad value for range
aspire has joined #ruby
<norc> voidDotClass: a lot.
Snowy has joined #ruby
<voidDotClass> like?
<domgetter> expect(acct.password).to eq(something)
<voidDotClass> yes?
<norc> ^^
<domgetter> you have to call .to on what expect returns, not on the thing itself
<norc> voidDotClass: .to is what you call on whatever expect(...) returns.
chadhs has quit [Quit: Textual IRC Client: www.textualapp.com]
<voidDotClass> TY
<norc> expect(something).to be_something(else)
<norc> It always looks like that. :)
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
prestorium has quit [Quit: Leaving]
kalopsian has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
pawnbox has quit [Remote host closed the connection]
bb010g has quit [Quit: Connection closed for inactivity]
ico has joined #ruby
dlitvak has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 245 seconds]
snockerton has joined #ruby
centrx has joined #ruby
aspire has quit [Quit: Leaving]
agentmeerkat has quit [Ping timeout: 276 seconds]
dpg_ has quit [Read error: Connection reset by peer]
al2o3-cr has quit [Quit: WeeChat 1.3]
dpg_ has joined #ruby
blackgoat has joined #ruby
RobertBirnie has quit [Ping timeout: 245 seconds]
rcs has quit [Ping timeout: 245 seconds]
phreakocious has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
G has quit [Ping timeout: 240 seconds]
bmn has quit [Ping timeout: 240 seconds]
papercode has quit [Ping timeout: 246 seconds]
jottr has quit [Ping timeout: 255 seconds]
mblagden has quit [Ping timeout: 245 seconds]
ur5us has quit [Read error: Connection reset by peer]
anekos has quit [Ping timeout: 272 seconds]
kenichi has quit [Ping timeout: 272 seconds]
miah has quit [Ping timeout: 240 seconds]
dfinninger has quit [Remote host closed the connection]
ur5us has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
kalzz has joined #ruby
mhib has joined #ruby
edwinvdgraaf has joined #ruby
centrx has quit [Read error: Connection reset by peer]
hayden_ has quit [Quit: Connection closed for inactivity]
centrx has joined #ruby
eam has quit [Ping timeout: 250 seconds]
miah has joined #ruby
G has joined #ruby
RobertBirnie has joined #ruby
dcunit3d has quit [Ping timeout: 240 seconds]
hahuang61 has quit [Ping timeout: 260 seconds]
vF3hNGxc47h8 has joined #ruby
PedramT has quit [Remote host closed the connection]
pdoherty has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
Snowy_ has joined #ruby
kith has joined #ruby
puria has quit [Quit: Leaving]
Cohedrin has joined #ruby
kenichi has joined #ruby
phreakocious has joined #ruby
marienz has quit [Ping timeout: 604 seconds]
bmn has joined #ruby
pawnbox has joined #ruby
jottr has joined #ruby
<voidDotClass> Is it possible to define a private helper method which only exists within a particular spec?
ur5us has quit [Remote host closed the connection]
kalz has joined #ruby
eam has joined #ruby
rcs has joined #ruby
Bloodshot has quit [Read error: Connection reset by peer]
<ljarvis> voidDotClass: just define it within the context of that spec
<Ox0dea> Bish: Still about?
<jbrhbr> you can probably use let() with a lambda or something too
Bloodshot has joined #ruby
mblagden has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
<voidDotClass> ljarvis, if i describe it within the 'describe' block, is that the same as a private method?
djbkd has joined #ruby
<ljarvis> voidDotClass: I don't understand what you mean exactly, why do you specifically want it to be private? and private to what, exactly?
ta has quit [Read error: Connection reset by peer]
anekos has joined #ruby
marienz has joined #ruby
ta has joined #ruby
hahuang65 has joined #ruby
<ljarvis> but yes if you define it within the describe block it will only be accessible within that describe block or a nested block
mhib has quit [Quit: Leaving]
<ljarvis> (I believe, it should be easy to test, of course)
Ishido has quit [Remote host closed the connection]
<voidDotClass> ljarvis, i mean if i have another method defined with the same name elsewhere, it shouldn't conflict
<ljarvis> voidDotClass: try it?
papercode has joined #ruby
<ljarvis> give it a shot
<ljarvis> go wild
dcunit3d has joined #ruby
<Ox0dea> For science!
dlitvak has joined #ruby
tvw has quit [Remote host closed the connection]
roshanavand has joined #ruby
gbgdev has quit [Remote host closed the connection]
agentmeerkat has joined #ruby
benlieb has joined #ruby
snockerton1 has joined #ruby
snockerton1 has quit [Client Quit]
yqt has quit [Ping timeout: 245 seconds]
codecop has quit [Remote host closed the connection]
Snowy_ has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
baweaver has joined #ruby
jbrhbr has quit [Quit: Leaving.]
bronson has quit [Remote host closed the connection]
zambini has quit [Quit: Leaving.]
kalopsian has joined #ruby
sandstrom has joined #ruby
snockerton has quit [Ping timeout: 265 seconds]
ducklobster has joined #ruby
imperator has joined #ruby
dlitvak has quit [Ping timeout: 255 seconds]
<acidrainfall> norc: sorry, lunch. falsey?
_djbkd has quit [Remote host closed the connection]
<Ox0dea> acidrainfall: Not truthy.
<acidrainfall> obviously not truthy
argentdrake has joined #ruby
_djbkd has joined #ruby
<norc> acidrainfall: false != nil, but they both fail to satify for "if" for example.
<acidrainfall> Ah I see
<argentdrake> Hello fellow ruby smiths, I'm looking for help changing my rails version on a vagrant box running server ubuntu
<acidrainfall> The difference between nil and undef is that undef marks the variable as without definition, where nil is a value of nil?
<acidrainfall> so something *has* a value, a value of nil.
<argentdrake> I've tried several google results but none seem to work...any suggestions?
<norc> acidrainfall: undef is not a ruby keyword.
<havenwood> argentdrake: Tried updating your Gemfile, bundling and running tests? Problem?
<acidrainfall> norc: right but aren't they slightly different concepts?
<havenwood> argentdrake: What are you running into?
<norc> >> blablabla
<ruby[bot]> norc: # => undefined local variable or method `blablabla' for main:Object (NameError) ...check link for more (https://eval.in/502337)
<norc> acidrainfall: This is the only notion Ruby has of undefined things.
<argentdrake> havenwood: I'm using the agile rails dev book, it instructs me to input : gem install rails --version 3.2.0
<Ox0dea> >> [defined?(nil), defined?(blah)] # acidrainfall
<ruby[bot]> Ox0dea: # => ["nil", nil] (https://eval.in/502338)
SuperTux88 has joined #ruby
<argentdrake> havenwood: I do so, and it spits out rails 4.2.5 for some reason
<acidrainfall> interesting
<acidrainfall> I like Ruby.
<acidrainfall> The more I get into it the more comfortable I get with it.
<norc> Ox0dea: Holy.
<Ox0dea> norc: ?
<argentdrake> havenwood: When I check installed gems, It lists it as installed "rails (4.2.5, 3.2.0)
rkazak has quit [Ping timeout: 240 seconds]
<norc> Ox0dea: I was not aware of defined? in the slightest.
<Ox0dea> Really?!
<norc> Yes really!
<Ox0dea> Fancy that.
<ljarvis> >> defined? gsub
<Ox0dea> It's a keyword.
<ruby[bot]> ljarvis: # => nil (https://eval.in/502339)
<ljarvis> >> defined? puts
<norc> Ox0dea: There is no way it couldn't.
<ruby[bot]> ljarvis: # => "method" (https://eval.in/502340)
<Ox0dea> norc: Just so.
nfk|laptop has joined #ruby
_djbkd has quit [Ping timeout: 240 seconds]
<Ox0dea> >> [method(:p), (undef p), (method(:p) rescue $!.class)] # acidrainfall
<ruby[bot]> Ox0dea: # => /tmp/execpad-1cc216244d2c/source-1cc216244d2c:1:in `<main>': undefined method `p' for main:Object (N ...check link for more (https://eval.in/502341)
guacamole has joined #ruby
<Ox0dea> Whoops.
<Ox0dea> Anyway, `undef` is a keyword.
<Ox0dea> But it's for undefining methods, not representing nonexistence.
<acidrainfall> interesting
<acidrainfall> so it's usedful for clearing definitions
<Ox0dea> Yeah.
<ljarvis> >> undef puts; puts
<ruby[bot]> ljarvis: # => /tmp/execpad-46277a325521/source-46277a325521:4:in `rescue in <main>': undefined method `puts' for m ...check link for more (https://eval.in/502342)
<acidrainfall> These things like defined? - they can be used as defined?(var) and var.defined? yeah?
<acidrainfall> they can be used both ways?
<Ox0dea> acidrainfall: Nah.
<norc> Ox0dea: I was not aware of that either. But then again I don't make it a habit to undef local methods...
<aegis3121> Ox0dea: When you say keyword, do you mean that's it's just a method defined on Object?
<Ox0dea> norc: Not a good habit, of course.
LMity has joined #ruby
<Ox0dea> aegis3121: No, I mean it's syntax.
troulouliou_dev has joined #ruby
<Ox0dea> #raise, for instance, is actually just a method on Kernel.
<norc> >> method(:raise)
<nfk|laptop> i'd like to read and write spreadsheets, nothing fancy just basic stuff, is there anything better than csv? ods sounds nice but i can't find a gem that didn't look like it was dead
<ruby[bot]> norc: # => #<Method: Object(Kernel)#raise> (https://eval.in/502343)
<norc> >> method(:undef)
<ruby[bot]> norc: # => undefined method `undef' for class `#<Class:#<Object:0x4180d34c>>' (NameError) ...check link for more (https://eval.in/502344)
<norc> aegis3121: There.
<norc> That is the difference.
<ljarvis> nfk|laptop: "better than csv"? in what way?
<aegis3121> got it then
Jackneill has quit [Ping timeout: 260 seconds]
<norc> &ri Object#undef
<`derpy> No results
<norc> aegis3121: That is from Ruby 1.9
<aegis3121> right. it also defines them as keywords
guacamol_ has quit [Ping timeout: 276 seconds]
<ljarvis> &ri undef_method
<aegis3121> the docs just give no indiciations of that beyond the URL
roshanavand has quit [Read error: Connection reset by peer]
<nfk|laptop> ljarvis, presumably by not requiring user to specify import parameters
<norc> This is the complete list of keywords.
dfinninger has joined #ruby
roshanavand has joined #ruby
<Ox0dea> 19>> Object.instance_method(:undef) rescue $! # aegis3121
<ruby[bot]> Ox0dea: # => #<NameError: undefined method `undef' for class `Object'> (https://eval.in/502347)
<norc> (The source code is unfortunately the only useful source for this)
<Ox0dea> As you can see, the documentation is wrong.
<aegis3121> norc thanks
<norc> Ox0dea: Guessing it might have been a random Japanese hack to document "undef" somehow
<Ox0dea> `undef` can't possibly be a method, since it takes an explicit method name as its argument.
<Ox0dea> norc: Sounds about right.
arian0n has quit [Quit: get trikt m8]
yfeldblum has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
<aegis3121> not as comprehensive as source, but has a short definition attached.
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
yqt has joined #ruby
<Ox0dea> >> require 'irb/completion'; IRB::InputCompletor::ReservedWords # norc aegis3121
<ruby[bot]> Ox0dea: # => (https://eval.in/502350)
<Ox0dea> Wat.
<Ox0dea> Oh, it tries to load ncurses.
curses has quit []
<Ox0dea> Anyway, that's a way to get the list of keywords, more or less.
sinkensabe has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
<norc> I have learned not to trust Ruby.
<norc> nobu has a tendency to hide things from you.
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
emilford has quit [Quit: leaving]
sinkensabe has quit [Remote host closed the connection]
yardenbar has joined #ruby
LMity has quit [Ping timeout: 256 seconds]
<Ox0dea> Alan Rickman died. :(((
<adaedra> ?ot
<ruby[bot]> this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
sinkensabe has joined #ruby
<Ox0dea> adaedra: Please turn to page 394.
<adaedra> Ox0dea, our new... celebrity.
tulak has joined #ruby
<Ox0dea> That's missing some dashes for effect.
sinkensabe has quit [Read error: Connection reset by peer]
<norc> Ox0dea: Just realised why I did not know about defined? either.
sinkensabe has joined #ruby
<norc> &ri Module#method_defined?
<norc> Is so much more sensible.
<Ox0dea> norc: Sure, but `defined?` can tell you about any kind of value.
<Ox0dea> There's also #const_defined?.
duckpuppy has quit [Ping timeout: 272 seconds]
<norc> Most of the time "any kind of value" may indicate of some bad code, especially if you don't even know whether it is a lvar or method.
<norc> I mean yeah its damn useful for ruboto (RIP)
<Ox0dea> That's true enough, but I'd certainly reach for `defined?` if I were doing something weird with gensyms.
ccooke has quit [Remote host closed the connection]
Rodya_ has joined #ruby
Xeago has quit [Remote host closed the connection]
<Ox0dea> norc: And now I'm wondering about how to obtain an lvar's "age".
<norc> Ox0dea: That is easy.
dcunit3d has quit [Ping timeout: 260 seconds]
<Ox0dea> From Ruby-land?
<norc> You just... uhm...
<norc> Heh.
<Ox0dea> Heh.
phreakocious has quit [Ping timeout: 240 seconds]
arian0n- has joined #ruby
crowell has quit [Quit: No Ping reply in 180 seconds.]
<Ox0dea> Given `foo = magic_method`, it'd be nice to be able to replace `foo` with... whatever.
<Ox0dea> But that'd require `Binding#local_variables` be returned in age-order, which I suspect isn't guaranteed.
<norc> *magic_method_or_lvar_if_the_parser_pleases
<lucasb> IRB::InputCompletor::ReservedWords.grep(/def/) <-- lists "defined" without the question mark O.o
<Ox0dea> lucasb: That it does.
<Ox0dea> It's a bug. :P
<norc> Ox0dea: Actually I think *that* is guaranteed.
kenichi has quit [Ping timeout: 240 seconds]
wolffles has quit [Quit: wolffles]
kenichi has joined #ruby
crowell has joined #ruby
crowell has quit [Changing host]
crowell has joined #ruby
alem0lars has quit [Ping timeout: 250 seconds]
Klumben has quit [Ping timeout: 250 seconds]
aupadhye has quit [Quit: Leaving]
pipework has quit [Ping timeout: 240 seconds]
phreakocious has joined #ruby
<norc> This is what Ruby uses when it learns about new lvars.
G has quit [Ping timeout: 260 seconds]
jokester has quit [Ping timeout: 250 seconds]
asthasr has joined #ruby
nettoweb has joined #ruby
mblagden_ has joined #ruby
dpg_ has quit [Ping timeout: 245 seconds]
G has joined #ruby
<norc> I mean I would have to do some digging about Binding#local_variables, but I expect it to somehow use that data.
<norc> Wait. What I just said made no real sense.
<norc> Lets just assume Im still busy cooking.
Pisuke has quit [Ping timeout: 255 seconds]
<norc> The smell...
Rodya_ has quit [Ping timeout: 276 seconds]
Sembei has joined #ruby
<Ox0dea> norc: It doesn't seem to, no.
<Ox0dea> It walks environment pointers.
ccooke has joined #ruby
dpg_ has joined #ruby
PERSIAN has joined #ruby
mblagden has quit [Ping timeout: 255 seconds]
RobertBirnie has quit [Ping timeout: 260 seconds]
<norc> Ox0dea: That makes sense.
<norc> Ox0dea: It would probably then just iterate over the lvars in order in each stack frame.
rcs has quit [Ping timeout: 264 seconds]
<lucasb> I just learned that empty parentheses "()" are synonym for nil. I didn't expect that to be valid syntax, but cool, just like Lisp :)
kenichi has quit [Ping timeout: 240 seconds]
<norc> Ox0dea: And the order of lvars there would be at the complete mercy of the compiler.
papercode has quit [Ping timeout: 246 seconds]
<Ox0dea> norc: Right.
B1n4r10 has joined #ruby
<Ox0dea> So how to stick ages on them?
<norc> Ox0dea: Well, Id still bet fair money that the order is still the same as the parser.
<Ox0dea> Or, well, I just need to know to whom we're being assigned, really.
eam has quit [Ping timeout: 255 seconds]
<Ox0dea> And I'd rather not rely on line number.
ur5us has quit [Ping timeout: 264 seconds]
<norc> lucasb: Please do not use that behaviour in production code.
<lucasb> >> ().nil?
miah has quit [Ping timeout: 276 seconds]
<norc> >> .
<ruby[bot]> norc: # => /tmp/execpad-40645840e60a/source-40645840e60a:2: syntax error, unexpected '.' (https://eval.in/502364)
<norc> >> ()
<ruby[bot]> norc: # => nil (https://eval.in/502365)
<norc> >> ().nil?
<ruby[bot]> norc: # => true (https://eval.in/502366)
<lucasb> I must have typed something wrong
eam has joined #ruby
synthroid has quit [Remote host closed the connection]
<lucasb> norc: but yeah, () looks strange unless we are in lisp land
<domgetter> Even then you'd want '()
ur5us has joined #ruby
<Ox0dea> But we are in Lisp-land!
<Ox0dea> domgetter: Implementation detail.
<norc> (((shush)))
ericfreese has joined #ruby
<norc> >> require 'ripper'; Ripper.sexp('a = 1')
<ruby[bot]> norc: # => [:program, [[:assign, [:var_field, [:@ident, "a", [1, 0]]], [:@int, "1", [1, 4]]]]] (https://eval.in/502368)
<norc> Ox0dea: Oh I actually went into that region of the compiler the other day...
<norc> Ended up in a lot of wtf.
<norc> Then I stopped and cleaned the dishes.
<norc> Seemed like the more productive thing at the time.
choke has joined #ruby
kenichi has joined #ruby
epistle is now known as epijoin
<lucasb> can I /msg ruby[bot] privately?
<adaedra> yes.
<norc> lucasb: TIAS
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
rrichardsr3 has joined #ruby
ericfreese has quit [Client Quit]
marienz has quit [Ping timeout: 604 seconds]
rcs has joined #ruby
rrichardsr3 has quit [Max SendQ exceeded]
<grill> what is the "unless" clause attached to in the following statement? ",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]" unless @roles_hash.has_key?(hostkey)
<lucasb> ruby[bot] just doesn't answer me
<lucasb> >> 'oh hai'
<norc> Ox0dea: What am looking at suggests that you can indeed trust the order.
<adaedra> lucasb: are you registered on freenode?
<lucasb> adaedra: oh, it's because of that? I'm not.
Martiini has quit [Ping timeout: 276 seconds]
<lucasb> interesting, I didn't know. thanks adaedra, norc
<Darmani> Hey kids<33
<Darmani> How is everyone today?
<adaedra> Do it. It's quick and easy, allows you to talk in #RubyOnRails and here when under moderation, lucasb.
<Darmani> adaedra<3
_djbkd has joined #ruby
dstarh has quit [Read error: Connection reset by peer]
<adaedra> Darmani: how's your hangman?
miah has joined #ruby
<Darmani> @adaedra - Hangman? o.o
<adaedra> Er, tictactoe
rrichardsr3 has joined #ruby
<adaedra> It was you, right?
<Darmani> That was me. And Lucas I believe lol
rrichardsr3 has quit [Max SendQ exceeded]
<lucasb> I have nothing to do with it
imperator has left #ruby ["Leaving"]
<adaedra> So, you did it Darmani?
<Darmani> Well I think so. I'll show you what I have.
<Ox0dea> norc: After some though, the order of #local_variables is immaterial.
duckpuppy has joined #ruby
glenny has joined #ruby
<Ox0dea> `a = 1; b = 2; c = 3; b = the_magic` wouldn't be able to make use of the information.
kiidbrian has joined #ruby
<norc> Ox0dea: Lets figure this one out regardless
Snowy has quit []
A124 has quit [Ping timeout: 265 seconds]
epijoin is now known as episplat
<Darmani> @adaedra - https://repl.it/BdyU
<grill> what is the "unless" clause attached to in the following statement? ",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]" unless @roles_hash.has_key?(hostkey)
<adaedra> Darmani: that's WIP?
tockitj has quit [Ping timeout: 276 seconds]
<adaedra> grill: unless = if not
<Darmani> @adaedra - wip?
<grill> yes. what does this statement say
<adaedra> Work in progress, Darmani
gigetoo has quit [Ping timeout: 260 seconds]
<grill> I am trying to get it to not print the statement unless the proper hash value exists
<Darmani> oh yushh. I don't think it works perfectly yet
papercode has joined #ruby
RobertBirnie has joined #ruby
gigetoo has joined #ruby
marienz has joined #ruby
davedev2_ has joined #ruby
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Anderson69s has joined #ruby
sepp2k has joined #ruby
<lucasb> registered to freenode now, ruby[bot] still ignores me
vifino has quit [Quit: Who turned this off?! D:<]
<adaedra> What do you try?
ramortegui has quit [Quit: Ex-Chat]
dlitvak has joined #ruby
<Ox0dea> adaedra: all?(&:itself?) is the default behavior.
<grill> I am getting an "unexpected keyword_end, expecting ')'" error when i run the following. what gives? (",\"chef_roles\": [" << @roles_hash[hostkey].each { |entry| p entry } << "]") unless @roles_hash.has_key?(hostkey) end
sepp2k has quit [Read error: Connection reset by peer]
<lucasb> me?
<lucasb> >> 42
<ruby[bot]> lucasb: # => 42 (https://eval.in/502374)
<adaedra> Ox0dea: duh.
<lucasb> damn, it worked now
<Darmani> @adaedra - There's at least 6 different techniques in there I've never seen before lol
<adaedra> Darmani: work on you own. There are so many ways of doing it.
<adaedra> your own*
dfinninger has quit [Remote host closed the connection]
Xeago has joined #ruby
<adaedra> Also not my best code :p
<Darmani> I'm burnt out on tic tac toe. I've been doing Codewars lately. It keeps things interesting at the very leasy.
<Darmani> least*
<Darmani> @adaedra - And if I can't find at answer I can always see how other people solved the problem ^^
kiidbrian has quit [Max SendQ exceeded]
<adaedra> Well, tic-tac-toe is an easy exercise imo
cpup has joined #ruby
<lucasb> so, just reporting that here in the channel, ruby[bot] listens to me, but privately it doesn't.
mblagden_ has quit [Quit: leaving]
dlitvak has quit [Remote host closed the connection]
<lucasb> I tried /query and /msg
<aegis3121> grill That might be easier to read if you did "\"chef_roles\": [#{@roles_hash[hostkey].join("\n")}]"
<adaedra> lucasb: what do you try privately?
dlitvak has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
<aegis3121> Using the string interpolation, I think, would be helpful.
<lucasb> the same ">> 42"
dtordable has joined #ruby
<adaedra> lucasb: note that ruby[bot] is new and it may be just a bug. I'll see what's happening.
<aegis3121> grill: though I'm not sure why you have the `end` at the end.
<lucasb> adaedra: thanks
<adaedra> but it may also be that it stops responding to pms, but i don't remember it should. But that's me; don't take it for granted.
rocfig has joined #ruby
<nfk|laptop> it seems i have been out of the loop for a while, what is this darkfish stuff see in my gem update --user-install?
<ljarvis> nfk|laptop: an rdoc template
<aegis3121> grill: Why are you having it run this chunk of code, which relies on @roles_hash[hostkey] being an Array, yet NOT doing the chunk if the @roles_hash has that key in it?
vifino has joined #ruby
<nfk|laptop> ljarvis, and how do i reap its benefits?
kith_ has joined #ruby
<adaedra> lucasb: apparently a bug.
<Ox0dea> lucasb: Can confirm that ruby[bot] doesn't respond to PMs.
<aegis3121> >> a = 5; b = 3 unless a == 5; puts b
<ruby[bot]> aegis3121: # => ...check link for more (https://eval.in/502379)
<norc> Ox0dea: Okay, my initial thought turns out to be correct after all.
<Ox0dea> norc: Environment-order?
mjc_ has quit [Quit: Connection closed for inactivity]
<norc> Ox0dea: Environment-order is necessary, and parse order within each stack frame.
<norc> Ox0dea: Note that Im only talking LASGN
Waheedi has left #ruby [#ruby]
<Ox0dea> Sure, as was I.
duckpuppy has quit [Ping timeout: 264 seconds]
dlitvak has quit [Remote host closed the connection]
<Ox0dea> Thanks for investigating.
<adaedra> Lasagna?
<Ox0dea> Lasagna assignment.
uri_ has quit [Quit: --]
jokester has joined #ruby
<lucasb> Ox0dea: I tried again. still nothing
<Ox0dea> lucasb: Samesies.
joonty has joined #ruby
<Ox0dea> lucasb: Oh, sorry, I meant that *I* can confirm.
<aegis3121> That pesky subject
s00pcan has quit [Ping timeout: 264 seconds]
<norc> Ox0dea: It should be the same for MASGN, DASGN and DASGN_CURR too, but Im too tired to verify these assumptions.
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kith has quit [Ping timeout: 260 seconds]
alem0lars has joined #ruby
zachk has quit [Quit: [0..]]
Klumben has joined #ruby
<Ox0dea> norc: Thoughts on a method being able to decide which variable its return value is to be assigned to?
dfinninger has joined #ruby
s00pcan has joined #ruby
<Ox0dea> I've got binding_of_caller at the ready. :P
kiidbrian has joined #ruby
dfinninger has quit [Remote host closed the connection]
<norc> No way without an AST or direct access to the VM that I can see.
tockitj has joined #ruby
<norc> The information resides in the setlocal + idx/lvl instruction.
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
preyalone has quit [Quit: Connection closed for inactivity]
<norc> That is the only information Ruby has about this.
yardenbar has quit [Remote host closed the connection]
dfinninger has joined #ruby
joonty has quit [Ping timeout: 246 seconds]
pdoherty has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
finisherr_ has joined #ruby
<norc> Ox0dea: Not needing to know is what makes stack machines so damn useful. ;-)
chipotle has quit [Quit: cheerio]
Voker57|2 has joined #ruby
Voker57|2 has quit [Remote host closed the connection]
smactive has joined #ruby
Voker57|2 has joined #ruby
Voker57|2 has quit [Client Quit]
<Ox0dea> norc: You're not wrong, but my soul can't abide it.
kith_ has quit [Ping timeout: 260 seconds]
jbrhbr has joined #ruby
finisherr has quit [Ping timeout: 240 seconds]
finisherr_ is now known as finisherr
<Ox0dea> binding_of_caller can't introduce locals, but I thought it might be finagled into repurposing old ones. :/
s00pcan has quit [Ping timeout: 264 seconds]
<voidDotClass> how can i get a hash's keys as a string array?
edwinvdgraaf has quit [Read error: Connection reset by peer]
<norc> voidDotClass: .keys
<norc> And yes. Ruby can be that simple.
<voidDotClass> norc, when i do to_s to that, it shows [:key]
edwinvdgraaf has joined #ruby
<voidDotClass> i want it to just show 'key'
<aegis3121> sure, so you have symbol keys
<voidDotClass> ahh
<voidDotClass> gotcha
<aegis3121> your hash's keys are symbols.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has joined #ruby
<adaedra> voidDotClass: .map(&:to_s)
<aegis3121> If you WANT them to desperately be strings, hash.keys.map(&:to_s)
fmcgeough has quit [Quit: fmcgeough]
<Ox0dea> Alternatively, have them be Strings from the first.
tomjoro has joined #ruby
<aegis3121> I mean, sure, you -could- :P
<norc> By coercing them into strings, you kind of defeat the point of using symbols in the first place.
jmignault has quit [Ping timeout: 276 seconds]
dlitvak has quit [Ping timeout: 246 seconds]
<norc> Symbols exist because strings are expensive to use. ;-)
<jbrhbr> mutable strings*
ramfjord has joined #ruby
<Ox0dea> >> h1 = {'a'=>1}; h2 = {'a'=>2}; h1.keys[0].__id__ == h2.keys[0].__id__
<ruby[bot]> Ox0dea: # => true (https://eval.in/502389)
<Ox0dea> String keys are automatically frozen (and thus essentially interned).
chipotle has joined #ruby
<norc> Things I learn... :S
<norc> I take it back.
<bnagy> I'm not surte strings have ever been expensive to _use_ anyway
<bnagy> they were a memory concern
<norc> Ox0dea: Good thing we can unfreeze objects!
<lucasb> >> str = 'foo'; str.frozen?
<ruby[bot]> lucasb: # => false (https://eval.in/502390)
domgetter has joined #ruby
<Ox0dea> norc: Yeah!
<norc> And yes Im ready for segfaults when doing this with strings.
<norc> Because
Xeago has quit [Remote host closed the connection]
<norc> I learned how to rescue from segfaults (:
bMalum_ has joined #ruby
bMalum has quit [Ping timeout: 240 seconds]
<bnagy> symbols used to be an awesome way to DOS webapps :\
GinoManWorks has quit [Read error: Connection reset by peer]
rahult has joined #ruby
<Ox0dea> >> {'a'=>1, 'b'=>2}.keys.map(&:frozen?) # lucasb
<ruby[bot]> Ox0dea: # => [true, true] (https://eval.in/502391)
edwinvdgraaf has quit [Read error: Connection reset by peer]
zambini has joined #ruby
<jbrhbr> i wonder how many programs would break if strings and symbols became fully interchangeable
edwinvdgraaf has joined #ruby
<lucasb> Ox0dea: oh, just hash keys then?
<Ox0dea> lucasb: Yeah, since forever ago.
<lucasb> I didn't know. thanks
<Ox0dea> >> RubyVM::InstructionSequence.compile_options = {frozen_string_literal: true}; eval "'foo'.frozen?" # lucasb
<ruby[bot]> Ox0dea: # => undefined method `compile_options=' for RubyVM::InstructionSequence:Class ...check link for more (https://eval.in/502392)
<Ox0dea> Dammit.
<Ox0dea> >> RubyVM::InstructionSequence.compile_option = {frozen_string_literal: true}; eval "'foo'.frozen?" # lucasb
<ruby[bot]> Ox0dea: # => true (https://eval.in/502393)
dhollinger has quit [Quit: WeeChat 1.3]
<Ox0dea> Frozen string literals aren't on by default just yet.
<Ox0dea> You can turn them on three or four different ways.
<jbrhbr> 2.3 right?
<Ox0dea> This is 2.3.
<grill> how would I insert an array of strings into another string? the following code appears to insert the whole array... \"chef_roles\": #{@roles_hash[hostkey].each { |entry| p "\"lol #{entry}\"" }}"
<acidrainfall> norc: the reason the logic was failing turned out to be that the scope lookup value returns true, because it evaluates the statement not the value
<jbrhbr> maybe a month ago someone here referenced a post saying they'd be default in 2.3, but i didn't pay attention after that
<acidrainfall> norc: scope['var'].nil? was *always* false no matter what the value was
<Ox0dea> That was briefly considered, I guess, but 2.3 is here and Strings aren't frozen by default.
<norc> acidrainfall: I am sure there is some sense in that sentence, even though it escapes me. But Im glad you seem to have found your problem. :)
<jbrhbr> welcome to the unfrozen future then!
<acidrainfall> norc: that was the best way I could explain it
<grill> hm
<grill> join
<acidrainfall> norc: is scope[''] a ruby principle, or something that puppet tacked on?
<norc> Ox0dea: Don't we have a flag to somehow enforce this on a file basis based on some thingie?
<norc> Since 2.3?
kalopsian has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
<aegis3121> grill it really depends on how you want to separate them.
cpup has quit [Ping timeout: 256 seconds]
<grill> aegis3121 join works, although I need to surround all strings with quotes...
bMalum_ has quit [Ping timeout: 276 seconds]
jgpawletko has quit [Quit: jgpawletko]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
DoubleMalt has joined #ruby
bMalum has joined #ruby
bMalum has quit [Read error: Connection reset by peer]
<aegis3121> Hmm... probably a better way but @roles_hash[hostkey].map { |r| "\"#{r}\"" }.join(', ')
<aegis3121> comes to mind right off the bat
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
rocfig has quit [Quit: This computer has gone to sleep]
rdark has quit [Ping timeout: 264 seconds]
rocfig has joined #ruby
allcentury has quit [Ping timeout: 265 seconds]
who42 has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
who42 has joined #ruby
<nfk|laptop> why must bundle be this ana... complicated?
<Ox0dea> nfk|laptop: Is it?
<nfk|laptop> absolutely
<Ox0dea> norc: https://eval.in/502394
<nfk|laptop> i just want it to install them locally and not invoke sudo or ask me for some god knows what path
<Ox0dea> There's also the `--enable-frozen-string-literal` interpreter flag.
<Ox0dea> Or just `--enable-f` if you're... golfing?
jgpawletko has joined #ruby
<nfk|laptop> gem is similar but at least it has --user-install and that's that
<Ox0dea> acidrainfall: Any object can define a custom #[] method.
rocfig has quit [Client Quit]
yardenbar has joined #ruby
[Butch] has quit [Read error: Connection reset by peer]
[Butch] has joined #ruby
Bloomer has quit [Remote host closed the connection]
<norc> Ox0dea: Alright. Well time to head to bed and prepare for the glorious day tomorrow.
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
hxegon_ has quit [Quit: BRB]
<Ox0dea> norc: Good night and godspeed.
yfeldblum has joined #ruby
<norc> Have a pleasant night yourself.
kalopsian has joined #ruby
karapetyan has joined #ruby
Sembei has quit [Ping timeout: 264 seconds]
Rodya_ has joined #ruby
<drbrain> nfk|laptop: I think you want --path
norc has quit [Ping timeout: 252 seconds]
vikas027 has joined #ruby
kerunaru has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
jam_ has joined #ruby
symm- has quit [Ping timeout: 264 seconds]
edwinvdgraaf has joined #ruby
hxegon has joined #ruby
_djbkd has quit [Remote host closed the connection]
SHyx0rmZ has quit [Read error: Connection reset by peer]
_djbkd has joined #ruby
<nfk|laptop> drbrain, --path to what?
cpup has joined #ruby
<nfk|laptop> that's my second complaint, my first is that it even asks me without a clear explanation
Sembei has joined #ruby
<drbrain> bundle install --path local_directory_where_I_want_bundler_to_put_files
<drbrain> see bundle help install
Rodya_ has quit [Ping timeout: 260 seconds]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
jam_ has quit [Ping timeout: 240 seconds]
_djbkd has quit [Ping timeout: 250 seconds]
_djbkd has joined #ruby
_djbkd has joined #ruby
<Ox0dea> drbrain: Is ENV['RUBYLIBDIR'] the only recourse for determining to which version we're being upgraded in a post-install hook? https://git.io/vznF7
dlitvak has quit [Ping timeout: 260 seconds]
aef has quit [Read error: Connection reset by peer]
<drbrain> Ox0dea: more context please
jgt has joined #ruby
<Ox0dea> drbrain: I'm using `spec.extensions = ['Rakefile']` with a default task, which gets triggered during gem installation.
<drbrain> for that, it tells mkmf (via mkrf_conf) where ruby lives
<Ox0dea> It doesn't.
dlitvak has joined #ruby
<Ox0dea> It contains the directory to which the gem is being installed.
<drbrain> oh, sorry
<drbrain> yes
<Ox0dea> But I can't say how consistent that value is across systems.
<drbrain> you should be able to use __FILE__ to determine
<Ox0dea> Hmm.
<drbrain> since it'll be in the install directory (with version and all that)
jgpawletko has quit [Quit: jgpawletko]
guacamole has quit [Ping timeout: 250 seconds]
aef has joined #ruby
aef has quit [Remote host closed the connection]
<grill> any thoughts as to why rspec would not be running a function inside of an expect { } block
guacamole has joined #ruby
radgeRayden has joined #ruby
northfurr has joined #ruby
<Ox0dea> drbrain: That works just fine. Thanks! :)
blackmesa has joined #ruby
whippythellama has quit [Quit: WeeChat 1.4]
<aegis3121> grill: code helps
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
zenlot1 has joined #ruby
Snowy has joined #ruby
zenlot has quit [Ping timeout: 250 seconds]
<aegis3121> what makes you say the code isn't running? Failing test? Error message?
gbgdev has joined #ruby
baweaver has quit [Remote host closed the connection]
<grill> the function invoked (Transfer.files_changed?) is supposed to output logging info. it isn't
freerobby has joined #ruby
<aegis3121> and I take the it the logging is before the ArgumentError is raised.
<grill> yes
sandstrom has quit [Quit: My computer has gone to sleep.]
<aegis3121> Are you attempting to test for the log messages, or just looking for them?
TomPeed has joined #ruby
uri_ has joined #ruby
polishdub has quit [Quit: Leaving]
<grill> if I run it as follows, the function runs, but the test comes back as "failed" expect(Transfer.files_changed?(nil, nil, @flags)).to(raise_error(ArgumentError)
rubyfan has joined #ruby
<grill> )
dlitvak has quit [Ping timeout: 245 seconds]
<grill> it's like it doesn't catch the ArgumentError
rubyfan is now known as rubyfanfr
<rubyfanfr> hi all
<lucasb> out of curiosity, among you all, there's 100% consensus on all items in the ruby-style-guide?
Snowy has quit [Remote host closed the connection]
<Ox0dea> lucasb plz
TheAnachron has quit [Ping timeout: 260 seconds]
<lucasb> ok, sorry :)
<rubyfanfr> I'm a beginner in Ruby. I would like to TRY various rails project on GitHub, but I can't find a generic process to use them after cloning them. Anyone could help me ? (I'm a PHP and Obj-C dev by the way).
northfurr has quit [Quit: northfurr]
<aegis3121> grill: But it doesn't say it failed because an ArgumentError was raised, it's just...a failed test?
<grill> ArgumentError
<grill> is why it failes
jottr has quit [Quit: WeeChat 1.4]
emilford has joined #ruby
dlitvak has joined #ruby
<aegis3121> The error message looks a bit off to me, but I'm not sure, honestly.
dfinninger has quit [Remote host closed the connection]
linoespinoza has joined #ruby
renatosilva has joined #ruby
linoespinoza has quit [Client Quit]
Xeago has joined #ruby
dfinninger has joined #ruby
aegis3121 has quit [Quit: Textual IRC Client: www.textualapp.com]
sftrabbit has quit [Quit: sftrabbit]
sftrabbit has joined #ruby
lucasb has quit [Quit: leaving]
aegis3121 has joined #ruby
<rubyfanfr> does the process differs from one rails project to another ?
jgpawletko has joined #ruby
acidrainfall has quit [Quit: Leaving.]
renatosilva has left #ruby ["http://pidgin.renatosilva.me - Pidgin++"]
usershell has joined #ruby
scottschecter has quit [Quit: Leaving]
dcunit3d has joined #ruby
ta has quit [Read error: Connection reset by peer]
Blaguvest has joined #ruby
bronson has joined #ruby
ta has joined #ruby
baweaver has joined #ruby
usershell has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
sftrabbit has quit [Ping timeout: 240 seconds]
mchu has quit [Quit: mchu]
rahult has quit [Ping timeout: 240 seconds]
usershell has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
Snowy has joined #ruby
_djbkd has quit [Quit: My people need me...]
dlitvak has quit [Ping timeout: 276 seconds]
rahult has joined #ruby
Cihan has quit []
yardenbar has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 246 seconds]
dlitvak has joined #ruby
kalopsian has quit [Ping timeout: 246 seconds]
Oog has joined #ruby
usershell has quit [Ping timeout: 276 seconds]
northfurr has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
CihanKaygusuz has quit []
Vitor has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk|laptop has quit [Ping timeout: 246 seconds]
sleepee has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalopsian has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fsapo has joined #ruby
foobar121 has joined #ruby
allcentury has joined #ruby
karapetyan has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 272 seconds]
uri_ has quit [Quit: --]
dn` has quit [Quit: dn`]
karapetyan has joined #ruby
uri_ has joined #ruby
scoot has joined #ruby
Oog has quit []
blackmesa has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
kalopsian has quit [Ping timeout: 276 seconds]
skcin7 has joined #ruby
CihanKaygusuz has joined #ruby
Cihan has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<scoot> hi there!
yardenbar has joined #ruby
karapetyan has quit [Remote host closed the connection]
<foobar121> hello
<scoot> is there a way to make a loop execute one more time after the conditions are met?
karapetyan has joined #ruby
<scoot> eg:
<scoot> while node.next != nil
<scoot> if true
<scoot> # do something
<scoot> else
<scoot> # do something else
<scoot> end
SHyx0rmZ has joined #ruby
<scoot> end
<foobar121> please don't paste code into the irc window
bronson has joined #ruby
<Nilium> Could just put the code in a function and call it again.
<scoot> oops sorry
<foobar121> use a gist or hastebin or something instead
<scoot> ok foobar121 I will do next time
<scoot> sorry
<foobar121> no worries
<hxegon> scoot if you are more spcefic, we might be able to find a better solution
kalopsian has joined #ruby
<scoot> I would like the block to run for a last time when node.next == nil
<bnagy> do_something while condition; do_something # one more time
janebootydoe has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
baweaver has quit [Remote host closed the connection]
<foobar121> loop { return false unless condition; return true; break }
toretore has quit [Ping timeout: 265 seconds]
<bnagy> o_0
roshanavand has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
<foobar121> i may be a little high so let me know if that doesn't make sense
<foobar121> yeah
roshanavand has joined #ruby
<foobar121> it doesn't
<foobar121> oh well
shadoi has joined #ruby
<foobar121> lol
<scoot> haha i was trying to make sense of it
kalopsian has quit [Read error: Connection reset by peer]
mchu has joined #ruby
mchu has quit [Client Quit]
Bloodshot has quit [Remote host closed the connection]
casadei has quit [Remote host closed the connection]
roshanavand has quit [Remote host closed the connection]
kalopsian has joined #ruby
roshanavand has joined #ruby
gigetoo has quit [Ping timeout: 245 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uri_ has quit [Quit: --]
<foobar121> yeah
<foobar121> bnagy's way is the right way
gigetoo has joined #ruby
FernandoBasso has quit [Quit: Leaving]
decoponio has quit [Quit: Leaving...]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rodya_ has quit [Ping timeout: 246 seconds]
<foobar121> ok so I have machines A and B
<foobar121> or
<foobar121> for clarity
<foobar121> machines J and K
<bnagy> one line while / until loops are often fiddly, though, so it might be a dumb approach if you need to also operate on the object that controls the loop
dlitvak_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
<bnagy> in which case just write more lines
ta has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
<scoot> i see. so bnagy, I would just execute the code once more after the block?
uri_ has joined #ruby
<foobar121> eh you can just pass in parameters, in the cases where that's an issue i find there's usually something else contributing to the problem
Azure|dc has quit [Ping timeout: 245 seconds]
ta has joined #ruby
<bnagy> scoot: if that's what you want to do, yeah. Loops by their nature are only entered while their conditional is true
<scoot> I'm working through some algorithm exercises. Basically it's just iterating through a linkedlist and removing any repeats. But I'm not successfully removing the last node in the list
ta has quit [Read error: Connection reset by peer]
<foobar121> so i'm trying to send http requests by mechanize through a proxy. i have machines J and K, where J is local, dynamic IP, and behind a restrictive firewall; K is remote, static IP, with SSH and HTTP ports open to the world
janebootydoe has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
<scoot> that's what I have right now
ta has joined #ruby
<foobar121> on the local machine J, i open a reverse ssh tunnel using `ssh -R 22101:localhost:22 $REMOTE_IP`
bronson has quit [Remote host closed the connection]
<foobar121> is it possible to use this tunnel as an http proxy?
Azure has joined #ruby
<foobar121> i'm getting lost in docs
dlitvak has quit [Ping timeout: 240 seconds]
ropeney has joined #ruby
snockerton has joined #ruby
<bnagy> scoot: is this list sorted?
<scoot> it's a singly linkedlist
<scoot> sorry let me include that in the hastebin too
lemur has joined #ruby
<bnagy> I got that from the class name
<bnagy> btw use gist, ideally
<bnagy> then people can edit etc
uri_ has quit [Ping timeout: 256 seconds]
baweaver has quit [Ping timeout: 260 seconds]
<scoot> ok I will use gist from now on :)
jbrhbr has quit [Quit: Leaving.]
<bnagy> imho refactor unlink into a method, for a start
Melpaws has quit [Quit: Leaving.]
<bnagy> that will make your logic easier for you to understand
kies^ has joined #ruby
<bnagy> if you're doing it for algorithms then the nodes of a linked list should probably be a class
<bnagy> (IRL I don't think I've ever seen someone use linked lists from a HLL, they're too slow)
<scoot> got it! thanks that's some really good feedback
<scoot> what is HLL?
<bnagy> high level language
<scoot> yea that totally makes sense. The book has it implemented using Java
diegoviola has joined #ruby
<scoot> I'm just trying to learn some CS stuff since I didn't go to school for it
<bnagy> you can model a single (or double) linked list by just implementing the node classes, tbf
kalopsian has quit [Ping timeout: 246 seconds]
AlphaAtom has joined #ruby
<bnagy> you don't need an overarching list class
shadoi has quit [Quit: Leaving.]
foobar121 is now known as foobar020
AlphaAtom has quit [Client Quit]
<bnagy> prev next insert_before insert_after unlink
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy> off top of head
<bnagy> sry scratch prev for single
ramfjord_ has joined #ruby
<scoot> so I should just implement next, insert_before, insert_after, unlink within the node class itself?
<bnagy> not before, cause single
<scoot> got it but i should just implement those methods within the node class correct? just making sure I understand it corerectly
Xeago has quit [Remote host closed the connection]
huluhuluhulu has joined #ruby
<bnagy> and you can't unlink the current node in a singly-linked list can you?
<bnagy> you have to unlink the next
huluhuluhulu has left #ruby [#ruby]
<bnagy> but yeah that's my suggestion, just make one SLLNode class or whatever
karapetyan has quit [Remote host closed the connection]
<bnagy> others may have a different view *shrug*
<scoot> yea, I can only keep track of the previous node and use prevous.next = current.next to unlink the node
<foobar020> is there a more appropriate place to ask?
<scoot> got it thanks! I'm done now
ramfjord has quit [Ping timeout: 265 seconds]
dirk_diiggler has joined #ruby
<bnagy> enjoy
<bnagy> foobar020: it's not a ruby question per se, but mainly people only answer questions they are awake for and interested in
<bnagy> so just hang around, I guess
<foobar020> yeah, the link to ruby is that i want to proxy mechanize requests through the reverse tunnel
<foobar020> which is admittedly tenuous
peeja has joined #ruby
<bnagy> my gut reaction is that ssh tunnels are pipes not proxies
<bnagy> a proxy works at a higher layer
jgpawletko has quit [Quit: jgpawletko]
duckpuppy has joined #ruby
dirk_diiggler has left #ruby ["Leaving"]
Kryptonical has joined #ruby
<fuzzyfuzz> An SSH tunnel *can* be a proxy.
<bnagy> do tell
jackjackdripper has quit [Quit: Leaving.]
harai54 has quit [Ping timeout: 260 seconds]
<fuzzyfuzz> It will function as a SOCKS proxy.
stannard has quit [Remote host closed the connection]
<bnagy> that's just socks
mclong has quit [Ping timeout: 260 seconds]
nfk|laptop has joined #ruby
<bnagy> ie not an ssh tunnel
<bnagy> it might actually solve the problem though :P
<fuzzyfuzz> Maybe I'm wrong, but my understanding is that is generally considered to be an SSH tunnel.
mondok has quit [Quit: Leaving]
firstdayonthejob has quit [Ping timeout: 250 seconds]
<fuzzyfuzz> Are you trying to do remote code execution with Ruby?
SCHAAP137 has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 246 seconds]
<foobar020> Yes
kies^ has quit [Ping timeout: 246 seconds]
<foobar020> Sorry for the delayed response, I had to let my dogs out
joonty has joined #ruby
roshanavand has quit [Remote host closed the connection]
<voidDotClass> if doing array.each to search for something, and finding it, how do you then exit the loop and not needlessly loop over the rest?
<voidDotClass> is there a break stmt?