<heftig>
class Foo; class Bar < self; end; end is the same as class Foo; class Bar < Foo; end; end
liluo has joined #ruby
<heftig>
both create a class Foo and a class Foo::Bar that extends Foo
<minijupe>
heftig: if you want to create a class that extends a class, why would you do it INSIDE that class. That's not strictly necessary is it?
<heftig>
no, it's not
blast_hardcheese has joined #ruby
<heftig>
it's just a namespacing choice
c0rn_ has quit [Quit: Computer has gone to sleep.]
<minijupe>
heftig: I see what you mean
savage- has quit [Ping timeout: 260 seconds]
igotnolegs has joined #ruby
<minijupe>
it does make sense when you think about it, just confusing what self actually evaluated to at that moment
<minijupe>
so a class in a class doesn't inherit anything from the class it's in?
<mrFrog>
i'm trying to figure out how to output the character codes of a string, but i just keep outputting the string… say i have this "ab".each_byte{|c| output << c} - "output" ends up as "ab" rather than "9798" or something. ideas on how i should be doing this?
adeponte has quit [Remote host closed the connection]
<minijupe>
heftig: ^
<heftig>
minijupe: it's just like a class in a module
hakunin has quit [Remote host closed the connection]
tomb has joined #ruby
<minijupe>
heftig: so blissfully ignorant of the class it's in, or the module THAT's in? Or is there some way to refer to the "parent" class's methods without referring to the parent by name. Not really parent, tho...
<heftig>
as i said, it's just like a class nested in a module
mrich_ has quit [Quit: Page closed]
sdwrage has joined #ruby
<minijupe>
heftig: yes, but since I don't know what a class in a class is like, I wouldn't know what a class in a module is like any better :) I'm just starting out with Ruby (or so it feels)
jonathanwallace has joined #ruby
<heftig>
it just affects name lookup
<heftig>
inside Foo, you can refer to Bar as Bar, but outside of Foo, you need to use Foo::Bar
<heftig>
(a toplevel class Bar would be ::Bar, if you need it unambiguously)
<minijupe>
heftig: inside Bar can you refer to Foo by anything other than Foo?
sailias has joined #ruby
Hanmac1 has joined #ruby
nari has joined #ruby
pk1001100011 has quit [Ping timeout: 245 seconds]
GoGoGarrett has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 260 seconds]
<heftig>
minijupe: well, you could use the "name" method to get Bar's name "Foo::Bar" and then do .split("::"), get the parent you want, and use const_get to turn the String into the constant you need
Spooner has quit [Ping timeout: 245 seconds]
Aaton_off is now known as Aaton
<minijupe>
heftig: cool, tnx for your help. appreciate it.
<pzero>
hey guys, i'm a python and java guy. i was job hunting and have a technical interview next week for a job utilizing ruby on rails. any recommended tuts to read over the next few days? ill be fine on algorithms,mvc, oop, and all the common stuff. i just need the language specific info
<bnagy>
you could try #rubyonrails
strife25 has joined #ruby
<bnagy>
I doubt you'll have time to get a grounding in ruby and then also all the wacky rails differences
<rails>
^this
<pzero>
ok, cool. thank you
Quadlex has joined #ruby
Ontolog has quit [Quit: Ontolog]
bradhe has joined #ruby
ananthakumaran has joined #ruby
Ontolog has joined #ruby
mxweas_ has joined #ruby
choffstein has quit [Remote host closed the connection]
sana has joined #ruby
<coyo>
good evening, rubyists
freeayu has quit [Ping timeout: 248 seconds]
<coyo>
bnagy: how are you?
<iamjarvo>
Array === value checks is the same as Array.include?(value)?
<iamjarvo>
Array === value is the same as Array.include?(value)? (deleted the word checks)
bradhe has quit [Ping timeout: 264 seconds]
JohnBat26 has joined #ruby
minijupe has joined #ruby
mjb2k has joined #ruby
jesse_ has joined #ruby
<jesse_>
hello
<jesse_>
hello world
<dankest>
puts "welcome child."
jjang has quit [Remote host closed the connection]
Draco_ has joined #ruby
mrdodo has joined #ruby
jesse_ has quit [Client Quit]
<dankest>
@ruby_converts << jesse_
<otters>
iamjarvo: Array === value is value.is_a? Array
noyb has joined #ruby
<otters>
iirc
mockra has joined #ruby
freeayu has joined #ruby
<iamjarvo>
otters but if i have count = 1..2; count === 1 returns true
<dankest>
count = 1 assigns count
<dankest>
you'll always get true
<bnagy>
iamjarvo: and is a Range an Array ?
<dankest>
*count = 11.2
<dankest>
1..2
mrdodo has quit [Ping timeout: 246 seconds]
<bnagy>
wait let me check
<bnagy>
Range.is_a? Array => false
yoklov has quit [Quit: computer sleeping]
<iamjarvo>
you are right
benjammin891 has joined #ruby
<iamjarvo>
so === is a method on array not range
noyb has quit [Client Quit]
<bnagy>
it's a method on both, isn't it?
<burgestrand>
Avoid the Array === value construction, it does not allow you to substitute value for something that behaves as an array
maek has joined #ruby
<iamjarvo>
bnagy well in the context of my question
<burgestrand>
Came in late, missed the conversation but I saw that :p
<maek>
in ruby 1.9.3 does the new hash syntax foo: 'bar' only work when you want a symbol for the key or am I missing something? thanks.
<otters>
right
<otters>
only if you want symbols as keys
<burgestrand>
maek: yes, only symbols
L-----D has joined #ruby
<burgestrand>
maek: not even quoted symbols
<bnagy>
iamjarvo: in the context of your question, if you mean to say include? say include? not something else that's harder to read
<maek>
otters, burgestrand: thanks
<maek>
burgestrand: yeah noticed that. so hash rockets for everything non symbol?
<bnagy>
mmm hash rockets
vertroa has quit [Ping timeout: 248 seconds]
wereHamster has quit [Changing host]
wereHamster has joined #ruby
<burgestrand>
maek: everything non-symbol and everything with funky symbols like :"symbols with spaces"
<iamjarvo>
bnagy was looking through a slide deck and saw the example. trying to make sense of it
<bnagy>
now I want brownies
<burgestrand>
maek: personally I use only the new syntax when calling methods
ringotwo has joined #ruby
<burgestrand>
or, try to, it’s hard to be consistent, I like the new syntax :p
<maek>
burgestrand: thats over my head. can you elaborate?
<maek>
i like it cause its json :)
<burgestrand>
maek: on funky symbols or calling methods?
<maek>
on calling methods
bglusman_ has quit [Remote host closed the connection]
<maek>
burgestrand: derp. when passing a hash for method args
sana has joined #ruby
mockra has quit [Remote host closed the connection]
<maek>
burgestrand: ty fluffy bunnies!
<burgestrand>
maek: it makes them look like actual keyword arguments that are not yet available in ruby
L-----D has left #ruby [#ruby]
mockra has joined #ruby
<iamjarvo>
bnagy so its just doing .include? on a range . i had the wrong class type right
<burgestrand>
:)
<bnagy>
iamjarvo: they do different things, afaik
<bnagy>
imho I think #=== is too fragmented now to be useful
<bnagy>
it never does what I want, so I just avoid it entirely
<bnagy>
and it's unclear
<iamjarvo>
kk
<burgestrand>
Using === can be confusing since it’s a "matching" operator by convention
<maek>
burgestrand: thanks again
<burgestrand>
maek: *bows*
ryanf has joined #ruby
Icoin has joined #ruby
sana has quit [Client Quit]
mockra has quit [Ping timeout: 245 seconds]
maek has left #ruby [#ruby]
jjang has joined #ruby
yoklov has joined #ruby
DrShoggoth has quit [Quit: Leaving]
* jackhammer2022
eagerly waiting for SciRuby
mrsolo has quit [Quit: This computer has gone to sleep]
<otters>
=== is used in the case statement
noyb has joined #ruby
<otters>
case var; when a: ...; when b: ...; when c: ...; end
<otters>
if a === var then ... elsif b === var then ... elsif c === var then ... end
joma has left #ruby ["Leaving"]
<bnagy>
what's SciRuby?
itnomad has quit [Quit: Leaving]
<bnagy>
it only works when you pay it money and then only with a reasonable statistical degree of certainty?
kzkh has joined #ruby
mockra has joined #ruby
<jackhammer2022>
I refuse to believe that
<iamjarvo>
otters good point
perryh_away is now known as perryh
<jackhammer2022>
bnagy: they are on the right track with their alpha release
<bnagy>
ok well it sounds like either a conjob or advertising or both
mikepack has quit [Remote host closed the connection]
<jackhammer2022>
as you think
<bnagy>
what about the current rubies is unsuitable for 'science'?
<otters>
speed?
<bnagy>
because only 'science' needs that
freeayu has quit [Ping timeout: 260 seconds]
kevinbond has quit [Quit: kevinbond]
pk1001100011 has joined #ruby
mxweas__ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<coyo>
is anyone aware of any existing botnet plugin for rbot or any other ruby irc bot that allows you to connect irc bots together in an eggdrop-like fashion?
mxweas_ has quit [Disconnected by services]
mxweas__ has quit [Client Quit]
mxweas_ has joined #ruby
mxweas__ has joined #ruby
<bnagy>
yes because we're all secretly russian carders and traf brokers
<coyo>
lol
<coyo>
is that all eggdrop is supposedly used for?
* coyo
googles traf
<bnagy>
doubt you'll find it in english, it's the russian forum term for advertising hits from botnets
minijupe has quit [Quit: minijupe]
<jackhammer2022>
lol
noyb has quit [Quit: Leaving.]
<coyo>
ah.
<coyo>
"traffic brokerage"
<coyo>
fair enough. no, i do not want to engage in carding or traffic brokerage. i want to build a ruby irc botnet that focuses on channel management
kevinbond has joined #ruby
<coyo>
since some ancient irc networks do not have services
<otters>
surely one bot could do it
<coyo>
what if the bot gets disconnected or taken down via ddos?
freeayu has joined #ruby
<otters>
then it reconnects, maybe
<otters>
just a shot in the dark
<coyo>
maybe.
<bnagy>
otters: not if it's under ddos it won't
<otters>
how does ddos take down a bot, anyway
<bnagy>
messily?
<otters>
okay, so if you have enough bots, that prevents ddos
<coyo>
you cannot (easily) DDOS an entire cluster of INET addresses when some bots connect without being present previously
<otters>
okay
<coyo>
coordinating your DDOSing botnet would be unweildly
<bnagy>
hm
<bnagy>
kind of interesting idea
rippa has joined #ruby
<coyo>
so yeah. i was thinking about an eggdrop clone in ruby, maybe go even further than eggdrop
<otters>
is it possible to give bots random IPs if they're connecting from the same machine to the same network?
<coyo>
otters: i think so.
<otters>
well that seems like a massive security flaw
<otters>
because it happened to my other network
<coyo>
oh?
<otters>
we can have join/msg throttling set on channels
<otters>
but you can't gline all the bots because they keep coming up with new IPs
<otters>
pretty shoddy
<coyo>
the idea is to be hard to kill :D
<otters>
right, but not if they're malicious
Tomasso has quit [Ping timeout: 264 seconds]
<otters>
and apparently it's too easy to be malicious
<coyo>
they would not be "malicious" if you, otters, were controlling them.
<bnagy>
how can you give bots random ips if they come from the same machine?
<otters>
but they would be "malicious" if whoever the asshat was that was DDOSing my other server was doing it
<otters>
which they were
<coyo>
bnagy: multiple IP addresses
<otters>
bnagy: ask coyo, I guess
jlwestsr has joined #ruby
<jackhammer2022>
coyo: a botnet ?
<bnagy>
yeah but the traffic needs to get routed back to you :)
<coyo>
jackhammer2022: yes. a ruby botnet
<jackhammer2022>
coyo: like you wanna exploit boxes and have them run your ruby bot ?
<bnagy>
you can't just ask Mr Internet to send you any IP address' traffic you like
<coyo>
jackhammer2022: no. more like an eggdrop kind
<otters>
bnagy: I don't know anything about this!
<coyo>
bnagy: i know ipv4 addresses are expensive.
mahmoudimus has joined #ruby
<bnagy>
it's not a matter of expensive, it's just a matter of "IP doesn't work that way"
<coyo>
you would know better than me.
uris has joined #ruby
* coyo
defers to bnagy's wisdom
<jackhammer2022>
coyo: "botnet" gives the wrong connotation 99% of the time
<coyo>
jackhammer2022: botnet is a neutral term to me. it's just a network of automatons. nothing necessarily evil or malicious about that.
<bnagy>
it's not a neutral term :)
<coyo>
fair enough.
<coyo>
okay, so, should i call it a "eggdrop clone"?
ringotwo has quit [Ping timeout: 240 seconds]
<jackhammer2022>
coyo: riht
<jackhammer2022>
*right
krusty_ar has quit [Ping timeout: 245 seconds]
ringotwo has joined #ruby
kevinbond has quit [Quit: kevinbond]
oscardelben has quit [Quit: oscardelben]
krz has joined #ruby
benjammin891 has quit [Ping timeout: 246 seconds]
goraxe has quit [Read error: No route to host]
wagle has quit [Remote host closed the connection]
n8ji has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<shadoi>
Anyone happen to know what the best jira/confluence client gem is?
darren_ has joined #ruby
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 255 seconds]
cantonic_ is now known as cantonic
epochwolf|2 has joined #ruby
epochwolf has quit [Quit: Uh no...]
epochwolf|2 is now known as epochwolf
subbyyy has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
savage- has joined #ruby
kzkh has quit [Quit: Leaving]
ntfox has joined #ruby
ntfox has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 252 seconds]
ntfox has joined #ruby
yoklov has quit [Quit: computer sleeping]
andrewhl has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
Bosma has quit [Ping timeout: 245 seconds]
* icy`
is not going to believe the words on that eggdrop site ;P
zodiac1111 has quit [Ping timeout: 246 seconds]
<banisterfiend>
icy`: why is an eggdrop called an eggdrop
<davidcelis>
eggdrop soup
<icy`>
you can take a raw egg and throw it into any soup tbh
<icy`>
or ramen
ringotwo has quit [Remote host closed the connection]
noyb has joined #ruby
<banisterfiend>
icy`: what is the analogy to an irc bot though
<banisterfiend>
is there any significance?
<icy`>
it was just someone's project, called eggdrop
nazty has joined #ruby
markamber has joined #ruby
<icy`>
eggdrop was an irc bot that was good at linking with other irc bots i guess
<Boohbah>
eggdrop still exists
<icy`>
perhaps
<icy`>
"Before you can compile Eggdrop, you need to have Tcl installed on your system. Most systems should have Tcl on them by now -- you can check by trying the command "tclsh" "
<icy`>
nope
yonggu has quit [Remote host closed the connection]
<Boohbah>
tool command language for the win
<icy`>
another phrase i liked was " Try 'man cvs' on your shell for more information about CVS. "
yonggu has joined #ruby
<icy`>
basically the article is so old that it assumes people still use tcl and cvs
maletor has joined #ruby
apok has joined #ruby
<markamber>
Im new, tell me something nice about ruby. example: I saw you can do one line if statements… like what is the whole : prefix thing or what is with @ or what is the ||
<markamber>
^^ I come from the pythonic world
foolover has joined #ruby
tewecske has joined #ruby
<icy`>
array.each {|elem| puts elem} <-- this is what you meant by | ?
bradhe has joined #ruby
<foolover>
using outlook = WIN32OLE.new('Outlook.Application') I can assign message.To = 'a@a.com' is there a method for assigning from i try message.From = 'a@a.com' and ruby does not like it
<Boohbah>
the -n and -p switches are useful for perl-style one-liners
krz has quit [Quit: krz]
<foolover>
ha no elif like python just like perl elsif
<foolover>
i thought that was odd too on python
<foolover>
what is ruby on rails what is the different from that an ruby
liluo_ has joined #ruby
adamkittelson has quit [Remote host closed the connection]
liluo has quit [Ping timeout: 252 seconds]
nazty has quit [Ping timeout: 248 seconds]
<foolover>
i installed ruby via the windows installer for ruby if i want to install module and also compile to exe how do i go about this
Zolrath has quit [Quit: Computer has gone to sleep.]
<foolover>
gem install Net::HTTP says it could not find it
<foolover>
so i guess i need to setup repositories
prtksxna has joined #ruby
prtksxna has quit [Remote host closed the connection]
sdwrage has joined #ruby
Weems|test has joined #ruby
Icoin has quit [Quit: Icoin]
teresko has quit [Ping timeout: 252 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
Weems|test has quit [Remote host closed the connection]
Weems|test has joined #ruby
Goles has joined #ruby
<foolover>
wow amazed ocra for compiling is tier 1
Weems|test has quit [Client Quit]
Gavilan2 has left #ruby [#ruby]
Weems|test has joined #ruby
<bperry>
WPAJob or WpaJob
<bperry>
what is the correct casing
<bperry>
WPA refers to the wifi protection scheme
<bnagy>
WPAJob
<bperry>
hanks :)
<bperry>
thanks, even
umttumt has quit [Remote host closed the connection]
d3vic3 has quit [Ping timeout: 248 seconds]
Weems|test has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Weems|test has joined #ruby
burgestrand has joined #ruby
d3vic3 has joined #ruby
Weems|test has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
<foolover>
i have specified a variable user = ENV['USERNAME'] later my my current code i have 'C:\Users\user\Desktop\file.txt' when I swap the single quotes for double I still do not get any luck
Weems|test has joined #ruby
<bnagy>
"C:\\Users\\#{user}\\ ...
manizzle has joined #ruby
<foolover>
ill try
Weems|test has left #ruby [#ruby]
<foolover>
so when you add double quote to have variable detection instead of an as is string with single quotes you have to have the #{var} within double quotes
Progster has quit [Ping timeout: 255 seconds]
<bnagy>
string interpolation is inside #{ } yeah
<bnagy>
and only occurs in double quoted strings
<bnagy>
... well, compared to 'strings' it occurs in lots of other places too
<foolover>
the #{var} is usually how the variable is called in double quotes
mahmoudimus has joined #ruby
<foolover>
otherwise you can just call the variable
<hoelzro>
is there a builtin method to "flip" the parameters to a block? I'd like to do something like this: (1..10).each_with_object(Kernel).flip.each(&:puts)
<hoelzro>
if there isn't, don't do it for me! I'd like to try implementing it myself =)
Morkel has joined #ruby
<burgestrand>
hoelzro: you’d want it to become puts(n) instead of n.puts, I assume?
<burgestrand>
Oh, wait.
<burgestrand>
Dur.
<DefV>
oh god
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<burgestrand>
Nevermind. That was confusing.
<DefV>
just do the goddamn .each {|a| puts a }
<DefV>
because that shit isn't readable at all
<DefV>
nobody will ever understand .each_with_object(Kernel).flip.each...
<DefV>
there's nothing "handy" about it
<hoelzro>
DefV: it's more for curiosity
<DefV>
you say that but I bet one day I'll come across that in real live code! :-p
<DefV>
you could .map(&:reverse)
d3vic3 has quit [Quit: leaving]
<DefV>
but that fucks you up when doing 1..1_000_000_000_000
mengu has joined #ruby
<burgestrand>
:d
<burgestrand>
Wait, why would it?
umttumt has joined #ruby
federic has quit [Remote host closed the connection]
<hoelzro>
on a stylistic ground, I'm guessing including self. is discouraged, unless explicity required (ex. calling a private method, assigning to an attribute without using @)
<burgestrand>
hoelzro: actually, you can’t use self. when calling a private method
nari has joined #ruby
mohits has quit [Ping timeout: 245 seconds]
<banisterfiend>
hoelzro: yeah but, because you have to use self.x=4 some ppl use self.x for symmetry
<DefV>
burgestrand: because (1..1_000_000_000_000).each never instantiates an array of that many items
<DefV>
but .map would
<hoelzro>
burgestrand: oh, good point
<burgestrand>
DefV: ah, true
<hoelzro>
I got the rules mixed up
<burgestrand>
hoelzro: naw I were just being a picky bastard :)
<burgestrand>
or, well, I guess it is but I’m still a picky bastard
<hoelzro>
burgestrand: well, I'd rather you were picky with me right now, because I'm still learning =)
oposomme is now known as oposomme|away
blazes816 has quit [Quit: Leaving]
salout_ has quit [Quit: Konversation terminated!]
justsee has quit [Quit: Leaving...]
vlad_starkov has joined #ruby
artOfWar_ has quit [Ping timeout: 264 seconds]
poloych has quit [Remote host closed the connection]
G has quit [Ping timeout: 240 seconds]
mjb2k has quit [Quit: Leaving.]
mjb2k has joined #ruby
G has joined #ruby
BiHi has joined #ruby
acidrain has joined #ruby
tomb has quit [Quit: Computer has gone to sleep.]
_bart has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
workmad3 has joined #ruby
Markvilla has joined #ruby
clocKwize has joined #ruby
arturas has quit [Remote host closed the connection]
timonv has joined #ruby
kaspernj has joined #ruby
ViGar has joined #ruby
<ViGar>
#rubyonrails
<ViGar>
ops, forgot the /join :)
tatsuya_o has joined #ruby
davidw has joined #ruby
davidw is now known as Guest66851
nopolitica has quit [Quit: Leaving.]
_marvin has joined #ruby
bosphorus has joined #ruby
roadt has quit [Remote host closed the connection]
<_bart>
Hi, when I rprofile I get that 41% of the time String#chars runs, how do I lower that?
thone has joined #ruby
freeayu has quit [Ping timeout: 248 seconds]
cbetta has joined #ruby
cbetta has quit [Changing host]
cbetta has joined #ruby
mjb2k has quit [Quit: Leaving.]
<bnagy>
use that method less?
folivora has joined #ruby
<bnagy>
pastie / gist the code where you're using it, optimisation is very difficult to do abstractly
thone_ has quit [Ping timeout: 264 seconds]
peterhellberg has joined #ruby
ppawel has quit [Quit: Leaving]
freeayu has joined #ruby
lxsameer has quit [Ping timeout: 248 seconds]
Guest66851 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
werdnativ has quit [Quit: werdnativ]
mneorr has quit [Quit: Leaving.]
arturas_ has joined #ruby
mucker has joined #ruby
oposomme|away is now known as oposomme
polymar has joined #ruby
<banisterfiend>
bnagy: oh btw if you upgrade pry the gisting stuff is more powerful now, i remember u were asking about it ages ago
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
polymar has quit [Client Quit]
Erdon has quit [Ping timeout: 245 seconds]
perryh is now known as perryh_away
mneorr has joined #ruby
<bnagy>
I'll have to check it out again
Erdon has joined #ruby
ntfox has quit [Quit: Leaving]
kuranai|off has quit [Ping timeout: 252 seconds]
zz_chrismcg is now known as chrismcg
kuranai|off has joined #ruby
AlbireoX has quit [Remote host closed the connection]
tonini has quit [Remote host closed the connection]
MoMo has quit [Quit: Connection closed for inactivity]
moeSeth has quit [Quit: Connection closed for inactivity]
dotemacs has quit [Quit: Connection closed for inactivity]
ctevie has quit [Quit: Connection closed for inactivity]
jhowarth has quit [Quit: Connection closed for inactivity]
aquaranto has quit [Quit: Connection closed for inactivity]
xrl has quit [Quit: Connection closed for inactivity]
pkondzior has quit [Quit: Connection closed for inactivity]
twinturbo has joined #ruby
shanmu has joined #ruby
Liothen has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
SphericalCow has joined #ruby
dragon-irl has joined #ruby
ctp has joined #ruby
crankycoder has quit [Remote host closed the connection]
<dragon-irl>
Hello, I'm trying to run rvm in xterm, but my loginShell settings don't seem to be taking effect. I've also tried xterm -ls, but to no avail. Any ideas?
<hoelzro>
dragon-irl: I'm guessing that RVM is initialized in your .bash_login, but you need it in your .bashrc or something
<hoelzro>
this is why I have my .bash_login be a symlink to my .bashrc
<dragon-irl>
Yeah, seems to be in .bash_login.
mohits has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Guest26942 has joined #ruby
<dragon-irl>
hoelzro: That worked. Perhaps might be worth adding to the docs.
<Guest26942>
hello everyoone
<Guest26942>
dales anyone use active merchant with getspay?
<Guest26942>
*does
d3vic3 has quit [Quit: leaving]
Spooner has joined #ruby
banisterfiend has joined #ruby
d3vic3 has joined #ruby
lxsameer has quit [Quit: Leaving]
shanmu has quit [Ping timeout: 240 seconds]
ramblex has quit [Quit: ramblex]
`brendan has quit [Read error: Connection reset by peer]
shanmu has joined #ruby
shanmu has quit [Remote host closed the connection]
shanmu has joined #ruby
shanmu has quit [Remote host closed the connection]
xbayrockx has joined #ruby
dragon-irl has left #ruby [#ruby]
<shevy>
never heard either of these
timonv_ has joined #ruby
monkegjinni has joined #ruby
fivetwentysix has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
rizzy_work has quit [Quit: Leaving]
fearoffish has joined #ruby
arturas_ has quit [Ping timeout: 248 seconds]
Berglund has joined #ruby
hemanth has quit [Remote host closed the connection]
nari has quit [Ping timeout: 245 seconds]
fivetwentysix has quit [Quit: fivetwentysix]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Filuren has joined #ruby
h8R_at_work has joined #ruby
Stalkr_ has quit [Ping timeout: 255 seconds]
Filuren is now known as Stalkr_
jjang has quit [Remote host closed the connection]
Rochefort has joined #ruby
liluo has quit [Remote host closed the connection]
<h8R_at_work>
hello ! I have a problem starting a ruby script. When I'm root, I can start it, but when I'm regular user it needs typhoeus.. I can't do gem install typhoeus because it requires root privigies.. where I'm wrong? I'm using Debian stable and after trying lot of stuff I've tried to compile it from source. maybe my paths are mess
stefanp_ has quit [Ping timeout: 265 seconds]
<h8R_at_work>
anybody willing to help ?
strnx has quit [Excess Flood]
vlad_starkov has quit [Ping timeout: 245 seconds]
mpereira has quit [Ping timeout: 264 seconds]
h8R_at_work has quit [Quit: Page closed]
apeiros_ has joined #ruby
larissa has joined #ruby
Jay_Levitt has quit [Quit: Leaving...]
ramblex has joined #ruby
<regedare1>
Hello
<apeiros_>
hi
<regedare1>
why when i try to run irb -r ./lib/mws.rb i get require':LoadError: no such file to load -- mws/address but i have this file /lib/mws/address.rb
<regedare1>
??
und3f has quit [Quit: Leaving.]
<DefV>
lib is not in your include path
<DefV>
irb -r ./lib/mws.rb -Ilib
<apeiros_>
almost
<regedare1>
DefV: thx
<regedare1>
:)
<apeiros_>
irb -Ilib -rmws
<DefV>
yeah :-)
<apeiros_>
if you do -Ilib, you don't do -r./lib anymore ;-)
jonathanwallace has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
ChampS666 has quit [Ping timeout: 252 seconds]
<Hanmac>
regedare1 use require_relative
jxf has joined #ruby
* apeiros_
smacks Hanmac
bwlang has joined #ruby
<Hanmac>
yeah adding all dirs to the include paths is so much better :P
<apeiros_>
the only lib directory you should have to add is the lib dir of the lib you're currently working on. all others are installed and thus should not require any additional work just to load them…
<apeiros_>
but be free to educate me about other cases I'm unaware of…
strife25 has joined #ruby
<chiel>
anyone in here use unicorn>
<chiel>
?
<chiel>
I am getting this error, when I to run `unicorn` in my app directory:
<workmad3>
shevy: well, there's require, and there's load... adding to $LOAD_PATH doesn't require or load anything
<chiel>
workmad3: it spams that, over and over
<shevy>
yeah but it is recommended to do in addition. or require_relative
<workmad3>
shevy: and require_relative is require but with a different load path :)
<shevy>
perhaps we'll find two new ways for 2.0
<shevy>
:)
<workmad3>
shevy: I doubt it :)
<shevy>
hehe
<workmad3>
shevy: require and load pretty much cover it - 'load this file if it hasn't already been loaded' and 'load this file no matter what'
<chiel>
when I try to `ps aux | grep unicorn`, there's nothing running, either
<burgestrand>
chiel: do your app boot without unicorn?
<workmad3>
chiel: looks like something is going wrong with booting the server then
<chiel>
hm
<chiel>
does it require sudo?
<chiel>
hmm nope, same error :)
<chiel>
burgestrand: do you mean like.. with thin or something?
niklasb has joined #ruby
<burgestrand>
chiel: yeah. Wondering if the app actually crashes on boot and that’s why you kill a unicorn every time.
<chiel>
sec, I'll give it a shot
<burgestrand>
chiel: could try booting it on a different port as well, perhaps it’s being used?
tommyvyo has joined #ruby
<burgestrand>
I know that Thin dies with a horrible error message if that happens.
strnx has joined #ruby
harcher has joined #ruby
mpereira has joined #ruby
mpereira has quit [Client Quit]
tommyvyo has quit [Client Quit]
mpereira has joined #ruby
tk__ has joined #ruby
raul782 has joined #ruby
tommyvyo has joined #ruby
<chiel>
heh, now it's dying with /home/vagrant/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/runtime.rb:31:in `block in setup': You have already activated thin 1.4.1, but your Gemfile requires thin 1.3.1. Using bundle exec may solve this. (Gem::LoadError)
<chiel>
lemme try install the correct version.. :p
<workmad3>
chiel: bundle exec thin
<workmad3>
chiel: the correct version is installed, otherwise you'd get a different bundler error ;)
nanderoo has joined #ruby
ZachBeta has joined #ruby
<chiel>
yeah, i just deleted the 1.4.1 one
<workmad3>
chiel: bundle exec is the better way to go to run binaries for gems in your Gemfile
<burgestrand>
chiel: and pretty much anything you’d execute, you can just slap bundle exec infront of.
<workmad3>
chiel: or, if you prefer, there is also a rubygems-bundler gem plugin, you can use 'bundle --binstubs' and then run ./bin/thin
<burgestrand>
bundle exec irb, bundle exec ruby -S rake, and so on.
carloslopes has joined #ruby
<chiel>
hmm yeah, I am just trying to get this up and running on a vm real quick, so I am not too concerned with how "clean" it is
hmans has joined #ruby
<workmad3>
chiel: fair enough :)
bwlang has quit [Quit: bwlang]
krusty_ar has joined #ruby
kedare|2 has joined #ruby
raul782 has quit [Read error: Connection reset by peer]
SeySayux has quit [Read error: Operation timed out]
`brendan has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
KevinSjoberg has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
kedare has quit [Ping timeout: 272 seconds]
kedare|2 has quit [Client Quit]
ZachBeta has quit [Quit: Computer has gone to sleep.]
codespectator has quit [Ping timeout: 248 seconds]
<fowl>
symbols dont stand for stand for things, they have no meaning until you give them meaning, they are just identifiers
aef has joined #ruby
wvms has joined #ruby
* shevy
points at JonnieCache.
<shevy>
hiM! crucify hiM!
jonathanwallace has quit [Remote host closed the connection]
flip_digits has joined #ruby
<fowl>
s/stand for stand for/stand for
<fowl>
i have excited fingers
<bnagy>
and poor epistemology
jxf has quit [Ping timeout: 246 seconds]
<fowl>
bnagy, what does a symbol stand for then? truth and justice?
jstew has quit [Quit: leaving]
Chaazd has joined #ruby
chrisja has joined #ruby
<bnagy>
well the word more or less means 'a thing that stands for another thing'
<Hanmac>
i use symbols as enum replacements
<bnagy>
and by more or less I mean ''
<Chaazd>
How do I create a directory in C:? Dir.mkdir('C:\\dir') does not work.
<h8R_at_work>
hello.. i have very stange problem.. I run script form console like this: ruby script.rb and everythnig is okay. but when i try to run it from php script with system and passthru it says it needs some libs nokogiri? any ideas?
<peterhellberg>
I like the explanation "A Ruby symbol is a thing that has both a number (integer) representation and a string representation."
<Hanmac>
h8R_at_work how did you install nokogiri? and did you use rvm?
<h8R_at_work>
Hanmac: gen install nokogiri
<h8R_at_work>
Hanmac: yep, i've tried rvm too..
<h8R_at_work>
Hanmac: maybe i've managed to mess everythign
cpruitt has joined #ruby
jxf has joined #ruby
Axsuul has quit [Ping timeout: 276 seconds]
<Hanmac>
rvm is bad because as far as i remember php & apache are another user ... (as far as i know)
<h8R_at_work>
Hanmac: yep, www-data
<_bart>
Hanmac: thanks, you were right: .max_by{|k,v| v}
<Hanmac>
then when you install nokogiri with rvm, the www-data user cant access it
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
vlad_starkov has joined #ruby
<h8R_at_work>
Hanmac: yep
<h8R_at_work>
and now I can't remove it
<chiel>
burgestrand: I seem to have unicorn up and running now. :)
<h8R_at_work>
because I've compile it form source
<chiel>
no idea where the socket is located, but it's running! :)
<burgestrand>
chiel: no more dead unicorns :) what was the trouble?
<chiel>
burgestrand: a few different things, some gems, and then a missing config file.. i should really make a rake task for this kinda stuff.
<_bart>
but still I get `downcase': invalid byte sequence in UTF-8 (ArgumentError) when I try to downcase the string
erichmenge has joined #ruby
<burgestrand>
_bart: if you try to encode a string that is in some encoding to the same encoding it is in ruby will do nothing.
<_bart>
burgestrand: how do I force it? I mean, right now it is breaking down.
Mon_Ouie has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
<burgestrand>
_bart: as far as I know you can’t force it. I’ve heard of people encoding the string to an utf-8 compatible encoding (say, UTF32) and then back.
<burgestrand>
I seem to recall some other way as well (but just as convoluted), but I’m not sure what it was.
<_bart>
burgestrand: do you maybe know a pastie, a gist or a blogpost that has this method?
<burgestrand>
_bart: not on the top of my head, we’ve discussed it at lengths in the past months but my memory is hazy.
<_bart>
unknown encoding name - utf8 (ArgumentError)?
<Hanmac>
its named "UTF-8"
cantonic has joined #ruby
kaspernj_ has joined #ruby
<h8R>
Hanmac: update-alternatives: error: no alternatives for ruby.
<Hanmac>
h8R then maybe you installed ruby not currently
<Quintus_q>
Hanmac: Are you sure that the update-alternatives for Ruby aren't only available for Ubuntu?
noyb has quit [Quit: Leaving.]
<Quintus_q>
Debian is usually a good way slower than Ubuntu.
<h8R>
h8r i've installed it thru rvm because i'm on debian stable and tehre is no 1.9.1 ruby on the repository
choffstein has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
<Hanmac>
they are available on debian too
<Hanmac>
(they should be available)
sailias has joined #ruby
<Quintus_q>
h8R: Although I'm not a Debian/Ubuntu guy, I think that update-alternatives won't reconise a custom Ruby installation unless you tell it otherwise
robozahn has quit [Ping timeout: 265 seconds]
kaspernj has quit [Ping timeout: 260 seconds]
user038291 has joined #ruby
noyb has joined #ruby
h8R has quit [Ping timeout: 245 seconds]
kevinbond has joined #ruby
akemrir has joined #ruby
davidw has quit [Quit: Leaving]
tommyvyo has joined #ruby
awarner has joined #ruby
joshman_ has joined #ruby
alekst has joined #ruby
amacgregor_osx has quit [Remote host closed the connection]
kevinbond has left #ruby [#ruby]
tomb_ has joined #ruby
Markvilla has quit [Quit: Markvilla]
Draco_ has joined #ruby
maxmmurphy has joined #ruby
jbw has quit [Read error: Operation timed out]
noyb has quit [Quit: Leaving.]
Rochefortes has joined #ruby
ryanf has joined #ruby
noyb has joined #ruby
axl_ has joined #ruby
Rochefort has quit [Ping timeout: 246 seconds]
carloslopes has quit [Ping timeout: 264 seconds]
Quintus_q has left #ruby ["Valete!"]
mahmoudimus has joined #ruby
PaciFisT has joined #ruby
deobald__ has quit [Ping timeout: 246 seconds]
twinturbo has joined #ruby
bier has quit [Ping timeout: 260 seconds]
andrewhl has joined #ruby
peterhellberg has quit [Remote host closed the connection]
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
rbanffy has joined #ruby
oscardelben has joined #ruby
moos3 has joined #ruby
Draco_ has quit [Ping timeout: 240 seconds]
the_jeebster has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
cloud|windoze has quit [Quit: Leaving.]
blazes816 has joined #ruby
markamber has joined #ruby
Tomasso has joined #ruby
kaspernj_ has quit [Ping timeout: 246 seconds]
codespectator has quit [Quit: Computer has gone to sleep.]
luckman212 has joined #ruby
markamber has quit [Client Quit]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
zrail|home is now known as zrail
ryannielson has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
berkes has quit [Quit: Ex-Chat]
gilead has quit [Quit: Leaving]
ttilley is now known as ttilley_off
akemrir has quit [Quit: WeeChat 0.3.8]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
benjammin891 has joined #ruby
apok has joined #ruby
markamber has joined #ruby
markamber has quit [Client Quit]
umttumt has joined #ruby
reuf has joined #ruby
mikepack has quit [Remote host closed the connection]
ackz has joined #ruby
bier has joined #ruby
jaylevitt has joined #ruby
jaylevitt has quit [Remote host closed the connection]
Jay_Levitt has quit [Read error: Connection reset by peer]
<moos3>
if i have a var named shib and one named apache can i do temp = "@#{service}" and then use temp in place of calling @shib or @apache
blacktulip has joined #ruby
<apeiros_>
you can use instance_variable_get, but abusing the variable names as a hash is bad design.
<apeiros_>
if you want a hash, then by all means, *use* a hash.
zemanel has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
mucker has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
<chiel>
ok, perhaps a noob question but... how do I send a signal (USR2) to a process, from ruby?
<apeiros_>
Process.kill
<chiel>
aha
jgarvey has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<chiel>
but that sends a kill
<moos3>
apeiros_ basically i have a method i'm trying to generalize with out hard coding any vars
<apeiros_>
chiel: no, kill sends the signal you tell it to send
<chiel>
not a USR2, but I guess there's something for that as well
<apeiros_>
chiel: just like the kill command in bash
<chiel>
oh
<chiel>
I don't use kill very often tbh
<moos3>
and trying to them out doing if service == 'shib' blah
benjammin891 has quit [Ping timeout: 260 seconds]
<apeiros_>
and yes, silly name. but I think they just copied SH's naming there.
<chiel>
yeah, guess so :)
<apeiros_>
moos3: *without
<chiel>
thanks, will look at docs
<Hanmac>
shevy ... i need your ruby skills
<apeiros_>
moos3: and what stops you from using a proper Hash for the lookup instead of the instance variables?
<apeiros_>
moos3: gotta take the train. I'll be back online in ~40min, but it seems blazes816 has the right way…
<moos3>
apeiros_ k
JustinCampbell has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<blazes816>
moos3: So, create a services variable that is a hash, containing all of your service objects
<blazes816>
moos3: then call all your methods on @services[service], which return the correct service
<moos3>
k
<moos3>
ok
iamjarvo has quit [Quit: Computer has gone to sleep.]
ButtMan has left #ruby ["Leaving"]
<blazes816>
poor mans polymorphism
minijupe has joined #ruby
wallerdev has joined #ruby
iamjarvo has joined #ruby
<blazes816>
I have to head to work, apeiros_ will probably beat me back online, but it should be close :). good luck
<Hanmac>
apeiros_ can you help me with something?
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
SQLStud has joined #ruby
iamjarvo has quit [Client Quit]
_bart has quit [Ping timeout: 260 seconds]
ttilley_off is now known as ttilley
iamjarvo has joined #ruby
shevy has joined #ruby
zodiac1111 has quit [Remote host closed the connection]
choffstein has joined #ruby
blazes816 has quit [Quit: Leaving]
billiam has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
bluenemo has quit [Remote host closed the connection]
akem has quit [Ping timeout: 252 seconds]
bluenemo has joined #ruby
DrShoggoth has joined #ruby
WirIrrenUmher has joined #ruby
chienpo has joined #ruby
bluenemo has quit [Remote host closed the connection]
ckrailo has joined #ruby
WirIrrenUmher1 has joined #ruby
WirIrrenUmher has quit [Client Quit]
baroquebobcat has joined #ruby
jxf has quit [Read error: Connection reset by peer]
jxf has joined #ruby
groupcat has quit [Changing host]
groupcat has joined #ruby
jamiejackson has joined #ruby
cbetta has joined #ruby
<jamiejackson>
what's the proper way to quote the "a" element? you'll see that it has multiple lines, internal indentation, and internal colons: http://pastebin.com/H3xrEraV
asuka_ has quit [Ping timeout: 265 seconds]
<Progster>
how do you force evaluation in irb when you've by accident somehow opened and not closed a multiline statement?
cbetta has left #ruby [#ruby]
<bnagy>
^C
crankycoder has joined #ruby
davidcelis has quit [Ping timeout: 252 seconds]
umttumt has quit [Ping timeout: 245 seconds]
<jamiejackson>
i see now that there's #yaml
jbw has joined #ruby
mneorr has quit [Quit: Leaving.]
Draco_ has joined #ruby
Chaazd has joined #ruby
<Chaazd>
shevy Thanks for eariler, worked.
sepp2k has quit [Remote host closed the connection]
Chaazd has quit [Client Quit]
bluOxigen has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
justsee has quit [Quit: Leaving...]
nikeita has joined #ruby
wallerdev has quit [Quit: wallerdev]
chienpo has left #ruby [#ruby]
pvh has joined #ruby
saschagehlich has joined #ruby
apeiros_ has joined #ruby
<nikeita>
puts heelo
nateberkopec has joined #ruby
lxsameer has joined #ruby
wvms has quit [Quit: wvms]
pu22l3r has quit [Remote host closed the connection]
mathie has quit [Quit: Bye!]
<ramblex>
NameError: undefined local variable or method `heelo' for main:Object
asuka_ has joined #ruby
CaptainKnots has quit [Ping timeout: 265 seconds]
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
carloslopes has joined #ruby
j01 has quit [Quit: j01]
<apeiros_>
moos3: got the help you needed?
pu22l3r has joined #ruby
Draco_ has quit [Ping timeout: 246 seconds]
adeponte has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 245 seconds]
<jamiejackson>
yaml question: what's the proper way to quote the "a" element? you'll see that it has multiple lines, internal indentation, and internal colons: http://pastebin.com/H3xrEraV
WirIrrenUmher1 has quit [Ping timeout: 248 seconds]
yannis has joined #ruby
ianbrandt has joined #ruby
freeayu has joined #ruby
blazes816 has joined #ruby
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
wallerdev has joined #ruby
vlad_starkov has joined #ruby
<jamiejackson>
thx gogiel: it turned out my double quotes worked fine, there was a problem farther up in the file that made me thing this element was at fault
davidcelis has joined #ruby
davidcelis has joined #ruby
aganov has quit [Quit: aganov]
benson has joined #ruby
hoelzro is now known as hoelzro|away
wallerdev_ has joined #ruby
Ontolog has joined #ruby
Draco_ has joined #ruby
<coyo>
good morning, rubyists! everyone doing okay?
wallerdev has quit [Ping timeout: 246 seconds]
wallerdev_ is now known as wallerdev
jxf has quit [Read error: Connection reset by peer]
cakehero has quit [Quit: Computer has gone to sleep.]
werdnativ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
manizzle has joined #ruby
<JonnieCache>
almost ready to engage weekend mode
tatsuya_o has joined #ruby
<coyo>
yay weekend mode!
tatsuya_o has quit [Read error: Connection reset by peer]
khakimov has joined #ruby
nikeita has joined #ruby
Draco_ has quit [Ping timeout: 248 seconds]
<apeiros_>
already weekend mode
ElderFain has quit [Ping timeout: 272 seconds]
Know1edge has joined #ruby
Know1edge has joined #ruby
Know1edge has quit [Changing host]
* coyo
sets warp drives to warp 8 and watches the stars streak past into weekend mode!
timonv_ has quit [Remote host closed the connection]
Know1edge has quit [Client Quit]
Know1edge has joined #ruby
strife25 has joined #ruby
<bnagy>
don't do that, you'll erode the space / subspace barrier
<JonnieCache>
dont do that man or itll be monday before youve even had a drinK!
<bnagy>
no faster than warp 3 unless it's an emergency
yannis has quit [Ping timeout: 265 seconds]
<coyo>
bnagy: duly noted.
chrismcg is now known as zz_chrismcg
axl_ has quit [Read error: Connection reset by peer]
yannis has joined #ruby
axl_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
strife25 has quit [Ping timeout: 248 seconds]
strife25_ has joined #ruby
syamajala has joined #ruby
umttumt has joined #ruby
<futurecode>
it looks like "require" can directly load a ".so" file?
fantazo has quit [Remote host closed the connection]
freeayu has quit [Quit: 离开]
khakimov has joined #ruby
<Hanmac>
futurecode yeah it can, but an .rb file is prefered
tzvi has quit [Remote host closed the connection]
etehtsea has quit []
<futurecode>
"preferred" means that it will first try to find an rb file?
ForSpareParts has joined #ruby
hmans has quit [Quit: Leaving...]
jeff_sebring has joined #ruby
apok has quit [Quit: apok]
<Hanmac>
yeah
snearch has joined #ruby
<Hanmac>
require "abc" trys to load first the "abc.rb" file and then the "abc.so"
<coyo>
anyone know a good introduction to rake? seperate question: does anyone know a good introduction to rubygems?
* coyo
google-fu in the meantime.
<futurecode>
well it's amazing...
twinturbo has quit [Quit: twinturbo]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
futurecode has quit [Remote host closed the connection]
<blazes816>
i'm not payin for nothin
artOfWar_ has joined #ruby
bradhe has joined #ruby
tiripamwe has joined #ruby
adeponte has joined #ruby
pk1001100011 has joined #ruby
jgrevich has joined #ruby
maletor has joined #ruby
Cicloid has joined #ruby
sailias has quit [Quit: Leaving.]
artOfWar has quit [Ping timeout: 264 seconds]
moos3 has quit [Read error: Connection reset by peer]
maxmmurphy has quit [Quit: maxmmurphy]
mengu has joined #ruby
umttumt has quit [Ping timeout: 248 seconds]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
m_3 has joined #ruby
maxmmurphy has joined #ruby
eywu has joined #ruby
manizzle has quit [Read error: No route to host]
itnomad has joined #ruby
strife25_ has quit [Ping timeout: 260 seconds]
dankest has quit [Quit: Leaving...]
mahmoudimus has joined #ruby
mrsolo has joined #ruby
<ForSpareParts>
Have any of you worked with Sequel before? I'm pretty new to Ruby and I'm having some trouble figuring out how to explicitly set table names and IDs for models.
strife25 has joined #ruby
timonv has joined #ruby
Fretta has joined #ruby
<nikeita>
installed ruby 1.9.3 through brew on mac but rbenv is unable to see it in "rbenv versions". i do not have gcc installed because i'm on xcode 4.5 with llvm
yannis has quit [Quit: yannis]
MatthewGA has quit [Quit: Leaving]
<bnagy>
that's cause rbenv is not psychic
<nikeita>
it is possible to make it visible to rbenv or it only see verisons with 'rbenv install' ?
<ForSpareParts>
apeiros_: Thanks. So in the parens, would it be :table_name => "name_of_my_db_table" or just :name_of_my_db_table? I'm assuming that there's a whole ton of things I could be setting there.
apok has joined #ruby
* ForSpareParts
is a super noob, and apologizes for asking stupid questions.
jamiejackson has quit [Ping timeout: 245 seconds]
Spooner has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
jackhammer2022 has joined #ruby
theRoUS has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros_>
ForSpareParts: just :name_of_your_table
Hanmac has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
<ForSpareParts>
apeiros_: OK. Thank you. And so that I can learn to read the docs better, could you point me to the place where they specify that?
<apeiros_>
I pasted you the link?
cloud|windoze has joined #ruby
<ForSpareParts>
apeiros_: Ah, OK. I see it now. I was digging through the Sequel::Model docs themselves.
stkowski has joined #ruby
<coyo>
ForSpareParts: welcome to ruby!
<coyo>
ForSpareParts: i'm really new, too. only been allowed to use a computer for 6 years :D
<apeiros_>
well, Sequel::Model(foo) is the method 'Model' on Sequel
Rochefortes has quit [Ping timeout: 246 seconds]
<apeiros_>
(classes don't take arguments, but methods may be uppercased and may be invoked by :: instead of .)
ViperMaul has joined #ruby
<ForSpareParts>
coyo: Thanks! It's still sort of confusing! Hopefully I'll figure out what I'm doing before someone actually requires me to *do* something!
<apeiros_>
hm… I don't see it in the API docs on rdoc.info :-/
<coyo>
ForSpareParts: feel free to ask me in PM the really basic questions. chances are, i've already asked them :D
<ForSpareParts>
apeiros_: Oh. Hrm. Coming from a Java/C#/Python/etc. background that's a little perplexing, but I can go with it.
<apeiros_>
it's not often used
<ForSpareParts>
coyo: Thanks.
d3vic3 has joined #ruby
<coyo>
ForSpareParts: no problem :D
<ForSpareParts>
apeiros_: So, when I say class MyModel < Sequel::Model, I'm telling Ruby "MyModel will inherit from the class *returned by* the Model method of class Sequel," then? Or am I still misunderstanding...?
<apeiros_>
ForSpareParts: no, uppercased methods are slightly special. they require parens and/or arguments. otherwise it'll be a constant
Hanmac has joined #ruby
<apeiros_>
you're hitting one of the more exotic parts of ruby there ;-)
bluOxigen has quit [Ping timeout: 248 seconds]
binaryplease has quit [Ping timeout: 246 seconds]
<apeiros_>
Foo # <- always a constant
<apeiros_>
Foo() # <- always a method
<apeiros_>
Foo 1, 2 # <- always a method
kenichi has joined #ruby
<apeiros_>
it's similar with local variables
<apeiros_>
foo # <- either a local variable or a method
<apeiros_>
foo() # <- always a method
<apeiros_>
foo 1 # <- always a method
blazes816 has quit [Quit: Leaving]
ged has quit [Quit: WeeChat 0.3.6]
<apeiros_>
the other part of the answer: yes, you can inherit from the result of a method. and yes, that's what happens with `class MyModel < Sequel::Model(:tablename)`
dankest has joined #ruby
<apeiros_>
the return value of the method *must* be a class, though
BiHi has quit [Quit: bye]
kevinfagan has quit [Quit: Leaving...]
Nies has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<ForSpareParts>
apeiros_: So, the docs say it returns an "Object" -- am I actually inheriting from an instance of a class? Or is this like, an "Object of type Class" sort of thing...?
timonv has quit [Remote host closed the connection]
Bofu2U has quit [Read error: Connection reset by peer]
TheHypnotist- has quit [Ping timeout: 245 seconds]
cakehero has joined #ruby
mobilegamelabs has joined #ruby
binaryplease has joined #ruby
syamajala has quit [Remote host closed the connection]
<claudiu>
Can somebody explain me how can I set a timmer on a thread? I have a method which evaluates some scripts and I want to prevent crashes like "while(1) do; end" scripts
syamajala has joined #ruby
binaryplease has quit [Client Quit]
cbuxton has joined #ruby
<shevy>
claudiu: not sure what you mean. Thread.new {sleep 1; puts "hi";}.join
strife25 has quit [Ping timeout: 260 seconds]
<shevy>
oh, discard the last ; there
<shevy>
Thread.new { sleep 1; puts "hi" }.join
mobilegamelabs has quit [Client Quit]
mucker has joined #ruby
arietis has joined #ruby
hadees has quit [Quit: hadees]
<shevy>
in ruby-gtk there is some timer method like ... Gtk.timer(50) { do_stuff_here} ... I forgot the name of it
mucker has quit [Client Quit]
markamber has quit [Quit: markamber]
<shevy>
Gtk.timeout_add(100) { progress_timeout }
<claudiu>
I want to kill a thread if it takes too long
coyo has quit [Quit: Heaven is not a place, it's being with people who love you.]
kvirani has quit [Remote host closed the connection]
<offby1>
claudiu: I have never done this in Ruby, but I expect the technique is: Have thread A start thread B; then have it also start thread C which does nothing but sleep, kill thread B (and ignore an error if thread B is already finished), then exit.
markamber has joined #ruby
adamkittelson has joined #ruby
adamkittelson has quit [Remote host closed the connection]
<offby1>
I'd be a little surprised if there were something built in that did that, since I figure it's probably pretty simple.
williamcotton has quit [Ping timeout: 255 seconds]
williamcotton_ is now known as williamcotton
<offby1>
I just wrote that without even thinking; I have never use the thread primitives in Ruby; I am very very surprised that it worked the first time.
jarr0dsz has joined #ruby
mohits has quit [Ping timeout: 248 seconds]
apeiros_ has quit [Ping timeout: 260 seconds]
drupin has joined #ruby
<claudiu>
:) offby1, thx
<jarr0dsz>
hi everyone im trying to debug a ruby file but can't figure out whats wrong, relativly newbie to ruby I have a cannot convert nil into string error
<jarr0dsz>
offby1: it says line 23 ;s so thats not very helpfull
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r_ has joined #ruby
<offby1>
indeed it isn't :-|
<offby1>
I'd stick a bunch of "puts" in there to see the values of your variables
ramblex_ has quit [Ping timeout: 260 seconds]
<offby1>
'course that's how I debug everything :)
itnomad has quit [Quit: Leaving]
lxsameer has quit [Quit: Leaving]
axl__ has joined #ruby
<offby1>
my first guess is that rails_root is the nil value
<offby1>
and the error is coming from the call to File.join
<offby1>
but that's just a guess
markamber has quit [Quit: markamber]
syamajala has joined #ruby
<offby1>
so that's the first variable whose value I'd dump with "puts".
mrdodo has joined #ruby
axl___ has joined #ruby
markamber has joined #ruby
blumbri has quit [Remote host closed the connection]
<offby1>
jarr0dsz: I just fired up a rails console and noticed that there was no RAILS_ROOT entry in ENV
<offby1>
however I do have Rails.root so perhaps you can use that
<jarr0dsz>
offby1: I think it might be another issue if the code looks code its an env or file based issue
<jarr0dsz>
if say a log file would not exist could that throw the error? cant conver nil to string
axl_ has quit [Ping timeout: 260 seconds]
axl___ is now known as axl_
<jarr0dsz>
offby1: think i have to debug the variables like env and log files that the code uses first to rule those out
<offby1>
I suspect not, but why not Try It And See™?
Jay_Levitt has joined #ruby
<jarr0dsz>
offby1: i mean there is no obvisious error in the .rb code right
<offby1>
no error that is really obvious to me personally :)
axl__ has quit [Ping timeout: 264 seconds]
markamber has quit [Client Quit]
axl__ has joined #ruby
<claudiu>
offby1 your script shoudn't stop after 20 seconds?
andrewhl has quit [Remote host closed the connection]
<offby1>
I think it should.
<offby1>
And it does.
<offby1>
So I'm happy.
hadees has joined #ruby
clocKwize has quit [Quit: clocKwize]
<claudiu>
yep, it does:). Sry! I made a mistake
apeiros_ has joined #ruby
sailias has joined #ruby
axl_ has quit [Ping timeout: 252 seconds]
axl__ is now known as axl_
axl_ has quit [Read error: Connection reset by peer]
voodoofish430 has joined #ruby
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
mneorr has joined #ruby
axl_ has joined #ruby
blacktulip has quit [Remote host closed the connection]
<offby1>
it's creepy that I was able to guess a) the name of the Thread class; b) the syntax for creating a new thread and giving it a block; c) the name and semantics of the "kill" method; d) the name and semantics of the "join" method
<offby1>
and I mean that in a good way, of course :)
strife25 has quit [Quit: Computer has gone to sleep.]
<Hanmac>
offby1 your code may be interesting when you want to add it in some kind of "hanging" system ... (like when the fps are getting to low)
<offby1>
Hanmac: by "interesting" I assume you mean "sucks hairy donkey balls".
<Hanmac>
only in your imagination
<offby1>
well, seriously, what do you mean?
<coyo>
o.O
ringotwo has joined #ruby
<apeiros_>
offby1: iirc Thread#kill is considered evil
<offby1>
aaah
<apeiros_>
but ask headius about details
<apeiros_>
hm, he's not on right now :-/
<offby1>
well, I make no claim to being a whiz thread programmer. I just pulled this outta my ... uh ... pocket.
<apeiros_>
meat-pocket?
<ccooke>
apeiros_: evil? Interesting
philips_ has quit [Excess Flood]
Rochefort has joined #ruby
<apeiros_>
iirc it's related to the timing
chrisja has quit [Quit: leaving]
<apeiros_>
it's similar to kill -9
<apeiros_>
it can happen right during an ensure
a_a_g has quit [Quit: Leaving.]
<ccooke>
ick
yonggu_ has joined #ruby
<offby1>
ah, it doesn't give the victim a chance to put its affairs in order
gokul has joined #ruby
philips_ has joined #ruby
<ccooke>
this is fine
dv_ has quit [Read error: Operation timed out]
<ccooke>
but yeah, calling in the middle of an ensure would be nasty
<offby1>
on the other hand, one of these days your program _is_ gonna get a SIGKILL, so it'd be good if the world didn't end when that happens.
mpereira has quit [Ping timeout: 260 seconds]
<apeiros_>
it'd be nice if there was an equivalent to a sigint
<apeiros_>
tell it gently to terminate
mengu has quit [Remote host closed the connection]
dv_ has joined #ruby
<GeekOnCoffee>
SIGHUP?
<apeiros_>
but even then - most code isn't built with "might be interrupted at any time" in mind
yonggu has quit [Ping timeout: 246 seconds]
wagle has quit [Read error: Connection reset by peer]
<offby1>
GeekOnCoffee: try drinking a glass of water while standing upside-down
<GeekOnCoffee>
lol
blazes816 has joined #ruby
<offby1>
it's tricky to figure out just how much resilience is the right amount.
<apeiros_>
^^
wmoxam_ has joined #ruby
benthumb has joined #ruby
<apeiros_>
if ruby had DBC…
maxmmurphy_ has joined #ruby
<apeiros_>
the whole thing would be a lot easier
ilyam has quit [Quit: ilyam]
qko has joined #ruby
<apeiros_>
keep running until all invariants are satisfied, terminate
gokul has quit [Ping timeout: 255 seconds]
<apeiros_>
though… I think…
<apeiros_>
hm
<apeiros_>
I wonder if it'd be wise to create a language feature such, that you have to mark shared objects
c0rn_ has joined #ruby
<apeiros_>
and only shared objects can ever be accessed across threads
<ccooke>
apeiros_: please god no.
<apeiros_>
why not?
mascool has joined #ruby
* ccooke
has been doing a lot of perl thread work recently
Occult has quit [Quit: Leaving]
manizzle has joined #ruby
<apeiros_>
it's not like it was a good idea to not properly wrap shared state anyway. this would just make it mandatory…
<RubyPanther>
That would be easy in mRuby
maxmmurphy has quit [Ping timeout: 255 seconds]
maxmmurphy_ is now known as maxmmurphy
<ccooke>
apeiros_: make it possible to have *un*sharable objects.
<ccooke>
if you want them, they exist. If not, things continue to work.
<apeiros_>
what's the problem with marking shared objects?
<apeiros_>
("it's done like that in perl" is not a valid argument :-p)
<ccooke>
heh
<ccooke>
no, true
mpereira has joined #ruby
i8igmac has joined #ruby
<ccooke>
well, it depends on implementation mostly.
<apeiros_>
one problem I see with it is reference-snowball (mark object X, this in turn references N objects, which would be marked too etc.)
<ccooke>
that's one problem, yes. there are a few others.
GoGoGarrett has quit [Remote host closed the connection]
kevinfagan has joined #ruby
<benthumb>
Greetings -- would appreciate any hints about fixing a broken ruby install: segfaulting when I invoke from command line. OS is Centos 5.4. and have rbenv installed as well...
kenichi has quit [Remote host closed the connection]
<ccooke>
related: it becomes very hard to work out which objects are shared and which aren't
<i8igmac>
im not sure why my script is printing "Enumerable::Enumerator:324feafsdf>"
<ccooke>
(and the added checking is a constant overhead to code, making more code with more checks and more places to go wrong.
<i8igmac>
it should print a ttp respones
manizzle_ has joined #ruby
<apeiros_>
ccooke: theoretically you should limit shared state anyway…
<apeiros_>
i.e. "difficult to work out which is shared" is a nice code smell IMO
ken_barber has quit [Remote host closed the connection]
<apeiros_>
i8igmac: you're missing the second argument
obryan has joined #ruby
brianpWins has joined #ruby
<apeiros_>
gsub ain't delete
dhruvasagar has quit [Ping timeout: 248 seconds]
<ccooke>
apeiros_: in context, do you mean that it's a good or a bad code smell?
<i8igmac>
Dope . . . .
ken_barber has joined #ruby
<ccooke>
apeiros_: (do you think that not being able to tell what is shared is good, or bad)
<apeiros_>
there are good code smells? o0
<apeiros_>
ah
<ccooke>
I've seen the idiom used both ways, yes
<apeiros_>
not being able to tell is bad. but the reason is two-fold.
<apeiros_>
one being that you probably have too many shared objects
<apeiros_>
the other the language making it difficult
<ccooke>
(I agree, it's just I wasn't sure which one you were trying to say)
<apeiros_>
it's similar to "is this a method or an lvar" in ruby
<apeiros_>
a) your method is probably too long if you can't tell
<apeiros_>
b) yes, it's not immediately obvious in ruby
<drupin>
i am getting an error when installing curb
<ccooke>
apeiros_: indeed.
kenichi has joined #ruby
pierosa has joined #ruby
Bosma has joined #ruby
eywu has quit [Ping timeout: 255 seconds]
<ccooke>
apeiros_: But it seems that you can get all the benefits of local-by-default in the current idiom, without any additional fudging. What would be more useful, I think, is a method on an Object to give you an array of the threads that have references to it
zeromodulus has quit [Remote host closed the connection]
Ontolog is now known as cdavaz
<apeiros_>
ccooke: that would not help with gracefully shutting down a thread
roblak has joined #ruby
<apeiros_>
the point of having to explicitly mark them is that you have to be aware that they can be corrupted
<ccooke>
but that's solving the wrong problem
Rochefort has quit [Read error: Connection reset by peer]
<ccooke>
if you're talking the upheaval and work involved in making objects thread-local by default... the effort would be *much* better used in preventing the corruption in the first place
iamjarvo has joined #ruby
jgrevich has quit [Quit: jgrevich]
jrist is now known as jrist-gym
apeiros has joined #ruby
shadoi has joined #ruby
tk__ has quit [Quit: ばいばい]
apeiros_ has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
gokul has joined #ruby
williamcotton_ has joined #ruby
yannis has quit [Ping timeout: 246 seconds]
<drupin>
gem install curb given an error
williamcotton has quit [Ping timeout: 248 seconds]
williamcotton_ is now known as williamcotton
<Hanmac>
drupin: my crystalball says that you need to tell the error
<jarr0dsz>
redis is also installed and paths are right dont get it
<offby1>
coyo: gaah. I've seen errors like that but don't really understand them. If you can find a program named "mkmf" in your distro, perhaps installing it will let things work.
<Hanmac>
offby1 yeah i paid for that ... the is a multiline pastie :'(
<drupin>
Hanmac: in privt
<coyo>
okay
ilyam has joined #ruby
<coyo>
thank you offby1
apeiros has quit [Ping timeout: 260 seconds]
<coyo>
hmm.
mrdodo has quit [Remote host closed the connection]
ramblex has joined #ruby
<offby1>
jarr0dsz: well, the stack trace does mention "join", which would tend to corroborate my theory
pierosa has quit [Remote host closed the connection]
andrewhl has joined #ruby
<banisterfiend>
offby1: do you like root beer
<offby1>
why, yes.
<coyo>
ah, i need to install ruby-dev
* coyo
installs
<offby1>
Not enough to have actually drunk any in the last 10 years or so, but yes.
Chaazd has joined #ruby
ryanf has quit [Ping timeout: 264 seconds]
seatea has joined #ruby
<banisterfiend>
offby1: im watching american fast food videos, your country is ridiculous :) but the food looks delicious, just huge helpings of everything, and everything drenched in cheese and sauces...wow
<bperry>
banisterfiend: there is a reason we have an obesity epidemic!
<bperry>
don't forget there are people that refuse to drink water, they need soda
<banisterfiend>
hehe
tiripamwe has quit [Ping timeout: 248 seconds]
Choobie has joined #ruby
<bperry>
I talked with a guy that said water didn't quench his thirst at all, only sprite did
mrdodo has joined #ruby
<bperry>
in my head all I was thinking was "bullshit"
samrose has joined #ruby
<banisterfiend>
bperry: still, i think it's worth the trip to USA just to try some of your fast food: in-n-out burger, farell's, five guys, red robin, etc
<bperry>
yeah, I suppose
<banisterfiend>
all we get here is mcdonalds and kfc
<blazes816>
red robin destroys everywhere else
<bperry>
banisterfiend: you ever see stephen fry in america/
<bperry>
?
<banisterfiend>
blazes816: even chick-fil-a ?
<banisterfiend>
bperry: one or two episodes, nothing on fast food yet though
<bperry>
yeah, he covers fast food a bit later
<blazes816>
mmm, we just got chic-fil-a around here
<blazes816>
not bad
williamcotton_ has joined #ruby
<bperry>
when he gets to the south and over to california
<blazes816>
but red robin still wins
<v0n>
the parsing of "--" by optparse isn't really useful... How can I do the difference between A and B in "./script -x -yz A -- B"?
fearoffish has quit [Quit: Computer has gone to sleep.]
darren has joined #ruby
williamcotton has quit [Ping timeout: 255 seconds]
williamcotton_ is now known as williamcotton
benthumb has joined #ruby
<banisterfiend>
bperry: haha and what does he make of your fast food? :)
<bperry>
fascination
<banisterfiend>
it's really obscene hehe
<coyo>
banisterfiend: in and out burger is awesome
<banisterfiend>
yeah
<cout>
blazes816: I don't know who red robin is but I'm pretty sure he loses to reliant robin
<benthumb>
testing 1 2 3
<coyo>
red robin is a good example of american cuisine. my sister swears by it
<bperry>
we also have purple cow
<shadoi>
"cuisine" lol.
<coyo>
i've never tried purple cow
<blazes816>
cout: if you mean the small little car europe I found on the goog, red robin could grill burgers around it any day
k_89 has joined #ruby
mpereira has quit [Ping timeout: 252 seconds]
<bperry>
here in texas that is
<bperry>
not sure if it is elsewhere
<coyo>
bperry: i live in dallas :D
<blazes816>
small little car from* europe
<coyo>
so i know what you're talking about.
<bperry>
I was in dfw, moved to austin in jan
<coyo>
keeping it weird, huh?
<bperry>
always
<billiam>
I've heard whataburger is good out that way...
<sernin>
midwesterners: Jimmy John's
<billiam>
Eww, no.
<sernin>
I love that place.
<blazes816>
the only thing that could get me to drive through oklahoma is whataburger on the other side
<offby1>
banisterfiend: I grew up with Farrell's; I didn't know they still existed. I don't particularly recommend them. Red Robin can be OK or can be horrible. If you're serious about Murriken fast food you should look at http://www.seriouseats.com/
wagle has joined #ruby
<offby1>
I'd go for little independent places -- such as the taco truck down the street from my house, which has become my favorite restaurant in Seattle
bigkevmcd has quit [Quit: outta here]
* sernin
lived in NYC for a good long time, the food trucks there are amazing.
<blazes816>
I'm relocating to the bay area this month. I think it will be years before I can bring myself to eat food from a truck.
<blazes816>
not that mcdonalds is much better
aknagi has joined #ruby
<sernin>
blazes816: don't discount the food truck. A lot of them are better than restaurants. Arguably, you have to pick out the sort of 'couture' food trucks, but they're good.
<blazes816>
i'm sure they can be, but here in kansas nothing good every happened inside a truck
<sernin>
blazes816: i.e. Banh Mi Love You Long Time = delicious, Sabrett vendor on corner in Times Sq -- not so good.
Eldariof-ru has joined #ruby
<billiam>
I moved to the midwest from the bay area. I miss the food. A lot.
r3m has joined #ruby
<blazes816>
billiam: at least you can get mountain oysters here!
cloud|windoze has quit [Quit: Leaving.]
<billiam>
heh.
<blazes816>
sernin: that looks delicious. from facebook "It's the American Idol of street food"
<offby1>
v0n: not sure what you're asking. Are you trying to get the "--" passed through, rather than having it digested by optparse?
wagle has quit [Ping timeout: 248 seconds]
<offby1>
.oO("Invasive Species IPA")
ananthakumaran has joined #ruby
<davidcelis>
blazes816: food trucks are subject to the same health inspection laws that restaurants are
<sernin>
offby1: .oO("Hoptimus Prime")
<coyo>
hey guys. i'm having trouble building native extensions on debian. i apt-get install'd ruby-dev ruby-full build-essential
<coyo>
and it still wont work.
<v0n>
offby1, nop, I said that ARGV will be ["A", "B"] if you pass "A -- B". But how do you do the difference between what was before or after the "--" ?
mpereira has joined #ruby
<davidcelis>
PDX has a fantastic food truck scene
<apeiros_>
v0n: that's not correct
<apeiros_>
ARGV will be ["A", "--", "B"]
macmartine has joined #ruby
<v0n>
apeiros_, nop
<apeiros_>
ruby doesn't do any preprocessing of arguments passed to a script
<offby1>
sounds like a dispute that can be easily solved by trying it out.
<coyo>
anyone have any ideas on how i can build tokyocabinet and/or bdb's native extensions on debian? i am googling as furiously as i can.
<offby1>
apeiros_: he's talking about optparse
<v0n>
apeiros_, I'm talking about "optparse" behavior
<offby1>
coyo: on debian, the "apt-file" package is infinitely useful
<apeiros_>
v0n: aha, missed that
<apeiros_>
v0n: preprocess ARGV then
<shadoi>
coyo: docs in the tarball (and use kyotocabinet, not tokyocabinet)
<coyo>
apt-file?
yannis has joined #ruby
* offby1
nods gravely
<apeiros_>
it's easy enough to find -- in ARGV and remove everything after it
<coyo>
shadoi: the package, rbot, depends on tokyocabinet. not sure i can just drop in and replace with kyotocabinet
<shadoi>
oh
<shadoi>
coyo: there's a package in ubuntu
<v0n>
apeiros_, this optparse behavior makes its usage useless... maybe I could desactive it?
<atmosx>
ubuntu!
Progster has quit [Ping timeout: 248 seconds]
mucker has quit [Quit: leaving]
<v0n>
otherwise I'll have to preprocess it as you said
<shadoi>
coyo: looks like it's in debian too
shadoi has left #ruby [#ruby]
<coyo>
shadoi okay.
<offby1>
v0n: my hunch is that you want to preprocess, and further, it shouldn't be too hard
tiripamwe has joined #ruby
<v0n>
offby1, yep, I'll do that
cbuxton1 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
X-Jester has quit [Ping timeout: 240 seconds]
cbuxton has quit [Ping timeout: 260 seconds]
<v0n>
I'm wondering what would be the simpler way to do this...
williamcotton_ has joined #ruby
monkegjinni has joined #ruby
tatsuya_o has joined #ruby
williamcotton has quit [Ping timeout: 246 seconds]
williamcotton_ is now known as williamcotton
Axsuul has joined #ruby
<geekbri>
Is there any soul here who can venture a comment at a good begin/end if/end matching plugin for vim?
<geekbri>
As in I'd love to use matchit's % binding to jump between begin/end, not necessarily auto closing of a begin/end
<sernin>
geekbri: you've already asked in #vim, yes?
<atmosx>
yes
* atmosx
points geekbri
<atmosx>
HE DID!
<geekbri>
sernin: yes but i enabled matchit and it doesn't match the begin/end
<atmosx>
let's crucify him!!!
<geekbri>
(which is what they asked me)
<geekbri>
that was also like 3 days ago :)
<offby1>
v0n: maybe search ARGV for '--', then partition ARGV into a "before" and "after" array ... you can then sic optparse on either or both of them
<atmosx>
geekbri: 3 days are close to /dev/null compared to eternity!
jcooley has joined #ruby
<geekbri>
But if I must be punished for my crimes, I can accept that.
<geekbri>
sernin: I tried that one and it didn't seem to work proper for me. I was hoping that somebody here might have had a better experience with something else that maybe DIDNT come up in the first 5 results of google.
<v0n>
offby1, I'd image a simple `before, after = ARGV.split("--")`
<geekbri>
sernin: Sorry if I have offended you in some way, I just thought that maybe somebody here might have some interesting, not first page in google solution
<sernin>
geekbri: OK, just checking. I can't say that I have. Perhaps hack on it yourself a bit? Necessity does indeed drive invention.
<geekbri>
sernin: Yeah I have been considering it, just trying not to reinvent something that is already existing and working :)
<geekbri>
I'll give ruby-matchit another whirl i suppose.
nikeita has quit [Quit: sleep]
mobilegamelabs has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
X-Jester has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Client Quit]
nikeita has joined #ruby
<sernin>
geekbri: It seems to be a unique problem as 'end' matches several different constructs
<geekbri>
sernin: yeah, its a bit of a pain. Unfortunate, I sorely miss using % to hop around
<sernin>
geekbri: You might want to try folding, if you're good about indenting your code, use something like :set foldmethod=indent and go from there
<geekbri>
i'll give folding a look. I haven't used it yet in vim.
xaq has joined #ruby
Progster has joined #ruby
jvshahid has joined #ruby
bbttxu has joined #ruby
bbttxu has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
verto|off is now known as verto
<coyo>
okay, so. i installed libtokyocabinet-dev, build-essential, libbz2-dev, ruby-dev, ruby1.9.1-dev, ruby-full, ... and it still wont install. i'm trying to install rbot from source.
Cicloid has quit [Remote host closed the connection]
<offby1>
:-(
cakehero has quit [Quit: Computer has gone to sleep.]
<offby1>
coyo: how about "apt-get build-deps rbot"?
<coyo>
offby1: okay
grw7 has joined #ruby
<shevy>
ack
<shevy>
apt-get
<coyo>
.... the hell? i thought i had all that installed already??
<coyo>
offby1: okay, that was very helpful, but it STILL WONT INSTALL
tatsuya_o has joined #ruby
<coyo>
i have no idea if wiping the entire thing clean will even work
<offby1>
:-(
jeff_sebring has quit [Quit: Leaving]
imami|afk is now known as banseljaj
<offby1>
coyo: at some point you're allowed to blame the developers.
hadees has quit [Quit: hadees]
<coyo>
i dont know what point that is.
syamajala has quit [Ping timeout: 246 seconds]
<coyo>
and it's not terribly helpful.
jarred has joined #ruby
yannis has quit [Quit: yannis]
<sernin>
Looks like bdb is still your issue. Are you using rvm or rbenv?
hadees has joined #ruby
Cicloid has joined #ruby
<coyo>
my gods, i wanna cry. this peice of shit!
cakehero has joined #ruby
aknagi has quit [Remote host closed the connection]
* sernin
is a sysadmin / devops guy. So, I know your pain.
ThaDick has joined #ruby
gokul has quit [Ping timeout: 246 seconds]
GoGoGarrett has joined #ruby
fermion has quit [Quit: P]
jgrevich has quit [Quit: jgrevich]
* offby1
sadly calls the /me police on sernin
hadees has quit [Ping timeout: 246 seconds]
<shevy>
coyo: for me the point is every time I have a problem with [insert software here]
<shevy>
most of the time, it is because of bad documentation
<coyo>
shevy: it really shouldnt be this hard!
<offby1>
coyo: maybe see if the debian package works. If so, then perhaps diff the debian package's source against the version that you're having trouble with.
<sernin>
coyo: I predate the /me police, and am grandfathered in.
<offby1>
oh, carry on, then
<sernin>
s/coyo/offby1
dell has quit [Quit: Page closed]
<coyo>
offby1: okay, attempting to just use the version in debian repos.
timonv has joined #ruby
strife25 has joined #ruby
<offby1>
I know nothing about rbot but what I've learned in the last half hour, but I assume it's an amateurish blob of code that the author wrote for his own amusement, and that nobody else ever actually runs. (At least, that's the case for the IRC bot that _I_ wrote :-)
Choobie has quit [Ping timeout: 252 seconds]
pu22l3r_ has quit [Ping timeout: 252 seconds]
kvirani has joined #ruby
nicoulaj has quit [Remote host closed the connection]
crankycoder has quit [Remote host closed the connection]
tommyvyo has quit [Ping timeout: 245 seconds]
digitalcakestudi has joined #ruby
quest88 has joined #ruby
ryannielson has quit [Quit: ryannielson]
yoklov has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
tommyvyo has joined #ruby
ged has joined #ruby
benthumb has quit []
banseljaj is now known as imami|afk
ged has quit [Client Quit]
Liothen has joined #ruby
IrishGringo has quit [Remote host closed the connection]
banisterfiend has joined #ruby
baroquebobcat_ has joined #ruby
benson has quit [Ping timeout: 248 seconds]
brianpWins has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
i8igmac has quit [Quit: Leaving]
baroquebobcat has quit [Ping timeout: 252 seconds]
baroquebobcat_ is now known as baroquebobcat
benson has joined #ruby
xnm has joined #ruby
abra has joined #ruby
kpshek has quit []
Erdon has joined #ruby
gearaholic has joined #ruby
jarred has quit [Ping timeout: 264 seconds]
pzero has quit [Quit: Leaving]
raul782 has quit [Remote host closed the connection]
verto is now known as verto|off
MasterIdler has joined #ruby
xaq has quit [Remote host closed the connection]
mneorr has quit [Quit: Leaving.]
<coyo>
v0n: i edited the script and reran it. that was EASY. i didnt have to compile anything, didnt have to mess about with broken gemspec files or rakefiles..
billiam has quit [Ping timeout: 264 seconds]
<iamjarvo>
i want to do basic xml stuff basically just read a file and turn contents into a hash. is there something else beside nokogiri
erichmenge has joined #ruby
<v0n>
coyo, yep, try to keep things the more simple as you can. If it fits well in a simple one-file script, keep it like that.
<coyo>
iamjarvo: there are other xmp parsers other than nokogiri. let me check my history. i was just looking that up
internet_user has quit [Remote host closed the connection]
Nisstyre has quit [Quit: Leaving]
cbuxton has joined #ruby
pk1001100011_ has joined #ruby
nopolitica has quit [Quit: Leaving.]
pk1001100011_ has quit [Client Quit]
jbw has quit [Ping timeout: 246 seconds]
JStoker has quit [Excess Flood]
<davidcelis>
wrapids: Gotta call .call on it though, forgot about that
froy has quit [Quit: kablam!]
<wrapids>
A practice question to follow that one up based on davidcelis' answer. What is the difference between { 'this' = and { :this =, and which one should I use?
<wrapids>
I'm looking at the docs ^^
<davidcelis>
hash[:dynamic].call
<davidcelis>
wrapids: 'this' is a string, :this is a symbol
mxweas_ has joined #ruby
shadoi has joined #ruby
mxweas_ has left #ruby [#ruby]
JStoker has joined #ruby
<davidcelis>
many kinds of ruby objects can be hash keys, but those are the two used most often. Symbols are less intensive on memory because once a symbol is created, every reference to it refers to the same object
<davidcelis>
so symbols tend to be better as hash keys
<wrapids>
Gotchya
<davidcelis>
but "this" string is not the same object as "this" string, despite being equivalent. their object_ids are different
AlbireoX has joined #ruby
iamjarvo has joined #ruby
<wrapids>
davidcelis: I think I have a more elegant way of doing it
<davidcelis>
?
<wrapids>
without lambda I mean, thank you for your help though I think that could be very useful
inad922 has quit [Ping timeout: 252 seconds]
<wrapids>
Sorry, I use the return key as puncation too often.
<davidcelis>
share
mneorr has joined #ruby
<wrapids>
Well, I'm retrieving all of my values from an initial string that Im parsing. It would be simpler to just (essentially) string.parse.parse rather than using the lambda
Nisstyre has joined #ruby
<wrapids>
Rather than using lambda to hash[:value].parse
xnm has quit [Read error: Connection reset by peer]
<Hanmac>
davidcelis: in ruby every object could be an key for a hash, even the hash itself :P
digitalcakestudi has quit [Ping timeout: 246 seconds]
<davidcelis>
Hanmac: Yeah, I figured any object could. I hadn't actually tried for nil/true/false but it works haha
und3f has quit [Quit: Leaving.]
<davidcelis>
wrapids: does that actually work? and i'm having trouble visualizing what you're doing
<wrapids>
one moment.
Gavilan has joined #ruby
stkowski has quit [Quit: stkowski]
X-Jester has joined #ruby
Goles has joined #ruby
wmoxam_ has quit [Quit: leaving]
<blazes816>
perhaps a stupid question (and this is just an experiment, I have no use case) but why doesn't this work:https://gist.github.com/3153260
habib has joined #ruby
CannedCorn has joined #ruby
CannedCorn has quit [Remote host closed the connection]
<blazes816>
as in, why can't I declare a singleton method on a symbol?
jbw has joined #ruby
Erdon has quit [Ping timeout: 264 seconds]
<davidcelis>
you can't define singleton methods on Symbols, Fixnums, or instances of TrueClass, FalseClass, or NilClass
<Hanmac>
blazes816 because symbols and fixnums are a bit different then others
<wrapids>
burgestrand: I'm aware the first example doesn't work, I was just trying to get an idea on amount of work between implementing lambda in the first example or just using the second. Or as you said initializing them in separate statements.
GoGoGarrett has quit [Remote host closed the connection]
<burgestrand>
wrapids: separate statements may not be as sexy, but it’s easy to understand and implement :)
<wrapids>
I'm not familiar with using lambda, but I imagine that examples 2 and 3(yours) would be less work than using lambda
<burgestrand>
(and it’s also not horrible)
mpereira has quit [Ping timeout: 246 seconds]
<burgestrand>
Using a lambda would, in most cases, just be weird.
<Spooner>
Building the hash as burgestrand is significantly simpler than any fiddly way.
Criztian has joined #ruby
<Spooner>
Though seeing what you are doing, a regexp method would be nicer too.
zigidias has quit [Read error: Connection reset by peer]
tatsuya_o has quit [Remote host closed the connection]
<burgestrand>
banisterfiend: you know why symbols/numbers don’t have singleton classes, but true/false/nil do?
WirIrrenUmher has quit [Quit: Leaving.]
yoklov has joined #ruby
<wrapids>
Spooner: I'm not too well practiced with regex, I've considered using that, but for this is essentially a prototype and will be changeable later. I'm trying to incorporate best practices as well as I can, which is why I was asking about that. Less to fix later is nice, but regex is a completely different lesson.
zeromodulus has joined #ruby
<habib>
how to clear screen in terminal?
pu22l3r has joined #ruby
<wrapids>
nix $clear/ doz $cls
<Hanmac>
blazes816: i found something about ImmediateValues but is only in german
jimeh has quit [Quit: bye]
nacengineer has joined #ruby
Cicloid has quit [Remote host closed the connection]
<burgestrand>
habib: write "clear"
<burgestrand>
And then enter.
eywu has quit [Quit: Leaving.]
bluenemo has quit [Remote host closed the connection]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
<Spooner>
wrapids : Fair enough. You should definitely build the hash key by key, though, rather than defining it all in one go. Avoids the recursive issues you are trying to overcome.
syamajala has quit [Read error: Connection reset by peer]
syamajal_ has joined #ruby
<wrapids>
Actually, I see something else I could change, one moment
syamajal_ has quit [Remote host closed the connection]
Erdon has joined #ruby
dankest has joined #ruby
<wrapids>
Okay, now
<wrapids>
I'm assuming you can store arrays in a hash?
<Hanmac>
in ruby you could store everything in a hash :P
<wrapids>
Hanmac: That's what I figured. The whole 'everythings an object'
<wrapids>
I also know that it's bad to assume things.
mockillo has quit [Ping timeout: 252 seconds]
<Hanmac>
you could store classes like {:array => Array} too
<wrapids>
I do have a problem with this that I'm not sure what to do about. line may not be that format. If it lets say is just "asdfasf" I'm going to get exceptions when it tries to set those elements equal to split(':')[1]
dhodgkin has quit [Ping timeout: 248 seconds]
jsime has quit [Quit: Leaving]
<blazes816>
wrapids: it would return nil
<krisvincent>
coffeescript
brianpWins has quit [Quit: brianpWins]
apeiros_ has quit [Ping timeout: 248 seconds]
<wrapids>
Then it will try to .split after on that nil.
dv310p3r has quit [Ping timeout: 246 seconds]
<blazes816>
Hanmac: sorry, i missed that. mind sending it this way anyways?
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
nadirvardar has joined #ruby
maxmmurphy has quit [Read error: Connection reset by peer]
blacktulip has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
<icy`>
hi, i'd like to connect to a server with object a, and bind(?) that connection to local port. Then later have object b connect to a through the local port. Is this doable?
PaciFisT has quit [Quit: Leaving.]
devdazed has quit [Quit: Bye]
Cicloid has joined #ruby
MasterIdler_ has joined #ruby
MasterIdler_ has quit [Client Quit]
<bperry>
^^ so good at idling
wallerdev has quit [Quit: wallerdev]
<shevy>
whowantstolivefo: the only real way to learn ruby is to write ruby code on your own
fridim_ has quit [Ping timeout: 246 seconds]
awarner has quit [Remote host closed the connection]
<shevy>
start with the standard library. how to make files... fileutils ... how to replace shell scripts with ruby. from there it will grow easily
<shevy>
you can go to the web and network
<icy`>
one application of my question was irc bouncer connection
jgrevich_ has joined #ruby
wallerdev has joined #ruby
MasterIdler has quit [Ping timeout: 260 seconds]
hadees has joined #ruby
jgrevich has quit [Ping timeout: 246 seconds]
jgrevich_ is now known as jgrevich
bluenemo has quit [Remote host closed the connection]
cableray has joined #ruby
dioms has quit [Remote host closed the connection]
mxweas_ has quit [Remote host closed the connection]
hadees has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
bbttxu has joined #ruby
mikepack has quit [Remote host closed the connection]
verto|off is now known as verto
baroquebobcat has quit [Ping timeout: 246 seconds]
supergiantrobot_ has quit [Quit: supergiantrobot_]
<yakko>
apeiros_: don't mind the history
<apeiros_>
you'll still have to specify what you need help with
<yakko>
apeiros_: do you think that can be done with a PostPresenter([...]) syntax?
<apeiros_>
I'm not into mind games
<apeiros_>
"that"? be specific.
<yakko>
oh sorry
<yakko>
I'm building a presenter, so I want to convert the Post object to a separated implementation
<yakko>
but i want to convert an array of posts into an array of PostPresenter
<yakko>
it does work if I have def self.array(models), I can invoke PostPresenter.array(posts)
<yakko>
do you think that can be done with a PostPresenter([...]) syntax?
robozahn has quit [Read error: Connection reset by peer]
<apeiros_>
o0
<apeiros_>
def self.array(models) should work fine
<apeiros_>
also, def V1::PostPresenter in that location is the same as def self.PostPresenter
pedahzur has joined #ruby
codespectator has joined #ruby
<apeiros_>
the former looking rather antiquated, though.
<apeiros_>
offline for a minute. brb
<pedahzur>
Ruby beginner question here. If I have a an empty list, i.e. my_list = [], and then have a my_list.each do |item| block, will that block still be run through? Empty item? Skipped completely?
<yakko>
apeiros_: sure
<tomb_>
pedahzur: yes, it'll just be called zero times
<yakko>
pedahzur: that's one of the reasons ruby is awesome :)
baroquebobcat has joined #ruby
awarner has joined #ruby
apeiros has joined #ruby
Z_Mass has quit [Ping timeout: 248 seconds]
ryannielson has joined #ruby
<pedahzur>
Hmm...I'm getting behavior that seems to indicate otherwise. But thanks for verifying how it *should* behave. :)
<yakko>
apeiros: you're back
<apeiros>
back, yes
<tomb_>
no front
<apeiros>
omg, a funny coder
<apeiros>
:-p
<tomb_>
where?
* apeiros
wonders whether those comics are online too…
luckyruby has quit [Remote host closed the connection]