apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
wroathe has quit [#ruby]
caiges has joined #ruby
Amorsen has joined #ruby
banister_ has joined #ruby
virunga has joined #ruby
mikepack has joined #ruby
vraa has joined #ruby
neurodrone has joined #ruby
neurodrone has joined #ruby
<td123> nvm, found the answer
IrishGringo has joined #ruby
libertyp1ime has joined #ruby
undersc0re has joined #ruby
Drewch has joined #ruby
heftig has joined #ruby
<dbgster> self.class.xxx is for methods or instance or?
lkba has joined #ruby
<cout> dbgster: can you please clarify what you are asking?
res0nat0r has joined #ruby
res0nat0r has joined #ruby
<dbgster> looking at some source code, and I see people using self.class.xxxxx
<dbgster> is that for @@ vars?
banistergalaxy has joined #ruby
<cout> not necessarily
<philcrissman|afk> dbgster: it would be for class methods.
<dbgster> thanks
csprite has joined #ruby
jwang has joined #ruby
macabre has joined #ruby
Sailias has joined #ruby
Targen has joined #ruby
<MasterBob> I have two parallel arrays which I want to output to console. What is the best way to go about doing that?
res0nat0r has joined #ruby
res0nat0r has joined #ruby
<MasterBob> I think using an iterator for one and a counter for the other.
ZachBeta has joined #ruby
Rishi_ has joined #ruby
<cout> MasterBob: zip
<MasterBob> cout: thanks.
thone_ has joined #ruby
banistergalaxy has joined #ruby
<MasterBob> How do I format data outputted to the console?
<oooPaul> inspect.
Beoran_ has joined #ruby
cmasseraf has joined #ruby
<MasterBob> Okay thanks oooPaul
<MasterBob> Also, nice nick cout.
banister_ has joined #ruby
froy has joined #ruby
<MasterBob> inspect only takes one parameter though, right? How would I say I want the string to be X characters long?
<cout> MasterBob: don't use inspect to format anything but debugging output
libertyp1ime has joined #ruby
<MasterBob> Okay.
<cout> MasterBob: read up on String#%
libertyp1ime has joined #ruby
Indian has joined #ruby
banistergalaxy has joined #ruby
dhruvasagar has joined #ruby
luckyruby has joined #ruby
libertyp1ime has joined #ruby
CheeToS has joined #ruby
libertyp1ime has joined #ruby
albemuth has joined #ruby
mikeric has joined #ruby
elake has joined #ruby
pdtpatr1ck_ has joined #ruby
libertyp1ime has joined #ruby
pu22l3r_ has joined #ruby
superguenter has joined #ruby
arubin has joined #ruby
<arubin> I am looking for an explanation of this behavior: http://pastie.org/3581893
FACEFOX has joined #ruby
<cout> arubin: ruby doesn't search for local variables in scopes outside the method
seanstickle has joined #ruby
EddieS has joined #ruby
Mekkis has joined #ruby
<workmad3> arubin: specifically, the keywords 'class', 'def' and 'module' don't create closures
<workmad3> arubin: so within the code for any of those constructs, you can't pull in local variables from outside
banistergalaxy has joined #ruby
drbawb has joined #ruby
<banistergalaxy> arubin: methods are not closures
drbawb has joined #ruby
leoncame` has joined #ruby
zulax has joined #ruby
mikepack has joined #ruby
tatsuya_o has joined #ruby
banister_ has joined #ruby
chsonnu has joined #ruby
res0nat0r has joined #ruby
carlyle has joined #ruby
wmoxam has joined #ruby
libertyp1ime has joined #ruby
swarley has joined #ruby
pdtpatr1ck has joined #ruby
wallerdev has joined #ruby
maletor has joined #ruby
badabim_ has joined #ruby
<swarley> anyone want to tell me how to do an array of strings pointing to arrays of strings in sqlite?
<epochwolf> the same as you would with any sql database?
<swarley> no idea how to in any sql
* epochwolf blinks…
<epochwolf> no clue where to start explaining that, :/
<swarley> in ruby i have {"Hello World" => {"how" => 1, "other" => 43}}
<swarley> i want to try to make a database where i can use a similar structure
<swarley> if possible
<swarley> i guess i could make multiple tables
<cout> yep.
<epochwolf> that's a start
<swarley> can table names be multiword?
<fowl> o.o
<swarley> i dont think they can
<fowl> you mean "table a" i dont think so
<epochwolf> swarley: multiword?
<fowl> table_a would work though
<oooPaul> Do you want to represent the hash as a set of table rows, or do you just want to store the hash IN a database column?
<oooPaul> The ever-important-but-never-asked question is... Why do you want to do this? :)
mikeric has joined #ruby
<heftig> making a tree structure is quite easy, just needs ID and ParentID columns
<swarley> i have this working with a hash, but i'd like to use a database instead
<swarley> since the hash would get very large with a decent size text
<swarley> (its a markov chain text generator)
<heftig> oh, i wrote one of those
<heftig> uses hashes and saves them using Marshal
<oooPaul> If you just want to save a hash in a row, you can use serialize.
<oooPaul> (if you're using ActiveRecord, that is)
<Nisstyre> heftig: not as easy as in languages that allow algebraic data types
<Nisstyre> :)
<swarley> i've been playing with a few different storing algorithms, and i think this is the one im going to stick with. So now i need to find a good way to keep it from using 9000000000gb of ram
havenn_ has joined #ruby
t0mmyvyo has joined #ruby
<heftig> swarley: how much text are we talking?
cloke_ has joined #ruby
wallerdev has joined #ruby
banistergalaxy has joined #ruby
dagnachewa has joined #ruby
<heftig> my biggest chain here currently has 83776 states, 6.6MB marshaled, uncompressed
<swarley> heftig, right now its sitting at 245 keys
<swarley> buts its only been up about 45minutes
<swarley> and its learning via monitoring irc chat
zwevans has joined #ruby
<swarley> i was originally dumping it as YAML, but that is still going to make a big text file
bosox20051 has joined #ruby
k_89_ has joined #ruby
Lord-Harlot has joined #ruby
<swarley> what unit does File#size return in? im pretty sure its bytes
<fowl> bytez
confounds has joined #ruby
nari has joined #ruby
maletor has joined #ruby
Avanine has joined #ruby
pu22l3r has joined #ruby
<MasterBob> Is there any difference in Regexp.compile and Regexp.new ?
doublethink has joined #ruby
<seanstickle> is the banistergalaxy here?
adit_ has joined #ruby
<MasterBob> No, there isn't,
<banistergalaxy> seanstickle: sup homie
<seanstickle> banistergalaxy: hey, you have the down low on all the pry magic, right?
<banistergalaxy> seanstickle: Yeah
<seanstickle> banistergalaxy: how do I go about embedding pry into a Ruby script, so that I can do a bunch of stuff, and them drop the user into a pry session?
<banistergalaxy> seanstickle: just put `binding.pry` at the point u want to call it, that's to use it as a debugger, it'll display surrounding context from the point it's called
johnmilton has joined #ruby
<banistergalaxy> seanstickle: alternatively if u dont want to use it as a debugger just put `Pry.start` and it'll start a session at top-level (and not show surrounding context when it starts)
superguenter has joined #ruby
<banistergalaxy> seanstickle: or Pry.start(your_obj) to start it in the context of the specified object
<seanstickle> That is some perfect awesomeness.
AndroUser has joined #ruby
<seanstickle> Thanks banistergalaxy !
<banistergalaxy> np
<fowl> seanstickle: i use "do_some_stuff rescue binding.pry" a lot
cmasseraf has joined #ruby
Know1edge has joined #ruby
Lord-Harlot has joined #ruby
<MasterBob> I'm trying to use string.sub. But when I pass the regexp I get a can't convert Regexp into String TypeError
shtirlic_ has joined #ruby
araujo has joined #ruby
<oooPaul> foo = "biff"; foo.sub(/ff/, 'll') doesn't work for you?
<MasterBob> I'm working on a test case at the moment
<oooPaul> The second parameter should be the replacement value, not another Regexp.
csprite has joined #ruby
<MasterBob> okay.
pingfloyd has joined #ruby
<oooPaul> a.sub(b, "photo") should do you.
<oooPaul> If I understand what you're trying to do.
manizzle has joined #ruby
bbttxu has joined #ruby
<MasterBob> oooPaul: got it! thanks.
<oooPaul> Also remember, sub only does a single replacement; gsub if you want to replace all matches.
igotnolegs has joined #ruby
liluo has joined #ruby
dennda has joined #ruby
kevinbond has joined #ruby
<MasterBob> Yep! Thanks.
t0mmyvyo has joined #ruby
<MasterBob> I'm gonna have a some more questions on that in a bit.
cloke has joined #ruby
libertyp1ime has joined #ruby
seoaqua has joined #ruby
<oooPaul> Sho.
<oooPaul> Hopefully I'm still here in a bit. :)
zodiak has joined #ruby
nvez_ has joined #ruby
apok_ has joined #ruby
<banistergalaxy> seanstickle: what kind of app are you writing that u need a pry console
wookiehangover has joined #ruby
<seanstickle> banistergalaxy: standalone ActiveRecord thing to connect to a legacy database.
<seanstickle> banistergalaxy: I want to load up a bunch of models, and then drop into an interactive repl
mikeric has joined #ruby
csprite has joined #ruby
sacarlson has joined #ruby
<banistergalaxy> seanstickle: oh ok cool, probably best to use `binding.pry` then, so u get access to any locals
libertyp1ime has joined #ruby
<arubin> banistergalaxy: Would you care to elaborate a bit on your previous explanation? Code similar to that in C would work fine and not because C is creating a closure.
<arubin> banistergalaxy: I am more than willing to read an in depth explanation.
<banistergalaxy> arubin: but in C the 'b' would be a global variable
Sailias has joined #ruby
<banistergalaxy> arubin: whereas it's not creating a global in ruby, it's just a top-level local
<arubin> What is the difference between "global" and "top-level"?
<banistergalaxy> arubin: a global is visible everywhere, a local is only visible at top level
<arubin> I realize that there is a difference in Ruby.
libertyp1ime has joined #ruby
rboyd has joined #ruby
<arubin> Let me approach this from a different angle.
<arubin> When I start the REPL what context or namespace am I in?
nvez has joined #ruby
<MasterBob> I'm confused on how to access data I captured in a regexp using ()
<banistergalaxy> arubin: TOPLEVEL_BINDING
<banistergalaxy> arubin: or a binding built on toplevel
<oooPaul> MasterBob, you mean using $1, $2, etc?
<MasterBob> Yeah.
<oooPaul> Just reference them. :)
<banistergalaxy> arubin: look, basically a 'def' creates a new scope, all locals that were present prior to the 'def' no longer are accessible inside the 'def'
<MasterBob> oooPaul: just $1 ? or is it regexp.$1 ?
<oooPaul> "foobar" =~ /(fo+)/; foo = $1
<oooPaul> Nope, they're globs.
<oooPaul> Just $1, $2, etc.
libertyp1ime has joined #ruby
<banistergalaxy> arubin: C doesn't have this issue cos it's impossible to define a function in C outside of "top level" and all variables defined at "top leveL" are global
<MasterBob> oooPaul: using named_captures will return a hash of all the captured items, yes?
<oooPaul> Not sure, never heard of it
libertyp1ime has joined #ruby
<oooPaul> Looks like it, though.
uris has joined #ruby
mneorr has joined #ruby
<arubin> banistergalaxy: Thank you. I will ruminate on that for a bit.
blueadept has joined #ruby
<uris> hi, ruby newbie here, trying to use rest-client gem : http://rubydoc.info/gems/rest-client/frames
<banistergalaxy> arubin: if u want to access b inside your method then rename it $b
<uris> but i get an error saying it cant find rest_client
<uris> i followed the example in the docs
<banistergalaxy> arubin: or you can force a method to be a closure by using define_singleton_method instead of 'def'
<MasterBob> So then should I used named_capture or names if I want to get all the captures?
<uris> i already installed rest-client: gem install rest-client
<banistergalaxy> define_singleton_method(:hello) { puts b }
<uris> and checked that it was indeed installed gem specification rest-client
<arubin> banistergalaxy: Sure. I am just trying to understand what Ruby is doing more than anything.
mneorr has joined #ruby
sohocoke has joined #ruby
mneorr has joined #ruby
<banistergalaxy> arubin: there are some strucutres in ruby that always create new scopes (causing extant locals to vanish), these are: def, class, and so on
<oooPaul> MasterBob, it's all situation dependent... Hard to say one way or the other.
<arubin> banistergalaxy: I think that I understand that much now. I am more curious where b actually is.
csherin has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
mneorr_ has joined #ruby
<arubin> Kernel.instance_variables shows b, but I am not sure what that means exactly.
libertyp1ime has joined #ruby
justfielding has joined #ruby
<banistergalaxy> arubin: you want to use local_variables
cableray has joined #ruby
camilo has joined #ruby
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
ZachBeta has joined #ruby
libertyp1ime has joined #ruby
<MasterBob> Well, thanks for your help oooPaul
booginga5000 has joined #ruby
coreydaley has joined #ruby
booginga has joined #ruby
libertyp1ime has joined #ruby
ElderFain has joined #ruby
wmoxam has joined #ruby
nfluxx has joined #ruby
<oooPaul> No worries. Time for me to scoot, finally...
philcrissman has joined #ruby
ElderFain has joined #ruby
choffstein has joined #ruby
caiges has joined #ruby
ZachBeta has joined #ruby
libertyp1ime has joined #ruby
<nelsonblaha> Relatives%ollo16453
bbttxu has quit [#ruby]
libertyp1ime has joined #ruby
libertyp1ime has joined #ruby
snip_it has joined #ruby
<Limb> \
wyhaines has joined #ruby
IrishGringo has joined #ruby
v4n_ has joined #ruby
<v4n_> hi
<fowl> Sup
<v4n_> is there a convention to handle Ruby 1.8 'rubygems' requirement?
<v4n_> maybe just keep the 'require "rubygems"' line in a Ruby script, which won't matter with Ruby 1.9?
libertyp1ime has joined #ruby
nikhil_ has joined #ruby
libertyp1ime has joined #ruby
nrm has joined #ruby
libertyp1ime has joined #ruby
wookiehangover has joined #ruby
booginga has quit ["Leaving"]
libertyprime has joined #ruby
libertyprime has joined #ruby
ringotwo has joined #ruby
libertyprime has joined #ruby
waxjar has joined #ruby
colinwd has joined #ruby
ed_hz_ has joined #ruby
Hensley has joined #ruby
radic_ has joined #ruby
libertyprime has joined #ruby
t0mmyvyo has joined #ruby
rushed has joined #ruby
aBound has joined #ruby
Synthead has joined #ruby
libertyprime has joined #ruby
mikepack has joined #ruby
c0rn has joined #ruby
aBound has quit ["Leaving"]
libertyprime has joined #ruby
ryanf has joined #ruby
arvidkahl has joined #ruby
nfluxx has joined #ruby
briandoll has joined #ruby
FACEFOX has joined #ruby
akl has joined #ruby
res0nat0r has joined #ruby
colinwd has joined #ruby
jimmy has joined #ruby
ablemike has joined #ruby
noyb has joined #ruby
sdeobald_ has joined #ruby
sirdeiu has joined #ruby
duard has joined #ruby
rippa has joined #ruby
adeponte has joined #ruby
snip_it has joined #ruby
colinwd has joined #ruby
startling has joined #ruby
iamjarvo has joined #ruby
daniel_hinojosa has joined #ruby
torrancew has quit [#ruby]
badabim has joined #ruby
dyjytyl has joined #ruby
dhruvasagar has joined #ruby
<dyjytyl> does anyone know of any open source bitcoin miners written in ruby?
shadoi has joined #ruby
<uid0> is there a parameter I'm missing ?
startling has quit [#ruby]
superguenter has joined #ruby
Pxk has joined #ruby
<Pxk> hi
pu22l3r_ has joined #ruby
<Pxk> is ruby the most easy programing language?
drake_ has joined #ruby
<undersc0re> Pxk: meh
<undersc0re> Probably
<uid0> is there a parameter I'm missing ?
<Pxk> can i make visual programs with ruby?
<undersc0re> Pxk: derp
<Pxk> i am looking for the most easy language to make an easy prgoram with visual interface,
<Pxk> derp ?
<undersc0re> There are GUI Toolkits that have bindings for Ruby
<undersc0re> uid0: wat
gokul has joined #ruby
<Pxk> bassically what i want is a GUI with some options, and if user select option 1, then must create a txt with a chaintext + number 1
<Pxk> and so on
<Pxk> thats all
<Pxk> but with a few options
<undersc0re> Pxk: Do you know what a GUI toolkit
<undersc0re> is?
<fowl> uid0: is there a parameter I'm missing?
<Pxk> is ruby what i am looking for? i will not download 4gb of visual c# or so
Guest6874 has joined #ruby
<Pxk> undersc0re i guess yes but maybe no
macmartine has joined #ruby
blueadept` has joined #ruby
<Pxk> just a visual interface to put buttons visually
<Pxk> and so on
<Guest6874> Good Mornning Guys
<undersc0re> Pxk: then find yourself a GUI Toolkit
<undersc0re> .
<Pxk> witch is the most lighweight you recomend me?
nikhil_ has joined #ruby
<Pxk> lets take a look thnks
<fowl> shoes is supposed to be pretty simple, i've never used it myself though
sungji has joined #ruby
sungji has joined #ruby
<Pxk> what a hassle, not even a screenshoot of each one
<Pxk> not even the size
<Pxk> lets check shoes then
<Pxk> but can i make an exe
<Pxk> with this?
<fowl> aww you need screenshots? ;_;
<fowl> can beggars be choosers in 2012?
<Pxk> just see the look and feel
nrmL_ has quit [#ruby]
<Pxk> two words i never heard,
<Pxk> now i am a bit more wise related to english language, thnks
td123 has joined #ruby
<fowl> Pxk: there are a few ways to package your ruby program into an exe, the most popular of which is Ocra
<undersc0re> ^^
<undersc0re> Pxk: it's hard to code if you don't know english
<shevy> Pxk ruby gtk
<undersc0re> >:
<undersc0re> shevy: NO
<undersc0re> ruby-gtk2 binding suck
<undersc0re> Tk or Qt
<shevy> undersc0re what do you suggest
<Pxk> okey so i need, ruby, then i need a visual interface, then i need install an exe converter,
<undersc0re> I personally prefer Tk for the simplicity
<shevy> undersc0re have you ever written in ruby-qt???
<undersc0re> shevy: ya
<Pxk> there is not any lenague with just downloading the programer be able to generate a visual program ? exe one
<undersc0re> the bindings aren't nearly as bad as the GTK2 bindings
<shevy> what is "lenague"
mneorr has joined #ruby
<undersc0re> lenague must be some type of foreign word
<shevy> and a "programer" what is that
<Pxk> amsn is programed with tk-gtk and it's cr*p, worst program ever, works very bad
<undersc0re> wtf is "tk-gtk"
<shevy> what is "cr*p"
<Pxk> language*
<shevy> Pxk, you need a new keyboard
<Pxk> cr*p = crap
<undersc0re> or, to spell stuff correctly
<shevy> ah the keyboard works better now
<fowl> chill out
<fowl> he already said he doesnt speak english
<undersc0re> yeah, i dunno what cr*p is
<fowl> talk about ruby you turds
<undersc0re> fowl: but he is right now!
<Pxk> i do speak english but is not my native lang, i try my best,
<shevy> :D
<Pxk> what about python or delphi ? they are more easy to programe a simple GUI for an easy ttask ?
<shevy> I think it must be the keyboard
<shevy> ttttttask!
<undersc0re> Pxk: you should like
<undersc0re> not learn Delphi
<uid0> is there a parameter I'm missing ?
<shevy> they like delphi because you build component programs
<undersc0re> uid0: What do you mean?
<Pxk> but Delphi can be exported to exe or its like perl?
<shevy> uid0 CONTEXT?!?!
kp666 has joined #ruby
<undersc0re> shevy: this is like the 4th time he's said that
<undersc0re> so, you know
<shevy> lol
<undersc0re> He hasn't sad anything helpful
<shevy> Pxk, see. You should pick a language that you know you will be using for a longer while.
<undersc0re> s/sad/said/
<shevy> Whether it is delphi/perl/python/ruby does not matter. There is no silver bullet to solve all your problems in one day either.
<shevy> But choose wisely.
<undersc0re> ^Exactly
<Pxk> i dont like programing shevy, i am just looking for some lightweight "all in one" compiler that allow me to create a visual exe quick and easy for an easy task, just generate a txt file with some numbers depending on the info selected
<shevy> ok, pick delphi
<shevy> you also won't like it but that's ok since you don't like programming anyway
<fowl> uid0: is there a parameter I'm missing?
<shevy> lol
<Pxk> i just like php, css, and so on
<Pxk> i hate java
<Pxk> and object based programing
<shevy> hey
<shevy> I thought you dont like programming
<shevy> why do you like php???
<Pxk> i just like it when i understand it i guess,
<fowl> Pxk: if you hate object oriented programming ruby's not your language
<Pxk> then ruby out of the list,
<Pxk> i read somewhere it was very easy
<shevy> you read wrong
<shevy> ruby requires thinking powers
<shevy> php does not
<shevy> delphi even less so
<Pxk> delphi is easier than php you mean?
<shevy> I find php very hard
<uid0> is there a parameter I'm missing ?
<Pxk> seriously?
<fowl> uid0: is there a parameter I'm missing?
cmasseraf has joined #ruby
<shevy> Pxk yeah. if you use only the minimum ruby offers, every program is much easier to understand than the equivalent solution in php
<uid0> am I missing a paramater?
<fowl> uid0: is there a parameter I'm missing?
<shevy> uid0: I am missing ur mom
<fowl> uid0: maybe you're missing a parameter
<shevy> uid0: you dont miss a parameter
<fowl> in soviet russia, parameter misses you?
<Pxk> but take a look shevy, you need 3 compilers to generate a visual exe with ruby, php is just notepad and done
<shevy> Pxk wah
<fowl> then use php, there's probably GTK bindings for it
<fowl> in any case please stop talking about non-ruby in here
<fowl> it's not kosher bro
<shevy> Pxk what is the difference with ruby and php?
<Pxk> can i make an exe with php code
<shevy> I think you are looking at the wrong language still
<Pxk> php is not compiled
<shevy> go use delphi, father 20 children and be happy
<shevy> and ruby is compiled?
<uid0> is there a parameter I'm missing ?
<Pxk> is not?
<shevy> where do you get your information Pxk?
<Pxk> i jsut guess it,
<shevy> I mean
<fowl> uid0: do you need a parameter?
<shevy> aaaaah :)
<shevy> hilarious O_O
<shevy> Pxk, ruby is used to let NASA fly to the moon
<Pxk> since when ruby exist then?
<Pxk> since 1969
<shevy> Pxk matz wrote it somewhere in the 1990es
<shevy> Pxk there is a great thing called wikipedia, the data is all there
<fowl> shevy: version 1.0 of ruby was actually found scrawled inside a cave in france
<shevy> lol
<fowl> it was recently uncovered and they made a movie about it
<shevy> Pxk can you stick to php please?
<uid0> parameter failure
<Pxk> if we keep looking for info on wikipedia we will lost the hability to speak each others...
<shevy> uid0 ur mom is a failure
<shevy> the "hability" yeah
k_89_ has joined #ruby
<rippa> dis is dildos
<shevy> and we "speak" a lot on IRC eh..
<rippa> he speaks liske skwisgar skwigelf
<Pxk> ability
<rippa> *-s
<shevy> lol
Nisstyre has joined #ruby
<shevy> is that the swedish cook?
<Pxk> come on guys, my native lang is spanish, don't be so hard pointing to every little mistake
<shevy> ohh
<shevy> rippa, that was the swedish cook I meant http://www.youtube.com/watch?v=nw-z_FAyIVc
<shevy> Pxk and so what, my native language ain't english either, it's just that you don't seem to know what you want
<shevy> if you want a good programming language use ruby
<shevy> if you care about visual shit, use delphi or dive into C++
<shevy> or java
<rippa> or c#
drake_ has joined #ruby
<rippa> it's quite fun
<Pxk> i want an easy programing language, without the hassle of download a big compiler like visual studio
<uid0> is there a parameter I'm missing ?
<rippa> uid0: yes
<shevy> Pxk, ruby interpretes .rb scripts
wilmoore has joined #ruby
<shevy> there is no compiler
Tearan has joined #ruby
<rippa> there is no spoon
<fowl> rippa: did you know how to spell skwisgar skwigelf without looking it up? if so kudos man
<shevy> Pxk, are you using windows????
<rippa> fowl: I'm good at remembering useless things
[Neurotic] has joined #ruby
<Pxk> i can't understand how people can keep using java, its like use flash for a video, just a no sense, the most funny part of java is Eclipse and Netbeans, both compilers programed using java! and thats the reason they are so slowly
<Pxk> another example, jdownload, takes ages to start, why? java programed, java is probably the worst programing lenguage ever invented
<Pxk> language*
<fowl> yeah java blows
The_Tick has joined #ruby
<fowl> now stfu unless its about ruby
<shevy> Pxk it also leads at TIOBE
<The_Tick> is there a preferred paste bot in here?
<rippa> Albert Einstein did not fail mathematics in school, as is commonly believed. Upon being shown a column claiming this fact, Einstein said "I never failed in mathematics... Before I was fifteen I had mastered differential and integral calculus."
<The_Tick> outside of the topic that I just read
<shevy> The_Tick I dont think there is one
<The_Tick> lol
<uid0> is there a parameter I'm missing ?
<shevy> uid0 yea
bier has joined #ruby
<shevy> ack
<shevy> ruby is at rank 13 now :(
<shevy> at least python dropped as well
mikeric has joined #ruby
<shevy> and C# has overthrown C++
mephux has joined #ruby
<Pxk> i just found a nice compiler from php to exe, i will try it, its going to be funny
<banistergalaxy> shevy: on windows you mean? :) i dont see many linux/macosx programmers using c# :)
<shevy> hmm
<uid0> is there a parameter I'm missing ? funny shevy windows mean linux C++ well 13
<shevy> uid0 wat
<shevy> uid0 hey try /join 0
<shevy> why can't I eval this bot :(
<banistergalaxy> shevy: hey can u speak in strictly german for a while
<shevy> I am trying to make everyone speak only english
<banistergalaxy> shevy: you must be getting tired of english, feel free to do the whole german thing for a few hours, srsly
<eddie_> Guten Tag
<shevy> it is the world language after all
<shevy> german must die
<shevy> don't you realize that as long as we speak different languages we will be SEPARATED!!!
dyjytyl has joined #ruby
<banistergalaxy> shevy: lets all speak german then, und.
<shevy> german is dead
<shevy> let it go man
<eddie_> shevy: i would like to speck German, so to learn Ruby and German at the same time
<shevy> speck what is that!!!
<shevy> I can't even correct that!
<shevy> forget german!
<shevy> learning ruby is ok though
<davidcelis> speck |spek| noun
<davidcelis> a tiny spot
<uid0> is there a parameter I'm missing ? correct german speck time SEPARATED!!! realize
<davidcelis> shevy: ^
<shevy> :(
<shevy> now you taught the bot incorrectly as well
<banistergalaxy> davidcelis: what the fuck did i just read
<davidcelis> shevy: is uid0 your bot
<shevy> no
<shevy> uid0 annoys me. my bot would not annoy me.
<davidcelis> banistergalaxy: a definition
<davidcelis> why is uid0 here? who is responsible for this
<davidcelis> its in #rubyonrails as well
<shevy> dunno
<davidcelis> gtfo, uid0
<shevy> some idiot hipster script kiddie I assume
<banistergalaxy> davidcelis: gtfo hippie
<davidcelis> NOU
<shevy> davidcelis I always tab complete you to David_Miller
<shevy> :(
<davidcelis> thats because i don't say much in here
<davidcelis> :(
<shevy> you say more than this david miller
<uid0> is there a parameter I'm missing ? response as well script assume david
<shevy> yeah uid0 randomly pick up words and reassemble them you little silly bot
<The_Tick> you know, I join the channel
<The_Tick> I paste the code
<The_Tick> and then I figure it out
<The_Tick> thanks guys :
<The_Tick> :P
<shevy> that's ruby for ya!
<The_Tick> indeed
<shevy> but admit it
<The_Tick> and I don't even know it!
<shevy> it was a simple problem ;P
<The_Tick> it was a "can't convert nil to String"
<The_Tick> the $foo was wrong
<The_Tick> http://pastie.org/3583090 was what I had when I joined
pdtpatr1ck has joined #ruby
<The_Tick> http://pastie.org/3583154 is what I have now that works
<banistergalaxy> davidcelis: at night the autumn woods cry out with deadly weapons and the golden plains the deep blue lakes above which more darkly, rolls the sun
ipaddy has joined #ruby
<uid0> is there a parameter I'm missing ? figure guys ruby admit problem String"
<ipaddy> NickServ
headius has joined #ruby
<fowl> i've had enough of this
<ipaddy> MSG NickServ
noyb has joined #ruby
<fowl> I"M SNITCHIN'
<ipaddy> When building my models is there a limit as to how many field I should have per Tavel?
<ipaddy> Table
<banistergalaxy> ipaddy: join #rubyonrails
<The_Tick> oh I don't envy you guys
<The_Tick> all the rails guys come in here first right?
<shevy> yeah
<ipaddy> Join #rubyonrails
<The_Tick> did you guys ever think about putting that last bit in the topic as the first thing?
<shevy> and they even repeat things said to them
<shevy> I dunno even know who can modify the channel topic here
<shevy> it's like chaos, total chaos
<fowl> apeiros has permissions
<ipaddy> banistergalaxy: how do I join?
<The_Tick> throw a /msg chanserv access #ruby list
<The_Tick> and that'll show you who can
<fowl> ipaddy: /join #rubyonrails
<The_Tick> there's also an option where, onjoin, one of the bots will automatically message the user
<The_Tick> s/bots/services/
<The_Tick> I have a kind of design problem now
<The_Tick> I have a list of language codes from the source, and one for the destination
<davidcelis> The_Tick: I didn't
ascarter has joined #ruby
<shevy> The_Tick where is the problem!
<The_Tick> and it's more or less for copying files from source to destination
<The_Tick> shevy: i'm typing :)
<The_Tick> shevy: I have the problem in my head, i'm trying to figure out how to type it
<shevy> ok ok
<The_Tick> basically, transifex has different language codes than apple does for localizations
ringotwo has joined #ruby
nikhgupta1 has joined #ruby
<The_Tick> I know where the files will be at, and where they need to go
nikhgupta1 has quit [#ruby]
<shevy> ok and FileUtils.cp_r does not work ?
<The_Tick> oh it does now
<The_Tick> in that second paste, works great
<The_Tick> I'd like to make it dynamic though
<The_Tick> so that I can have pl = pl at some point
<The_Tick> or more like, zh_TW = zh-Hant
<The_Tick> so I'd like to read the right docs for what I need
<The_Tick> but I don't know what I need
<shevy> what is your current code
<shevy> you never link to pastie so far :(
* The_Tick did earlier
<shevy> 100 years ago!
<The_Tick> ya :)
<shevy> value = ENV[name.to_s] <--- I thinkt hat is tainted
<shevy> when it comes from ENV
<shevy> also why do you use so many $
<The_Tick> I don't even know if I need that, I copied it from a build script I already have
<The_Tick> shevy: because I was trying to figure out why it wouldn't work, then figured out I misspelled one
<The_Tick> but honestly I don't know what I'm doing
* The_Tick has no problem admitting that
<shevy> well the $ is not needed in the example there right?
<The_Tick> in theory I could just have typed the path
<The_Tick> but I figured I could start learning ruby
<shevy> that is all nice and not, I am just wondering about the various $, you can remove them all
<shevy> also
<shevy> env_default is not actually used at all?
<The_Tick> no
<The_Tick> it can go
<shevy> I think you probably have not made up your mind yet about what you need :)
<The_Tick> probably true
<The_Tick> I was more figuring out how things work
<shevy> you should also be able to omit "FileUtils." if you do include FileUtils somewhere at the top I think
<The_Tick> I could have 2 $variables (those are variables right?) and tat's it
<shevy> $foo are variables yes
<shevy> but so is
<shevy> foo
<shevy> too
<shevy> :)
<shevy> $foo is just globally available
<The_Tick> wait
<The_Tick> ah ok
<shevy> it will become very annoying when you use several .rb files
<shevy> also it looks ugly. and uses one extra char
milkshakes has joined #ruby
<The_Tick> ok, so a non-global is just foo=bar
<The_Tick> and a global is $foo=bar
<rippa> 1,3,5,7-tetracarbomethoxybicyclo[3.3.1]nonane-2,6-dione
<The_Tick> honestly this is so much better than a makefile :)
<shevy> The_Tick yea
<shevy> well
<shevy> right now it looks 200% uglier than it should be
<The_Tick> well sure
<shevy> and makefiles are so ugly
<shevy> but .m4 is uglier
<shevy> and autoconf *.in and all those other crap from GNU autocraptools
philips has joined #ruby
bengl has joined #ruby
relix has joined #ruby
maletor has joined #ruby
methodfree has joined #ruby
<The_Tick> we switched our build system to a rakefile from a makefile
<shevy> beauty is a rare think in the computer world
jbpros has joined #ruby
<The_Tick> and it's so much simpler
<shevy> *thing
<The_Tick> but I figured it's time to figure out the stuff here
<shevy> hehehehe
<The_Tick> which means I have to figure out the terminology :)
<shevy> well, all what is in a rakefile is valid ruby code
methodfree has joined #ruby
svnlto has joined #ruby
jbpros has joined #ruby
<The_Tick> yep
maletor has joined #ruby
bengl has joined #ruby
<The_Tick> exactly
<shevy> some things are a bit odd
<shevy> curdir = FileUtils.pwd()
<shevy> for instance, people usually omit the ()
<shevy> (when there are no arguments)
<fowl> whats wrong dir Dir.pwd
<shevy> yeah that is the next thing, Dir.pwd would be shorter
<The_Tick> nothing other than I copied this from something else
<shevy> The_Tick the original author probably had not much ruby experience
VxJasonxV has joined #ruby
<The_Tick> shevy: he's more rails oriented
<shevy> yeah
<shevy> rails attracts weird people
<The_Tick> I couldn't give 2.. well you get the idea
<shevy> I think they don't care about ruby at all
<The_Tick> personally ruby as a language so far is appearing pretty nice and easy
emmanuelux has joined #ruby
<shevy> just a "write it quickly no matter how, then move on"
<The_Tick> I never really fell into love with python or anything
<The_Tick> objc I'm cool with, to a degree
<The_Tick> shevy: you'd probably hate our build script :P
<shevy> what is cool in ruby is to think
<The_Tick> ya
<shevy> The_Tick, I hate most build scripts
<The_Tick> well ya
<shevy> I also dont like rake either
<The_Tick> they're necessary evils
<shevy> I hate too many things
dekz has joined #ruby
<The_Tick> the thing I hate most right now
<The_Tick> is the stupid movie bing commercial
<shevy> dont know of that
<The_Tick> interrupting my tv show that makes noise for me to block out
<The_Tick> it's some annoying commercial that was on
<shevy> I cant stand watching commercials
<The_Tick> oh and I hate the fact that now I'm going to spend 2 weeks making this script better
<The_Tick> shevy: I can't either
<shevy> too much propaganda attack on my poor old brain
ryanf_ has joined #ruby
<The_Tick> "old"?
<The_Tick> heh
<shevy> yeah
<shevy> I used to joke about dinosaur coders writing in perl
<shevy> the +50 years old ones you know
<shevy> over the years I am making less and less jokes :>
<The_Tick> ok, so in my FileUtils.cpr section
relix has joined #ruby
<The_Tick> does that $growl_bezel_display_strings require the $
fcoury has joined #ruby
<The_Tick> or does the #{} indicate that it's a variable and the $ just means that it's the global?
<shevy> the $ annoys me
<The_Tick> heh, so it's not required?
<shevy> #{} will just substitute
<The_Tick> ah ok
<shevy> foo = "Hi there."; puts "Hmm... #{foo}"
<shevy> $foo = "Hi there."; puts "Hmm... #{$foo}"
<rippa> ( ´_ゝ`)
<shevy> but you see, the $ is totally useless and ugly here
<shevy> so please kill the $
ziyadb has joined #ruby
<The_Tick> oh those are going
<shevy> with #{} ruby expands the values inside
<The_Tick> just asking to make sure
<shevy> you can also call methods there
<rippa> $foo = "Hi there."; puts "Hmm... #$foo"
<The_Tick> yay
<shevy> def foo
<The_Tick> that's awesome
<rippa> works too
<shevy> return "oki dokie"
<shevy> end
<shevy> puts "hmm... #{foo}"
<shevy> oh true
<banistergalaxy> shevy: what is your opinion of the abbreviaion "okies" for "okay"
<shevy> you can omit the #{} sometimes as rippa showed you
<shevy> banistergalaxy if you are gay, keep on using it
<shevy> english is overrated
<shevy> we must all learn german
<The_Tick> alright, I have to go
<The_Tick> but this gives me a lot to work with
<The_Tick> is there a good book to read on ruby?
<The_Tick> not rails, just ruby
<shevy> The_Tick hmmm... best way to learn is really to just write scripts
<shevy> pickaxe 2 was good
<shevy> the current one I dont like as much as the one before :\
<The_Tick> shevy: ya, that's my plan
<The_Tick> but worth asking usually
<shevy> I feel things got diluted from the switch to ruby 1.9.x
trivol_ has joined #ruby
<The_Tick> anyhow, thanks for the advice
* The_Tick thinks he'll idle here
<rippa> you can even define methods inside interpolation
<shevy> ruby 1.8.x I loved
<shevy> ruby 1.9.x feels more like someone I know, who has some quirks, who I cant love anymore. but who I can get along with still at least
<shevy> I liked the 1.8.x days more though :(
<shevy> but the good things always fade
dominikh has joined #ruby
Transcended has joined #ruby
<shevy> banistergalaxy rippa is pry infected!
<shevy> but why do you guys always use such prompts
<shevy> and what means the [5] there
alaa_ has joined #ruby
<rippa> line 5
<shevy> hmm
<shevy> ohhh
<banistergalaxy> shevy: rippa is our russian ambassador
<shevy> in vim I have some function where I hit "F1" key and it toggles line number.
<shevy> is that possible in pry too? like toggle on/off line numbers like that?
greenarrow has joined #ruby
<banistergalaxy> rippa: it's actually 'expression number' and not line number
BrianE has joined #ruby
<banistergalaxy> shevy: no
<banistergalaxy> shevy: well yes if you type simple-prompt
<shevy> hmm
<banistergalaxy> it'll toggle the prompt to one without line numbers
<rippa> I use relative line numbers in vim
<shevy> ack, time to leave, cya
noyb has joined #ruby
c0rn has joined #ruby
x0F_ has joined #ruby
<banistergalaxy> shevy: sleep well
danishkhan has joined #ruby
JohnBat26 has joined #ruby
Morkel has joined #ruby
res0nat0r has quit [#ruby]
<VxJasonxV> I'm having a problem with RMagick. I'm just trying to run annotate on an image, and when I execute it, I get: in `block': can't convert nil into String (TypeError). The line of code is "self.font = 'Anonymous Pro B.ttf'".
<VxJasonxV> that is inside an annotate block, of course.
<VxJasonxV> I don't exactly understand what 'block' is that it's referencing.
maletor has joined #ruby
bengl has joined #ruby
methodfree has joined #ruby
jbpros has joined #ruby
philips has joined #ruby
savage- has joined #ruby
<VxJasonxV> I've also tried a fully qualified path (which I'd rather avoid), which also didn't work.
Skipants has joined #ruby
mikeric has joined #ruby
Skipants has quit [#ruby]
libertyprime has joined #ruby
dekz has joined #ruby
gianlucadv has joined #ruby
kuzushi has joined #ruby
svnlto has joined #ruby
djdb has joined #ruby
eeadc has joined #ruby
eeadc has joined #ruby
fcoury has joined #ruby
relix has joined #ruby
eeadc has joined #ruby
eeadc has joined #ruby
BrianE has joined #ruby
eeadc has joined #ruby
eeadc has joined #ruby
ziyadb has joined #ruby
eeadc has joined #ruby
ee4dc has joined #ruby
pp01bit has joined #ruby
<VxJasonxV> tough room
shruggar has joined #ruby
robacarp_ has joined #ruby
fukushim_ has joined #ruby
luckyrub_ has joined #ruby
mikepack_ has joined #ruby
macabre has joined #ruby
maletor has joined #ruby
Utkarsh_ has joined #ruby
Derander has joined #ruby
thebastl has joined #ruby
cirwin has joined #ruby
rtdv has joined #ruby
<VxJasonxV> bueller?
andynu has joined #ruby
krisfremen has joined #ruby
SJr has joined #ruby
bob_f has joined #ruby
deadbea7 has joined #ruby
xxtjaxx has joined #ruby
xxtjaxx has joined #ruby
pietr0_ has joined #ruby
xea has joined #ruby
tomb has joined #ruby
warebec|hat has joined #ruby
d3vic3 has joined #ruby
ezra has joined #ruby
Barzogh has joined #ruby
CharlieSu has joined #ruby
matti has joined #ruby
indeterminate has joined #ruby
libertyprime has joined #ruby
zigidias has joined #ruby
Beoran_ has joined #ruby
yxhuvud has joined #ruby
destructure has joined #ruby
libertyprime has joined #ruby
cirwin_ has joined #ruby
nemesit has joined #ruby
dominikh has joined #ruby
elliot_ has joined #ruby
libertyprime has joined #ruby
FACEFOX has joined #ruby
paissad has joined #ruby
colinwd has joined #ruby
hashpuppy has joined #ruby
libertyprime has joined #ruby
friskd has joined #ruby
tobyo has joined #ruby
ninor has joined #ruby
_axx has joined #ruby
bgupta has joined #ruby
libertyprime has joined #ruby
tobym has joined #ruby
Kovensky has joined #ruby
dhruvasagar has joined #ruby
djdb has joined #ruby
rfloriano has joined #ruby
sonkei has joined #ruby
cespare has joined #ruby
mmercer has joined #ruby
Dr4g has joined #ruby
kaichanvong has joined #ruby
nate_h has joined #ruby
davidboy has joined #ruby
<friskd> Is there a function exists in ruby?
JStoker_ has joined #ruby
zakwilson_ has joined #ruby
<fowl> friskd: There is File.exists?
<nikhil_> friskd, collection.include?
JStoker has joined #ruby
<friskd> unless exists?(name)
Asebolka has joined #ruby
machine1 has joined #ruby
<nikhil_> friskd, i'm quite a noob, but it might be imported from one of the libraries?
<nikhil_> irb confirms that that does not exist (pun intended) normally
conceal_rs has joined #ruby
<ryanf_> that's probably part of capistrano's config variable system
<ryanf_> along with stuff like set
ben_alman has joined #ruby
<VxJasonxV> hey, there's life in the channel again
Helius has joined #ruby
krz has joined #ruby
<fowl> VxJasonxV: you'll get help faster if you paste the piece of code and the error message from ruby
<fowl> but not from me, cuz I'm outtttaaaa hheeeeeeerrrreeeeee
<friskd> haha
<friskd> nice
<friskd> tnx
<VxJasonxV> I did both :/.
dkannan has joined #ruby
alem0lars has joined #ruby
FACEFOX has joined #ruby
<burgestrand> VxJasonxV: no, you pasted part of the code and part of the message
jimmyy111 has joined #ruby
alindeman has joined #ruby
KL-7 has joined #ruby
libertyprime has joined #ruby
jimmyy111 has joined #ruby
sdeobald_ has joined #ruby
ickmund has joined #ruby
probst has joined #ruby
mneorr has joined #ruby
CheeToS has joined #ruby
GoBin has joined #ruby
undersc0re has joined #ruby
shruggar has joined #ruby
VxJasonxV has quit [#ruby]
libertyprime has joined #ruby
A124 has joined #ruby
sdeobald__ has joined #ruby
schovi has joined #ruby
sgronblom has joined #ruby
msch has joined #ruby
<sgronblom> Hey I'm using Rails 2.3 with Ruby 1.9 and am getting this warning about ruby 1.9 not supporting unicode normalization. But the commit for this message is from 2008 so I was wondering whether this warning still holds true.
msch has joined #ruby
libertyprime has joined #ruby
_null has joined #ruby
_null has joined #ruby
_null has joined #ruby
_null has joined #ruby
_null has joined #ruby
mystique has joined #ruby
yann_ck has joined #ruby
norm_ has joined #ruby
_null has joined #ruby
xeno__ has joined #ruby
_null has joined #ruby
el-byped has joined #ruby
FACEFOX has joined #ruby
BRMatt has joined #ruby
moshee has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
nikhil_ has joined #ruby
ZeepZop has joined #ruby
methodfree has joined #ruby
mmercer has joined #ruby
the_file has joined #ruby
the_file has quit [#ruby]
libertyprime has joined #ruby
FACEFOX has joined #ruby
<ryanf> sgronblom: not sure exactly what that means, but 1.9 has very different unicode behavior from 1.8
<ryanf> and actually I wouldn't necessarily recommend running rails 2 on 1.9 if you have a significant number of international users
emmanuelux has joined #ruby
akemrir has joined #ruby
sspiff has joined #ruby
libertyprime has joined #ruby
libertyprime has joined #ruby
<sgronblom> ryanf: well we do have mostly "international" users (international from an american standpoint)
<sgronblom> We're on our way to rails 3 eventually
<sgronblom> But for the moment I was trying to figure out why some rails dev in 2008 claims that 1.9 can't do unicode normalization
sdeobald_ has joined #ruby
senthil has joined #ruby
libertyprime has joined #ruby
<ryanf> no idea tbh
<ryanf> are you only now upgrading to 1.9? because I would really recommend doing rails 3 before 1.9 instead. rails 2 is not good at handling encodings
nachtwandler has joined #ruby
libertyprime has joined #ruby
ickmund has joined #ruby
robbyoconnor has joined #ruby
libertyprime has joined #ruby
fixl has joined #ruby
libertyprime has joined #ruby
Evermind42 has joined #ruby
libertyprime has joined #ruby
machine1 has joined #ruby
FACEFOX has joined #ruby
cha1tanya has joined #ruby
pi3r has joined #ruby
hSATAC has joined #ruby
rushed has joined #ruby
libertyprime has joined #ruby
symb0l has joined #ruby
AxonetBE has joined #ruby
ukwiz has joined #ruby
libertyprime has joined #ruby
etehtsea has joined #ruby
AxonetBE1 has joined #ruby
zommi has joined #ruby
libertyprime has joined #ruby
flippingbits has joined #ruby
blast_hardcheese has joined #ruby
<blast_hardcheese> Is this the place to ask about gem failures?
<blast_hardcheese> gem install amqp fails, but the failure log is completely not helpful
<thomasfedb> blast_hardcheese, please gist the log
machine1 has joined #ruby
<blast_hardcheese> I guess it's eventmachine that's failing?
libertyp1ime has joined #ruby
Talvino has joined #ruby
mephux has joined #ruby
blacktulip has joined #ruby
Karmaon has joined #ruby
LMolr has joined #ruby
alaa_ has joined #ruby
Helius has joined #ruby
libertyprime has joined #ruby
mafolz has joined #ruby
visof has joined #ruby
<blast_hardcheese> ah well. I'll ask again when there are more people around.
shruggar has joined #ruby
xkoda has joined #ruby
xkoda has quit [#ruby]
Quirrell has joined #ruby
Quirrell has joined #ruby
trivol has joined #ruby
ph^ has joined #ruby
stefanp has joined #ruby
stefanp has joined #ruby
LMolr_ has joined #ruby
machine1 has joined #ruby
LMolr has joined #ruby
gokul has joined #ruby
apeiros_ has joined #ruby
sleetdrop has joined #ruby
adambeynon has joined #ruby
ephemerian has joined #ruby
stepnem has joined #ruby
undersc0re has joined #ruby
stringoO has joined #ruby
mklappstuhl has joined #ruby
tatsuya_o has joined #ruby
tatsuya_o has joined #ruby
mklappstuhl has joined #ruby
FACEFOX has joined #ruby
simao has joined #ruby
wyhaines has joined #ruby
tayy has joined #ruby
workmad3 has joined #ruby
<A124> Anyone gets any idea why Zlib passes test on 1.8.7 but not on 1.9.3?
roolo has joined #ruby
hackeron has joined #ruby
nemesit has joined #ruby
phantomfakeBNC has joined #ruby
fortysixandtwo has joined #ruby
mneorr has joined #ruby
Azure_ has joined #ruby
pencilcheck has joined #ruby
r0bby has joined #ruby
hse-hoens has joined #ruby
schovi has joined #ruby
flyingoctopus has joined #ruby
Kiall_ has joined #ruby
<A124> Ok. It's encoding. But.. I can't find how to disable transcoding. Any tips?
byped has joined #ruby
daed has joined #ruby
dagobah has joined #ruby
rcs has joined #ruby
jlebrech has joined #ruby
shruggar has joined #ruby
anekos_ has joined #ruby
DuoSRX has joined #ruby
flippingbits has joined #ruby
KL-7 has joined #ruby
JStoker has joined #ruby
warebec|hat has joined #ruby
macabre has joined #ruby
svnlto has joined #ruby
jbw_ has joined #ruby
tommyvyo has joined #ruby
fowl_sleep has joined #ruby
dnyy has joined #ruby
JNZ has joined #ruby
timonv_ has joined #ruby
jankly has joined #ruby
Y_Ichiro has joined #ruby
Sigma00 has joined #ruby
john has joined #ruby
seitensei has joined #ruby
crazed has joined #ruby
pschneider_ has joined #ruby
welterde has joined #ruby
ekaleidox has joined #ruby
yellow5 has joined #ruby
nw has joined #ruby
preller has joined #ruby
patricksroberts has joined #ruby
chellomere has joined #ruby
sernin has joined #ruby
elektronaut has joined #ruby
FACEFOX has joined #ruby
Transcended has joined #ruby
mitchty has joined #ruby
tommyvyo has joined #ruby
francisfish has joined #ruby
tvw has joined #ruby
mmercer has joined #ruby
ChampS666 has joined #ruby
eldariof has joined #ruby
dennda has joined #ruby
Ferdev has joined #ruby
FACEFOX has joined #ruby
FACEFOX has joined #ruby
undersc0re has joined #ruby
undersc0re has joined #ruby
manizzle has joined #ruby
<A124> Anyway.. I found an interesting fact. 1.8.7 Ruby is faster by 1/3 than 1.9.3 in repetitive class calls and rescue handling. Very interesting
<banistergalaxy> A124: what is a 'repetitive class call'
<A124> banistergalaxy: initializing, calling one method, one rescue
<A124> * and one more method in rescue
<A124> (which is the same as before rescue)
<Tasser> A124, corner case
<visof> hello
<visof> is there anyone use fog gem for amazon ?
Prezioso has joined #ruby
<A124> Tasser: Not a corner care. I was just testing part of the code.
lupine_85 has joined #ruby
adman65 has joined #ruby
<A124> Tasser: This roundtrip is a part of almost every class. .. so what's corner case on that?
<Tasser> A124, hmm, right
<banistergalaxy> A124: can u show me your code pups
cha1tanya has joined #ruby
tk__ has joined #ruby
cha1tanya has joined #ruby
Morkel has joined #ruby
clockwize has joined #ruby
<A124> banistergalaxy: Done.
maletor has joined #ruby
<banistergalaxy> A124: how do u know it's not a quirk of the particular method your'e invoking?
<banistergalaxy> i.inflate()
<banistergalaxy> you need to write a more generic benchmark
<banistergalaxy> that doesnt rely on weird methods
<A124> banistergalaxy: I don't think so.. I done a lot.
<A124> But I think it lies in transcoding maybe.
<A124> And I haven't found how to disable transcoding of external streams.
Geniack has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
<Geniack> hello
<A124> banistergalaxy: Do you have any idea on how to do that?
<Geniack> anyone familiar with running watir on different hosts (e.g. linux / windows / osx) ?
<banistergalaxy> A124: just replace it with a method that counts to 10 or something
<A124> banistergalaxy: Ah. Thanks. But I mean the transcoding issue.
<banistergalaxy> no idea
stefanp has joined #ruby
stefanp has joined #ruby
<A124> banistergalaxy: ok. I rewrote it..
<A124> banistergalaxy: Ruby 1.8.7 0.771091
<A124> banistergalaxy: Ruby 1.9.3 1.722689867
<banistergalaxy> cool
iocor has joined #ruby
<workmad3> A124: code? I want to try :)
<A124> workmad3: Give me a minute ;) .. I will make it more "sensible"
<workmad3> :)
<A124> To be honest.. I got mistake.. I fixed that.. but it made the difference 1:3
clockwize has joined #ruby
dhruvasagar has joined #ruby
<banistergalaxy> workmad3: you're convinced it's all lies to impress and make friends
<banistergalaxy> i think so too but im too lazy to verify
knopkodav has joined #ruby
<A124> workmad3: banistergalaxy: http://fpaste.org/OUmd/
<workmad3> aww, why not a github gist so we could just clone it? :(
<A124> ok
banistergalaxy has joined #ruby
<A124> workmad3: banistergalaxy: https://gist.github.com/a244c132c536d2f2984b
<workmad3> A124: on my machine, 1.9.3-p0 is 0.2s faster than 1.8.7
<workmad3> roughly the same with p125
<A124> QUOTE: banistergalaxy: workmad3: you're convinced it's all lies to impress and make friends /QUOTE .. This was regarding me?
<workmad3> A124: I just wanted to see if the results were reproducible personally :)
<A124> workmad3: So .. it's interesting. I have rvm compiled binaries.. so it's really strange
<workmad3> yeah, I have the same, MBP (late 2008) with 4gb ram, rvm binaries and an SSD
<A124> workmad3: No, no ofence, of course. And you did not also wrote that.
<A124> With this "workload + calls" code I got 0.6 and 1.4 respectively
<blast_hardcheese> Wow. Apparently gem is completely useless without rake; Everything I wanted to install depended on eventmachine, and eventmachine has an undocumented (or at least unenforced) dependency on rake.
<banistergalaxy> blast_hardcheese: Yeah, 'rake' is pretty much a given for ruby and it should come bundled with 1.9+
ephemerian has joined #ruby
<A124> workmad3: Do you have any clue why it's slower a lot more for me thatn for you? Also, do you have any tip how to disable external transcoding?
<workmad3> A124: no idea... but I'm also thinking 'at least you're not on jruby, where that same thing took over 6s :) '
<A124> workmad3: :D LoL... Thanks for informing me.
<Tasser> banistergalaxy, ... and ugly ^^
<workmad3> A124: also, I'd suggest you run your test using 'time ruby test.rb' to get some breakdown of timings :)
Guedes has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
mcwise has joined #ruby
lorenzo_ has joined #ruby
lorenzo has joined #ruby
visof_ has joined #ruby
<A124> workmad3: Fck.. my fail. But at least I know now. There is no difference for me on that code. But with simplified workload code I get 0.2 seconds, as you get. The thing was in IRB not in Ruby. Which is kind of my fault. :-/
<workmad3> :)
<workmad3> still an interesting result... why is IRB slower in 1.9.3? what extra is it doing?
<A124> workmad3: Same for me. Anyway. The 'simplified workload' is just this: https://gist.github.com/2028099
visof__ has joined #ruby
eldariof has joined #ruby
philcrissman has joined #ruby
n1x has joined #ruby
<robert_> shevy :D
bluenemo has joined #ruby
fixl|2 has joined #ruby
berserkr has joined #ruby
iamjarvo1 has joined #ruby
<banistergalaxy> robert_: i think he's asleep
vitoravelino`afk has joined #ruby
vitoravelino has joined #ruby
clockwize has joined #ruby
seoaqua has joined #ruby
rboyd has joined #ruby
doublethink has joined #ruby
elliot98 has joined #ruby
<elliot98> is there are way to expand a variable to call a function?
<elliot98> a = 5
<elliot98> b = 'puts a'
hukl has joined #ruby
<elliot98> then executing b would print 5
Rishi_ has joined #ruby
KarlFreeman has joined #ruby
<apeiros_> not like that, no. you can use a couple of mechanisms for something similar:
<apeiros_> b = proc { puts a }; b.call
tayy has joined #ruby
tingo has joined #ruby
<apeiros_> depending on what you really want to do: b = :puts; send(b, a)
<apeiros_> again depending on what you really want to do - being able to pass a block to a method solves most of such issues, see how all the Enumerable methods just accept a block to determine the details of how they work
eka has joined #ruby
davidpk has joined #ruby
visof has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
pu22l3r has joined #ruby
mklappstuhl has joined #ruby
<robert_> banistergalaxy: I figured. But I hilight him regardless, lol.
<elliot98> apeiros_: basically, to be able to change the function being done on a variable by using a variable to call the function
<robert_> anyway, sup banistergalaxy?
<banistergalaxy> robert_: you didnt need the 'lol' there, can u take it back?
pu22l3r has joined #ruby
seanstickle has joined #ruby
<apeiros_> elliot98: usually Object#send is the way to go with that
jds has joined #ruby
KarlFree_ has joined #ruby
dbgster has joined #ruby
burgestrand has joined #ruby
* robert_ surgically removes the 'lol' from banistergalaxy's brain.
<banistergalaxy> thx
<robert_> :D no problem.
<elliot98> apeiros_: thanks!
emmanuelux has joined #ruby
undersc0re has joined #ruby
d3vic3 has joined #ruby
KJF has joined #ruby
<shevy> hai robert_
<robert_> hai :D
<robert_> how's it going?
acekiller has joined #ruby
<shevy> just got home, head is kinda empty. need to eat soon
<robert_> aha. fun.
<robert_> shevy: I had a bot attempt calling me on skype
<shevy> hehe
<robert_> so I forwarded it to echo123 :p
dexter_ has joined #ruby
<robert_> such a useful service. :D
undersc0re has joined #ruby
<nikhil_> if it was a clever bot it would be wonderful to listen in on the conversation :D
<robert_> indeed. :D
JNZ has joined #ruby
fearoffish has joined #ruby
Transcended has joined #ruby
yeggeps has joined #ruby
<robert_> shevy: oh btw, I like prawn. :D
virunga has joined #ruby
<banistergalaxy> apeiros_: does this rock-out your D. ? http://blog.railsware.com/2012/03/13/ruby-2-0-enumerablelazy/
yalue has joined #ruby
waxjar has joined #ruby
<burgestrand> banistergalaxy: awesome!
tatsuya_o has joined #ruby
<banistergalaxy> burgestrand: now all they need is Enumerator#+ ;)
mneorr has joined #ruby
ethd has joined #ruby
ethd has joined #ruby
<burgestrand> Hm, rb_yield_values is new to me, haven’t seen that one.
ephemerian has joined #ruby
<banistergalaxy> burgestrand: what does it do
<burgestrand> banistergalaxy: yields to the block given to the current method with a set of parameters to pass to it
<banistergalaxy> burgestrand: different to rb_yield() ? i guess it doesnt wrap the parameters in an array
<burgestrand> banistergalaxy: rb_yield only takes a VALUE, rb_yield_values takes an int n, and then n VALUEs instead
<burgestrand> essentially a variadic rb_yield :)
<banistergalaxy> burgestrand: but i mean, if you have a block: { |x, y| } then rb_yield([1,2]) would be more or less equivalent to rb_yield_values(1, 2)
emmanuelux has joined #ruby
<burgestrand> banistergalaxy: yep
<burgestrand> gtg
nanderoo has joined #ruby
IrishGringo has joined #ruby
`brendan has joined #ruby
[[thufir]] has joined #ruby
<[[thufir]]> I'm having trouble with RVM. It installed, and I even compiled ruby. However, I don't seem to "have" ruby. how do I know that it's actually compiled correctly?
rohit has joined #ruby
<workmad3> [[thufir]]: did you activate the ruby?
<[[thufir]]> ah, activate! maybe not.
<workmad3> [[thufir]]: rvm use <ruby-version>
<[[thufir]]> aha. lemme try. thanks.
<workmad3> [[thufir]]: and if you want it to be automatically activated, then rvm use <ruby-version> --default
<[[thufir]]> wait, like: rvm use 1.9.2
<workmad3> yeah
<[[thufir]]> ok. brb. thanks.
<workmad3> btw, I'd recommend 1.9.3 nowadays ;)
<shevy> LONG LIVE RUBY 1.8!!!
<shevy> WHO IS WITH ME
<workmad3> shevy: http://tinyurl.com/2g9mqh <-- this guy is
<shevy> I like him
<shevy> we need to have more who like 1.8
<workmad3> I thought you would :)
<schovi> Hello, question for Mechanize Gem masters :) Is there any way, how to change http lib? There is something in default, but i have to use it in sinatra-synchrony and it is not compatible..
emmanuelux has joined #ruby
<shevy> workmad3: he is different, that is good
<shevy> so many else are all equal
<shevy> RED HAIR FOR THE WIN!
<shevy> hmm
<shevy> but I like the simply red singer more
<[[thufir]]> in trying to activate ruby from rvm (ubuntu 11.10) I get back: RVM is not a function, selecting rubies with 'rvm use ...' will not work.
<workmad3> [[thufir]]: ah, you haven't loaded rvm correctly either then
<elliot98> need to create a new object list of classes
<elliot98> how does one go about choosing the correct class for the object?
<workmad3> elliot98: voodoo
<elliot98> require 'voodoo' ?
<elliot98> basically set a variable up and use that as the class name so something like #{class_name}.new
Foxandxss has joined #ruby
<[[thufir]]> hmm. ok, rvm isn't loaded correctly. thinking about that. I'll go back to the web page. It never gave any errors or anything.
<rippa> Object.const_get
Transcended has joined #ruby
Transcended_ has joined #ruby
eka has joined #ruby
schovi has joined #ruby
KarlFreeman has joined #ruby
tatsuya_o has joined #ruby
mengu has joined #ruby
moshee has joined #ruby
KarlFreeman has quit [#ruby]
emmanuelux has joined #ruby
ChampS666 has joined #ruby
seanstickle has joined #ruby
LMolr has joined #ruby
alem0lars has joined #ruby
<A124> Umm.. I can't realize simple thing. What is wrong with that please? h = Hash.new { Array.new(2) }; h[:key][1] = value
<apeiros_> A124: straight from the docs: "It is the block's responsibility to store the value in the hash if required"
<Tasser> apeiros_, :D
<apeiros_> reading docs ftw.
<Tasser> ^ RTFM
<apeiros_> especially when stuff doesn't work the way you expect it.
elliot98 has joined #ruby
dql has joined #ruby
ceej has joined #ruby
M- has joined #ruby
<A124> apeiros_: Thank you kindly. I didn't realized that, sorry. I'm today totally sick, so my mind is almost off.
davidd___ has joined #ruby
<apeiros_> A124: get well soon then
<A124> Tasser: Yes, I did read the fucking manual, but my brain is out of fucnctin, still should do the thing.
<A124> apeiros_: Thank you :)
Iszak has joined #ruby
<shevy> LOL
<shevy> require 'voodoo'
<shevy> ^^^ best require ever
<shevy> require 'magic'
<shevy> require 'voodoo & magic'
<shevy> I want to use & in requires
<Tasser> require 'god_mode'
<workmad3> :)
<apeiros_> require 'cargo/cult' # LoadError, "Cargo cult is already pervasive in your project."
ChampS666 has joined #ruby
liluo has joined #ruby
<workmad3> apeiros_: you didn't try that in a rails project did yoU? :P
<workmad3> *you
gianlucadv has joined #ruby
bwlang_ has joined #ruby
philcrissman has joined #ruby
<shevy> hehe
banistergalaxy has joined #ruby
<Iszak> Is there a coding standard for ruby?
deryldoucette has joined #ruby
<workmad3> Iszak: yeah - 'good'
Foxandxss has joined #ruby
<Iszak> style guide then?
<Tasser> Iszak, 2 spaces indent, OO when possible, don't monkey-patch core objects in libraries
<Tasser> the last two kinda conflict, but have fun ;-)
fbernier has joined #ruby
confounds has joined #ruby
n1x has joined #ruby
clockwize has joined #ruby
canton7 has joined #ruby
kf8a has joined #ruby
ChampS666 has joined #ruby
jhchabran has joined #ruby
Mchl has joined #ruby
geekbri has joined #ruby
twqla has joined #ruby
<Jck_true> Would anybody see a need for USB/HID lib using native win32 api's?
<Jck_true> (needs ffi through - I dont trust the Win32API enough"
coreydaley has joined #ruby
<Jck_true> I'm basicly working on recreating the pywinusb lib in ruby
doublethink has joined #ruby
albemuth has joined #ruby
nacengineer has joined #ruby
arpegius has joined #ruby
ChampS666 has joined #ruby
Synthead has joined #ruby
nemesit has joined #ruby
bwlang has joined #ruby
asobrasil has joined #ruby
oponder has joined #ruby
A_D has joined #ruby
drbawb has joined #ruby
bglusman has joined #ruby
snip_it has joined #ruby
francisfish has joined #ruby
schovi has joined #ruby
IrishGringo has joined #ruby
linoj_ has joined #ruby
ChampS666 has joined #ruby
carlyle has joined #ruby
<Tasser> can I access the literal string parser from ruby to process escaped stuff?
doublethink has joined #ruby
<A_D> Hi there
<A_D> any help from STR2CSTR?
eka has joined #ruby
<A_D> I'm looking for a way to easily convert ruby str do c_str
Sailias has joined #ruby
sbabiy has joined #ruby
sbabiy has joined #ruby
phantasm66 has joined #ruby
ccapndave has joined #ruby
wallerdev has joined #ruby
bbttxu has joined #ruby
neurodrone has joined #ruby
sbabiy_ has joined #ruby
banistergalaxy has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
crankycoder has joined #ruby
tomzx has joined #ruby
vraa has joined #ruby
Indian has joined #ruby
krz has joined #ruby
MrGando has joined #ruby
<A_D> I've got this message trying to convert a ruby str to char*: Symbol not found: _STR2CSTR
igaiga has joined #ruby
Vert has joined #ruby
designated has joined #ruby
<roolo> Is tehre done way to merge values from the two ini files at http://git.io/MLnoSA ? I would prefer inifile or iniparse gem, but if there is something better...
iocor has joined #ruby
chsonnu has joined #ruby
elliot98 has joined #ruby
aroop has joined #ruby
axl_ has joined #ruby
<dbgster> I have a method like: self.connection; @connection …..; end
<dbgster> now from another self.some_method method, how do I call the method 'self.connection' ?
<dbgster> is it: self.class.connection ?
workmad3 has joined #ruby
knopkodav has joined #ruby
pdtpatr1ck has joined #ruby
Hensley has joined #ruby
PaciFisT has joined #ruby
<A124> Is there any difference (except the whence) in pos= and seek?
lorandi has joined #ruby
mikepack has joined #ruby
bwlang_ has joined #ruby
sbanwart has joined #ruby
yoklov has joined #ruby
<Tasser> A124, seek may be relative?
<A124> Tasser: Except that.
snip_it has joined #ruby
trivol_ has joined #ruby
<A124> Tasser: That's whence. I can imagine if the unit is maybe something else than byte.. but I don't see it where.
_md has joined #ruby
InBar has joined #ruby
iocor has joined #ruby
<Tasser> I wouldn't assume
joast has joined #ruby
<Iszak> Tasser: but what about optional brackets, semi-colans?
<Iszak> I'm looking for a guard gem that'll check up every save.
wmoxam has joined #ruby
InBar has joined #ruby
fr0gprince_mac has joined #ruby
Barakas has joined #ruby
Nowaker has joined #ruby
sbanwart has joined #ruby
bwlang_ has joined #ruby
mkscrg has joined #ruby
iamjarvo has joined #ruby
lorandi has joined #ruby
kpshek has joined #ruby
zealinux` has joined #ruby
sonkei has joined #ruby
iocor has joined #ruby
choffstein has joined #ruby
dql has joined #ruby
ezkl has joined #ruby
fmcgeough has joined #ruby
carlyle has joined #ruby
nari has joined #ruby
tayy has joined #ruby
dv310p3r has joined #ruby
cirwin has joined #ruby
clockwize has joined #ruby
carlyle has joined #ruby
S2kx has joined #ruby
carlyle has joined #ruby
caiges has joined #ruby
iocor has joined #ruby
Vert has joined #ruby
Foxandxss has joined #ruby
Drewch has joined #ruby
artOfWar has joined #ruby
kevinbond has joined #ruby
tayy has joined #ruby
Richmond has joined #ruby
tayy_ has joined #ruby
rippa has joined #ruby
eka has joined #ruby
DrShoggoth has joined #ruby
i8igmac has joined #ruby
ank has joined #ruby
KL-7 has joined #ruby
artOfWar has joined #ruby
alex__c2022 has joined #ruby
v3n0m has joined #ruby
mayfield_ has joined #ruby
zea`` has joined #ruby
vraa_ has joined #ruby
stef_204 has joined #ruby
davidpk has joined #ruby
CheeToS has joined #ruby
pdtpatr1ck has joined #ruby
cooooooter1 has joined #ruby
cirwin has joined #ruby
<cooooooter1> give a string "2012-03-02T02:50:50.000Z" how can I convert that to a Date I can compare against?
waxjar has joined #ruby
nachtwandler has joined #ruby
<Tasser> cooooooter1, Time.parse
albemuth has joined #ruby
undersc0re has joined #ruby
<cooooooter1> thanks Tasser
ckrailo has joined #ruby
v3n0m has joined #ruby
clockwize has joined #ruby
<alem0lars> can I load a Rakefile from a rake task? I would like to have a "main" Rakefile acting as a proxy for a "slave" one
daniel_hinojosa has joined #ruby
technel has joined #ruby
<Tasser> alem0lars, it's all ruby
<ekaleido> 1.9.3p125 :001 > Time.parse
<ekaleido> NoMethodError: undefined method `parse' for Time:Class
<apeiros_> ekaleido: require 'time'
<ekaleido> ahh
<ekaleido> i thought it was already there since Time.now works
<apeiros_> Time is core, but Time::parse is stdlib
<ekaleido> oh, cool
albemuth has joined #ruby
ezkl has joined #ruby
jankly_ has joined #ruby
zea`` has quit ["ERC Version 5.3 (IRC client for Emacs)"]
bwlang_ has joined #ruby
ascarter has joined #ruby
superguenter has joined #ruby
ath0 has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
troessner has joined #ruby
bondar has joined #ruby
vipaca has joined #ruby
vipaca has joined #ruby
dhruvasagar has joined #ruby
blueadept has joined #ruby
polarist has joined #ruby
<ekaleido> is searching a has for a key to get its value generally more efficient than if/else'ing a similar operation?
<ekaleido> hash
<apeiros_> if/elsing?!?
<apeiros_> hash[key] # => value
<apeiros_> that's how you get the value to a key in a hash… I really wonder how you do it with if/else…
<ekaleido> i asked wrong
<ekaleido> if i have a hash with say 700 k/v pairs
<ekaleido> and im parsing a URI
<ekaleido> i need the URI /hello to return "pool wdc-hello"
<ekaleido> and 699 other vartiations
<rippa> yes it is
Targen has joined #ruby
<ekaleido> i figured it was, on a large scale
<ekaleido> but is there a tipping point?
confounds has joined #ruby
<apeiros_> a tipping point to what?
<apeiros_> also, I still don't see how hash[] isn't the solution, and how you use if/else
<rippa> apeiros_: where indexing a hash becomes cheaper than iterating an array
<apeiros_> but how about you pasting some code?
<apeiros_> oooooh, now I get his question
<ekaleido> yeah sorry
<ekaleido> <-- rookie
<apeiros_> ekaleido: in ruby, a hash is faster than any other means of lookup for any N > 5 for almost everything
<apeiros_> unless you have bad hash-keys
joe-mac has joined #ruby
<workmad3> how good is the default hash-key implementation? I've never bothered looking at it :)
headius has joined #ruby
<joe-mac> so, this is fun I have a Gemfile with therubyracer and libv8 in it, and tehrubyracer keeps failing cause it cant' find libv8, even though I am setting it to :require => libv8
<joe-mac> and if I install libv8 by hand it works fine
<joe-mac> I've seen some similar bug reports but nothing conclusive, anybody got any ideas?
<workmad3> joe-mac: that's not what :require => 'libv8' does
doublethink has joined #ruby
<apeiros_> workmad3: quite good by now
<workmad3> joe-mac: if you have a line 'gem "therubyracer", :require => "libv8" ' in your Gemfile, that attempts to load a file 'libv8' as the library file to pull in therubyracer... it *doesn't* declare a dependency on libv8 within therubyracer
andrenkov has joined #ruby
bwlang has joined #ruby
<andrenkov> is there a way I can set an Environment variable in linux from a ruby script ?
ph^ has joined #ruby
<apeiros_> andrenkov: only for sub-processes
ceej has joined #ruby
<apeiros_> the other way round would be a security issue.
<andrenkov> apeiros_, so if I exit the script the variable would disappear ?
matti has joined #ruby
iocor has joined #ruby
scalebyte has joined #ruby
<scalebyte> I am trying to migrate data from a csv using ruby code rake task and I am getting error Missing or stray quote in line 1
<scalebyte> i guess its possibly an error with csv file... i saved file as csv from xls
<scalebyte> apeiros_: shevy : ^^
IrishGringo has joined #ruby
simao has joined #ruby
luxurymode has joined #ruby
nik_-_ has joined #ruby
<apeiros_> scalebyte: make sure you properly instruct your csv parser. c (comma) in csv usually means s (semicolon) to excel
mneorr has joined #ruby
apok has joined #ruby
<scalebyte> apeiros_: I dont know where I am going wrong I use ~ and "
kf8a has joined #ruby
<scalebyte> apeiros_: I can share the xls with you could you convert that for me pls ?
alx- has joined #ruby
<apeiros_> scalebyte: no
<scalebyte> apeiros_: a friend in deed is a friend in need
<apeiros_> I seem to have missed that particular moment when we became friends
jgrevich has joined #ruby
wyhaines has joined #ruby
<joe-mac> workmad3: AHHH, then how do I specify to install libv8 before the rubyracer is built?
jnet7 has joined #ruby
<workmad3> joe-mac: afaik, therubyracer has a dependency on libv8 in its gemspec, so you don't need to do anything (rubygems handles it for you)
shtirlic has joined #ruby
eywu has joined #ruby
geekbri has joined #ruby
<joe-mac> weird
<joe-mac> after lunch I will dive intio it more, thanks
colinwd has joined #ruby
lkba has joined #ruby
<matti> Hi joe-mac
badabim has joined #ruby
wyhaines has joined #ruby
SegFaultAX|work has joined #ruby
Zugschlus has joined #ruby
<Zugschlus> hi all
<Zugschlus> I have a problem with net/ssh and popen3. http://paste.debian.net/159571/, code stalls after printing "session opened". Why?
bwlang has joined #ruby
adeponte has joined #ruby
<Zugschlus> (the ultimate goal is to start a remote binary and pipe data into it, the code is rather simplified to nail down my issue)
adman65_ has joined #ruby
bondar has joined #ruby
Richmond_ has joined #ruby
sbabiy has joined #ruby
arpegius has joined #ruby
<arpegius> ruby.IO issue here w/ actual & expected results: http://pastie.org/3586616
techhelp has joined #ruby
<arpegius> images is a hash of 15 items
cloke has joined #ruby
<arpegius> just updated… you can see I'm getting images through a json feed
badabim has joined #ruby
<apeiros_> arpegius: you're aware, that the `images` method will return JSON.parse(json)['shots']
<apeiros_> ?
<arpegius> right… that's the idea…
<arpegius> oh
<arpegius> i get what you're saying
<arpegius> apeiros_: what should it return
<apeiros_> it's your code, I don't know what you want it to return
<apeiros_> it just seemed off to differ from @images
epit has joined #ruby
<apeiros_> also, I don't see what you call/do in order to get that output
<apeiros_> render_thumbnail will return " test\n", there isn't much more I can say
<arpegius> apeiros_: i should probably be returning @images
<apeiros_> I would assume so, yes
arvidkahl has joined #ruby
<apeiros_> arpegius: http://pastie.org/3586654 does that more concisely
<arpegius> apeiros_: this is a jekyll plugin btw.
mensvaga has quit [#ruby]
<apeiros_> reload, http://pastie.org/3586654 - I made it a bit smaller
luckyruby has joined #ruby
startling has joined #ruby
<arpegius> apeiros_: so there's nothing about that that makes it obvious why it prints the results as an array?
Teddy2steper has joined #ruby
crankycoder has joined #ruby
<apeiros_> arpegius: well, ary.map returns an array
<apeiros_> Array#to_s will print it that way
<apeiros_> [1,2,3].to_s # => "[1, 2, 3]"
<apeiros_> so probably line 4 is not how you want it
<arpegius> right
<apeiros_> (Array#collect == Array#map)
apok has joined #ruby
startling has quit [#ruby]
Eiam has joined #ruby
ryannielson has joined #ruby
cha1tanya has joined #ruby
bwlang_ has joined #ruby
maletor has joined #ruby
lorandi has joined #ruby
apok has joined #ruby
adambeynon has joined #ruby
shadoi has joined #ruby
yoklov has joined #ruby
<scalebyte> can I use nil instead of false to assgin false to a boolean ?
<shadoi> scalebyte: you can assign nil but it won't be false, though it will have the same effect most places.
Vert has joined #ruby
Eiam has joined #ruby
lorandi has joined #ruby
<scalebyte> shadoi: but it works for me when i give nil and when I give false it comes as tru
<scalebyte> shadoi: true*
<shadoi> Sounds like you're not doing what you think you're doing. Paste some code.
burns180 has joined #ruby
<scalebyte> shadoi: it works only when i give nil and when i give false all becomes true http://pastie.org/3586855
<arpegius> apeiros_: finally working: http://pastie.org/3586853
io_syl has joined #ruby
<apeiros_> arpegius: you really shouldn't use String.new, Array.new or Hash.new. use the literals: "", [], {}
<LMolr> I'm writing an irc bot plugin (using cinch) to print some text every 10 seconds. So I listen the event :channel and I need to write in every loop iteration a message in the channel. How can I write a message in the channel?
iamjarvo has joined #ruby
<apeiros_> arpegius: also, just use Array#join
flak has joined #ruby
Tearan has joined #ruby
bondar has joined #ruby
<shadoi> scalebyte: Is this ActiveRecord or something? It sounds like the behavior of the library, not simple variable assignment.
<LMolr> I mean I need a cinch function to write a message into the configured channel. How can I do that?
<scalebyte> shadoi: any idea ?
<scalebyte> shadoi: that means ?
iocor has joined #ruby
adamkittelson has joined #ruby
spinagon has joined #ruby
<shadoi> scalebyte: I have no idea how the UserPreference class behaves from the code you pasted.
catphish has joined #ruby
<arpegius> apeiros_ that worked too… haven't completely groked arrays/hashes/maps
<catphish> new ruby game challenge: http://www.therubygame.com/
plato has joined #ruby
<plato> hello guys
<catphish> hello
undersc0re has joined #ruby
nik_-_ has joined #ruby
<plato> i want to play around with a game controller, to try and design an interface. It's a standard HID joypad. Is Ruby appropriate for this
phantomfakeBNC has joined #ruby
Helius has joined #ruby
<shadoi> LMolr: you get the channel object (from an event or instantiate it yourself) and use Channel.send("msg")
<scalebyte> shadoi: ok il try looking into it thanks
<LMolr> shadoi: can I get the channel object from the :connect event?
stkowski has joined #ruby
<shadoi> scalebyte: it's likely just checking for the presence of each hash value instead of seeing if it's actually a false.
jgarvey has joined #ruby
Nisstyre has joined #ruby
<catphish> plato: i'm sure ruby can do it, the interface may be OS specific though, i'm not sure
<shadoi> LMolr: easiest if the bot is already in the channel, then it will be in the Bot#channels array
ringotwo has joined #ruby
hydrozen has joined #ruby
<catphish> plato: http://webcache.googleusercontent.com/search?q=cache:1ICLKaXw6EoJ:hewner.com/2006/10/04/working-ruby-hid-listener-example/+&cd=1&hl=en&ct=clnk&gl=uk&client=ubuntu
<catphish> look up gem libusb
<plato> thanks
<shadoi> LMolr: Channel("#channel").send("msg") is a shortcut
<LMolr> shadoi: thanks very much :D
<LMolr> shadoi: in Plugin#execute I would do: bot.channels.each do { |channel| channel.send('message') }
<LMolr> shadoi: am i right?
<shadoi> looks right
<LMolr> shadoi: thanks very much :D
samsonjs has joined #ruby
twqla has joined #ruby
ed_hz_ has joined #ruby
nikhgupta has joined #ruby
luxurymode has joined #ruby
alx- has joined #ruby
<joe-mac> hi matti, didn't know you hung out here
eldariof has joined #ruby
carlyle has joined #ruby
nfluxx has joined #ruby
kenichi has joined #ruby
nikhgupta has quit [#ruby]
bwlang_ has joined #ruby
cooooooter1 has quit [#ruby]
artOfWar has joined #ruby
kf8a has joined #ruby
c0rn has joined #ruby
tayy has joined #ruby
<joe-mac> anybody know if it's possible to somehow set what architecture to use on a gem defined in a bundler Gemfile?
danishkhan has joined #ruby
<kenichi> joe-mac: could you just ENV['ARCH_FLAGS'] = "whatever" in the Gemfile ?
* kenichi doesn't actually know if that would work anyways
<joe-mac> no idea, I tried embedding it in the version
<joe-mac> no dice
<joe-mac> I have a feeling the libv8 stuff I am wrestling with may have something to do with incorrect arch or something idk
ben225 has joined #ruby
flippingbits has joined #ruby
Pheen has joined #ruby
<Synthead> is there a ruby function similar htmlentities() in php?
hukl_ has joined #ruby
LBRapid has joined #ruby
<ed_hz_> Synthead CGI.escape, something like that
SullX has joined #ruby
<ed_hz_> CGI::escape
mengu has joined #ruby
mrsolo has joined #ruby
<Synthead> ed_hz_: thanks!
adeponte has joined #ruby
neurodrone has joined #ruby
Lord-Harlot has joined #ruby
mcwise has joined #ruby
bwlang_ has joined #ruby
greenarrow has joined #ruby
berserkr has joined #ruby
Helius has joined #ruby
mcwise has joined #ruby
panzi has joined #ruby
<panzi> how can I display the version of a loaded gem?
sacarlson has joined #ruby
burgestrand has joined #ruby
<polarist> doesn't gem list show version numbers?
<burgestrand> Sure does
pastjean has joined #ruby
r0bby has joined #ruby
ixiaqla has joined #ruby
<ixiaqla> Hello. I am trying to catch any exceptions that may arise from open4::bg. My problem is that these can seemingly be raised at any point in the script (since open4::bg spawns a process in the background and then continues execution of the script), so I don't know where to put the rescue clause. Can anyone help me?
bwlang_ has joined #ruby
aknagi has joined #ruby
danishkhan has joined #ruby
bosborne has joined #ruby
ringotwo has joined #ruby
bondar has joined #ruby
tewecske has joined #ruby
n1x has joined #ruby
badabim_ has joined #ruby
danishkhan has joined #ruby
rorymckinley has joined #ruby
badabim_ has joined #ruby
epit has quit ["WeeChat 0.3.7"]
Nss has joined #ruby
hydrozen has joined #ruby
mikespokefire has joined #ruby
libertyp1ime has joined #ruby
davidpk has joined #ruby
yann_ck has joined #ruby
ringotwo has joined #ruby
ringotwo has joined #ruby
libertyprime has joined #ruby
<ixiaqla> anyone know how to catch "asynchronous exceptions", besides just wrapping the whole script in a begin-rescue, i.e., exceptions that may be raised from a background thread and propagated to the parent at any time in the parents' execution?
ringotwo_ has joined #ruby
waxjar has joined #ruby
pvh has joined #ruby
Amnesia has joined #ruby
<Amnesia> hi question
<Amnesia> I'd like to build something real simple to upload a file over http, it may just be a simple form and that;s it
<Amnesia> where would you guys recommend me to start to do the http post
Zugschlus has quit [#ruby]
shruggar has joined #ruby
<Eiam> there is Net:HTTP
<Eiam> in rails
<Eiam> HTTParty is what I use for my http stuff
kenichi has joined #ruby
sacarlson has joined #ruby
rwq has joined #ruby
<Amnesia> but the flowchart would be
<Amnesia> do post -> copy the data to a file
<Amnesia> right?
bwlang_ has joined #ruby
<Amnesia> perhaps o
<Amnesia> I'm thinking too hard, since I only need one form, and an upload button:)
shruggar has joined #ruby
<Eiam> I'm not even sure what in the world you are talking about now. copy what data to a file and where?
<Amnesia> data that was received through the http socket
mikewintermute has joined #ruby
<Amnesia> http://www.websupergoo.com/file-upload-1.htm hm reading that now:)
virunga has joined #ruby
Lord-Harlot has joined #ruby
badabim has joined #ruby
nemesit has joined #ruby
shruggar has joined #ruby
<Amnesia> hm asp --
<apeiros_> asp is short for awesome super page, right?
blooberr has joined #ruby
yann_ck has quit [#ruby]
<Amnesia> lulz
dankest has joined #ruby
<dankest> How can I access the oauth_token in this hash? {:oauth_token_secret=>"e2uolb0gbaod8q4", "oauth_token_secret"=>"e2uolb0gbaod8q4", :oauth_token=>"6ta0iclc6wwguyg", "oauth_token"=>"6ta0iclc6wwguyg"}
Nisstyre has joined #ruby
headius has joined #ruby
flippingbits has joined #ruby
<Amnesia> apeiros_: do you perhaps have any tips for this noob:)?
davidcelis has joined #ruby
<ekaleido> whats the name of that hash?
<shevy> hash
<shevy> :D
<shevy> dankest hash[:oauth_token]
<ekaleido> hash["oauth_token"]
<spinagon> no
<spinagon> yes
<shevy> omg
<spinagon> why are there 2 of them?
<shevy> why do you have symbols and string names dankest
<shevy> :(
<dankest> I'm not sure, that's what I'm getting as a return
<dankest> that's the params.inspect
<shevy> nonono
<shevy> if this is your code, you are to blame
<dankest> It's not, I'm using the dropbox-api gem
mrsolo has joined #ruby
<shevy> ok, now I know that I shall never use dropbox
<dankest> hahaha
<dankest> It's third party. Dropbox's API is actually awesome
<shevy> man, just imagine this...
<shevy> projects that, for every string key in a hash, ALSO ADDITIONALLY use the symbol!
<apeiros_> poor-man's HWIA
<shevy> either this is a genius idea or it is insane
<apeiros_> insane
<shevy> hehehe
<apeiros_> improper/bad at least
<dankest> Is there something I can do to repair the return
<dankest> hahaha
<dankest> to:hash?
<shevy> I am tempted to post this to the mailing list and claim it is a genius idea, just to see the responses hehehe
<dankest> to_hash
<Amnesia> anyone on the http file upload:)?
acekiller has joined #ruby
<shevy> dankest well
<shevy> you could keep on accessing strictly via the symbols
badabim_ has joined #ruby
<shevy> but however you decide, be consistent. dropbox gem apparently is not
zodiak has joined #ruby
kenperkins has joined #ruby
mmokrysz has joined #ruby
mmokrysz has joined #ruby
mk03 has joined #ruby
yoklov has joined #ruby
bwlang has joined #ruby
tommyvyo has joined #ruby
kirun has joined #ruby
hukl has joined #ruby
shruggar has joined #ruby
badabim has joined #ruby
bwlang_ has joined #ruby
MasterIdler has joined #ruby
johndbri_ has joined #ruby
Amnesia has quit [#ruby]
Azure|dc has joined #ruby
ernst_ has joined #ruby
Lord-Harlot has joined #ruby
tatsuya_o has joined #ruby
ernst_ has quit [#ruby]
badabim_ has joined #ruby
havenn has joined #ruby
alx- has joined #ruby
axl_ has joined #ruby
sarguru__ has joined #ruby
<sarguru__> Hi, I need to write filedescriptor1 of a process in ruby. I incur that it may be mostly stdout hence deprecated. Please give in your opinions
sungji has joined #ruby
sungji has joined #ruby
bwlang_ has joined #ruby
<apeiros_> no comprende
mneorr has joined #ruby
Fraeon has joined #ruby
<sarguru__> Is it possible to write to fd1 of a process
caiges has joined #ruby
alerticus has joined #ruby
caiges has joined #ruby
derekbarber has joined #ruby
<apeiros_> sarguru__: as you said, fd1 is usually stdout, stdout is closed for write
<havenn> sarguru__: STDOUT.puts "Hi, fd1"; #or ; system "echo Wheee fd1"
<apeiros_> so no
<havenn> apeiros_ knows better than me!
<havenn> fd1 is news to me...
<apeiros_> or do you mean, you have two processes that should print their output to the same fd?
<sarguru__> havenn, your command just writes to system output. its like puts. I was talking about what apeiros was saying
<havenn> sarguru__: yeah, I'm slow on the uptake today, just now realizing what you are actually talking about >.>
<apeiros_> well, his question wasn't a gem in its phrasing…
<sarguru__> apeiros_, I have a process ( a program) and it takes some data on fd0 and it takes some data on fd2
<sarguru__> true :(
visof has joined #ruby
<sarguru__> apeiros_, I write to fd1 with open4::popen4. I just wanted to know if there is a way I can write to fd1
<apeiros_> not done that before, I'm sorry, I can't help
<sarguru__> thanks anyways friends
dekroning has joined #ruby
mengu_ has joined #ruby
mengu_ has joined #ruby
CannedCorn has joined #ruby
<CannedCorn> guys, what is the best way to get just the reply portion of an e-mail
<ekaleido> put the whole thing into an array of strings and use one string as the cutoff point and then reassemble the remaining strings?
<ekaleido> thats about as generic an explanation as my pea brain can give
<apeiros_> CannedCorn: use the Mail gem, let it parse the mail, and use the proper method to get whatever you want from the mail
doublethink has joined #ruby
ayoub has joined #ruby
doublethink has joined #ruby
hydrozen has joined #ruby
<CannedCorn> apeiros_ right but the mail gem won't detect what part was the reply and what part was the original message, thats the problem I'm trying to solve
<apeiros_> CannedCorn: ah, you should be more clear in your question…
doublethink has joined #ruby
<apeiros_> CannedCorn: good luck on that. different mail programs use different ways to indicate quotation
<apeiros_> usually it's '> '
<apeiros_> so you could gsub(/^ >.*\n/, '')
pzol has joined #ruby
sarguru__ has quit ["Leaving"]
<apeiros_> I'd probably check the content-type of the body before doing that, though. and only do it on text/plain.
<CannedCorn> yeah, that doesn't seem robust though
<CannedCorn> i was wondering if there were any gems that handled doing that for you
sacarlson has joined #ruby
btfriar has joined #ruby
<apeiros_> CannedCorn: what magic pixie dust do you think those gems would have that you don't? :)
hydrozen has joined #ruby
markoa has joined #ruby
CacheMoney has joined #ruby
darkofabijan has joined #ruby
snip_it has joined #ruby
releod has joined #ruby
mikewintermute has joined #ruby
undersc0re has joined #ruby
drake10 has joined #ruby
araujo has joined #ruby
emmanuelux has joined #ruby
kpshek has joined #ruby
<CannedCorn> apeiros_ maybe they would be able to extract the mail client that sent the message and figure out their reply type and then apply the appropriate method to extract the reply
badabim has joined #ruby
darkofabijan has quit [#ruby]
<apeiros_> they wouldn't
<apeiros_> unlike http, the sending mail client isn't part of the headers
<apeiros_> so all you can do is guess, based on patterns. so you're back at pixie dust & fairies.
pen has joined #ruby
danishkhan has joined #ruby
<undersc0re> apeiros_: Pixie dust & fairies are the greatest!
tran4 has joined #ruby
<tran4> I'm a senior CS undergrad. I applied to a company for co-op and intern positions: http://pastebin.com/LdAH6eaZ Are they good? no reply from company yet but got a call from a recruiter for the same position. shuold i talk to him if I want the position? his ad has $14/hr listed. I live with my parents and they want me to get some work experience this summer. I havent had many replies for my applications so far.
eddie has joined #ruby
<joe-mac> doesn't say much
coreydaley has joined #ruby
mikepack has joined #ruby
pzol has quit ["Sayonara!"]
bwlang_ has joined #ruby
badabim has joined #ruby
badabim_ has joined #ruby
ascarter has joined #ruby
eywu has joined #ruby
Quirrell has joined #ruby
Quirrell has joined #ruby
tvw has joined #ruby
Foxandxss has joined #ruby
<robacarp> tran4: not much about programming on there...I read it to be an IT position
twixmix has quit [#ruby]
<joe-mac> yea
vraa has joined #ruby
ascarter has joined #ruby
justinmcp has joined #ruby
<tran4> robacarp what is IT? installing software and answering phone calls when some the software they use doesnt work?
doublethink has joined #ruby
<joe-mac> could be that, could be managing ms exchange, could be setting up linux/unix boxes
<joe-mac> that job description leaves much to be desired, then again when you have no experience, "beggars can't be choosers"
dissolve has joined #ruby
Jake232 has joined #ruby
<TTilus> CannedCorn: you could use the source and go look how different mailclients handle quotation detection
<TTilus> CannedCorn: ...if you really care about the result
<robacarp> tran4: yea, joe-mac is right. I would suggest that if you have a preference of software development over IT that you pursue the correct internship carefully.
<robacarp> it is quite easy to get typecast and can be difficult to get over that
<Jake232> I want a relationship, but I want it to be via a different column than user_id, I want to use user_token.
berkes has joined #ruby
<fowl_sleep> Jake232: #rubyonrails
<Jake232> God damnit, wrong room
<Jake232> again
<Jake232> thanks
philcrissman has joined #ruby
fr0gprince_ has joined #ruby
<shevy> wait what
<shevy> a relationship
<shevy> #find-gals-here
<robacarp> HAHAHA
<shevy> nice thinking to send these to #rubyonrails however :)
bwlang_ has joined #ruby
tran4 has quit [#ruby]
badabim has joined #ruby
vraa_ has joined #ruby
virunga_ has joined #ruby
schovi has joined #ruby
waxjar has joined #ruby
<TTilus> was that token a ring?
<TTilus> token ring!
albemuth has joined #ruby
c0rn has joined #ruby
vraa has joined #ruby
n1x has joined #ruby
lorandi has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
looopy has joined #ruby
kickandrew has joined #ruby
superguenter has joined #ruby
bbttxu has joined #ruby
ephemerian has joined #ruby
kickandrew has joined #ruby
bbttxu has joined #ruby
kickandrew has joined #ruby
bbttxu has joined #ruby
visof has joined #ruby
emanu has joined #ruby
robbyoconnor has joined #ruby
mrsolo has joined #ruby
robbyoconnor has joined #ruby
Amnesia has joined #ruby
Amnesia has quit [#ruby]
kickandr1w has joined #ruby
pu22l3r_ has joined #ruby
kickandrew has joined #ruby
robbyoconnor has joined #ruby
robbyoconnor has joined #ruby
Ferdev has joined #ruby
davidpk has joined #ruby
pastjean has joined #ruby
Lord-Harlot has joined #ruby
mneorr has joined #ruby
badabim_ has joined #ruby
woof has joined #ruby
badabim_ has joined #ruby
robbyoconnor has joined #ruby
cloke_ has joined #ruby
ascarter has joined #ruby
pu22l3r has joined #ruby
Amnesia has joined #ruby
<Amnesia> does anyone over here use webrick frequently?
ascarter has joined #ruby
<shevy> Amnesia in the past I used to, but the docu sucks so I hope that I dont have to use webrick much anymore
<Amnesia> heh
<Amnesia> I'm getting: [2012-03-13 22:24:23] ERROR unsupported method `POST'
<Amnesia> which is pretty lame:/
atmosx has joined #ruby
<fowl> Amnesia: i think you need a do_POST method or something
libertyprime has joined #ruby
Amnesia has joined #ruby
virunga has joined #ruby
<Amnesia> did I miss anything?
<atmosx> too much
<shevy> lol
<shevy> the whole universe changed in the seconds it took you to write that man
r0bby has joined #ruby
bashdy has joined #ruby
ylluminate has joined #ruby
<Amnesia> heh
maddog_ has joined #ruby
<maddog_> hiho
<maddog_> how can I retrieve the part after the comma within a float?
jbw_ has joined #ruby
r0bby has joined #ruby
willyum has joined #ruby
<fowl> Amnesia: i think you need a do_POST method or something
<Amnesia> yep
<Amnesia> and placed that code in my file
<Amnesia> but no success yet
<maddog_> oh my gosh, it's modulo, of course :D
<Amnesia> wuuuut?
atmosx has joined #ruby
r0bby_ has joined #ruby
<apeiros_> maddog_: as a string or as a number?
mikepack has joined #ruby
<Amnesia> fowl: do you know where to place that?
<fowl> Amnesia: where to place?
<fowl> your servlet?
<Amnesia> yep
<fowl> you have to mount it
<fowl> s.mount ... i dont rembmer what the params are
<Amnesia> hm
r0bby_ has joined #ruby
<Amnesia> ok:)
zulax has joined #ruby
apok_ has joined #ruby
internet_user has joined #ruby
startling has joined #ruby
cloke has joined #ruby
startling has quit [#ruby]
dagnachewa has joined #ruby
doublethink has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
r0bby_ has joined #ruby
Indian has joined #ruby
<dagnachewa> !topic
Ferdev has joined #ruby
asobrasil has quit [#ruby]
<dagnachewa> ruby lang down :(
<shevy> dagnachewa sad things always happen
<Amnesia> ugh
Russell^^ has joined #ruby
r0bby_ has joined #ruby
r0bby_ has joined #ruby
davidpk has joined #ruby
Lord-Harlot has joined #ruby
SegFaultAX|work has joined #ruby
JNZ has joined #ruby
adeponte has joined #ruby
trivol has joined #ruby
sarguru__ has joined #ruby
<sarguru__> is there a way of doing dup(2) from ruby
shtirli__ has joined #ruby
ceej has joined #ruby
CacheMoney has joined #ruby
sbanwart has joined #ruby
yoklov has joined #ruby
Boohbah has joined #ruby
ezkl has joined #ruby
ezkl has joined #ruby
danishkhan has joined #ruby
Synthead has joined #ruby
r0bby_ has joined #ruby
eka has joined #ruby
jason_rad has joined #ruby
FACEFOX has joined #ruby
mfridh has joined #ruby
alanp_ has joined #ruby
<shevy> what is .dup(2)
nvez has joined #ruby
nvez has joined #ruby
<sarguru__> I have a very specific need of using fd1 for writing into it instead of reading
<sarguru__> dup2 duplicates the required fd to specified one
<sarguru__> I ended up with this
robbyoconnor has joined #ruby
<sarguru__> this dates back to 2006
SullX_ has joined #ruby
robbyoconnor has joined #ruby
mikepack has joined #ruby
SullX__ has joined #ruby
Rickmasta has joined #ruby
davidpk has joined #ruby
libertyprime has joined #ruby
robbyoconnor has joined #ruby
fr0gprince_mac has joined #ruby
stephenjudkins has joined #ruby
Jake232 has joined #ruby
mikepack has joined #ruby
nikhgupta has joined #ruby
robbyoconnor has joined #ruby
artOfWar_ has joined #ruby
bglusman has joined #ruby
schovi has joined #ruby
nikhgupta has quit [#ruby]
yawniek has joined #ruby
Foxandxss has joined #ruby
<heftig> Boohbah: nice
andremlc has joined #ruby
libertyp1ime has joined #ruby
axl_ has joined #ruby
cjlicata has joined #ruby
gytis_z has joined #ruby
libertyp1ime has joined #ruby
caiges has joined #ruby
thecreators has joined #ruby
liluo has joined #ruby
zulax has joined #ruby
strnx has joined #ruby
c0rn has joined #ruby
Vert has joined #ruby
<jason_rad> Can someone point me in the right direction.. In short I have a copies of email being pipe from postfix to a ruby script of mine. Basically the ruby script reads the input then shoots that to a db.. my question is.. how would I handle attachments? For example I just see lot's of lines of txt. In ruby is the a library I can work with to treat these as readable attachments?
rboyd has joined #ruby
<heftig> something that undestands MIME
<jason_rad> That's what I was looking for.. MIME
<sarguru__> use mail gem
<jason_rad> thank you
<jason_rad> sarguru__: will do
mikepack has joined #ruby
<davidcelis> Sooo, what's up with `?` in ruby 1.9?
<davidcelis> irb(main):008:0> ?**5
<davidcelis> => "*****"
<davidcelis> >> ?a # => "a"
<davidcelis> etc.
<davidcelis> character literal?
<fowl> davidcelis: yes
mmokrysz has joined #ruby
<davidcelis> Interesting
<davidcelis> So it just returns whatever is after the ? as a char
<davidcelis> well, a string with that single char
polarist has joined #ruby
<fowl> you could do some stuff like (obj.nil? ? ?y : :n) which would return 'y' for true or :n for false, you'd have to check for them specially, so its not recommended, but look at how weird and unreadable it is :)
<davidcelis> yeah
mmokrysz has quit [#ruby]
phantomfakeBNC has joined #ruby
<fowl> davidcelis: or build strings like ?h<<?e<<?l<<?l<<?o :P
<fowl> im not sure what the usefulness is
<davidcelis> ಠ_ಠ
disappearedng has joined #ruby
<davidcelis> Is this documented?
iocor has joined #ruby
<workmad3> davidcelis: would we want it documented? :/
<davidcelis> it's clearly an operator rather than a method, right?
<disappearedng> Hey I want to quickly find out all the attributes stored in a particular user instance. Is there like a console.log for ruby?
<davidcelis> i feel like i'm trying to look up docs for "if"
doublethink has joined #ruby
mikepack has joined #ruby
<fowl> davidcelis: yea im not sure where it would be documented, maybe its in the String notes somewhere
<fowl> disappearedng: rails?
<disappearedng> it's more a ruby question
dinny1 has joined #ruby
<disappearedng> It could be a Foo class for all I care
<fowl> what does console.log do
<davidcelis> that's some javascript shit right there
<apeiros_> disappearedng: see Object#methods
<fowl> if you havent overwritten it, #inspect should show your object's attributes
<davidcelis> disappearedng: i believe you just want a `puts` good sir
<davidcelis> puts object.inspect
<disappearedng> inspect is better
<disappearedng> puts just prints <#User:a1231231>
<heftig> or just "p object"
<davidcelis> yeah... hence `puts object.inspect` :P
<apeiros_> also see #instance_variables, Module#constants, #instance_methods, #class_variables
<davidcelis> does object.inspect automatically get sent to STOUT?
<apeiros_> @ disappearedng
<davidcelis> thought you had to puts it
<apeiros_> davidcelis: no, inspect returns a string
<heftig> davidcelis: no, it doesn't get sent to stdout
<apeiros_> no side-effects
<apeiros_> p prints the inspect
<fowl> davidcelis: p someobj #=> this is equivalent to puts someobj.inspect
<workmad3> fowl: p someobj == puts someobje.inspect || someobj
<workmad3> *someobj
<workmad3> (p gives you back the object again)
<fowl> yeah, that too
<workmad3> which makes it much more useful for debugging purposes :)
tommyvyo has joined #ruby
<apeiros_> I find that annoying in irb
Guedes0 has joined #ruby
<apeiros_> and therefore turned it off
<fowl> apeiros_: because it shows twice?
<apeiros_> I have Object#p
<fowl> apeiros_: dont you use pry?
<apeiros_> fowl: yes, and I don't wanna train ;0, or even have to
<workmad3> apeiros_: yeah, it can be a bit annoying in irb... it's especially bad with pp :)
<apeiros_> fowl: I should
<apeiros_> I really really should
<fowl> there's no reason not to
<fowl> imo
<workmad3> apeiros_: where you get your pretty-printed array, followed by your crappy inspected array...
<apeiros_> fowl: yes, there is
phantomfakeBNC has joined #ruby
igaiga has joined #ruby
<apeiros_> it's called lethargy :(
<fowl> lol
<fowl> apeiros_: the commands like show-method are essential for me
<apeiros_> fowl: I can imagine
<apeiros_> after all, I do .bbedit all the time
Amnesia has joined #ruby
<apeiros_> (opens methods in bbedit)
<workmad3> apeiros_: but in code... it's nice to look at a method call like some_method(something_else.another_method) and be able to just do some_method(p(something_else).another_method)
<apeiros_> workmad3: as said, I have Object#p for that
Ark22 has joined #ruby
<apeiros_> foo(bar.p.baz)
<apeiros_> I've had that for like 5y now…
<workmad3> apeiros_: yeah, good point, that works too :)
<apeiros_> workmad3: it's even easier
<apeiros_> wrapping p() around stuff is often quite annoying
<apeiros_> cursor moving and all…
Ark22 has quit [#ruby]
<apeiros_> .p is at one point, no finger-stretching to () either
<workmad3> apeiros_: for rails, I added in Kernel#ee recently too, which does 'raise obj.inspect'
* apeiros_ is a damn lazy doc
<apeiros_> *dog
<heftig> except "p" is private
<apeiros_> workmad3: hu? why raise?
stephenjudkins has joined #ruby
<apeiros_> heftig: except, not in my irb :-p
<workmad3> apeiros_: gives you an error trace exactly at that point, no need to scroll through the server log
jleitgeb has joined #ruby
<apeiros_> heftig: Kernel#p != Object#p in my irb
<workmad3> apeiros_: and spits it out in the browser rather than the terminal :)
baroquebobcat has joined #ruby
<heftig> foo(bar.tap{|x|p x}.baz)
<apeiros_> workmad3: yes, but why raise? why not just use caller?
<apeiros_> heftig: yeah, I'm sorry, but foo.p.baz *totally* kicks bar.tap { |x| p x }.baz' ass
<apeiros_> and it kicks p(bar).baz' ass still a bit
<workmad3> apeiros_: not quite following...
jamescotterill has joined #ruby
<apeiros_> it's odd, I've had a dir() method once, but it's gone missing from my irb…
<apeiros_> workmad3: raise will interrupt your app, is that intentional? if you just want a debug output…
<workmad3> apeiros_: ah, yeah... the interrupt is intentional :)
<workmad3> apeiros_: the rails stacktrace page gives you a pretty nice stacktrace, and means you only have the one thing you're interested in on the screen
<apeiros_> I added binding.irb_drop quite a while ago for that. (actually irb_drop(binding), the other I stole from pry, but pry came a good 1 or 2y after my irb_drop)
<apeiros_> workmad3: ah, with the folding and all
<apeiros_> I see
<apeiros_> you want the html
SeanTAllen has joined #ruby
<apeiros_> a graphical debugger for ruby would still be nice…
<workmad3> apeiros_: pretty much, yeah :)
<apeiros_> and it wouldn't even be impossible :-/
<apeiros_> I mean you can attach to a ruby process with gdb
<workmad3> apeiros_: however, I think .ee would be better than ee() now you mention it :)
<apeiros_> I'd probably call it .splode
<apeiros_> just for shits & giggles
kaichanvong has joined #ruby
robcthegeek has joined #ruby
<workmad3> apeiros_: I'm too lazy to type .splode instead of .ee :P
<apeiros_> make a short-cut to it, I'd recommend cmd-ctrl-shift-e
<apeiros_> ;-D
<apeiros_> oh, I knew I had forgotten one - I meant: cmd-opt-ctrl-shift-e
svnlto has joined #ruby
blooberr has joined #ruby
wyhaines_ has joined #ruby
si14 has joined #ruby
MetaCosm has joined #ruby
justinmcp has joined #ruby
jason_rad has quit [#ruby]
avandendorpe has joined #ruby
BrianE has joined #ruby
relix has joined #ruby
pvh has joined #ruby
MoMo has joined #ruby
Guedes has joined #ruby
tilde` has joined #ruby
lectrick has joined #ruby
dkannan has joined #ruby
nari has joined #ruby
phantasm66 has joined #ruby
kapowaz has joined #ruby
GSpotAssassin has joined #ruby
apok has joined #ruby
stern_d has joined #ruby
denysonique__ has joined #ruby
srid has joined #ruby
srid has joined #ruby
srid has joined #ruby
looopy has joined #ruby
shaatar has joined #ruby
wyhaines has joined #ruby
mikeycgto has joined #ruby
SegFaultAX|work has joined #ruby
mneorr has joined #ruby
stringoO has joined #ruby
davidboy has joined #ruby
Dr4g_ has joined #ruby
fcoury has joined #ruby
banistergalaxy has joined #ruby
xrl has joined #ruby
arnihermann has joined #ruby
wyhaines has joined #ruby
<Azure> An opinion question: what would be the best way to backtrack something, as a command.
savage- has joined #ruby
<Azure> Collection+10?
<Azure> Collection-10?
<Azure> Taking into account that whatever Collection returns is the most current.
libertyprime has joined #ruby
<fowl> backtrack?
<fowl> wut
jrgifford has joined #ruby
jrgifford has joined #ruby
philcrissman has joined #ruby
SegFault1X|work has joined #ruby
gytis_z has joined #ruby
patrick99e99 has joined #ruby
choffstein has joined #ruby
iocor has joined #ruby
<patrick99e99> I have a funky split regex issue.. I am trying to split a string by the first character that is NOT a digit... and so I am doing: "123foobar".split(/[^\d]/) and I get: ["123"] ...
<patrick99e99> what is happening to the foobar?
<patrick99e99> I am expecting ["123", "foobar"]
moeSeth has joined #ruby
tds has joined #ruby
zakwilson has joined #ruby
<davidcelis> it goes away
<davidcelis> because f, o, o, b, a, r all match [^\d]
CoverSlide has joined #ruby
<davidcelis> it splits at every instance, not the first
<davidcelis> > "a-b-c-d-f".split("-")
<davidcelis> => ["a", "b", "c", "d", "f"]
<davidcelis> and removes that character
<davidcelis> so you are left with the digits, and nothing else
<apeiros_> patrick99e99: whats the desired result?
<davidcelis> ["123", "foobar"] apparently
<apeiros_> ["123", "foobar"] ?
<apeiros_> davidcelis: 7 years in this channel taught me not to play the guessing game…
<davidcelis> lol
chson_ has joined #ruby
<apeiros_> btw, split(regex, -1) removes the special cases split normally applies
arnaud_gp has joined #ruby
<apeiros_> so: "123foobar".split(/[^\d]/,-1) # => ["123", "", "", "", "", "", ""]
<apeiros_> those special cases of split threw me off sooo many times… totally annoying IMO.
<davidcelis> ah, that's good to know
<davidcelis> very good to know
<patrick99e99> apeiros_: but--- that still does not return the foobar string.. Why not?
<apeiros_> patrick99e99: davidcelis already explained you
<davidcelis> patrick99e99: like i said, .split REMOVES the match
<apeiros_> patrick99e99: "a-b-c-d-f".split("-") # => ["a", "b", "c", "d", "f"]
<apeiros_> you don't see any '-' in there either, right?
<davidcelis> in this case, any non-digit gets removed from your string
<apeiros_> because you told ruby to split on '-'
<patrick99e99> ahhhhhhhhhhhhhhhhhhhhhhhh... ok then .match is my friend for sure in this case then.
bingomanatee_ has joined #ruby
<apeiros_> and that's *on*, not *before* '-'
<patrick99e99> thank you
<apeiros_> same for your [^\d]
<apeiros_> btw., [^\d] == \D
<patrick99e99> cool
shevy has joined #ruby
<apeiros_> "a-b-c-d-f".split(/(?=-)/) # => ["a", "-b", "-c", "-d", "-f"]
<davidcelis> "123foobar".split(/(?=\D+)/)
<davidcelis> => ["123", "f", "o", "o", "b", "a", "r"]
<davidcelis> lol
<apeiros_> h
<apeiros_> hm
<apeiros_> why's \D+ not greedy there?
<apeiros_> could probably be considered a bug…
<davidcelis> didn't know about ?= though
<apeiros_> look arounds++
<apeiros_> it's got 3 sisters
<apeiros_> but 2 of them don't like variable length :(
<davidcelis> i think i've only used ?:
<davidcelis> where can i read more bout those?
<apeiros_> ?: is not a look-around
<fowl> does anybody know if redef made it into ruby 2.0
<davidcelis> hm
<apeiros_> davidcelis: wikipedia, or in the book 'mastering regular expressions'
<apeiros_> the name + regex should help with google too
<davidcelis> thanks
CannedCorn has joined #ruby