<dgarstang3>
Hanmac: Uh, no. I don't think so. I'm running lsblk. I need to get a list of disks meeting certain criteria
dnyy has quit [Read error: Connection timed out]
tomassito has joined #ruby
benzrf has left #ruby [#ruby]
<h0rrorvacui>
There is so many ways to do it
<h0rrorvacui>
you can assign the result of `lsblk` to a say lsblk variable
<h0rrorvacui>
and lsblk.lines do |line| w/e end
lmickh has quit [Quit: lmickh]
<dgarstang3>
Ok, now this http://pastebin.com/2EK3infa isn't doing what I'd expect. At line 5... it's only printing one line. However, if I change that to puts line, it prints every line. Huh?
dnyy has joined #ruby
<Hanmac>
dgarstang3: PS: i looked at the result of lsblk ... you need to beware about duplicates ...
dubsteph has quit [Ping timeout: 272 seconds]
<dgarstang3>
Hanmac: if there's a better way to get a list of physical disks. Maybe I could parse fdisk instead
dangerousdave has quit [Ping timeout: 264 seconds]
<Hanmac>
try this: `lsblk`.each_line.grep(/disk/)
jjbohn is now known as jjbohn|afk
kobain has joined #ruby
<dgarstang3>
why doesn't that pastebin work tho?
<Hanmac>
hm also more interesting: `lsblk`.each_line.grep(/disk/).flat_map {|s|s[/\w+/]}
lfox has quit [Quit: ZZZzzz…]
<Hanmac>
last one returns for me: => ["sda", "sdb", "sdc", "sdd"]
<dgarstang3>
Hanmac: yes, but I need to perform more actions on each.
<dgarstang3>
Hanmac: putting it all one one big pipline, apart from being unreadable means I can't perform more actions on it
RichardBaker has joined #ruby
elux has quit [Quit: Bye!]
<dgarstang3>
which gets me 'undefined method `flat_map'' by the way
<Hanmac>
dgarstang3: try if a[/disk/] then
<Hanmac>
dgarstang3: maybe ruby version to old ... flat_map is not soo new
<dgarstang3>
Hanmac: of course, that'd be too easy
<Hanmac>
dgarstang3: maybe unsecure, i think better would be a.strip.end_with?("disk")
<dgarstang3>
Hanmac: you guys like putting as much stuff in one line don't ya. :)
jkhwan has quit [Remote host closed the connection]
jbw has joined #ruby
<h0rrorvacui>
if you wanted to break the io into lines
thelorax123 has quit [Remote host closed the connection]
<h0rrorvacui>
you could also do io.each_line do
<dgarstang3>
h0rrorvacui: isn't that what I have already?
jkhwan has joined #ruby
vlad_starkov has joined #ruby
<dgarstang3>
out = IO.popen( "lsblk -nr") do |io| line = io.read .... no?
graydot has quit [Remote host closed the connection]
mrsolo has joined #ruby
Mars` has quit [Remote host closed the connection]
mrsolo has quit [Remote host closed the connection]
ejnahc has quit [Remote host closed the connection]
<h0rrorvacui>
Hanmac can you explain a little your raid setup?
Mars` has joined #ruby
ejnahc has joined #ruby
vlad_starkov has joined #ruby
tharindu has joined #ruby
Mars`_ has joined #ruby
amacgregor has quit [Read error: Connection reset by peer]
Mars` has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
tharindu has quit [Ping timeout: 245 seconds]
scarolan has quit [Ping timeout: 272 seconds]
emocakes has quit [Quit: Leaving...]
vlad_starkov has quit [Ping timeout: 245 seconds]
platzhirsch has quit [Ping timeout: 252 seconds]
motto has quit [Quit: Sto andando via]
sepp2k has quit [Quit: Leaving.]
scarolan has joined #ruby
mercwithamouth has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
lmmx has joined #ruby
lnormous has quit [Ping timeout: 245 seconds]
ua has quit [Quit: Leaving]
ua has joined #ruby
robustus has joined #ruby
<lmmx>
Hi all, I'm working on a screen scraper / web scraper to read a HTML table and I'm just wondering what the things beginning with colons are in my code? http://pastie.org/8483848
<benzrf>
that's definitely not why im promoting it
poikon has quit [Remote host closed the connection]
<UserBotMan>
Hello!
zeade has quit [Quit: Leaving.]
<UserBotMan>
what is ruby?
ehc has quit [Quit: ehc]
ewnd9 has joined #ruby
<benzrf>
a p. cool language
<UserBotMan>
ahahha
ngoldman has joined #ruby
<UserBotMan>
i believe u)
rickruby has quit [Remote host closed the connection]
rickruby has joined #ruby
aspiers has joined #ruby
<UserBotMan>
might be u wish somebody pushed it and it will send user to other site where he will see ads right?) i know this thing)
<benzrf>
wha
DonRichie has quit [Quit: Verlassend]
kaspergrubbe has joined #ruby
<benzrf>
that sentence did not parse
<benzrf>
i assume english is not your first language>
<UserBotMan>
right
<UserBotMan>
what u mean not parse?
<havenwood>
UserBotMan: A general purpose programming language. A lovechild of Lisp, Perl, and Smalltalk. If it is computable, you can compute it with Ruby so...
<UserBotMan>
i can speak good but i speak fast
<benzrf>
i mean i got nothing out of it
<benzrf>
i didnt understand any of it
<UserBotMan>
havenwood thank u
yfeldblum has joined #ruby
<UserBotMan>
hmmmm
<UserBotMan>
really?
<benzrf>
ye
<havenwood>
no, it is actually an animal, kinda like a llama but with the beak and wings of an owl
larissa has joined #ruby
<benzrf>
havenwood: ha
<havenwood>
UserBotMan: yes really.
<benzrf>
wait, are owls associated with a language?
baroquebobcat has quit [Quit: baroquebobcat]
<havenwood>
Ruby is sparrows
<UserBotMan>
benzrf strange.. quite...
<havenwood>
i dunno about owls
<benzrf>
...
rickruby has quit [Ping timeout: 245 seconds]
<benzrf>
20:01 < UserBotMan> might be u wish somebody pushed it and it will send user to other site where he will see ads right?) i know this thing)
<benzrf>
that sentence means nothing to me
<benzrf>
the grammar is so bad i cant figure out what you meant
sailias has joined #ruby
Xeago has quit [Remote host closed the connection]
<UserBotMan>
havenwood i know C language and Delphi also. i programmed before. my favourite language is delphi
AndChat|380436 has joined #ruby
<h0rrorvacui>
Ruby is a gemstone
farn has quit [Read error: Connection reset by peer]
pothibo has quit [Quit: pothibo]
kaspergrubbe has quit [Ping timeout: 252 seconds]
<UserBotMan>
i always thought language must be simpple
<UserBotMan>
C is a good example
<havenwood>
UserBotMan: Of being simple?
<lmmx>
Can anyone explain how I get the values from "symbols", puts :name doesn't give a value http://pastie.org/8483848
<UserBotMan>
i mean simple syntax
daxroc has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<lmmx>
I want to do something with the things I get from parsing a table but don't get how to use the values in the "symbols"
yfeldblum has joined #ruby
<benzrf>
Lmmx: a symbol is like a string
<benzrf>
basically, in languages like Python strings are used in 2 ways
<benzrf>
they are used for text storage, and as identifiers
<UserBotMan>
what do u think abt this?
tomassito has quit [Ping timeout: 265 seconds]
<benzrf>
Lmmx: so in print("foo"), "foo" is representing some text
<lmmx>
yeah I'm watching a vid on them now, symbols allow quicker access without reading the string
<benzrf>
Lmmx: in open("file.txt", 'w'), 'w' is an identifier
<benzrf>
Lmmx: basically, sometimes you use a string in such a way that you don't care about the text in the string
<lmmx>
right, why're we talking about Python though?
farn has joined #ruby
<benzrf>
just whatit is the same as
<benzrf>
Lmmx: in ruby, symbols are usually used in that case
<lmmx>
right
<lmmx>
smart
<UserBotMan>
havenwood it would be cool if C language had more comfortable working with strings
AndChat|380436 has quit [Ping timeout: 245 seconds]
<havenwood>
UserBotMan: Use Ruby for great win.
<benzrf>
UserBotMan: or python
<benzrf>
it's a matter of taste
<UserBotMan>
oh non platform multithreading is cool
tkuchiki has joined #ruby
<lmmx>
so re: my code http://pastie.org/8483848 why can't I access the value with "puts :full" like for a local-variable called full ?
Lewix has quit [Remote host closed the connection]
Voodoofish430 has quit [Quit: Leaving.]
mercwithamouth has quit [Ping timeout: 272 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phinfonet has quit [Quit: exitiing]
wallerdev_ has joined #ruby
jibi has quit [Quit: .]
emocakes has quit [Quit: Leaving...]
superscott[8] has quit [Quit: superscott[8]]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 246 seconds]
wallerdev_ is now known as wallerdev
znode has joined #ruby
sayan has joined #ruby
iliketurtles has joined #ruby
znode has quit [Remote host closed the connection]
havenwood has joined #ruby
znode has joined #ruby
myappleguy has joined #ruby
cburyta has quit []
jamesaanderson has joined #ruby
reset has quit [Ping timeout: 252 seconds]
jbw has quit [Read error: Operation timed out]
jbw has joined #ruby
emocakes has joined #ruby
nfk has quit [Quit: yawn]
mercwithamouth has joined #ruby
yfeldblum has quit [Remote host closed the connection]
macmartine has joined #ruby
platzhirsch has joined #ruby
snuffeluffegus has joined #ruby
myappleguy has quit [Ping timeout: 272 seconds]
<platzhirsch>
What a bummer, got a VM with 24GB RAM set up at work only to notice that I cannot ssh to the IP from my VPN... luckily I found another gateway machine from which the IP is visible... close enough
hiroyuki_ has quit [Read error: Connection reset by peer]
teteak has joined #ruby
yfeldblu_ has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
mjs2600 has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
<platzhirsch>
no cheers?
<nobitanobi>
cheers dude!
ewnd9 has joined #ruby
macmartine has quit [Remote host closed the connection]
<platzhirsch>
nobitanobi: I don't believe you
<nobitanobi>
I'm happy for you, I swear
<platzhirsch>
ok, I believe you
Mars`_ has quit [Remote host closed the connection]
havenwood has quit [Read error: Connection reset by peer]
Mars` has joined #ruby
havenwood has joined #ruby
macmartine has joined #ruby
bazaretas has quit [Quit: Leaving]
mmcdaris has quit [Ping timeout: 265 seconds]
kaspergrubbe has joined #ruby
macmartine has quit [Remote host closed the connection]
kevinykchan has joined #ruby
<shevy>
I am not happy for you
mjs2600 has quit [Remote host closed the connection]
coderhs has joined #ruby
<platzhirsch>
that okay, too. More drama, makes me less sleepy
Mars` has quit [Ping timeout: 245 seconds]
gazarsgo has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
snuffeluffegus has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
* platzhirsch
stabs shevy in the back.
mjs2600 has joined #ruby
<shevy>
lol
<shevy>
now who is trying to kill someone first here :)
<platzhirsch>
sorry, bad habit from my WoW days
<shevy>
I have no other choice but to use atomic bombs against the lot of you now
dhruvasa1ar has quit [Ping timeout: 272 seconds]
<shevy>
I skipped WoW
<shevy>
but I wasted too much time with warcraft3
macmartine has joined #ruby
<platzhirsch>
nice, ruining the whole channel with fallout, let's see what user group is then attracted by this channel
alvaro_o has quit [Quit: Ex-Chat]
<nobitanobi>
ageofempires for the win
<platzhirsch>
probably #defocus will flood this channel then
heidi has quit [Quit: Leaving.]
<shevy>
nobitanobi did not play that either
<shevy>
my gaming days were during the 1990s :(
<nobitanobi>
same here!
<platzhirsch>
and currently?
<nobitanobi>
currently I just play soccer games ,_,
<platzhirsch>
brogrammer
<nobitanobi>
hahaha
<nobitanobi>
browing u knaw?
Liquid-- has quit [Quit: Computer has gone to sleep.]
gverri_ has joined #ruby
<platzhirsch>
yea, don't hate, appreciate
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
macmartine has quit [Remote host closed the connection]
<shevy>
platzhirsch dunno, no longer play games much... one or two browser games perhaps
amacgregor has quit [Ping timeout: 245 seconds]
Hanmac1 has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
amacgregor has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
<shevy>
platzhirsch we should work on a ruby game one day!
<platzhirsch>
shevy: I think of putting my mind to one game once in a while, but it never happens. The maximum thing that happens is that I watch YouTube videos about the game and then be satisfied that I didn't spend > 50h :P
<shevy>
well
<shevy>
yeah
<platzhirsch>
hehe, yeah maybe. I am not so much into graphical programming I guess, because I am afraid it's very lavish ^^
<shevy>
that is why one needs to make time limitations
<shevy>
how much time is being spent on the game shall be agreed upon in advance
<platzhirsch>
That's a good exercise to train your willpower
<platzhirsch>
mine fails once in a while. I handed in my master's thesis and watched Breaking Bad in 5 days... kind of failed there
<shevy>
platzhirsch during the peak time we had several developers active. unfortunately, people tend to disappear and then there is a lack of people able or willing to drive a project forward
<shevy>
thehodapp, see? internally it defaults to the old way
Jetchisel has joined #ruby
<bnagy>
so they could fake keyword arguments to methods, mainly
<shevy>
really?
<thehodapp>
hmmm interesting.
<shevy>
is it interesting :P
<shevy>
I still use the old way
MattStratton has joined #ruby
lethjakm1 has joined #ruby
<jarred>
I need to print a ton of code to paper, with a footer at the bottom showing file name and other metadata. What's the best tool to do that?
<gazarsgo>
an ipad
<bnagy>
use a printer imo
<thehodapp>
well thank you, good to know.
lethjakman has quit [Ping timeout: 272 seconds]
<jarred>
gee thanks guys.
Lewix has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
RichardBaker has joined #ruby
<shevy>
people have the strangest questions on #ruby
<shevy>
jarred I still have not got my USB printer on linux to work :(
<gazarsgo>
notepad from windows 3.11 in 1996 will do the job too
<jarred>
shevy: don't use linux ;)
<bnagy>
yeah you could just > /dev/lp0
<jarred>
bnagy: I want to print it prettily, with syntax highlighting and a footer
<bnagy>
good for you!
<bnagy>
everyone should have dreams
coderhs has quit [Ping timeout: 272 seconds]
jkhwan has quit [Remote host closed the connection]
<jrobeson>
printing code.. what a waste of paper..
<jarred>
I can make this, I just don't want to spend my weekend writing a library to print code to paper
Clooth has quit [Quit: Leaving...]
jkhwan has joined #ruby
iliketurtles has quit [Ping timeout: 240 seconds]
fluffheadsr has quit [Ping timeout: 264 seconds]
<jrobeson>
it probably already exists somewhere
<bnagy>
use an editor, dump the code to html then use a word processor
<bnagy>
then hit print
<jarred>
it's a lot of code
<jarred>
like 10 repos with 300-3000 LOC
<bnagy>
why are you telling me this?
<jarred>
because you want to help :)
<bnagy>
you are literally making me stupider
<bnagy>
use a small font
<bnagy>
print 8 up
<bnagy>
I mean.. srsly ask a programming question
<lewellyn>
man enscript # done.
<jarred>
it would be really easy if I didn't have to make it look nice, but I do.
tharindu has quit [Quit: Leaving...]
<bnagy>
html
sebastianb has quit [Ping timeout: 264 seconds]
<bnagy>
they have colours in there these days
sebastianb has joined #ruby
<lewellyn>
man ps2pdf # if enscript alone won't do it for you.
jkhwan has quit [Read error: No route to host]
jkhwan has joined #ruby
krz has joined #ruby
<jarred>
yes — I could take each file, run it through coderay, and output an HTML version of it. Then, loop over each file and print. However, I need that footer at the bottom of each page that's printed. I guess I can also write a script to slightly modify that HTML to append a footer and make it display: fixed. Then, after the HTML/pretty variant of each file is written, I just loop over each file and print.
* lewellyn
notes that he's being ignored and wanders to a channel which is more on-topic
jhn has joined #ruby
<jarred>
lewellyn: I wasn't ignoring you — it's just not that simple
capicue has joined #ruby
<lewellyn>
i don't see why not.
<jarred>
syntax highlighting
Trynemjoel has quit [Quit: Trynemjoel]
<jarred>
so now my question is
<jarred>
How do I print HTML to paper in Ruby? Or using some shell script?
<bnagy>
...
<bnagy>
"and then I woke up!"
<bnagy>
hmm nope didn't work
<jarred>
I don't mean the raw HTML, I mean HTML that a web browser renders. I guess I could maybe use poltergeist to do this
sebastianb has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
<jarred>
the ghetto way is to print a ton of screenshots using poltergeist
<bnagy>
I am speechless now
<bnagy>
"I don't mean the raw HTML, I mean HTML that a web browser renders"
jkhwan has quit [Remote host closed the connection]
<jrobeson>
code changes too often.. so it's just a huge waste
nitish has quit [Quit: Bye Bye...]
<lewellyn>
note that enscript is the first method given. so i'm unclear why it won't suffice here.
jkhwan has joined #ruby
<jrobeson>
technical books are obsolete right when printed.. code is obsolete sooner
vlad_starkov has joined #ruby
<jrobeson>
whoever is making you do that.. i feel bad for them
duggiefresh has joined #ruby
jjbohn has joined #ruby
tylersmith has quit [Ping timeout: 260 seconds]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lukec has quit [Quit: lukec]
<jarred>
enscript works!
<jarred>
thanks lewellyn
jjbohn has quit [Ping timeout: 245 seconds]
coderhs has joined #ruby
Zesty has quit [Quit: Leaving...]
jkhwan has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
jkhwan has joined #ruby
Monie has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
tyfighter has quit [Quit: tyfighter]
gianlucadv has joined #ruby
Monie has quit [Client Quit]
vlad_sta_ has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
trey has joined #ruby
bricker`LA has quit [Ping timeout: 272 seconds]
osvico has quit []
trey has quit [Client Quit]
Astralum has joined #ruby
jlast has joined #ruby
bricker`LA has joined #ruby
Lewix has quit [Remote host closed the connection]
trey has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
havenwood has quit [Remote host closed the connection]
macmartine has quit [Remote host closed the connection]
iliketurtles has joined #ruby
havenwood has joined #ruby
tharindu has joined #ruby
tharindu has quit [Read error: Connection reset by peer]
kaspergrubbe has quit [Remote host closed the connection]
tharindu has joined #ruby
nouitfvf has joined #ruby
vlad_starkov has joined #ruby
hamakn has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
havenwood has quit [Ping timeout: 265 seconds]
jlast has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
gr33n7007h has joined #ruby
gr33n7007h has quit [Max SendQ exceeded]
platypine has quit [Ping timeout: 245 seconds]
nobitanobi has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
emocakes has quit [Quit: Leaving...]
Tuxist has joined #ruby
havenwood has joined #ruby
Olipro has joined #ruby
Niamkik has quit [Quit: Disconnecting from stoned server.]
Niamkik has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
zigomir has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
Paradox has quit [Ping timeout: 240 seconds]
Paradox has joined #ruby
justsee has quit [Ping timeout: 253 seconds]
emocakes has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
jhn has quit [Ping timeout: 264 seconds]
krz has quit [Read error: Connection reset by peer]
kobain has quit []
teteak has quit [Remote host closed the connection]
huttan has joined #ruby
justsee has joined #ruby
borozny has joined #ruby
d45h has joined #ruby
trey has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
ayaz has joined #ruby
iliketurtles has quit [Ping timeout: 245 seconds]
huttan has quit [Ping timeout: 245 seconds]
FortuneYe has quit [Ping timeout: 272 seconds]
Astralum has quit [Read error: Connection reset by peer]
capicue has joined #ruby
duggiefresh has quit [Ping timeout: 260 seconds]
emocakes has quit [Quit: Leaving...]
Vigrant_ has joined #ruby
<Vigrant_>
Hey, any thing like benchmark but for storage used?
advorak has joined #ruby
bluOxigen has joined #ruby
krz has joined #ruby
<Zeeo>
I need to define a method for strings, like class String;def my_method; given_string ;end;end but I can't remember how to "call" the given string inside the method
capicue has quit [Ping timeout: 272 seconds]
emocakes has joined #ruby
<Zeeo>
I did it once but I can't remember
emocakes has quit [Client Quit]
tonni has quit [Remote host closed the connection]
<advorak>
x = "*** TEST" ; /#{x}/ ---- how do I get ruby to treat the x variable in that regex literally, rather than as a bunch of "repeat character" commands?
<advorak>
I want it to read it as /\*\*\* TEST/
tonni has joined #ruby
<advorak>
oh! Regexp.escape(x) :-)
<advorak>
yay!
jjbohn has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
FortuneDays has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<Zeeo>
self
syed_ has quit [Quit: Lost terminal]
<Vigrant_>
Zeeo yep
<Zeeo>
Vigrant_: I was confused, I somehow believed that self = self.class
Mars` has quit [Remote host closed the connection]
Mars` has joined #ruby
zoee has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby
tsykoduk is now known as zz_tsykoduk
funburn has quit [Quit: funburn]
Mars` has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
hamakn has quit [Ping timeout: 264 seconds]
mercwithamouth has joined #ruby
sergicles has joined #ruby
funburn has joined #ruby
hamakn has joined #ruby
iliketurtles has quit [Ping timeout: 240 seconds]
ananthakumaran has quit [Read error: No route to host]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
hamakn has quit [Remote host closed the connection]
tskogberg has quit [Ping timeout: 272 seconds]
hamakn has joined #ruby
emocakes has joined #ruby
tskogberg has joined #ruby
gr33n7007h has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
capicue has joined #ruby
<lupine>
Happ288, no PMs, please
<Happ288>
ok sorry
<Happ288>
it's for u only
<lupine>
public or nothing, thanks
<Happ288>
it's means i should leave this channel?
capicue has quit [Ping timeout: 260 seconds]
carraroj has quit [Ping timeout: 248 seconds]
carraroj has joined #ruby
znode has joined #ruby
<RubyPanther>
Happ288: they mean it about no PMs, they didn't mean "PM somebody else." It is a general rule
<Happ288>
hmm
shawnjgoff has joined #ruby
<Happ288>
it's ok
<Happ288>
bye
Lewix has joined #ruby
<deepy>
bullshit, you sent me a PM too, it's not only lupine
<Happ288>
i m leaving ths
<deepy>
just ask in the channel instead
<Happ288>
ok
<Happ288>
sorry all
jjbohn has joined #ruby
newbiehacker has joined #ruby
<Happ288>
if all don't wish
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
<bnagy>
what was the question?
<bnagy>
(for lols)
Lewix has quit [Remote host closed the connection]
<Happ288>
nothing
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
camilasan has joined #ruby
<Happ288>
all just wish me to leave this channel
<apeiros>
Happ288: no, they wish you to NOT write them private messages.
<bnagy>
Happ288: wasn't asking you, sorry
<lupine>
no question, just "hi"
<lupine>
Happ288, bye then
<Happ288>
hmm
<apeiros>
nobody asked you (yet) to leave the channel.
<Happ288>
hmm
Lewix has quit [Remote host closed the connection]
<Happ288>
but most of them using abusive laguage
<apeiros>
I've not seen anybody using abusive language.
<bnagy>
19:30 < lupine> Happ288, no PMs, please
<Happ288>
one said
jibi has joined #ruby
<bnagy>
WHOA hardcore abuse
<Happ288>
bulshit
<apeiros>
Happ288: do you have a ruby related problem or question?
<Happ288>
u know about bulshit
jjbohn has quit [Ping timeout: 272 seconds]
<Happ288>
yup
<Happ288>
she should say that
coldmethod has quit [Remote host closed the connection]
<apeiros>
then I suggest you quit your whining, accept that people generally don't like to be asked in private and ask your question here.
<Happ288>
she was only to ask not to send PMs
<Happ288>
yup i know
<apeiros>
Happ288: what people do in their private messaging is NONE of the channels concern. you can quit whining about it.
emocakes has quit [Ping timeout: 272 seconds]
popl has quit [Ping timeout: 252 seconds]
<Happ288>
hmm
<Happ288>
it's ok
<waxjar>
ask people if you can PM them in the channel before you PM them :) (after talking with them in the channel, of course)
<Happ288>
it's ok friend
<Happ288>
it's the way to talk
<Happ288>
i like
robbyoconnor has joined #ruby
<Happ288>
i will care next time
emocakes has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Nahra has quit [Ping timeout: 246 seconds]
<Happ288>
anyone wana chat me now?
<apeiros>
Happ288: just ask your question here.
obs has quit [Ping timeout: 252 seconds]
gr33n7007h has quit [Ping timeout: 245 seconds]
<Happ288>
ok
<Happ288>
i m leaving now
jhaals has joined #ruby
<apeiros>
ok
<Happ288>
i don't have any questions
<Happ288>
i just looking for some good friends
<bnagy>
XD
<apeiros>
yes, no, this isn't chatroulette. this is a place to come if you have a ruby related problem. good bye now.
<Happ288>
ok
<Happ288>
bye
Happ288 has left #ruby [#ruby]
iliketurtles has joined #ruby
jhaals has quit [Client Quit]
<apeiros>
what an odd fellow
sergicles has quit [Quit: sergicles]
jhaals has joined #ruby
<apeiros>
woah, it's saturday and I'm not in the office! hurray! today must be a great day :D
timonv has joined #ruby
Nahra has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
phus1on has joined #ruby
havenwood has joined #ruby
marr has quit [Ping timeout: 272 seconds]
zeeraw has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
zeeraw has quit [Client Quit]
Astral_ has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
zeeraw has joined #ruby
funburn has quit [Quit: funburn]
coder_neo has joined #ruby
vlad_sta_ has joined #ruby
hogeo has joined #ruby
mengu has joined #ruby
mengu has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
<lupine>
\o/ :)
<lupine>
(sorry for making a fuss, I'm in paranoid mode at the moment)
<apeiros>
perfectly fine behavior on your part lupine
SHyx0rmZ has joined #ruby
jbpros has joined #ruby
sayan has joined #ruby
atmosx has joined #ruby
<atmosx>
hello
havenwood has quit [Ping timeout: 264 seconds]
RaDIrkA has joined #ruby
banisterfiend has joined #ruby
endash has joined #ruby
zeeraw has quit [Quit: Computer has gone to sleep.]
<withnale>
Is there a list of standard mixins that come with 1.9.3?
<atmosx>
I have a module that has a method which creates 3 lists. These lists are retrieved by iterating through a sqlite3 database once. I'd like to create 3 methods to access them on one hand but I wouldn't want to iterate through them. Also the name of the database might vary, it's not always the same... What's the best practice to do this? Creating a class inside my module I guess, initializing the db connection making an instance var with the data and write my
<atmosx>
methods which retrieve my data? I want to avoid multiple iterations.
dubsteph has joined #ruby
drumusician has quit [Ping timeout: 265 seconds]
icecandy has joined #ruby
<apeiros>
withnale: by "mixins" you mean modules?
Mars` has joined #ruby
amritanshu_RnD has quit [Quit: Leaving]
Nahra has quit [Remote host closed the connection]
<withnale>
modules that can be included in your classes to add additional functions like enumerable
<apeiros>
check e.g. ruby-doc.org or rdoc.info
iliketurtles has quit [Ping timeout: 248 seconds]
Nahra has joined #ruby
<withnale>
how would I search for them? I've tried googling for standard mixins
<Hanmac>
the most important for them are Enumerable for Lists, and Comparable for sortable object
bruno- is now known as Guest61636
Mars` has quit [Ping timeout: 240 seconds]
dubsteph has joined #ruby
<withnale>
Yes, I've got Enumerable. I thought there were more tho. nvm
<withnale>
thanks
gasbakid has quit [Ping timeout: 272 seconds]
Nahra has quit [Ping timeout: 252 seconds]
falood has joined #ruby
olivier_bK has joined #ruby
Tuxist has quit [Remote host closed the connection]
capicue has joined #ruby
brtdv has joined #ruby
Soda has quit [Read error: Connection reset by peer]
<withnale>
Ok. with a little reading the problem I'm trying to solve is more involved than I thought.
<apeiros>
ruby -e 'puts ObjectSpace.each_object(Module).reject { |c| c.is_a?(Class) }.map(&:to_s).sort' <-- emits all modules loaded with ruby (that's only core, though, not stdlib)
gasbakid__ has joined #ruby
<withnale>
I want to create a class that is adding more functions on top of what is basically a hash. I thought there might be a mixin I could use to get all the nice functions that hash has, but that doesn't seem to be the case....
<withnale>
I thought about subclassing Hash but that seems to be frowned upon.
<withnale>
How should I approach it?
withnale is now known as withnale_
gasbakid_ has quit [Ping timeout: 264 seconds]
<apeiros>
I think there are gems out there to help with that. I think one's called Hashie or somesuch
<apeiros>
hm, too bad havenwood has gone, iirc he was the author of one such lib
capicue has quit [Ping timeout: 264 seconds]
jbpros has quit [Quit: jbpros]
<withnale_>
ok. I'll have a look. thx
Nahra has joined #ruby
linduxed_ has joined #ruby
camilasan has quit [Remote host closed the connection]
jjbohn has joined #ruby
camilasan has joined #ruby
mengu has joined #ruby
<withnale_>
Ah. Eloquent Ruby has a chapter on delegation. I can use MethodMissing.
olivier_bK has quit [Ping timeout: 252 seconds]
Guest95221 has quit [Ping timeout: 240 seconds]
<apeiros>
I wouldn't
<withnale_>
Why's that?
withnale_ is now known as withnale
danshultz has joined #ruby
withnale is now known as withnale_
<apeiros>
either you know which methods you want to delegate, and then you can use metaprogramming or Forwardable to delegate those
<apeiros>
or you don't know what you want to delegate, but then you have different issues IMO :)
withnale_ is now known as withnale
<apeiros>
i.e., do you really want to delegate methods you don't know?
huttan has joined #ruby
Nahra has quit [Ping timeout: 268 seconds]
<withnale>
I'm just forwarding them to a hash object...
jjbohn_ has joined #ruby
camilasan has quit [Ping timeout: 248 seconds]
<withnale>
I could sanity check the name
sergicles has joined #ruby
jjbohn has quit [Ping timeout: 272 seconds]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
linduxed_ is now known as linduxed
linduxed has quit [Quit: WeeChat 0.4.2]
plotter has quit [Ping timeout: 245 seconds]
emocakes has quit [Quit: Leaving...]
<apeiros>
with method missing you'd do that at runtime, on every method call
olivier_bK has joined #ruby
linduxed has joined #ruby
camilasan has joined #ruby
funburn has joined #ruby
huttan has quit [Ping timeout: 252 seconds]
mengu has quit [Ping timeout: 245 seconds]
<withnale>
is SimpleDelgator any different?
Nahra has joined #ruby
iliketurtles has joined #ruby
funburn has quit [Client Quit]
sepp2k has joined #ruby
<apeiros>
not really. it uses Delegator, which uses method_missing.
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ox6abe has joined #ruby
Nahra has quit [Ping timeout: 272 seconds]
<apeiros>
delegations like Delegator or your own "method missing catch-all" only make sense if your object is supposed to be transparent. I'd assume yours isn't supposed to be, though.
<apeiros>
what do you expect YourHash#select to return? Hash or YourHash?
Hoozt has joined #ruby
sayan has quit [Remote host closed the connection]
<Hoozt>
Hi people
<apeiros>
and what do you expect YourHash#select! to return? self or the internal hash?
opt9 has joined #ruby
threesome has quit [Ping timeout: 248 seconds]
sepp2k1 has joined #ruby
hogeo has quit [Remote host closed the connection]
wallerdev has joined #ruby
sepp2k has quit [Read error: Operation timed out]
keen__ has joined #ruby
coder_neo has quit [Ping timeout: 248 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
ExCa|iBuR has joined #ruby
platypine has joined #ruby
shawnjgoff has quit [Read error: No route to host]
<Hoozt>
I have a little noobish deployment problem. Is anyone familiar with passenger? :/
<withnale>
Hmm. Ok. I'll do a bit more thinking.
<Hoozt>
Deploying on a debian.
keen_ has quit [Ping timeout: 264 seconds]
<Hoozt>
My guess is that it's using the wrong ruby version, but that's my guess after trying to read the backtrace.
<Hoozt>
Here's what it looks like
<Hoozt>
I get "no such file to load -- bundler/setup"
phus1on has joined #ruby
<Hoozt>
and in the backtrace it lists a bunch of custom_require.rb files from the urby 1.8 path
zz_tsykoduk is now known as tsykoduk
platypine has quit [Ping timeout: 245 seconds]
sevenseacat has joined #ruby
<Hoozt>
in my apache2 config i have set it use a specific ruby (i think?) with the line: PassengerRuby /usr/local/rvm/wrappers/ruby-2.0/ruby
andikr has quit [Remote host closed the connection]
SHyx0rmZ has quit [Ping timeout: 245 seconds]
mixel has joined #ruby
rellin has quit [Read error: Connection reset by peer]
rellin has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
<atmosx>
Hoozt: you are using debian's default ruby installation?
<Hoozt>
atnosx: Nope, 2.0 with rbenv
<Hoozt>
2.0.0p247
mercwithamouth has quit [Read error: Connection reset by peer]
cek has quit [Ping timeout: 252 seconds]
thyagobr has joined #ruby
zarubin has quit [Ping timeout: 264 seconds]
tsykoduk is now known as zz_tsykoduk
Ox6abe has quit [Remote host closed the connection]
<atmosx>
you sure passenger uses the right installation?
<Hoozt>
How do you mean?
pen has quit []
<atmosx>
you have any other ruby installaed on the system?
<atmosx>
other ruby version, default should be 1.9.x iirc
<atmosx>
on debian
Olipro has quit [Ping timeout: 246 seconds]
<Hoozt>
hmmm
<Hoozt>
No I don't think so
<atmosx>
can show me your config/logs actually
<atmosx>
otherwise it's a wild guess
<atmosx>
and full error when you launch the server
osvico has joined #ruby
Czupa has joined #ruby
<Hoozt>
when I do rbenv versions it only shows 2.0
dubsteph has quit [Read error: Connection reset by peer]
<atmosx>
is rbenv system-wide?
Nahra has joined #ruby
Nahra has joined #ruby
Nahra has quit [Changing host]
PragCypher has quit [Quit: Leaving]
camilasan has quit []
dubsteph has joined #ruby
Olipro has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dayepa has quit [Ping timeout: 246 seconds]
dubsteph_ has joined #ruby
nonamehero has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
thesheff17 has joined #ruby
jbpros has joined #ruby
newbiehacker has quit [Ping timeout: 245 seconds]
dubsteph has quit [Ping timeout: 272 seconds]
drumusician has joined #ruby
dayepa has joined #ruby
Guest61636 has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
relix has joined #ruby
relix has quit [Client Quit]
hogeo has joined #ruby
cek has joined #ruby
ExCa|iBuR has quit [Ping timeout: 245 seconds]
sayan has joined #ruby
koupe_2 has joined #ruby
capicue has joined #ruby
tobyink has joined #ruby
jjbohn_ has quit [Quit: Leaving...]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
hogeo has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
capicue has quit [Ping timeout: 252 seconds]
SteveBenner9 has quit [Ping timeout: 265 seconds]
jbw has quit [Ping timeout: 248 seconds]
danshultz has quit [Ping timeout: 252 seconds]
sailias has joined #ruby
huttan has joined #ruby
nonamehero has joined #ruby
mjs2600 has joined #ruby
BizarreCake has joined #ruby
predator117 has quit [Ping timeout: 264 seconds]
carraroj has quit [Quit: Konversation terminated!]
lmickh has quit [Ping timeout: 245 seconds]
carraroj has joined #ruby
carraroj has quit [Remote host closed the connection]
jbw has joined #ruby
predator117 has joined #ruby
banisterfiend has quit [Quit: Computer has gone to sleep.]
fgo has joined #ruby
poikon has joined #ruby
zoee has joined #ruby
nateberkopec has joined #ruby
thyagobr has quit [Ping timeout: 252 seconds]
alyx_ has joined #ruby
carraroj has joined #ruby
Xeago has joined #ruby
bruno- has joined #ruby
iliketurtles has quit [Ping timeout: 248 seconds]
Cheos has quit [Read error: Connection reset by peer]
banisterfiend has quit [Quit: Computer has gone to sleep.]
<tobyink>
Does anyone here have any experience using the 'traitor' gem? It's giving me strange errors I don't understand.
satman has quit [Ping timeout: 245 seconds]
RichardBaker has quit [Quit: RichardBaker]
Clooth has joined #ruby
rickruby has quit [Remote host closed the connection]
satman has joined #ruby
jjbohn has joined #ruby
moeSeth has joined #ruby
karupanerura is now known as zz_karupanerura
jdguzman has quit [Ping timeout: 264 seconds]
jhaals has joined #ruby
kaspergrubbe has joined #ruby
mjs2600 has quit [Remote host closed the connection]
sepp2k has joined #ruby
wallerdev has quit [Quit: wallerdev]
arcke has joined #ruby
Xeago has quit [Remote host closed the connection]
zoee has quit [Quit: This computer has gone to sleep]
jbw has quit [Ping timeout: 272 seconds]
capicue has joined #ruby
zoee has joined #ruby
TDJACR has quit [Remote host closed the connection]
Astral__ has joined #ruby
satman has quit [Ping timeout: 252 seconds]
jbw has joined #ruby
Astral_ has quit [Ping timeout: 245 seconds]
satman has joined #ruby
capicue has quit [Ping timeout: 272 seconds]
SeySayux has quit [Ping timeout: 246 seconds]
SeySayux has joined #ruby
sevenseacat has quit [Quit: Leaving.]
coderhs has quit [Ping timeout: 245 seconds]
TDJACR has joined #ruby
raphaelivan has joined #ruby
benzrf has joined #ruby
_bart has joined #ruby
danshultz has joined #ruby
platzhirsch has joined #ruby
danshultz has quit [Ping timeout: 245 seconds]
rickruby has joined #ruby
iliketurtles has joined #ruby
Astral__ has quit [Read error: Connection timed out]
ElectronFunBaby has joined #ruby
tonni has joined #ruby
jhaals has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pskosinski has joined #ruby
jonathanwallace has joined #ruby
<benzrf>
shevy: TIME FOR YOUR HASKELL BRAINWASHING
<apeiros>
I thought washing was supposed to leave the subject cleaner after the proceedings than before?
<benzrf>
apeiros: hue
cek has quit [Quit: жопа диридай диридиридай]
<benzrf>
apeiros: ill have you know that haskells type system is amazingly aweome
<benzrf>
*awesome
adambeynon has joined #ruby
Astralum has joined #ruby
thelorax123 has quit [Remote host closed the connection]
jhaals has joined #ruby
poikon has quit [Remote host closed the connection]
thelorax123 has joined #ruby
jjbohn has quit [Quit: Leaving...]
poikon has joined #ruby
s_kilk has joined #ruby
wallerdev has joined #ruby
Czupa has quit [Remote host closed the connection]
jhaals has quit [Client Quit]
Rickmasta has quit [Quit: Leaving]
s_kilk has quit [Client Quit]
linduxed has quit [Ping timeout: 245 seconds]
s_kilk has joined #ruby
jjbohn has joined #ruby
lukec has joined #ruby
carlyle has joined #ruby
jrhe has joined #ruby
gasbakid_ has joined #ruby
fgo has quit [Remote host closed the connection]
fgo has joined #ruby
phus1on has quit [Quit: .]
gasbakid has quit [Ping timeout: 260 seconds]
Rickmasta has joined #ruby
<platzhirsch>
λx.x
platzhirsch has left #ruby [#ruby]
IceDragon has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
gasbakid_ has quit [Ping timeout: 252 seconds]
jonathanwallace has joined #ruby
gasbakid__ has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
<benzrf>
more like \x -> x
LarsSmit has joined #ruby
<benzrf>
:: a -> a
spike|spiegel has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
Astralum has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
allaire has joined #ruby
vlad_starkov has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.4.2]
jrhe has quit [Read error: Connection reset by peer]
jrhe_ has joined #ruby
MattStratton has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
coder_neo has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
spike|spiegel has joined #ruby
iliketurtles has quit [Ping timeout: 245 seconds]
yacks has quit [Ping timeout: 268 seconds]
myappleguy has joined #ruby
gazarsgo has joined #ruby
Hanmac has quit [Remote host closed the connection]
tobyink has quit [Ping timeout: 260 seconds]
dr_bob has joined #ruby
Hanmac has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
ElectronFunBaby has quit [Quit: Leaving...]
nikkita has joined #ruby
<nikkita>
hi
capicue has joined #ruby
<nikkita>
i cloned a github project of a friend of mine, but i dont know how to start it. she cant help me, because she got her ruby environment pre installed. i installed http://railsinstaller.org/en
<nikkita>
whats next?
tobyink has joined #ruby
akonny has quit [Quit: akonny]
fgo has joined #ruby
jonathanwallace1 has joined #ruby
FOSScookie has joined #ruby
<_bart>
nikkita, go with a terminal to the project folder and run "rails s"
angusiguess has joined #ruby
jonathanwallace has quit [Ping timeout: 268 seconds]
maycon__ has quit [Remote host closed the connection]
akonny has joined #ruby
Spami has joined #ruby
<nikkita>
under C:\Sites\todo is a sample app that comes with railsinstaller.org/en
<nikkita>
when i try it there, it starts a server, but on localhost:3000 it tells me ActiveRecord::ConnectionNotEstablished
<Morrolan>
The application's trying to connect to a database. You don't have a database set up yet.
likemike has joined #ruby
<nikkita>
i thouht it comes with rubyinstaller
<Morrolan>
Somewhere, in one of the configuration files, you'll have to tell it what database to use. (And how to connect)
mmitchell has joined #ruby
<nikkita>
hm, oh :/
randomnick_ has joined #ruby
zeeraw has joined #ruby
zipper has joined #ruby
zeeraw has quit [Client Quit]
<nikkita>
railsinstaller.org/en tells me about : Ruby 1.9.3 Rails 3.2 Bundler Git Sqlite TinyTDS SQL Server Support DevKit
<nikkita>
these packages come with it
<nikkita>
to me that sounds as if sqlite and sql server support might be what i need
<nikkita>
do i have to install something else?
<nikkita>
and where do i find the config file i have to edit?
zeeraw has joined #ruby
<nikkita>
and how do i find out what to put in there?
havenwood has joined #ruby
<Morrolan>
I'm sure railsinstaller.org has tutorials.
virtualize has quit []
koupe_2 has quit []
colonolGron has joined #ruby
<likemike>
any idea what to code ? :D
<Morrolan>
Though, IIRC, when you create a rails application (via rails new foo_bar) the default database config file should be set up to use an SQLite database.
<Morrolan>
So it *should* work out of the box.
iliketurtles has joined #ruby
mojjojo has joined #ruby
bruno- has quit [Quit: leaving]
EvanR_ has joined #ruby
ckinni has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
gverri_ has joined #ruby
Notte has joined #ruby
gverri_ has quit [Max SendQ exceeded]
Notte has quit [Client Quit]
sailias has quit [Ping timeout: 248 seconds]
hside has joined #ruby
jjbohn has quit [Quit: Leaving...]
justsee has joined #ruby
IcyDragon has joined #ruby
gasbakid__ has quit [Quit: Quitte]
gasbakid has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
IcyDragon is now known as IceDragon
zoee has quit [Quit: This computer has gone to sleep]
jjbohn has joined #ruby
mixel has quit [Quit: mixel]
capicue has joined #ruby
scarolan has joined #ruby
zz_tsykoduk is now known as tsykoduk
mojjojo has quit [Quit: mojjojo]
fgo has quit [Read error: No route to host]
icecandy has joined #ruby
fgo has joined #ruby
zipper has quit [Ping timeout: 264 seconds]
brtdv has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
zipper has joined #ruby
fgo has quit [Read error: No route to host]
capicue has quit [Ping timeout: 245 seconds]
osvico has quit [Ping timeout: 245 seconds]
poikon has quit [Remote host closed the connection]
ExCa|iBuR has joined #ruby
poikon has joined #ruby
kaldrenon has joined #ruby
aryaching has joined #ruby
LarsSmit has quit [Quit: Leaving.]
falood has quit [Remote host closed the connection]
falood has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
teoric has joined #ruby
predator117 has quit [Ping timeout: 248 seconds]
brtdv has joined #ruby
zoee has joined #ruby
pagios has joined #ruby
<pagios>
hi all how can i share variables between main program and thread?
<gazarsgo>
how can i tell what git sha my gem is at ?
mojjojo has joined #ruby
predator117 has joined #ruby
kaldrenon has quit [Ping timeout: 260 seconds]
tsykoduk is now known as zz_tsykoduk
<benzrf>
gazarsgo: can you explain a little better?
jjbohn has quit [Quit: Leaving...]
osvico has joined #ruby
<apeiros>
pagios: there's no "barrier" between threads
zipper has quit [Ping timeout: 252 seconds]
<gazarsgo>
i have a gemfile which includes a gem from rubygems and i want to clone the source repo at the same sha my lock file is at
falood has quit [Ping timeout: 240 seconds]
zipper has joined #ruby
<apeiros>
pagios: in the opposite - you should take care that threads don't accidentally race each others in the access of variables (google "race conditions")
<pagios>
i am trying to make a while loop when start is received and stop the while loop when a stop is received on serial
tonni has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 268 seconds]
camilasan has joined #ruby
poikon has quit [Remote host closed the connection]
tonni has joined #ruby
<gazarsgo>
benzrf: i mean, i think i found it manually, but i was hoping there was a definitive way to do it than looking through commit history / rubygems publish dates
<pagios>
apeiros: anything bad seen?
Solnse has joined #ruby
<pagios>
at some ppoint i get sh: 1: cannot create /var/www/fifo: Interrupted system call
<Hanmac>
havenwood: ohh now you spoilerd the answer
<havenwood>
Hanmac: lawl
xk_id has joined #ruby
<shaileshg__>
Hanmac: hmm
<havenwood>
shaileshg__: This shoulda given away the surprise: `gem install iso8583`
poikon has joined #ruby
<shaileshg__>
hmm
pskosinski has quit [Quit: Til rivido Idisti!]
poikon has quit [Client Quit]
<shaileshg__>
havenwood: also as it is in official ruby-doc.org/..., does it means that it is the officially endorsed gem by ruby community? (I am new to ecosystem and so understanding it out)
nikkita has quit [Quit: Page closed]
<havenwood>
shaileshg__: No endorsement whatsoever.
<shaileshg__>
havenwood: okay..
<shaileshg__>
there are 2 other gems out there which support iso8583 protocol
yfeldblum has joined #ruby
<shaileshg__>
i was just wondering why one is on ruby-doc.org and other two aren't
timonv has quit [Remote host closed the connection]
h0rrorvacui has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
eka has joined #ruby
<havenwood>
shaileshg__: So ruby-doc.org hosts docs for rdoc-documentation-based gems, a choice unrelated to inclusion in Ruby. Many authors like to have their docs on github or elsewhere. Ignore where the docs are, it isn't informative.
zipper has quit [Ping timeout: 268 seconds]
<apeiros>
pagios: was shopping, sorry. please fix your indents - that code is horrible to read
<gazarsgo>
if bundle puts the code in bundle/ruby/2.0.0/gems/* why don't my changes there get loaded and run ?
EvanR_ has quit [Ping timeout: 272 seconds]
ehc has joined #ruby
JohnBat26 has joined #ruby
mmitchell has quit [Remote host closed the connection]
<Hanmac>
gazarsgo: #bundler
pwh has joined #ruby
<havenwood>
gazarsgo: Check that the gem is indeed installed where you think it is: bundle show gem_name_here
<gazarsgo>
that's the folder i'm looking at
<gazarsgo>
oof
<gazarsgo>
thanks
<havenwood>
gazarsgo: np :P
jjbohn has joined #ruby
carlyle has quit []
<gazarsgo>
so more of a ruby question -- when i have an irb open, and i change a .rb that's already been required/loaded, is there any way to reload my changes without losing my irb state ?
jonathanwallace1 has quit [Ping timeout: 260 seconds]
jjbohn_ has joined #ruby
<havenwood>
gazarsgo: `require` doesn't load something you've already loaded, but `load` does
<Morrolan>
ISO8583::Message is probably the class you want to subclass.
zoee has quit [Quit: This computer has gone to sleep]
tsykoduk is now known as zz_tsykoduk
<gazarsgo>
how "bad" is it to use instance_variable_get ?
<gazarsgo>
or is it 'semantic' to do so ?
zz_michael_mbp is now known as michael_mbp
intuxicated_ has joined #ruby
<MrZYX>
entirely depends on the use case, what's yours?
zipper has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<shaileshg__>
Morrolan: thanks for the pointer.. actually i have moved the code in Module ISO8583 coz otherwise it was giving error uninitialized constant MyMessage::N
intuxicated_ is now known as hiensoft
<gazarsgo>
trying to expose a better error in an exception handling case
<shaileshg__>
now it looks like
<shaileshg__>
module ISO8583
<shaileshg__>
class MyMessage < Message
<shaileshg__>
mti_format N, :length => 4
<shaileshg__>
end
<shaileshg__>
end
<shaileshg__>
and works fine
hiensoft is now known as hidensoft
<Morrolan>
shaileshg__: Yep, that's another way to do it. :)
zipper has joined #ruby
<MrZYX>
shaileshg__: in the future > 3 lines -> pastebin
<Morrolan>
Now your class lives inside the ISO8583 namespace, so you can access other classes from that namespace.
pskosinski has joined #ruby
<MrZYX>
gazarsgo: can you show code?
hidensoft has quit [Changing host]
hidensoft has joined #ruby
<gazarsgo>
yeah let me push it
pskosinski has quit [Read error: Connection reset by peer]
macmartine has quit [Remote host closed the connection]
<yjmsf20>
Hi guys. I am trying to store a directory structure in rails. Is it OK to use "rails g model directory name:string directory:references mbid:string", and "rails g file name:string directory:references"?
<shvelo>
btw is there any incompatibility between 1.9.3 and 2.0.0?
ehc has joined #ruby
<benzrf>
dont think s
<benzrf>
o
dnyy_ has joined #ruby
wald0 has quit [Ping timeout: 260 seconds]
<shevy>
ack
<shevy>
noooo
<shevy>
don't fall into the apt-get trap!
zeeraw has joined #ruby
<shvelo>
it sucks that OpenShift doesn't have Ruby2.0
<shevy>
shvelo yeah, in some ways. I think some different warning messages. also syck has been removed so yaml files that worked in 1.9.x may no longer work in 2.0 depending on the yaml files in question
wald0 has joined #ruby
EvanR_ has quit [Ping timeout: 245 seconds]
<shevy>
it sucks that most linux distributions are too stupid to allow multiple versions of programs to reside side by side on a user's computer
dnyy has quit [Ping timeout: 265 seconds]
<shvelo>
yeah
<benzrf>
oh hello shvelo
<benzrf>
*shevy
<benzrf>
are you ready for your haskell brainwashing
<dionyziz>
However, when I try to run require 'hola', I am presented with the following error message: cannot load such file -- hola
brtdv has joined #ruby
<dionyziz>
I'm not sure what I'm doing wrong. Help?
<havenwood>
dionyziz: what version of Ruby are you on?: gem -v
<havenwood>
ruby -v rather**
<dionyziz>
I'm using rbenv and I'm on ruby 2.0.0-p247
<havenwood>
dionyziz: make double, triple sure you're using what you think you are
<havenwood>
dionyziz: which gem
<havenwood>
dionyziz: gem -v
<havenwood>
in irb, check: RUBY_VERSION
<diegoviola>
chruby > rbenv
<diegoviola>
who needs shims
<havenwood>
<3 chruby
<diegoviola>
shims == crap
<shevy>
dionyziz whenever you do: require 'hola' in this context, ruby tries to find a file called hola.rb in your SITE_DIR first, so for some reason the file hola.rb can not be found
Lewix has quit [Remote host closed the connection]
capicue has joined #ruby
<shevy>
dionyziz is your gem available somewhere to test?
iszak has joined #ruby
Solnse has joined #ruby
<iszak>
Does anyone have an up-to-date Ruby 2.0 guide (online)?
<dionyziz>
havenwood: Yep, you're right, I was having a problem with my ruby version. It works now! Thank you for your help :)
<havenwood>
dionyziz: np
<dionyziz>
shevy: Thank you for your time also :)
<shevy>
cool
peterdecroos has quit [Read error: Connection reset by peer]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
havenwood I hereby call you the official ruby newcomer trainer
<shevy>
benzrf, you are the official #ruby mascot now
* havenwood
searches for something to hide behind.
<benzrf>
yaaay
<benzrf>
Ive always liked being a mascot
carraroj has quit [Quit: Konversation terminated!]
<gr33n7007h>
Which is the official channel #ruby / #ruby-lang?
duggiefresh has quit [Ping timeout: 252 seconds]
peterdecroos has joined #ruby
fgo has quit [Ping timeout: 245 seconds]
<havenwood>
gr33n7007h: The other is the directly-linked one from ruby-lang.org. This is the no reg req Ruby channel.
duggiefresh has joined #ruby
<havenwood>
gr33n7007h: Like Python has a registration required and not-so as well.
capicue has quit [Ping timeout: 240 seconds]
d45h has quit []
<gr33n7007h>
Ah, ok ;)
fella6s has joined #ruby
sam113101 has quit [Quit: WeeChat 0.4.3-dev]
sam113101 has joined #ruby
mixmix has quit [Quit: Leaving]
thumpba_ has joined #ruby
fella5s has quit [Ping timeout: 252 seconds]
bean has joined #ruby
zastern has joined #ruby
<zastern>
I've got a really silly question, but it's something I've never been able to figure out: Is there a way to set pry to use vim keybindings?
aryaching has quit [Ping timeout: 252 seconds]
thumpba_ has quit [Remote host closed the connection]
<havenwood>
zastern: i think so, but i dunno - might ask in #pry
<RubyPanther>
brian____: Pickaxe once through cover to cover is required reading. Also highly recommended is Matz's book, and The Well-Grounded Rubyist by David A. Black
tylersmith has quit [Ping timeout: 272 seconds]
<nobitanobi>
shevy, that's why!
<nobitanobi>
:)
mengu has joined #ruby
lmmx has quit [Quit: Leaving]
ehc has quit [Quit: ehc]
<shevy>
omg
<shevy>
that is not a samurai
<brian____>
does it matter so much if the book covers 1.8 vs 1.9 vs 2.0
<nobitanobi>
shevy, did you know that if you do.. include M, include N, include M -- and both M and N have declared a particular method... the method in N would be the one invoked?
<shevy>
back when I was young ninja and samurai were cool
<havenwood>
brian____: make sure everything covers 1.9.2+, not old editions
<shevy>
nobitanobi, no idea. I always assume that the last method included overrules all prior ones
<havenwood>
brian____: 1.9 and 2.0 are quite similar (consider 1.9 a release candidate for 2.0) but 1.8 is end-of-life.
mjs2600 has quit [Remote host closed the connection]
<nobitanobi>
shevy, nopes!
<havenwood>
Past EOL.
<brian____>
havenwood: right, thanks
lukec has quit [Quit: lukec]
<nobitanobi>
if it was already added, nah
delinquentme has joined #ruby
<nobitanobi>
*included
Ox6abe has quit [Ping timeout: 272 seconds]
<RubyPanther>
I learned from _why's (poignant) guide, and pickaxe
<delinquentme>
creating novel methods ending in ? like .integer?
<delinquentme>
how do?
<delinquentme>
Or what would I google?
mengu has quit [Remote host closed the connection]
<nobitanobi>
delinquentme, just create your method and add '?' at the end
<shevy>
weird
<shevy>
>> module ABC; def test; puts 'from ABC'; end; end; module DEF; def test; puts 'from DEF'; end; end; include ABC; test; include DEF; test; include ABC; test
<iszak>
so there is no open source book for ruby 2.0?
finnomenon has joined #ruby
Ox6abe has joined #ruby
<havenwood>
Lmmx: That begin/rescue logic better. What doesn't work about it?
Ox6abe__ has quit [Ping timeout: 265 seconds]
<jb41>
btw. I've to make teams ranking, from 1..6, and I've some rules how to rank them. After first rule there is such situation, that there are (rank => teams): {1=>[], 2=>[a, b], 3=>[c], 4=>[], 5=>[d, e, f], 6=>[]}. Thing that is getting into consideration in applying 2nd rule is let's say a.sth (it's a number). I have no ide how to juggle with that data. Now I'm considering if I'm using good data representation.
zeeraw has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
<havenwood>
Lmmx: Welp, rescuing the exception that was raised should work. Double check the error output matches that exception.
Ox6abe__ has quit [Ping timeout: 252 seconds]
<lmmx>
changed it to rescue Watir::Exception and still the same
mikepack has quit [Remote host closed the connection]
wald0 has quit [Read error: Connection reset by peer]
maletor has joined #ruby
<lmmx>
26
<lmmx>
Watir::Exception::UnknownObjectException: unable to locate element, using {:xpat
<lmmx>
h=>"//h1/*/span", :tag_name=>"span"}
<lmmx>
this is always how my nights end these days lol
Ox6abe has joined #ruby
jacobw has joined #ruby
mikepack has joined #ruby
zastern has quit [Remote host closed the connection]
zastern has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
wald0 has joined #ruby
<jacobw>
i'm trying to install a gem in my rails env with an option, like, gem install mysql2 -- --with-mysql-dir=/usr/share/gitlab/mysql-connector-c-6.1.2-linux-glibc2.5-x86_64, in the directory /usr/share/gitlab/gitlab/vendor/bundle/ruby/2.0.0 which is owned by the gitlab user, how can i do that?
pskosinski_ has joined #ruby
fgo has joined #ruby
banisterfiend has joined #ruby
pskosinski has quit [Ping timeout: 245 seconds]
soukihei has quit [Ping timeout: 245 seconds]
tylersmith has joined #ruby
macmartine has quit [Remote host closed the connection]
jonshannow has joined #ruby
Mars` has quit [Remote host closed the connection]
drag00n has joined #ruby
Mars` has joined #ruby
Mars`_ has joined #ruby
tylersmith has quit [Ping timeout: 241 seconds]
<jonshannow>
I'm new to Ruby... in Python one can do "zip(a, b, c)" without an object on the LHS, so I could write "a.zip b, c" - but how would I do this if I didn't have an object? "[].zip a, b, c" won't work - I'm not sure what search terms to use here either...
shoMo has joined #ruby
<bnagy>
what are a, b and c?
<momomomomo>
sounds like they must be arrays if you're using Array#zip
pwh has joined #ruby
adjo has joined #ruby
Mars` has quit [Ping timeout: 240 seconds]
<jonshannow>
Okay, toy example: I have "data = 1..11" and "labs = 'ABACDCADBCB'.each_char" - I want to zip them together as input to Hash
Ox6abe has quit [Remote host closed the connection]
G has quit [Ping timeout: 245 seconds]
iszak has quit [Quit: Page closed]
maletor has quit [Quit: Computer has gone to sleep.]
<jonshannow>
I had "Hash[data.zip labs]" which is fine... but what I want to know is... What if I had a list of [a, b, c] which are the items to be zipped... Is there a sort of `Array.zip a, b, c` which takes generic enumerables and gives me a list
Ox6abe_ has joined #ruby
Liquid-- has joined #ruby
G has joined #ruby
<bnagy>
no, you call it on the first collection
olivier_bK has quit [Ping timeout: 252 seconds]
<momomomomo>
>> data = Hash(*1..11; labs = 'ABACDCADBCB'.chars; data.zip labs)
<havenwood>
jonshannow: So you don't want a Hash as the output? You want arbitrary sized Arrays? Or something else?
Guest6137 is now known as fluffheadsr
iliketurtles has quit [Ping timeout: 260 seconds]
jcarouth has quit [Ping timeout: 252 seconds]
Barrin6 has joined #ruby
Ox6abe__ has joined #ruby
xk_id has quit [Quit:
iamjarvo has quit [Remote host closed the connection]
Ox6abe_ has quit [Ping timeout: 245 seconds]
<jonshannow>
havenwood: I think I'm just after if I have "a" and "b" is there a way to zip them such as Array.zip a, b - or do I always have to have an object on the left, so that it's "a.zip b"...
weems has quit [Read error: Connection reset by peer]
Ox6abe has joined #ruby
weems has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
delinquentme has quit [Ping timeout: 252 seconds]
<bnagy>
ruby is consistently OO, so #zip is a method on a collection instance
zeeraw has joined #ruby
<bnagy>
there's no 'naked' zip
Ox6abe_ has joined #ruby
<havenwood>
jonshannow: In the case of #zip, yeah, you'd have to backbend a bit:
<jonshannow>
I had noticed that, but I'm not going to have equal sized things... in fact, ideally I'd like a zip that stopped on shortest enumerable but... one step a time
<jonshannow>
So... if I have two files, that are the exact same file size, but have different length rows, such that there are a different numbering of rows, how do I zip those two together to do a row by row comparison, but stop after the shortest file
<bnagy>
are they gigantic?
<jonshannow>
If one was really small, it looks like I could do [*smaller_file].zip larger_file
simoz has quit [Ping timeout: 264 seconds]
<bnagy>
cause if not then use each_line.to_a and then sort_by(&:size)
<jonshannow>
bnagy: basically, I'd like to take each line at a time... (smallish... but they won't fit in ram)
<bnagy>
or read I think reads into line array
<bnagy>
sorry read_lines
<MrZYX>
File.readlines actually
pskosinski_ has quit [Quit: Til rivido Idisti!]
<havenwood>
jonshannow: first, second = File.readlines(a), File.readlines(b)
perow has joined #ruby
<bnagy>
no underscore
vlad_starkov has quit [Remote host closed the connection]
<havenwood>
size from array will work better than my make-believe version
<jonshannow>
that loads into an array though? Can I avoid that so I only get one line at a time
vlad_starkov has joined #ruby
<havenwood>
readline
<jonshannow>
So, I loop and call readline until one of 'em stops I guess
<MrZYX>
note that readline raises EOFError
<MrZYX>
gets is the equivalent that returns nil
<bnagy>
that's basically a lazy version of zip - ie yes, it will work
<havenwood>
MrZYX: ooh, good point
<havenwood>
MrZYX: #gets is nicer here
lmmx has left #ruby ["Leaving"]
Ox6abe has quit [Ping timeout: 252 seconds]
<jonshannow>
bnagy: Right... so there's not a lazy version of zip at all?