<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.
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]
<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
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…]
<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
<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)
<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]
<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!
<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>
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
<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]
<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]
<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?
<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]
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?
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
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
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
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
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.
<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]
<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]
<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?
<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
<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
<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
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]
<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.
<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?
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]
<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]
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