MrGando has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has quit [Read error: Connection reset by peer]
yoklov has quit [Quit: bye!]
iocor has quit [Quit: Computer has gone to sleep.]
jenrzzz-mac has joined #ruby
cousine has joined #ruby
setient_ is now known as setient
libertyprime has joined #ruby
looopy has joined #ruby
zaychenok has quit [Read error: Connection reset by peer]
zaychenok has joined #ruby
sohocoke has quit [Quit: Computer has gone to sleep.]
azm has quit [Ping timeout: 244 seconds]
zizzyx has quit [Disconnected by services]
<franksort>
Thanks banisterfiend
alejo has quit [Quit: Leaving]
zizzyx has joined #ruby
<zizzyx>
i'm creating a mailer with which a secretary will use a text field to write out emails for an update list, and i'm wondering how to structure it
<zizzyx>
do you treat the mailer like a controller, and set up routes for it, which point to views in the views/mymailer dir?
<zizzyx>
oh do i make the email-composing view part of another controller, which calls the mailer function on post?
mockra has joined #ruby
proghat_ has joined #ruby
jonathanwallace has joined #ruby
Dl33ter has quit [Quit: ++++]
binaryplease has quit [Quit: WeeChat 0.3.8]
proghat has quit [Ping timeout: 245 seconds]
FLeiXiuS has quit [Quit: Leaving]
qwerxy has quit [Quit: offski]
GeekOnCoffee has quit [Excess Flood]
gaius65 has quit [Quit: gaius65]
GeekOnCoffee has joined #ruby
cousine has quit [Remote host closed the connection]
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby
* Enekoos
se despide
Enekoos has quit [Quit: Saliendo]
emmanuelux has quit [Remote host closed the connection]
tayy has quit [Remote host closed the connection]
inteq has joined #ruby
inteq has quit [Client Quit]
inteq has joined #ruby
bricker88 has quit [Quit: Leaving.]
jeffreybaird has quit [Read error: Connection reset by peer]
adamkittelson has quit [Remote host closed the connection]
jeffreybaird has joined #ruby
L-----D has joined #ruby
freeayu has joined #ruby
socomm has joined #ruby
mockra has quit [Remote host closed the connection]
<socomm>
Is the require command like #include in c?
<Boohbah>
yes
<shevy>
checking for Python version >= 2.5 but not 3.x... configure: error: Python 2.5 or higher (but not Python 3.x) is required.
<shevy>
fuck this python transition
jenrzzz-mac has quit [Quit: jenrzzz-mac]
inteq has quit []
<socomm>
Another question. How can i find out where my ruby libraries are kept?
<td123>
shevy: haha, don't give up
<shevy>
socomm depends. try "gem env"
<shevy>
td123 yeah man... firefox source build requires to have python installed. that alone annoys me a lot, but ... this transition thing is soooo annoying. there is quite some other software that says this like "use 2.x, not 3.x, we all hate 3.x!!!" :(
<socomm>
shevy: thx
<shevy>
they should use ruby anyway :>
bigoldrock has quit [Quit: Leaving.]
<shevy>
but those version transitions seem to be painful everywhere
savage-_ has quit [Remote host closed the connection]
<shevy>
heh
<shevy>
#ruby is at 624, #perl is at 599
<shevy>
#python at 896 :(
<Boohbah>
lurkers, the lot of them!
<td123>
shevy: iirc, the py2 -> py3 transition is only half way done, believe it or not, there is some sort of roadmap :P
<franksort>
Is there a way to store :collect {..} in a variable so I can pass it to <obj>.send?
<shevy>
franksort, perhaps via Proc.new, and then triggering .call ... and sending that what .call returns as argument to .send, but I am mostly just guessing wildly here without really knowing
<shevy>
what you basically wanna do is apply some filter-rules on a collection or?
<socomm>
shevy: wat does numbers mean?
<franksort>
Yeah
SegFaultAX|work2 has quit [Quit: Lost terminal]
<shevy>
socomm numbers? you use them to count how much money you have
<shevy>
:)))
<shevy>
ah
<banisterfiend>
franksort: just store the proc
<shevy>
well, not that much, but #python is a bit more active than #ruby
<banisterfiend>
franksort: then when u wanna use it, use: array.send(:collect, &my_proc)
<shevy>
tada! banister to the rescue
<socomm>
shevy: #ruby is at 624, #perl is at 599
<shevy>
yeah, people on that channel
<franksort>
Might work, thanks
<socomm>
oh wait you're talking about users per channel
bnagy has quit [Read error: Operation timed out]
<shevy>
yeah
<shevy>
on TIOBE, perl beats ruby still
<xhh>
hi. how to use a ruby script to access a page requiring authentication? can any gems send username and password on the login page and keep the session with the following requests?
<banisterfiend>
franksort: what u trying to do exactly
<shevy>
dafuq... lua dropping 10 ranks in one month alone? I am starting to doubt TIOBE ...
jeff_sebring has joined #ruby
indian has quit [Ping timeout: 248 seconds]
<banisterfiend>
shevy: did u watch the tennis
<shevy>
tennis?
<franksort>
banisterfiend: I'm trying to adhere to some other code. It lets me assign :method to some array method, and then it does [arr].send(:method)
<shevy>
hmm my time of watching tennis was the era of pete sampras and andre agassi
<shevy>
and ivanisevic
<shevy>
nowadays I dont know what is going on there anymore
<banisterfiend>
franksort: how does it pass in parameters ?
<franksort>
banisterfiend: A config file. Right now it says config.error_method = :to_sentence (which is a helper rails added to Array that just concats the els of an array with commas or ands)
<banisterfiend>
franksort: but u want to pass in a block, right? how do u pass in a block
uris has joined #ruby
seanstickle has joined #ruby
jenrzzz-mac has joined #ruby
<franksort>
banisterfiend: With the way the code is written, I don't think it's possible but I was just making sure
olrrai has joined #ruby
<franksort>
I'll probably monkey patch it to accept a :method and an optional :block
iori has joined #ruby
perryh_away is now known as perryh
khakimov has quit [Ping timeout: 240 seconds]
<banisterfiend>
franksort: u mean &block :P
zombor has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
khakimov has joined #ruby
<zombor>
anyone know of any generic hash/object validation libraries in pure ruby?
<zombor>
to validate the presence or other kinds of properties of a hash or object
uris has quit [Read error: Connection reset by peer]
<seanstickle>
zombor: ActiveModel
<zombor>
anything else besides Active* ? :)
<seanstickle>
Ha
<zombor>
i'll use it if i have to, but it's not the most flexible thing in the world
<zombor>
i was hoping to find something that did it the opposite way: a validation object that accepts a hash and tells me if it's valid. maybe that's backwards
BrokenCog has joined #ruby
<seanstickle>
My lie is discovered!
sleetdrop has joined #ruby
freeayu has quit [Ping timeout: 244 seconds]
BrokenCo1 has joined #ruby
Araxia_ has quit [Quit: Araxia_]
SimSala has quit [Ping timeout: 245 seconds]
albemuth has quit [Quit: Computer has gone to sleep.]
BrokenCog has quit [Ping timeout: 248 seconds]
albemuth has joined #ruby
mikepack has quit [Remote host closed the connection]
looopy has joined #ruby
Targen has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 256 seconds]
macmartine has joined #ruby
corenumb has joined #ruby
kenperkins has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
freeayu has joined #ruby
jeff_sebring has joined #ruby
mrsolo has quit [Quit: Leaving]
zaychenok has quit [Quit: Konversation terminated!]
zaychenok has joined #ruby
ben_alman has quit [Excess Flood]
jeff_sebring has quit [Remote host closed the connection]
shevy2 has joined #ruby
albemuth has quit [Quit: Computer has gone to sleep.]
shevy has quit [Read error: Operation timed out]
BrokenCo1 has quit [Read error: Connection reset by peer]
jeff_sebring has joined #ruby
Croms has joined #ruby
BrokenCog has joined #ruby
jeff_sebring has quit [Remote host closed the connection]
eph3meral has quit [Read error: Operation timed out]
jenrzzz-mac has joined #ruby
looopy_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
looopy_ has quit [Remote host closed the connection]
shtirlic_ has joined #ruby
ben_alman has joined #ruby
looopy_ has joined #ruby
banisterfiend has joined #ruby
looopy has quit [Ping timeout: 244 seconds]
shtirlic has quit [Ping timeout: 248 seconds]
uris has joined #ruby
wpaulson_ has joined #ruby
wpaulson_ has quit [Client Quit]
wpaulson_ has joined #ruby
jeff_sebring has joined #ruby
billiamii has joined #ruby
Targen has quit [Ping timeout: 246 seconds]
Soul_Est has joined #ruby
rdctnst has quit [Quit: Leaving]
zinjacoder has quit [Read error: Connection reset by peer]
<babonk>
HI guys, I'm getting the error ruby(47333,0x7fff72aee960) malloc: *** error for object 0x7f98b6a6e3f0: pointer being freed was not allocated
<babonk>
*** set a breakpoint in malloc_error_break to debug
<babonk>
how can I actually set such a breakpoint
<babonk>
I'm not sure which extension is responsible, if any
whuffor has quit [Ping timeout: 240 seconds]
kylemcgill has quit [Remote host closed the connection]
ciopte7 has quit [Quit: ciopte7]
<td123>
babonk: can you reproduce it?
<td123>
if you can, find a minimal test case
ciopte7 has joined #ruby
libertyprime has quit [Quit: Lost terminal]
<banisterfiend>
babonk: are you using a c extension
noyb has joined #ruby
bambanx has joined #ruby
libertyprime has joined #ruby
<babonk>
td123: It occassionally reproduces when I try to send an email from my dev environment. I'm not sure the exact line of code though because the ActiveMailer code is so deep
<bambanx>
sup
<babonk>
it might be in tmail.. or it might be in something deeper than all of that that they rely on
<babonk>
or that wraps around their calls somehow
libertyprime has quit [Client Quit]
<babonk>
usually i get the error i pasted, sometimes a segfault.. and sometimes strangely it works. but mainly that malloc errorc
libertyprime has joined #ruby
zaychenok has quit [Quit: Konversation terminated!]
<bnagy>
if you can't master enumerable after a month you're just going to cut yourself if you try to use threads
<bnagy>
gem install parallel and use Parallel.map or Parallel.each
<banisterfiend>
bnagy: hey nags
banisterfiend is now known as horseman
<bnagy>
on collections, that's mostly impossible to screw up
<horseman>
bnagy: what's your alcohol of choice
<bnagy>
hm
<bnagy>
just about anything except tequila
Tref has joined #ruby
mneorr has joined #ruby
<horseman>
bnagy: can u be more specific
<bnagy>
I am very fond of islay single malts though
<horseman>
bnagy: whiskey?
perryh is now known as perryh_away
<horseman>
bnagy: do u like rum?
<bnagy>
good rum, yeah definitely
<Hanmac>
i never used threads or fibers ... (i must think at the book in southpark: "a million little fibers")
hemanth has quit [Read error: Connection reset by peer]
<horseman>
Hanmac: did u see the flash video by the southpark guys?
<horseman>
Hanmac: one sec ill link u
<bambanx>
can i do this situation for example: run two methods, method_one and method_two , if my method_two register some event this do the other method, method_one start again?
hemanth has joined #ruby
jeff_sebring has joined #ruby
* Hanmac
donot klick on banister links
<bnagy>
bambanx: you can, but like I said, it's horrible
<bambanx>
what you mean bnagy with horrible? is hard to do?
<bnagy>
do everything you possibly can to avoid handling that kind of concurrency stuff yourself
<bnagy>
what are you trying to do, in broad terms?
<bambanx>
i need run two methods one method i wanna use for see if my apps its running ok
<bambanx>
this method is scanning my screen all time
<bnagy>
oh right
<bnagy>
you can't
<bnagy>
that's the halting problem
<bnagy>
if you need a monitor make it a separate process
<bambanx>
what you mean with separate process?
sepp2k has joined #ruby
<horseman>
bnagy: i want to work on some badass opensource project with u in celluloid, a project so good we can sell t-shirts with the project name on it
<bambanx>
my method is like a vigilant if my program is running ok
<bnagy>
if you want to monitor app X you need a separate app Y
<bnagy>
because compsci
trollface is now known as Paradox
iocor has quit [Quit: Computer has gone to sleep.]
jimeh has joined #ruby
<bambanx>
:(
fgwaegeawgfwa has joined #ruby
<bnagy>
horseman: heh, I have enough backlog with my actual job
<bnagy>
I really, really want to rewrite all my stuff on celluloid though :)
<horseman>
bnagy: actual jobs dont make u famous, dont u want to get famous
Gavilan has quit [Ping timeout: 244 seconds]
<bnagy>
no
<bambanx>
bnagy, this: if you can't master enumerable after a month , sound like you suck bambanx :( , i dont study enumerable vry well yet i dont have time =(
ipoval has quit [Quit: ipoval]
<bnagy>
although in the context of security I'm more than famous enough for my taste
locriani_ is now known as locriani
<horseman>
bnagy: let me google u, what should i google for
<bnagy>
bambanx: just saying, you've been asking more or less the same questions on basic CSV + Enumerable for a month, and the questions are not getting any more advanced
<bnagy>
which suggests to me that you're not learning
RichG is now known as RichGuk
jimeh has quit [Client Quit]
<horseman>
bnagy: hey so what od u think abou tthe stability of celluloid?
seoaqua has joined #ruby
<bnagy>
haven't ever used it
<bnagy>
I looked at their underlying zmq stuff
<bnagy>
I am not 100% convinced about it
jeff_sebring has quit [Remote host closed the connection]
<horseman>
bnagy: one of my projects is happily using eventmachine now and i've been told both positive and negative things about migrating to celluloid
<horseman>
negative => it's unstalbe on jruby
<bnagy>
it's a really nice model
<bnagy>
but I have a fairly actor-y model already
jeff_sebring has joined #ruby
<bnagy>
I want to steal mainly their register and the gossip protocol
qwerxy has quit [Quit: offski]
<horseman>
bnagy: "their" i thought it was just one guy :)
<bnagy>
I thought the addons were more than just tarcieri?
<apeiros_>
clyfe: proxy questions ain't good style.
<clyfe>
it's rather involved
<clyfe>
that was the best way I could come up with
<clyfe>
I have the 2 modules that are included in the 2 classes in the described way
<clyfe>
I need to monkeypatch the modules as such as to override the m method so it's result to be "m + 1"
meisth0th_ has joined #ruby
bambanx_ has quit [Ping timeout: 245 seconds]
meisth0th_ has left #ruby [#ruby]
mdw has quit [Remote host closed the connection]
mrdtt has joined #ruby
mdw has joined #ruby
nfk has joined #ruby
naquad has quit [Read error: No route to host]
nipra has joined #ruby
virtuoussin13 has joined #ruby
virtuoussin13 has left #ruby [#ruby]
banseljaj is now known as imami|afk
virtuoussin13 has joined #ruby
<virtuoussin13>
When you extend a module in a class definition, the methods defined in that module are added as instance methods to the class object, correct?
<horseman>
virtuoussin13: no
<apeiros_>
virtuoussin13: no
<apeiros_>
include does that
<horseman>
virtuoussin13: theyr'e added as class methods, as apeiros_ is about to say
<virtuoussin13>
look carefully, I said to the "Class object"
<apeiros_>
I trusted you to do that horseman :-)
<virtuoussin13>
"as instances methods OF the class object" then if you prefer
<horseman>
u shouldnt trust me to do anything im pretty drunk
<horseman>
virtuoussin13: yeah u got the terminology wrong
<apeiros_>
horseman: I think that's your default, no?
<horseman>
even if u were careful
<horseman>
Yeah
naquad has joined #ruby
<virtuoussin13>
right well, anyway, my terminology aside
<csmrfx>
let's call the AA dudes to mr. banners door
<apeiros_>
class Foo; include Bar; end
<apeiros_>
whoops, meep, strike that.
<apeiros_>
class << Foo; include Bar; end
<apeiros_>
class Foo; extend Bar; end
<apeiros_>
these two do *almost* the same
<virtuoussin13>
when you reference a class variable in a method that is in the extended module, I would expect it to modify the extendee's class variable. But instead it seems to reference the extended modules class variable
<apeiros_>
you almost certainly never want to use class variables.
<apeiros_>
they're a conceptual nightmare.
<apeiros_>
(@@vars are class vars, just to avoid terminology issues)
<virtuoussin13>
right, I know
<virtuoussin13>
conceptual nightmares aside, is there a way to make it so that methods in an extended module reference the extender class's class variables
Shrink has joined #ruby
Shrink has quit [Changing host]
Shrink has joined #ruby
<apeiros_>
reproducable code please
<horseman>
virtuoussin13: afaik since class vairables are inherited they always belong to the highest class in the ancestor chain
<virtuoussin13>
I'll be damned. Okay, thanks, i'll use that
<virtuoussin13>
thanks
<virtuoussin13>
appreciated. Later all.
<apeiros_>
virtuoussin13: next time, ask a question related to your problem :-p
<virtuoussin13>
apeiros_: noted
<apeiros_>
(as opposed to related to technical obstacles while solving the problem)
<virtuoussin13>
thanks again
<apeiros_>
yw
virtuoussin13 has left #ruby [#ruby]
wpaulson has quit [Remote host closed the connection]
prtksxna has quit [Ping timeout: 248 seconds]
cheater_ has quit [Ping timeout: 260 seconds]
dcorbin has quit [Quit: This computer has gone to sleep]
pashamur_ has joined #ruby
gongura has quit [Quit: This computer has gone to sleep]
iori has quit [Read error: Connection reset by peer]
pashamur has quit [Ping timeout: 252 seconds]
iori has joined #ruby
grekko has joined #ruby
Foxandxss has joined #ruby
<shevy2>
lib/ruby/1.9.1/syck/rubytypes.rb:150:in `can_be_saved?': invalid byte sequence in UTF-8 (ArgumentError)
<shevy2>
Encoding, we meet again
<gogiel>
.encode("UTF-8")
cantonic_ has joined #ruby
akem_ has joined #ruby
_iori_ has joined #ruby
flak has joined #ruby
iori has quit [Read error: Connection reset by peer]
flak is now known as Guest28645
Gekz has quit [Read error: Connection reset by peer]
<shevy2>
k gogiel going to try... thought I'd switch back to psych first, nope doesn't seem to work either ... lib/ruby/1.9.1/psych/visitors/yaml_tree.rb:224:in `count': invalid byte sequence in UTF-8 (ArgumentError). seems as if there is no alternative to UTF-8 now, I tried to use "# Encoding: ASCII-8BIT" but that apparently doesn't help much either
<shevy2>
it is as if they are in a pub drinking beer :)
<JonnieCache>
i was doing everything in in raw ruby on top of webrick, without even rack or anything. this is before rack or sinatra or node or anything
<JonnieCache>
my project would be SO EASY today
<shevy2>
haha cool
<JonnieCache>
aaargh that each_sublocale code is horrible
<shevy2>
hehe
<shevy2>
locale.rb also uses more than one instance of eval()
<shevy2>
:)
<JonnieCache>
string building is tricky though. i have definitely done stuff like that before
<JonnieCache>
not in public facing code though haha
<shevy2>
that line used two evals, I only saw the first one
schaerli has joined #ruby
<JonnieCache>
that is the kind of line where you definitely should put a comment
zinjacoder has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
drizztbsd has joined #ruby
hemanth has joined #ruby
Guest28645 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<drizztbsd>
hi, how can I require a gem WITHOUT checking the dependencies?
<shevy2>
japanese hackers don't believe in comments
rippa has joined #ruby
<drizztbsd>
or better, I have to include a gem WITHOUT installing a deps
<shevy2>
drizztbsd tehre exists an option for gem
<shevy2>
"gem install --ignore-dependencies pry"
<shevy2>
should work on local .gem files fine too
<drizztbsd>
that's not my question, I need to do a require 'gem'
<drizztbsd>
but /usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find eventmachine (>= 0) amongst [bigdecimal-1.1.0, github-markup-0.7.2, io-console-0.3, json-1.5.4, minitest-2.5.1, msgpack-0.4.6, rainbow-1.1.4, rake-0.9.2.2, rdoc-3.9.4, redcarpet-2.1.1, rexec-1.4.1, rubydns-0.4.0, rubydns-0.3.4] (Gem::LoadError)
fermion has joined #ruby
<shevy2>
yep. that can never work.
<shevy2>
you can rescue Gem::LoadError and continue though
mrdtt has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
ananthakumaran1 has joined #ruby
liluo_ has joined #ruby
liluo has quit [Read error: Connection reset by peer]
dhruvasa1ar has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
ananthakumaran has quit [Ping timeout: 244 seconds]
fridim_ has joined #ruby
mohits has quit [Ping timeout: 240 seconds]
shevy2 is now known as shevy
eurek has joined #ruby
xastion has joined #ruby
eurek has quit [Client Quit]
xastion has quit [Client Quit]
Guedes_out is now known as Guedes
liluo_ has quit [Remote host closed the connection]
xastion has joined #ruby
tayy has quit [Remote host closed the connection]
davidcelis has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
jbw_ has quit [Ping timeout: 260 seconds]
mdw has quit [Remote host closed the connection]
visof has joined #ruby
titas9x has left #ruby [#ruby]
SeanTAllen has joined #ruby
schaerli has quit [Remote host closed the connection]
davidcelis has joined #ruby
BlasterBlade has quit [Quit: Konversation terminated!]
roams has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
rizzylt has joined #ruby
iocor has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
frishi has joined #ruby
indian has quit [Ping timeout: 244 seconds]
SimSala has joined #ruby
visof has quit [Ping timeout: 252 seconds]
moshef has joined #ruby
nergal has joined #ruby
jbw_ has joined #ruby
<nergal>
Hi, I'm using httparty self.class.get("<myurl>"), but I found out that when I have a url containing ":" it seems to encode it twise, such as ":" becomes %3A and then it encodes the "%" and it becomes "%253A". This makes a single ":" become %253A. Any ideas what's wrong here?
<shevy>
or just install the missing gem :D
<nergal>
httparty version is 0.7.8
drizztbsd has left #ruby ["Konversation terminated!"]
iamjarvo1 has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
samwin has joined #ruby
kaneda__ has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
mayankkohaley has quit [Ping timeout: 245 seconds]
ZachBeta has quit [Quit: Computer has gone to sleep.]
IHateHavingToReg has joined #ruby
IHateHavingToReg has quit [Client Quit]
jeff_sebring has joined #ruby
workmad3 has joined #ruby
shtirlic has quit [Read error: Connection reset by peer]
shtirlic has joined #ruby
locriani has joined #ruby
sam113101 has joined #ruby
krusty_ar has joined #ruby
<matled>
in pry can I access objects from another scope easily? i.e. I'm in some scope and have a variable foo there, then I cd into some other scope and would like to use the object previously available through foo
Shahor has joined #ruby
allanm has joined #ruby
allanm is now known as amacgregor
liluo has joined #ruby
git-svn has joined #ruby
Shahor has quit [Read error: Connection reset by peer]
git-svn has quit [Client Quit]
`brendan has joined #ruby
fantazo has joined #ruby
IrishGringo has quit [Remote host closed the connection]
wangr has joined #ruby
flak has joined #ruby
jonathanwallace has joined #ruby
flak is now known as Guest32125
Kn|t3_ has joined #ruby
jonatha__ has joined #ruby
jonathanwallace has quit [Read error: Connection reset by peer]
rippa has quit [Ping timeout: 240 seconds]
fantazo_ has joined #ruby
Raduwen has joined #ruby
jimmy1980 has joined #ruby
fantazo has quit [Ping timeout: 246 seconds]
Kn|t3 has quit [Ping timeout: 244 seconds]
Kn|t3_ is now known as Kn|t3
mohits has quit [Read error: Connection reset by peer]
zz_chrismcg is now known as chrismcg
horseman has quit [Remote host closed the connection]
Guest32125 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
zinjacoder has quit [Remote host closed the connection]
<arturaz>
line = gets
Bartzy has joined #ruby
Bosma has joined #ruby
zinjacoder has joined #ruby
webusnix has joined #ruby
jenrzzz-mac has joined #ruby
Shrink has quit [Ping timeout: 256 seconds]
schaerli has quit [Remote host closed the connection]
hoelzro|away is now known as hoelzro
gongura has joined #ruby
krz has quit [Quit: krz]
devdazed has quit [Quit: Bye]
lorandi has joined #ruby
nipra has quit [Ping timeout: 265 seconds]
gongura has quit [Client Quit]
devdazed has joined #ruby
a_a_g has quit [Quit: Leaving.]
<apeiros_>
shevy: or $stdin.each_line do |line| …
tcopp has joined #ruby
pwelch__ has joined #ruby
pwelch__ has left #ruby [#ruby]
<vaicine>
Is there a method for returning all variables?
<vaicine>
(for debugging)
cjs226 has quit []
cpruitt has joined #ruby
td123 has joined #ruby
uris has joined #ruby
Shrink has joined #ruby
negaduck has quit [Read error: Connection reset by peer]
negaduck has joined #ruby
ph^__ has quit [Remote host closed the connection]
indian has joined #ruby
ph^ has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
snearch has joined #ruby
ph^ has quit [Ping timeout: 245 seconds]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
axl_ has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
Synthead has quit [Ping timeout: 244 seconds]
macmartine has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
chson has joined #ruby
<arturaz>
vaicine, local_variables
Poapfel has quit [Quit: Need a new quit message? Why not Zoidberg?"]
Poapfel has joined #ruby
mikewintermute has joined #ruby
xaq has joined #ruby
internet_user has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
bbttxu has joined #ruby
bbttxu has quit [Read error: Connection reset by peer]
bruder has joined #ruby
bbttxu has joined #ruby
hashpuppy has joined #ruby
hashpuppy has quit [Changing host]
hashpuppy has joined #ruby
jimmy1980 has quit [Ping timeout: 252 seconds]
<hashpuppy>
is there something shorter, equivalent to [{"name"=>"one"}, {"name" => "two"}].map{|n| n["name"]}
<hashpuppy>
i just want to pluck the names
chimkan has joined #ruby
albemuth has joined #ruby
hunglin has joined #ruby
<workmad3>
hashpuppy: seems pretty short and sweet to me
<hashpuppy>
yeah, but rails has something called .pluck on ActiveRecord. i was just wondering if there was something similar on Array. like, [...].pluck("name")
<hashpuppy>
it's not terrible, right
<workmad3>
no
<hashpuppy>
i mean: right, it's not terrible
<workmad3>
pluck is specifically for SQL queries to do some under-the-hood optimisations :)
<GeekOnCoffee>
there is something shorter, hang on
<GeekOnCoffee>
hmm maybe not in that particular case
AxonetBE has joined #ruby
<AxonetBE>
if there is a function that split a string on a special character when the lenght of the string is bigger then X?
<workmad3>
GeekOnCoffee: you were thinking of the .map(&:method) syntax, right? :)
<GeekOnCoffee>
yup
<vaicine>
Thanks arturaz
<workmad3>
GeekOnCoffee: if he had structs rather than hashes, he could :)
albemuth has quit [Client Quit]
strnx has quit [Excess Flood]
pk1001100011 has quit [Remote host closed the connection]
<sonne>
(which is the one you get from "gem install pgq")
td123 has joined #ruby
jenglish has quit [Remote host closed the connection]
zomgbie has quit [Ping timeout: 244 seconds]
jeff_sebring has joined #ruby
znake has joined #ruby
berserkr has joined #ruby
chetan- has joined #ruby
Targen has quit [Remote host closed the connection]
jenrzzz-mac has joined #ruby
xttyragel has joined #ruby
savage- has joined #ruby
znake has quit [Client Quit]
carloslopes has quit [Ping timeout: 246 seconds]
<chetan->
I'm trying to migrate a project from 1.8.x to 1.9 and rake test keeps crapping out w/o any error. no bug/segfault message or anything. exit code = 0
<chetan->
any ideas for further debugging this?
adeponte has quit [Remote host closed the connection]
mohits has quit [Read error: Connection reset by peer]
mohits has joined #ruby
timonv has quit [Remote host closed the connection]
robotmay has quit [Remote host closed the connection]
bier has quit [Ping timeout: 248 seconds]
MasterIdler has joined #ruby
<magoo>
is there an alternative to carrier-pigeon for irc communication?
Guest20110 has quit [Ping timeout: 265 seconds]
<Sigma00>
sonne: what about DataMapper?
milk has quit [Quit: Page closed]
lambdacurry has quit [Quit: Leaving]
xttyragel has quit [Remote host closed the connection]
ph^ has joined #ruby
proghat has quit [Ping timeout: 245 seconds]
<workmad3>
sonne: RabbitMQ can talk to ActiveMQ I believe
RoboTamer has joined #ruby
<sonne>
Sigma00, AR is fine as an ORM, that's not the problem... the problem is how to use PGQ with it
kvirani has quit [Remote host closed the connection]
<sonne>
workmad3, aye, i noticed that i can just use the stomp gem to communicate with activemq
<sonne>
which works good as plan b, but integrating with pgq would be even better
eywu has joined #ruby
RoboTamer has quit [Remote host closed the connection]
<workmad3>
sonne: hehe :) I love that pgq gem... 'tested on rails 3 only tested' and yet it has a dependency on AR and AS versions 2.3.2...
<workmad3>
sonne: and on top of that, the API (which I assume is the core for interacting with postgres) only actually calls stuff on the connection
davidcelis has joined #ruby
<sonne>
Sigma00, that's where the pgq gem is forked from i believe...
Targen has joined #ruby
<sonne>
workmad3, are you saying that all it does is run a couple custom queries, and i'm better off just using 'pg' and doing it by hand?
senny has quit [Remote host closed the connection]
<workmad3>
sonne: I suspect that what you could do is fork it and rewrite the API class to do that
mapper has joined #ruby
fermion has joined #ruby
<sonne>
workmad3, heh... i'm not that good actually :) i just noticed that in order to connect to a pgq i'm required to create a full blown rails application, which sounds like an overkill
bluenemo has quit [Remote host closed the connection]
apok has quit [Ping timeout: 248 seconds]
apok_ is now known as apok
Vainoharhainen has quit [Quit: Leaving...]
berkes has joined #ruby
Bartzy has joined #ruby
apok has quit [Remote host closed the connection]
jrist is now known as jrist-retro
apok has joined #ruby
jeffreybaird has joined #ruby
fridim_ has joined #ruby
sonne has quit [Quit: Leaving]
brianpWins has joined #ruby
robotmay has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
c0rn_ has joined #ruby
Bartzy|work has joined #ruby
mdw has quit [Remote host closed the connection]
mockra has joined #ruby
vlad_starkov has joined #ruby
kenichi has joined #ruby
mohits has quit [Read error: Connection reset by peer]
kenichi has quit [Remote host closed the connection]
francisfish has joined #ruby
jenrzzz-mac has joined #ruby
Bartzy has quit [Ping timeout: 245 seconds]
ringotwo has joined #ruby
cbuxton has quit [Ping timeout: 245 seconds]
ringotwo has quit [Remote host closed the connection]
ringotwo has joined #ruby
cbuxton has joined #ruby
ringotwo has quit [Remote host closed the connection]
bricker88 has joined #ruby
kenichi has joined #ruby
zomgbie has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
mockra has quit [Remote host closed the connection]
<bricker88>
anybody wanna help me with a regular expression :/ https://gist.github.com/2918772 The example I gave at the bottom did not do it form e
<bricker88>
for me *
mockra has joined #ruby
mengu has joined #ruby
<Sigma00>
don't use regex for xml :|
<_br_>
exactly
<bricker88>
Sigma00: I am doing this in TextMate just to clean it up for myself
<_br_>
bricker88: Take a look at nokogiri
adamkittelson has joined #ruby
<bricker88>
No, I am just trying to remove the comments from a giant wordpress XML dump I was given because I don't care about them and it's doubling the time it takes Nokogiri to parse the file
remmy444 has quit [Ping timeout: 256 seconds]
<Sigma00>
bricker88: use dotall
<Sigma00>
it won't work without the dotall option
<Sigma00>
(makes . match newlines)
<bricker88>
thank you - that must be what I am missing
<Sigma00>
also, #regex exists, just fyi
zomgbie has quit [Ping timeout: 240 seconds]
ringotwo has joined #ruby
davidpk has joined #ruby
<bricker88>
Thanks
Ammar_iD has quit [Quit: Leaving]
brianpWins has quit [Quit: brianpWins]
azm has joined #ruby
mockra has quit [Remote host closed the connection]
hoelzro is now known as hoelzro|away
pk1001100011 has joined #ruby
nateberkopec has joined #ruby
mohits has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
TheFuzzball has joined #ruby
Targen has joined #ruby
<_br_>
Does anyone have segfault issues with 1.9.2 or 1.9.3 and ffi-rzmq ? Weird stuff, runs without problems on my machine, but trying to deploy it segfaults at EC2
hunglin has left #ruby [#ruby]
hemanth has quit [Read error: Connection reset by peer]
<ekaleido>
whats the easiest way to remove "token=" from a string? "token=blah".gsub(/[token=]/, '*') ?
stockholm has quit [Ping timeout: 252 seconds]
<ekaleido>
or is there something easier that im too dumb to see
daniel_hinojosa has joined #ruby
<bricker88>
answer this riddle: `class` is to `klass` as `module` is to `?`
<shevy>
Module
<bricker88>
bzzzzz
<Sigma00>
todule?
<bricker88>
bzzz
<bricker88>
hah
<bricker88>
I don't know really
<bricker88>
:p
<shevy>
noodle!
<bricker88>
ding ding!
<deryl>
i *am* corrct right? youo can *not* reassign what class another class inherits from A) for existing instances and B) unless you edit the main file and reload the classes. I mean its not possible to reassign a class in memory right?
niklasb has joined #ruby
<deryl>
can't class User < ActiveRecord::Base and then later class User < SomeOtherClass
ringotwo has joined #ruby
<shevy>
deryl hmm... not completely sure... perhaps with a super clever magic trick... but with specific code, I would not know. so I am going to say, it is not possible!
<tommylommykins>
ekaleido: I don't think there's anything more concise than that
<deryl>
yeah i thought that if it was possible that would require some hellified convoluted stuff to make sure that existing instances were still stable.
<deryl>
i can only think of nightmare situations if that were allowed.
Stormbytes has joined #ruby
<deryl>
shevy: thanks i just wanted to make sure i hadn't steered someone wrong
strnx has quit [Excess Flood]
<Mon_Ouie>
You can do Foo = Class.new(ANewSuperClass)
ghanima has joined #ruby
Bartzy|work has quit [Ping timeout: 248 seconds]
Juul has quit [Ping timeout: 244 seconds]
rsimoes has left #ruby [#ruby]
strnx has joined #ruby
<deryl>
Mon_Ouie: what does that do to an existing instance of that class that was made before the class's Super was changed?
<Mon_Ouie>
Old instances don't care about what is stored in the Foo constant, only what their reference to their class is
<ekaleido>
so then my next question is how can i take the body of an http post and set it to a variable? the net:http docs arent making sense to me
proghat has quit [Ping timeout: 246 seconds]
<ekaleido>
but im admittedly dense with this
carlyle has joined #ruby
<deryl>
so if Bar = Foo.new ; Foo = Class.new(NewClass> would Bar's class change too?
<deryl>
s/>/)/
<carloslopes>
deryl: no
<deryl>
is this a common usage pattern?
<Mon_Ouie>
No
<deryl>
ok
<deryl>
thanks for the info
flype has joined #ruby
qwerxy has joined #ruby
<deryl>
one last thing, can you name a real world instance where this behaviour would be desirable? (and not just a confused and incorrect implementation of an idea)
<deryl>
not necessary, this part is for me not the person i'm talking with
chienpo has joined #ruby
<deryl>
i personally cant think of one only becaue i'm approaching it that you want to know the implementation of the model (class) at all times and for it to stay uniform throughout app execution.
hasrb has quit [Remote host closed the connection]
cousine has joined #ruby
<Mon_Ouie>
All I can think of, is that it would be pretty weird if objects kept the constant name instead of an actual reference to the class
<tommylommykins>
ekaleido: if you only want the part after the equals, you could do str[/(?<=token8).*$/]
<Mon_Ouie>
What would happen if the class wasn't stored in a constant in the first place?
<tommylommykins>
token=
* tommylommykins
<3 indexing strings with reguar expressions
<tommylommykins>
best feature of Ruby ever :D
pu22l3r has quit [Ping timeout: 245 seconds]
<deryl>
Mon_Ouie: err? I'm not thinking constants here. just the class (klass isn't it?()
cbuxton has quit [Quit: Leaving.]
<deryl>
Mon_Ouie: think I'm confused because I'm not sure what you mean by the constant.
<shevy>
hmm
pu22l3r has joined #ruby
<shevy>
class Foo <--- Foo is a constant
<deryl>
ohhh
<deryl>
duh! :)
<deryl>
sorry, totally missed that fact. was sitting thinking what the hell does he mean?
<shevy>
my idea was simple... change .ancestors, like insert or rather inject a new class (constant) into that chain... but apparently this does not work at all :(
<shevy>
there was however evil.rb once
<shevy>
it allowed you to unfreeze objects etc... lots of crazy things
<deryl>
thats cool. i don't want to advocate something that is just pure GUH or shouldn't be done. i've never tried to do what was being asked but was pretty sure that it would cause issues if it was done in the first place. figured i'd check
<shevy>
oh flgr, that is the original author too actually :)
<deryl>
i'm cool with being wrong as long as i learn why :) glad i wasn't though
sei has quit [Quit: It's too late. You've awakened the gazebo. It catches and eats you.]
horseman has joined #ruby
kvirani has joined #ruby
flype has quit [Quit: Computer has gone to sleep.]
pashamur_ has joined #ruby
ilyam has joined #ruby
flype has joined #ruby
<Sigma00>
interesting protocol you have there :P
kvirani has quit [Remote host closed the connection]
tayy has joined #ruby
Kunda has quit [Read error: Connection reset by peer]
<shadoi>
The Ta-Ta Protocol.
mapper has quit [Ping timeout: 245 seconds]
Kunda has joined #ruby
kvirani has joined #ruby
crankycoder has quit [Remote host closed the connection]
<null->
ruby is not web scale
stephenjudkins has quit [Quit: stephenjudkins]
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
akem_ has joined #ruby
mdw has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<Boohbah>
null-: tell that to twitter, scribd, penny arcade, pitchfork, github, hulu, urbandictionary, and yellowpages.com
Bosma has quit [Ping timeout: 248 seconds]
fmcgeough has quit [Quit: fmcgeough]
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
lwhalen has joined #ruby
tilde` has joined #ruby
<lwhalen>
hey all, is there a way to make a Hash.each loop output the keys in the same order each time?
Synthead has joined #ruby
<horseman>
lwhalen: in 1.9 it should do that
<lwhalen>
well shucks
<lwhalen>
any way to make it happen in 1.8?
cousine has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 244 seconds]
<horseman>
lwhalen: who cares about 1.8 :)
* lwhalen
raises hand
EvanR has quit [Read error: Connection reset by peer]
EvanR has joined #ruby
pashamur_ has quit [Ping timeout: 244 seconds]
pu22l3r_ has joined #ruby
<horseman>
lwhalen: but i guess you could do this: hash.keys.sort.each { |v| hash[v] ... }
<lwhalen>
I've got a couple hundred CentOS servers running Puppet and various Rails apps on Ruby Enterprise Edition, that I can't just go and upgrade willy-nilly :-p
EvanR is now known as Guest27496
<lwhalen>
I'll give that a shot, thank you!
zommi has joined #ruby
<null->
Boohbah: twitter is the one that said that
DarthGandalf has joined #ruby
mdw has joined #ruby
<Boohbah>
null-: they still use rails for the frontend
<null->
I'm just learning ruby and never used rails, how is so much people use rails without knowing ruby?
<Boohbah>
i don't know, but learning ruby first is a good idea
d3c has joined #ruby
<null->
I guess rails does so much stuff for you that no programming is needed in many cases
<LiquidInsect>
null-: In my experience too many
<LiquidInsect>
and it's fristrating to work with Ruby when you treat it like interpreted Java
<LiquidInsect>
frustrating, that is
<null->
LiquidInsect: what do you mean?
<shevy>
LiquidInsect well, rails is colossal
<shevy>
give a few more years and it'll be its own language :P
<shadoi>
Rails used to be a great way to learn Ruby, but now ...
<shevy>
null- I wrote in PHP for about 2 years, then wanted a better language. I decided to choose between python and ruby. that was even before rails
<Boohbah>
but now it's all nested hashes
<Boohbah>
:D
crankycoder has joined #ruby
<LiquidInsect>
null-: I mean, you CAN make a Rails app while not totally understanding how powerful Ruby is
looopy has joined #ruby
krusty_ar has quit [Ping timeout: 240 seconds]
<LiquidInsect>
and when you see people taking the long road to do something that can be done in a single well-understandable line because they don't grok Enumerable, it just... make me wish they had taken the time to understand the underlying language and not just the framework
looopy has quit [Remote host closed the connection]
<Boohbah>
i like to use ruby for things that i would have done in perl or bash, simple shell scripts
zomgbie has joined #ruby
krusty_ar has joined #ruby
<shevy>
LiquidInsect ruby as a language is actually not that simple
hadees has joined #ruby
hadees has quit [Remote host closed the connection]
<shevy>
yeah Boohbah. I dont use shell scripts anymore. I tend to put ruby code into files, and call this from the commandline. for instance:
tatsuya_o has joined #ruby
koskoz has joined #ruby
<shevy>
one alias I have is for "ruby -r $RUBY_STD/custom_methods.rb -r $RUBY_STD/std_modules.rb -e "
Guest27496 is now known as EvanR
EvanR has quit [Changing host]
EvanR has joined #ruby
<shevy>
"rinvoke install_flash" for instance installs flash
<shevy>
rinvoke <name_of_method>
<shevy>
and that file pulls in other classes I use
korishev has quit [Quit: korishev]
<Boohbah>
null-: you should definitely learn all the Enumerable methods
uris has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 240 seconds]
korishev has joined #ruby
<LiquidInsect>
shevy: I didn't say it was simple
<LiquidInsect>
I said it was powerful
ghanima has quit [Ping timeout: 244 seconds]
<shevy>
well you wrote "taking the long road" - it is not Enumerable alone. there are so many concepts in ruby that a newcomer would have to understand
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has joined #ruby
<makkura>
LiquidInsect: Totally agreed [ referring to almost_sinatra ]. I believe in code that is reasonably readable and understandable by other coders with some experience. almost_sinatra is the inverse of that ^^;
<makkura>
Heck it sounds almost trollish: 'don't include tests. tests just bloat the code base. just commit, the users will complain if you break anything.'
<steveruby>
sorry I'll post that in a minute, in the meantime, error I am getting is: /usr/lib/ruby/1.9.1/net/http.rb:799:in `connect': SSL_connect returned=1 errno=0 state=unknown state: tlsv1 alert internal error (OpenSSL::SSL::SSLError)
tatsuya_o has quit [Remote host closed the connection]
fbernier has quit [Read error: Operation timed out]
iamjarvo1 has quit [Ping timeout: 244 seconds]
fayimora has joined #ruby
IrishGringo has quit [Ping timeout: 244 seconds]
stephenjudkins has joined #ruby
wallerdev has joined #ruby
Guest20110 has joined #ruby
pashamur_ has quit [Quit: Konversation terminated!]
Juul has quit [Ping timeout: 244 seconds]
mengu has joined #ruby
pashamur_ has joined #ruby
Kunda has left #ruby [#ruby]
DavidTiger|afk is now known as DavidTiger
tatsuya_o has joined #ruby
invictus1 has quit [Read error: Connection reset by peer]
dcorbin has joined #ruby
dcorbin has quit [Changing host]
dcorbin has joined #ruby
cespare has joined #ruby
alexander-- has joined #ruby
alexander-- has quit [Client Quit]
kvirani has joined #ruby
carloslopes has quit [Quit: Leaving]
falkoner has left #ruby [#ruby]
korishev has quit [Quit: korishev]
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has joined #ruby
korishev has joined #ruby
Morkel has joined #ruby
TheFuzzball has joined #ruby
bglusman has quit [Remote host closed the connection]
fragrant has joined #ruby
williamcotton_ has joined #ruby
<bricker88>
in Rails… Shouldn't I be able to to this from a file in /lib, if that model is also defined in the regular spot? https://gist.github.com/2920029
williamcotton has quit [Ping timeout: 244 seconds]
williamcotton_ is now known as williamcotton
<bricker88>
it just doesn't add those accessor methods like I'm hoping it would
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has joined #ruby
geekbri has quit [Remote host closed the connection]
pu22l3r_ has quit [Ping timeout: 248 seconds]
<nobitanobi>
bricker88: I see strftime formats a Date to a specific format, but frome the unix timestamp string I need to create a Date. Can't I just create that Date with the format directly? I am creating it with strptime
libertyp1ime has joined #ruby
schaerli has quit [Remote host closed the connection]
sernin has quit [Quit: Lost terminal]
sernin has joined #ruby
dcope has quit [Changing host]
dcope has joined #ruby
<bricker88>
nobitanobi: You can try Time.at, and then use strftime on its outpit
<bricker88>
output*
fantazo has joined #ruby
pashamur_ has quit [Read error: Connection reset by peer]
bluenemo has quit [Read error: Operation timed out]
pashamur_ has joined #ruby
libertyprime has quit [Quit: Lost terminal]
fragrant has left #ruby [#ruby]
libertyp1ime has quit [Client Quit]
libertyprime has joined #ruby
AxonetBE has quit [Quit: Leaving.]
blacktulip has quit [Remote host closed the connection]
iamjarvo1 has joined #ruby
<shadoi>
nobitanobi: do you just ask that question every day or what? ;)
<shadoi>
deja-vu
goraxe has quit [Ping timeout: 245 seconds]
<nobitanobi>
shadoi: it seems so, but it was a different question.
<shadoi>
Date.strptime(timestamp, '%Y%m%d')
t0mmyvyo has joined #ruby
<nobitanobi>
DateTime.strptime('13341888000','%Y%m%d') — ArgumentError: invalid date
<shadoi>
Ah, that's epoch
<shadoi>
use Time.at like he said
<nobitanobi>
ok
<nobitanobi>
thanks.
rsenk330 has joined #ruby
rsenk330 has quit [Remote host closed the connection]
horseman has quit [Read error: Connection reset by peer]
horseman has joined #ruby
Vendethiel has joined #ruby
Juul has joined #ruby
libertyprime has quit [Quit: Lost terminal]
rizzylt has joined #ruby
borys_b_timakov has joined #ruby
koskoz has quit [Ping timeout: 248 seconds]
noganex has quit [Read error: Connection reset by peer]
fmcgeough has joined #ruby
suborbital has joined #ruby
pyoor has joined #ruby
itnomad has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
pashamur_ has quit [Quit: Konversation terminated!]
pashamur_ has joined #ruby
<pyoor>
Hi all. Can anyone explain to me why file.expand_path replaces "\" with "/"
libertyprime has joined #ruby
zommi has quit [Remote host closed the connection]
cj3kim has quit [Quit: This computer has gone to sleep]
<shevy>
pyoor I think expand_path believes that "\" are improper when making path-objects
<shevy>
afaik only windows uses "\" for their paths
noganex has joined #ruby
banghouseAFK is now known as banghouse
roams has quit [Ping timeout: 246 seconds]
<pyoor>
shevy: Windows does only accept \ as a path. I'm having an issue working with someone elses code. The path get's defined as work_dir=C:\\foo\\bar but for some reason when work_dir is called later it's called as C:/foo/bar
<pyoor>
Any clue what might cause this?
<shevy>
I am quite sure that / works fine on windows with ruby
<pyoor>
Btw, I'm a complete noob when it comes to ruby
<Vendethiel>
Windows perfectly accepts /
<pyoor>
shevy: It won't in Windows XP SP3. I have an app that accepts a file as a command line argument. Doing foo.exe C:\foo\bar.txt --works
ZachBeta has joined #ruby
<Vendethiel>
I use it everyday with ruby and many others langages and I've never seen one single time this being a problem
<deryl>
so long as its a path object. doens't like it outside of ruby
<pyoor>
Doing foo.exe C:/foo/bar.txt fails
<shevy>
sorry, my scripts work fine on windows pyoor, I can not verify your statement that only \ will work
<shevy>
what even is foo.exe
<shevy>
that does not seem to belong to ruby
<pyoor>
well actually in this case foo = Quicktimeplayer.exe
muse has quit [Ping timeout: 245 seconds]
<pyoor>
I'm calling an executable from within ruby
<Vendethiel>
that's really surprising, I have executable calls from ruby like that and I've never had any problem :/
<shadoi>
File::SEPARATOR is what's used.
<korishev>
pyoor: if used inside ruby, the "/" works fine on windows (Ruby handles it internally). Is the code shelling out and trying to use a string created by File.expand_path ?
muse has joined #ruby
<shevy>
system 'quicktimeplayer bla.avi' should work fine in ruby scripts, it is quite how I use mplayer on windows with ruby scripts
<pyoor>
korishev: yes
<pyoor>
shevy: In this case I have to provide the full path to the file.
eywu has quit [Ping timeout: 256 seconds]
PaciFisT1 has quit [Quit: Leaving.]
beneggett has joined #ruby
<shevy>
system 'mplayer /your/happy/superavi.avi' :)
<workmad3>
besides, the concerns are autoload with threads... if you're spawning threads before your bundler setup I'd say you're doing it wrong :)
<shevy>
what is the alternative to autoload?
[Neurotic] has joined #ruby
steveruby has quit [Ping timeout: 256 seconds]
ghanima has quit [Quit: Leaving.]
<shevy>
I mean if matz wants to kill it
<workmad3>
hmm, explicit requires?
billiamii has quit []
xnm has joined #ruby
td123 has joined #ruby
<horseman>
autoload constants have really weird interactions with const_define? and const_get iirc, really confusing and broke some introspection code. I think the only way to deal properly with it was to rescue exceptions or so
<horseman>
const_defined?
virunga has joined #ruby
uris has quit [Quit: leaving]
Natch has joined #ruby
yannis has quit [Quit: yannis]
davidcelis has joined #ruby
wvms has joined #ruby
Natch| has quit [Ping timeout: 244 seconds]
Natch is now known as Natch|
pixelsnbits has joined #ruby
dr_diamond has joined #ruby
dr_diamond has joined #ruby
dr_diamond has quit [Changing host]
eywu has joined #ruby
xiaotian has joined #ruby
gregorg has quit [Ping timeout: 245 seconds]
pashamur_ has quit [Quit: Konversation terminated!]
Progster has quit [Ping timeout: 244 seconds]
pashamur_ has joined #ruby
griffindy has joined #ruby
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
Criztian has quit [Remote host closed the connection]
IHateHavingToReg has quit [K-Lined]
falkoner1 has joined #ruby
falkoner1 has left #ruby [#ruby]
cpruitt has quit [Quit: cpruitt]
headius has quit [Quit: headius]
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
Beoran4 has quit [Ping timeout: 245 seconds]
pashamur_ has quit [Client Quit]
bglusman has joined #ruby
pashamur_ has joined #ruby
<xiaotian>
beneggett, it doesn't even mention "content_tag" at all.
xaq has quit [Read error: Connection reset by peer]
xaq has joined #ruby
pashamur_ has quit [Client Quit]
ghanima has joined #ruby
pashamur_ has joined #ruby
<shevy>
screw that going to bed, youtube fail bloopers are more fun
pixelsnbits has quit [Ping timeout: 265 seconds]
pashamur_ has quit [Client Quit]
bigoldrock has quit [Quit: Leaving.]
pashamur_ has joined #ruby
mockra has quit [Remote host closed the connection]
banseljaj is now known as imami|afk
hadees has joined #ruby
adamkittelson has quit [Remote host closed the connection]
hunglin has quit [Ping timeout: 244 seconds]
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
bglusman has quit [Remote host closed the connection]
saschagehlich has quit [Quit: saschagehlich]
<shadoi>
if you want lazy require you can use a proc
<shadoi>
It's still nasty though
IrishGringo has joined #ruby
mockra has joined #ruby
ghanima has quit [Quit: Leaving.]
davidpk has joined #ruby
cjs226 has quit []
looopy has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
itnomad has joined #ruby
pashamur_ has quit [Client Quit]
jrist is now known as jrist-afk
pashamur_ has joined #ruby
<shevy>
dunno, right now I am ripping away class after class, and putting in requires in every .rb file only when I need them
<shevy>
it is very slow but so far quite simple
<shadoi>
that's generally the way you're supposed to do it anyway. :)
xnm has quit [Read error: Connection reset by peer]
bigoldrock has joined #ruby
sepp2k1 has quit [Remote host closed the connection]
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
Beoran4 has joined #ruby
ZachBeta has joined #ruby
null- has left #ruby [#ruby]
Siphonblast has joined #ruby
ZachBeta has quit [Client Quit]
tilde`_ has joined #ruby
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
looopy has joined #ruby
ghanima has joined #ruby
xnm has joined #ruby
ZachBeta has joined #ruby
trend has joined #ruby
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
dr_diamond has quit [Quit: Quitte]
tilde` has quit [Ping timeout: 256 seconds]
Progster has joined #ruby
Karmaon has quit [Quit: WeeChat 0.3.8-rc2]
mengu has quit [Read error: Operation timed out]
virunga has quit [Quit: Sto andando via]
the_jeebster has quit [Quit: Leaving.]
tilde`_ has quit [Ping timeout: 244 seconds]
tilde` has joined #ruby
c0rn_ has joined #ruby
robotmay has quit [Remote host closed the connection]
chico_chicote has joined #ruby
pashamur_ has quit [Client Quit]
albemuth has joined #ruby
pashamur_ has joined #ruby
<shevy>
yeah
albemuth has quit [Client Quit]
<shevy>
oh well
<shevy>
after I'll have finished with this, there is another project that will require the same
eywu has quit [Quit: Leaving.]
ZachBeta has quit [Quit: Computer has gone to sleep.]
eywu has joined #ruby
thatRD has joined #ruby
rizzylt has joined #ruby
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
Natch| has quit [Read error: Connection reset by peer]
<shevy>
this is so annoying
<shevy>
lib/ruby/site_ruby/1.9.1/mp3info/id3v2.rb:222: warning: assigned but unused variable - experimental
pashamur_ has quit [Quit: Konversation terminated!]
<shadoi>
hehe
pashamur_ has joined #ruby
<rking>
I meant gem() { command gem… }, but I don't think that would work well with rvm.
<rking>
I personally am back on rbenv, but I'm trying to write all my stuff as broadly as possible.
explody has joined #ruby
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
<rking>
Tough call.
<rking>
On the one hand, I imagine users of this config would be surprised to find that the docs got turned off by default.
<rking>
I can easily provide a ",gem" function (as is my custom for this project, to make ",foo"), but I don't know how to give them the hint that it was in use.
macmartine has quit [Quit: macmartine]
<rking>
Or I could just say screw rvm.
fserb has joined #ruby
<shevy>
:)
<rking>
I think I'll not mess with ~/.gemrc and make ,gem do the --no-ri --no-rdoc inside itself.
mayankkohaley has quit [Ping timeout: 244 seconds]
pashamur_ has quit [Client Quit]
pashamur_ has joined #ruby
fayimora has joined #ruby
pashamur_ has quit [Client Quit]
looopy has quit [Remote host closed the connection]
xnm has quit [Read error: Connection reset by peer]
pashamur_ has joined #ruby
liluo has joined #ruby
oooPaul has quit [Quit: Ciao for now!]
<shadoi>
.gemrc is useful for lots of other things too though
mccauley has joined #ruby
seanstickle has joined #ruby
<rking>
shadoi: What else do you put in it?
davidcelis has quit [Ping timeout: 252 seconds]
greyEAX has joined #ruby
looopy has joined #ruby
<rking>
BTW it's not as simple as wrapping as: gem --no-ri --no-rdoc "$@" -- it expects it after the 'install', e.g.: gem install --no-ri --no-rdoc
<shadoi>
It's better to make a class method to list attributes that you want to create accessors for
<shadoi>
then you can just call that method, iterate and use the accessors.
<rking>
Hrm, the 'json' gem actually refuses to dump objects.
Markvilla has quit [Quit: Markvilla]
<shadoi>
rking: yeah you have to override the to_json method
pashamur_ has quit [Client Quit]
<bricker88>
rking: You're right, I think the problem is if the object doesn't have a to_json method. All I know is that I had issues with json/ flash hash in Rails
nfk has quit [Quit: yawn]
pashamur_ has joined #ruby
<rking>
shadoi: Right. Then the only tool available to it that point is a Hash.
iocor has quit [Quit: Computer has gone to sleep.]
<rking>
That's where JSYNC comes in, assuming actual YAML isn't avialable.
<rking>
Hehe:
<rking>
puts JSON.dump({'a' => 1, a: 2})
<rking>
{"a":1,"a":2}
qwerxy has quit [Quit: offski]
<shadoi>
if you want real object serialization you need to tell it what class to map it to
ZachBeta has quit [Quit: Computer has gone to sleep.]
<shadoi>
but.. in my experience it's kind of a rabbit hole, because it doesn't work on all objects.
<rking>
AFAIK JSYNC round-trips fine.
<rking>
I'm not sure if it's worth writing the jsync gem or not.
<rking>
It'd only take an afternoon.
<shadoi>
throw a Proc at it :)
minijupe has joined #ruby
<rking>
Hrm, wait, I'll have to see what jsync.js does for that one…
pashamur_ has quit [Read error: Connection reset by peer]
rdctnst has joined #ruby
<shadoi>
If it works, I have a BUNCH of uses for it.
pashamur_ has joined #ruby
<shadoi>
My state machines would be so much simpler to serialize....