Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
<i8igmac> i think so
yfeldblum joined #ruby
<i8igmac> i thought there would be an easy way to do this
<i8igmac> airodump-ng -i mon0 > log.txt
<i8igmac> this logfile is blank
<i8igmac> maybe im doing it wrong
atmosx joined #ruby
eywu joined #ruby
<mksm> i8igmac, probably
atmosx joined #ruby
<i8igmac> what simple ways would you read output of a program
Reikoku joined #ruby
<mksm> just run it
<i8igmac> this app runs for ever
<mksm> so it's not printing any output
<mksm> s/so/then/
libertyprime joined #ruby
Pip joined #ruby
Pip joined #ruby
Reikoku joined #ruby
dasfugufish joined #ruby
Cerales joined #ruby
Cerales_ joined #ruby
Cerales left #ruby
Cerales joined #ruby
arpegius_ joined #ruby
raincole joined #ruby
randym joined #ruby
matled joined #ruby
uxp joined #ruby
lkba joined #ruby
bwlang joined #ruby
nimred joined #ruby
radic joined #ruby
RobotOlivaw joined #ruby
milkpost_ joined #ruby
Knodi joined #ruby
minijupe joined #ruby
blueadept` joined #ruby
cableray joined #ruby
Cerales joined #ruby
csavola joined #ruby
vandemar joined #ruby
jonathanrwallace joined #ruby
notbrent joined #ruby
stephenjudkins joined #ruby
Cerales joined #ruby
QaDeS_ joined #ruby
mztriz joined #ruby
<mztriz> Could someone help me with this small script? http://pastie.org/private/cfxexh8cwmfdqvq8ohyqw
<mztriz> I'm having problems with fileutils
Cerales joined #ruby
igotnolegs joined #ruby
namidark joined #ruby
<mksm> mztriz: what problem?
<mztriz> I'm not sure fileutils can't rename the file I'll show you the exact error message.
<mztriz> I believe it's a problem with my syntax
Cerales joined #ruby
Cerales joined #ruby
evenix joined #ruby
zedUNDginger joined #ruby
hadees joined #ruby
_debo joined #ruby
<shadoi> mztriz: you should just use shell globbing, don't make ruby do it
flip_digits joined #ruby
<shadoi> you're also not changing to the directory, you're just reaching into it with the Dir.entries call, so the mv can't find the file in the current dir.
<mztriz> shadoi, Ah I see what you're saying. Thanks.
namidark joined #ruby
<mztriz> shadoi, can you point me where to find some good examples of globbing with Dir?
<shadoi> Dir.glob in the docs
<shadoi> but
<shadoi> you can also just use something like fixname.rb <newname> filespec*.rb
<shadoi> and then just iterate over every file that the glob matches
nari joined #ruby
<shadoi> (from the shell, they'll be in ARGV)
<shadoi> then add opt parsing to make it nicer.
<shevy> and ponies to make it look cuter
<shevy> mztriz also check if the file exists first.
<shevy> if File.exist? your_file_here
<shevy> # continue something blablabla
<shevy> end
<mztriz> shevy, thanks I didn't even think of that.
nerdy joined #ruby
<shevy> yeah I forget it a lot too
<shevy> but it makes for nicer programs if they check, and then report to the user that the file was not found, so the program could not continue
CannedCorn joined #ruby
<mztriz> shevy, yeah exactly, thanks again!
sdwrage joined #ruby
esparkman joined #ruby
randym_ joined #ruby
evenix joined #ruby
dfamorato joined #ruby
eignerchris joined #ruby
Cerales joined #ruby
developish joined #ruby
maletor joined #ruby
cwarden joined #ruby
kuadrosx joined #ruby
linoj joined #ruby
<cwarden> is there a way to convert an array into multiple arguments to a function? i want to do something like this: files = ["a", "b"]; system("ls", files)
<zedUNDginger> cwarden: *files
<shevy> cwarden the * is the splat operator
roaminghorse joined #ruby
<cwarden> awesome. thanks!
dfamorato joined #ruby
<shevy> require 'pp'; def foo(*args); pp args; end; foo("lalal","bla","ble"); # => ["lalal", "bla", "ble"]
Cerales joined #ruby
<shevy> it throws the shit into an array so you can call it with as many arguments as you like
dasfugufish joined #ruby
mikeric joined #ruby
<samuelkadolph> Why would you use pp there?
excelsio1 joined #ruby
iamjarvo joined #ruby
<shevy> I use pp everywhere
<shevy> even in your pants
<samuelkadolph> Stay out of my pants
<shevy> :(
<shevy> ok
kdrsx joined #ruby
dankest joined #ruby
dhruvasagar joined #ruby
dbgster joined #ruby
Cerales joined #ruby
libertyprime joined #ruby
fixl joined #ruby
wyhaines joined #ruby
Cerales joined #ruby
peterhil` joined #ruby
jay_zawrotny joined #ruby
Kiall joined #ruby
Cerales joined #ruby
sinuc joined #ruby
sinuc joined #ruby
excelsior joined #ruby
rkk joined #ruby
tomzx joined #ruby
eywu joined #ruby
dotnull joined #ruby
excelsior joined #ruby
ghosTM55 joined #ruby
josh_ joined #ruby
Cerales joined #ruby
excelsior joined #ruby
CannedCorn joined #ruby
satyavvd joined #ruby
cableray joined #ruby
Cerales joined #ruby
wedgeV joined #ruby
nso95 joined #ruby
excelsior joined #ruby
kuadrosx joined #ruby
excelsior joined #ruby
choffstein joined #ruby
Cerales joined #ruby
<choffstein> Hey all -- quick question. Is there a way to have an anonymous class act as a closure? So, for example, can I do something like: y = 5; (Class.new do def self.x; y; end end).x and have it return 5? I keep getting a 'y not defined' error
<zedUNDginger> choffstein: yes
<zedUNDginger> choffstein: Class.new { define_singleton_method(:x) { y } }
<sj26> who actually runs rubygems these days?
ghosTM55 joined #ruby
<choffstein> Oh, nice. THanks.
nso95 left #ruby
<zedUNDginger> sj26: you do
ethndbst joined #ruby
ethndbst joined #ruby
<sj26> no, I mean who is hosting the website / has admin powah?
<zedUNDginger> sj26: you do, i think. But correct me if i'm wrong.
<sj26> nope
p0y joined #ruby
<sj26> the maintainer of ruby-debug19 must think rubygems is still pulling his gems from rubyforge, but this behaviour was disabled in a release a while back? In any case, we need the new ruby-debug19, linecache19 and ruby-debug-base19 gems pulled
<sj26> i'm trying to find someone who can help
sdwrage joined #ruby
Harzilein joined #ruby
<Harzilein> hi
<developish> sj26, amen to that. it's badly broken
kdrsx joined #ruby
<sj26> developish: ruby-debug is actually fixed, there are working gems on http://rubyforge.org/frs/?group_id=8883, just not pushed to rubygems
<zedUNDginger> sj26: why dont you contact the ruby-debug maintainer?
<Harzilein> is there something comparable to perl's File::Find for ruby? maybe even with a find2perl-like find2ruby?
<sj26> zedUNDginger: they're unresponsive
<developish> sj25, oh, cool
<zedUNDginger> sj26: then file an issue
<sj26> zedUNDginger: already done
<zedUNDginger> sj26: get some of your pals to +1 the issue
<sj26> still no response
<zedUNDginger> sj26: ok
<zedUNDginger> sj26: join #rubygems
<shevy> Harzilein what is Perl's File::Find doing?
<Harzilein> shevy: it's about having the same amount of functionality as the unix find utility in a programmable way. so, directory traversal with options to filter it
<Harzilein> shevy: the idea of find2perl then is to build upon that to convert find command lines to short perl scripts
akem joined #ruby
akem joined #ruby
<Harzilein> shevy: and my use case is starting with some, say find . -newer something -exec file '{}' \; command line and later deciding i want something programmable with the magic gem instead, but no real desire to write the directory traversal code
<Harzilein> shevy: oh, nvm, looks like that is in the sdtlib
<Harzilein> shevy: does not have a lot of default behaviour, so i guess writing some find2ruby would be harder
kuadrosx joined #ruby
sonkei joined #ruby
<shevy> hmm
<shevy> now that you mention it
<shevy> without comments, find2perl has about 660 lines of code
<shevy> I think you need some equivalent ruby file
<shevy> in other words, something big too :)
<shevy> now if someone were to port that hehe
gregorz joined #ruby
Sailias joined #ruby
excelsior joined #ruby
cwarden left #ruby
Cerales joined #ruby
juarlex joined #ruby
excelsior joined #ruby
wilmoore joined #ruby
<akem> hey, does anyone knows if it is possible to disable open-uri file caching? on Windows it create C:
<akem> C:\Users\names\open-uriXXXX each time
mindCrime joined #ruby
JumpMast3r joined #ruby
<shevy> that sounds annoying
<akem> i don't want it to read/write file each time, maybe it is possible to completly disable caching for ruby
colloquialismic joined #ruby
<shevy> akem one option would be to uncomment the code
<akem> yes it is a bit annoying...
<akem> to uncomment the code?
<shevy> I don't find any File.new or File.open in open-uri.rb though
<shevy> sure. the part that creates an open-uriXXXX file. hmm can you give a specific name actually?
<shevy> only thing I found so far is Tempfile
<akem> open-uri20111028-2876-104l23f-0
<shevy> require 'tempfile'; io = Tempfile.new('open-uri')
kuadrosx joined #ruby
<shevy> hmm ... so it also stores the date ...
<epitron> akem: it does??
<epitron> oh, i guess that's so you can do file operations on the file handle
<akem> i have thousand of that in my Users directory and it's not even in Tmp/
<epitron> seek and whatever
<shevy> oh
Cerales joined #ruby
<shevy> akem, I think Tempfile is the guilty party
<akem> :(
<shevy> require 'tempfile' # => true
<shevy> io = Tempfile.new('open-uri') # => #<File:/Depot/Temp/open-uri20111202-4115-1w7v0yt-0>
<epitron> akem: what's ENV['TEMP'] say?
<shevy> the format matches precisely to what you see akem so i conclude that tempfile is doing that
pencilcheck joined #ruby
jmcphers joined #ruby
<akem> $ ruby -e "p ENV['TEMP']"
<akem> nil
<akem> i see
ceej joined #ruby
<shevy> well
<shevy> no idea why it insists on wanting to store that in your users directory
<shevy> here for me, open-uri.rb is at /usr/lib/ruby/1.8/open-uri.rb
rotor_ joined #ruby
<shevy> for you it may be under ... /ruby/lib/ruby/1.8/open-uri.rb
<shevy> or 1.9.x something
<shevy> the tempfile code starts at line 301
<shevy> :/
<rotor_> i need some help im trying to make an infinate loop that executes a command every few seconds
<shevy> I really have no idea if a tempfile is required or not
_kinderman joined #ruby
<shevy> rotor_, use loop {}
<rotor_> ok
daniel_hinojosa joined #ruby
<shevy> that makes your loop
<akem> is it possible to subclass tempfile or something so it won't do any disk IO but use RAM only?
<shevy> as for the command, use a small method, where you can specify when it has to run. you can use sleep(5) for sleeping 5 seconds, then continuing to run the loop
<shevy> akem sorry, no idea, perhaps someone else knows
<akem> ok, nm, thanks for the help already.
colloquialismic joined #ruby
Cerales joined #ruby
blueadept` joined #ruby
<akem> epitron, do you have any suggestions?
x0F__ joined #ruby
roaminghorse joined #ruby
Cerales joined #ruby
daniel_hinojosa joined #ruby
Wizywig joined #ruby
<epitron> akem: open-uri overrides open
_debo joined #ruby
<epitron> you can copy/paste open-uri's source code and modify it to your likes
<epitron> akem-uri
<epitron> or re-monkeypatch the method that open-uri monkeypatches :)
bjhaid joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
ryanf joined #ruby
<fixl> hmm when would you use symbols in ruby? I don't quite understand .... can i assign values to symbols?
<shevy> fixl symbols are often a source of confusion
<shevy> the first thing to remember about symbols, the most important thing is
<shevy> they are boring
Cerales joined #ruby
<fixl> but the object id is always the same ... there must be some quirks to it on when to use them
<fixl> coming from java .... you have to forget a few concepts to be comfy with ruby ^^
<shevy> the object id is the same because a symbol is always the same
<shevy> a "foo" string on the other hand is a string object
<shevy> "foo".object_id # => -613424848
<shevy> "foo".object_id # => -613427438
<shevy> see, different ids
<shevy> when you use :foo you have the same ID
<shevy> but really, symbols are boring
looopy joined #ruby
<shevy> usually you find them in a hash
<shevy> { :foo => 'blablablabla blablkasdkljdas asd' }
Y_Ichiro joined #ruby
<rotor_> does anyone know howto change the bots nickname in isaac
Ruthenium joined #ruby
<akem> epitron, thanks, yea i will try that / tried to replace that Tempfile but it tries to reaccess it later
IdleWarship joined #ruby
<shevy> hmm
<epitron> akem: why not just patch it to put the temp file in your temp dir
<epitron> did you look at ENV['TEMP']?
<epitron> that could be your problem
<IdleWarship> Are any of you rubyists heavy Quora users?
<shevy> he already pasted that, he got nil I think
<shevy> but come to think about it
<shevy> I find that odd
<shevy> IdleWarship I never heard of Quora but I make good use of RedWine
<ryanf> uh you mean redmine?
<ryanf> IdleWarship: definitely wouldn't say heavy, I go on there now and then
<shevy> RedWine!!!
<IdleWarship> shevy: I'm not familiar with that term.
<IdleWarship> ryanf: Well, maybe you'd be interested in https://github.com/stormy/Quora-Personal-Analytics
io_syl joined #ruby
<ryanf> oh, nah, I have barely done anything really
<ryanf> sorry
mengu_ joined #ruby
mengu_ joined #ruby
<akem> epitron, looks like it is undefined, i run it from Cygwin / i would prefer without real file IOs if possible, this is for constants RSS feeds ... gonna monkeypatch it.
<IdleWarship> The reason I ask is that I've never really used Ruby before, and I'm trying to figure out Stormy's script.rb as a primer.
Behi joined #ruby
<IdleWarship> I'm getting an error that ends " `require': no such file to load -- CSV (LoadError) "
<looopy> does anyone here use mongodb? i'm trying to decide between mongoid and mongomapper
<shevy> IdleWarship, require 'csv' # => true
<shevy> works here. Perhaps something is wrong with your ruby installation
<shevy> hmm
<shevy> perhaps just lowercase it IdleWarship ?
<shevy> require 'CSV' # => LoadError: no such file to load -- CSV
yekta joined #ruby
badabim joined #ruby
Cerales joined #ruby
cantonic joined #ruby
iamjarvo joined #ruby
cdepue joined #ruby
zodiak joined #ruby
wedgeV joined #ruby
Targen joined #ruby
<IdleWarship> shevy: If there was something wrong with my ruby install, I wouldn't know, and I wouldn't know how to fix it. :[
<shevy> IdleWarship well that is bad then. however as you can see, the faulty code is that it is "CSV" rather than "csv"
<shevy> so simply find that line and exchange it
<shevy> I hope you can use an EDITOR ;)
kawa_xxx joined #ruby
nonotza joined #ruby
Cerales joined #ruby
wedgeV joined #ruby
j3r0m3 joined #ruby
brownies joined #ruby
luckyruby joined #ruby
igotnolegs joined #ruby
bjhaid joined #ruby
bjhaid left #ruby
Cerales joined #ruby
Surfer768 joined #ruby
<Surfer768> good morning from Cape Town! Which Ruby books would anyone recommend to learn and get a good grip on the language and programming in general?
<Surfer768> I have Programming Ruby and Learning Ruby
h4mz1d joined #ruby
<brownies> i read the free one online... worked out well.
<Surfer768> brownies: thanks
_catch joined #ruby
shadoi joined #ruby
<brownies> sorry i know that was useless
<brownies> Surfer768: i meant this one http://www.ruby-doc.org/docs/ProgrammingRuby/
akem joined #ruby
raythecat joined #ruby
Cerales joined #ruby
<Surfer768> Thanks! Signing off now... have a great day peeps!
kuadrosx joined #ruby
Emmanuel_Chanel joined #ruby
sgd joined #ruby
hooper joined #ruby
pencilcheck joined #ruby
bluOxigen joined #ruby
hemanth joined #ruby
stephenjudkins joined #ruby
bornmw joined #ruby
bornmw left #ruby
RLa joined #ruby
wmoxam joined #ruby
wmoxam joined #ruby
Asher joined #ruby
badabim joined #ruby
nonotza_ joined #ruby
hemanth joined #ruby
jkeith joined #ruby
zedUNDginger joined #ruby
yxhuvud joined #ruby
stephenjudkins joined #ruby
yann2 joined #ruby
jarjar_prime joined #ruby
JohnBat26 joined #ruby
djdb joined #ruby
Cervajz joined #ruby
epochwolf|2 joined #ruby
mikeric joined #ruby
Cervajz_ joined #ruby
roaminghorse joined #ruby
smgt joined #ruby
bluOxigen joined #ruby
otakutomo joined #ruby
burgestrand joined #ruby
headius joined #ruby
kuzushi joined #ruby
otakutomo joined #ruby
JumpMast3r joined #ruby
poga joined #ruby
nachtwandler joined #ruby
quest88 joined #ruby
xpot joined #ruby
danielpunt joined #ruby
wilmoore joined #ruby
p1d joined #ruby
rpowell joined #ruby
raythecat joined #ruby
daniel_hinojosa joined #ruby
danielpunt joined #ruby
Zert joined #ruby
<Zert> hello ppl
<Zert> can you help me with sanitize?
<Zert> some encoding issues
pencilcheck joined #ruby
manizzle joined #ruby
pen_ joined #ruby
Spockz joined #ruby
j3r0m3 joined #ruby
jarjar_prime joined #ruby
ph^ joined #ruby
zennny joined #ruby
mafolz joined #ruby
jacortinas joined #ruby
odinswand joined #ruby
<odinswand> where is space ghost?
odinswand left #ruby
krz joined #ruby
beseku joined #ruby
Morkel joined #ruby
j3r0m3__ joined #ruby
burgestrand joined #ruby
jetblack joined #ruby
<rotor_> k
Telling joined #ruby
robotmay joined #ruby
batlock666 joined #ruby
bosphorus joined #ruby
zommi joined #ruby
vtr joined #ruby
stoffus joined #ruby
Spockz_ joined #ruby
ihji joined #ruby
tonini joined #ruby
becom33 joined #ruby
fl0w joined #ruby
trivol joined #ruby
workmad3 joined #ruby
<becom33> in here Im not getting I'm not getting the correct awnser, one.txt only has the word "test" (without the qoutes) .. anyway I think I know the problem . its becoz its jump in to the next line I guess . I have no idea how to fix this .. can anyone help ?
emmanuelux joined #ruby
<becom33> anyone ?
<burgestrand> becom33: every item in the readlines enumerator also contains the ending \n
j3r0m3 joined #ruby
<burgestrand> but I have no idea what you’re asking for so that might not be it at all
<burgestrand> either way, strip it out and you’ll get another result
fleas joined #ruby
BiHi joined #ruby
<becom33> burgestrand: what is the best way to go trought a wordlist one line by one without getting \n in the end ?
<burgestrand> becom33: run String#chomp on each of the lines
<burgestrand> but that is not the best way, it is *one* way
maletor_ joined #ruby
Harzilein joined #ruby
<burgestrand> there are many best ways
<Harzilein> hi
Axsuul joined #ruby
<becom33> burgestrand: :/ any example ?
<becom33> thanx
<becom33> you mean chomp it before convering into md5 ?
<becom33> hay it worked
iocor joined #ruby
ephemerian joined #ruby
zedUNDginger joined #ruby
roaminghorse joined #ruby
zedUNDginger joined #ruby
<burgestrand> ;)
<zedUNDginger> burgestrand: burgdiggity dogg
sandelius joined #ruby
<burgestrand> zedUNDginger: dungdigger!
sandstrom joined #ruby
Seisatsu joined #ruby
dankest joined #ruby
pi3r joined #ruby
<dankest> How would I match a regex multiple times in a body of text and put all the matches in to an array?
Zert left #ruby
<burgestrand> dankest: String#scan
becom33_ joined #ruby
<dankest> burgestrand: awesome, thank you
havenn joined #ruby
Ch4rAzZz joined #ruby
<burgestrand> \o/
manizzle joined #ruby
mklappst_ joined #ruby
apok joined #ruby
Ammar01 joined #ruby
<becom33_> =)well I have two classes in the same file . I need split the in to two files . how can I do that ?
ikaros joined #ruby
roaminghorse joined #ruby
tobym joined #ruby
becom33 joined #ruby
jbpros joined #ruby
beseku joined #ruby
acts_as_david joined #ruby
Adman65 joined #ruby
Adman65 joined #ruby
p0y_ joined #ruby
beseku left #ruby
<burgestrand> becom33: put them in separate files, require the files using require
_debo joined #ruby
<burgestrand> One of them will be your main file, I guess, becom33?
mxweas_ joined #ruby
becom33 joined #ruby
p0y joined #ruby
<tonini> becom33: check out http://mislav.uniqpath.com/poignant-guide/book/ it looks like you need some basics. ;)
iocor joined #ruby
KaZeR_W joined #ruby
<Harzilein> is anyone familiar with how to add an element as first child node with nokogiri? there are pages suggesting i need to use builder blocks for that, but reading the api docs for builder does not really clarify it that much...
<Asher> add_child i think
<Asher> lemme see
xec joined #ruby
<Asher> i think you can also just push it on to children
<Asher> well unshift it in this case
<Asher> ya add_child
mikewintermute joined #ruby
eko joined #ruby
eko joined #ruby
<Harzilein> Asher: oh, sorry, i forgot to stress i want to put it as _first_ node
<Asher> did you try children.unshift
<Harzilein> children was suggested before, but will it be defined if the element does not have children?
<Asher> yes
<Asher> i believe so
becom33 joined #ruby
<Harzilein> ruby-1.9.2-p290 :009 > html.css("body").children.unshift(div)
<Harzilein> NoMethodError: undefined method `unshift' for #<Nokogiri::XML::NodeSet:0x00000000a19c80>
friskd joined #ruby
<Harzilein> hmm...
<Harzilein> otoh
<Asher> i think there is an add_before or something
<Asher> it's been a while since i wrote my code using this stuff
<Harzilein> yes, but i'd need to reference a child then so it wont work on empty elements
james_cotterill joined #ruby
tobym joined #ruby
<Asher> ah here we go
<Asher> it's just called #before
jensn joined #ruby
becom33 joined #ruby
matti joined #ruby
matti joined #ruby
<Harzilein> Asher: as i (and the stackoverflow article i read, which unspecifically mentions builder to overcome this limitation) already said, it does not work with empty elements:
p0y_ joined #ruby
<Harzilein> ruby-1.9.2-p290 :017 > html = Nokogiri::HTML("<html><body></body></html>") ; div = Nokogiri::XML::Element.new("div",html) ; div.content = "blah" ; html.css("body").children.before(div)
<Harzilein> NoMethodError: undefined method `before' for nil:NilClass
p0y joined #ruby
adambeynon joined #ruby
<Harzilein> oh well, i guess i need to write a helper method then that will just add the child if there are no children
becom33 joined #ruby
polymar joined #ruby
hurikhan|Work joined #ruby
mxweas_ joined #ruby
abstrakt_ joined #ruby
<Asher> yeah i guess you just have to check to see if it's defined first… that's pretty lame
becom33 joined #ruby
workmad3 joined #ruby
dhruvasagar joined #ruby
John_P joined #ruby
pi3r joined #ruby
ikaros joined #ruby
bgupta joined #ruby
zedUNDginger joined #ruby
becom33 joined #ruby
DarkFoxDK joined #ruby
<becom33> how can I continue a loop without exiting, for a example starts with 'a'..'z' it normaly starts a end with z . but after that aa still az and then aaa and till aaz then aaaa and till aaaz .. and on and on
elliot98 joined #ruby
elliot98 joined #ruby
jhunter joined #ruby
<becom33> anyone ? did anyone atleast got what I'm trying say ?
becom33 joined #ruby
<udoprog> becom33: sounds like you are trying to permutate a-z, perhaps it's better if you explain what you are trying to do?
Ruthenium joined #ruby
<becom33> udoprog: trying to write a simple bruteforcer :/
<becom33> so for that and I need to run trought numaric , alpha and simbols
Pcboy__ joined #ruby
burgestrand joined #ruby
<Ruthenium> (33..126).each {|i| print i.chr}
becom33_ joined #ruby
<udoprog> for a general solution, it's a bit more involving, first you would probably loop to increase password length, then calculate the number of permutations (number of chars^password length) and permutate the different positions depending on which position you are at
<udoprog> there are probably some implementations out already, do a quick google for "ruby brute force generator" or something
iocor joined #ruby
<becom33_> what I made a big array with all the carach included . then simpley tell me how can I go on aaa , aaaa , aaaa without exiting the loop ?
becom33 joined #ruby
pduersteler joined #ruby
<shevy> becom33_ what
clockwize joined #ruby
<shevy> Where are the well-formulated sentences man.
bluOxigen joined #ruby
becom33_ joined #ruby
becom33 joined #ruby
clockwize joined #ruby
_debo joined #ruby
<zedUNDginger> shevy: http://i.imgur.com/M5mav.jpg
becom33 joined #ruby
becom33_ joined #ruby
Clooth joined #ruby
<pduersteler> how can I bitwise shift a hex pack (e.g. ["e0"]) one up / one down? (e.g. to "e1") ?
<shevy> the .pack stuff is pure magic to me
<pduersteler> i also don't quite get it but we have a little internal competition ;)
Drakx joined #ruby
_debo joined #ruby
<pduersteler> i mainly need to know how to shift a hex value one up/down, i already got the basics of the pack stuff
<Ruthenium> pduersteler: unpack, shift, pack
<pduersteler> Ruthenium could you explain the "shift" part?
Samoi joined #ruby
<Ruthenium> well, bitwise shift is << and >>
becom33 joined #ruby
vtr joined #ruby
vtr joined #ruby
<pduersteler> so i basically shift one up by << 1? or by << 16?
<Ruthenium> if you want to get e1 from e0 you just add 1
<Ruthenium> it's not shift
becom33_ joined #ruby
<Ruthenium> if you want to shift 1 bit left, you do << 1
<Ruthenium> and it's equivalent to multiplication by 2
<pduersteler> okay, but lets assume i have 0xd9. how do i put this one higher? I'm a complete noob on bitwise operations
<Ruthenium> "0xd9".to_i(16) << 1
<pduersteler> hmm..
TheNumb joined #ruby
<Ruthenium> if you want to convert it back to hex do #to_s(16)
fl0w joined #ruby
<pduersteler> yup
<pduersteler> but.. e.g : ("0x04".to_i(16) << 1).to_s(16) gives 8. which is to expect since << 1 multiplicates. but I am looking for 5, then, and not 8
<udoprog> pduersteler: do the same but (+) add one
<udoprog> pduersteler: 0xff and 255 represents the same number with different radixes
<udoprog> so adding one on 0xff would turn to 0x100, the same as 255 would be 256, really no magic, you are just used to the decimal (radix 10) system
<pduersteler> ah, damn, right
enikar joined #ruby
<pduersteler> thanks
Guedes joined #ruby
Guedes joined #ruby
<udoprog> pduersteler: np
zedUNDginger joined #ruby
tatsuya_o joined #ruby
stoffus joined #ruby
Sliker joined #ruby
luoluoluo joined #ruby
<aces1up> what is the proper way to add a class instance variable when using a method to create new class methods?
<zedUNDginger> aces1up: it's impossible
fff joined #ruby
<fff> hy
fff left #ruby
iocor joined #ruby
SaneWarning joined #ruby
tk_ joined #ruby
randym joined #ruby
clockwize joined #ruby
jbpros joined #ruby
mxweas_ joined #ruby
Jake232 joined #ruby
BrianE joined #ruby
bdiallo joined #ruby
fermo joined #ruby
bluOxigen joined #ruby
ikaros joined #ruby
BiHi_ joined #ruby
<zedUNDginger> can someone give me code to tell me the method name of the caller
cdepue joined #ruby
Squarepy joined #ruby
smooki joined #ruby
Squarepy joined #ruby
<smooki> hiya
<smooki> how to create a Class instance given it's name (string) ?
<smooki> eval ? :S
DeeTah left #ruby
bluOxigen joined #ruby
<zedUNDginger> smooki: impossible
<smooki> really ? :O
<zedUNDginger> Yeah
<smooki> hmmm
visof joined #ruby
visof joined #ruby
<smooki> Object.const_get ?
<zedUNDginger> smooki: look it's not possible pls just give up and let everyone sleep
<smooki> Object.const_get seems to work
<zedUNDginger> i cant sleep with all this banging in my ears caused by anxiety feeling you struggle in this im in my little wooden house shaking on the hill you're banging at the windows not letting me sleep pls give up and let me sleep
<smooki> bot ?
<zedUNDginger> Yeah
fermion joined #ruby
mengu joined #ruby
visof left #ruby
tvw joined #ruby
wyhaines joined #ruby
fixl joined #ruby
robotmay joined #ruby
kawa_xxx joined #ruby
mxweas_ joined #ruby
danielpunt joined #ruby
wyhaines_ joined #ruby
kalusn joined #ruby
jensn joined #ruby
LouisJB joined #ruby
nicoulaj joined #ruby
oming joined #ruby
wyhaine__ joined #ruby
wyhain___ joined #ruby
wyhain___ joined #ruby
wyhai____ joined #ruby
wyhaines_ joined #ruby
dfr|work joined #ruby
RomD` joined #ruby
wyhaines joined #ruby
wyhaine__ joined #ruby
jbpros joined #ruby
wyhaine__ joined #ruby
wyhain___ joined #ruby
wyhai____ joined #ruby
wyhaines_ joined #ruby
moonunit joined #ruby
wyha_____ joined #ruby
wyh______ joined #ruby
wyhaines joined #ruby
iboB joined #ruby
wy_______ joined #ruby
wyhaine__ joined #ruby
<iboB> hey, why does `mklink a b` raise ``': No such file or directory - mklink
<iboB> how come it works with copy and other stuff, but fails only on mklink?
<iboB> this is windows
Squarepy joined #ruby
<iboB> it worked with `call mklink a b`
mjording_ joined #ruby
Squarepy joined #ruby
annon joined #ruby
dazoakley joined #ruby
jaspervdj_ joined #ruby
max_ joined #ruby
sixteneighty joined #ruby
yourstrly joined #ruby
<yourstrly> is ironruby on topic here?
flip_digits joined #ruby
<Tasser> yourstrly, try it
<yourstrly> do Ironruby Tools require retail VS edition?
jamiemill joined #ruby
zedUNDgi_ joined #ruby
fixl joined #ruby
bobsaccamano joined #ruby
<bobsaccamano> hi..I know this is off topic, but does anyone here use svn with an external merge tool in linux?
<bobsaccamano> the relevant channels #svn #linux seem to devoid of any experts
<shevy> haha
rickmasta joined #ruby
<shevy> #cvs is even funnier
<shevy> in the channel topic they have:
<shevy> "Avoid advocacy, or else"
elliot98 joined #ruby
elliot98 joined #ruby
<Tasser> hm, how do I pause the execution of a thread?
<Tasser> aka make the thread go to sleep
<JonnieCache> shevy: wtf. do they mean advocacy of git, or are they literally saying "dont tell people to use cvs for new projects, it sucks"
clockwize joined #ruby
<JonnieCache> Tasser: you have to join it to another thread
JohnBat26 joined #ruby
<yourstrly> hm, rel. notes says "..option to install IronRuby Tools if you have any non-Express SKU of Visual Studio 2010..", sorry for the noise.
<shevy> JonnieCache I think in general both SVN and Git, because less and less people will choose CVS these days
<JonnieCache> Tasser: there is a stop method but iirc you dont generally do that, you "join" it to another thread.
fl0w joined #ruby
<Tasser> JonnieCache, And how to use the join? Thread#join takes a float...
<Tasser> ah, the _calling_ thread suspends execution
<JonnieCache> also i take it you know about the GIL in MRI ruby
<Tasser> yeah
<Tasser> that's why I work with jruby atm ;-)
<Tasser> is it possible to execute code in context of another thread?
<JonnieCache> dont know. it sounds like a bad idea though :)
<Tasser> I want to stop another thread from the current thread...
<JonnieCache> you need a system of locks/semaphores/etc. prepare for pain.
fl0w joined #ruby
<JonnieCache> i highly reccommend using a higher level concurrency abstraction so you dont have to think about threads/locks/etc.
rickmasta joined #ruby
<JonnieCache> rubinius has native Actors now apparently
<JonnieCache> there's this implementation of Go's concurrency model: https://github.com/igrigorik/agent
<Tasser> oh, channels
esparkman joined #ruby
Morkel joined #ruby
<JonnieCache> there's also Fibres in 1.9 but apparently theyre not much less of a headache than threads
<Tasser> I've got like 500 files to work with and send them to an IndexWriter. How would you handle concurrency there?
iboB left #ruby
elektronaut joined #ruby
akem joined #ruby
<moonunit> input = File.open(from_file)
<moonunit> indata = input.read()
cdepue joined #ruby
<moonunit> how can i put those 2 in one line?
<moonunit> ; between the two?
<moonunit> input = File.open(from_file) ;? indata = input.read()
<moonunit> cant seem to get it to work. What am i doing wrong?
<JonnieCache> Tasser: i'd go even higher level and use some sort of queue abstraction. theres this new thing called girl_friday which looks very clever
<JonnieCache> Tasser: I'm assuming from google that IndexWriter is part of lucene? doesnt it have its own queue internally?
flip_digits joined #ruby
thoolihan joined #ruby
<JonnieCache> cant you just push all 500 files in at once and go to lunch?\
EddieS joined #ruby
BrianE joined #ruby
becom33 joined #ruby
catphish joined #ruby
<catphish> is there an efficient way to convert [104, 101, 108, 108, 111] => "hello"
cyri_ joined #ruby
<JonnieCache> catphish: [104, 101, 108, 108, 111].map(&:chr).join
<catphish> eugh, ok
Spockz joined #ruby
sepp2k joined #ruby
<catphish> i'm trying to xor a pair of strings neatly
danishman joined #ruby
kedare joined #ruby
thepix joined #ruby
<JonnieCache> you should be aware that under ruby 1.9, "abc"[0] == "a" whereas under 1.8 "abc"[0] == 97
<catphish> indeed, that's much of what makes it difficult
<catphish> have to convert everything to a byte array first
<catphish> then back and the end
<catphish> got it though:
<catphish> data = ""; rawdata.bytes.each_with_index { |b, i| data << (b ^ mask_bytes[i%4]).chr }
<catphish> at least in 1.9.x that works well
Dangr_ joined #ruby
<Tasser> JonnieCache, it has its own, yep. But I need to parse my sources too
shevy joined #ruby
becom33 joined #ruby
<becom33> http://pastebin.com/KfRrbmek in here its continuely looping with 'a'..'z' * i . but insted of a to z I want to use a array . any help ?
BiHi joined #ruby
james_cotterill joined #ruby
ramusara joined #ruby
<becom33> anyone ?
<catphish> what does ('a'..'z'*i) do?
smooki joined #ruby
<catphish> oh i see
krz joined #ruby
<catphish> 'a'..'zzzzzzzzzz' is a range
<catphish> you're going to have to make your own loop instead
<catphish> i dont think you totally understand your own program
<catphish> for i in 1..max_length is totally unnecessary in that case
<catphish> what you want to achieve is actually reasonable complicated
Seisatsu joined #ruby
<becom33> did anyone even understnd what I'm trying to say ?
<catphish> i understand entirely
<catphish> but the answer is harder
mikewintermute joined #ruby
<catphish> and your original program is wrong
<catphish> i'd imagine the best way is to build a recursive function
<catphish> which loops across the array, then each time passes the generated string down to the next level to be expanded by another character
<JonnieCache> or just use http://www.freerainbowtables.com/tables/ which is what I assume you're trying to do ;)
<JonnieCache> actually use http://www.freerainbowtables.com/tables2/ theyre in a more compressed format
<catphish> well yes, or use a much faster brute force tool
<catphish> but i like the recursive function method :)
milkpost_ joined #ruby
<JonnieCache> the best way to crack md5s is just to type them into google. if theyre unsalted theyll probably be on the first page of results
<catphish> does google index pages big enough to hold entire rainbow tables?
<catphish> he timed out
<JonnieCache> no, but people tend to reuse the same passwords so a huge number of md5 hashes are all over google
becom33 joined #ruby
<JonnieCache> 5f4dcc3b5aa765d61d8327deb882cf99 for example
linoj joined #ruby
<catphish> well yeah that one's inevitable :)
Ammar01 joined #ruby
zumbi joined #ruby
zedUNDginger joined #ruby
Manhose joined #ruby
becom33 joined #ruby
<Tasser> seq 49 | ruby -pe 'BEGIN { tot=0 }; tot += $_.to_i; END { print tot }' # why doesn't this work in 1.8?
<shevy> LONG LIVE 1.8!
nanderoo joined #ruby
<catphish> BEGIN / END?
<catphish> oh, i see
<catphish> that's a very perlesque bit of ruby
rbanffy joined #ruby
<becom33> catphish you were talking about some hashes before was it for question ? I got disconnected :(
<catphish> i said:
<catphish> i'd imagine the best way is to build a recursive function which loops across the array, then each time passes the generated string down to the next level to be expanded by another character
<catphish> then we pointed out there were much more efficient way to bruteforce hashes
<becom33> :( damn I missed it ..
KaZeR_W joined #ruby
<becom33> umm is that convo storeed at some place ?
Ammar01 joined #ruby
varnie joined #ruby
<becom33> so I'm just askin without using 'a' .. 'z' *i can we use a array for that ?
<catphish> its not that simple at all
<catphish> and your current program is wrong
<becom33> really ?
fl0w joined #ruby
<catphish> the range you use at the moment is 'a'..'zzzzzzzzzz'
<catphish> so for i in 1..max_length is totally pointless
<catphish> but that range will only work with a simple a-z
<catphish> to use your own characters you will need something much more complicated
<catphish> as i said, i'd recommend a recursive function, but i suspect you need to learn a lot more about ruby
jetblack joined #ruby
<becom33> well I put kept that max_length their . this is just a simple part from script I just took .. anyway soo hmm lemme lookup for recursive functions
rippa joined #ruby
musee joined #ruby
zedUNDginger joined #ruby
<catphish> why does Thread act like a hash?
mdel joined #ruby
<catphish> Thread.current[:hello] = 'world'
<catphish> is that designed for inter-thread communication?
danielpunt joined #ruby
yfeldblum joined #ruby
<JonnieCache> "Returns the value of a thread-local variable, using either a symbol or a string name. If the specified variable does not exist, returns nil."
<JonnieCache> so yes apparently
<catphish> thats very cool
<JonnieCache> yeah but it would lead to shared-state hell
macabre joined #ruby
<catphish> what do you mean?
elliot98 joined #ruby
akem joined #ruby
<catphish> it's quite useful to be able to set a setting on a thread you're monitoring
<catphish> so you can change what it's doing without spawning a new one
<catphish> and without using a global variable hash (my current method)
_debo_ joined #ruby
<JonnieCache> it can lead to race conditions, nondeterministic program flow, and eventually mental breakdown and a lifelong addiction to benzodiazepines
_debo_ joined #ruby
<catphish> yes i think that's happened to me
<zumbi> hello! I am trying to build ruby 1.9.3 on ARM hard float and I am getting a build error, there is a message telling it might be a bug. Could someone try to explain me how to produce a useful bugreport? (http://pastebin.com/wW2di1FN) I have no idea on ruby
<catphish> almost all use of threads has such issues
tommyvyo_ joined #ruby
<JonnieCache> catphish: thats why its best to use actors or something and leverage the cleverness of others, and avoid having to deal with threads yourself
becom33 joined #ruby
<JonnieCache> that pdf is a very good read btw
<catphish> to be honest i use threads in ruby for simple socket applications and don't have any trouble
<catphish> but that's not really serious parallel processing, just an easier option that selecting sockets manually
<catphish> *than
<JonnieCache> yeah there's always going to be *some* shared state, configuration and such. that isnt so much of a problem. its when the threads share access to the data that they are doing their main activity with that you have problems
* zumbi maybe asked to the wrong forum?
<JonnieCache> race conditions are one thing, then you get to starvation and deadlocks and it gets horrible
<catphish> zumbi: its just an unusual question, you may need to hang around and ask later
iamjarvo joined #ruby
<JonnieCache> zumbi: no this is probably the right place. maybe ask on a mailing list, theres unlikely to be any ARM experts here at any given time
<catphish> i'm an intel noob
chiel left #ruby
<zumbi> JonnieCache: could you point me to the mailing list?
<catphish> <---------- its over there
<JonnieCache> no idea. i presume theres a ruby-core development mailing list somewhere, as well as a bug tracker. i ever dont touch the ruby interpreter code tbh
Natch| joined #ruby
<catphish> take a look in the website
<catphish> s/in/on/
dotnull joined #ruby
<zumbi> also I am just wondering what kind of failure is that one at * Process memory map:, what might that mean?
<catphish> unfortunately most people in here use ruby so they don't have to worry about such things
KaZeR_W joined #ruby
tommyvyo_ joined #ruby
Spockz joined #ruby
triss joined #ruby
becom33 joined #ruby
<triss> hey all
<varnie> Hi.
Manhose joined #ruby
<triss> I'm using ruby-processing to conducta band next week
<triss> but am not enjoying it's live mode
yekta joined #ruby
<triss> is it possible to "cd" in to an object using the standard IRB?
<zumbi> well, thanks.. JonnieCache btw, nice doc :)
<triss> ruby-processing set's up my objects so they're underneath something called $app
<triss> and i don't want to have to type that all the time. I just want to address the objects under it eg.
<triss> $app.cards[1].image = $app.pics[0] => cards[1].image = pics[0]
<triss> I've tried getting pry to work but apparently it's not functioning with JRuby?
evantravers joined #ruby
<JonnieCache> you can do that in pry
<JonnieCache> but pry only uses normal ruby code afaik, you can just maniuplate the binding variable and suchlike
<JonnieCache> or just type `$app.instance_exec do` at the start of your session or something
<JonnieCache> oh no that wouldnt work
sbanwart joined #ruby
<JonnieCache> look at the `binding` stuff though
BrokenCog joined #ruby
BrokenCog joined #ruby
<JonnieCache> triss: also your project sounds really cool. livecoding music is one thing but livecoding conducting a band is some next level shit :)
j-okta joined #ruby
<JonnieCache> make sure to blog about it
dcarper joined #ruby
<triss> thanks jonnie! i will do.
<triss> so how do i change the binding a running instance of irb is using then?
jonathanrwallace joined #ruby
becom33 joined #ruby
sepp2k joined #ruby
p0y joined #ruby
<triss> i need a man that knows IRB's belly!
wyhaines joined #ruby
io_syl joined #ruby
io_syl joined #ruby
Knodi joined #ruby
<JonnieCache> i think you can just say `binding = @foo` but i dont know
<JonnieCache> the pry developers are often here so maybe ping them
<BrokenCog> I'm trying to build wxWidgets, so that wxruby2 will work. Doing 'require wx' results in the libwx_gtk2u_stc library not being found -- checking it in wxwidgets after a make all also doesn't show it -- any one know which configure switch is needed to include that library??
theRoUS joined #ruby
<triss> JonnieCache: `binding = $app` worked a treat!!!
<triss> thanks a lot.
troutwine joined #ruby
<troutwine> Morning, all.
Ankhers joined #ruby
crankycoder joined #ruby
arpegius joined #ruby
Aravindnaidu joined #ruby
BrianE joined #ruby
<StitchedKite> morning
dyer joined #ruby
Manhose_ joined #ruby
Sailias joined #ruby
clockwize joined #ruby
thepix joined #ruby
dv310p3r joined #ruby
bbttxu joined #ruby
ceej joined #ruby
h4mz1d joined #ruby
csavola joined #ruby
jtrudeau joined #ruby
LBRapid joined #ruby
dyer joined #ruby
Thropp joined #ruby
iocor joined #ruby
<mksm> "Á".downcase does not work
<mksm> actually all accented chars cannot be #downcase/#upcase
dyer joined #ruby
colloquialismiic joined #ruby
<catphish> mksm: you don't need to tell us what is already clearly documented ;)
<catphish> "Returns a copy of str with all uppercase letters replaced with their lowercase counterparts. The operation is locale insensitive�only characters �A� to �Z� are affected. Note: case replacement is effective only in ASCII region."
albemuth joined #ruby
bier|tp joined #ruby
<mksm> catphish and now it's clear to me :D
bier joined #ruby
<mksm> thanks
<catphish> np
Spockz joined #ruby
p0y joined #ruby
james_co_ joined #ruby
_debo joined #ruby
elb0w joined #ruby
<elb0w> How are ruby threads?
jgarvey joined #ruby
RomD` joined #ruby
perturbedpanda joined #ruby
thepix joined #ruby
Gruber joined #ruby
zedUNDginger joined #ruby
<catphish> elb0w: they're very well thanks
<ReinH> heh
james_cotterill joined #ruby
Adman65 joined #ruby
<elb0w> catphish: are they ok to use? or are they frowned down on like python/perl threads?
<catphish> they're very good in my opinion
<catphish> the only downside is only one will execute at once
<catphish> so they're no good for high performance
<dotemacs> hi, does anybody here use VCR gem ?
<dotemacs> Do you commit the VCR cassettes into your repo along with your specs or ... ? Thanks
macmartine joined #ruby
theRoUS joined #ruby
theRoUS joined #ruby
jds joined #ruby
vipaca joined #ruby
vipaca joined #ruby
joshsmith joined #ruby
varnie left #ruby
nari joined #ruby
zedUNDginger joined #ruby
metadave joined #ruby
emptyflask joined #ruby
hinogi joined #ruby
hinogi joined #ruby
<JonnieCache> dotemacs: yes
<JonnieCache> theyre there to make your tests repeatable, so you would definitely want to commit them
JumpMast3r joined #ruby
<JonnieCache> theyre basically fixtures for http responses
jwmann joined #ruby
wmoxam joined #ruby
wmoxam joined #ruby
Ammar01 joined #ruby
paraglade left #ruby
jwmann joined #ruby
zastaph joined #ruby
craigglennie joined #ruby
jwmann joined #ruby
joshsmith_ joined #ruby
zedUNDginger joined #ruby
wilmoore joined #ruby
Know1edge1 joined #ruby
cdepue joined #ruby
excelsio1 joined #ruby
quest88 joined #ruby
DrShoggoth joined #ruby
zedUNDginger joined #ruby
Morkel joined #ruby
rbrooker joined #ruby
<dotemacs> JonnieCache: cool
Tachyon joined #ruby
_kinderman joined #ruby
Cervajz joined #ruby
will_b joined #ruby
<ReinH> elb0w: it also depends on which version of Ruby you're talking about
wedgeV joined #ruby
<shevy> 1.6.2
PaciFisT joined #ruby
paraglade joined #ruby
lorandi joined #ruby
triss joined #ruby
zodiak joined #ruby
vitoravelino__ joined #ruby
ckrailo joined #ruby
vladyn joined #ruby
will_b joined #ruby
workmad3 joined #ruby
stayarrr joined #ruby
Ch4rAzZz joined #ruby
Norrin joined #ruby
jacortinas joined #ruby
lkba joined #ruby
Squarepy_ joined #ruby
nelsnelson joined #ruby
<nelsnelson> Greetings, channel! Gotta dumb question about Ruby syntax. Why does this work: File.expand_path(File.dirname(__FILE__))
<nelsnelson> but not this: File.expand_path File.dirname __FILE__
<JonnieCache> the last one is ambiguous
atmosx joined #ruby
kuadrosx joined #ruby
<JonnieCache> its impossible to tell if you meant to pass the last two methods into the first one, or to pass them all into each other in a chain
<nelsnelson> Can't the Ruby interpreter just assume, and demand that the programmer use a semi-colon?
workmad3 joined #ruby
<nelsnelson> Wait, as a chain? You can do that in Ruby?
<JonnieCache> erm, no i wasnt being clear there
<shevy> nelsnelson, a semicolon where
<JonnieCache> it could make more assumptions yes, but that would cause lots of hard to find bugs
<jacortinas> if you are trying to the minimum number of parens you should at least surroung __FILE__
<jacortinas> surround*
<nelsnelson> shevy, as a hypothetical, if a programmer really wanted File.expand_path to receive whatever the return value of File.dirname returned (even without the __FILE__ parameter), the programmer could just use a semi-colon to terminate the instruction
* nelsnelson nods at jacortinas
<catphish> does anyone know how to close a mysql2 connection?
<nelsnelson> Understood about the present requirements.
james_cotterill joined #ruby
<nelsnelson> Still, I don't know why the interpreter doesn't just execute those instructions from right to left.
workmad3 joined #ruby
<catphish> oh mysql2#client.close works
<nelsnelson> Anyway, just curious and confused. I'm sure there is a reasonable explanation, I just have forgotten it, or haven't spent the effort required to work it out myself.
* nelsnelson is sort of lazy :-/
RomD joined #ruby
colloquialismiic joined #ruby
<JonnieCache> youre right, it could be made to do that, but it would add complexity to the parser/interpreter
<nelsnelson> oh
suung joined #ruby
<JonnieCache> and ruby is already arguably too complex
<nelsnelson> hahaha
enikar joined #ruby
<jacortinas> it would take too much time, when it's easier to just require parens on everything with arguments
<nelsnelson> That's an answer with which I can be satisfied.
<nelsnelson> thanks jacortinas
bwlang joined #ruby
blueadept` joined #ruby
wyhaines joined #ruby
<JonnieCache> here is C's grammar in graph form: http://www.flickr.com/photos/nicksieger/281055530/
<JonnieCache> and here is ruby's: http://www.flickr.com/photos/nicksieger/280661836/
<nelsnelson> That is awesome.
<JonnieCache> that is why it is undesirable to allow any more ambiguity than is already there
<JonnieCache> yeah its cool isnt it. its from this blogpost: http://blog.nicksieger.com/articles/2006/10/27/visualization-of-rubys-grammar
clockwize joined #ruby
theRoUS joined #ruby
<nelsnelson> holy crapballs @ Java 1.5
<nelsnelson> I would be really interested to see the parse tree for Groovy as well
<atmosx> How can I list '.tables' in ruby-sqlite3 ?
airhorns joined #ruby
rbrooker left #ruby
<atmosx> I want to view available tables
<atmosx> in the db
imsplitbit joined #ruby
VxJasonxV joined #ruby
<atmosx> troutwine: thank you very much! I was searching on sqlite3's website hehe my bad.
<VxJasonxV> You folks have an onjoin message that includes "modruby.net" which doesn't seem to be working very well.
<troutwine> atmosx: No worries. I googled "ruby sqlite tables list" and, in my filter bubble, the faq was the top link.
<atmosx> I googled 'ruby sqlite3 list tables' … your link was 2nd best, I jumped & lost int he first one :-P
io_syl joined #ruby
io_syl joined #ruby
Azure joined #ruby
Azure joined #ruby
LiquidInsect joined #ruby
Samoi joined #ruby
Kn|t3_ joined #ruby
<Kn|t3_> .msg Nickserv identify Kn|t3
<catphish> oops
wilmoore joined #ruby
Kn|t3_ joined #ruby
Kn|t3__ joined #ruby
Kn|t3_ joined #ruby
paraglade left #ruby
* frem does the nickserv dance
Kn|t3__ joined #ruby
<catphish> lol
eywu joined #ruby
Kn|t3_ joined #ruby
pootpoot joined #ruby
Indian joined #ruby
paraglade joined #ruby
bwlang joined #ruby
mjording joined #ruby
lorandi joined #ruby
paraglade left #ruby
<Kn|t3_> do people use rvm here?
<Kn|t3_> i had a small doubt
ryan0x2_ joined #ruby
<troutwine> I used to exclusively. Now I prefer to use rbenv, but I'm in no hurry to migrate away from rvm where I've got it installed.
paraglade joined #ruby
paraglade left #ruby
Mahoek joined #ruby
Vendethiel joined #ruby
paraglade joined #ruby
cantonic joined #ruby
<catphish> i use rvm for all dev systems
<catphish> makes things 10x easier
ph^ joined #ruby
brownies joined #ruby
<brownies> what do you guys recommend for generating graphs within your app? (rails or otherwise)
<brownies> any recommended gems? is it "better" to do it server-side vs. offloading it to the client -- via JS, i guess?
colloquialismiic joined #ruby
quest88 joined #ruby
<troutwine> brownies: What is it you're trying to do?
renanoronfle joined #ruby
<brownies> troutwine: have some data, want to show it to the user in a nice bar chart. "18 people voted for X, 12 people voted for Y, still waiting on 3 votes."
<troutwine> brownies: Seems like shipping some json up to the client and charting it with a JS library would be natural enough.
thone_ joined #ruby
<brownies> troutwine: i'm inclined to agree. though it's slightly more difficult than usual, because many of my users are on IE6.
Morkel joined #ruby
<troutwine> Oh, hmm. gRaphael asserts it has IE 6+ support http://g.raphaeljs.com/
palentine joined #ruby
<brownies> oh, that's exactly what i was looking for. thanks!
<brownies> i was staring at raphael.js homepage and thinking "i don't want to draw them from that low-level..."
n8ji joined #ruby
vtr joined #ruby
<troutwine> brownies: I'm rather fond of http://mbostock.github.com/d3, but I don't know about the IE support.
BiHi joined #ruby
<brownies> troutwine: oh that one looks awesome, actually. thanks.
<troutwine> brownies: No problem. Good luck to you.
maletor joined #ruby
flippingbits joined #ruby
<brownies> troutwine: "There are no plans to support IE8-"
<brownies> back to the drawing board.
<brownies> troutwine: thanks for the help though. i'll go through this whole list now.
mikepack joined #ruby
Jake232 joined #ruby
stephenjudkins joined #ruby
jrist joined #ruby
kdrsx joined #ruby
alfism joined #ruby
stkowski joined #ruby
Tuxist joined #ruby
bosphorus joined #ruby
<blueadept`> anyone know the best way to integrate backbone.js with rails?
perryh joined #ruby
<blueadept`> currently looking at this: https://github.com/codebrew/backbone-rails
perryh joined #ruby
sixteneighty joined #ruby
zedUNDginger joined #ruby
smgt joined #ruby
<epochwolf|vps> blueadept`: what level of integration are you looking for>
<blueadept`> well I have a fairly big rails app on my hands right now, the previous javascript guy has been using a plugin architecture, as well as a less known MVC lib that i want to throw away, and bascially move all our javascript to backbone to make the ajax building much easier
zedUNDginger joined #ruby
<blueadept`> i was just wondering if there was a particular gem that is popular, the codebrew one seems to be cool
apok joined #ruby
Russell^^ joined #ruby
emmanuelux joined #ruby
kenichi joined #ruby
adamkittelson joined #ruby
nelsnelson joined #ruby
josh_ joined #ruby
apok joined #ruby
<JonnieCache> blueadept`: its so trivial to have rails accept/return json in an MVC/ RESTful fashion, i dont see why you'd need anythign special to integrate it with backbone
<JonnieCache> but then again im not totally familiar with backbone
raythecat joined #ruby
cdepue joined #ruby
ianbrandt joined #ruby
Araxia_ joined #ruby
<blueadept`> well its not just ajax stuff
<blueadept`> its organizing all the code base so its readable if anything, ha
<blueadept`> trust me, you wouldn't want to be working with the javascript i'm currently staring at, trust me
<blueadept`> i've worked with enough backbone.js in node.js to beign to appreciate the about of complexity it hides
<blueadept`> about*amount
mrsolo joined #ruby
stephenjudkins joined #ruby
kaneda joined #ruby
avandendorpe joined #ruby
luckyruby joined #ruby
acts_as_david joined #ruby
sodani joined #ruby
dyer joined #ruby
Samoi joined #ruby
<sodani> hello, is ENV['HOME'] the same as ~/ ?
<epochwolf|vps> no
<epochwolf|vps> whoops, probably
daniel_hinojosa joined #ruby
manizzle joined #ruby
<sodani> it's your home directory right?
zedUNDginger joined #ruby
eignerchris joined #ruby
poga joined #ruby
<epochwolf|vps> ~ is $HOME on my terminal
<troutwine> sodani: Yep, more or less. That's just the HOME environment variable of your shell. Keep in mind that not all users have a HOME, though most do.
<sodani> troutwine: thanks. just wanted to make sure. i'm on windows, and I'm not so knowledgable about the environment variables
<epochwolf|vps> uh
<epochwolf|vps> I'm on osx here.
<epochwolf|vps> I have no idea what windows does for environment
catphish left #ruby
<troutwine> sodani: Oh, hmm. I'm not so knowledgeable about Windows so maybe all users _do_ have a HOME on that system. Any Posix system will behave as I've described.
badabim joined #ruby
<sodani> got it. thanks!
stephenjudkins joined #ruby
ChloeD joined #ruby
<ChloeD> hey folks
<ChloeD> sorry, I know that's not the best place to ask this
jetblack joined #ruby
eldariof joined #ruby
<ChloeD> any insight on that?
<epochwolf|vps> stop using 1.9.1
<epochwolf|vps> it segfaults alot
<ChloeD> mmmk
<ChloeD> 1.8 segs too
<ChloeD> with less stack traces
mindCrime joined #ruby
<ChloeD> but still
<ChloeD> :)
<epochwolf|vps> ChloeD: 1.9.2 is stable.
<ChloeD> yeah
kirun joined #ruby
<ChloeD> OK
<epochwolf|vps> if that still segfaults, you could be doing something wrong with the library
<epochwolf|vps> or the library has a bug
<epochwolf|vps> or ruby
<ChloeD> lol
<ChloeD> crackpot:~/ruby/pdfparser$ ruby1.9.1 -v
<ChloeD> ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
<ChloeD> mobuntu sucks ;p
<ChloeD> guess it's the library
<ChloeD> but I can hardly debug it, the gem won't install
<ChloeD> on its own
<ChloeD> only the packaged verison does
<ChloeD> /usr/lib/ruby/vendor_ruby/pkg-config.rb:234:in `parse_pc': .pc for >= doesn't exist. (RuntimeError)
<epochwolf|vps> If the package is compiled for a different version than the ruby in use, it will have problems.
nonotza joined #ruby
<ChloeD> do you know about that?
<ChloeD> if that's an error in the gem package file or something?
<epochwolf|vps> no
<ChloeD> I've grepped for '>=' but nm significant
<epochwolf|vps> I compile ruby from source on all debian/ubuntu based systems.
<epochwolf|vps> to avoid issues with the package manager
pen joined #ruby
crescendo joined #ruby
ianbrandt joined #ruby
sepp2k joined #ruby
ghanima joined #ruby
hadees joined #ruby
sandpy joined #ruby
Morkel joined #ruby
ubuntunoob joined #ruby
<ubuntunoob> hi
j3r0m3 joined #ruby
metadave left #ruby
<ChloeD> k added a debug thingie to the debian packaged source code
<ChloeD> will see
rippa joined #ruby
<ChloeD> where the segfault comes from
LouisJB joined #ruby
luckman212 joined #ruby
kidoz joined #ruby
epitron joined #ruby
epitron joined #ruby
nicoulaj joined #ruby
jarjar_prime joined #ruby
jbw joined #ruby
shadoi joined #ruby
<ubuntunoob> ruby sucks.
<atmosx> ubuntunoob: ubuntu sucks too, but you have it on your nickname
<ubuntunoob> thats why there are about 1600 people in ubuntu vs 599 in ruby.
muzzle_fuzzle joined #ruby
<atmosx> Your statement holds the answer.
perryh_ joined #ruby
p1d joined #ruby
<atmosx> Only an idio twould compare an operating system to a programming language by this measure.
<ChloeD> obvious troll is obvious.
<atmosx> s/idio/idiot
jay_zawrotny joined #ruby
<ubuntunoob> im just being honest/realistic/truthful
<ChloeD> ruby as a desktop environment
<ChloeD> definitely sucks
ghanima joined #ruby
<ubuntunoob> never tried it.
<atmosx> ubuntunoob: really? So I.E. is the best browser because 56% of WWW uses it? right?
<ChloeD> as a programming language, ubuntu sucks harder though
SegFaultAX|work joined #ruby
<ubuntunoob> atmosx maybe.. thats why 56% are using it.
<ubuntunoob> statistics speak for themselves.
<troutwine> ChloeD: I don't know. I heard that Linux is coded in the ubuntu and that's pretty impressive.
<atmosx> ubuntunoob: are you american?
<ChloeD> trolololololo
<cantonic> i wonder why you guys are discussing with him...
<atmosx> ah no, UK
<atmosx> I'll give you a chance then
<ubuntunoob> uk
<samuelkadolph> ubuntunoob: This isn't the official ruby channel, #ruby-lang is and it's bigger.
<atmosx> cantonic: I have 5 minutes spare
albemuth joined #ruby
<cantonic> lol
<samuelkadolph> Now I hope zenspider is here
<ubuntunoob> oh wow 350 people in the other chan.
<atmosx> shit, I forgot the milk… hmm I need to buy 2 lt tomorrow (again)
<troutwine> ubuntunood: Many of those nicks are manned by multiple people, so it's more like 800 in #ruby-lang.
<cantonic> is ubuntu better than ruby? and is windows better as Intel? or is Photoshop better than the PC it is running on? wtf...
<ubuntunoob> ubuntu r0x.
Cervajz joined #ruby
<atmosx> ubuntunoob: can you do a kernel recompile by youself? or the system does not allow it?
<cantonic> ubtuntu: then you should stay on ubuntu and use ubuntu as your coding language instead of ruby :D
<ubuntunoob> sure.
<ubuntunoob> ubuntu is more dynamic than ruby. rubee is fragile and unstable.
<ReinH> ...
<cantonic> ubtuntunoob: i hope that you are joking...
voodoofish430 joined #ruby
<sandpy> trolls gonna troll
<cantonic> true that
<ubuntunoob> fish tastes salty.
<ReinH> trololol
<sandpy> indeed
<ubuntunoob> so as vagina.
<sandpy> for the lulz, etc
<ReinH> yes
<cantonic> but i have to admit that i also thought about switching to ubuntu and forget about ruby :D jhaha
<ReinH> Don't feed the trolls.
<cantonic> you are right. sorry
<ubuntunoob> lol
<ubuntunoob> n1 cantonic.
<ubuntunoob> are you vietnamese?
<atmosx> whats wrong with being Vietnamese?
<ubuntunoob> well
<ubuntunoob> nothing
<atmosx> ubuntunoob: you're British?
<ubuntunoob> no
<ubuntunoob> are you?
<atmosx> no
headius joined #ruby
<ubuntunoob> hmm
<cantonic> why is there a #ruby and a #ruby-lang chan?
<ReinH> Don't feed the trolls.
<ubuntunoob> are you chinese?
parus joined #ruby
<cantonic> ReinH ftw
<ubuntunoob> ha! good question
<cantonic> ubuntunoob: now you know what good questions and statements are...
<ubuntunoob> sure
<ubuntunoob> do you?
<cantonic> obviously
tvw joined #ruby
<ubuntunoob> ruby-language is a international spoken language
AutoMan joined #ruby
<ubuntunoob> used over serveral countries including japan, china, kongo..
<ubuntunoob> ruby is just a gem, sold in online internet shops.
EddieBluh joined #ruby
sodani left #ruby
cantonic left #ruby
j3r0m3 joined #ruby
cantonic joined #ruby
<ubuntunoob> ruby is just a gem, sold in online internet shops.
<AutoMan> I'm still a Ruby Nuby so don't laugh at my next question. How do you increment a freaking variable! I tried .succ it sucked...
king313 joined #ruby
<ubuntunoob> HA
<ubuntunoob> Rubee Nubee
minijupe joined #ruby
<ubuntunoob> well this chan is for advanced persons. please seek help in #powder
cook1es joined #ruby
<AutoMan> So you don't know the answer...
<ubuntunoob> #powder
<AutoMan> :)
<ubuntunoob> go there and ask.
<ReinH> AutoMan: var += 1
<ReinH> AutoMan: ubuntunoob is a troll
<ReinH> ignore
<AutoMan> Don't work
<ReinH> yes it does.
<cantonic> AutoMan: should work
<ubuntunoob> oh , am i?
<cantonic> ubuntunoob: yes u r
<ubuntunoob> reinh got banned a few days ago, for misleading people on purpose.
<ubuntunoob> please ignore him.
<ReinH> ...
<ubuntunoob> trolls gonna be trolls.
<ReinH> this is why #ruby-lang instead of #ruby
<ReinH> less trolls
<ubuntunoob> sssh troll.
<cantonic> will switch immediately :D
<ubuntunoob> stop trolling. i am not lol-ing.
<AutoMan> I get this error when using x+=1 :in `+': can't convert Fixnum into String (TypeError)
<ReinH> AutoMan: what is x?
<ReinH> it sounds like x is a String
<ReinH> you can't add 1 to a string
RomD joined #ruby
<ReinH> AutoMan: and in general, don't say "Doesn't work" if you want help
<ReinH> describe the failure
<AutoMan> ok
<ubuntunoob> reinh is misleading you.
<AutoMan> IR nuby
<ubuntunoob> ignore him.
coreyrec__ joined #ruby
<cantonic> AutoMan: try var.to_i += 1
stayarrr joined #ruby
<AutoMan> I initialized x like so x=0
<cantonic> or var.to_f += 1
<ReinH> AutoMan: use pastie or gist and show us some actual code
<cantonic> AutoMan: then it should work like ReinH said
<ReinH> there is something you aren't telling us
ilyam joined #ruby
<AutoMan> got in `block in <top (required)>': undefined method `to_i=' for 0:Fixnum (NoMethodError)
<samuelkadolph> cantonic: That won't work
<cantonic> AutoMan: try to_f
<ReinH> AutoMan: show us some actual code
<ReinH> or we can't help you
<samuelkadolph> Listen to ReinH, not cantonic
<ReinH> you can't do var.to_i = 1
<ReinH> and you shouldn't do var.to_i += 1
<cantonic> sorry, right
<ReinH> you should figure out why it's a String instead of an Integer and fix THAT
<AutoMan> in `block in <top (required)>': undefined method `to_f=' for 0:Fixnum (NoMethodError)
<samuelkadolph> ReinH: You could but yeah, you shouldn't
tvo joined #ruby
tvo joined #ruby
<ReinH> AutoMan: stop telling us errors that don't mean anything to us without code
<cantonic> you could convert it into an integer or fixnum by doing x = x.to_f in a priot step
<AutoMan> x=0
<AutoMan> sheet1.each do |row|
<AutoMan> break if row[0].nil?
<AutoMan> x.to_f+=1
<AutoMan> end
<ReinH> AutoMan: show us the code
PhilK joined #ruby
<ReinH> do NOT paste multiple lines in to the channel
<AutoMan> sry
<ReinH> that can't be the entire thing
<ReinH> x=0; x+=1; x #=> 1
<ReinH> works just fine
<ReinH> and if you have an array that you want to iterate with an index, do each_with_index
<AutoMan> All the rest is just excel code. Nothing to do with that code...
<rippa> >convert it into an integer or fixnum by doing x = x.to_f
<rippa> what
<samuelkadolph> rippa: lawl
<cantonic> what was wrong about that?
<samuelkadolph> to_f converts to a Float
<cantonic> oops right...
<cantonic> i should stop trying to help :)
<samuelkadolph> And it's bignum or fixnum
<samuelkadolph> Not integer or fixnum
raythecat joined #ruby
<ReinH> AutoMan: you must be doing something else to the variable x that you aren't telling us about
<ReinH> we aren't psychic.
<ReinH> we can't help you if you withhold information that we need
zedUNDginger joined #ruby
iocor joined #ruby
<AutoMan> Maybe I should ask a different question... I am trying to get the count of items in an excel row
<ReinH> [1,2,3].size #=> 3
<rippa> actually both Bignum and Fixnum are Integer
darkangel joined #ruby
<samuelkadolph> rippa: Duh?
<AutoMan> so row.size?
<rippa> *have it in their ancestors
darkangel left #ruby
<rippa> 1.is_a? Integer
iocor joined #ruby
<samuelkadolph> Still doesn't mean you should say integer vs fixnum
<samuelkadolph> Since one is the other
<rippa> I didn't say that
Manhose joined #ruby
<rippa> just a fun fact
<ReinH> if you're going to have a conversation about these things, you need to distinguish between the names for machine representations of numbers and the names of Ruby classes
clockwize joined #ruby
stayarrr joined #ruby
Codif joined #ruby
<AutoMan> ReinH: so will row.size give me how many items are in the column? Sry I mistated earlier
<ReinH> depending on what row is and how size is implemented, yes it might
darkangel joined #ruby
apeiros_ joined #ruby
<darkangel> Hi, I don't know anything about Ruby ... what are @ symbols used for? Like in the methods here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/229068
hadees joined #ruby
<AutoMan> I am using spreadsheet gem row contains all content in the spreadsheet row. I was checking each row for content when it equals nil then I knew I was at the end. I wanted to count each loop to determine how many rows...
mjording joined #ruby
afomi joined #ruby
<ReinH> darkangel: @ symbols in front of variables (like @foo) designate them as instance variables.
Codif joined #ruby
<AutoMan> I am sure there is a better Ruby way to do this I just am not familiar enough yet
<ReinH> Symbols like that (and $ in $foo) are called "sigils" FYI
<darkangel> ReinH: Hmm, and they don't need to be declared?
Ater joined #ruby
<ReinH> darkangel: variables in ruby never need to be explicitly declared
<ReinH> they are created on assignment
<darkangel> ReinH: Okay, thanks.
<ReinH> in the case of @var and $foo they will be nil if not otherwise defined.
eric1 joined #ruby
Codif joined #ruby
<apeiros_> they cause a warning if accessed before being assigned
<apeiros_> (only with -w and -v)
<darkangel> k
<sandpy> has anyone experienced segfaults from (at highest level) the sequel gem v3.29.0 ?
eywu1 joined #ruby
zommi joined #ruby
<ReinH> but no one cares about that warning
<sandpy> /sequel-3.29.0/lib/sequel/dataset/query.rb:55:in `clone'
<sandpy> (though i hagve switched to 3.28.0 now)
<darkangel> ReinH: What is "attr_reader :ranking"
<darkangel> ReinH: A declared instance variable?
ikaros joined #ruby
mjording_ joined #ruby
cableray joined #ruby
grulf joined #ruby
<grulf> hello fellow humans
ianbrandt joined #ruby
colloquialismiic joined #ruby
nelsnelson joined #ruby
<ubuntunoob> ruby doobie
<ubuntunoob> smoke the doobie and code with ruby!
<grulf> so yes
<grulf> i have this problem, and it would be nice to receive some help
<ubuntunoob> you wont.
<grulf> i cant figure it out, probably overlookign something
<ubuntunoob> leave the channel pls./
<grulf> no.
<ubuntunoob> yes.
btanaka joined #ruby
<grulf> please shut up, thanks
<grulf> ._.
<epochwolf|vps> grulf: we aren't doing your homework for you
<ubuntunoob> soon op will be here and ban you, so leave.
<ubuntunoob> ^
<grulf> its not my homework
<grulf> its a hobby project
<epochwolf|vps> sure...
<ubuntunoob> yes it is.
<epochwolf|vps> definitely
<grulf> sigh
<grulf> yeah.
<grulf> anyways trolls
<ubuntunoob> ok type "/quit" without the quotes.
<epochwolf|vps> agreed
Jake232 joined #ruby
<grulf> i have an angle, and i have a point. the point is rotated by an amount and the other angle is being added that amount
<epochwolf|vps> grulf: in the rare chance you're not some kid trying to get out of doing homework, you might want to look at a math book instead of bugging people on irc.
<grulf> after i rotated the point, its angle isnt equal to the other angle anymore
<ubuntunoob> grulf, just leave.
<epochwolf|vps> or learn about floating point values.
<grulf> the difference is too great for a rounding error, in my opinion
afomi left #ruby
<grulf> and if youre not going to help, you might as well ignore me
<epochwolf|vps> grulf: nah, we are waiting on a kickban from on high.
<grulf> also i dont see a reason why not to get help if i really cant figure it out, even if it were my homework the point is to understand the problem in the end
<ubuntunoob> epochwolf|vps, grulf is obviously trolling.
<grulf> oh yeah i forgot "please?"
<epochwolf|vps> grulf: because it's an algebra 2 math problem.
<grulf> yep
<grulf> thats why im a little baffled why it wont work
<epochwolf|vps> and we get enough fucktards asking us to do their homework.
robotmay joined #ruby
<grulf> well im not one of them
<epochwolf|vps> congrats, you're the first.
<grulf> im not asking you to do my homework, i wrote the code and a pointer would be enough
Ontolog joined #ruby
<epochwolf|vps> ubuntunoob: I need a hug.
<ubuntunoob> hug :D
<nelsnelson> Does anybody ever have problems linking Java classes in JRuby?
kuadrosx joined #ruby
<epochwolf|vps> nelsnelson: might help to mention which classes you're having issues with
<nelsnelson> I am using java_import on a class that I successfully compiled and jarred up that depends on another external library.
<nelsnelson> Specifically, I have created a new SASLDigestMD5Mechanism for the Smack API library.
<nelsnelson> Oh...
<epochwolf|vps> nelsnelson: so you have a jar file you're importing that depends on other jars? (Sorry, my java is very rusty)
<nelsnelson> Oh dear... wrong channel
<nelsnelson> :-(
<nelsnelson> So embarrassing.
<epochwolf|vps> nelsnelson: this is #ruby
<nelsnelson> Meant to post question in #jruby.
<nelsnelson> Socially Awkward Penguin says bai now
<epochwolf|vps> nelsnelson: a word of advice, skip your introductory question
<ubuntunoob> lol
<epochwolf|vps> just go right into the problem
<nelsnelson> k
<ubuntunoob> lol
<ubuntunoob> fail.
<ubuntunoob> we are all layghing at YOU now.
<ubuntunoob> lol
<grulf> lolz found the error
<grulf> im so dumb
<ubuntunoob> yep.
<grulf> so are you, though
<grulf> its obvious :O
<nelsnelson> :-) :-(
<ubuntunoob> leave.
* epochwolf|vps pounces on ubuntunoob
<grulf> i dont see why :O
<grulf> i enjoy annoying you
<ubuntunoob> arent.
<grulf> but now that i dont need your help anymore, i might as well say that youre getting on my nerves, like i am on yours
<ubuntunoob> ok bye
<grulf> i didnt ask you to write any code for me, ergo do my homework
brownies joined #ruby
JumpMast3r joined #ruby
<grulf> maybe if youd listen just for a fucking second, and if you dont have any time to spare, shut the fuck up, despite any of your past experiences
<grulf> but ah, cruel world im living in
<grulf> ask for help and have somebody piss on your leg
<epochwolf|vps> ask for math help that looks like a high schooler's homework, get pissed on
<ubuntunoob> hah
<grulf> the problem wasnt the math, it was that i accidentally placed an operation in the loop that shouldnt be there actually
* epochwolf|vps is listening to "Online" by Brad Paisley, from the album 5th Gear via Spotify.
<grulf> well i was too blind to find it, i guess someone with a more objective perspective might find it
<ampex> epochwolf|vps: negative brownie points for listening to country
<epochwolf|vps> ampex: :P
<grulf> well bye, i might come again, but under a different name
<grulf> ;)
<epochwolf|vps> fine...
* epochwolf|vps is listening to "Tow Rope Girls" by Tom Kastle, from the album Tommy's Gone Home To Hilo via Spotify.
skrewler joined #ruby
<epochwolf|vps> ampex: how's a sea shanty?
fl0w joined #ruby
fcoury joined #ruby
<ubuntunoob> nice
<ubuntunoob> grulf surely got annoyed..
fermion joined #ruby
<epochwolf|vps> not sure, if he was trolling, he probably blew a load.
_kinderman_ joined #ruby
<epochwolf|vps> if not, he should know better.
<ubuntunoob> haha
* epochwolf|vps is listening to "Pawky Adam Glen/O'Neill's March" by The Crossing, from the album Dancing at the Crossroads via Spotify.
<epochwolf|vps> ampex: Bagpipes!
<epochwolf|vps> and flutes and voila (I think it's a voila)
<epochwolf|vps> could be an evil voilin.
cpruitt joined #ruby
fl0w_ joined #ruby
stephenjudkins joined #ruby
strife25 joined #ruby
y_matsu joined #ruby
Codif joined #ruby
jonathanrwallace joined #ruby
enroxorz joined #ruby
enroxorz joined #ruby
jbpros joined #ruby
enroxorz left #ruby
Pip joined #ruby
EddieBlu_ joined #ruby
theRoUS joined #ruby
tvo joined #ruby
stkowski left #ruby
jacortinas joined #ruby
<AutoMan> ReinH: FYI ... puts will convert a fixnum when it is by itself. But when you concatenate it does not. I was not paying attention to my error msg. it was complaining about the puts not x+=1... now I know...
<headius> concatenation is unrelated to puts; String#+ only accepts String
_kinderman joined #ruby
<ReinH> AutoMan: puts is "put string" and will call to_s on things that are not strings
flippingbits joined #ruby
darkangel left #ruby
spyvrsspy joined #ruby
dch4pm4n joined #ruby
cafesofie joined #ruby
mikeric joined #ruby
j3r0m3 joined #ruby
cooper joined #ruby
MidtownNewbie joined #ruby
Morkel joined #ruby
<MidtownNewbie> Howdy. How would I put together an array using a 3.times loop, like, cars = 3.times {|p| Car.new(:name => "Green car #{p}") } ? I saw somewhere assigning the output of a loop to a variable... Is the problem just that I'm using times instead of something like collect?
alex__c2022 joined #ruby
<rippa> cars = 3.times.map {|p| Car.new(:name => "Green car #{p}") }
<MidtownNewbie> nice, thanks!
workmad3 joined #ruby
<Mon_Ouie> Array.new(3) { |p| … }
Dangr_ joined #ruby
<MidtownNewbie> oh? hmm. i'll try that as well
v0n joined #ruby
tatsuya__ joined #ruby
rbanffy joined #ruby
_kinderman_ joined #ruby
mikewintermute joined #ruby
cableray joined #ruby
VxJasonxV left #ruby
Manhose joined #ruby
ckrailo joined #ruby
h4mz1d joined #ruby
AutoMan left #ruby
Sliker joined #ruby
milkshakes joined #ruby
afomi joined #ruby
Seventoes joined #ruby
UdontKnow joined #ruby
Kivi joined #ruby
Nowaker joined #ruby
Frantic joined #ruby
tburns joined #ruby
hadees joined #ruby
akem joined #ruby
trivol joined #ruby
havenn joined #ruby
srji joined #ruby
bwlang joined #ruby
Azure|netbook joined #ruby
Ankhers joined #ruby
skrewler joined #ruby
coreyrec__ left #ruby
epitron joined #ruby
blueadept` joined #ruby
<blueadept`> quick question, does the rails 3.1 asset pipeline work in tandam with the regular public/ folder?
<blueadept`> like if you go with the asset pipeline, it doesn't break what's already available in public, correct?
Guest94672 joined #ruby
<jacortinas> correct
<jacortinas> public is still available at the root level of everything
<blueadept`> cool
<jacortinas> assets are namespaced under and "/assets" url
<jacortinas> an*
<jacortinas> that's most of the reason jammit continues to work across upgrades
<jacortinas> from 3.0 to 3.1
ilyam joined #ruby
ckrailo joined #ruby
stephans joined #ruby
mengu joined #ruby
BrianE joined #ruby
Codif joined #ruby
stkowski joined #ruby
Azure joined #ruby
alex__c2022 joined #ruby
stephenjudkins joined #ruby
Know1edge2 joined #ruby
<blueadept`> jacortinas: what's the proper way to call the JS files from within the a template?
<blueadept`> using <%= javascript_include_tag "application" %>
Axsuul joined #ruby
<blueadept`> but the coffee files in assets/javascripts/todo.js.coffee isn't loading, rails says "No Route"
<blueadept`> i'll take this to #rails
nanderoo left #ruby
ethndbst joined #ruby
_kinderman joined #ruby
ethndbst joined #ruby
nicoulaj joined #ruby
ilyam joined #ruby
iocor joined #ruby
macmartine joined #ruby
lorandi joined #ruby
hydrozen joined #ruby
gaspar|work joined #ruby
Skuom joined #ruby
<gaspar|work> Hey, I'm trying to modify array and add video_slug to each element (which is an array itself) based on whether there's vevo_id present for it
<gaspar|work> Yet the array stays the same, here's the code
<gaspar|work> It's like video_slug was never added to the array
rpowell joined #ruby
<gaspar|work> I get videos straight from database and I'm using 1.9.2 with sinatra/datamapper
Skuom left #ruby
sdwrage joined #ruby
manizzle_ joined #ruby
otakutomo joined #ruby
jonathanrwallace joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
skrewler_ joined #ruby
wyhaines joined #ruby
chiznitz joined #ruby
cableray joined #ruby
BrianE joined #ruby
LiquidInsect joined #ruby
_kinderman joined #ruby
raythecat joined #ruby
workmad3 joined #ruby
bean joined #ruby
crankycoder joined #ruby
cantonic_ joined #ruby
ohookins joined #ruby
gregorz joined #ruby
_nyuszika7h_ joined #ruby
<ohookins> can someone tell me what def Myclass.new() does in the scope of defining that class?
<ohookins> why do that instead of def initialize() ?
<ethndbst> O_O
<ethndbst> ohookins:
<ethndbst> class MyClass() def initialize(foo) @foo = foo end end
<ohookins> they define HTTP.new() and initialize()
<ohookins> both within the Net::HTTP class
<ethndbst> Why are you using 1.8.6?
<ohookins> that really has nothing to do with the question
<ethndbst> Well it kind of does.
<ohookins> is that language style specific to 1.8.6?
<ohookins> can you not use it in later versions?
<ethndbst> Things in stdlib have changed since 1.8.x
flip_digits joined #ruby
<ethndbst> I would recommend using the latest version of Ruby for your project.
<ohookins> all of the production systems i run will have either 1.8.5 or 1.8.7
<ohookins> there's nothing that i can change about that, but i still want to know what the meaning of this language is, since it's in the standard library
<ethndbst> Meaning of "this" language?
<ohookins> def HTTP.new() vs def initialise()
<ethndbst> Why not use def initialize()?
<ethndbst> because when you do MyHTTPClass.new() it will initialize it
LiquidInsect joined #ruby
<ohookins> in my own code, sure, but i want to understand the code used in stdlib
<ohookins> googling for class.new obviously doesn't help much
DaZ joined #ruby
alex__c2022 joined #ruby
<ethndbst> I'm not exactly for sure what you're asking. What's in the standard libraries is in the standard libraries.
<ohookins> i'm asking what the difference is between def HTTP.new() and def initialize() in the context of the Net::HTTP stdlib
<ethndbst> I dunno
<ohookins> thanks
<ethndbst> What do you want me to tell you? That's all I know.
<ohookins> i'm not sure why it took all of that to arrive at this conclusion
<ethndbst> I don't spend time looking at the standard libraries of outdated Ruby versions
<ohookins> it's not about stdlib, it's about the actual language
<ethndbst> ohookins: This is "FREE" support. I'm not a freaking expert sorry.
<ohookins> i'm sure 1.9 supports the same language feature
<ethndbst> Sorry. I don't know the answer to that
_kinderman_ joined #ruby
kuadrosx joined #ruby
LnL joined #ruby
nyuszika7h joined #ruby
LnL left #ruby
dankest joined #ruby
<dankest> When I call an object from an array, like array[1], the result is surrounded in quotes and braces, like ["result"]. How can I return the result without those quotes and braces?
<LiquidInsect> without quotes? it's a string. Strings are quoed.
Manhose joined #ruby
<LiquidInsect> the brackets indicate that what you have pulled out of the array is another array, of size 1
<dankest> LiquidInsect: I'm trying to put these into a url, so I get somthing like: "hhtp://["google.com
<dankest> '"]
<dankest> when I use puts "http://#{array[1]}"
<LiquidInsect> so, first off how are you generating this array, because like what you have there is a 2-dimensional array, not a simple list
spike2251 joined #ruby
<LiquidInsect> where did that like come from?
<dankest> I'm using string.scan to regex a bunch of values from a string
<LiquidInsect> oh god turning into a valley girl gag me with a spoon
<LiquidInsect> ok
<dankest> haha
<LiquidInsect> can you show me any examples?
<dankest> sure
<dankest> I'm scraping an html page
<LiquidInsect> a gist, pastie, etc.
<dankest> k
<spike2251> how exactly is the most up-to-date recommendation for setting up emacs for ruby development?
<spike2251> right now all I am using is starter-kit-ruby
<dankest> LiquidInsect: I'm trying to download the popular tracks from a music blog: https://gist.github.com/009e6cfb8df60c01ec5d
<spike2251> but some tutorials mention M-x run-ruby, which it seems that another ruby mode supports
<dankest> LiquidInsect: line 40 is causing the issue because it's giving me a url like: http://hypem.com/serve/play/["1g60h"]/["341614a9efccfec56a607899daf266d0"].mp3
_debo joined #ruby
<LiquidInsect> dankest: do some logging/debugging. Look at the structure of the array you're getting back.
ohookins left #ruby
<LiquidInsect> You probably just need to do something like array[1][0]
<dankest> ok, thanks
Cervajz joined #ruby
<dankest> LiquidInsect: My array looks like this: [["1g60h"], ["1g77s"], ["1g6mv"], ["1g5hj"], ["1g73q"], ["1g5vx"], ["1g64b"], ["1g786"], ["1g7cb"], ["1g6nk"], ["1g6rp"], ["1g6wp"], ["1g6e8"], ["1d1vs"], ["1g5xa"], ["1g7em"], ["1g6nh"], ["1g7c9"], ["1g7ca"], ["1g6w7"]]
<LiquidInsect> yep. 2d array.
<dankest> Doesn't look 2d?
rgrinberg joined #ruby
<dankest> cool
<dankest> ok
<LiquidInsect> what doesn't look 2d about that?
<LiquidInsect> you have an array of arrays
<dankest> does it*
<dankest> hmm
<LiquidInsect> oh. yeah, it does.
<Axsuul> yea its a matrix
colloquialismic joined #ruby
<dankest> calling array[0][0] still returns an array
<dankest> ["result"]
colloquialismic joined #ruby
<Axsuul> yea, that's right
<colloquialismic> hey guys
<colloquialismic> how's life?
<Axsuul> array[0][0][0] will return the string
<dankest> Ok, how can I return the result as a string?
<dankest> oh
<dankest> lol
<dankest> ok
<dankest> how would I go to the next object then?
<dankest> array[0][1][0]?
<Mon_Ouie> If you need to do that, the array isn't exactly what you said
<Axsuul> dankest: yep
<dankest> Okay, thank you all
<Axsuul> or you use .first
<Axsuul> array[0][1].first
<dankest> ooooh
<dankest> nice
nari joined #ruby
S2kx joined #ruby
sepp2k joined #ruby
calimike joined #ruby
_kinderman joined #ruby
tobym joined #ruby
Nisstyre joined #ruby
<calimike> Hi, I'm relatively new to ruby and rails and my question is related to the creation of a new form called bio. bio belongs to user (one-to-one). When the form is completed, I want the bio to be persisted for that user. I understand there are a few ways to do this. For example, do I need to create a nested form (I'd like to avoid this is there is a simpler solution). If you have any good examples, I would greatly appreciate it.
xissburg joined #ruby
<calimike> sp .. I'd like to avoid a nested form if there is an even simpler way.
BrianE joined #ruby
BrianE joined #ruby
elevenarms joined #ruby
<dankest> calimike: You need to ask in #rubyonrails
havenn joined #ruby
Azure|dc joined #ruby
spike2251 joined #ruby
spike2251 joined #ruby
skrewler joined #ruby
root joined #ruby
dasfugufish joined #ruby
Manhose_ joined #ruby
hadees joined #ruby
iocor joined #ruby
LittleBill902 joined #ruby
hadees joined #ruby
pootpoot left #ruby
iamjarvo_ joined #ruby
trivol_ joined #ruby
Knodi joined #ruby
<blueadept`> would anyone have any idea why a /shared directory would be not be compiling on bundle exec rake assets:precompile ?
kalusn joined #ruby
GreaseMonkey joined #ruby
<blueadept`> all my other folderes and files are working
<blueadept`> just the shared direcotry doesn't, and --trace doesn't show anything
mdel joined #ruby
<LiquidInsect> ?win 2
killing-joke joined #ruby
<killing-joke> mandatory EC2 instance reboots? i didn't get an email about this either.
skrewler_ joined #ruby
delian66_ joined #ruby
tobym joined #ruby
Knodi joined #ruby