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