apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
<deryl> even if you *do* institute and enforce a change-pass-on-next-login. Unless you also enforce a previous-pass-cannot-be-reused validation
<deryl> to include covering permutations of the previous
<stephenjudkins> deryl: yes. it's a complicated problem
<deryl> very
<stephenjudkins> which means that a new system should ever, ever use anything but bcrypt, since it's so hard to fix post-hoc
<deryl> easy to showcase just how easy security systems canbe compromised. just using the permutations example
baroquebobcat has quit [Quit: baroquebobcat]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
<stephenjudkins> brianpWins: tell your bosses that they are being grossly irresponsible and reckless, in those words.
<Paradox> ill bbl
workmad3 has quit [Ping timeout: 245 seconds]
<brianpWins> stephenjudkins: had a better solution
<brianpWins> told them i couldn't match the pattern and we "have to" make the reset request
nignaztic has quit [Quit: WeeChat 0.3.7]
<brianpWins> fin
<brianpWins> =)
nignaztic has joined #ruby
counterbeing has quit [Quit: Computer has gone to sleep.]
zaychenok has quit [Quit: Konversation terminated!]
king313 has quit [Quit: .]
zaychenok has joined #ruby
xbayrockx has joined #ruby
jimeh2 has quit [Ping timeout: 246 seconds]
macmartine has quit [Quit: macmartine]
<eam> using passwords for auth is the reckless part, moreso than any hashing scheme
seanstickle has joined #ruby
<eam> I'd happily store a shared secret in exchange for a switch to challenge response authentication
<eam> phishing is a problem orders of magnitude larger than hash exposure
Crooky has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
jimeh2 has joined #ruby
jmartin has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
Foxandxss has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<RBV> What if they used a system of questions...that only the user knew the answer to? Like their pets name or high school mascot?
pdtpatrick has quit [Quit: pdtpatrick]
Bosma has quit [Ping timeout: 246 seconds]
<brianpWins> RBV i'm going to assume that was a joke
williamcotton has joined #ruby
fantazo has quit [Remote host closed the connection]
<mischief> how about you do the smart thing and use 2 factor authentication
td123 has joined #ruby
eblume has quit [Quit: Page closed]
chson has quit [Remote host closed the connection]
yoklov has quit [Quit: bye!]
KwikkSilva has joined #ruby
<suborbital> shevy: nooby question you mentioned you wrote a webpage in ruby - could you share a code example?
chson has joined #ruby
brianpWins has quit [Quit: brianpWins]
<shevy> suborbital yeah
liluo has quit [Remote host closed the connection]
<shevy> suborbital http://pastie.org/4083376
d3vic3 has quit [Ping timeout: 245 seconds]
<suborbital> tyvm shevy .
nari__ has joined #ruby
<horseman> any swedes here?
ckrailo has quit [Quit: Computer has gone to sleep.]
<Vainoharhainen> horseman: yep
d3vic3 has joined #ruby
Konboi has joined #ruby
mvangala_home has joined #ruby
<horseman> Vainoharhainen: how say you regard this http://www.thelocal.se/41422/20120613/
minijupe has quit [Quit: minijupe]
emmanuelux has quit [Remote host closed the connection]
zaychenok has quit [Quit: Konversation terminated!]
<Vainoharhainen> horseman: Have not had time to read it yet.
zaychenok has joined #ruby
jenrzzz-mac has joined #ruby
greyEAX has joined #ruby
<horseman> Vainoharhainen: ok oh, when reading occurs pls msg me yet, and tell me not what you dont think about it
<greyEAX> how do i move data from one object to another?
<Vainoharhainen> ok
billiamii has joined #ruby
xastion has joined #ruby
nari__ has quit [Ping timeout: 252 seconds]
sixdahs has quit [Ping timeout: 244 seconds]
<shevy> greyEAX depends. have you defined a way for these objects to exchange any data yet?
<shevy> usually it is done via methods, assigning to instance variables
<shevy> attr_writer :foo
<shevy> object1.foo = object2.bar
emmanuelux has joined #ruby
jenrzzz-mac_ has joined #ruby
xastion_ has quit [Ping timeout: 265 seconds]
jenrzzz-mac has quit [Read error: Connection reset by peer]
jenrzzz-mac_ is now known as jenrzzz-mac
dsa has quit [Ping timeout: 252 seconds]
<greyEAX> oic
<greyEAX> erm, well basically, i've got two objects
<greyEAX> one that connects to an irc server
<greyEAX> and another that makes a listen server on udp
<greyEAX> i need to be able to take data parsed from irc, and push it through the udp server
tris has quit [Ping timeout: 246 seconds]
davidpk has joined #ruby
<greyEAX> i guess the udp server part isnt really just a listen server lol, basically, it 'listens' for connections, then marks down who wants data sent back to them
BMF has joined #ruby
EzeQL has joined #ruby
mockra has joined #ruby
BMF has left #ruby [#ruby]
xastion has quit [Ping timeout: 248 seconds]
yugui_zzz is now known as yugui
frishi has joined #ruby
adamkittelson has quit [Ping timeout: 252 seconds]
amh345 has joined #ruby
amh345 has quit [Changing host]
amh345 has joined #ruby
dnyy has quit [Remote host closed the connection]
horseman has quit [Remote host closed the connection]
Vainoharhainen has quit [Ping timeout: 252 seconds]
<amh345> I think i've seen something like this before, but i cant recall where or what it's called. i need to pass an arg to a module, but there is a chance that arg will not be defined if a condition is not met. is there a way when passing the arg to allow it to go through if it doesnt exist?
<amh345> i could define the variable elsewhere and pass a nill to the argument. but im pretty sure there was a cleaner way.
bricker88 has quit [Quit: Leaving.]
* Enekoos se despide
<Spooner> amh345 : You mean def frog(a, b = 12) ?
Progster has joined #ruby
<amh345> @var if something == somevalue var = "blah" end modulemethod(@var) is the way i know. but not nice.
sepp2k1 has quit [Remote host closed the connection]
Enekoos has quit [Remote host closed the connection]
<amh345> Spooner: so that would mean that if "b" is not defined as something else, it will pass it as 12?
inossidabile has joined #ruby
inossidabile has left #ruby [#ruby]
<shevy> DEFAULT_VALUE = 10
gebe has left #ruby ["Lämnar"]
zaychenok has quit [Read error: Connection reset by peer]
<shevy> def foo(a, b = DEFAULT_VALUE)
<shevy> b = DEFAULT_VALUE if b.nil?
<amh345> i wonder if modulemethod(a,b,c, @var if @var.exist) would work
zaychenok has joined #ruby
<shevy> no that will not. but you can check inside the method.
Kn|t3 has quit [Quit: Kn|t3]
trend has quit [Read error: No route to host]
trend_ has joined #ruby
<amh345> ok. i see. thanks.
robotmay has quit [Remote host closed the connection]
kenperkins has quit [Ping timeout: 248 seconds]
gtuckerkellogg has joined #ruby
crazed has joined #ruby
jtoft has joined #ruby
fbernier has quit [Ping timeout: 244 seconds]
<crazed> hm, how do you do log base 2 in ruby 1.8.7?
grantbdev has joined #ruby
<Spooner> amh345: Strictly, it will make b == 12, if b is nil or not specified.
freeayu has joined #ruby
<jtoft> for gem sources, does the ordering matter in terms of priority? Or how can you enforce that?
<amh345> ok. i was trying to find a way around writing a bunch of check. i guess i could pass b= nil
<Spooner> No, if it isn't there, it will be 12 too. You can call frog(1, 2) to specify or frog(1) or frog(1, nil) to default.
<amh345> def foo(a, b = nil) is no good?
wilmoore has quit [Remote host closed the connection]
<shevy> crazed, hmm ... this one? Math.log(Math::E) # => 1.0
<Spooner> It matters if you have multiple defaults, such as frog(a, b = 12, c = 9) and want to do frog(1, nil, 2) defaulting not all params.
<shevy> or that one Math.log(2) # => 0.6931471805599453
visof has joined #ruby
<Spooner> amh345: def foo(a, b = nil) doesn't do anything useful :)
g0bl1n has quit [Quit: Ex-Chat]
<amh345> im just trying to figure out a way around this. heh
<amh345> if i give 'b' a default value, then in my module i need to check if it's that default. and if it is, ignore it.
perryh_away is now known as perryh
looopy has quit [Remote host closed the connection]
<Spooner> amh345 : I'm not sure what you mean.
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
chrismcg is now known as zz_chrismcg
<Spooner> shevy : Math.log(2, 7) would be how you do it in 1.9 (that is Log2 of 7), but 1.8.7 Math only seems to support LogE and Log10 :(
<amh345> this is a rails app. so im building some statistics. i pass some args to the module and the module inserts them into the db. but one of those args might not exist should a condition not be met.
<shevy> hmm
<shevy> amh345 check inside your method
<amh345> yeah. that's what ill have to do.
<shevy> so far you only paste the parameter list but not the content of your method. it would be easier if you show your whole code, at least the one that is specific pertaining to your problem
<shevy> to pastie.org
shikamaru has joined #ruby
koskoz has joined #ruby
Synthead has joined #ruby
NimeshNeema has quit [Remote host closed the connection]
relix has quit [Remote host closed the connection]
moeSeth has quit [Remote host closed the connection]
MetaCosm has quit [Remote host closed the connection]
notbrent has quit [Remote host closed the connection]
_marvin has quit [Read error: Connection reset by peer]
blooberr has quit [Remote host closed the connection]
si14 has quit [Write error: Broken pipe]
denysonique has quit [Remote host closed the connection]
DavidTiger has quit [Remote host closed the connection]
randym has quit [Remote host closed the connection]
cesario has quit [Remote host closed the connection]
Spaceghostc2c has quit [Remote host closed the connection]
MoMo has quit [Remote host closed the connection]
anildigital_work has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
jeremy_carroll has quit [Read error: Connection reset by peer]
dekz has quit [Remote host closed the connection]
SeanTAllen has quit [Read error: Connection reset by peer]
patricksroberts has quit [Write error: Connection reset by peer]
avandendorpe has quit [Remote host closed the connection]
saidin_ has quit [Remote host closed the connection]
ctevie has quit [Remote host closed the connection]
ziyadb has quit [Read error: Connection reset by peer]
Dr4g_ has quit [Read error: Connection reset by peer]
<greyEAX> oh boy
<greyEAX> netsplits
lectrick has quit [Remote host closed the connection]
dnyy has joined #ruby
aquaranto has quit [Remote host closed the connection]
axolx is now known as axolx|afk
ciopte7 has joined #ruby
<greyEAX> so yeah, how should i handle that situation?
L-----D has joined #ruby
<greyEAX> with the data i mean?
<greyEAX> i mean, i guess i could make like, a global variable or something
<greyEAX> and have the one object write every line to it or something
<shevy> yeah use that
<greyEAX> oh
<greyEAX> welp
<greyEAX> lol
<shevy> lol
<shevy> the child of well and help
<greyEAX> i really need to learn the concept of occams razor
liluo has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<greyEAX> i always come up with solutions, but i think 'man that sounds really dumb/way too simple, i bet i'm not right about this'
<greyEAX> then i ask somewhere, and people are like 'yeah, no, do that.'
<eam> mischief: two factor is orthogonal to plaintext/challenge response issue
mrsolo has left #ruby ["Leaving"]
silentpost has quit [Quit: leaving]
MrGando has quit [Quit: Bye]
Markvilla has quit [Ping timeout: 244 seconds]
mockra has quit [Remote host closed the connection]
lorandi has joined #ruby
alexim has quit [Quit: sleep]
mfridh has quit [Ping timeout: 245 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
qos has quit [Quit: Linkinus - http://linkinus.com]
horseman has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
wmoxam has quit [Ping timeout: 245 seconds]
pu22l3r_ has joined #ruby
Markvilla has joined #ruby
silentpost has joined #ruby
hugoxrosa has joined #ruby
neohunter has joined #ruby
<neohunter> I have a noob question..
<neohunter> how i can extract 10 elements from an array
<neohunter> i want a each but getting 10 elements of the array
<neohunter> ten.. then another ten...
<neohunter> instead of one bye one
<neohunter> is possible?
mockra has joined #ruby
jtoft has quit [Quit: jtoft]
wmoxam has joined #ruby
<silentpost> look at each_slice
chienpo has quit [Quit: Leaving.]
<silentpost> array.each_slice(10)
<silentpost> ^ neohunter
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
jimeh2 has quit [Ping timeout: 244 seconds]
syamajala has joined #ruby
EasyCo has joined #ruby
<EasyCo> Is there a channel for Rubygem related questions?
eft has quit [Ping timeout: 250 seconds]
EasyCo has quit [Quit: EasyCo]
<billiamii> #rubygems, maybe?
savage- has quit [Remote host closed the connection]
Aaton_off is now known as Aaton
ciopte7 has quit [Quit: ciopte7]
Progster has quit [Ping timeout: 260 seconds]
RoUS has quit [Remote host closed the connection]
bigoldrock has quit [Quit: Leaving.]
koskoz has quit [Ping timeout: 246 seconds]
dnyy has quit [Remote host closed the connection]
frishi has quit [Quit: Leaving...]
kenperkins has joined #ruby
mockra has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
<shevy> when I do pp object
<shevy> I get something like:
<shevy> #<Foo:0x000000022e0598>
hemanth has joined #ruby
<shevy> this can be achieved via def to_s or ?
<shevy> greyEAX well, if the global variable works then just use it
<greyEAX> kk
<shevy> in 2 months you can look back and see if this approach was ok or not
igotnolegs has joined #ruby
<greyEAX> oic
td123 has quit [Quit: WeeChat 0.3.8]
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
mockra has joined #ruby
iori has joined #ruby
crankycoder has joined #ruby
visof has quit [Ping timeout: 244 seconds]
mikeycgto has quit [Ping timeout: 244 seconds]
adeponte has quit [Ping timeout: 240 seconds]
wpaulson has joined #ruby
sleetdrop has joined #ruby
seanstickle has quit [Quit: seanstickle]
albemuth has quit [Quit: Computer has gone to sleep.]
zaychenok has quit [Quit: Konversation terminated!]
uris has joined #ruby
zaychenok has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
Rizzle has joined #ruby
syamajala has quit [Remote host closed the connection]
zaychenok has joined #ruby
tewecske has quit [Quit: Leaving.]
indian has quit [Ping timeout: 240 seconds]
shadoi has quit [Quit: Leaving.]
ciopte7 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
Araxia_ has quit [Quit: Araxia_]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
itnomad has joined #ruby
hemanth2 has joined #ruby
emmanuelux has quit [Ping timeout: 264 seconds]
headius has quit [Quit: headius]
amh345 has left #ruby [#ruby]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
wmoxam has quit [Ping timeout: 252 seconds]
makarius has quit [Ping timeout: 244 seconds]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
shevy2 has joined #ruby
shtirlic_ has joined #ruby
subbyyy has joined #ruby
zaychenok has quit [Ping timeout: 244 seconds]
Hanmac has joined #ruby
voodoofish430 has quit [Quit: Leaving.]
shevy has quit [Ping timeout: 244 seconds]
shtirlic has quit [Ping timeout: 265 seconds]
<bnagy> hello, world.
asuka_ has quit [Ping timeout: 240 seconds]
asuka_ has joined #ruby
TorpedoSkyline has quit [Quit: TorpedoSkyline]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<shevy2> how again do I return a random element from an array?
<shevy2> nevermind, going to use array.shuffle[0]
<horseman> shevy2: no
<horseman> shevy2: array.sample
<shevy2> hmm
hemanth2 has quit [Quit: Leaving.]
adeponte has joined #ruby
hemanth2 has joined #ruby
<davidcelis> shevy2: array.sample
mdw has joined #ruby
<bnagy> I wish Range had #sample
ixx is now known as taylorcc
taylorcc is now known as taylor
shadoi has joined #ruby
taylor is now known as ixx
<horseman> bnagy: rand(range)
<bnagy> rand('a'..'z')
<bnagy> TypeError: can't convert Range into Integer
<bnagy> douche
<horseman> true'
<bnagy> I am assuming they just make you do to_a so you realise it has to be done
trend has joined #ruby
trend has quit [Client Quit]
<bnagy> but I can still wish there were magic
Markvilla has quit [Read error: Connection reset by peer]
trend_ has quit [Ping timeout: 240 seconds]
Markvilla has joined #ruby
<bnagy> mind you, that also begs the question of how rand(1..10) works internally, must be a special case
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
hunglin has joined #ruby
fbernier has joined #ruby
zinjacoder has quit [Remote host closed the connection]
d3c has quit [Quit: Sleep]
vitoravelino is now known as vtr
vtr is now known as vitoravelino
<visof> hello
<visof> how can i write regexp that match words with letters or letters + digits
<davidcelis> =~ /[\w\d]+/
<davidcelis> actually \w matches both letters and numbers (and underscores)
<davidcelis> so \w+ should be enough
<davidcelis> visof: play around on http://rubular.com/
<visof> davidcelis, your exp will match hello@ ?
radic has quit [Disconnected by services]
radic_ has joined #ruby
<davidcelis> @ is not a number
radic_ is now known as radic
indian has joined #ruby
<visof> davidcelis, what i;m trying to do is rails validation regexp to ensure the entered text is [\w\d]+
impomatic has quit [Read error: Connection reset by peer]
hemanth2 has quit [Quit: Leaving.]
<davidcelis> like i said, @ is not a digit. that's not going to be matched; your validation will fail
vitoravelino is now known as vitoravelino`afk
<visof> davidcelis, so what should i do ?
looopy has joined #ruby
<davidcelis> visof: you want the character @ to be accepted?
<davidcelis> visof: you said letters or numbers. what do you want dude
<davidcelis> be less vague
<visof> davidcelis, nope i want it to be not accepted
<visof> /^[\w\d]$/i
<davidcelis> \w+ will only match letters, numbers, or underscores
<davidcelis> [\w\d] is redundant because \w encompasses \d
frishi has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
ipoval has joined #ruby
<sgronblom> Whoa, there was a lot more code in Array#sample than I expected :)
iori has quit [Remote host closed the connection]
iori has joined #ruby
CheeToS has joined #ruby
macmartine has joined #ruby
<horseman> sgronblom: i guess it's trying to opitmize stuff..
<horseman> but mri code is pretty weird
<sgronblom> yeah im not very used to reading the C source yet
<sgronblom> Was just looking for a quick n dirty way to replicate Array#sample in 1.8.6
<bnagy> ary[rand(ary.size)]
<davidcelis> lol no
<davidcelis> array.choice
<sgronblom> nah thats array.choice yeah
<davidcelis> it existed in 1.8, just with that unfortunate name
<sgronblom> but i dont think this test case requires the sample to be random so i just went with slice(0, n)
<bnagy> pff that's sample
<bnagy> just not sampe(n) - you didn't say that
<bnagy> just select some indicies and run uniq until you have enough - it's like 2 lines
<Paradox> *sample
Tricks has quit [Read error: Connection reset by peer]
fbernier has quit [Ping timeout: 244 seconds]
Tricks has joined #ruby
mvangala_home has quit [Read error: Connection reset by peer]
davidpk has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mvangala_home has joined #ruby
shtirlic_ has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
<bnagy> http://pastie.org/4083859 3 lines, sry
axl__ has quit [Quit: axl__]
<Paradox> isn't that what 1.9 sample already does?
<bnagy> try to stay with the program, Paradox
<bnagy> 10:35 < sgronblom> Was just looking for a quick n dirty way to replicate Array#sample in 1.8.6
<Paradox> oh lol
Karmaon has quit [Ping timeout: 265 seconds]
<mischief> eam: so?
Progster has joined #ruby
ericcoleman has joined #ruby
<horseman> bnagy: i would just do: array.shuffle.take(n)
<horseman> though some babies might say that's less efficient, i think it's cute
d3c has joined #ruby
<Paradox> horseman, thats a nice one liner
<Paradox> and not sure if its less efficient…
<Paradox> erm
<Paradox> yeah it is
<Paradox> nvm
<bnagy> horseman: yours has the advantage of needing a lot less error handling
randym has joined #ruby
eywu has quit [Quit: Leaving.]
fbernier has joined #ruby
akem has quit [Ping timeout: 252 seconds]
horseman has quit [Ping timeout: 248 seconds]
<bnagy> I hate my isp
BMF has joined #ruby
<bnagy> I think they use a proxy - I"ma get a google bot to continually search for things like 'nepal telecom customer service center location' and 'how to hide a body' and '7.62mm ammunition'
wilmoore has joined #ruby
horseman has joined #ruby
axl_ has joined #ruby
greyEAX has quit [Quit: Leaving]
Spooner has quit [Ping timeout: 244 seconds]
skinny_much has joined #ruby
<horseman> bnagy: hey
<horseman> bnagy: do you often get food poisoning?
mdw has quit [Remote host closed the connection]
skinny_much has quit [Read error: Connection reset by peer]
skinny_much has joined #ruby
Karmaon has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
<Paradox> bnagy, could be your dns
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
silentpost has quit [Ping timeout: 240 seconds]
<bnagy> Paradox: yeah it could be, but it's not
<Paradox> Charter used to do all sorts of stupid dns redirections
<Paradox> they wouldn't send 404s or whatever
<bnagy> horseman: no, that was the second time in >2 years
<Paradox> or DNS errors
Tref has quit [Remote host closed the connection]
<Paradox> rather they'd redirect you to their shitty bing-powered ad-ridden site
Tref has joined #ruby
Tref has quit [Client Quit]
alexim has joined #ruby
fbernier has quit [Ping timeout: 244 seconds]
Karmaon has quit [Ping timeout: 244 seconds]
luxurymode has joined #ruby
alexim has quit [Client Quit]
allanm has joined #ruby
Maniacal has quit [Ping timeout: 265 seconds]
Karmaon has joined #ruby
allanm_ has quit [Ping timeout: 256 seconds]
Aristata has joined #ruby
<Aristata> dm-paperclip: Top model creates the paths and puts the images in, bottom model does not http://pastie.org/private/abffxtricc4vreaatxyclw
suborbital has quit [Quit: REBOOT]
manizzle has quit [Remote host closed the connection]
frishi has quit [Quit: Leaving...]
RoUS has joined #ruby
suborbital has joined #ruby
ananthakumaran has joined #ruby
baroquebobcat has joined #ruby
Aaton is now known as Aaton_off
liluo has quit [Read error: Connection reset by peer]
liluo_ has joined #ruby
td123 has joined #ruby
<freeayu> hello, how to empty file content
wpaulson has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<bnagy> try opening the file with 'w' and closing it, maybe
alphabitcity has joined #ruby
azm has joined #ruby
<alphabitcity> Can someone please help me with this code? http://pastie.org/4084026 .. can't quite figure out a good way to do this
lteo has joined #ruby
<lteo> if i have an integer variable x == 5, is there an easy way to get an array [ 0, 1, 2, 3, 4, 5 ] ?
<freeayu> bnagy this could append a new line, not empty
<bnagy> freeayu: w truncates to 0 length first
BMF has quit [Remote host closed the connection]
<bnagy> lteo: (0..x).to_a
<alphabitcity> bnagy: thank you very much
<lteo> bnagy: thanks :) i knew it existed but somehow had a brain fart
<Aristata> dm-paperclip: Top model creates the paths and puts the images in, bottom model does not http://pastie.org/private/abffxtricc4vreaatxyclw
andrewhl has joined #ruby
mohits has quit [Ping timeout: 244 seconds]
<Paradox> long ass title
<Paradox> lol
<Paradox> could be useful
<Paradox> but seems to add another dependency to manage dependencies
<horseman> Paradox: hehehe, im just trolling my friend who wrote it ;)
<horseman> Paradox: we had a disagreement over the length of the method names
<horseman> so i'm seeing what 3rd parties think ;)
<Paradox> yeah, those would probably be much better handled as a hash paramiters
<Paradox> ie :include => true, :exclude => true
<Paradox> whatever
skinny_much has quit [Quit: Colloquy for iPod touch - http://colloquy.mobi]
<Paradox> the names are…very verbose
zomgbie_ has quit [Ping timeout: 244 seconds]
<Paradox> lol
<horseman> Paradox: are you a fan of the new 1.9 hash/lambda syntax
<Paradox> yes i am
luxurymode has quit [Quit: Computer has gone to sleep.]
jamescarr has joined #ruby
<Paradox> but i find if i write herp: derp people shit themselves
<jamescarr> yikes... I tried to install showoff and got this when running it:
<jamescarr> `to_specs': Could not find showoff (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
<Paradox> so for examples, i write :herp => derp
zomgbie has joined #ruby
<jamescarr> what what what?
<jamescarr> I'm using the latest RVM, FYI
byronb has joined #ruby
<Paradox> jamescarr, try exec $SHELL
<Paradox> then try it again
<horseman> Paradox: what about ->(x, y) { puts x; puts y }
<Paradox> horseman, yes please
<Paradox> its smooth and elegant
<Paradox> and a hell of a lot easier to remember -> as an anonymous function
<Paradox> rather than lambda
<horseman> yeah
<horseman> i just wish it was syntax for proc rather than lambda
<horseman> as i tend to use procs a lot more
<Paradox> eh
<jamescarr> Paradox, I am running oh my zsh
<Paradox> jamescarr, still, exec $SHELL
<Paradox> im running zsh too
wubino has quit [Quit: Leaving]
<Paradox> and i sometimes have to reload my shell to get it to recognize gems
<Aristata> dm-paperclip: Top model creates the paths and puts the images in, bottom model does not http://pastie.org/private/abffxtricc4vreaatxyclw
<jamescarr> Paradox, I did, all it did was ask me to update ZSH and dropped me to the normal ZSH prompt again?
<bnagy> Aristata: quiet down
<Paradox> alternatively you can just open a new shell
aces1up has joined #ruby
<aces1up> can someone help me with the following example please? http://pastebin.com/uFbBPRns
<jamescarr> still doesnt work
<bnagy> Aristata: if you have highlighted someone for better or worse they'll answer when they get back
greyEAX has joined #ruby
<jamescarr> I'll restart unity...
jamescarr has quit [Quit: Leaving]
<bnagy> Aristata: btu you might have more luck in one of the rails channels eg #rubyonrails
<Aristata> You do realize that dm-paperclip is not a person right?
<Aristata> It's a preface
erichmenge has quit [Quit: erichmenge]
neohunter has quit [Quit: Leaving...]
<bnagy> no, I didn't realise that
Karmaon has quit [Ping timeout: 244 seconds]
dhruvasagar has joined #ruby
billiamii has quit [Ping timeout: 265 seconds]
mrdtt has joined #ruby
hunglin has quit [Quit: Leaving.]
<bnagy> but regardless of whether you choose to use your own personal shorthand that employs 'prefaces' that look like nicks, a) you don't need to paste the same thing every 10 minutes and b) you might have more luck in a rails channel
uris has quit [Quit: leaving]
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
Progster has quit [Ping timeout: 240 seconds]
randym has quit [Remote host closed the connection]
krusty_ar has quit [Ping timeout: 244 seconds]
xiaotian has quit [Quit: Computer has gone to sleep.]
azm has quit [Read error: Connection reset by peer]
xiaotian has joined #ruby
chrxn has joined #ruby
<Aristata> I have been in the rails channel
<Aristata> I post it when my screen fills with eople coming and going
<Aristata> That's reasonable, and I will continue
<graspee> Aristata: it's not reasonable. that's not the way the channel works
<horseman> Aristata: try posting on stack overflow
alphabitcity has left #ruby [#ruby]
<bnagy> it's not reasonable because a) this is not a rails channel and b) every 10 minutes is too often
<graspee> it's not some 1990s cracks and wares channel where people spam the same messages every few minutes until someone bites. think of it as a conversation
simao_ has joined #ruby
<Aristata> That's news to me that datamapper doesn't work with ruby
<Aristata> Deal with it
<graspee> that's overly aggressive talk for a newcomer. i do not see you doing well here
<Paradox> freeayu, you wanted to completely delete a file and make a new one?
<Aristata> A newcomer?
<Aristata> ha
<Aristata> I have been in this game for 7 years
<graspee> what game?
<Aristata> I don't come in here often becasue it's rare I need help
<Paradox> Registered : Jul 14 15:49:29 2010 (1 year, 47 weeks, 6 days, 12:06:40 ag
<Aristata> Yes, I stared programming ruby the day I joined irc
Targen has joined #ruby
albemuth has joined #ruby
<horseman> Aristata: srsly, stackoverflow.com is more appropriate forum
<Aristata> I also don't have any other irc accounts for work
<Aristata> srsly, you guys are bitching to bitch
<Aristata> irc standard
wallerdev has quit [Quit: wallerdev]
<Aristata> dm-paperclip: Top model creates the paths and puts the images in, bottom model does not http://pastie.org/private/abffxtricc4vreaatxyclw
simao has quit [Ping timeout: 265 seconds]
<horseman> Aristata: reposting the same qustion every 10 mins would get u banned if there was an op here
<aces1up> array1 - array2 # Remove Any Elements from Array 1 that are contained in Array 2.(Difference)
<aces1up> => ["z"] how do I remove elements from array 1 that ARE NOT in array 2?
<graspee> oh srsly
mvangala_home has quit [Remote host closed the connection]
<Aristata> so scared
<samuelkadolph> aces1up: array1 & array2 will give you elements only in both arrays
<offby1> aces1up: I'd be tempted to turn them both into Sets, then do a set intersection
<Paradox> just use an &
<aces1up> does that modify the arrays?
<horseman> Aristata: diaf
<Paradox> no
<offby1> hmm, if a is an array, then a & a eliminates duplicates
<Paradox> array1 = array1 & array2
<graspee> Aristata: you seem to neither know nor care what the conventions of the channel are. all you care about is selfishly getting your question answered, no matter who it pisses off. you didn't deserve what banister wrote to you but banister is banister (horseman)
<offby1> a = a & b
<offby1> Paradox: d'oh :)
<aces1up> Paradox thanks.
<Paradox> offby1, a&a delets a whole array i believe
<offby1> just tried it -- it merely eliminates dups
pu22l3r_ has quit [Remote host closed the connection]
pting has quit [Ping timeout: 244 seconds]
imami|afk is now known as banseljaj
<Paradox> ah you're right
<Paradox> thats a useful little code snippet
<offby1> which strongly suggests that it's just doing set intersection under the covers. I imagine the docs say so explicitly but I'm too lazy to read them :)
<aces1up> Paradox your code seems to work for me.
<offby1> I tell ya, "pry" is handier than reading the dcs.
adeponte has quit [Ping timeout: 244 seconds]
<Paradox> yah
<Paradox> cd Array
<Paradox> show-doc &
<Aristata> graspee: There was a downtime of about a hundred people coming and going with no conversation what so ever, fuck off.
billiamii has joined #ruby
<Aristata> If I can catch one I will.
<offby1> been there done that :)
<Paradox> "Set Intersection---Returns a new array containing elements common to the two arrays, with no duplicates."
<offby1> I'd rather read the docs than C code.
<offby1> IT'S LIKE I READ MATZ' MIND!
<Paradox> well thats because matz does things right™
<Paradox> instead of his way (© Guido)
benjammin891 has joined #ruby
<Paradox> freeayu, File.truncate(0)
<Paradox> that reduces the file to 0 bytes
stephenjudkins has joined #ruby
<Paradox> doesnt work on some platforms though
werdnativ has joined #ruby
brianpWins has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
minijupe has joined #ruby
lorandi has quit [Quit: Leaving]
havenn has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
abstrusenick has joined #ruby
minijupe has quit [Client Quit]
Karmaon has joined #ruby
cj3kim has joined #ruby
L-----D has quit [Quit: Leaving]
hunglin has joined #ruby
<Aristata> graspee I am sorry that a line of text makes you so angry, maybe you should go to a therapist or something?
<Aristata> Sorry for the late response, I am knee deep in code.
<bnagy> it's probably more the childish and selfish behaviour that makes people angry
ananthakumaran has quit [Quit: Leaving.]
duder has joined #ruby
c0rn_ has joined #ruby
<Aristata> That's cute/
<Aristata> I am being SO selfish.
quest88 has joined #ruby
ZeroModu_ is now known as zeromodulus
benjammin891 has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
<Aristata> This chat room is SO busy I would hate to spam it more than you guys have by bitching constantly.
<Aristata> dm-paperclip: Top model creates the paths and puts the images in, bottom model does not http://pastie.org/private/abffxtricc4vreaatxyclw
bglusman has joined #ruby
duder has quit [Client Quit]
crankycoder has quit [Remote host closed the connection]
coderhut has joined #ruby
freeayu has quit [Ping timeout: 244 seconds]
bglusman has quit [Ping timeout: 244 seconds]
stephenjudkins has quit [Read error: Connection reset by peer]
h4mz1d has joined #ruby
minijupe has joined #ruby
hamfz_ has joined #ruby
stephenjudkins has joined #ruby
adeponte has joined #ruby
freeayu has joined #ruby
<Aristata> Such riveting conversation in here. Is anyone going to get offended that the silence has been broken?
randym has joined #ruby
<Aristata> No one takes offense huh?
baroquebobcat has joined #ruby
<bnagy> I can definitely see people swarming to help you
williamcotton has quit [Quit: williamcotton]
manizzle has joined #ruby
<bnagy> personally, when I am wondering whether to help someone? First thing I look for - acts like 15 year old, bad attitude, ignores polite requests
<bnagy> if I can't find that, though, I look for questions that are off topic
<Aristata> Sorry I was just telling grasspiss or whatever goodnight, was just about to jump off of here.
<Aristata> You know what I look for?
baroquebobcat has quit [Client Quit]
<horseman> Aristata: "off here" is enough, the "off of" americanism needs to die
<Aristata> Signs that someone has been working 18 hour days for the last five years and don't give a shit about little dicks like you
<Aristata> horseman: Language evolves, deal with it.
<Aristata> Anyway, goodnight fuckers!
Aristata has left #ruby [#ruby]
<horseman> bnagy: new fren
cj3kim has quit [Quit: This computer has gone to sleep]
Markvilla has quit [Quit: Markvilla]
minijupe has quit [Quit: minijupe]
<bnagy> <3
<bnagy> it's the touching moments like that which are all the reward I need for helping out here
rippa has joined #ruby
rdctnst has joined #ruby
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Kwpolska has quit [Read error: Operation timed out]
dhodgkin_ has joined #ruby
Kwpolska has joined #ruby
<horseman> graspee: he called you grasspiss
<horseman> LOL
jmcphers_ has quit [Ping timeout: 256 seconds]
johnduhart has quit [Read error: Operation timed out]
dhodgkin has quit [Read error: Operation timed out]
dhodgkin_ is now known as dhodgkin
<graspee> i block people for a reason
L-----D has joined #ruby
hamfz_ has quit [Ping timeout: 265 seconds]
h4mz1d has quit [Ping timeout: 265 seconds]
<graspee> the reason is so i don't have to read their retarded shit
mattp_ has quit [Read error: Operation timed out]
jmcphers has joined #ruby
mockra has quit [Remote host closed the connection]
heftig has quit [Ping timeout: 245 seconds]
johnduhart has joined #ruby
mattp_ has joined #ruby
jeekl has quit [Ping timeout: 252 seconds]
BRMatt has quit [Read error: Operation timed out]
<grantbdev> MINSWAN
BRMatt has joined #ruby
kiela has quit [Ping timeout: 244 seconds]
eywu has joined #ruby
Aristata has joined #ruby
mikekelly has quit [Ping timeout: 245 seconds]
kiela has joined #ruby
mockra has joined #ruby
hunglin has quit [Quit: Leaving.]
pting has joined #ruby
horseman_ has joined #ruby
mikekelly has joined #ruby
a_a_g has joined #ruby
ananthakumaran has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
horseman has quit [Ping timeout: 252 seconds]
jeekl has joined #ruby
devdazed has quit [Ping timeout: 244 seconds]
pting has quit [Quit: Ex-Chat]
havenn has quit [Remote host closed the connection]
pu22l3r has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
pu22l3r has quit [Remote host closed the connection]
yxhuvud has joined #ruby
pu22l3r has joined #ruby
visof has quit [Read error: Connection reset by peer]
havenn has joined #ruby
suborbital has left #ruby ["getting drunk"]
mockra has quit [Remote host closed the connection]
Soul_Est has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
byronb has quit [Ping timeout: 244 seconds]
nipra has joined #ruby
daniel_hinojosa has quit [Ping timeout: 245 seconds]
a_a_g has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
mikeycgto has quit [Remote host closed the connection]
a_a_g has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
shadoi1 has joined #ruby
nipra has quit [Ping timeout: 252 seconds]
daniel_hinojosa has joined #ruby
Tref has joined #ruby
mockra has joined #ruby
fayimora has joined #ruby
Asher has quit [Read error: Connection reset by peer]
macmartine has quit [Quit: macmartine]
Asher has joined #ruby
ipsifendus has joined #ruby
a_a_g has quit [Ping timeout: 244 seconds]
digitalcakestudi has quit [Ping timeout: 252 seconds]
<ipsifendus> ruby ||= le_sigh :osx_lion
<ipsifendus> anyone using ruby-1.9.3-p125 much?
<ipsifendus> or any 1.9.x branches?
<horseman_> ipsifendus: p194
<ipsifendus> what kind of app?
jitesh_shetty has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
jitesh_shetty has joined #ruby
<horseman_> ipsifendus: command line
devdazed has joined #ruby
Dreamer3 has joined #ruby
jitesh_shetty has quit [Read error: Connection reset by peer]
jitesh_shetty has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
burgestrand has joined #ruby
horseman_ has quit [Remote host closed the connection]
xastion has joined #ruby
Banistergalaxy has joined #ruby
tommyvyo has joined #ruby
ben_alman has quit [Excess Flood]
gtuckerkellogg has joined #ruby
cj3kim has joined #ruby
nipra has joined #ruby
ozy_work has quit [Ping timeout: 252 seconds]
coderhut has quit [Ping timeout: 245 seconds]
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 245 seconds]
a_a_g has joined #ruby
horseman has joined #ruby
macmartine has quit [Quit: macmartine]
r0bby has joined #ruby
axl_ has quit [Quit: axl_]
AndChat| has quit [Ping timeout: 245 seconds]
ben_alman has joined #ruby
burgestrand has quit [Quit: Leaving.]
tonini has joined #ruby
<Paradox> ipsifendus, you were askin somethin?
<Paradox> i used to use p125
<Paradox> then i took an arrow to the knee
<Paradox> now i use p194
<Paradox> 1.9.3
robbyoconnor has quit [Ping timeout: 244 seconds]
<Paradox> grantbdev, GIDSWAD
xastion has quit [Ping timeout: 248 seconds]
gtuckerkellogg has quit [Ping timeout: 244 seconds]
savage- has joined #ruby
JohnBat26 has joined #ruby
nipra has quit [Ping timeout: 244 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
looopy has quit [Remote host closed the connection]
horseman has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
ericcoleman has quit [Quit: leaving]
<bnagy> crap. Anyone know anything about FFI differences between jruby and MRI? On windows?
<bnagy> some methods that use addresses (fixnums) now seem to want pointers etc :/
a_a_g has left #ruby [#ruby]
baroquebobcat has joined #ruby
nipra has joined #ruby
mockra has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
djdb has joined #ruby
skinny_much has joined #ruby
Zolrath has joined #ruby
Zolrath has quit [Client Quit]
cyong has joined #ruby
gtuckerkellogg has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
minijupe has joined #ruby
shtirlic has joined #ruby
DrShoggoth has quit [Quit: Leaving]
yoga has joined #ruby
Helius has joined #ruby
freeayu has quit [Ping timeout: 244 seconds]
negaduck has quit [Quit: negaduck]
ryanf has quit [Quit: leaving]
quest88 has quit [Quit: quest88]
s1n4 has joined #ruby
rking has quit [Quit: bbiaw]
freeayu has joined #ruby
chrxn has quit [Quit: Computer has gone to sleep.]
evoltech has joined #ruby
nignaztic has quit [Quit: WeeChat 0.3.7]
koskoz has joined #ruby
<evoltech> how do I look up ruby functions with ri? am I missing a ruby-doc package or something?
TheFuzzball has quit [Quit: Leaving...]
<evoltech> ri Array#splice
manizzle has quit [Read error: No route to host]
charliesome has joined #ruby
ipsifendus has quit [Quit: ipsifendus]
baroquebobcat has quit [Quit: baroquebobcat]
advorak has joined #ruby
grantbdev has quit [Quit: Leaving]
<bnagy> that would work if splice were a method
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<evoltech> ri Array#slice
savage- has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 244 seconds]
s1n4 has quit [Quit: peace out]
kevinbond has quit [Quit: kevinbond]
yoga has quit [Ping timeout: 244 seconds]
ipoval has quit [Quit: ipoval]
manizzle has joined #ruby
mohits has quit [Ping timeout: 244 seconds]
alextan has joined #ruby
alextan has quit [Client Quit]
alextan has joined #ruby
alextan has quit [Client Quit]
nipra has quit [Ping timeout: 246 seconds]
evoltech has quit [Ping timeout: 265 seconds]
visof has joined #ruby
<visof> Hello
<visof> What is the channel of amazon web services
<Hanmac> it is not this one :P
timonv has quit [Remote host closed the connection]
ryanf has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
looopy has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
yoga has joined #ruby
jeff_sebring has joined #ruby
minijupe has quit [Read error: Connection reset by peer]
minijupe has joined #ruby
chrxn has joined #ruby
eddie has joined #ruby
eddie is now known as Guest68068
koskoz has quit [Ping timeout: 244 seconds]
<Guest68068> i have configured root :to => "Graphter#home" in route of my rails app
randym has quit [Ping timeout: 248 seconds]
<davidcelis> Guest68068: #rubyonrails
<Guest68068> but browser landing at rails index page
Guest68068 is now known as eddie_
<eddie_> davidcelis: yes
<eddie_> i am new to web
senny has joined #ruby
c0rn_ has joined #ruby
<Hanmac> he means that you are in the wrong channel
nilg has joined #ruby
advorak has quit [Remote host closed the connection]
<eddie_> Oops
<eddie_> thanks
mdw has joined #ruby
* Hanmac is going to #rubywithoutrails
krz has joined #ruby
Morkel has joined #ruby
gtuckerkellogg has quit [Ping timeout: 244 seconds]
Liothen has quit [Remote host closed the connection]
Soul_Est has quit [Ping timeout: 246 seconds]
Bonkers has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
<Bonkers> what's the really simple markup gem that converts text to HTML by adding stuff like <p> around paragraphs? I can't find it now, but there's somethign much simpler than textile/redcloth
chrxn has quit [Quit: Computer has gone to sleep.]
EskiMag has joined #ruby
visof has left #ruby ["AndroIRC"]
eywu has quit [Quit: Leaving.]
nipra has joined #ruby
the-newsman has joined #ruby
<the-newsman> hi all
eddie_ has quit [Read error: Connection reset by peer]
<the-newsman> plz tell me the best ruby IDE . i want an editor that helps me in writing ruby programs.
<davidcelis> sublime text 2 or vim
bosphorus has quit [Remote host closed the connection]
<the-newsman> r those for windows or linux ?
<the-newsman> i need windows
<davidcelis> i will respectfully advise against windows
<bnagy> IDEs suck in general, ruby IDEs suck in particular
<bnagy> just use an editor
<davidcelis> and suggest a virtual machine running linux; if you are intent on windows, can't help you
fantazo has joined #ruby
<the-newsman> davidcelis, windows is sueprior in UI. the best ever ide is visual studio editor
<the-newsman> super marverllous
<the-newsman> all linux's sux
<davidcelis> lol...
dhruvasagar has joined #ruby
<rdctnst> linux's... linii?
<the-newsman> lenin
chrxn has joined #ruby
<the-newsman> stalin
AxonetBE has joined #ruby
xiaotian has quit [Quit: Computer has gone to sleep.]
<the-newsman> anyway. is there Good IDE for ruby under windows ?
<davidcelis> no
<rdctnst> no
<billiamii> rubymine is ok, not great.
<davidcelis> because there are no good IDEs
becomingGuru has joined #ruby
jprovazn_away is now known as jprovazn
<davidcelis> rubymine kinda blows
<rdctnst> ^+1
<davidcelis> it's clunky and slow
randym has joined #ruby
<davidcelis> and bloated
nilg` has joined #ruby
<rdctnst> kinda like windows
<becomingGuru> I am learning Ruby and know Python very well. Which is a good detailed reference?
<Hanmac> you could use eclipse for ruby
Karmaon has quit [Ping timeout: 265 seconds]
<davidcelis> becomingGuru: The Well Grounded Rubyist is a good book
<the-newsman> Hanmac i know. however i wish to use specialy made ruby editor
<abstrusenick> david black?
<bnagy> becomingGuru: ruby-doc.org
<the-newsman> eclipse is general purpose editor
<davidcelis> and yes, the docs, of course
<davidcelis> abstrusenick: yes, David Black
subbyyy has quit [Quit: Leaving.]
wilmoore has quit [Remote host closed the connection]
<Hanmac> the-newsman: so you want an editor for every language you want to learn???¿
<Hanmac> i mean for every language an extra editor??
<bnagy> I thought someone was doing a ruby plugin for VS
<bnagy> I never looked into it though cause VS makes my teeth ache
<davidcelis> Hanmac: why not? sounds legit bro
abstrusenick has quit [Quit: abstrusenick]
<bnagy> the-newsman: you should google for that
<the-newsman> Hanmac why not ?
<bnagy> otherwise, tbf, you got no chance, especially on windows
<Hanmac> bnagy there was ironruby, but microsoft drop the suport
<bnagy> I have an OK toolchain but it's gvim and commandline git
<the-newsman> does not it worth ruby to have its own IDE
<graspee> i got criticised for it, but i like geany for ruby editing and it works in windows too
<the-newsman> not just an editor but full IDE
nilg` has quit [Remote host closed the connection]
prtksxna has joined #ruby
<davidcelis> the-newsman: vim
<graspee> it gives you a list of methods bookmarked at the side of your code
<bnagy> Hanmac: yeah, I thought tre was a generic plugin though, could be mistaken
<the-newsman> vim is udner linux
<davidcelis> the-newsman: indeed it is! linux is simply a better OS to develop ruby on
abstrusenick has joined #ruby
<bnagy> there is vim for windows
<Hanmac> the-newsman: why do you want an own ide, when eclise can do everything you want?
<bnagy> gvim, no less
<davidcelis> the-newsman: windows may be great for C++ and such, but for most languages... no
<the-newsman> is vim special IDE for ruby ?
<davidcelis> lol
<bnagy> no it's a general purpose editor
<the-newsman> windows is great for VBasic, C# as well
<the-newsman> java has its own IDE
minijupe has quit [Quit: minijupe]
<davidcelis> why do you need an IDE
<the-newsman> i think perl, python and ruby r less important than other lanf
<the-newsman> davidcelis, simply,m to help me . that is the general purpose of any IDE
<Hanmac> i think the most problem is that ruby is to dynmaic to use it good in a IDE
<davidcelis> the-newsman: if you think they are less important, then why are you bothering?
<davidcelis> the-newsman: if you think ruby is less important than other languages, go back to those other languages. don't waste your time.
evoltech has joined #ruby
<bnagy> the-newsman: java, c++ etc etc have IDEs because there are huge amounts of template boring code that needs to be included to get stuff to work
<the-newsman> davidcelis then why did not its creator create suitable IDE for it ?
<bnagy> dynamic languages don't have that problem as much
<davidcelis> the-newsman: Why create something you think is unnecessary?
<the-newsman> C language had many companies who fabriate IDE.
<bnagy> so really, all an IDE brings to the table are frames
<davidcelis> the-newsman: you dont need an IDE to program
<the-newsman> Boralnd C. Turbo C. Quick C,. etc
<the-newsman> davidcelis, i do not think Mi9orsoft r stupid to make useless IDE for C++
<Hanmac> yeah ... yetanother stuff that does not work in genneral
<davidcelis> this has to be a troll
mockra_ has joined #ruby
<davidcelis> i refuse to believe otherwise
<davidcelis> 9/10, excellent troll
mockra has quit [Remote host closed the connection]
<the-newsman> i am downlaoding ironruby. thanx Hanmac
<Hanmac> the-newsman: you mean this microsoft that drop the C++ compiler out of ther studio?
maesbn has joined #ruby
fserb has joined #ruby
<bnagy> the-newsman: ironruby is dead
evoltech has quit [Ping timeout: 245 seconds]
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
Banistergalaxy has joined #ruby
<Paradox> you probably dont need a full IDE anyway
<Paradox> try SublimeText2
<Paradox> its got a lot of nice features
<Paradox> and i can promise its faster than any IDE
<bnagy> Paradox - the guy who never reads scrollback, EVER ;)
<Paradox> nope
<Paradox> i drive-by comment
<Paradox> i have 3 networks open
<the-newsman> ok Paradox
<Paradox> and 60+ chans
Karmaon has joined #ruby
<the-newsman> ohhh !
Helius has quit [Ping timeout: 245 seconds]
<Paradox> ST2+packages=better than any ide
zaychenok has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<davidcelis> ಠ_ಠ
zaychenok has quit [Client Quit]
rdctnst has quit [Quit: Leaving]
zaychenok has joined #ruby
gilead has joined #ruby
schovi has joined #ruby
jbpros_ has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
wilmoore has joined #ruby
sgronblom has quit [Quit: leaving]
banseljaj is now known as imami|afk
bluOxigen has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
ph^ has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
EskiMag has quit [Quit: EskiMag]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
evoltech has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
khakimov has joined #ruby
mdw has quit [Remote host closed the connection]
overmind667 has joined #ruby
jbpros_ has quit [Quit: jbpros_]
ph^_ has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
ph^ has quit [Ping timeout: 248 seconds]
MissionCritical has quit [Ping timeout: 240 seconds]
c0rn_ has quit [Quit: Computer has gone to sleep.]
looopy has quit [Remote host closed the connection]
abionic has joined #ruby
r0bby is now known as robbyoconnor
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
billiamii has quit [Quit: Leaving]
Karmaon has quit [Ping timeout: 265 seconds]
allanm has quit [Read error: Connection reset by peer]
evoltech has quit [Read error: Connection reset by peer]
robozahn has joined #ruby
Occult has quit [Ping timeout: 245 seconds]
graspee has quit [Ping timeout: 240 seconds]
Occult has joined #ruby
Occult has quit [Max SendQ exceeded]
Xethron has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
randym has quit [Remote host closed the connection]
zaychenok has joined #ruby
Occult has joined #ruby
werdnativ has quit [Quit: FAMOUS_LAST_WORDS is nil]
zommi has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
Helius has joined #ruby
mikepack has quit [Remote host closed the connection]
MissionCritical has joined #ruby
<Xethron> Heya, I know nothing about Ruby. Trying to work on a script here and add a MySQL connect. Its a class file, and I've tested my MySQL code in a normal rb file, and it works perfectly. But as soon as I add it to the class file, I don't think the method gets my "my" MySQL variable. I have found out if I put everything in the method, it does, but as this thing will run a few times a second,
havenn has quit [Ping timeout: 248 seconds]
<Xethron> its not very effective
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
jbpros_ has joined #ruby
<Xethron> so in the initialize method I got my = Mysql::new(my_host, my_user, my_pass, my_db)
Eldariof-ru has joined #ruby
arturaz has joined #ruby
<Xethron> but when I try to use it in another method, it doesnt work
<Xethron> I tried chanigin it to $my and @my and @@my..... but yeah
<Xethron> Not sure how to pas a a var to another method
<Xethron> should I move it to the main class? or how do I get it public?
chrxn has quit [Quit: Computer has gone to sleep.]
the-newsman has left #ruby [#ruby]
robozahn has quit [Ping timeout: 252 seconds]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
randym has joined #ruby
CheeToS has quit [Ping timeout: 248 seconds]
tvw has quit [Remote host closed the connection]
maesbn has quit [Ping timeout: 240 seconds]
ephemerian has joined #ruby
<yoga> anyone ever using twitter gems on ruby on rails?
<Hanmac> yoda you asking in the wrong channel
Occult has quit [Ping timeout: 244 seconds]
<yoga> oh i'm sorry
jimeh2 has joined #ruby
EskiMag has joined #ruby
yoga has left #ruby ["Leaving"]
maesbn has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
dhruvasagar has quit [Ping timeout: 265 seconds]
<Xethron> meh :/
<Xethron> no one around?
fantazo has quit [Remote host closed the connection]
kapowaz has joined #ruby
MetaCosm has joined #ruby
emmanuelux has joined #ruby
mayankkohaley has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
impomatic has joined #ruby
zaychenok has joined #ruby
pu22l3r has quit [Ping timeout: 265 seconds]
wilmoore has quit [Remote host closed the connection]
bglusman has joined #ruby
zz_chrismcg is now known as chrismcg
BiHi has joined #ruby
jenglish has joined #ruby
avandendorpe has joined #ruby
blacktulip has joined #ruby
anildigital_work has joined #ruby
[Neurotic] has quit [Quit: Leaving]
relix has joined #ruby
cesario has joined #ruby
moeSeth has joined #ruby
bglusman has quit [Ping timeout: 244 seconds]
timonv has joined #ruby
overmind667 has quit [Ping timeout: 240 seconds]
impomatic is now known as john_metcalf
MoMo has joined #ruby
mockra_ has quit [Remote host closed the connection]
si14 has joined #ruby
Gavilan has left #ruby [#ruby]
skinny_much has quit [Quit: Colloquy for iPod touch - http://colloquy.mobi]
EzeQL has quit [Ping timeout: 249 seconds]
robotmay has joined #ruby
eurbach has joined #ruby
<Xethron> Anyone around?
EzeQL has joined #ruby
qwerxy has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
pp01bit has joined #ruby
hemanth has joined #ruby
_md has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
<dagobah_> Quick one, can I turn `if (params[:foo] == "foo" || params[:foo] == "bar)` into something that calls params[:foo] once?
etehtsea has joined #ruby
Gm4n has quit [Ping timeout: 245 seconds]
coderhut has joined #ruby
cj3kim has joined #ruby
jagira has joined #ruby
cyong has quit [Quit: Leaving.]
jagira has quit [Client Quit]
<bigkevmcd> dagobah_: ["foo", "bar"].include?(params[:foo])
Synthead has quit [Quit: p33 ba115]
<dagobah_> perfect, thanks bigkevmcd
coderhut has quit [Quit: Page closed]
<Xethron> Dont know much about Ruby. Trying to add MySQL support to a class file. My MySQL code works perfectly in a standard one file script, but not in this class. I don't think the method gets my "my" MySQL variable, becayse if I put everything in the method, it works, but thats not very effective.
coderhut has joined #ruby
<Xethron> In the initialize method I got: my = Mysql::new(my_host, my_user, my_pass, my_db)
nilg` has joined #ruby
<Xethron> In my second method I got: my.query("INSERT INTO invites (`email`, `key`, `parent`) VALUES ('" + email + "','" + key + "','" + $user + "')")
andrewhl has quit [Remote host closed the connection]
fixl has joined #ruby
<Xethron> I tried chanigin it to $my and @my and @@my. Not sure how to pas a var to another method. Should I move it to the main class? Or how do I get it public?
zaychenok has quit [Ping timeout: 265 seconds]
<bigkevmcd> Xethron: you're defining my as a local variable...you probably want it as @my = ...
<bigkevmcd> Xethron: oh, and your SQL is insecure, look at preparing statements
qwerxy has quit [Quit: offski]
nilg` has quit [Read error: Connection reset by peer]
<Xethron> bigkevmcd: I have tried @my, still doesn't work :/
<Xethron> let me try it again.
<bigkevmcd> Xethron: paste your code to gist.github.com
<Xethron> What you mean by Insecure?
ryanf has quit [Quit: leaving]
banisterfiend has joined #ruby
john_metcalf has quit [Quit: http://RetroProgramming.com]
<Xethron> shot, gimme a min
<banisterfiend> show-source Xethron
coderhut has quit [Quit: Page closed]
<Nitrodist> lol banisterfiend what are you referring to?
cj3kim has quit [Quit: This computer has gone to sleep]
<banisterfiend> Nitrodist: trying to view his source code
Gm4n has joined #ruby
Gm4n has quit [Changing host]
Gm4n has joined #ruby
GeekOnCoffee has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
randym has quit [Remote host closed the connection]
<Nitrodist> yeah, is there a specific thing you're referring to or did you just make that up
<banisterfiend> Nitrodist: can i view yours too pls
<banisterfiend> Nitrodist: it's pry syntax :)
ravee has joined #ruby
<Nitrodist> there we go
nilg` has joined #ruby
mdw has joined #ruby
Vainoharhainen has joined #ruby
robozahn has joined #ruby
rob_ has joined #ruby
<rob_> hi
qwerxy has joined #ruby
qwerxy has quit [Client Quit]
roolo has joined #ruby
Guest20110 has joined #ruby
<rob_> if you have two versions of ruby installed on a system (for example in debian precise i have 1.8 and 1.9 installed, 1.8 being /usr/bin/ruby) what is the recommended way to use the second ruby installation (in this case: 1.9) for my apps?
L-----D has quit [Quit: Leaving]
<rob_> some system packages depend on 1.8 so i can't just remove it
manizzle has quit [Read error: No route to host]
<bnagy> use rbenv
<bnagy> or rvm if you must
<rob_> bnagy: ok, it's not possible to do it without rbenv though?
simao has joined #ruby
c0rn_ has joined #ruby
<bnagy> it is
<bnagy> but you'd just end up writing rbenv
<rob_> ok, thanks :)
<bnagy> you can compile from source and then link to the binaries
<banisterfiend> bnagy: have you heard of rbfu?
<Nitrodist> bnagy: woah, I think I have a good name for that
c0rn_ has quit [Client Quit]
<banisterfiend> bnagy: apaprently it's even more lightweight than rbenv
<Nitrodist> I'll call it the mvr - manager of versions of ruby
<Hanmac> rob_ you could also change the bin/ruby with update-alternatives --config ruby
federic has joined #ruby
<banisterfiend> Hanmac: hello und :)
d3vic3 has quit [Ping timeout: 246 seconds]
<rob_> Hanmac: i cant do that due to system packages..
<rob_> thanks for the advice dudes
cyong has joined #ruby
<bnagy> the only thing system ruby is good for on debian is.. wait nothing
<rob_> bnagy: puppet relies on it
<rob_> in our environment
<bnagy> unless you use rvm then you need system ruby to bootstrap
d3c has quit [Quit: Quit]
<Hanmac> bnagy that is not so true ... in the next debian/ubuntu the default ruby is changed to 1.9*
graspee has joined #ruby
burgestrand has joined #ruby
<bnagy> yeah? It's not even installed by default on xubuntu
d3vic3 has joined #ruby
<bnagy> they'll probably use 1.9.1 or something though
simao_ has quit [Ping timeout: 265 seconds]
<rob_> there isn't really a way around it being a dependency
Kn|t3 has joined #ruby
jbpros_ has quit [Quit: jbpros_]
<Hanmac> bnagy i said in the NEXT ... not in the current
TPFC-SYSTEM has joined #ruby
randym has joined #ruby
<bnagy> what's more next than quantal?
bosphorus has joined #ruby
<Hanmac> yeah in quantal ... the ruby-defaults package points now to ruby1.9
<bnagy> which is great, but I bet they'll still fuck it up and use an old 1.9 version
pk1001100011 has joined #ruby
<bnagy> I have about as much faith in ubuntu ruby packages as I have in the linux kernel dev team
heftig has joined #ruby
<Xethron> bigkevmcd: Thanks, I got it working with your info :D
overmind667 has joined #ruby
<Xethron> banisterfiend: sorry, no need to anymore :P
graspee has quit [Ping timeout: 246 seconds]
francisfish has joined #ruby
graspee has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
<Hanmac> bnagy currently its 1.9.3.194-1, wich is the latest ruby
anildigital_work has quit [Remote host closed the connection]
kapowaz has quit [Remote host closed the connection]
avandendorpe has quit [Read error: Connection reset by peer]
si14 has quit [Remote host closed the connection]
relix has quit [Remote host closed the connection]
moeSeth has quit [Remote host closed the connection]
cesario has quit [Remote host closed the connection]
MetaCosm has quit [Write error: Connection reset by peer]
MoMo has quit [Write error: Connection reset by peer]
<banisterfiend> Hanmac: hey i just bought diablo 3, wanna play against me?
fserb has quit [Quit: ttyl]
MetaCosm has joined #ruby
fserb has joined #ruby
fserb has quit [Client Quit]
Shrink has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
d3vic3 has quit [Read error: Connection reset by peer]
horseman has joined #ruby
<Hanmac> dont buy it
d3vic3 has joined #ruby
saschagehlich has joined #ruby
<Xethron> lol
MoMo has joined #ruby
anildigital_work has joined #ruby
kapowaz has joined #ruby
ravee has left #ruby [#ruby]
iocor has joined #ruby
relix has joined #ruby
iocor has quit [Changing host]
iocor has joined #ruby
avandendorpe has joined #ruby
cesario has joined #ruby
dekroning has joined #ruby
<shevy2> lol
rob_ has left #ruby [#ruby]
ph^_ has quit [Remote host closed the connection]
si14 has joined #ruby
ph^ has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
neurotech has joined #ruby
Shrink has joined #ruby
ph^ has quit [Ping timeout: 244 seconds]
wubino has joined #ruby
<wubino> What is the best flickr library?
moeSeth has joined #ruby
tatsuya_o has joined #ruby
jeff_sebring has joined #ruby
DrForr has joined #ruby
tvw has joined #ruby
qwerxy has joined #ruby
d3c has joined #ruby
randym has quit [Remote host closed the connection]
shadoi1 has quit [Quit: Leaving.]
overmind667 has quit [Ping timeout: 245 seconds]
shadoi has joined #ruby
d3vic3 has quit [Ping timeout: 252 seconds]
d3vic3 has joined #ruby
skinny_much has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
adeponte has quit [Remote host closed the connection]
mfridh has joined #ruby
pp01bit has quit [Remote host closed the connection]
shadoi has quit [Ping timeout: 252 seconds]
john_metcalf has joined #ruby
Ammar01 has joined #ruby
niklasb has joined #ruby
[Neurotic] has joined #ruby
ph^ has joined #ruby
cyong has quit [Quit: Leaving.]
skinny_much has left #ruby [#ruby]
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
prtksxna has quit [Ping timeout: 246 seconds]
prtksxna has joined #ruby
red-panda has joined #ruby
gianlucadv has joined #ruby
tonini has quit [Remote host closed the connection]
shevy2 has quit [Ping timeout: 244 seconds]
perryh is now known as perryh_away
LnL_ has joined #ruby
apeiros_ has joined #ruby
DuoSRX has joined #ruby
<horseman> apeiros_: haha, ever seen something like this b4? https://github.com/pry/pry/issues/595
<apeiros_> oh my, spam on github
kvirani has joined #ruby
<apeiros_> I really want to have electrocution as penalty for that…
kvirani has quit [Remote host closed the connection]
<heftig> it's for boosting pagerank, i guess
burgestrand has quit [Quit: Leaving.]
neurotech has quit [Remote host closed the connection]
neurotech has joined #ruby
dhruvasagar has joined #ruby
flype has joined #ruby
gianlucadv has quit [Quit: ZNC - http://znc.sourceforge.net]
jimeh2 is now known as jimeh
jitesh_shetty has quit [Ping timeout: 244 seconds]
Criztian has joined #ruby
jitesh_shetty has joined #ruby
gianlucadv has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
eurbach has quit [Quit: Leaving.]
overmind667 has joined #ruby
becomingGuru1 has joined #ruby
becomingGuru has quit [Ping timeout: 246 seconds]
TheRealPygo has quit [Quit: leaving]
jitesh_shetty has quit [Ping timeout: 244 seconds]
pygospa has joined #ruby
Siphonblast2 has quit [Quit: Leaving]
<apeiros_> heftig: hm, I wonder whether github adds to nofollow meta to spoil such efforts…
cantonic_ has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
Shrink has quit [Ping timeout: 244 seconds]
klj613 has joined #ruby
<klj613> i got lib/room.rb and test/test_room.rb -- within test_room.rb i got --> require_relative '../lib/room' <-- i also tried using the .rb extension doesnt work
Kn|t3 has quit [Quit: Kn|t3]
robozahn has quit [Quit: leaving]
graspee has quit [Quit: leaving]
<klj613> nm, done
<Hanmac> klj613 what was your error?
<klj613> something basic. on one file i had '.vb' as couple weeks ago i had to do a .net project -.-
<klj613> and im new to ruby... so habbit kicked in
freeayu has quit [Ping timeout: 252 seconds]
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
kungfoo has joined #ruby
jitesh_shetty has joined #ruby
kungfoo has left #ruby [#ruby]
freeayu has joined #ruby
kungfoo has joined #ruby
kungfoo has quit [Client Quit]
alerticus has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
Shrink has joined #ruby
liluo_ has quit [Read error: Connection reset by peer]
Drewch has quit [Ping timeout: 246 seconds]
BiHi has quit [Quit: Computer has gone to sleep]
robozahn has joined #ruby
liluo has joined #ruby
d3vic3 has quit [Quit: leaving]
d3c has quit [Quit: Sleep]
freeayu has quit [Ping timeout: 240 seconds]
Beoran_ has joined #ruby
<klj613> i keep getting "cannot load such file -- zlib" for trying to install gems or "gem update --system" etc
<klj613> i installed zlib via rvm and via apt-get
Beoran4 has quit [Ping timeout: 244 seconds]
lolmaus has joined #ruby
zinjacoder has joined #ruby
lolmaus has quit [Client Quit]
<Hanmac> klj613 you need to install zlib and zlib-dev before you install rvm
[Neurotic] has quit [Quit: ttyl!]
lolmaus has joined #ruby
<klj613> so reinstall rvm
<Hanmac> i think thats the best way
freeayu has joined #ruby
liluo has quit [Remote host closed the connection]
AxonetBE has quit [Quit: Leaving.]
AxonetBE has joined #ruby
AxonetBE has quit [Client Quit]
Guest20110 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
AxonetBE has joined #ruby
AxonetBE has quit [Client Quit]
NimeshNeema has joined #ruby
LnL_ has quit [Quit: Leaving]
abstrusenick has quit [Quit: abstrusenick]
<nightzpy> anybody help me? http://pastie.org/4085564
jbw_ has quit [Read error: Operation timed out]
TaTonka has quit [Quit: ZNC - http://znc.sourceforge.net]
abstrusenick has joined #ruby
red-panda has quit [Remote host closed the connection]
red-panda has joined #ruby
Axsuul has quit [Ping timeout: 248 seconds]
gogiel has quit [Ping timeout: 250 seconds]
frishi has joined #ruby
d3vic3 has joined #ruby
TaTonka has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
gilead_ has joined #ruby
gilead has quit [Ping timeout: 240 seconds]
enroxorz has joined #ruby
<enroxorz> hey guys, whats the best way to release a gem I have to a exe?
jbw_ has joined #ruby
AxonetBE has joined #ruby
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
yugui is now known as yugui_zzz
A124 has joined #ruby
A124 has left #ruby [#ruby]
nfk has joined #ruby
prtksxna has joined #ruby
prtksxna_ has quit [Read error: Connection reset by peer]
cezar has joined #ruby
cezar has quit [Client Quit]
iori has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
nfk has quit [Quit: yawn]
ddv has quit [Ping timeout: 245 seconds]
bglusman has joined #ruby
sleetdrop has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
becomingGuru1 has quit [Quit: Leaving.]
becomingGuru has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
bglusman has quit [Ping timeout: 244 seconds]
wmoxam has joined #ruby
Nitrodist has quit [Quit: leaving]
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
bluenemo has quit [Ping timeout: 252 seconds]
mayankkohaley has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
<zii> How do enumerators/yielders distinguish between next and break calls in the block?
<apeiros_> they don't
<apeiros_> with break, the invoked method never gets control back
dhruvasagar has joined #ruby
<zii> break returns from method that yielded?
<ohcibi> is there only one include-call per class allowed?
<apeiros_> zii: yes
<zii> I see, nice.
<apeiros_> try (e.g. in irb): def foo; yield; puts "after yield"; end; foo { puts "inside yield"; break }
<apeiros_> the "after yield" is never printed, as foo doesn't regain control.
<apeiros_> ohcibi: no, you can include as often as you want.
saidin_ has joined #ruby
digitalcakestudi has joined #ruby
zeroXten has quit [Read error: Operation timed out]
<ohcibi> apeiros_: i see.. i tried to include a basic module, but i just get an undefined method error: http://pastie.org/4085778
tommyvyo has joined #ruby
mohits has quit [Quit: Leaving]
nanderoo has joined #ruby
<apeiros_> ohcibi: that code works fine
<ohcibi> apeiros_: you created an instance of user, right?
<apeiros_> ohcibi: no, why should I?
zeroXten has joined #ruby
<ohcibi> i thought you tried it out?
<apeiros_> you said you got an error with *that* code, and that code doesn't have User.new in it.
<ohcibi> true
<ohcibi> i meant when try to access User.fancy i get that error
<apeiros_> of course you do. fancy is an instance method of User, not a class method
<apeiros_> User.new.fancy should work
<ohcibi> apeiros_: yea i just found that out, i tried def self.fancy before because i wanted a class method, but that doesnt work
SeanTAllen has joined #ruby
<ohcibi> (def self.fancy ....)
<apeiros_> ohcibi: read up on include vs. extend
<apeiros_> you want extend Other, not include Other
itnomad has quit [Quit: Leaving]
<ohcibi> apeiros_: thx
bluenemo has joined #ruby
vitoravelino`afk has quit [Ping timeout: 265 seconds]
vitoravelino`afk has joined #ruby
BiHi has joined #ruby
krz has quit [Quit: krz]
jcromartie has joined #ruby
<klj613> i started a ruby web serv via cli. closed it. now port 4567 is in use. how do i clear?
<apeiros_> lsof -i, check what app uses that port, kill it.
krz has joined #ruby
nipra has quit [Ping timeout: 248 seconds]
mayankkohaley has joined #ruby
geekbri has joined #ruby
ciopte7 has quit [Quit: ciopte7]
prtksxna_ has quit [Remote host closed the connection]
williamcotton has joined #ruby
`brendan has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<_br_> /exit
<_br_> Sorry for that.
krusty_ar has joined #ruby
<klj613> apeiros_: thanks
<apeiros_> klj613: btw., `lsof -i:4567` if you don't want to grep
<apeiros_> oh my, I'm writing on of those super-ugly method_missing's :-S
grendlme has joined #ruby
Progster has joined #ruby
pu22l3r has joined #ruby
wvdschel has joined #ruby
wvdschel has quit [Changing host]
wvdschel has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
ken_barber has joined #ruby
nipra has joined #ruby
pu22l3r has quit [Remote host closed the connection]
pu22l3r has joined #ruby
nipra has quit [Read error: Connection reset by peer]
jcromartie has quit [Read error: Connection reset by peer]
neurotech has quit [Remote host closed the connection]
sspiff has quit [Ping timeout: 244 seconds]
clockwize has joined #ruby
frishi has quit [Quit: Leaving...]
frishi has joined #ruby
frishi has quit [Client Quit]
<Xethron> I'm building an IRC bot, and I want to check something 1 min after someone joins, but the script shouldn't halt. How can I set up a timer like that?
<bnagy> about a million ways
<Xethron> bnagy, most effective :P
<bnagy> build it on an evented framework
* Progster agrees with bnagy
krz has quit [Quit: krz]
<Xethron> Hmm, you don't maybe have a link to an example?
<Progster> you can whip it up yourself, with just a regular producer/consumer queue, where the tcp stream parses input and then converts them to events that are posted on the queue. Your consumer then consumes the events and does what action is needed. You can set up a "delay" event which when the consumer inspects it, if the time hasn't elapsed yet, it just places it back on the queue
<Xethron> oooh, ok
jeff_sebring has joined #ruby
<bnagy> a Queue is definitely the easy place to start if you want to build from scratchj
<bnagy> threadsafe
<Xethron> Yes, I need something that isn't resource intensive
<bnagy> then in whatever run loop you have you can just check the queue to look for work, otherwise process as usual
<bnagy> well I don't think an IRC bot is going to tax your system
<Xethron> bnagy, thanks :)
<bnagy> you should still build it on an event framework or something though, it will save rewriting it in a month
<Xethron> bnagy, shouldn't yes :P unless I do something wrong heh
<Xethron> ok, will do
tommyvyo_ has joined #ruby
<Progster> unless you want to learn how to make an eventing framework
<Progster> I think it's a good exercise to go through personally
grendlme has quit [Quit: grendlme]
<Xethron> Progster, if you have a link to a tutorial or example I can check it out
grendlme has joined #ruby
digitalcakestudi has quit [Ping timeout: 244 seconds]
grendlme has quit [Client Quit]
grendlme has joined #ruby
Kn|t3 has joined #ruby
wangr has joined #ruby
carloslopes has joined #ruby
subbyyy has joined #ruby
<Xethron> Progster - bnagy: I found this: http://www.tutorialspoint.com/ruby/ruby_multithreading.htm
<Xethron> If I use the threads with a simple sleep, it should work perfectly not true?
mucker has joined #ruby
<Xethron> I mean, its really not that hard....
jeffreybaird has joined #ruby
d3vic3 has quit [Ping timeout: 240 seconds]
subbyyy has quit [Client Quit]
nipra has joined #ruby
zomgbie has quit [Ping timeout: 244 seconds]
d3vic3 has joined #ruby
sbinetd has joined #ruby
workmad3 has joined #ruby
zaychenok has joined #ruby
tcopp has joined #ruby
looopy has joined #ruby
sbanwart has joined #ruby
hemanth2 has joined #ruby
jgarvey has joined #ruby
gogiel has joined #ruby
cek has joined #ruby
enriclluelles has joined #ruby
<cek> how do you wrap a method prematurely?
sepp2k has joined #ruby
Konboi has quit [Remote host closed the connection]
<cek> that is, while method is undefined yet, alter its behaviour so that when it would get defined later, the first version will be invoked
lewis1711 has joined #ruby
<cek> seems like impossible task to me
Morkel has quit [Quit: Morkel]
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
hynkle has joined #ruby
AxonetBE has left #ruby [#ruby]
Mon_Ouie has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
snearch has joined #ruby
<lewis1711> how do I map between two files? like for each line in file b, I want to run a string transformation then write the transformed result to file b
<lewis1711> http://pastebin.com/MRubs8qu I have that so far
sbinetd has quit [Remote host closed the connection]
tk has joined #ruby
tk is now known as Guest7650
abionic has quit [Ping timeout: 246 seconds]
abionic has joined #ruby
nari has joined #ruby
cjs226 has quit []
nopolitica has joined #ruby
enroxorz has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
lewis1711 has left #ruby [#ruby]
chson has quit [Remote host closed the connection]
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
mvangala has joined #ruby
nari has quit [Read error: Connection reset by peer]
nari has joined #ruby
bglusman has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
abionic has quit [Ping timeout: 246 seconds]
lewis1711 has joined #ruby
lewis1711 has left #ruby [#ruby]
lewis1711 has joined #ruby
jcromartie has joined #ruby
akem has quit [Ping timeout: 245 seconds]
<JonnieCache> lewis1711: looked at your code
shtirlic has quit [Read error: Connection reset by peer]
<JonnieCache> you should just be able to write the return value from convert() into a new file
shtirlic has joined #ruby
<JonnieCache> open a file before the loop, then just write() into that file
jcromartie has quit [Remote host closed the connection]
Kn|t3 has quit [Quit: Kn|t3]
<JonnieCache> making sure that a linebreak ends up on the end of each line
Markvilla has joined #ruby
<lewis1711> JonnieCache: ah that's simple, thanks
<lewis1711> found an error though
red-panda has quit [Remote host closed the connection]
<lewis1711> http://pastebin.com/hjkKhqS3 as soon as I get to an empty line I get a nil no method error
chimkan has joined #ruby
zaychenok has quit [Ping timeout: 248 seconds]
red-panda has joined #ruby
<JonnieCache> where is the error thrown
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<JonnieCache> im guessing line 2
<lewis1711> ctojavautil.rb:2:in `convert': undefined method `split' for nil:NilClass (NoMethodError)
<lewis1711> yeap
<JonnieCache> ah well that means gsub! is returning nil
<JonnieCache> and youre trying to call split on nil
<JonnieCache> so you either need to tweak the regex so it doesnt return nil in that scenario
AxonetBE has joined #ruby
<AxonetBE> how to check an array is empty? Because I do @brans.empty? but this is doing a count query
<lewis1711> ahh
<JonnieCache> or put some conditional in so it doesnt try and call split
<lewis1711> JonnieCache: did not occur to me about gsub doing it
<lewis1711> thanks
rob_ has joined #ruby
<JonnieCache> basically when you see "no method error on nil" look for the method that wasnt found
<JonnieCache> and work out where it is being called
<JonnieCache> that object will then be nil, and oyu have to work out what is returning nil when it shouldnt be
<chimkan> hi
<rob_> hi, in ubuntu i can install ruby 1.8 and 1.9, can i use rbenv to control which one is used or do i have to install ruby under rbenv?
<JonnieCache> the second one
<JonnieCache> rbenv switches between its own rubies
<rob_> so even though it can see them when i do 'rbenv alternatives', it can't actually create shims for them?
<JonnieCache> you should probably uninstall the ubuntu ones and just rely on rbenv
becomingGuru has quit [Quit: Leaving.]
<JonnieCache> oh can it? i might be misinformed then. its not how its supposed to work anyway
<chimkan> I'm trying to transform a nested form in Rails into multiple image uploader, but I can't figure out how to transform the form to accept multiple upload and showing all the images
<rob_> JonnieCache: i at least require 1.8 as a dependency for some package..
<JonnieCache> ahhh
Enekoos has joined #ruby
<JonnieCache> well you can run them separately, you just have to make sure your code is always pointing at the correct one
<lewis1711> http://www.ruby-doc.org/core-1.9.3/File.html why are the each and write methods not there? :(
<JonnieCache> or you will have mad problems with gems not showing up and such
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
<JonnieCache> and you will be miserable and confused
<JonnieCache> lewis1711: File inherits all those methods from IO
<JonnieCache> lewis1711: click IO on the left there
Ducklings has joined #ruby
`brendan has joined #ruby
wvdschel has quit [Ping timeout: 244 seconds]
<rob_> JonnieCache: hmm, what about gems?
<rob_> i suppose as long as i call the correct binary it'll look in the right path?
explody has quit [Remote host closed the connection]
explody has joined #ruby
<JonnieCache> rob_: its more about the GEM_PATH and GEM_HOME environemnt variables
<JonnieCache> which are in turn set by other things
<JonnieCache> i dont quite understand how it all fits together tbh
rippa has quit [Quit: derp herp]
<JonnieCache> because when you ssh in, some of the env vars get lost, and the same happens when you sudo
<JonnieCache> so you have to be careful
Kn|t3 has joined #ruby
BlasterBlade has joined #ruby
alcy has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<alcy> folks, why does this happen : a = "foo"; b = a; b << "\n"; print a; --> prints a with a new line
<workmad3> alcy: because you have a single string object "foo" and 2 references to the same object in both a and b
<workmad3> alcy: and the b << "\n" modifies the object
heisenmink has joined #ruby
<alcy> workmad3: ok, just wanted to know if indeed i was dealing with references, thx
<heisenmink> how do i include all methods from a class? and not just from a module
<phreax> no
wmoxam has quit [Ping timeout: 252 seconds]
Ducklings has quit [Remote host closed the connection]
BlasterBlade has left #ruby [#ruby]
<apeiros_> heisenmink: what do you mean, "include methods from a class"?
<workmad3> yeah, all variables in ruby are references (some are special types of reference, such as with fixnums and symbols)
dv310p3r has joined #ruby
<apeiros_> you can't include a class…
BlasterBlade has joined #ruby
<heisenmink> apeiros_, like "include module" but I want a method from a class available in this class
<phreax> u can only include modules into a class
chimkan__ has joined #ruby
<apeiros_> heisenmink: nocando
<workmad3> heisenmink: you can only include modules, you can inherit from classes
<phreax> then u need to inherit from that class :P
jrist-afk is now known as jrist
<workmad3> heisenmink: and inheritance is a very strong semantic link, so you shouldn't use it just to get a method for convenience
<heisenmink> how do I add a method from another class into the current class then?
<heisenmink> just one
roams has joined #ruby
<apeiros_> you. can't. do. that.
<heisenmink> Yes I can
<workmad3> heisenmink: no, you can't
<heisenmink> I can probably define a method on this class that calls the method on the other class
<heisenmink> which is a solution
<alcy> workmad3: is there a doc explaining the expected behavior wrt references ?
<heisenmink> and I am looking for any solutions
<workmad3> heisenmink: that's not adding a method from another class
BlasterBlade has quit [Quit: Konversation terminated!]
<heisenmink> quacks like a duck etc
<apeiros_> heisenmink: of course you can delegate, but delegation changes the context of self.
<workmad3> heisenmink: that's delegating the method to another class, which is a perfectly valid solution, but isn't the same
<heisenmink> it's a static method
<heisenmink> so it's the same
<apeiros_> so as workmad3 said, it's not the same.
<workmad3> heisenmink: there's no such thing as a 'static' method in ruby ;)
<apeiros_> heisenmink: if delegation works for your case, then yes, you'll have to use delegation
<workmad3> heisenmink: there's methods on the class instead of the instance, but those aren't the same as static methods
<apeiros_> but no, it is not the same.
<heisenmink> def self.my_static_method […] myClass.my_static_method "PIES"
<cek> how do i tell define_method to create instance method that would have instance of the object passed as self?
hemanth2 has quit [Read error: Connection reset by peer]
<workmad3> heisenmink: yeah, that's a method defined on the class, not a static method...
chimkan has quit [Ping timeout: 252 seconds]
chimkan__ is now known as chimkan
hemanth2 has joined #ruby
hunglin has joined #ruby
<cek> self.instance_exec { block.call(*args) } : somehow, block has different scope
hunglin has quit [Client Quit]
<workmad3> alcy: cool :)
<apeiros_> cek: I assume you want instance_exec(*args, &block)
<workmad3> cek: you're passing in the block for define method?
<workmad3> cek: why not do 'define_method &block' in the class?
<heisenmink> workmad3, what is the difference? Running something on the class is context-free, static methods are context-free
<workmad3> heisenmink: the class isn't context free
antonishen has joined #ruby
antonishen has quit [Client Quit]
<cek> self.instance_exec(*args, &block) - yeah
<heisenmink> can you run instance methods from class methods?
<workmad3> heisenmink: the class in ruby is itself an object, an instance of the class Class
<workmad3> heisenmink: no, but that's not the same as context-free
<heisenmink> free of instance context of that class then
<workmad3> heisenmink: it's a different context, the context (self) refers to the class
cryptfu has quit [Remote host closed the connection]
<cek> now i'm wondering why wasn't my version working, the docs are clear that self is passed properly
<apeiros_> heisenmink: classes are instances too
<workmad3> heisenmink: but classes are objects in ruby... you can create methods on them, assign instance variables for classes, get the class of the class, etc..
<cek> oh wait, by block they mean locally defined block, not passed from outside
lolmaus has quit []
<apeiros_> class Foo; end; Foo.class # => Class
<phreax> you can use the the method object to copy it into another class
<apeiros_> they're instance of class Class
<apeiros_> workmad3 already said the rest
Kn|t3 has quit [Quit: Kn|t3]
<phreax> suppose you have Duck.quak
<workmad3> heisenmink: which is a very different situation from a static method in something like java
adambeynon has joined #ruby
nfk has joined #ruby
<apeiros_> it also means that you can have instance variables in the context of class methods
<phreax> than in you other class use define_method(:quak,&Duck.method(:quak))
<apeiros_> nb., those ivars belong to the class
<workmad3> class instance variables are in fact of more use than class variables :)
<apeiros_> agreed
<apeiros_> class variables are a sad topic in ruby :-(
Kn|t3 has joined #ruby
<workmad3> I wouldn't say they're a sad topic... they are sometimes useful
blacktulip has quit [Remote host closed the connection]
<davidw> workmad3, yeah, I use them to store the names of all my global variables, and then eval to get at the latter
<workmad3> however, they are easy to misunderstand in terms of behaviour and it would be nice if they were a bit harder to create and access to stop them being used when a class ivar is actually wanted
<cek> i use class vars regularly
<workmad3> davidw: yeah, but you're just evil :P
cezar has joined #ruby
d3vic3 has quit [Ping timeout: 244 seconds]
cezar has quit [Client Quit]
<heisenmink> phreax, undefined method "define_method"
<phreax> heisenmink: you only do this inside a class
<heisenmink> oh, I thought I was in a "default class" in irb
nipra has quit [Ping timeout: 248 seconds]
<phreax> cause define_method is Class methoid
<phreax> no
<workmad3> heisenmink: no, you're in an oject, not a class
<workmad3> *object
zomgbie has joined #ruby
<workmad3> heisenmink: and even that is... not quite accurate all the time
Helius has quit [Remote host closed the connection]
d3vic3 has joined #ruby
linoj has joined #ruby
Targen has quit [Ping timeout: 265 seconds]
fayimora has quit [Ping timeout: 264 seconds]
lewis1711 has left #ruby [#ruby]
dv310p3r has quit [Quit: Leaving]
daniel_hinojosa has quit [Ping timeout: 248 seconds]
GreekFreak has joined #ruby
<GreekFreak> hi all
dv310p3r has joined #ruby
zomgbie has quit [Ping timeout: 252 seconds]
john_metcalf has quit [Quit: john_metcalf]
<GreekFreak> I wanted to know if in a case statement, the code breaks out of the statement when it is true for a "when"clause
td123 has joined #ruby
jeer has quit [Ping timeout: 245 seconds]
nullsign has joined #ruby
heftig has quit [Ping timeout: 260 seconds]
daniel_hinojosa has joined #ruby
cek has quit [Quit: жопа диридай диридиридай]
virunga has joined #ruby
GreekFreak has quit [Quit: Leaving]
zaychenok has joined #ruby
erichmenge has joined #ruby
binaryplease has joined #ruby
albemuth has joined #ruby
moshee has quit [Ping timeout: 245 seconds]
<apeiros_> not much patience, that greek freak…
nfk has quit [Quit: yawn]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
uris has joined #ruby
nfk has joined #ruby
<nullsign> is there a method for take in a list, but drop first 2 lines?'
nfk has quit [Client Quit]
zaychenok has quit [Client Quit]
<apeiros_> nullsign: by list, do you mean array?
zaychenok has joined #ruby
<apeiros_> array[2..-1]
<nullsign> yes
Soul_Est has joined #ruby
MasterIdler has joined #ruby
<nullsign> basically..
<nullsign> i have a script which produces a list (right now to stdout)
<nullsign> and i need to remove the top 2 lines, and the last line from the output
<nullsign> i assume ill be putting the list into a new array, and cutting from the array, then piping to stdout.
<nullsign> just not sure the most elegant way
theRoUS has joined #ruby
<apeiros_> nullsign: you can paste the script as it currently is…
<apeiros_> idiomatic/elegant solutions depend on the context.
joshman_ has joined #ruby
nfk has joined #ruby
<nullsign> you want to see my script? ok here - http://pastebin.com/KFErJmDG
<workmad3> nullsign: please don't use pastebin
zinjacoder has quit [Read error: Connection reset by peer]
<workmad3> nullsign: it's slow, ad-ridden and looks bad
<nullsign> what do you prefer?
<workmad3> nullsign: pastie.org or gist.github.com are much preferred :)
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<workmad3> wow, a for loop
bosphorus_ has joined #ruby
<nullsign> ...
<workmad3> don't see them very often :)
daniel_hinojosa has quit [Ping timeout: 245 seconds]
<nullsign> i suspect there is a negative reason for that.
<workmad3> Dir['whatever'].each do |list|
Konboi has joined #ruby
<apeiros_> nullsign: Dir[] already returns an array
<apeiros_> so you can use the [2..-1] on the result of that
malkomalko has joined #ruby
<nullsign> Dir isn't what produces the array tho.
akem has joined #ruby
<nullsign> it's the rrdtool_out command
bosphorus has quit [Ping timeout: 265 seconds]
<nullsign> thats when im trying to trim.
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<nullsign> rrd_out, typo
indian has quit [Ping timeout: 265 seconds]
chson has joined #ruby
<Markvilla> Somebody's using mruby?
Vainoharhainen has quit [Quit: Leaving...]
Frippe has quit [Ping timeout: 276 seconds]
binaryplease has quit [Read error: Connection reset by peer]
<apeiros_> nullsign: that'd have been relevant information :-p
<nullsign> apeiros: sorry..
<apeiros_> nullsign: you're using ruby 1.8?
<nullsign> basically, i need to remove lines 1-2, and lastline from whatever is in the rrd_out array
internet_user has joined #ruby
<apeiros_> rrd_fixed.each is deprecated and won't work in 1.9 (String#each is ambiguous and was replaced by String#each_line and others)
Frippe has joined #ruby
binaryplease has joined #ruby
<apeiros_> sub(/\A.*\n.*\n/, '') # removes the first 2 lines of a string
daniel_hinojosa has joined #ruby
foofoobar has joined #ruby
yonggu has joined #ruby
yekta has joined #ruby
<JonnieCache> unorthodox
Vert has joined #ruby
denysonique has joined #ruby
zinjacoder has joined #ruby
the_jeebster has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
fantazo has joined #ruby
twodollarz has quit [Ping timeout: 240 seconds]
jeremy_carroll has joined #ruby
ph^ has quit [Remote host closed the connection]
billy_ran_away has joined #ruby
<billy_ran_away> Can anyone explain this error to me? /usr/local/rvm/gems/ruby-1.9.2-p290@maskable_attribute/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing': uninitialized constant MaskableAttribute::ActsAsMaskableAttribute::ActiveSupport (NameError)
<billy_ran_away> Is the constant that's missing ActiveSupport?
ph^ has joined #ruby
Morkel has joined #ruby
<billy_ran_away> Cause it's in my Gemfile.lock...
<JonnieCache> yes but its a class called activesupport within MaskableAttribute
<JonnieCache> not the actual ActiveSupport
ozy_work has joined #ruby
lorandi has joined #ruby
<JonnieCache> im guessing you havent required MaskableAttribute correctly
binaryplease has quit [Quit: WeeChat 0.3.8]
<JonnieCache> or maybe you need to require things in a different order
<billy_ran_away> JonnieCache: I have require 'maskable attribute' in there...
<billy_ran_away> JonnieCache: I have require 'maskable_attribute' in there...
SPYGAME has joined #ruby
<JonnieCache> i don't know that gem so i cant comment on specifics
binaryplease has joined #ruby
<billy_ran_away> JonnieCache: It's my gem : )
lectrick has joined #ruby
<billy_ran_away> JonnieCache: Can you take a look real quick? https://github.com/billy-ran-away/maskable_attribute/tree/rails2
<apeiros_> JonnieCache: I'd assume it is ::ActiveSupport that is missing. but since it is invoked within MaskableAttribute::ActsAsMaskableAttribute, the error is MaskableAttribute::ActsAsMaskableAttribute:: ActiveSupport
<apeiros_> also billy_ran_away ^
<billy_ran_away> apeiros_: I saw : ) Thanks
<apeiros_> so my guess is that you require 'maskable_attribute' before AS is loaded
<billy_ran_away> apeiros_: awww...
<apeiros_> and that maskable_attribute doesn't properly require its dependencies.
xaq has joined #ruby
<billy_ran_away> apeiros_: that could possibly make sense...
<apeiros_> (probably because it assumes to be required in a rails context, where AS is loaded anyway)
<billy_ran_away> apeiros_: Do you know where I should put it in my test/dummy Rails app?
<apeiros_> no
iNerd has joined #ruby
<JonnieCache> you need to specifically require activesupport in your gem
<JonnieCache> as it is a dependency
<JonnieCache> or is it require 'activesupport' i can never remember
<apeiros_> JonnieCache: no wonder, they're inconsistent
<billy_ran_away> JonnieCache: Okay, but will that affect my gem when I'm using it in a real Rails2 project with Gemfile and everything...
ph^ has quit [Ping timeout: 244 seconds]
<JonnieCache> billy_ran_away: any given file can only be required once
<JonnieCache> so it wont matter
<JonnieCache> thats how its meant to work. look at any rails gem, they'll all be explicitly requiring the bits of rails they need
<JonnieCache> they should be anyway
shevy has joined #ruby
<shevy> wheeeee and another new hd-install
ken_barber1 has joined #ruby
<billy_ran_away> So now my name error has moved...
jeff_sebring has quit [Remote host closed the connection]
<shevy> now I am using konversation, not xchat. and I am confused...
<shevy> hi billy_ran_away !!!
<billy_ran_away> shevy: Hi
<iNerd> join #openemu
hemanth2 has quit [Ping timeout: 244 seconds]
jeff_sebring has joined #ruby
<shevy> you are all in fancy colours....
<shevy> it confuses me
<JonnieCache> irssi ftw
<shevy> hehe
<shevy> man JonnieCache I remember you... but you look different too
hemanth2 has joined #ruby
<billy_ran_away> Same NameError, but different file… http://cl.ly/HN1X
robdodson has joined #ruby
<billy_ran_away> Now active_support/dependencies is saying uninitialized constant ActiveSupport::Concern
cezar has joined #ruby
ken_barber has quit [Ping timeout: 252 seconds]
cezar has quit [Client Quit]
<shevy> I tell you, konversation is an annoying client... need to install xchat asap again...
twodollarz has joined #ruby
crankycoder has joined #ruby
<shevy> ok enough... need to get xchat. this is killing me...
shevy has left #ruby ["Konversation terminated!"]
chimkan has quit [Quit: chimkan]
flip_digits has joined #ruby
snearch has quit [Quit: Verlassend]
Konboi has quit [Remote host closed the connection]
uris has quit [Ping timeout: 246 seconds]
indeterminate has quit [Quit: It's too late. You've awakened the gazebo. It catches and eats you.]
<robdodson> if anyone has a moment.. I've been trying for about 2 days to make a ruby gem with a CLI. I have a git repo here: https://github.com/robdodson/zerp for some reason whenever I do rake install everything seems to install without errors but typing the command 'zerp' it says 'command not found'
shevy has joined #ruby
<robdodson> any help is greatly appreciated. this is driving me crazy
shevy has quit [Client Quit]
<rob_> robdodson: add bin/ to your $PATH
chimkan has joined #ruby
g0bl1n has joined #ruby
<robdodson> rob_: like ~/bin or just bin/
DavidTiger has joined #ruby
<rob_> robdodson: well it has to be a valid path :)
<robdodson> rob_: i've installed other gems with this same structure and never needed to do anything to my path. why would i need to now..?
eurbach has joined #ruby
b3nt_pin has quit [Ping timeout: 240 seconds]
<robdodson> rob_: like if i do gem install sprouts, from this project https://github.com/lukebayes/project-sprouts
<rob_> robdodson: doesn't look like your thing installs zerp into rubys bin directory or something
<rob_> i dont really know enough about gems to help you any-more though
<rob_> but basically, your file 'zerp' isn't in a directory that is contained in your $PATH
<robdodson> rob_: yeah, i'm just not sure why that is. i've added it to the list of executables (i think) in the gemspec
patricksroberts has joined #ruby
klj613 has quit [Ping timeout: 244 seconds]
<robdodson> oh i got it!
<robdodson> i needed to change a ilne in the gemspec from this: gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
<robdodson> to just say gem.executables = ['zerp']
sailias has joined #ruby
Markvilla has quit [Quit: Markvilla]
<robdodson> I'm not sure why that regex wouldn't work though, seems like it should just be looking in my bin folder and mapping everything..
shevy2 has joined #ruby
Markvilla has joined #ruby
shevy2 is now known as shevy
freeayu has quit [Quit: 离开]
red-panda has quit [Remote host closed the connection]
CheeToS has joined #ruby
red-panda has joined #ruby
llaskin has joined #ruby
<llaskin> is there a testunit support room?
<JonnieCache> robdodson: maybe it wasnt getting added to gem.files to start with
<JonnieCache> i think that gets defined further up the gemspec
<robdodson> it does
<robdodson> it does gem.files then gem.executables
<robdodson> seems like that should work..
cek has joined #ruby
<cek> Any quick IPC pipe like library for ruby? I want minimal coding.
yekta has quit [Remote host closed the connection]
hemanth2 has quit [Quit: Leaving.]
yekta has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
indian has joined #ruby
<robdodson> hmm
<robdodson> if i do irb -I .
<robdodson> and try their command: gem.files = `git ls-files`.split($\)
<iNerd> sigh. this isn't exactly a ruby question, but is there any way to cleanup gems but leave dependencies if they require older versions? getting tired of hitting keep on every single entry
<robdodson> oh oops nvm..
<llaskin> iNerd: why bother?
<llaskin> its not like gems take up a ton of space...
<iNerd> there's that
<iNerd> :p
SPYGAME has quit [Ping timeout: 244 seconds]
francisfish has quit [Ping timeout: 244 seconds]
Vainoharhainen has joined #ruby
<JonnieCache> iNerd: youd have to write a script using the rubygems api
jeer has joined #ruby
<JonnieCache> maybe theres a config option to stop it pestering you
<iNerd> i just wondered if there was a flag
<iNerd> that i was somehow missing
b3nt_pin has joined #ruby
ceej has joined #ruby
gilead_ has quit [Quit: Leaving]
<Hanmac> iNerd what package is your problem wich still depends on older gems? its pry right? :D
Jake232 has joined #ruby
<iNerd> i can't even remember now
akem has quit [Ping timeout: 244 seconds]
<iNerd> but lots of things want older active record etc.
charliesome has quit [Quit: Computer has gone to sleep.]
hunglin has joined #ruby
kevinbond has joined #ruby
<robdodson> omg such an idiot……………..
classix_ is now known as classix
<robdodson> i didn't make the file in my bin directory executable
<lectrick> not sure if such a channel exists already but I just started #ror-advanced FYI
<robdodson> chmod 755
<robdodson> dohhhhhhh
oooPaul has joined #ruby
<jeffreybaird> Is there a way to interact with apple applications without using AppleScript? Trying to write a command line application in Ruby that can create an event in ical
<apeiros_> jeffreybaird: OSA
<apeiros_> there's a gem for that
<apeiros_> it is essentially what AppleScript is built on
<jeffreybaird> great, thanks
<apeiros_> i.e., you can do about everything that applescript can.
rob_ has left #ruby [#ruby]
<apeiros_> there are also cocoa bridges. or use macruby.
Natch| has joined #ruby
ingy has joined #ruby
<apeiros_> but I think for simple tasks, osa is the easiest.
codora has joined #ruby
ingy has left #ruby [#ruby]
<jeffreybaird> yeah I just want simple and applescript is pretty awful
<iNerd> it's sort of clever for what it is
wmoxam has joined #ruby
<iNerd> i.e. somthing dating to system 7
internet_user has quit [Remote host closed the connection]
fmcgeough has joined #ruby
kvirani has joined #ruby
internet_user has joined #ruby
<cek> @h = {box: hash_or_value} - no you just look at this
francisfish has joined #ruby
kristian- has joined #ruby
<cek> guy definitely came from python. or javascript
remmy444 has quit [Quit: Leaving]
SPYGAME has joined #ruby
rippa has joined #ruby
camilo has joined #ruby
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
Prx has joined #ruby
chrismcg is now known as zz_chrismcg
ananthakumaran has joined #ruby
<Prx> So what's the difference between this channel and #ruby-lang ? P
yannis has joined #ruby
<apeiros_> -lang
jeffreybaird has quit [Quit: jeffreybaird]
<codora> lol
<Prx> ahah :P
llaskin has left #ruby [#ruby]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
overmind667 has quit [Ping timeout: 240 seconds]
robdodson has quit [Quit: robdodson]
* codora wonders if it's just him, but that the example code in http://zguide.zeromq.org/rb:hwclient looks most elegant in ruby.
carlyle has joined #ruby
<codora> heh. i love common lisp, but i'll have more luck getting my friends to learn ruby with me.
octarine has joined #ruby
hunglin has left #ruby [#ruby]
zaychenok has quit [Quit: Konversation terminated!]
prtksxna has joined #ruby
zaychenok has joined #ruby
prtksxna has quit [Remote host closed the connection]
<lectrick> apeiros_: lol
MasterIdler has quit [Quit: MasterIdler]
lorandi has quit [Quit: Leaving]
eft has joined #ruby
axl_ has joined #ruby
<Hanmac> i think _lang has less trolls
<lectrick> actually, what is the algorithm that measures the "distance" between two strings? (i.e. the number of their differences)
<apeiros_> lectrick: levenshtein is one
<lectrick> apeiros_: ah yeah, that's the one I've heard of before
<wubino> how can I split a text file by blank lines?
<apeiros_> there are others, too. a generic distance algorithm is the hamming distance
<apeiros_> also soundex
<Prx> wubino: A blank line is 2 \n in a row
zaychenok has quit [Read error: Connection reset by peer]
alexim has joined #ruby
epitron has quit [Remote host closed the connection]
zaychenok has joined #ruby
<Sigma00> Prx: would ^$ also match a blank line? >_>
<Prx> Sigma00: Yes
<Sigma00> danke, just making sure
Fraeon has quit [Remote host closed the connection]
Prx has left #ruby [#ruby]
alexim has quit [Client Quit]
tomask has joined #ruby
rking has joined #ruby
<lectrick> apeiros_: is there a way to find a word in a collection that is the nearest distance to a given word without iterating through every word every time?
<lectrick> apeiros_: Basically I'm asking, is there a way to encode the word to "blur" it so that near matches will match?
<apeiros_> lectrick: only if you can prepare the data
<lectrick> apeiros_: I suppose that's basically like a soundex
<JonnieCache> lectrick: the concept youre looking for is "edit distance:
<lectrick> JonnieCache: I know but I want to avoid having to re-compare every time
yekta has quit [Remote host closed the connection]
yekta has joined #ruby
<lectrick> like I have a list of 1000 words and I have a new word and I want to find out if there is an existing word with a levenshtein distance of less than 2 without iterating through 1000 checks
<lectrick> If I just used soundex they would both just resolve to the same soundex code I guess
mockra has joined #ruby
<JonnieCache> well if you only need the first word with distance < 2 then best case you only need to do one check
digitalcakestudi has joined #ruby
<JonnieCache> worst case will always be checking every item
<JonnieCache> unless you can make very specific assumptions about the dataset but only you can answe that
<lectrick> JonnieCache: So the average case is still N/2
ckrailo has joined #ruby
<JonnieCache> lectrick: only if the dataset is not biased
<lectrick> yeah
<JonnieCache> if we're talking complexity theory then i guess we're assuming random data so yeah
m_3 has quit [Quit: leaving]
<JonnieCache> in practice because youre using human words in a human language there will be an optimal algorithm
<workmad3> lectrick: the best you can do with an unsorted collection is O(N) for searching
<JonnieCache> best to compare different ones
billiamii has joined #ruby
zz_chrismcg is now known as chrismcg
jprovazn is now known as jprovazn_away
<Hanmac> lectrick: line.each_with_object([0]).map {|l,i| [l,l.empty? ? i[0] += 1 : i[0]] }.select{|(l,i)| !l.empty? }.group_by {|(l,i)| i}.map {|k,v| v.map {|(a,b)|a}}
<lectrick> workmad3: yeah I was thinking O(N), guess I was shooting for maybe an NlogN :)
<apeiros_> o0
<workmad3> lectrick: you'd need to find a way to sort the collection for that
<JonnieCache> as long as its not 2^n then youre all good
<workmad3> :)
<lectrick> haha
<workmad3> JonnieCache: or N^N
<Hanmac> o sorry it was not for you
<lectrick> Hanmac: Yeah I was like, this looks cool and all but
mockra has quit [Ping timeout: 245 seconds]
<lectrick> ;)
francisfish has quit [Read error: Connection reset by peer]
<JonnieCache> if you're concerned about anything better than 2^n then youre probably a data engineer or something and youre getting paid enough so its still all good
francisfish has joined #ruby
<workmad3> lectrick: if you precomputed soundex for each item in the list though, you could indeed sort the collection lexically and then you could do a binary search through it :)
d3vic3 has quit [Ping timeout: 240 seconds]
<apeiros_> JonnieCache: I think if your average algorithm is 2^n, you suck as a programmer and should change jobs. 2^n is horrible :)
epitron has joined #ruby
<lectrick> workmad3: yeah that's the fallback position, that would work, just wondering if there is something like that for levenshtein distance
<workmad3> lectrick: you can't precompute the levenshtein distance though, iirc
<Hanmac> wubino: there for you: if lines is a array of strings ...: lines.each_with_object([0]).map {|l,i| [l,l.empty? ? i[0] += 1 : i[0]] }.select{|(l,i)| !l.empty? }.group_by {|(l,i)| i}.map {|k,v| v.map {|(a,b)|a}}
<workmad3> lectrick: makes it a bit more difficult...
<JonnieCache> apeiros_: that was my point. in practice anything faster than 2^n is fine, and you should spend the time developing another feature
<apeiros_> JonnieCache: um, no
d3vic3 has joined #ruby
<lectrick> workmad3: like, you'd precompute the position of a string in an N-dimensional "levenshtein space" and then you'd round the position in that space to maybe the X nearest grid positions and then you could compute that for a test string and then do your search
<JonnieCache> well yeah i guess it depends hwat youre doing
<apeiros_> JonnieCache: maybe you mean n^2, but I'd still disagree
<workmad3> lectrick: is it worth it? :)
<lectrick> workmad3: wow I am on fire today. go adderall
Sgeo has joined #ruby
<lectrick> workmad3: It is if someone else could take advantage of it
<apeiros_> lectrick: first and easiest thing is to index by length
<Hanmac> lectrick if the list is unquie and orderless you could use Set ...
<JonnieCache> apeiros_: i think its because im biased as a web developer, where these things dont matter so much a lot of the time
<apeiros_> if your max distance is 2, then any string with a size ±3 is out already
<workmad3> good point, I was wondering if some form of bucket-sort would work
<lectrick> apeiros_: that is a good point
<apeiros_> JonnieCache: you do realize that there's a shitload of horribly slow O's below O(2^n)?
<apeiros_> e.g. n^4 is still < 2^n
<nullsign> is there a sub method for lastline?
<nullsign> (in a series of strings)
mnaser has quit [Quit: Computer has gone to sleep.]
<apeiros_> lectrick: also an index by count of chars could help
<lectrick> If you create an O(2^N) monster you should just hand in your nerd card and go party with clients at baseball games.
<apeiros_> but maybe somebody already came up with a better idea of how to index for levenshtein. or soundex.
<workmad3> apeiros_, JonnieCache: also, big-O notation hides a massive amount of performance... going by big-O then quicksort is no better than mergesort or heapsort
<apeiros_> (most probably even)
<JonnieCache> apeiros_: hmmmm. ok maybe i need to revise then. i thought 2^n was the cutoff point where the algorithm is never appropriate and you should throw it away and start again, even if your n is small
kenperkins has joined #ruby
<JonnieCache> better than 2^n, you can get away with it for a small n
<apeiros_> JonnieCache: whether an algorithm is appropriate depends entirely on the context
lkba has joined #ruby
<apeiros_> there's no such thing as a generic "up to this is good and beyond just sucks - no matter the context"
<workmad3> even 2^n is ok for n < about 5, maybe 10 depending on how expensive the operations are
<eam> if n is small then the O() is much less important than C
<JonnieCache> apeiros_: yeah. i meant "below this point it may or may not suck depending on n, above this point You Are Definitely Doing It Wrong"
<eam> where C is the constant time cost unrelated to n
<workmad3> a literal 2^n is better than 10000n for n up to about 14 :)
<lectrick> workmad3, apeiros_ ^ interesting link.
<eam> JonnieCache: no such boundary
iNerd has quit [Quit: iNerd]
<lectrick> nullsign: string.split.last.sub? :)
<eam> remember, big-o only relates to algorithmic efficiency at scale
<workmad3> eam: it isn't just the C, it's the entire rest of the performance calculation.... 10000n is still O(n) and n^2/50000000 is still O(n^2) :)
Morkel has quit [Quit: Morkel]
<JonnieCache> hmmmm i was just making a general point. i know theres not *actually* a boundry in mathematical terms
<eam> workmad3: that's exactly what I said
<JonnieCache> but yes i accept that my knowledge of complexity theory is rusty
<nullsign> lectrick: hrm. i want to take a array of strings, and remove the last string.
<workmad3> eam: those aren't constants though
<workmad3> eam: they're scaling factors
<lectrick> nullsign: it's unshift or pop, I always have to check
<lectrick> nullsign: or is it shift or pop
Eldariof-ru has quit [Ping timeout: 246 seconds]
<eam> workmad3: constant scaling factors
<eam> but yes
<deryl> my knowledge of complexity theory is purely cenceptual. so enjoying lurking during these conversations. :)
TubaraoSardinha has joined #ruby
<lectrick> nullsign: it's pop
Aristata has quit [Read error: Connection reset by peer]
hunglin has joined #ruby
<workmad3> of course, this is all only time-complexity too... there's also always space-complexity to consider :)
Aristata has joined #ruby
<apeiros_> and maintenance
<JonnieCache> they are kind of equivalent though
jrist is now known as jrist-afk
<apeiros_> and how often the algorithm is used
<JonnieCache> time and space
<workmad3> JonnieCache: they're not equivalent
ipoval has joined #ruby
<TubaraoSardinha> Hello! I am having troubles with the require method! I have a simple sinatra file and want to include a class called UserData (user_data.rb) in it, they are in the same directory, the only way I managed to include the user_data was with a load
<TubaraoSardinha> Is there a better way?
<JonnieCache> kind of equivalent. you can exchange one for the other. see: rainbow tables
<apeiros_> if going from O(n^2) to O(n) means 100LoC become 100KLoC, and the thing is used like once a year, I say: wtf do I care?
<JonnieCache> memoization etc
<workmad3> JonnieCache: in fact you tend to find they tend to be tradeoffs... a good algorithm in time-complexity is frequently poor in space-complexity
<workmad3> JonnieCache: that's not equivalent
<lectrick> nullsign: string.split.tap(&:pop).join
niklasb has quit [Ping timeout: 245 seconds]
<eam> JonnieCache: you can't always exchange one for the other
<workmad3> JonnieCache: that's inverse proportionality
<apeiros_> TubaraoSardinha: the easy and wrong solution is require_relative. the long and proper solution is managing your $LOAD_PATH properly.
thone_ has joined #ruby
williamcotton has quit [Quit: williamcotton]
<JonnieCache> hmmmmmm we are quibbling over terms
<lectrick> apeiros_: hey! I like require_relative!
<workmad3> JonnieCache: not quibbling... you're getting things wrong and we're correcting you :P
<JonnieCache> they are equivalent to the extent that you can often use up lots of space to save time and vice versa
<lectrick> apeiros_: It allows me to run tests directly, for one thing, without any test_helper requires inside them breaking
<workmad3> JonnieCache: yeah... if you want to redefine what 'equivalent' means, then sure
<JonnieCache> i forget that equivalent has a specific technical meaning thats indeed my fault
<apeiros_> lectrick: funny, I don't have require_relative in my tests, yet they *magically* work
thone has quit [Read error: Connection reset by peer]
m_3 has joined #ruby
<JonnieCache> i dont have any math background at all, only CS
<workmad3> JonnieCache: it also has a specific english meaning that you're also changing ;)
<apeiros_> lectrick: maybe it is because I spent my 5min on thinking how to manage the $LOAD_PATH :-p
<TubaraoSardinha> apeiros_: Sounds painful! I think I will stick with the load for now. Thanks! =)
<workmad3> JonnieCache: I only have formal CS background too
<lectrick> apeiros_: so you're cd'd way down into a repo and you run "ruby test/some/test.rb" and that test says "require 'test_helper'" and it magically works? That really is magic.
<apeiros_> TubaraoSardinha: um, load and require both use $LOAD_PATH
<JonnieCache> equivalent can mean "can be exchanged one for the other" in normal english! you cant deny that
<apeiros_> TubaraoSardinha: but sure, whatever
<nullsign> lectrick: hrm. that doesn't remove the last line, and removes all the \n after each string, so everything goes into a single string..
<eam> JonnieCache: but they *can't* be exchanged, categorically
<lectrick> apeiros_: How do you set the $LOAD_PATH for an entire repo AND have it automatically available from anywhere inside the repo?
adeponte has joined #ruby
<TubaraoSardinha> apeiros_: Strange thing. With a require 'user_data.rb' it doesn't work but when I use load 'user_data.rb' it works!
<workmad3> JonnieCache: no, equivalent means 'you can put this in instead of that'... what you're searching for is the word 'interchangable'
<apeiros_> lectrick: I say ruby some/dir/test/runner.rb
<lectrick> nullsign: ok join("\n")
<workmad3> JonnieCache: and that's not universally true, just a frequently observed effect :)
<apeiros_> and test/runner.rb encapsulates the knowledge of setting up the env.
maesbn has quit [Remote host closed the connection]
<lectrick> nullsign: string = string.split.tap(&:pop).join("\n")
<apeiros_> if course, you can still run it with plain ruby, but then you're the one who needs the knowledge and you pass it to ruby via -I
<lectrick> nullsign: that will work. I hope you know what it's doing though.
d3vic3 has quit [Ping timeout: 265 seconds]
<JonnieCache> jesus. you know what i meant. are we here to learn or are we here for a nerd dickswinging contest?
wvms has quit [Quit: wvms]
<JonnieCache> actually dont answer that :)
TubaraoSardinha has quit [Remote host closed the connection]
<apeiros_> lectrick: but I don't go around and have the env knowledge spread all over every test like you do with require_relative.
<workmad3> JonnieCache: actually, I didn't know what you meant... but also swinging nerdons is fun :)
<lectrick> apeiros_: well I will have to consider that then
<workmad3> JonnieCache: what I saw was you making incorrect statements
<lectrick> nullsign: you can also do string = string.split[0..-1].join("\n") I think
sonkei has quit [Quit: WeeChat 0.3.8]
<lectrick> nullsign: crap it's split[0..-2]
<lectrick> nullsign: just bang around in IRB :)
<JonnieCache> eam: the fact that i can create a turing complete machine with only one variable, but might take a long time to run, doesnt that imply that time and space are interchangable in some way?
sonkei has joined #ruby
d3vic3 has joined #ruby
<workmad3> JonnieCache: not in the sense you're trying to state
<eam> JonnieCache: in particular scenarios yes, but not in the general sense
<lectrick> apeiros_: is that a parser that does not use eval? :)
<eam> JonnieCache: you can say they're exchangable for this, or that, but you can't generally replace one with the other
<workmad3> JonnieCache: it's frequently true that a good time-complexity has poor space-complexity, but it isn't a universal truth and it's also not the case that you can just exchange the values
<apeiros_> lectrick: yes
<apeiros_> I used it initially for my toy language, then moved it on to my test framework, then used it for cucumber tests
yekta has quit [Remote host closed the connection]
<apeiros_> now that I think of it, I should probably mention that it does not use eval…
yekta has joined #ruby
alexim has joined #ruby
<lectrick> apeiros_: If I'm reading that correctly, you still can't just run "ruby test/runner.rb" from within the project root
<apeiros_> lectrick: you're not reading it correctly then.
<lectrick> apeiros_: because it's not requiring your test_runner which mutates the load_path
<workmad3> hmm, does anyone have a better suggestion than nerdtree for exploring a project layout with vim?
theRoUS is now known as theRoUS|lunch
<lectrick> apeiros_: crap I meant
<lectrick> apeiros_: you can't do "ruby test/path/to/unit/test.rb"
<apeiros_> lectrick: yes. that's what I said.
<shevy> in his career apeiros_ must have started one thousand projects :)
Guest7650 has quit [Read error: Connection reset by peer]
<apeiros_> 17:29 apeiros_: if course, you can still run it with plain ruby, but then you're the one who needs the knowledge and you pass it to ruby via -I
<apeiros_> shevy: probably more :(
<apeiros_> and :( because you shouldn't ask how many I actually finished…
<lectrick> apeiros_: well, I can agree that using require_relative spreads around repo structure knowledge, but I love the convenience of just running a test directly
<JonnieCache> i just scrolled up, all i said was "kind of equivalent" i dont know where this idea came from that im trying to claim you can always swap time for space in any algorithm. i never said that.
<lectrick> apeiros_: it also allows me to run it directly in my editor
<apeiros_> lectrick: you still can, through the runner
benjammin891 has joined #ruby
<apeiros_> ruby test/runner.rb some/file.rb
<JonnieCache> anyway who cares
<_br_> Hello there fellow Rubyists
<apeiros_> JonnieCache: I do! keep on arguing!
<shevy> die _br_
<shevy> oops wrong channel
<shevy> hi _br_
<_br_> lol
<_br_> :D
<JonnieCache> shevy: so in another channel you have beef with some other br?
palmfrond has quit [Read error: Connection reset by peer]
<workmad3> 16:25 < JonnieCache> kind of equivalent. you can exchange one for the other. see: rainbow tables <--
baroquebobcat has joined #ruby
palmfrond has joined #ruby
<JonnieCache> yeah. rainbow tables *are* swapping time for space! you just chose to interpret that sentance in the strongest possible way because that would provide maximum scope for quibbling :)
<JonnieCache> i meant it in a very weak way
<workmad3> JonnieCache: :P
<shevy> JonnieCache not only him with ALL OF YOU!
<shevy> damn it... wrong channel
<apeiros_> JonnieCache: so revise the statement and throw in a "sometimes"?
wvms has joined #ruby
<shevy> what are rainbow tables
<shevy> is that something for gay parades? :D
<apeiros_> and all are happy and the unicorn dance again on the rainbow (tables)
<workmad3> shevy: they're tables for looking up the location of unicorns
<Tasser> shevy, wikipedia may help ;-)
<_br_> Precalcuated hashes for passwords
<JonnieCache> rainbow tables are what they have in gay strip clubs
<shevy> man, wikipedia sucks. I know because I help make it suck more
robozahn has quit [Quit: leaving]
<workmad3> _br_: stop being boring :P
<shevy> erm... less! I meant... suck less!!!
<_br_> hehe sorry
<apeiros_> shevy: that's not called "helping" then…
robozahn has joined #ruby
robozahn has quit [Client Quit]
<workmad3> shevy: I think you got it right the first time ;)
perryh_away is now known as perryh
<shevy> one day I shall add a new page called RubyOS. Then shevy: "on my todo list"
<apeiros_> now how were gay strip clubs again related to algorithmic complexity? o0
<workmad3> shevy: and 10s later it will be flagged '[Citation needed]' ;)
<_br_> shevy: RubyOS o.O
<JonnieCache> raindbow tables. as in table dancers.
<workmad3> apeiros_: it's better for your sanity to not ask...
<JonnieCache> dancing on tables. thats what they do in strip clubs isnt it?
horseman has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
<_br_> A crazy^Wgenius mind can connect those two things :D
<workmad3> JonnieCache: no idea, I don't tend to frequent them
<shevy> workmad3 yeah
elhu has joined #ruby
<shevy> workmad3 I'll probably have to write an epic blog article before I create that page ...
<workmad3> JonnieCache: I certainly couldn't comment on the colour of the tables used for dancing in gay strip joints :P
alcy has quit [Quit: leaving]
<JonnieCache> tbh i imagine theyre black.
ZachBeta has joined #ruby
<apeiros_> being sick sucks. it took me 4 days to write what I'd normally write in a day or less :-(
<JonnieCache> ive been looking at that soundex thingy
<apeiros_> and it probably even has more bugs than normally…
<JonnieCache> i cant see how it would work with peoples accents being so different
<apeiros_> JonnieCache: it doesn't.
wvms has quit [Ping timeout: 265 seconds]
<JonnieCache> yeah thought that might be it haha
<workmad3> basic soundex also sucks for non-english iirc
<apeiros_> it also only works for english
Synthead has joined #ruby
<JonnieCache> in the UK you can go 20 miles and people have completely different vowels
<JonnieCache> must be like that to some extent everywhere
<shevy> young arnold schwarzenegger... that's austrian accent in english
<shevy> yeah JonnieCache
fserb has joined #ruby
d3vic3 has quit [Ping timeout: 246 seconds]
horseman has joined #ruby
<workmad3> JonnieCache: you think we need to go 20 miles? cute :)
<apeiros_> IMO it should be possible to design a language/pronunciation independent soundex algorithm. but it'd still be quite difficult to gather all the data…
rking has quit [Quit: Oops. Didn't start in tmux.]
<JonnieCache> again with the pedantry lol. yes indeed right here you could go 5 meters and find different vowels because the people in the next office are from elsewhere
<dcope> JonnieCache: nice name ;)
<JonnieCache> you know what i meant :P
d3vic3 has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
<apeiros_> (nb, independent doesn't mean it doesn't need to know which language/pronunciation you want it to use for the comparison…)
rking has joined #ruby
zaychenok has joined #ruby
<workmad3> JonnieCache: actually, I was thinking that where I grew up there were communities about 5 miles away that as far as I was concerned spoke fecking gobbldeygook
<_br_> shevy: Best movie ever Commando, violence, weird english and stupid jokes mixed with other random weird stuff. :D
<dcope> fecking gobbldeygook he says
<shevy> _br_ hehe
<shevy> action movies in the 1980s were not thaaaat bad
<JonnieCache> workmad3: youre a manc arent you? you dont need to tell me that northerners speak funny man. i know,
<_br_> true true..
<workmad3> JonnieCache: actually, I came from gloucestershire
<shevy> all I know is that scots were dresses
<shevy> *wear
<workmad3> JonnieCache: 20 miles was as far as I needed to go to get to worsels territory :)
<shevy> what is a worsel
<shevy> sounds like some kind of animal
maletor has joined #ruby
<workmad3> sorry, wurzels
<shevy> lol
<shevy> that is german for roots !
niku4i has joined #ruby
<shevy> I only know "come on eileen"
<workmad3> I assure you... I sound *nothing* like that
PragCypher has joined #ruby
<shevy> hehe
ben- has joined #ruby
chrismcg is now known as zz_chrismcg
graft is now known as Guest72502
<workmad3> JonnieCache: but yes, I live in manc now :)
dekroning has quit [Ping timeout: 244 seconds]
<JonnieCache> im from the west country. in our town most people have relatively generic southern accents, but if you went to a decent pub, or out to the villages, it was full on wurzel times
<shevy> lol
<shevy> wurzel
<shevy> omg
<workmad3> JonnieCache: you've seen Hot Fuzz, right? you know the farmer with the guns?
<JonnieCache> vaguely
<shevy> why do you guys use german words
<workmad3> JonnieCache: when I worked @ a supermarket, I had people who spoke like that at times...
<shevy> hah! hot fuzz was great
<shevy> I understood the farmer better than the rest of the team :P
alexim has quit [Quit: sleep]
JohnBat26 has quit [Remote host closed the connection]
<workmad3> shevy: the farmer? or the police officer intermediary? :)
<JonnieCache> I've seen the wurzels. theyre amazing.
nilg has quit [Read error: Connection reset by peer]
<shevy> workmad3 the farmer!
<shevy> workmad3 he was growling like I expect from someone in the UK
<workmad3> heh
<workmad3> yeah... we don't generally speak like that :P
carloslopes has quit [Ping timeout: 244 seconds]
<JonnieCache> hot fuzz was meant to be filmed in a village really near where im from... the local people turned it down because they thought it would make the village look bad lol
erikstraub1 has joined #ruby
niku4i has quit [Remote host closed the connection]
<JonnieCache> thereby confirming their appropriateness for that film
thecreators_ has joined #ruby
niku4i has joined #ruby
<workmad3> JonnieCache: :)
<elhu> Hi! I'm having some troubles with the rack/openid middleware and setting it up with google Apps… It should be a fairly simple config.ru, but I can't get it to work. Here's the gist of my config.ru, if anyone has a minute to take a look :)
bluOxigen has quit [Ping timeout: 245 seconds]
horseman has quit [Read error: Connection reset by peer]
xclite has quit [Remote host closed the connection]
the_jeebster has quit [Ping timeout: 245 seconds]
niku4i has quit [Remote host closed the connection]
the_jeebster has joined #ruby
simao has quit [Ping timeout: 265 seconds]
<workmad3> JonnieCache: hmm, stow-on-the-wold?
<nullsign> i for one agree with the liquidation of all living statues...
<JonnieCache> shevy: as to why they use german words, english is a germanic language
<JonnieCache> wurzel is probably an anglo-saxon word, so it is probably the same word
thecreators has quit [Ping timeout: 265 seconds]
thecreators_ is now known as thecreators
Araxia_ has joined #ruby
<JonnieCache> workmad3: cant remember
<workmad3> JonnieCache: that's what wiki says :)
<workmad3> JonnieCache: it's about 40 miles from where I grew up
yekta_ has joined #ruby
<JonnieCache> ok i must be confused then
<workmad3> JonnieCache: I grew up in dursley
<JonnieCache> thats east anglia isnt it? definitely not south west
horseman has joined #ruby
<workmad3> no, it's south gloucestershire
<workmad3> well, gloucestershire, southern part of it
robotmay has quit [Remote host closed the connection]
yekta has quit [Ping timeout: 245 seconds]
yekta_ is now known as yekta
<workmad3> JonnieCache: about halfway between bristol and gloucester
<JonnieCache> yeah my geography knowledge is non existant. i just dont seem to be able to encode that kind of spaital information in my head
<workmad3> JonnieCache: I'm looking @ google maps right now :)
yekta has quit [Remote host closed the connection]
yekta has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
<JonnieCache> no i meant things like "gloustershire is in the west not the east" ive lived in the uk all my life i should know that
shtirlic has joined #ruby
<JonnieCache> but man i get lost in my own *town* still
<JonnieCache> like, really near my house
<workmad3> JonnieCache: ah, heh :)
vlad_starkov has quit [Remote host closed the connection]
<JonnieCache> i just cant encode spaital data in my head at all
<workmad3> JonnieCache: my geography sucks too... but not quite as bad as that
yekta_ has joined #ruby
voodoofish430 has joined #ruby
yekta_ has quit [Client Quit]
thecreators has quit [Remote host closed the connection]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
erikstraub1 has quit [Remote host closed the connection]
<workmad3> JonnieCache: whereabouts are you then?
vlad_starkov has joined #ruby
<JonnieCache> from salisbury, the other side of bath from dursley
<JonnieCache> live in brighton now
Jake232 has quit [Quit: Computer has gone to sleep.]
simao has joined #ruby
<JonnieCache> sodom and gommorah rolled into one and brought bang up to date for the 21st century haha
yekta has quit [Ping timeout: 240 seconds]
<workmad3> heh :)
maletor has quit [Read error: Connection reset by peer]
<workmad3> you're close to my sister then... she's in southampton
WhereIsMySpoon has joined #ruby
shevy has quit [Read error: No route to host]
<ekaleido> File.open("sample.output", "w") { |f2| f2.puts c.body_str }
zommi has quit [Remote host closed the connection]
<ekaleido> "w" writes a new file every time, whats the flag to append to the file?
manizzle has joined #ruby
<workmad3> ekaleido: guess ;)
<apeiros_> ekaleido: a
<ekaleido> shoulda figured :)
<apeiros_> ekaleido: also see the docs of IO and IO::open
<WhereIsMySpoon> Hi, I have this: contents = page.read.gsub(/.*meta name="title" content=/, '').gsub(/\>.*/, '').strip which is reading a youtube page and getting the description, but it isnt working :( what am i doing wrong?
jenglish has quit [Remote host closed the connection]
Karmaon has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
<apeiros_> you're using a regex to process html
ipoval has quit [Quit: ipoval]
<WhereIsMySpoon> so? it's just characters
<workmad3> WhereIsMySpoon: html is not amenable to regex
<apeiros_> you asked me what you do wrong, I told you.
<WhereIsMySpoon> why
<workmad3> WhereIsMySpoon: because HTML is not a regular language
<WhereIsMySpoon> all it has are characters in it, nothing out of the ordinary, why would it fail
zz_chrismcg is now known as chrismcg
sailias has quit [Ping timeout: 244 seconds]
<WhereIsMySpoon> im not disagreeing that what you're saying is the truth
<JonnieCache> because of the opening and closing tags, and the nesting, its impossible to parse html in regex
<WhereIsMySpoon> im just curious
<apeiros_> you should also note that . does not match newlines without the //m flag.
<wmoxam> WhereIsMySpoon: you've got a problem, then you decided to use regex to solve it. Now you have two problems
<WhereIsMySpoon> you so funny
<workmad3> WhereIsMySpoon: because a regular expression can't handle nesting, and it gets horrendously complex if you want to allow for the fact that attributes don't have to be ordered
<WhereIsMySpoon> wait
simao has quit [Ping timeout: 265 seconds]
macmartine has joined #ruby
<WhereIsMySpoon> workmad3: ok then, ill try and look for a html parser or somesuch
<Tasser> workmad3, they can handle nesting... :-)
<WhereIsMySpoon> im sure there's thousands
<apeiros_> nokogiri
<wmoxam> WhereIsMySpoon: try Nokogiri
simao has joined #ruby
Ammar01 has quit [Quit: Leaving]
fantazo has quit [Remote host closed the connection]
fayimora has joined #ruby
heftig has joined #ruby
chimkan has quit [Quit: chimkan]
<JonnieCache> quite apart from anything else, regexs are a pain. whereas nokogiri almost makes xml fun
jrist-afk is now known as jrist
<workmad3> Tasser: really? write me a regex that will give me the contents of the outer div of '<div> <div> </div> <div></div></div>' ;)
blacktulip has joined #ruby
<workmad3> Tasser: and then generalise it to arbitrary nesting ;)
<apeiros_> Nokogiri.HTML(string).at_css('meta[name=title]')['content'] should do it
DanBoy has joined #ruby
<WhereIsMySpoon> regexes are lovely
<Tasser> workmad3, well, as soon as you can make references in regexp, they're not regular anymore...
savage- has joined #ruby
<JonnieCache> what they do is lovely. using them is often a pain
timonv has quit [Remote host closed the connection]
<workmad3> WhereIsMySpoon: they are... but there are certain classes of problem where they are provably not adequate
<Tasser> apeiros_, at_css? why not css? :-)
<apeiros_> workmad3: perl actually has extensions to its regex engine that lets it process non-regular expressions too. afaik.
andrewhl has joined #ruby
Yarou has quit [Quit: Leaving]
MasterIdler has joined #ruby
<WhereIsMySpoon> workmad3: i was talking to JonnieCache
<apeiros_> Tasser: because at_css gives a single node (the first) instead of a node set.
bluenemo has quit [Remote host closed the connection]
<Tasser> apeiros_, oke
<WhereIsMySpoon> JonnieCache: it only takes learning the syntax
<WhereIsMySpoon> :)
<workmad3> Tasser: oh sure... at that point you're getting into pushdown-automata, just wrapped up in 'regex' syntax :)
<JonnieCache> yeah even then they are confusing. i guess it depends on how your mind works
imami|afk is now known as banseljaj
mrdtt has quit [Quit: Leaving]
<Tasser> workmad3, indeed
rhalff has joined #ruby
Targen has joined #ruby
xclite has joined #ruby
<rhalff> anybody uses facebook ?
<workmad3> rhalff: no... it's a barren wasteland that is devoid of any users...
<workmad3> oh wait, that's wishful thinking :)
<apeiros_> rhalff: last I heard it was close to 1 billion who use FB
<apeiros_> so yes, somebody does.
bier has quit [Ping timeout: 252 seconds]
<rhalff> before I get banned by a bot, I just created a badge for assange: hi am I alowed to spam for the good cause, just a facebook badge and there is no money for me in it ? :-) http://www.picbadges.com/julian-assange/2614344/?fb_ref=social_bar&fb_source=timeline
<JonnieCache> i think technically, a RegEx is not the same as a Regular Expression. RegEx is the perl variant where they added loads of stuff that allows you to parse html and so on
<WhereIsMySpoon> well you already did it
williamcotton has joined #ruby
<WhereIsMySpoon> so i dont see why you asked
<WhereIsMySpoon> :S
<rhalff> dunno just irritated, that a guy like that just gets pushed away.
<workmad3> apeiros_: can I tell this guy to foad? :)
<apeiros_> foad?
<WhereIsMySpoon> fck off and die
<apeiros_> oh
<WhereIsMySpoon> l2internet :p
<WhereIsMySpoon> (jks)
<rhalff> I can imagine all IRC traffic being banned later on. and nobody will ever know what irc was
<WhereIsMySpoon> banned
<apeiros_> workmad3: sure. but preferably in his pm.
axl_ has quit [Read error: Connection reset by peer]
<workmad3> rhalff: nah, we'll just tunnel it through tor
axl_ has joined #ruby
<rhalff> and linux will be removed from history also, it will just be googles creation. Before there where operation systems there was nothing, and then android was born.
<deryl> irc will never die. especially when we learn telepathic capabilities!
<WhereIsMySpoon> o.o
<WhereIsMySpoon> who is this guy
<JonnieCache> hmmm except that google is built on linux.
<WhereIsMySpoon> rhalff: please stop spouting rubbish
<deryl> WhereIsMySpoon: weak troll? :shrug:
<WhereIsMySpoon> also --------^
<JonnieCache> also android is linux
<JonnieCache> lol
<workmad3> WhereIsMySpoon: he's an example of the lesser-spotted greater internet troll
axl_ has quit [Read error: Connection reset by peer]
<WhereIsMySpoon> deryl: i guess
<deryl> hahaha lesser-spotted
<WhereIsMySpoon> workmad3: :p
<JonnieCache> dunno about lesser-spotted. i seem to spot them all the time :)
<WhereIsMySpoon> hey guys
<workmad3> JonnieCache: those are the common internet trolls
<WhereIsMySpoon> i got it working with regex :p
<rhalff> sleeping fools... no offence meant.. :)
<WhereIsMySpoon> i just needed the //m and a bit of tweaking
<JonnieCache> SHEEPLE
<WhereIsMySpoon> oh god
<WhereIsMySpoon> here we go
<deryl> he's the hyenia of the troll food chain. you know, the weak end of the trool food chain
<apeiros_> off topic
<WhereIsMySpoon> ^
<JonnieCache> hahaha
banghouse has joined #ruby
AxonetBE has quit [Quit: Leaving.]
<rhalff> @WhereIsMySpoon: it's normally on the right side.
maletor has joined #ruby
EskiMag has quit [Quit: EskiMag]
<rhalff> or on top, but that's for desert, who only some can afford :p
shtirlic has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 252 seconds]
heisenmink has quit [Quit: Leaving]
axl_ has joined #ruby
<WhereIsMySpoon> what
<WhereIsMySpoon> rhalff: again, stop spouting rubbish
<WhereIsMySpoon> go troll somewhere else where someone cares
<rhalff> oh, ok. understood.
shtirlic has joined #ruby
tdelam_ has joined #ruby
davidw has quit [Ping timeout: 240 seconds]
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
fayimora has quit [Ping timeout: 245 seconds]
yonggu has quit [Read error: Connection reset by peer]
yonggu has joined #ruby
ben- has quit [Quit: Linkinus - http://linkinus.com]
tdelam has quit [Ping timeout: 256 seconds]
tdelam_ is now known as tdelam
fantazo has joined #ruby
yonggu_ has joined #ruby
carloslopes has joined #ruby
fayimora has joined #ruby
alerticus has quit []
tvw has quit [Read error: Connection reset by peer]
robozahn has joined #ruby
tdelam_ has joined #ruby
mneorr1 has joined #ruby
<tdelam_> a
CheeToS has quit [Remote host closed the connection]
yonggu has quit [Ping timeout: 240 seconds]
tdelam has quit [Disconnected by services]
tdelam_ is now known as tdelam
Soul_Est has quit [Ping timeout: 248 seconds]
<rhalff> could somebody point me to an irc channel that does care about the future ?
brianpWins has quit [Quit: brianpWins]
<rhalff> or I guess 90% is jerking off on their macbooks.
binaryplease has quit [Quit: WeeChat 0.3.8]
heftig has quit [Quit: leaving]
bier has joined #ruby
mneorr has quit [Ping timeout: 240 seconds]
<wmoxam> rhalff: #haskell does for sure. They jerk off on their Lenovo's that run ArchLinux too
<wmoxam> which makes them better people
kristian- has quit [Quit: Leaving]
<rhalff> hm, I like lenovo better, thanks :-)
<rhalff> my post was more offending then it should be.
emmanuelux has quit [Ping timeout: 264 seconds]
<wmoxam> yeah, I'm sure you feel really bad about it
mdw has quit [Remote host closed the connection]
clockwize has quit [Quit: clockwize]
<rhalff> no really, but I feel the policy of not doing any politics on IRC gets back on us.
schovi has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
<wmoxam> rhalff: #politics
<wmoxam> :p
<rhalff> we try to be saints and the rest doesn't care, although what we produce is what life is starting to be build upon.
mikepack has joined #ruby
senny has quit [Remote host closed the connection]
<wmoxam> rhalff: what have you produced?
<rhalff> seed dump :p
fayimora has quit [Ping timeout: 265 seconds]
<WhereIsMySpoon> rhalff: go to #philosophy or smth
<deryl> wait wait what? we're supposed to try to be saints? How come *I* never got that memo?
banseljaj is now known as imami|afk
WhereIsMySpoon has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<wmoxam> seed dump?
<JonnieCache> ewwww
<workmad3> deryl: nah, that's just propaganda spread by the capitalists
SPYGAME has quit [Quit: Leaving]
<rhalff> yeah, I get very few pull request though.
<deryl> see? don't give me the memo and what happens? Now I gotta be good or God will make me come back as a New Jersey Devil!
mjb2k has joined #ruby
<deryl> workmad3: whew. had me scared for a second
clockwize has joined #ruby
<workmad3> deryl: god really is that little voice in your head
<workmad3> deryl: so start listening to it more
clockwize has quit [Client Quit]
<deryl> workmad3: oh great. the one tenant I *can't* evict!
heftig has joined #ruby
hemanth2 has joined #ruby
advorak has joined #ruby
chrxn has joined #ruby
foofoobar has quit [Quit: Computer has gone to sleep]
<workmad3> rhalff: I have a pair of bolt cutters I could give you a 'pull request' with
eywu has joined #ruby
<rhalff> Ok, you all convinced me to make local nets and not global
<JonnieCache> global net? sounds like NWO
<workmad3> rhalff: oh crap, are you an illuminatus? are you going to come down in your UFO and drag me off to atlantis for being mean to you?
perryh is now known as perry
<rhalff> Teach people how to make local nets and not use providers.
muse is now known as ikusari
ikusari is now known as liliff
liliff is now known as muse
<rhalff> Leave Americans shouting in the dessert.
<workmad3> yeah, that cake really needs shouting
shevy2 has joined #ruby
<deryl> workmad3: i do have one question though. if god is the tiny voice in my head, who are all the others? They sure don't talk like angels!
uris has joined #ruby
<deryl> muahaha
<rhalff> Where reuters will be no more than a twitter acount everybody ignores.
<workmad3> deryl: you only think that because of the capitalist propaganda telling you what angels should be like
<deryl> damn them capitalists!
tamaska has joined #ruby
<workmad3> deryl: you should always listen to *all* the voices
<deryl> why they always gotta make so much cents? err sense
<wmoxam> rhalff: Just because you're paranoid doesn't mean they aren't after you
<deryl> workmad3: if i did that, be afraid. be very afraid
<workmad3> wmoxam: when they're out to get you, paranoia is really just good sense
<deryl> workmad3: hahaha
bricker88 has joined #ruby
alexim has joined #ruby
<wmoxam> workmad3: then it's not paranoia
<rhalff> how come I have the sense I'm just in an isolated box of retarded people
eywu1 has joined #ruby
<workmad3> rhalff: biased perceptions
<deryl> rhalff: because your box is made of mirrors
<rhalff> anyway, you convinced me local is the way to go, so thanks for that
<workmad3> rhalff: people hate to think of themselves as moronic, so it colours their perceptions of those around them
AxonetBE has joined #ruby
<wmoxam> rhalff: everyone thinks that when they're 16
<wmoxam> the golden age when one knows EVERYTHING
<JonnieCache> and theyre indestructable. *sigh* those were the days
<rhalff> people who are 16 don't know better, they just assume that's the way it is.
<rhalff> unless they are intelligent, in which case they will be silenced
<wmoxam> I totally knew everything there is to know when I was 16. I've know a little less each year since
<JonnieCache> haha
<wmoxam> now I'm pretty damn stupid
<deryl> good tune! Indestructable by Disturbed
<deryl> at least the band name is right on the money hehe
<workmad3> wmoxam: sounds like the reason given for universities being accumulations of knowledge
<workmad3> wmoxam: students go in thinking they know everything and come out knowing they know nothing... obviously all that knowledge is kept in the university :)
<JonnieCache> clever
<workmad3> JonnieCache: iirc, it's a prachettism
<deryl> universities are called brain trusts are they not? ;)
<workmad3> *pratchettism
<wmoxam> workmad3: lol
<JonnieCache> sounds about right
<deryl> probably more accurate to call them a brain drain hehe
red-panda has quit [Remote host closed the connection]
* rhalff *so shut up*
punkrawkR has joined #ruby
<wmoxam> rhalff: like a European should talk about debt
<deryl> rhalff: who cares. go pay it off. make it zero. until then the number is useless
<deryl> wmoxam: hahahahahaha
<workmad3> wmoxam: hey, it's not all of europe that's broke
<JonnieCache> workmad3: have you read the discworlds where they invent the internet
<workmad3> wmoxam: some of us are just being 'austere'
<bricker88> How would you find all classes that have a certain method defined? Is it generally okay to have that method push into an array defined in a global variable?
koskoz has joined #ruby
<workmad3> JonnieCache: you mean the clacks? :)
<JonnieCache> yeah
* deryl chokes on his coffee
eywu has quit [Quit: Leaving.]
<JonnieCache> the bit where he describes huffman coding using flags is AMAZING
<workmad3> :)
<wmoxam> workmad3: it's my understanding the western europe minus Germany and the Nordic countries are pretty much fucked
n1x has joined #ruby
hydrozen has joined #ruby
<rhalff> yeah, anyway assange should be sentenced to death, so #ruby becomes nothing more than a filth channel.
<workmad3> wmoxam: probably
<wmoxam> rhalff: probably
nfk has quit [Quit: yawn]
<workmad3> wmoxam: but hey, at least here in the UK, we're not going to be dragged down by the euro going bust
<wmoxam> workmad3: hehe
<workmad3> wmoxam: just the fact that the rest of euroope will be
<JonnieCache> workmad3: unfortunately it sucks anyway
<JonnieCache> i must remember to move to germany before they shut the borders
<rhalff> oh forgot, the real ruby channel is #ruby-lang
<workmad3> rhalff: yeah, go there... see how long before you get kickbanned
<deryl> hehe you'll last a LOT shorter in there
<workmad3> rhalff: we'll take bets on the time ;)
* workmad3 checks if zenspider is around right now
<workmad3> ok, I'm going to bet on 2 minutes
ben_alman has quit [Excess Flood]
<shevy2> hehehe
<wmoxam> rhalff: yer pathetic
shevy2 is now known as shevy
<wmoxam> slacktivism at it's worst
bigoldrock has joined #ruby
<shevy> rhalff except, we have +100% people here, and dont require +v on the channel :P
<JonnieCache> innit. go outside and glue yourself to something mate then you might get some respect
<codora> hehe
AxonetBE has quit [Quit: Leaving.]
DrShoggoth has joined #ruby
timonv has joined #ruby
<JonnieCache> the head of the student union when i was studying glued himself to the prime minister
<JonnieCache> go and do that
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
overmind667 has joined #ruby
<JonnieCache> that guy was such a legend
<tamaska> sounds like fun
<shevy> ewww
<wmoxam> 12:49 < rhalff> wmoxam, no, but 10 years from now there are no ruby questions to answer.
<wmoxam> lololol
_md has quit [Quit: Leaving...]
<shevy> why would anyone want to glue himself to a politican
<workmad3> JonnieCache: student unions are hotbeds of craziness
ananthakumaran has quit [Quit: Leaving.]
<JonnieCache> to draw attention to their pressure group
manizzle has quit [Read error: No route to host]
<JonnieCache> in this case it was an environmental thing
<workmad3> JonnieCache: the student union @ manchester got transgender toilets a bit after I graduated
ben_alman has joined #ruby
<JonnieCache> also it enabled him to talk to the PM for some time
n1x has left #ruby ["Ex-Chat"]
<JonnieCache> workmad3: hahaha quality
manizzle has joined #ruby
<JonnieCache> that kind of thing is basically what student unions are for
<wmoxam> JonnieCache: they've been trashing Montreal for months
<workmad3> JonnieCache: 'with urinals' and 'without urinals' rather than male and female... the newspaper even reported on it... I loved the response of the person who got the toilets in
<JonnieCache> wmoxam: yeah saw that. pretty mad. the same thing happened in the UK, they trashed some government buildings and had a couple of riots back in 2010
BiHi has quit [Quit: Computer has gone to sleep]
<JonnieCache> but it didnt carry on like in canada
<workmad3> JonnieCache: when the reporter asked 'isn't this political correctness gone mad' she said 'that phrase is disablist'
<JonnieCache> THATS AMAZING.
mohits has quit [Read error: Connection reset by peer]
<tamaska> lololol
shadoi has joined #ruby
<shevy> when I have a module called Foo
<shevy> what would be the best way to include it, the moment when it is required?
<wmoxam> JonnieCache: well, it's in Quebec, and students there are far more radical than in the rest of the country
BiHi has joined #ruby
<JonnieCache> down here someone complained because you have to mark bus tickets as Male or Female when you buy them (to stop people selling them) and someone complained because of transgener discrimination
<JonnieCache> they didnt get listened to though
mockra has joined #ruby
<deryl> JonnieCache: which carry on in canada do you refer to? the vancouver student riots, or the stanley cup riots? ;)
<shevy> JonnieCache odd mechanism... so you can sell the ticket to other male ones, if you are male. but not to female ones???
rhalff has quit [Quit: Leaving]
<JonnieCache> shevy: i guess it stops enough selling to be worth it, with minimal complexity
<JonnieCache> deryl: the student riots
<wmoxam> awww
<wmoxam> he left
<JonnieCache> the hockey riots were HILARIOUS. canada should be so ashamed of that as a country
<shevy> he was not man enough for #ruby
<wmoxam> JonnieCache: that wasn't the first time
<JonnieCache> as the rest of the world rioted for bread, votes etc, they rioted for hockey. i laughed so hard
<tamaska> needs moar balls of steel
<deryl> JonnieCache: and trust me, the major population is
<wmoxam> JonnieCache: and really no worse than Soccer riots in Europe
<shevy> depends where in europe
<wmoxam> JonnieCache: one of which happened in Poland this week
<deryl> wmoxam: exactly true
<shevy> we always here of dangerous hooligans in... poland, russian and the UK!
<JonnieCache> i dont mean ashamed of rioting at all, but simply the contrast with egypt
<shevy> *hear
<shevy> *russia
<JonnieCache> that was what mademe laugh
<shevy> god, it's too hot here...
<deryl> isn't the poland team the one told that if their fans riot again, the TEAM will be fined?
<JonnieCache> my friend wins £200 if ANY game in the euros is stopped because of fan unrest
<deryl> i only heard of the fining in passing on the news.
<JonnieCache> he only bet £10 or something.
<tamaska> fanboiz
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
TPFC-SYSTEM has joined #ruby
schovi has joined #ruby
mischief has quit [Read error: Connection reset by peer]
<mjb2k> any body ever use Ruby in an ESB or any type of messaging bus/cache?
nari has quit [Ping timeout: 244 seconds]
malkomalko has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
lorandi has joined #ruby
malkomalko has joined #ruby
AxonetBE has joined #ruby
shtirlic has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 244 seconds]
Vainoharhainen has quit [Ping timeout: 244 seconds]
timonv has quit [Remote host closed the connection]
<tamaska> hey guys, i have a question. is it possible to use eventmachine on top of zeromq?
kenichi has joined #ruby
TheFuzzball has joined #ruby
mischief has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
yonggu_ has quit [Remote host closed the connection]
yonggu has joined #ruby
LBRapid has joined #ruby
<shevy> if I have module Foo, how can I find out the name inside Foo?
<shevy> module Foo; MY_NAME_IS = 'Foo' # hmmm
<mjb2k> duh ... self.class.to_s.split("::").first
benjammin891 has quit [Ping timeout: 244 seconds]
<Mon_Ouie> Module#name, Module#class_name
<mjb2k> lol, I actually just pulled that form stackoverflow
<Tasser> mjb2k, tell him about #name then
celm has joined #ruby
<Mon_Ouie> #class_name is the one that is like what he wrote
<Tasser> oh, ups
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
asobrasil has joined #ruby
adamkittelson has joined #ruby
mischief has quit [Ping timeout: 244 seconds]
hyperboreean has joined #ruby
dennda has joined #ruby
<shevy> hmm
<shevy> yeah
mischief has joined #ruby
<shevy> that works, nice
tewecske has joined #ruby
horseman has quit [Read error: Connection reset by peer]
jcromartie has joined #ruby
Fraeon has joined #ruby
Fraeon has quit [Client Quit]
khakimov has joined #ruby
tewecske has quit [Max SendQ exceeded]
grantbdev has joined #ruby
Fraeon has joined #ruby
jtoft has joined #ruby
hasrb has joined #ruby
ben_alman has quit [Excess Flood]
Criztian has quit [Remote host closed the connection]
horseman has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
gokul has joined #ruby
mnaser has joined #ruby
hadees has quit [Quit: hadees]
chrxn has quit [Quit: Computer has gone to sleep.]
mdw has joined #ruby
mdw_ has joined #ruby
xastion has joined #ruby
qwerxy has quit [Ping timeout: 240 seconds]
Schweby has joined #ruby
Schweby has quit [Max SendQ exceeded]
Schweby has joined #ruby
ben_alman has joined #ruby
mdw has quit [Ping timeout: 240 seconds]
Schweby has quit [Client Quit]
robozahn has quit [Quit: leaving]
arturaz has quit [Remote host closed the connection]
mnaser has quit [Ping timeout: 244 seconds]
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
mnaser has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
Xethron has quit [Ping timeout: 244 seconds]
pr0zac0x2a has joined #ruby
gokul has quit [Ping timeout: 244 seconds]
Xethron has joined #ruby
looopy has quit [Read error: Connection reset by peer]
looopy has joined #ruby
elhu has quit [Ping timeout: 245 seconds]
fayimora has joined #ruby
theRoUS|lunch is now known as theRoUS
looopy has quit [Read error: Connection reset by peer]
looopy has joined #ruby
apok has joined #ruby
grendlme has quit [Quit: grendlme]
roolo has quit [Quit: Linkinus - http://linkinus.com]
<jtoft> If you have a bunch of gems you've created, what's the best way to manage them + ruby gems separately? Can you setup another gem sources, and set priorities? Or what would be the suggested way?
grendlme has joined #ruby
justsee has quit [Quit: Linkinus - http://linkinus.com]
Targen has quit [Ping timeout: 246 seconds]
lorn has joined #ruby
mikepack has quit [Remote host closed the connection]
<Muz> jtoft: running your own gemserver is trivial. It involves having an HTTPD sat somewhere, just place your gems into a folder named /gems, and run `gem regenerate_index -d /path/to/the/folder/containing/the/gems/folder`
Markvilla has quit [Ping timeout: 265 seconds]
<lorn> Hi, does anyboe use emacs with ruby-mode or enhanced-ruby-mode? I'm got a 'encoding : utf-8' error everytime i open a.rb :/
tomask has quit [Quit: Quit]
<jtoft> Muz: sure, but that only gets the gems you have specified, can you passthrough to ruby gems? And how do your organize priority?
<Muz> E.g, creating a folder named /var/www/gemserver/gems, placing your .gem files into there, and then running gem generate_index -d /var/www/gemserver
<Muz> gems takes a --source argument
<Muz> As for priority, not sure if gems respects that natively. If you're using bundler, you can order your Gemfile to indicate priority
celm has quit [Quit: Leaving]
<Muz> http://gembundler.com/man/gemfile.5.html See Source Priority.
<jtoft> Muz: thank you!
fantazo has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
nfk has joined #ruby
Eldariof-ru has joined #ruby
overmind667 has quit [Ping timeout: 252 seconds]
jenrzzz-mac has joined #ruby
madscientist_ has joined #ruby
zaychenok has quit [Ping timeout: 244 seconds]
madscientist_ has quit [Client Quit]
horseman has quit [Read error: Connection reset by peer]
overmind667 has joined #ruby
mnaser has quit [Ping timeout: 240 seconds]
ZachBeta has joined #ruby
<Paradox> scumbag python: claims to be object oriented…isnt
horseman has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
jtoft has left #ruby [#ruby]
tds has joined #ruby
bluOxigen has joined #ruby
<tds> is it not possible to use bare hashes with setter methods? i want to have a method foo=(arg) and pass in a bare hash
<Hanmac> what is a "bare" hash?
<tds> when you pass a hash to a method with braces surrounding it
<tds> without
Guest41174 is now known as fred
fred has quit [Changing host]
fred has joined #ruby
Criztian has joined #ruby
AxonetBE has quit [Quit: Leaving.]
<Sigma00> you mean foo(this=>that,there=>then) ?
<tds> yes
<tds> except i want to do
MrGando has joined #ruby
<tds> foo = this=>that, there=>then
Markvilla has joined #ruby
<tds> if the method was just foo i could do
<tds> foo this=>that, there=>then
<Paradox> i think you can, but not sure of how
Xethron has quit [Ping timeout: 252 seconds]
mrdtt has joined #ruby
<bricker88> here's a general question that doesn't really have anything to do with Ruby: Should I be populating my factories with *all* attributes for a model, or just the required ones?
<Paradox> up to you and your dev team
<Paradox> and also probably a better question for #rails
Xethron has joined #ruby
<bricker88> probably
kevinbond has quit [Quit: kevinbond]
vmatiyko has joined #ruby
<Paradox> :)
<Paradox> (づ。◕‿‿◕。)づ
<lorn> Hi, does anyboe use emacs with ruby-mode or enhanced-ruby-mode? I'm got a 'encoding : utf-8' error everytime i open a .rb file :/
<Paradox> well there's your problem
<Paradox> "…use emacs…"
<Paradox> :p
olrrai has joined #ruby
<lorn> Paradox: :D
mnaser has quit [Ping timeout: 246 seconds]
tris has joined #ruby
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
<mjb2k> bricker88: I don't believe there is an overall right answer to that, whatever fits your situation the best (as is as "future proof" as you can make it)
<shevy> I dont know what is a factory other than that it produces things
<mjb2k> exactly
<shevy> sounds quite java-ready though
<shevy> Factory.assemble :donut
<shevy> hmm ok
<shevy> donuts arent made in factories?
<bricker88> mjb2k: Thanks for the input
<mjb2k> Ruby is object oriented and could use factories just the same
AxonetBE has joined #ruby
cbuxton has joined #ruby
<nullsign> all dontus are classes
cespare has quit [Quit: WeeChat 0.3.5]
<nullsign> donuts/
<nullsign> sugar is the method
<Paradox> the only time i've ever seen factories used is in rails
looopy_ has joined #ruby
<Paradox> and even then i find that what i want usually doesn't fit the factory
<Paradox> but still
<Paradox> factorygirl saves a lot of time
mdw_ has quit [Remote host closed the connection]
zaychenok has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
alfakini has joined #ruby
<mjb2k> with Ruby classes not being "sealed" and the ability to use mixins, it seems many creation patterns get ignored
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
looopy has quit [Ping timeout: 244 seconds]
<shevy> well java won't be like ruby ever!
randomautomator has joined #ruby
zaychenok has quit [Client Quit]
hadees has joined #ruby
<shevy> do java hackers actually use scripting languages?
<wmoxam> shevy: some do
zaychenok has joined #ruby
<mjb2k> shevy: ?? I dont understand the question
<wmoxam> just as some Rubyists use compiled languages
zaychenok has quit [Client Quit]
<wmoxam> mjb2k: he's trolling
zaychenok has joined #ruby
<mjb2k> Java is 80% of my day job
MasterIdler_ has joined #ruby
mnaser has quit [Ping timeout: 248 seconds]
<wmoxam> mjb2k: many rubyists view 'patterns' as a workaround for a language's inflexibility
* tamaska manufactures donuts
<mjb2k> I'm actually in the early stages of a long term plan to push out PHP in favor of Ruby and Rails
<Paradox> honestly, i never understood why java or other languages sealed classes
<Paradox> is it for security?
<Paradox> if someone has access to your source
<wmoxam> Paradox: safety scissors
tatsuya_o has joined #ruby
<Paradox> they can just override your classes anyway
<Paradox> i gtg
<tamaska> see ya
<wmoxam> Paradox: on large teams some member won't be reasonable
jlogsdon has joined #ruby
<wmoxam> "lets change how the '+' method works, it's a great shortcut!"
<mjb2k> I think some patterns are just to work around a languages inflexibility, but some are just simply the tried and true best general solution to a common problem
sailias has joined #ruby
<wmoxam> mjb2k: such as?
<lectrick> TIL that \A and \Z are not the same as ^ and $ with regards to regexen
<shevy> mjb2k well if you write java code daily, do these guys also write in scripting-languages in addition to that?
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
MasterIdler has quit [Ping timeout: 246 seconds]
ph^ has joined #ruby
<erichmenge> Is there any equivalent to #respond_to? or defined? that doesn't go up the ancestor chain?
MasterIdler_ has quit [Ping timeout: 248 seconds]
<Mon_Ouie> You can check if instance_methods(false) includes your method
<mjb2k> well Java has a really broad range of applied uses, in my group specifically Java and PHP are our main 2, and of course all the typical web stuff comes along too
<erichmenge> Mon_Ouie: Ah, of course, instance_methods, thanks.
zenom has joined #ruby
hemanth2 has quit [Quit: Leaving.]
<shevy> k mjb2k so that question is answered. I count php into the scripting languages family too
<wmoxam> mjb2k: patterns are pretty language specific though
<shevy> ruby should kill php
alfakini has quit [Quit: Leaving]
<wmoxam> shevy: why?
<jlogsdon> php will never die, sorry
<zenom> anyone here use rbenv and know of an automated way to install bundler via a script? I have tried rbenv shell 1.8.7-p358 && rbenv exec gem install bundler
<shevy> wmoxam because less competition means more users
<zenom> but using puppet it doesn't work, wondering if there is another way
<jlogsdon> it's far to easy to get started with, and it's pretty much ubiquitous with hosts now,
<wmoxam> shevy: why do we want more users?
<mjb2k> on the other side of the building where their jobs are more focused on the main product (written in Java), I know Python is popular of there for infrastructure and integration type stuff
<shevy> jlogsdon not any time soon, but look at perl5
<shevy> wmoxam because no young blood means a language will die
<jlogsdon> perl does not have the 'ease of use' that php has, though
<wmoxam> shevy: I don't think Ruby has that problem :p
<jlogsdon> ruby is getting lots of young blood?
<jlogsdon> (like, all of it)
<shevy> jlogsdon more than perl5 for sure, less than python though. and probably less than php, though I am not sure about that lately
foofoobar has joined #ruby
<shevy> I think the www is very appealing, so php will profit from that a lot, more than other languages
<wmoxam> mjb2k: "Language advances kill patterns-as-recipes. Back in 1998, Peter Norvig argued that most of the original GOF patterns were invisible or simpler in Dylan or Lisp. Since then, Greg Sullivan has made the same point for Scheme. Jan Hannemann demonstrated the same for Java+AspectJ. Design patterns do not perform well as recipes. They are seasonal at best."
mdw has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
mnaser has quit [Ping timeout: 240 seconds]
zaychenok has joined #ruby
mdw_ has joined #ruby
axolx|afk is now known as axolx
withnale has quit [Ping timeout: 260 seconds]
zaychenok has quit [Client Quit]
pabloh has joined #ruby
zaychenok has joined #ruby
<pabloh> how can u test for a deprectaion warning?
<pabloh> deprecation*
<shevy> 9.23% for the scripting languages only :(
mxweas_ has joined #ruby
<mjb2k> wmoxam: I certainly agree patterns are language specific, I realize that certain aspects of Ruby negate certain patterns, but I don't think the entire idea of patterns should be thrown out the window
<tamaska> hey yall, is ruby a good prototyping language?
<shevy> pabloh I dont think you can test for it, you only get warnings
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
notbrent has joined #ruby
Shamgar has quit [Changing host]
Shamgar has joined #ruby
mdw has quit [Ping timeout: 246 seconds]
<shevy> hmm
zaychenok has quit [Client Quit]
<shevy> or perhaps there is a "treat warnings as error" flag
zaychenok has joined #ruby
<shevy> pabloh seems not possible
teh4 has joined #ruby
<bricker88> Sorry for asking this twice, didn't get an answer the first time: Is it a no-no to have a bunch of classes that each adds something to a global variable that is an array? For example, I want to know all classes that respond to the "administrate" method, so I thought to put "ADMINISTRATABLE.push self.name" at the top of each of those classes… is there a better way?
<shevy> Kernel.warn
<pabloh> shevy: i recall reading rails code that was testing for a deprecation warning...
<pabloh> shevy: maybe i'm wrong
<shevy> pabloh no idea, first time I heard this :)
markab has left #ruby [#ruby]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> bricker88 where is the global variable?
imami|afk has quit [Excess Flood]
zaychenok has quit [Client Quit]
banseljaj has joined #ruby
looopy_ has quit [Remote host closed the connection]
zaychenok has joined #ruby
<shevy> bricker88 anyway, you can add to constants if you must. I dont really know of a much better way when you want to keep data from modules, without classes
<bricker88> shevy: anywhere
Markvilla has quit [Quit: Markvilla]
<pabloh> shevy: it should be possible even by monkey patching the 'warn' method
<shevy> bricker88 but not in the code you showed hahaha :D
<bricker88> shevy: I know I can, it's the "if you must" that concerns me
<pabloh> pabloh: not in a nice way, but posible...
<bricker88> shevy: eh, this is just all swirling around right now, just planning really
coderhut has joined #ruby
tewecske has joined #ruby
<shevy> bricker88 well, if you can use classes then this may be better. if you cant, well then you would have to use a global variable anyway. or a constant in that case, though it is a bit weird
jcromartie has quit [Quit: jcromartie]
<shevy> in one project I am using a $use_colours variable
<shevy> I hate it so much that I want to remove it though
ciopte7 has joined #ruby
ciopte7 has left #ruby [#ruby]
Markvilla has joined #ruby
mrbrdo has joined #ruby
<mjb2k> every time I think to make a global variable, I right away re-evaluate my class structures and relationships
<mrbrdo> is there a way I can compile ruby code inside irb and show YARV bytecode for it?
<bricker88> shevy: I could use a constant too… Really I just need a place to store an array that anything can access, so that I can do something like ADMIN_CLASSES.each ...
<mrbrdo> I've seen someone use VM::InstructionSequence.compile but it seems I need to require something to get access to VM?
<mjb2k> in most cases, if you think you need a global, there is something else wrong
horseman has quit [Read error: Connection reset by peer]
<shevy> bricker88, well then use a constant there
<bricker88> shevy: thanks!
<shevy> I do the same btw ;)
<shevy> this is the first time that I like Pathname actually
<shevy> Pathname(__FILE__).dirname.realpath.to_s
horseman has joined #ruby
roams has quit [Ping timeout: 248 seconds]
ken_barber1 has quit [Remote host closed the connection]
ken_barber has joined #ruby
nopolitica has quit [Ping timeout: 244 seconds]
Axsuul has joined #ruby
<shevy> whoa
<shevy> almost as many people on #rubyonrails as are here on #ruby
ben_alman has quit [Excess Flood]
<jlogsdon> Well, RoR "launched" ruby into the scene
fayimora has quit [Ping timeout: 265 seconds]
<mjb2k> that's where I first heard of Ruby from, Rails, now I use Ruby for a handful of different uses
<mjb2k> rails being the least, haha
ben_alman has joined #ruby
Targen has joined #ruby
<shevy> hmm
schovi has quit [Remote host closed the connection]
roams has joined #ruby
PaciFisT has joined #ruby
flak has joined #ruby
hadees has quit [Quit: hadees]
flak is now known as Guest49415
cj3kim has joined #ruby
jmuniz has joined #ruby
mockra has joined #ruby
cj3kim has quit [Client Quit]
Bosma has joined #ruby
ringotwo has joined #ruby
<mjb2k> anybody have any experience packaing ruby apps into a Windows executable?
<mjb2k> or even in a Mac app?
bosphorus_ has quit [Remote host closed the connection]
<jlogsdon> mjb2k: like, a desktop app?
rippa has quit [Ping timeout: 244 seconds]
<Hanmac> mjb2k google for "ruby orca"
<Guest49415> ocra
<mjb2k> yes, I have a handful of ruby-GTK utility apps
<advorak> mjb2k, hotcocoa (mac) or even macruby's xcode additions ..
Guest49415 has quit [Client Quit]
* Hanmac used my own wx port :P
rippa has joined #ruby
afallows has quit [Read error: Connection reset by peer]
<shevy> mjb2k \o/ so you use ruby-gtk too
<shevy> Hanmac, isn't wx dead
ben_alman has quit [Excess Flood]
<Hanmac> only wxruby is dead ... wx itself is not
icooba has quit [Quit: icooba]
<mjb2k> shevy: yep, nothing too advanced, but I have a handful of little utilities for easy point and click automation
mxweas_ has quit [Quit: Computer has gone to sleep.]
<shevy> :)
<shevy> Hanmac, ok but that's not ruby code then? :(
<nullsign> ruby to replaced by new language - emerald
<shevy> nullsign if it ain't on github, it aint exist!
<nullsign> i like that linkedin profiles link to github projects ;)
<Hanmac> shevy i rewrote the wxruby stuff ... so you could still use ruby code to make an wx app
<shevy> "Emerald is a window decorator for beryl."
<shevy> Hanmac really?
<Hanmac> jeah
<Hanmac> but its not finish yet
<shevy> :-)
<shevy> like my projects!
MasterIdler has joined #ruby
schovi has joined #ruby
vitoravelino`afk is now known as vitoravelino
vitoravelino is now known as Guest48162
<mjb2k> so would ocra wrap the gtk gem in the app, but the app would still rely on Windows to have GTK installed. right?
ben_alman has joined #ruby
<Hanmac> yeah
Criztian has quit [Remote host closed the connection]
jmuniz has left #ruby [#ruby]
<lectrick> Is there something like .irbrc, except for the "ruby" command itself?
jitesh_shetty has quit [Read error: Connection reset by peer]
jitesh_shetty has joined #ruby
jcromartie has joined #ruby
darthdeus has joined #ruby
timonv has joined #ruby
duder has joined #ruby
trend has joined #ruby
xastion has quit [Ping timeout: 244 seconds]
Nies has joined #ruby
chrxn has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
Yarou has quit [Ping timeout: 246 seconds]
hadees has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
schaerli has joined #ruby
<shevy> lectrick dont think so... though there are some ruby FLAGS
<shevy> like $RUBYOPT
<apeiros_> lectrick: alias ruby=ruby -rsomething
centipedefarmer has joined #ruby
PragCypher has quit [Ping timeout: 244 seconds]
theRoUS has quit [Ping timeout: 260 seconds]
Spooner has joined #ruby
kirun has joined #ruby
<shevy> hehe
jenrzzz-mac has joined #ruby
ph^ has quit [Remote host closed the connection]
advorak has quit [Remote host closed the connection]
francisfish has joined #ruby
Dr4g_ has joined #ruby
jcromartie has quit [Quit: jcromartie]
ph^ has joined #ruby
mdhopkins has quit [Quit: mdhopkins]
mockra has quit [Remote host closed the connection]
advorak has joined #ruby
c0rn_ has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has quit [Ping timeout: 244 seconds]
ph^ has quit [Ping timeout: 244 seconds]
LBRapid has quit [Quit: Farewell...]
nathanstaines has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
mdw_ has quit [Remote host closed the connection]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
advorak has quit [Remote host closed the connection]
xastion has joined #ruby
<lectrick> apeiros_: I got it to work in a fairly clean way doing this: https://gist.github.com/2932330 Now I can require 'test_helper' from any test in my project and it works right from anywhere
<lectrick> No test_runner required
<lectrick> And my editor also runs it fine (sublime text 2 via command-B when the test is open)
Criztian has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<apeiros_> lectrick: :-/
<lectrick> what's wrong?
<apeiros_> I'll get back at you. cooking & eating…
<lectrick> I thought that would be a slick way of making ruby aware of any project-specific paths unobtrusively. The only 'gotcha' is dependence on RVM
fserb has quit [Quit: ttyl]
koskoz has quit [Ping timeout: 240 seconds]
carbncl has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
luxurymode has joined #ruby
zaychenok has joined #ruby
john_metcalf has joined #ruby
EskiMag has joined #ruby
fserb has joined #ruby
PragCypher has joined #ruby
Guest48162 is now known as vitoravelino`
fserb has quit [Client Quit]
carbncl has quit [Client Quit]
francisfish has quit [Remote host closed the connection]
carbncl has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
carloslopes has quit [Quit: Leaving]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
dekroning has joined #ruby
blacktulip has quit [Remote host closed the connection]
mrdtt has quit [Remote host closed the connection]
jcromartie has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<lectrick> apeiros_: crap it's buggy if I cd out of the dir and back in.
<lectrick> apeiros_: i fixed it but now I just don't include any existing RUBYLIB into the new RUBYLIB.
john_metcalf has left #ruby [#ruby]
duder has quit [Ping timeout: 245 seconds]
zaychenok has quit [Client Quit]
foofoobar has quit [Quit: bb]
Siphonblast has quit [Ping timeout: 246 seconds]
zaychenok has joined #ruby
zaychenok has quit [Client Quit]
<lectrick> granted that this is information that should be part of the repo (without having to add the .rvmrc to it)
zaychenok has joined #ruby
Siphonblast has joined #ruby
zenom has quit [Read error: No route to host]
udante has joined #ruby
axiak has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<mrbrdo> what does putiseq do in YARV VM?
<lectrick> apeiros_: holy crap. running a ruby script with the -W option is amazing
<mrbrdo> warning level?
<mrbrdo> why is that amazing? :)
d3c has joined #ruby
chrxn__ has joined #ruby
dfr|work has quit [Remote host closed the connection]
graspee has joined #ruby
chrxn has quit [Ping timeout: 244 seconds]
chrxn__ is now known as chrxn
xiaotian has joined #ruby
<apeiros_> lectrick: I stopped using -W the moment I started using 3rd party code.
<lectrick> apeiros_: yeah, that's the amazing part lol
<apeiros_> it's also the reason why i say ruby's warning system is broken.
<lectrick> some warnings are kind of silly (using an @attribute before it's set), I wish it was configurable
<apeiros_> it's useless the way it currently works.
<apeiros_> using @attribute before set is not silly.
g0bl1n has quit [Ping timeout: 246 seconds]
<apeiros_> it's a potential bug
<lectrick> apeiros_: well, a lot of stuff does that, let's just say
fserb has joined #ruby
mdw has joined #ruby
<apeiros_> sure
vmatiyko has left #ruby [#ruby]
<apeiros_> but since you can't flag where you know that @ivar might be nil…
zaychenok has quit [Read error: Connection reset by peer]
Siphonblast has quit [Ping timeout: 240 seconds]
zaychenok has joined #ruby
yoklov has joined #ruby
qwerxy has joined #ruby
axl__ has joined #ruby
axl__ has quit [Read error: Connection reset by peer]
mvangala_home has joined #ruby
coderhut has quit [Quit: Page closed]
PragCypher has quit [Read error: Connection reset by peer]
chienpo has joined #ruby
PragCypher has joined #ruby
fserb has quit [Quit: ttyl]
axl_ has quit [Ping timeout: 248 seconds]
axl_ has joined #ruby
koskoz has joined #ruby
enriclluelles has quit [Remote host closed the connection]
jeff_sebring has quit [Quit: Leaving]
workmad3 has joined #ruby
carbncl has quit [Quit: carbncl]
<mrbrdo> does anyone remember which gem it was that you could execute C code in ruby with?
<mrbrdo> like it compiled on the fly and executed it
<Hanmac> "inline c" ?
<mrbrdo> thanks
<cek> %x{gcc a.c}
<mrbrdo> it's rubyinline
<cek> jelaous
jenrzzz-mac has joined #ruby
<shevy> yeah, the warnings have become quite odd
zinjacoder has quit [Read error: Connection reset by peer]
<shevy> and they dont allow enough fine tuning
daniel_hinojosa has quit [Ping timeout: 246 seconds]
<shevy> like that ruby always warns when a variable is not used afterwards
<shevy> x = do_something
<shevy> it will warn if x is not used at all
axl__ has joined #ruby
<shevy> the problem then becomes for this:
<nullsign> so why is strata good?
<shevy> x,y,z = do_something
fayimora has joined #ruby
<shevy> when y is not used, it will warn ... but perhaps the author does not care about y, only about x and z
niklasb has joined #ruby
<billy_ran_away> I see a lot of methods where elements of an array used as a method argument can be either a symbol or a hash, I'm trying to do the same thing, is there a better way then this to get all the (element || element.keys.first?) http://cl.ly/HNSK
Targen_ has joined #ruby
dennda has left #ruby [#ruby]
zinjacoder has joined #ruby
EskiMag_ has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
Siphonblast has joined #ruby
<cek> you need to fix the caller
axl_ has quit [Ping timeout: 244 seconds]
<billy_ran_away> cek: Me?
chrxn has quit [Quit: Computer has gone to sleep.]
cek has quit [Quit: жопа диридай диридиридай]
EskiMag has quit [Ping timeout: 244 seconds]
EskiMag_ is now known as EskiMag
axl_ has joined #ruby
<jlogsdon> billy_ran_away: i dont think there's a better way, outside of shortening it to `mask.is_a?(Hash) ? mask.keys.first : mask`
<billy_ran_away> Yea, inline if...
bosphorus has joined #ruby
<jlogsdon> ternary*
<billy_ran_away> jlogsdon: Thanks for looking
<billy_ran_away> jlogsdon: Never heard it called that...
Kn|t3 has quit [Quit: Kn|t3]
<billy_ran_away> ternary |ˈtərnərē| adjective composed of three parts.
whitequark has joined #ruby
whitequark has left #ruby [#ruby]
<jlogsdon> Yup. Part 1 is condition, part 2 is TRUE result, part 3 is FALSE result
axl__ has quit [Ping timeout: 265 seconds]
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
jenrzzz-mac_ has joined #ruby
red-panda has joined #ruby
jrist has quit [Ping timeout: 252 seconds]
jenrzzz-mac has quit [Ping timeout: 240 seconds]
jenrzzz-mac_ is now known as jenrzzz-mac
ZachBeta has joined #ruby
jamiemill has joined #ruby
Targen_ has quit [Ping timeout: 246 seconds]
canton7 has joined #ruby
habib has joined #ruby
<habib> Hi Everyone
uris has quit [Ping timeout: 245 seconds]
ukd1 has quit [Quit: ukd1]
fbernier has joined #ruby
<digitalcakestudi> how would I format a number to something like 000001 from 1 ?
<eam> sprintf
<digitalcakestudi> where 0 fills in the empty place
<digitalcakestudi> thanks eam
enriclluelles has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
williamcotton_ has joined #ruby
jenrzzz-mac_ has joined #ruby
williamcotton has quit [Ping timeout: 246 seconds]
williamcotton_ is now known as williamcotton
MrGando has quit [Remote host closed the connection]
Siphonblast has quit [Ping timeout: 248 seconds]
<digitalcakestudi> so I have it figured out to encode to a number such as sprintf("%06d", 1) being 000001 but is there a way to revers that such as sprintf("%-06d", 000001) ??
<jlogsdon> digitalcakestudi: or String#rjust
<jlogsdon> try just %d?
sam113101 has quit [Remote host closed the connection]
<jlogsdon> if that doesn't work I dont think sprintf can handle that case
<digitalcakestudi> nice it works
<jlogsdon> :)
jenrzzz-mac has quit [Ping timeout: 244 seconds]
jenrzzz-mac_ is now known as jenrzzz-mac
<eam> 000001 is 1 already
<digitalcakestudi> trying to make my invoice ids look good
<digitalcakestudi> eam yeah if its an int but what about a string?
<digitalcakestudi> jk
<eam> that would be "000001" :)
<eam> and .to_i will turn it into 1
Kn|t3 has joined #ruby
kvirani has quit [Remote host closed the connection]
<digitalcakestudi> nice I will need that
<digitalcakestudi> thanks
<digitalcakestudi> going to be using as slugs in urls
schovi has quit [Remote host closed the connection]
Kn|t3_ has joined #ruby
sam113101 has joined #ruby
mdw_ has joined #ruby
Kn|t3 has quit [Ping timeout: 244 seconds]
Kn|t3_ is now known as Kn|t3
mdw has quit [Read error: Connection reset by peer]
nilg` has quit [Read error: Connection reset by peer]
Eldariof-ru has quit []
Xethron has quit [Ping timeout: 240 seconds]
davidw has joined #ruby
Xethron has joined #ruby
nilg has joined #ruby
davidw is now known as Guest3628
cespare has joined #ruby
c0rn_ has joined #ruby
teh4 has quit [Quit: Leaving]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
jmartin has quit [Quit: Leaving]
netogallo has joined #ruby
sepp2k1 has joined #ruby
xastion has quit [Ping timeout: 252 seconds]
nilg has quit [Remote host closed the connection]
jenrzzz-mac_ has joined #ruby
yankov has joined #ruby
jenrzzz-mac has quit [Read error: No route to host]
jenrzzz-mac_ is now known as jenrzzz-mac
sepp2k has quit [Ping timeout: 246 seconds]
xastion has joined #ruby
yoklov has quit [Quit: bye!]
neto_gallo has joined #ruby
neto_gallo has quit [Client Quit]
yoklov has joined #ruby
netogallo has quit [Client Quit]
netogallo has joined #ruby
<habib> what if interpreter says "couldn't load SDL"?
enriclluelles has quit [Remote host closed the connection]
nanderoo has quit [Quit: Leaving.]
geekbri has quit [Remote host closed the connection]
jamiemill has quit [Ping timeout: 240 seconds]
Siphonblast has joined #ruby
jrist has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
federic has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 244 seconds]
jimeh2 has joined #ruby
v0n has quit [Quit: Quitte]
yxhuvud has quit [Ping timeout: 244 seconds]
Bosma has quit [Quit: leaving]
visof has quit [Ping timeout: 244 seconds]
nilg has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
silentpost has joined #ruby
jimeh has quit [Ping timeout: 252 seconds]
bosphorus_ has joined #ruby
enriclluelles has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
zaychenok has quit [Read error: Connection reset by peer]
Guest3628 is now known as davidw
davidw has quit [Changing host]
davidw has joined #ruby
zaychenok has joined #ruby
bosphorus has quit [Ping timeout: 265 seconds]
fmcgeough has joined #ruby
Progster has quit [Ping timeout: 244 seconds]
enriclluelles has quit [Remote host closed the connection]
mengu has joined #ruby
netogallo has quit [Quit: Leaving]
cek has joined #ruby
<cek> bidirectional communication over a socket, please
<cek> blocking
nilg has quit [Read error: Connection reset by peer]
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
Siphonblast has quit [Ping timeout: 246 seconds]
<apeiros_> cek: is that a question?
<cek> apeiros_, depends on your answer
fantazo has joined #ruby
kvirani has joined #ruby
<cek> zaychenok, хуй!
nopcoder has joined #ruby
<cek> It seems like i can't get it working. I'm getting broken pipe, resouce unavail and all sort of errros.
enriclluelles has joined #ruby
<cek> all those examples on internets are ass sided one way implementations
<cek> who needs one way?
<habib> Просто интересно сколько русских на канале
<cek> pressed dislike. you're welcome
schovi has joined #ruby
habib has quit []
ukd1 has joined #ruby
<ukd1> hi guys, I'm having some minor issues with pretty url's not working. They work fine with the inbuilt server, but don't work using apache + passenger - requests just 404 from apache. Any suggestions?
<ukd1> (sorry, wrong channel!)
luxurymode has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Siphonblast has joined #ruby
<shevy> dumdedum
<daed> dumdedumdum
<daed> just got my kindle
stockholm has quit [Ping timeout: 265 seconds]
mucker has quit [Quit: leaving]
<shadoi> So, I'm profiling a TFTP server I wrote in ruby, it's (not surprisingly) very slow for file transfers.
__main__ has quit [Read error: Connection reset by peer]
<shadoi> Anyone have and good pointers on optimizing UDP socket file transfers?
<apeiros_> TFTP? /me googles
nopcoder has quit []
<apeiros_> shadoi: I heard EM was fast for IO…
_main_0 has joined #ruby
pu22l3r_ has joined #ruby
<apeiros_> also, I don't know, but maybe there's something like sendfile for udp?
<heftig> i don't think so
<heftig> UDP is message-based, not stream-based. and connection-less, too
<apeiros_> oh, seems sendfile works over udp too
<cek> udp is datagram based
<apeiros_> before 2008 only for files <64KB, though :)
<shadoi> I have to encode each packet, so… unless I move all of that code out to C, I'm stuck using ruby's sockets.
<cek> okay, so what about 2way comm over unix socket?
<apeiros_> shadoi: did you profile?
pu22l3r has quit [Ping timeout: 240 seconds]
yoklov has quit [Quit: bye!]
<shadoi> yeah
yoklov has joined #ruby
<shadoi> 48% of the time it's in UDPSocket.recvfrom
<shadoi> in the server...
yoklov has quit [Remote host closed the connection]
<shadoi> which confused me a bit
<heftig> cek: datagram or stream?
pu22l3r_ has quit [Ping timeout: 244 seconds]
Synthead has quit [Remote host closed the connection]
hynkle has quit [Quit: hynkle]
<apeiros_> shadoi: recvfrom blocks, no?
chrxn has joined #ruby
<apeiros_> in the server, try a select loop with nonblocking IO?
<cek> heftig, doesn't matter as long as it works. i need 2way on unix socket, blocking. thats all
<shadoi> I used recvfrom_nonblock as well
mdw_ has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
<apeiros_> btw., what's the difference between recvfrom and read
<shadoi> I'll try an eventmachine version and see how big of a difference it makes
Tricks has quit [Read error: Connection reset by peer]
dekroning has quit [Ping timeout: 265 seconds]
<shadoi> and maybe a celluloid::io version
hemanth has joined #ruby
Tricks has joined #ruby
S1kx has quit [Quit: Leaving]
axiak has quit [Remote host closed the connection]
zaychenok has quit [Read error: Connection reset by peer]
medik has joined #ruby
zaychenok has joined #ruby
Natch| has quit [Ping timeout: 248 seconds]
<billy_ran_away> Anyone know a good way to take a hash like { :default_formats => [], :formats => [], :format => [], :something_else => nil } and collect all the keys that include? "format" returning them as a hash, and modifying the original hash at the same time?
centipedefarmer has quit [Ping timeout: 248 seconds]
<billy_ran_away> select! I guess...
v0n has joined #ruby
zaychenok has quit [Client Quit]
<cek> did you know that you can retry the begin/rescue/end block on exception?
tommyvyo_ has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
workmad3 has quit [Ping timeout: 265 seconds]
zaychenok has joined #ruby
<cek> keys.grep /format/
<billy_ran_away> cek: I know how to do that part : )
codora has left #ruby [#ruby]
<cek> Hash#replace
schovi has quit [Remote host closed the connection]
Natch| has joined #ruby
red-panda has quit [Remote host closed the connection]
hydrozen has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Gavilan has joined #ruby
skinny_much has joined #ruby
red-panda has joined #ruby
horseman has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 244 seconds]
<lectrick> What is the fastest way to get the first 1000 characters of a string?
<apeiros_> lectrick: str[0,1000]
<lectrick> ty
linoj has quit [Ping timeout: 244 seconds]
nathanstaines has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> afaik it's COW
pvh has joined #ruby
lorandi has quit [Quit: Leaving]
<cek> okay, so it looks like you can open a socket 2 times in the same process. the 2way example is at http://apidock.com/ruby/v1_9_3_125/UNIXServer/accept . you can interchange the accept_nonblock for server and client flawlessly
mnaser has quit [Ping timeout: 252 seconds]
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
mnaser has joined #ruby
hakunin has joined #ruby
mmsequeira has joined #ruby
horseman has joined #ruby
<heftig> cek: here's a simple ECHO server and client: https://gist.github.com/2932985
fmcgeough has quit [Quit: fmcgeough]
sailias has quit [Ping timeout: 240 seconds]
<apeiros_> heftig: why not use UNIXSocket?
<heftig> apeiros_: because i'm blind
ben_alman has quit [Excess Flood]
enriclluelles has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
Progster has joined #ruby
* apeiros_ loves the revised enumerators…
jenrzzz-mac has quit [Ping timeout: 244 seconds]
<apeiros_> ObjectSpace.each_object(IO.singleton_class).to_a
asobrasil has left #ruby [#ruby]
<apeiros_> gets you all subclasses of IO :D
<cek> uninitialized constant Addrinfo (NameError)
<apeiros_> Errno::ETOOOLDRUBY
ken_barber1 has joined #ruby
AxonetBE has quit [Quit: Leaving.]
* apeiros_ wonders when Addrinfo was added…
Dreamer3 has quit [Read error: Connection reset by peer]
Dreamer3__ has joined #ruby
fayimora has quit [Quit: Busy…..zzzzz]
<cek> anyways, i don't think that code is 2 way. server looks like 2way, but client is just writing to remote peer
<apeiros_> cek: um, no
<apeiros_> line 31
<apeiros_> err, actually 27
<apeiros_> (31 reads the user input)
<cek> i meant vice versa
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<apeiros_> cek: no dude. both server and client are 2 way
<cek> where's server showing client's input?
<apeiros_> server read: 16, server write: 17, client read: 27, client write: 32
v0n has quit [Quit: Quitte]
<cek> where's "puts line" sent from client?
ken_barber has quit [Ping timeout: 245 seconds]
hubub has joined #ruby
<apeiros_> I just told you the line for all 4 IO operations.
<cek> uh shit, that's an echo server
<cek> i don't need an echo server, i need 2way communications with user
adeponte has quit [Remote host closed the connection]
<heftig> well duh
<apeiros_> those who can read have clearly an advantage…
<apeiros_> 23:13 heftig: cek: here's a simple ECHO server and client: https://gist.github.com/2932985
iocor has joined #ruby
<apeiros_> I don't know cek, but do you actually *read* the stuff people write you?
<cek> why would you need to make an echo server? internets are full of echo servers.
ph^ has joined #ruby
miles32 has joined #ruby
* apeiros_ facepalms
<cek> you just take any page and that's echo server right there
<cek> even national los alamos labaratory runs an echo server
<apeiros_> cek: dude, you asked for 2 way sockets. that's demo code for just that.
ben_alman has joined #ruby
<cek> i'm just wasting my time with all these echo servers. I need real solutions for real people.
schaerli has quit [Ping timeout: 245 seconds]
schaerli has joined #ruby
<apeiros_> but hey, it's nice how thankful you are towards heftig. I find it great that you took your time to say 'thank you'
<Sigma00> lawl what
cyong has joined #ruby
* apeiros_ puts his mental ignore hat on…
ringotwo has quit [Remote host closed the connection]
dsa has joined #ruby
<Sigma00> no no wait, this could get good
<apeiros_> no, it'd end in a kick and eventually a ban. I know how those things escalate.
ringotwo has joined #ruby
miles32 has quit [Remote host closed the connection]
<cek> That would be a fork!
bglusman_ has joined #ruby
<heftig> so we've provided a solution for the wrong problem, it seems
schaerli has quit [Remote host closed the connection]
EzeQL has quit [Ping timeout: 260 seconds]
<apeiros_> heftig: no, he doesn't articulate his problem. it's endemic with him. see his first "question".
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
wallerdev has quit [Quit: wallerdev]
hugoxrosa has quit [Quit: Saindo]
bglusman has quit [Ping timeout: 244 seconds]
horseman has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby
wallerdev has quit [Client Quit]
pk1001100011 has quit [Quit: Burn your gods and kill the king; Subjugate your suffering; Dead heart, in a dead world]
ph^ has quit [Ping timeout: 265 seconds]
andrewhl has quit [Remote host closed the connection]
Gavilan is now known as Gavilan2
vlad_starkov has quit [Remote host closed the connection]
<shadoi> Usually boils down to "Do my job for me!"
tscolari has quit [Remote host closed the connection]
<cek> it looks like it's impossible to do that wiht unixsocket classes
<lectrick> hey apeiros_ hope you had a delicious meal. did you already mention your opinion on https://gist.github.com/2932330 yet? (I may have missed it)
skinny_much has quit [Remote host closed the connection]
horseman has joined #ruby
uris has joined #ruby
<apeiros_> cek: odd, heftig disproved that statement with his demo code.
fserb has joined #ruby
<apeiros_> lectrick: whoops
<cek> he's not using unixsocket /unixserver
S1kx has joined #ruby
g0bl1n has joined #ruby
<apeiros_> lectrick: I feel uneasy with putting the env setup knowledge there
<cek> that's plain system calls there
<apeiros_> cek: yes he does.
<apeiros_> and yes, of course those result in system calls. like so much in programming. that's why you have a system…
<cek> anyone knows 2way implementation built on http://apidock.com/ruby/UNIXServer ?
<lectrick> apeiros_: Well there's no ideal place to put it, it has to land somewhere lol. But at least this allows me to have project-specific load paths "without even thinking"
<apeiros_> lectrick: yes, it's always a tradeoff
<apeiros_> but with that, you rely on rvm
<lectrick> apeiros_: Of course, when distributing a project, that knowledge is no longer there so you'd still need a test_runner that adds to the load_path
axolx has left #ruby [#ruby]
<apeiros_> the tradeoff with the runner.rb is that you can't just use the ruby executable. but it doesn't introduce additional dependencies.
<lectrick> apeiros_: In my case I'm just dealing with rails apps so it works
cgag has joined #ruby
<lectrick> cek: OALA
<apeiros_> lectrick: personally I think the test framework should actually do that. baretest was designed with that in mind.
joshman_ has quit [Ping timeout: 244 seconds]
udante has quit [Quit: Leaving...]
<apeiros_> unfortunately I'm stuck at rewriting it :(
vlad_starkov has joined #ruby
ph^ has joined #ruby
<lectrick> cek: by which I meant "opinions are like assholes... everybody's got one" because I know some prefer rbenv :)
fbernier has quit [Ping timeout: 265 seconds]
<cek> rvm is very unstable. they introduce bugs and change interfaces
<cek> amateurs
zaychenok has quit [Quit: Konversation terminated!]
<lectrick> yeah i've noticed lol. but our team uses it
zaychenok has joined #ruby
grendlme has quit [Remote host closed the connection]
<lectrick> don't get my started on how $HOME/.rvmrc is expected to be a completely different type of file than $project_dir/.rvmrc
horseman has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
<lectrick> me, not my
jenrzzz-mac has joined #ruby
<lectrick> cek: does rbenv have gemsets?
zaychenok has quit [Client Quit]
<cek> no idea, never tried, but I think we'll switch to it.
zaychenok has joined #ruby
<lectrick> I don't think it does. have to say that is a nicety of rvm even if rvm does it by making "gem" a function :O
horseman has joined #ruby
<workmad3> rbenv has a plugin for gemsets iirc
mengu has quit [Read error: Connection reset by peer]
hajoco has joined #ruby
<lectrick> ah ok.
pnbeast has joined #ruby
mjb2k has left #ruby ["Leaving"]
brian- has quit [Quit: Changing server]
<lectrick> So rbenv works by putting ruby commands ahead in your PATH via 'shims' so they grab them first.
brian- has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 245 seconds]
<lectrick> I suppose commands like 'ruby' and 'gem' resolve to /shims/ and those are scripts that determine your current Ruby version and then set the right things and run it
chson has quit [Remote host closed the connection]
alesguzik has joined #ruby
eurbach has quit [Quit: Leaving.]
yoklov has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<heftig> still the same. just with more class and less parameters
<cek> heftig, yeah, but you're too late. the trick here is not to open 2 servers accidentally or it won't work
<apeiros_> it's really sad that github didn't implement the commit view of the normal github service for gists.
wvdschel has joined #ruby
wvdschel has quit [Changing host]
wvdschel has joined #ruby
havenn has joined #ruby
sailias has joined #ruby
<cek> that is, unixserver creates the socket, but you must not #accept it, they you connect from "remote" via unixsocket, then you accept it on server if you want to listen and there you go with 2way
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
<apeiros_> cek: where are you coming from?
Frippe has quit [Ping timeout: 244 seconds]
<heftig> cek: what.
<heftig> of course you run #accept first thing
sspiff has quit [Ping timeout: 244 seconds]
uris has quit [Ping timeout: 265 seconds]
ph^ has quit [Ping timeout: 240 seconds]
fserb has quit [Quit: ttyl]
wvms has joined #ruby
internet_user has quit [Remote host closed the connection]
fayimora has joined #ruby
Criztian has quit [Remote host closed the connection]
fayimora has quit [Client Quit]
suborbital has joined #ruby
dv310p3r has quit [Ping timeout: 244 seconds]
tcopp has quit [Quit: Lost terminal]
billy_ran_away has quit []
horseman has quit [Read error: Connection reset by peer]
Frippe has joined #ruby
fayimora has joined #ruby
<digitalcakestudi> anyone here feel like helping me out with a cancan ability issue I'm having?
horseman has joined #ruby
wmoxam has quit [Quit: leaving]
bglusman_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
<cek> heftig, well, i wish i could get that working with https://github.com/pbosetti/SimpleIPC . i managed to get 2way locally, but this lib is giving me all the problems.
<digitalcakestudi> trying to can :read, Quote, user_ids.include?(user.id) where Quote habt user
<cek> all those assumptions because #accept and order of calls was because of that lib
<cek> it uses sockets in somewhat drastic way
mvangala_home has quit [Remote host closed the connection]
horseman has quit [Read error: Connection reset by peer]
balki has quit [Ping timeout: 245 seconds]
red-panda has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
cgag has quit [Remote host closed the connection]
camilo has quit [Remote host closed the connection]
<cek> thanks!
cek has quit [Quit: жопа диридай диридиридай]
red-panda has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
<apeiros_> wow. he… he said "thanks". that was unexpected.
horseman has joined #ruby
sailias has quit [Quit: Leaving.]
jimeh2 has quit [Quit: bye]
cyong has quit [Quit: Leaving.]
DMKE has quit [Ping timeout: 244 seconds]
zaychenok has quit [Client Quit]
khakimov has joined #ruby
koskoz has quit [Ping timeout: 265 seconds]
roams has quit [Ping timeout: 240 seconds]
zaychenok has joined #ruby
the_jeebster has quit [Quit: Leaving.]
carlyle has quit [Remote host closed the connection]
Monofu has joined #ruby
virunga has quit [Read error: Connection reset by peer]
Monofu has left #ruby [#ruby]
stockholm has joined #ruby
ceej has quit [Read error: Connection reset by peer]
Gavilan2 has left #ruby [#ruby]
ceej has joined #ruby
banseljaj is now known as imami|afk
jlogsdon has quit [Remote host closed the connection]
brian- has quit [Quit: leaving]
fantazo_ has joined #ruby
brian- has joined #ruby
ceej has quit [Remote host closed the connection]
yannis has quit [Ping timeout: 246 seconds]
jrist is now known as jrist-afk
tewecske has quit [Quit: Leaving.]
fantazo has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 265 seconds]
Banistergalaxy has joined #ruby
PaciFisT has quit [Quit: Leaving.]
jgarvey has quit [Quit: Leaving]
mnaser has quit [Quit: Computer has gone to sleep.]
DMKE has joined #ruby
Helius has joined #ruby
fserb has joined #ruby
fayimora has quit [Ping timeout: 244 seconds]
wangr has quit [Ping timeout: 244 seconds]
niklasb has quit [Ping timeout: 246 seconds]
etehtsea has quit []
qwerxy has quit [Quit: offski]
suborbital has quit [Ping timeout: 244 seconds]
jcromartie has quit [Read error: Connection reset by peer]
jcromartie has joined #ruby
jcromartie has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
g0bl1n has quit [Ping timeout: 246 seconds]
qwerxy has joined #ruby
hajoco has quit [Quit: hajoco]
billiamii has quit [Read error: Connection reset by peer]
DrForr has quit [Ping timeout: 248 seconds]
hadees has quit [Quit: hadees]
EskiMag has quit [Quit: EskiMag]
PragCypher has quit [Read error: Connection reset by peer]
neersighted is now known as neersight[d]
PragCypher has joined #ruby
cyong has joined #ruby
neersight[d] is now known as neersighted
ZachBeta has quit [Quit: Computer has gone to sleep.]
hasrb has quit [Remote host closed the connection]
cbuxton1 has joined #ruby
crankycoder has quit [Remote host closed the connection]
qwerxy has quit [Client Quit]
Helius has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ruby
cbuxton has quit [Ping timeout: 244 seconds]
suborbital has joined #ruby
mnaser has joined #ruby
d3c has quit [Read error: Connection reset by peer]
red-panda has quit [Remote host closed the connection]
indian has quit [Quit: Leaving]
red-panda has joined #ruby
havenn has joined #ruby
red-panda has quit [Remote host closed the connection]
d3c has joined #ruby
pk1001100011 has joined #ruby
<shevy> let's say I have a file called "foo.txt"
<shevy> can I require that and have it run as ruby code?
<shevy> require 'foo.txt'
<shevy> :P
hunglin has quit [Quit: Leaving.]
red-panda has joined #ruby
cyong has quit [Quit: Leaving.]
azaq23 has joined #ruby
bosphorus_ has quit [Remote host closed the connection]
<shevy> eval File.read('foo.txt')
<shevy> hmmmmmmmmm damn you eval
<hoelzro> shevy: you should write a sandbox module using mRuby =)
<hoelzro> I was thinking about that, but I don't have nearly enough experience with Ruby
<shevy> I got ruby code in some .cgi pages right now
<shevy> and now trying to turn them all out
<havenn> shevy: load 'foo.txt'
<shevy> wheeeee
<shevy> that seems to work just fine
<shevy> thanks
eywu1 has quit [Quit: Leaving.]
pu22l3r has joined #ruby
red-panda has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
red-panda has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
kvirani has quit [Remote host closed the connection]
DanBoy has quit [Remote host closed the connection]
pen has joined #ruby
piotr_ has joined #ruby
ken_barber1 has quit [Remote host closed the connection]
eywu has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
xastion has quit [Ping timeout: 252 seconds]
xastion_ has joined #ruby
simao has quit [Ping timeout: 265 seconds]
hadees has joined #ruby
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
nopolitica has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
<digitalcakestudi> is it possible to use cancan to prevent a user from calling a controller? vs a resource/model?
nfk has quit [Quit: yawn]
cyong has joined #ruby
cyong has quit [Max SendQ exceeded]
simao has joined #ruby
cyong has joined #ruby
punkrawkR has quit [Read error: Connection reset by peer]
cyong has quit [Client Quit]
<digitalcakestudi> for example I have a role :client were that use can :read Quote but I have two controllers where one is namescaped to client and that other admin. Now the client is for the clients and the admin is for the admins but a client and still call the controllers for the admin because the client can read
<digitalcakestudi> user*
cyong has joined #ruby
<digitalcakestudi> blaaa, I cant type today
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
S1kx has quit [Quit: Leaving]
iocor has quit [Ping timeout: 252 seconds]
tatsuya_o has quit [Remote host closed the connection]
greyEAX has quit [Ping timeout: 240 seconds]
dhodgkin_ has joined #ruby
dhodgkin has quit [Ping timeout: 252 seconds]
mockillo has quit [Ping timeout: 252 seconds]
Caius has quit [Ping timeout: 252 seconds]
dhodgkin_ is now known as dhodgkin
mockillo has joined #ruby
davidw has quit [Ping timeout: 248 seconds]
elrond255 has joined #ruby
explody has quit [Remote host closed the connection]
iocor has joined #ruby
<elrond255> can I write methods in a module and then access the method from a class within the same module? what is the syntax? are there pointers where to get that information?
<apeiros_> elrond255: methods either must be defined on self's singleton class, self's class or any of self's class' ancestors. that's the whole rule about methods in ruby. in all other cases, you must provide an explicit receiver for the method.
qwerxy has joined #ruby
<apeiros_> getting methods into self's singleton class can be done by a) def obj.foo; end, or b) obj.extend SomeModule
<elrond255> so if I create a method in the module ebook called process_foo I can call it from a module class my_process as ebook.process_foo?
nari has joined #ruby
<apeiros_> the only other speciality is that a module included into a class becomes part of that class' ancestry
<apeiros_> your module can't be called ebook. do you mean Ebook?
<apeiros_> and yes, if you define it on Ebook's singleton class, you can call it by Ebook.process_foo
<elrond255> yes, I forget the rules for casing of names some times
Caius has joined #ruby
stockholm has quit [Ping timeout: 245 seconds]
ziyadb has joined #ruby
horseman has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
kaneda__ has quit [Remote host closed the connection]
<elrond255> thank you
pu22l3r has quit [Remote host closed the connection]
minijupe has joined #ruby
elrond255 has quit [Quit: elrond255]
explody has joined #ruby
TorpedoSkyline has joined #ruby
kaneda has joined #ruby
kaneda is now known as Guest14217
EzeQL has joined #ruby
qwerxy has quit [Quit: offski]
kirun has quit [Quit: Client exiting]
Spaceghostc2c has joined #ruby
billiamii has joined #ruby
dsa has quit [Ping timeout: 260 seconds]
fserb has quit [Quit: ttyl]
zaychenok has quit [Quit: Konversation terminated!]
williamcotton has quit [Quit: williamcotton]
zaychenok has joined #ruby
zaychenok has quit [Client Quit]
zaychenok has joined #ruby
<minijupe> how do I access aggregate data with AR? Purchase.successful.select("sum(transactable_price) as total").on_day(Date.today-1.month).total >> undefined method `total'
xastion_ has quit [Ping timeout: 246 seconds]
<apeiros_> minijupe: #rubyonrails
<icy`> hi, what's a good way of storing multiple items which have a string (like a price), and a timestamp with that price? Could have many prices and timestamps per item
<minijupe> apeiros_: tried and failed there :(
<apeiros_> minijupe: that doesn't make this the right channel to escalate.
<minijupe> apeiros_: many ruby apps use active record, tho, not just rails.
<apeiros_> minijupe: not the point and I'm not going to argue about it.
<tamaska> hey guys
jcblitz has joined #ruby
<tamaska> would eventmachine or celluloid scale to running ruby code concurrenty on one of these? http://www.cray.com/Products/XE/Systems/XE6.aspx
zaychenok has quit [Client Quit]
<apeiros_> icy`: so the price and the timestamp belong together? Struct.new(:price, :timestamp), then have an array (or other collection) of these stored in your item.
zaychenok has joined #ruby
d3c has quit [Quit: Quit]
<icy`> apeiros_, ah, i forgot about structures =) ty.
alesguzik has quit [Quit: leaving]
<apeiros_> icy`: just a cheap way to create a class. creating a "full" class is perfectly reasonable too.
chrxn has quit [Ping timeout: 245 seconds]
chrxn has joined #ruby
g0bl1n has joined #ruby
<apeiros_> meh, I should finish that gist on cross-posting and restart kicking cross-posters.
<icy`> apeiros_, i was originally just going to have an array of the form [price, time, price2, time2...] and then step or w/e through it
adeponte has quit [Remote host closed the connection]
<Tasser> icy`, if it's semantically a struct, make it a struct ;-)
<Tasser> apeiros_, y u no sleep? :-)
<icy`> might be more overhead
<apeiros_> Tasser: sickness fucks up sleep schedule.
<icy`> if one item is holding an array of like 10 structs o.O
<apeiros_> icy`: never be afraid to create a class
<Tasser> icy`, so what?
wubino has quit [Quit: Leaving]
<apeiros_> icy`: oh noes! 10 structs! omg I think the ruby interpreter will burst in flames! :-p
<icy`> =)
Tref has quit [Quit: Tref]
<icy`> yes, i definitely miss ruby
<apeiros_> start worrying about such things when they actually become a problem.
suborbital has quit [Quit: WeeChat 0.3.9-dev]
<apeiros_> premature optimization yadda yadda…
Targen has joined #ruby
wangr has joined #ruby
<Tasser> apeiros_, ...
suborbital has joined #ruby
<Tasser> the perl yadda-yadda operator
suborbital has quit [Client Quit]
<Tasser> kinda equivalent to ruby raise NotImplementedError
<apeiros_> why am I not surprised that perl has a yadda-yadda operator?
suborbital has joined #ruby
g0bl1n has quit [Quit: Ex-Chat]
<Tasser> it's kind of got style
zeromodu_ has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
hunglin has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
zeromodulus has quit [Ping timeout: 246 seconds]
pk1001100011 has quit [Ping timeout: 248 seconds]
bricker88 has quit [Quit: Leaving.]
jimeh has joined #ruby
eywu has quit [Quit: Leaving.]
seanstickle has joined #ruby
fserb has joined #ruby