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
<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)
<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
<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>
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
<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.
<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 ?
<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?
<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.
<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
<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"
<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 ?
<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
<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?
<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.
<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.
<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
<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
<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 ?
<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?
<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
<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
<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>
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.