<hardeep>
well I have a configuration object that is to be represented as an xml document, I need to compare this object with itself to check if it has changed
tds has quit [Quit: tds]
<hardeep>
my original idea was to serialize it and just compute a hash on it to determine if it's changed
jwg2s has quit [Quit: jwg2s]
tommyvyo has joined #ruby
ckrailo has quit [Quit: Computer has gone to sleep.]
<stephenjudkins>
why don't just test for equality in Ruby itself?
<hardeep>
however obviously as I figured out REXML stores attributes in a hash
erichmenge has quit [Quit: erichmenge]
<hardeep>
how would you propose that? sorry I'm still a bit new to ruby
wallerdev has quit [Quit: wallerdev]
benson has quit [Quit: Leaving]
<hardeep>
I would like to avoid checking properties in a linear == fashion
btanaka has quit [Remote host closed the connection]
wallerdev has joined #ruby
<stephenjudkins>
and you instead would like to generate a big text blob in a linear fashion?
<stephenjudkins>
i would override == for whatever class represents your configuration
cantonic has joined #ruby
jarray52 has left #ruby [#ruby]
nari has quit [Ping timeout: 246 seconds]
thone has quit [Quit: Lost terminal]
niku4i has joined #ruby
r0bby has joined #ruby
<hardeep>
alright thanks I will take that into consideration
mpereira has joined #ruby
burgestrand has quit [Quit: Leaving.]
hardeep has quit [Quit: Page closed]
joshman_ has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
kenperkins has quit [Ping timeout: 240 seconds]
jmccune has quit [Ping timeout: 245 seconds]
beneggett has quit [Ping timeout: 248 seconds]
rails has quit [Ping timeout: 272 seconds]
jodell has quit [Ping timeout: 264 seconds]
angelixd has quit [Ping timeout: 245 seconds]
dankest has joined #ruby
vjt has quit [Ping timeout: 272 seconds]
_alejo_ has joined #ruby
Ontolog has joined #ruby
vjt has joined #ruby
angelixd has joined #ruby
fabrice31 has quit [Ping timeout: 264 seconds]
jodell has joined #ruby
subbyyy has joined #ruby
fabrice31 has joined #ruby
subbyyy has quit [Max SendQ exceeded]
hydrozen has joined #ruby
beneggett has joined #ruby
freeayu has joined #ruby
subbyyy has joined #ruby
Ontolog has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
cpruitt_ has joined #ruby
rails has joined #ruby
niku4i has quit [Read error: Connection reset by peer]
niku4i has joined #ruby
steggy has joined #ruby
jonathanwallace has joined #ruby
<bricker88>
What would you use to turn a string of HTML attributes into a hash?
alejo_ has quit [Ping timeout: 245 seconds]
vitoravelino is now known as vitoravelino`afk
jonathanwallace has quit [Remote host closed the connection]
pk1001100011 has quit [Ping timeout: 248 seconds]
jmccune has joined #ruby
xaq has quit [Remote host closed the connection]
williamcotton has quit [Quit: williamcotton]
<steggy>
So, I'm trying to prove to myself that monitor + synchronized will actually synchronize on a method, but when i call it with the classic example of a counter and two threads, I can't seem to get the unsynchronized method to produce a "wrong" count number. Any idea why that might be?
<davidcelis>
what does the string look like
staunch has joined #ruby
danielvdotcom has quit [Quit: i sleep.]
_alejo_ has quit [Ping timeout: 245 seconds]
scastillo has joined #ruby
pk1001100011 has joined #ruby
verto is now known as verto|off
<staunch>
anyone got any good irc to github integrations tech?
<staunch>
looking to join / create a proj
<davidcelis>
staunch: not sure what you mean
Tricks has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
thone has joined #ruby
<staunch>
davidcelis: looking to have better integration with GH, post commits to irc, create issues from irvc
c0rn_ has quit [Quit: Computer has gone to sleep.]
<staunch>
post comments on issues to irc
<staunch>
use irc as like a project hub
<davidcelis>
staunch: check out hubot, there's an IRC adapter
niku4i has quit [Remote host closed the connection]
hydrozen has quit [Ping timeout: 244 seconds]
niku4i has joined #ruby
hydrozen has joined #ruby
vitor-br has joined #ruby
<shevy>
alright... I got a project with several different classes.
<shevy>
there are some configure switches... to switch between debug mode. or to use simulation mode (only show what we do, dont make any real modifications in this mode)
<shevy>
the old way how I solved this was to subclass from one base class
niku4i has quit [Ping timeout: 252 seconds]
conor_ireland has quit [Quit: slán]
<shevy>
hmmm never mind. I am going to toggle this via yaml files
td123 has joined #ruby
dankest has quit [Quit: Leaving...]
Chryson has joined #ruby
hydrozen has quit [Ping timeout: 265 seconds]
dankest has joined #ruby
liluo has quit [Remote host closed the connection]
ryan0x2 has quit [Remote host closed the connection]
khakimov has joined #ruby
sailias has quit [Quit: Leaving.]
banisterfiend` has quit [Remote host closed the connection]
banisterfiend has joined #ruby
sailias has joined #ruby
artm has quit [Quit: artm]
airbrush has joined #ruby
mxbtt has joined #ruby
ringotwo has quit [Remote host closed the connection]
Targen_ has quit [Ping timeout: 245 seconds]
thone has quit [Quit: leaving]
anothervenue has quit [Quit: WeeChat 0.3.8]
thone has joined #ruby
sailias has quit [Client Quit]
banisterfiend has quit [Ping timeout: 244 seconds]
mxbtt has quit [Quit: mxbtt]
mxbtt has joined #ruby
banisterfiend has joined #ruby
dev_ryan70 has joined #ruby
dankest has quit [Quit: Leaving...]
havenn has joined #ruby
r0bby_ is now known as robbyoconnor
jonathanwallace has joined #ruby
havenn has quit [Remote host closed the connection]
sdwrage has quit [Quit: geekli.st/programmer]
scastillo has quit [Quit: scastillo]
fermion has joined #ruby
cpruitt_ has quit [Quit: cpruitt_]
williamcotton has joined #ruby
fgwaegeawgfwa has quit []
blazes816 has quit [Quit: Leaving]
dev_ryan70 has quit [Remote host closed the connection]
havenn has joined #ruby
Ontolog has quit [Remote host closed the connection]
scastillo has joined #ruby
Ontolog has joined #ruby
iamjarvo has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
td123 has quit [Quit: WeeChat 0.3.8]
banisterfiend has joined #ruby
dev_ryan70 has joined #ruby
RubyPanther has joined #ruby
Ontolog has quit [Ping timeout: 248 seconds]
<airbrush>
wow, a lot of coming and going round here :P
Speed has joined #ruby
kenperkins has joined #ruby
ngoldman has quit []
Speed has left #ruby ["Leaving channel."]
cakehero has joined #ruby
scastillo has quit [Quit: scastillo]
pk1001100011 has quit [Ping timeout: 264 seconds]
cherrypeel has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
airbrush has left #ruby [#ruby]
dnyy has quit [Remote host closed the connection]
aroman has quit [Quit: aroman]
Quadlex has joined #ruby
Zolrath has quit [Read error: Connection reset by peer]
savage- has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
Yugo has quit [Read error: Connection reset by peer]
Zolrath has joined #ruby
mrsolo has quit [Quit: Leaving]
aroman has joined #ruby
dnyy has joined #ruby
reuf has quit [Ping timeout: 265 seconds]
jarred has quit [Quit: jarred]
univers has joined #ruby
mxbtt has quit [Quit: mxbtt]
gtuckerkellogg has joined #ruby
fermion has quit [Quit: Computer has gone to sleep.]
graft has quit [Quit: leaving]
maletor has quit [Quit: Computer has gone to sleep.]
conor_ireland has joined #ruby
vitoravelino`afk is now known as vitoravelino
khakimov has quit [Quit: Computer has gone to sleep.]
conor_ireland is now known as conor
fantazo has joined #ruby
nari has joined #ruby
conor is now known as Guest46476
chson has joined #ruby
Guest46476 is now known as conor_ireland
vitor-br has quit [Quit: Saindo]
s0ber has quit [Remote host closed the connection]
s0ber has joined #ruby
jsilver has quit [Remote host closed the connection]
KensoDev has quit [Remote host closed the connection]
Ontolog has joined #ruby
dv310p3r has joined #ruby
Targen has joined #ruby
Z_Mass has joined #ruby
MissionCritical has quit [Write error: Broken pipe]
havenn has quit [Read error: Connection reset by peer]
Z_Mass has quit [Read error: Connection reset by peer]
mickn has joined #ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
chrxn has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 245 seconds]
conor_ireland has quit [Quit: conor_ireland]
Tomasso has joined #ruby
jarjar_prime has quit [Quit: Ready? Set? Go!]
conor_ireland has joined #ruby
Tricks has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
robozahn has quit [Ping timeout: 265 seconds]
<bricker88>
Can anybody explain why, when using $1 and $1 in a gsub block, they turn nil after using one of them? It seems that way… example: https://gist.github.com/3087444
mpereira has quit [Ping timeout: 250 seconds]
Mission-Critical has joined #ruby
<mdszy>
bricker88: I think it's because .split changes them?
<mdszy>
becuase it uses a regex
<bricker88>
ah-hah, I think you are right
tommyvyo has joined #ruby
<bricker88>
thanks!
krz has quit [Client Quit]
<mdszy>
bricker88: no problem!
mucker has quit [Ping timeout: 245 seconds]
<bricker88>
bingo! Thanks again.
<mdszy>
no problem!
adamkittelson has joined #ruby
mengu has quit [Remote host closed the connection]
chienpo has left #ruby [#ruby]
savage- has joined #ruby
aroman has quit [Quit: aroman]
Spooner has quit [Ping timeout: 245 seconds]
Tricks has joined #ruby
Ionic` has quit [Ping timeout: 240 seconds]
Caius has quit [Ping timeout: 252 seconds]
Mission-Critical is now known as MissionCritical
Araxia has quit [Quit: Araxia]
tds has joined #ruby
cherrypeel has quit [Ping timeout: 248 seconds]
tds has quit [Client Quit]
Caius has joined #ruby
adamkittelson has quit [Remote host closed the connection]
mikatalk has joined #ruby
<mikatalk>
#Hi ruby crew!
<mdszy>
Hihi
<mikatalk>
does anybody know how to write data to a named pipe from a ruby script? :)
<mikatalk>
instead of STDOUT.write...
<mdszy>
Unfortunately, I don't. It'd probably help if I knew what a named pipe was!
<mdszy>
ohhh
<mikatalk>
check it out it s fun
<mdszy>
a fifo
<mikatalk>
en.wikipedia.org/wiki/Named_pipe
<mdszy>
mikatalk: Looking at that right now XD
<mdszy>
try `ruby script.rb > fifo`?
<mikatalk>
aaaaah
<mikatalk>
i ll try that, makes sense, thanks
billiamii has joined #ruby
Z_Mass has joined #ruby
sdwrage has joined #ruby
krz has joined #ruby
yoklov has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
enroxorz has joined #ruby
dhruvasagar has joined #ruby
adamkittelson has joined #ruby
cherrypeel has joined #ruby
Rizzle has quit [Ping timeout: 245 seconds]
<mikatalk>
hm it actually returns error
<mikatalk>
#2002: Operation attempted on invalid socket.
Rizzle has joined #ruby
<mdszy>
huh
kah_ has joined #ruby
<mikatalk>
i get the error in flash fyi
<banisterfiend>
mikatalk: why do you call yourself mikatalk when you're not talking, but typing?
<mdszy>
mikatalk: flash?
<mikatalk>
if i run the script by itself it works fine, but of course i m not piping it anymore...
apok_ has joined #ruby
<mdszy>
as in Adobe Flash?
<mikatalk>
yeah i rendering flash frames to video :) don t judge common
<mdszy>
ahh
<mdszy>
I wasn't going to judge :P
<mdszy>
I just don't know anything about flash!
<mikatalk>
haha basically i m sending each frames via tcp
<mikatalk>
and would like to forward that in a named pipe
dev_ryan70 has quit [Remote host closed the connection]
<mikatalk>
since flash won t allow me to talk to fifo directly
hunglin has joined #ruby
<mikatalk>
right now my ruby server STDOUT.write(frame) and STDOUT.flush
<mikatalk>
but i would need that to go to a fifo but I don t know anything about named pipes and ruby :) heeelp please
enroxorz has quit [Quit: Ex-Chat]
andrewhl has joined #ruby
adamkittelson has quit [Remote host closed the connection]
apok has quit [Ping timeout: 245 seconds]
<billiamii>
Is there a way to get keypress events in a ruby console app? I'm looking for a middle ground between puts/gets and ncurses
apok_ has quit [Ping timeout: 244 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
sepp2k1 has quit [Remote host closed the connection]
<bricker88>
Is there a shorthand way of accessing an eigenclass besides class << instance ?
<bricker88>
something I can do on one line / without semicolons
jsilver has joined #ruby
JackHind has joined #ruby
<banisterfiend>
bricker88: singleton_class
<banisterfiend>
bricker88: what ruby version are you on?
<bricker88>
193
<bricker88>
1.9.3
<banisterfiend>
bricker88: then use obj.singleton_class
<bricker88>
cool, thanks!
scastillo has joined #ruby
yonggu has joined #ruby
mpereira has joined #ruby
mickn has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
AndChat| has quit [Ping timeout: 264 seconds]
bradhe has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
hunglin has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
Asher has quit [Quit: Leaving.]
Jaxel has quit [Read error: No route to host]
bricker88 has quit [Quit: Leaving.]
shadoi has joined #ruby
noganex has quit [Ping timeout: 246 seconds]
noganex has joined #ruby
noyb has joined #ruby
xaq has joined #ruby
fivetwentysix has joined #ruby
lkba has joined #ruby
Asher has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
mpereira has quit [Ping timeout: 244 seconds]
hunglin has joined #ruby
daniel_hinojosa has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
adamkittelson has joined #ruby
brahmadpk has quit [Quit: brahmadpk]
mikatalk has quit [Quit: Page closed]
igotnolegs has joined #ruby
JackHind is now known as tiripamwe
eywu has quit [Quit: Leaving.]
xbayrockx has quit []
Ontolog has quit [Remote host closed the connection]
xbayrockx has joined #ruby
Ontolog has joined #ruby
cakehero has quit [Quit: Leaving...]
banisterfiend has quit [Ping timeout: 244 seconds]
zodiac1111 has joined #ruby
dev_ryan70 has joined #ruby
zrail has joined #ruby
Ontolog has quit [Ping timeout: 245 seconds]
<zrail>
Is there any known circumstance where ruby would keep a file open even after an explicit call to close()?
aroman has joined #ruby
<zrail>
i'm seeing this happen and i don't know how to stop it
steggy has quit [Ping timeout: 244 seconds]
jgrevich has joined #ruby
dev_ryan70 has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
aroman has quit [Read error: Connection reset by peer]
aroman_ has joined #ruby
banisterfiend has joined #ruby
jjang has quit [Ping timeout: 265 seconds]
davidpk has quit [Quit: Computer has gone to sleep.]
ledao has quit [Quit: Leaving.]
Tomasso has joined #ruby
<offby1>
maybe another thread has the same file open
<offby1>
how do you know it's still open?
Kevin_Owocki has joined #ruby
<Kevin_Owocki>
hey anyone good with sys config? i'm trying to install postgres gem and having some issues
<offby1>
or ... maybe the call to 'close' failed, but I assume it'd raise an exception in that case (and I can't think of a reason why the call would fail anyway)
<Tasser>
workmad3, any comments on the ruby in the script? :-)
<workmad3>
Tasser: ok, so looking at the stacktrace and @ the rb... I suspect it's something to do with the XML
<MikeWorth>
dpkg -l
<MikeWorth>
oops, wrong window- ignore me
<workmad3>
Tasser: specifically, something to do with when you're spitting out the XML at the end
<workmad3>
Tasser: although it could also be when you're loading the XML
tatsuya_o has quit [Ping timeout: 264 seconds]
<workmad3>
Tasser: but you have libxml2 stuff in the backtrace, and it's stuff to do with adding nodes and string concatenation...
<Tasser>
workmad3, uh-oh
<Tasser>
workmad3, encoding fun?
<workmad3>
Tasser: any idea if you have an old version of libxml2 there? or if nokogiri is giving you the 'warning, built against X but loaded version Y' thing?
m_3 has joined #ruby
aroman_ has quit [Quit: aroman_]
<workmad3>
Tasser: it could be encoding fun, it could be a fubared libxml, it could be a weird libxml/nokogiri/ruby version conflict...
timonv has joined #ruby
jimeh has joined #ruby
aroman has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
gregorg has joined #ruby
gregorg has joined #ruby
gregorg has quit [Changing host]
<workmad3>
Tasser: I'd also see if the same thing happens if you read any XML file, or if it's just that 'basics.dix' one
claudiu has joined #ruby
<Tasser>
Name : libxml2
<Tasser>
Version : 2.7.8-2
<Tasser>
workmad3, nope, works fine with the other two (sur and val)
<Tasser>
workmad3, and that's the whole output of the script run
<Tasser>
I'll reinstall nokogiri then
<Tasser>
Install Date : Mon Feb 13 12:39:14 2012
<workmad3>
Tasser: yeah, you don't get much good stuff from a segfault stack trace
<Tasser>
(install date of libxml)
<Tasser>
workmad3, can you reproduce on your machine?
burgestrand has joined #ruby
<workmad3>
Tasser: I don't have the time to clone a full env and try to reproduce unfortunately
jsilver has quit [Remote host closed the connection]
saschagehlich has joined #ruby
russeld has joined #ruby
ZachBeta has joined #ruby
tonini has quit [Remote host closed the connection]
Rochefort has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
saschagehlich has quit [Client Quit]
conor_ireland has quit [Quit: conor_ireland]
dv_ has joined #ruby
saschagehlich has joined #ruby
<claudiu>
hi there! I want to create a ruby class which extends an IRB and capture the output. I want the output to be sent to a java object which was received at construction. I've been doing something like this http://pastie.org/4231843 but I don't know how to handle that java_callback_object . In Java I have an JRuby engine and I want to take the output after I call the "eval" method
<Tasser>
claudiu, take a look at pry imo for hacking with readline... I suppose their code is more sane than the IRB one
<Tasser>
claudiu, so you want a java readline? :-)
LennyLinux has joined #ruby
fermion has joined #ruby
vandemar has quit [Ping timeout: 248 seconds]
freeayu has quit [Read error: Connection reset by peer]
nari has quit [Ping timeout: 245 seconds]
<claudiu>
I want to implement a shell web browser and I want to use my IRB sources. The problem is that some functions send the output to the STDOUT and I can't take it with jrubyEngine.eval(command, context).toString(). So I want to capture the output in a ruby class and send it to a java object
Foxandxss has joined #ruby
vandemar has joined #ruby
bosphorus has joined #ruby
<claudiu>
Tasser, I believe that readline is not what I'm looking for
seoaqua has joined #ruby
<Tasser>
claudiu, yeah, take a look at pry. it's easier to redirect shell output there
nyuszika7h has quit [Read error: Connection reset by peer]
<seoaqua>
how to select all nodes with attribute x in XPATH,pls?
<claudiu>
okey, Tasser! thx!
knirhs has joined #ruby
jimeh has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
nyuszika7h has joined #ruby
luckyruby has quit [Remote host closed the connection]
RainbowDashh has quit [Quit: SLEEP MODE. I NEED A MORE CREATIVE MESSAGE FOR MY DUMB LID CLOSING.]
<shevy>
it has like no documentation and should die
<shevy>
and all other ruby stdlib and core without docu should also die
<lewis1711>
yeah for that reason most people recommend some clunky third party soln
lxsameer has joined #ruby
<jxf>
shevy: Some people like pry if you're looking for a replacement.
xscc has quit [Remote host closed the connection]
<banisterfiend>
jxf: pry is a work of genius
<jxf>
It is definitely a nice irb alternative.
lxsameer has quit [Client Quit]
<jxf>
It has some structural issues from a programmatic perspective though.
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<banisterfiend>
jxf: oh like what?
<jxf>
But if you don't care (or don't need to care) about the internals of it then it's excellent.
s1n4 has joined #ruby
<banisterfiend>
jxf: i'm interested in the structural issues :)
<jxf>
banisterfiend: It's mostly related to debugging and writing extensions. The APIs are a little clunkier vs. irb.
<banisterfiend>
jxf: hmm which APIs? can u give an example of pry api vs irb api
<lewis1711>
he will beat you up now
lxsameer has quit [Client Quit]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
xscc has joined #ruby
<jxf>
banisterfiend: Here's a representative example. When I need to fire up ruby-debug and drop into a Ruby interpreter, pry's extensions don't always load properly if the context was a nested one.
<jxf>
irb mostly ignores nested contexts so the experience is a little better.
xscc has quit [Remote host closed the connection]
<jxf>
(Though you do get warnings about being in that kind of context sometimes.)
<banisterfiend>
jxf: what do u mean by a nested context? you're starting pry from inside ruby-debug?
pygospa has quit [Ping timeout: 244 seconds]
<jxf>
banisterfiend: Starting an interpreter from inside an already-interpreted context.
<jxf>
That could be a debugger, or it could be an existing script, or it could be another interpreter, etc.
<banisterfiend>
jxf: can u give an example of pry's extensions not working? this is news to me :)
<jxf>
As in, what's a specific example of a Pry extension that doesn't always work correctly in a nested context?
<banisterfiend>
jxf: yes, if possible
<banisterfiend>
jxf: because nested contexts really shouldn't make any difference
pygospa has joined #ruby
lxsameer has quit [Client Quit]
<jxf>
Sure, let me go check.
<banisterfiend>
cool thanks
lxsameer has joined #ruby
lxsameer has quit [Remote host closed the connection]
<jxf>
Boo. My Linode is down!
minijupe has joined #ruby
<jxf>
banisterfiend: Are you a maintainer? I can file a GitHub issue later with more details instead of just bitching about it. :)
<banisterfiend>
jxf: possible extension names: pry-nav? pry-debugger? pry-stack_explorer? pry-coolline ?
<banisterfiend>
jxf: pry-remote ?
<jxf>
exception-explorer was one
<jxf>
(not stack_explorer afaik)
<banisterfiend>
jxf: ah, what was the issue with exception explorer? did you remember to turn it on? cos exception_explorer doesnt 'jsut work' it needs to be turned on
<shevy>
jxf: yeah I know pry :) but the author does not wanna destroy irb ;<
<banisterfiend>
jxf: so your issue was more with faulty plugins than with user facing config APIs ?
Yugo has joined #ruby
MatthewGA has joined #ruby
mbuf has joined #ruby
shavus has quit [Ping timeout: 260 seconds]
<jxf>
That was one example. I also wish, generally speaking, that the pry/irb APIs were more compatible.
wvms has joined #ruby
<jxf>
e.g., an Adapter pattern would be nice.
KL-7 has quit [Quit: This computer has gone to sleep]
gokul has quit [Quit: Leaving]
<jxf>
As it is, you basically have to rewire anything done as an IRB extension for Pry.
<jxf>
That's not a horrible problem or anything.
<jxf>
Just a little annoying.
<banisterfiend>
jxf: well, hardly anyone (afaict) actually used the irb apis, mainly because they weren't documented. So i didn't feel any need to support an API that only 0.5% of people used
<jxf>
0.5% is probably being generous :)
<banisterfiend>
yeah, but an adapter pattern in the form of a plugin is possible if people need it
yugui is now known as yugui_zzz
`brendan has joined #ruby
<jxf>
How well does Pry play with multithreading?
<banisterfiend>
jxf: should work fine
<banisterfiend>
jxf: i use it in multithreaded apps a lot, my development style is often to have a pry-remote-em server running in a separate thread to the app, so i can ues it to modify the app while it's running
<banisterfiend>
remotely, too :)
<jxf>
I hope that's not how you push updates to production :)
<banisterfiend>
no
<jxf>
But yeah, cool. OK, I'll give it another shot on my next project.
<banisterfiend>
jxf: but it's been used in production before (not by me)
umttumt has joined #ruby
<banisterfiend>
jxf: a guy had it setup so pry would fire on exception, it then sent him an email, waking him up at 3am
<banisterfiend>
jxf: pry-remote-em opened a secure socket for him, he connected, fixed the bug, an continued the app
<jxf>
That is a horrendous hack.
<jxf>
Sweet merciful jeebus.
<jxf>
Definitely a fun use of pry though. :)
aroman has quit [Quit: aroman]
<banisterfiend>
jxf: hehe, he didn't complain :) though it's likely something he'd only do very rarely
twock has joined #ruby
<banisterfiend>
it would be interesting to see how robust we could make that though, in the rare event people need to do it
macmartine has joined #ruby
jxf has quit [Quit: Leaving]
geekbri has joined #ruby
mathie has quit [Quit: Sleeping...]
beilabs has quit [Ping timeout: 264 seconds]
wvms has quit [Quit: wvms]
a_a_g has quit [Ping timeout: 250 seconds]
rStokes has joined #ruby
wvms has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
wvms has quit [Client Quit]
TPFC-SYSTEM has joined #ruby
a_a_g has joined #ruby
tatsuya_o has joined #ruby
cantonic_ has joined #ruby
crankycoder has joined #ruby
krusty_ar has joined #ruby
beilabs has joined #ruby
greasegum has joined #ruby
rakunHo has joined #ruby
kedare has joined #ruby
a_a_g has quit [Ping timeout: 244 seconds]
a_a_g1 has joined #ruby
cantonic has quit [Read error: Operation timed out]
cantonic_ is now known as cantonic
tatsuya__ has quit [Ping timeout: 264 seconds]
kylemcgill has quit [Remote host closed the connection]
lorandi has joined #ruby
a_a_g1 has quit [Ping timeout: 240 seconds]
mohits has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
sailias has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
greasegum has quit [Remote host closed the connection]
mmsequeira has joined #ruby
aroman has joined #ruby
greasegum has joined #ruby
beilabs has quit [Ping timeout: 244 seconds]
`brendan has quit [Ping timeout: 245 seconds]
rStokes has quit [Quit: Page closed]
richardStokes has joined #ruby
int3__ has joined #ruby
bbttxu has quit [Quit: bbttxu]
mbuf has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<int3__>
how do I chain two enumerables together? I'd like to do something like chain(enum1, enum2) { |x| puts x }
k_89 has quit [Ping timeout: 255 seconds]
<hoelzro>
int3__: what do you mean by "chain"?
<hoelzro>
one after the other?
<int3__>
so if enum1 = [1,2,3], and enum2=[4,5], then the above code would print out [1,2,3,4,5]
<int3__>
yup
<int3__>
one after the other
<int3__>
but without making an intermediate larger array
<hoelzro>
right
Jackneill has joined #ruby
mohits has joined #ruby
Luceo has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<Luceo>
Hihi
<Luceo>
Can anyone give me some advice on writing an IRC bot in ruby
<banisterfiend>
int3__: Enumerator.new { |y| enum1.each { |v| y << v }; enum2.each { |v| y << v } }
<Luceo>
And don't say don't, I want to learn :P
<aroman>
Luceo: probably google "ruby irc bot"
<Luceo>
Which is the only reason I'm not using an existing framework
<Luceo>
I tried that :(
hunglin has joined #ruby
<Mon_Ouie>
Learning what? Ruby, or the IRC protocol?
<Luceo>
Mon_Ouie: Both
<int3__>
banisterfiend: ouch, there's no nicer way?
<int3__>
I was hoping for something like Python's itertools.chain :)
<Mon_Ouie>
You won't learn more about Ruby if you don't use an existing library (arguably, it would be rather the opposite)
<csmrfx>
Luceo: do you want to write a plugin or standalone bot?
<Luceo>
csmrfx: A standalone bot
dv310p3r has quit [Read error: Operation timed out]
<csmrfx>
ok, I have a practice for you! 8)
<Mon_Ouie>
Well, then you should check the IRC RFC and use TCPSockets
<banisterfiend>
int3__: well itertools.chain is probably implemented like that. We get Enumerator#+ in 2.0, which will do that
<banisterfiend>
int3__: but we dont have a Enumerator#+ (which is equivalent to pythons' chain()) yet.
<banisterfiend>
int3__: just stick it in a method ;)
<richardStokes>
Having an awful time trying to run my Sinatra app on Debian Squeeze, anyone have a bit of time to spare to help me out?
<csmrfx>
Luceo: A. implement IRC protocol in Ruby. B. implement a irc client on that implementation.
<int3__>
banisterfiend: ah all right. yeah I know chain() is implemented similarly, I just thought Ruby's stdlib would have it already :) thanks!
<csmrfx>
Luceo: Extra points: C. implement a simple bot using the client from B.
<banisterfiend>
int3__: yeah, it's annoying they made Enumerator so crippled. But they learned from their mistakes, and 2.0 will have a much much more powerful Enumerator/Enumerable :)
<banisterfiend>
int3__: we even get more methods for laziness :)
<shevy>
richardStokes: there is #sinatra and #debian but you can always try your luck by asking here on #ruby
<int3__>
banisterfiend: haha cool :)
s1n4 has quit [Quit: Leaving]
beilabs has joined #ruby
<richardStokes>
shevy: Ok thanks. I don't think it's a problem with Sinatra itself, but the fact that any gem requirements seem to be ignored.
<richardStokes>
I've developed this app on my local Ubuntu 12.04 machine using ruby1.9.3
<shevy>
would not surprise me much, default debian ruby is odd
<richardStokes>
so my internship supervisor wants to move it onto the development server, which is running debian squeeze
<richardStokes>
he installed ruby from the repositories, which means he installed 1.8
<JonnieCache>
lol this again
<csmrfx>
uh oh
<csmrfx>
you going to need to do tons of debugging to go from 1.9.3 to 1.8
<richardStokes>
so we installed the 1.9.1-full package, and have been trying to run the app using the ruby1.9.1 command, and... nothing
<shevy>
why cant I use load() or require() in mruby :( at least not in mirb
<canton7>
define "nothing"
<richardStokes>
I'd rather just use the 1.9.1 ruby than migrate from 1.9.* to1.8
<csmrfx>
richardStokes: compile&build (make) from those debian sources
<csmrfx>
(bleeding = unstable)
<shevy>
good point graspee
<csmrfx>
richardStokes: you *could* also see the logs for errors...
<graspee>
it's 1.9.3p0 but even so
g_rotbart has quit [Remote host closed the connection]
<graspee>
it's better than a kick in the teeth
<shevy>
lol
<shevy>
so ubuntu is ahead of debian here or?
crankycoder has quit [Remote host closed the connection]
<graspee>
apparently
chson has quit [Remote host closed the connection]
<csmrfx>
debian stable is very slow to adopt things
<JonnieCache>
thats the whole pont
<JonnieCache>
*point
<JonnieCache>
of debian
hunglin has quit [Quit: Leaving.]
`brendan has joined #ruby
<csmrfx>
stable means *stable*
<Mon_Ouie>
IIRC there is (or was) a ruby1.9.1 package which actually contains a version newer than 1.9.1
<JonnieCache>
yes there is a lot of confusion between stable as in "doesnt change" and stable as in "doesnt crash"
<shevy>
:)
<Mon_Ouie>
(1.9.1 was part of the package name, not the version of the package)
<shevy>
ruby1.9.1 to contain ruby-1.8.7 would be sweet confusion
<csmrfx>
compiling from source is not exactly a catastrophe, richardStokes
mathie has joined #ruby
<JonnieCache>
hes not allowed to though
<graspee>
it is if his supervisor won't allow it
<csmrfx>
(I mean, if debian repos dont have a new version enough)
* csmrfx
is on squeeze
<JonnieCache>
THE SYSADMIN HAS SPOKEN!
<richardStokes>
yeah I would using rvm/compiling from source if my supervisor wasn't adamant we use official packages
<shevy>
hehe
<claudiu>
does anybody know what is used for ".results()" in this example : "eval_result = Kernel.eval(str) ; myobject.results(str, eval_result)" ?
<shevy>
stable means "supervisor does not want any changes at all"
<csmrfx>
richardStokes: be smart, just install rvm and dont tell him
<graspee>
i would install the 1.9.3 from ubuntu repos
<shevy>
claudiu: seems to be a normal method call
* csmrfx
the devil
<JonnieCache>
you must have a different definition of smart
<graspee>
that's still allowed according to one interpretation
wangr has joined #ruby
<richardStokes>
canton7: yeah seems to be. I can run sinatra apps no problem using the default ruby 1.8 installation, but ruby1.9.1 doesn't want to seem to know about it
<csmrfx>
and NO. do not mix ubuntu and debian repos
<graspee>
why ?
<csmrfx>
bad things will happen
<richardStokes>
csmrfx: yeah, and then get murdered and lose my internship when he finds out. no thanks
<graspee>
if they do you can uninstall it
<shevy>
because distributions love being incompatible to one another
<JonnieCache>
the whole point of using a distros packages is that theyre tested together as a whole
<graspee>
we know how that works thuogh
<claudiu>
shevy method results is not defined
<JonnieCache>
if you mix them then you lose a lot of the benefits of having them in the first place.
<shevy>
claudiu: then the object does not know that method
<csmrfx>
richardStokes: so, installing from source is out, too?
<graspee>
loads of ubuntu stuff doesn't work with itself
mathie has quit [Client Quit]
gry has joined #ruby
<shevy>
claudiu: there is not much you can do to make a non-existing method work ... ;)
<richardStokes>
csmrfx: possible, have to wait til he gets back to ask but I wouldn't be optimistic
<shevy>
or you can define it on your own
<csmrfx>
richardStokes: it is rather convinient, actually
<shevy>
that code is odd though, I get sceptical when I see eval
rakunHo has quit [Remote host closed the connection]
<claudiu>
shevy thx, I thought that there was defined in the library
<JonnieCache>
yeah, dont use eval
sailias has quit [Quit: Leaving.]
<shevy>
claudiu: I suppose it was not you who wrote that code right? perhaps whoever wrote it meant .send rather than .results ... but if the code never worked at all then it was probably awful code to begin with anyway
a_a_g has quit [Ping timeout: 264 seconds]
aroman has quit [Quit: aroman]
<canton7>
richardStokes, you haven't actually defined "doesn't want to know about it" or "doesn't work" yet. What is the problem? It might be something trivial, in which case the whole discussion is irrelevant
ben_alman has quit [Excess Flood]
sepp2k has joined #ruby
crankycoder has joined #ruby
<csmrfx>
debian current unstable is also 1.9.1
<claudiu>
what should I use? I want to create a ruby class which extends an IRB and capture the output. I want the output to be sent to a java object which was received at construction. I've been doing something like this http://pastie.org/4231843 but I don't know how to handle that java_callback_object . In Java I have an JRuby engine and I want to take the output after I call the "eval" method
<csmrfx>
no, wait
<csmrfx>
debian current unstable has 1.9.3
ananthakumaran1 has joined #ruby
nateberkopec has joined #ruby
<csmrfx>
but I think current debian squeeze has package 1.9.1 which is really 1.9.2
<richardStokes>
canton7: Sorry. Basically when I 'ruby1.9.1 my_sinatra_app.rb', nothing happens - I'm just brought straight back to the command prompt. No WEBrick starting, nothing. I've put in debug print statements and the interpreter is making it to the end of the file, but not starting the server. I wrote a trivial "Hello, World!" sinatra app just there, and ruby 1.8 can run it no problem.
<shevy>
claudiu: hmm no real idea. I once tried to use IRB and embed it somewhere, but the source was not easy to read and not documented so I gave up on IRB
mpereira has quit [Ping timeout: 252 seconds]
<csmrfx>
richardStokes: did you try to see if a server is running?
ananthakumaran has quit [Ping timeout: 244 seconds]
Jackneill_ has joined #ruby
<richardStokes>
csmrfx: Yes, went to localhost:4567 and nothing
Jackneill has quit [Read error: Connection reset by peer]
<csmrfx>
richardStokes: I think you're going to have to start pastie.orging your code
<shevy>
orging code is always good
<richardStokes>
csmrfx: The code shouldn't be a problem. My app works perfectly on my Ubuntu machine, and will at least start up on this Debian box if I use ruby 1.8 (though I need to use 1.9 if I want any other functionality out of it)
<csmrfx>
bs
<csmrfx>
your code is fine - but doesn't work
<csmrfx>
rrrright
<banisterfiend>
csmrfx: hey carl
<claudiu>
shevy, if I want to save the output of a method from a different source how should I proceed?
<csmrfx>
Mr Banned *nods*
erichmenge has joined #ruby
<shevy>
claudiu: you mean the result of a method? result = some_object.some_method()
Progster has joined #ruby
<richardStokes>
csmrfx: Alright fine. Here's a small app I just wrote that executes on ruby 1.8, but nothing on ruby1.9.1: http://pastie.org/4237596
mpereira has joined #ruby
<claudiu>
shevy, yes, but i want to convert it into string .That method will save the ouptut in STDOUT
<csmrfx>
richardStokes: ok, first of all, realize that many libraries were rewritten from 1.9
<csmrfx>
richardStokes: I bet it could be something like webrick not having an implicit event loop in 1.9 which 1.8 has
<claudiu>
sry, but I never used ruby before
<csmrfx>
(or sinatra)
troessner has joined #ruby
<richardStokes>
csmrfx: then how come it will run in 1.9 on my local box?
<csmrfx>
so that is the sinatra app
<csmrfx>
looks legit
pazustep has joined #ruby
<csmrfx>
except - your webserver doesn't run?
wvms has joined #ruby
dinkytoy has joined #ruby
<canton7>
richardStokes, what if you install thin? (I'm suspecting a webbrick issue here)
ben_alman has joined #ruby
<richardStokes>
csmrfx: my webserver runs fine in 1.9 on my Ubuntu machine. Every runs fine. The only problem is it doesn't work using Debian's 1.9 package
<csmrfx>
You mean, you dont have any problems?
KL-7 has joined #ruby
fantazo has joined #ruby
<csmrfx>
As in: no famine problem in the World. Except where there isn't enough food.
Osum has quit [Quit: leaving]
Criztian has quit [Remote host closed the connection]
bglusman has joined #ruby
<claudiu>
another question : Could I evaluate methods from other sources with Kernel.eval ?
<shevy>
claudiu: hmm. so that method only puts the output? I dont think you can redirect it easily
<shevy>
you can eval ruby code with Kernel.eval
ksergio has joined #ruby
<shevy>
I dont understand why you want to do so when you have ruby objects though
elrond255 has joined #ruby
<richardStokes>
csmrfx: As in my problem is my code won't run on the development server. I really don't see how you're failing to grasp that? It works on my laptop (where I've developing), but it won't run on the Debian server. I really don't see how I can be any clearer than that.
<csmrfx>
We all got that already.
krusty_ar_ has joined #ruby
<csmrfx>
Repeating that wont get you anywhere.
<shevy>
claudiu: def foo; return 'Test';end; result = foo(); <-- result will be a string called 'Test'
<csmrfx>
Either you debug the problem where it exists, or no progress will take place, richardStokes
Osum has joined #ruby
<csmrfx>
richardStokes: I dont think I can help you any further before you find your proactive attitude
krusty_ar has quit [Ping timeout: 248 seconds]
<shevy>
richardStokes: debian's package could be broken
vitoravelino is now known as vitoravelino`afk
jerius has quit [Quit: leaving]
<elrond255>
I need to a assign a mime type to a file I create using File.new. Is there an easy way to do that?
pazustep has left #ruby [#ruby]
<richardStokes>
csmrfx: Right, suggestions on how to debug then? I've already tried debugging my own code, and the interpreter is reaching the end of the file with no errors, so it's either something wrong with WEBrick or Debains 1.9 package
Progster has quit [Ping timeout: 248 seconds]
<richardStokes>
and since I just installed thin and am still having the same issue, I'd say it's something weird with Debian's 1.9
<richardStokes>
further than that, I'm stuck. I'm obviously no genius, that's why I came here for help. I'm all for being proactive but I really don't know where to go from here
<csmrfx>
richardStokes: well I would first see any logs ruby or webrick may have made
<claudiu>
shefy, I have to call IRB methods and to get their results.The problem is that their results are not always strings
umttumt has quit [Remote host closed the connection]
<csmrfx>
richardStokes: then I would make a simple stand-alone webrick test to see if it runs and has an event loop of some kind
<csmrfx>
Anyone know if webrick leaves some logs someplace?
<shevy>
claudiu: ok what are those results then?
<shevy>
richardStokes: yeah but you also need to think the other way. not everyone uses debian for instance. I am quite sure that if I were to reproduce the same thing on my system, I could not reproduce the problem you have.
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 13.0.1/20120614114901]]
Heisenberg_ has joined #ruby
<shevy>
first way is to always try and isolate the smallest possible piece of code where the error happens, then pastie that, so others can try to reproduce it
<csmrfx>
He means: how do you run your webrick?
obryan has joined #ruby
atmosx has joined #ruby
hydrozen has joined #ruby
<richardStokes>
shevy: the smallest possible piece of code where the error happens is that 'hello, world' script I posted above. I just tested the json gem there to make sure it wasn't a problem with rubygems in general and that seemed to work fine.
<richardStokes>
csmrfx: I don't run it explicitly. I starts up by default when a Sinatra app is run
<csmrfx>
aaa
kvirani has joined #ruby
<csmrfx>
ok
<claudiu>
shevy, to be onest I really don't know. As I said I never used ruby before and IRB uses many sources. What I want is to get the results in java, using a JRuby engine. What I noticed is that I cannot convert all the results with jrubyEngine.eval(command).toString()
<atmosx>
aloha
<richardStokes>
csmrfx: Sorry for not making that clear, I wrongly assumed familiarity with Sinatra amongst the people here.
<csmrfx>
richardStokes: whats your server variable in sinatra conf?
<claudiu>
I though that I should take the output from the STDOUT
<banisterfiend>
claudiu: you talk too much
elrond255 has left #ruby [#ruby]
artm has quit [Quit: artm]
carlyle has joined #ruby
dinkytoy has quit [Ping timeout: 245 seconds]
Heisenberg_ has quit [Quit: Heisenberg_]
<richardStokes>
csmrfx: I haven't set it explicitly
<csmrfx>
should be "builtin" but whats it say?
dinkytoy has joined #ruby
mathie has joined #ruby
beilabs has quit [Ping timeout: 252 seconds]
<csmrfx>
also, write some kind of simple test to see that 1. rubygems work. 2. rack is installed. 3. webrick works.
<richardStokes>
csmrfx: Sorry about this, I'm not sure how to find it. Where do I look if I haven't set the sinatra conf options myself?
<csmrfx>
finally 4. does your system allow for running a webserver and opening a port.
<richardStokes>
csmrfx: Already tested that rubygems work, will do 2 & 3 now, and yes, the system allows a webserver as I can run sinatra apps succesfully using 1.8
dinkytoy has quit [Client Quit]
<richardStokes>
ok, so the server is set to ["thin", "mongrel", "webrick"] by default
robert_ has joined #ruby
<csmrfx>
make sure you dont have botched thin or mongrel there
krusty_ar_ is now known as krusty_ar
<csmrfx>
although, thin might be nice to use, actually
<richardStokes>
csmrfx: installed thin earlier and was having the same problems. Just set the server option to webrick alone and it still isn't working. Rack is installed.
fearoffish has joined #ruby
<csmrfx>
so you have a rack instance running then
<canton7>
what happens when you tr to start it using rackup?
<csmrfx>
sinatra selects whichever server has a handler first
<csmrfx>
ya, checking then handler and rackupism might be 5.
<csmrfx>
hm, then again, you might also have a thin instance handler there so it might be running too
rohit has joined #ruby
<csmrfx>
or failing
kristofferrr has joined #ruby
beilabs has joined #ruby
<richardStokes>
I determined rack was installed by looking at my gems. I'm not familiar with rack beyond knowing it's a webserver interface, so how can I determine if I have an instance running at the moment
<TheHairyWoodsman>
is there a convention for naming/versioning gems that are forked?
<JonnieCache>
you have to do any error handling yourself with exceptions etc rather than the success/fail callbacks you might be used to
ken_barber has joined #ruby
mahmoudimus has joined #ruby
<TheHairyWoodsman>
for that matter, is a there a convention for naming/versioning gems that are branched
twinturbo has joined #ruby
<csmrfx>
have to? no
<csmrfx>
should? yes
ABK has quit [Ping timeout: 265 seconds]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
joshman_ has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<CharlieSu>
I get this with openuri. 'OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed'
<JonnieCache>
can you do curl from the command line?
<csmrfx>
I may be mistaken, or is it just open-uri does not support https
<CharlieSu>
'OpenURI is an easy-to-use wrapper for net/http, net/https and net/ftp.'
tagrudev has quit [Quit: Me = Awesome]
<csmrfx>
immsc
jprovazn has joined #ruby
cjs226 has quit []
<lectrick>
So, both private AND protected methods are not available to subclasses?
<shevy>
TheHairyWoodsman: I dont think there can be. rubygems.org allows only one same-name for a gem
<richardStokes>
csmrfx: found that for some reason, enable :run needed to be set, even though I was running the sinatra app directly. Don't know why it works, but it does now. Having other issues now with Sinatra's url helpers but I've taken that over to #sinatra
<JonnieCache>
lectrick: protected methods should be available to subclasses
<CharlieSu>
This worked.. uri.open(:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE)
mahmoudimus has quit [Quit: Computer has gone to sleep.]
billiamii has joined #ruby
macmartine has joined #ruby
<csmrfx>
SSL without any Secure? lol
<lectrick>
JonnieCache: I just did a test in IRB and it threw an error
<lectrick>
JonnieCache: "NoMethodError: protected method `hello' called "
<csmrfx>
subclasses or subclass instances?
<lectrick>
subclass instance
<csmrfx>
ha
<CharlieSu>
csmrfx: not sure why it won't work without that.. even on Yahoo's certificate
<lectrick>
csmrfx: and?
arturas has joined #ruby
theRoUS_ has quit [Ping timeout: 244 seconds]
Vert has joined #ruby
etehtsea has joined #ruby
int3__ has quit [Remote host closed the connection]
akem has quit [Read error: Connection reset by peer]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
akem has quit [Max SendQ exceeded]
pu22l3r has joined #ruby
akem has joined #ruby
<csmrfx>
lectrick: and what?
mdszy has joined #ruby
nari has quit [Ping timeout: 240 seconds]
Jackneill_ has quit [Ping timeout: 252 seconds]
SQLStud has joined #ruby
ChampS666 has quit [Ping timeout: 248 seconds]
g0bl1n has joined #ruby
Criztian has joined #ruby
lolmaus has quit []
rekenerd has joined #ruby
adeponte has joined #ruby
nachtwandler has joined #ruby
enroxorz has joined #ruby
enroxorz has joined #ruby
enroxorz has quit [Changing host]
booginga has joined #ruby
<lectrick>
csmrfx: so the only way to have a method inherit is by making it public?
<csmrfx>
what
<csmrfx>
no
UdontKnow is now known as KnightWhoSaysNI
theRoUS_ has joined #ruby
<csmrfx>
perhaps you want to provide a code sample
<csmrfx>
KnightWhoSaysNI: NI!
tk____ has quit [Quit: ばいばい]
<csmrfx>
lectrick: Bring me... rubyry!
PaciFisT has joined #ruby
Luceo is now known as Cyruki
Cyruki is now known as Luceo
hynkle has joined #ruby
hekin has joined #ruby
<lectrick>
csmrfx: class Top; protected; def hello; puts "hello"; end; end; class Bottom < Top; end; b = Bottom.new; b.hello
Lachryma has joined #ruby
<lectrick>
NoMethodError: protected method `hello' called for #<Bottom>
tcopp has joined #ruby
rekenerd has quit [Read error: Connection reset by peer]
Deele has joined #ruby
Z_Mass has joined #ruby
<csmrfx>
lectrick: hm
mayankkohaley has joined #ruby
zrail has left #ruby [#ruby]
etehtsea has quit [Ping timeout: 244 seconds]
rekenerd has joined #ruby
<booginga>
Hey guys I'm looking to separate out some of my ruby code into separate file so it will be more reusable later. here is the code I'm working with https://gist.github.com/3090939 if i put everything in the same file it seems to load up fine however if i separate out the lifescycles method to a separate file i can no longer use the proc that it returns in the god file on line 30 any ideas?
axl__ has joined #ruby
erichmenge has quit [Quit: Be back later]
twinturbo has quit [Quit: twinturbo]
kedare has quit [Ping timeout: 272 seconds]
<csmrfx>
lectrick: it's the sunspots!
Luceo is now known as Jirachi
Jirachi is now known as Luceo
a_a_g has joined #ruby
Synthead has joined #ruby
oooPaul has joined #ruby
centipedefarmer has joined #ruby
<csmrfx>
lectrick:
<banisterfiend>
booginga: you're not using proper oop
<csmrfx>
class Top; protected; def hello; puts "hello"; end; end; class Bottom < Top; end; b = Bottom.new; b.send :hello
<lectrick>
csmrfx: Blame the sunspots why don't ya
axl_ has quit [Ping timeout: 246 seconds]
axl__ is now known as axl_
robbyoconnor has joined #ruby
<banisterfiend>
booginga: learn2oop and it'll work for u
<lectrick>
csmrfx: Yes, of course "send" gets around that, I know that lol
<csmrfx>
send you all my luvvv... ina lettah!
axl_ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<csmrfx>
lectrick: anyway, u still no grok?
axl_ has joined #ruby
<booginga>
banisterfiend: well i don't doubt that oop is the way to go based on the fact that ruby as a language loves that paradigm but i was just looking for a patch for now. thanks for looking anyway
<banisterfiend>
booginga: well, ok
<banisterfiend>
booginga: store your proc in an @ivar
<csmrfx>
lectrick: ok, 3 point hint: what is returned if you type self<enter>
strife25 has joined #ruby
<banisterfiend>
booginga: wait, what error do u get?
minijupe has quit [Quit: minijupe]
flagg0204 has quit [Quit: leaving]
hilolih__ has joined #ruby
<lectrick>
csmrfx: you mean, when I'm not inside an instance, but i'm in irb? "main" :)
mwilson_ has quit [Excess Flood]
savage- has joined #ruby
andrewhl has quit [Remote host closed the connection]
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
vlad_starkov has joined #ruby
freeayu has quit [Quit: 离开]
mathie has quit [Ping timeout: 252 seconds]
bigkevmcd has joined #ruby
adeponte has quit [Remote host closed the connection]
apok has joined #ruby
Ankhers has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
andrewhl has joined #ruby
apok has quit [Client Quit]
Ontolog has quit [Ping timeout: 245 seconds]
savage- has joined #ruby
LennyLinux has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
<banisterfiend>
anyone here speak german?
<mdszy>
Nein.
Morkel has quit [Quit: Morkel]
<JonnieCache>
ein bisschen...
<JonnieCache>
heh not really
macmartine has quit [Ping timeout: 245 seconds]
jprovazn has quit [Quit: Leaving]
<JonnieCache>
not as well as google translate anyway
<mdszy>
Ich spreche kein Deutsch!
<workmad3>
banisterfiend: kein verdammtes Wort
<Luceo>
So far I have a bot that can connect and identify >_> But I don't know how to parse the Nickserv response to check if identify worked
conor_ireland has quit [Quit: conor_ireland]
<mdszy>
ooh, IRC bots are fun
<mdszy>
Luceo: look for "password incorrect" to see if it didn't work?
<mdszy>
otherwise, assume it did
<Luceo>
mdszy: I'm very new to ruby in general ^^ I have to do some more reading
<JonnieCache>
yeah theres no standard nickserv format so youre just going to have to look at what freenode sends you, and parse it with regular expressions
<hoelzro>
banisterfiend: ich
<mdszy>
Luceo: ahh. Basically what you're going to do is start up a socket connection, loop forever, as long as you're getting input. Something like `while response = socket.read`
<Luceo>
Then asks for exactly the parameters I just gave it -_-
centipedefarmer has quit [Quit: This computer has gone to sleep]
mahmoudimus has joined #ruby
liluo has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
a_a_g has joined #ruby
Goles has joined #ruby
aroman has joined #ruby
frogstarr78 has quit [Ping timeout: 246 seconds]
ctor has joined #ruby
<Mon_Ouie>
Notice the use of ":"
<ctor>
Is this where I can ask for help with Ruby usage?
<shevy>
Luceo: IRC wants :
<Mon_Ouie>
ctor: Sure
<Luceo>
shevy: In place of space?
<shevy>
Luceo: dunno where exactly, there is some specification
<Mon_Ouie>
No, after the space. PRIVMSG target :bla bla bla
bluOxigen has quit [Ping timeout: 244 seconds]
<shevy>
for instance, /me emotes work via something like -> talk "PRIVMSG #{@channel} :\001ACTION #{i.chomp}\001"
<JonnieCache>
ctor: yes
hoelzro is now known as hoelzro|away
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<ctor>
I'm working on my first ruby project and saw on StackOverflow that I should be using non-standard cURL libraries.. either cURB or cURL::Multi... How do I import a non-standard library into a gem?
<shevy>
require 'name'
s1n4 has quit [Ping timeout: 264 seconds]
xaq has joined #ruby
<ctor>
Do I need to include them in ../projectBase/lib ?
<JonnieCache>
both of those things are just ruby wrappers around curl, not non standard versions of curl
<JonnieCache>
RubyGems is the ruby package manager system
<shevy>
ctor: I dont know your structure. if you wish to make use of a gem, you have to first require it. ideally you require it at only one point of your project rather than multiple locations
<ctor>
Once I install the gems, they will automatically be pulled into any gem that I create that calls them?
<shevy>
require will try to load it, yeah
<shevy>
if you use it
<ctor>
Ah
<ctor>
I'll give that a shot and try not to mess it up :)
Rochefort has quit [Remote host closed the connection]
<JonnieCache>
ctor: look into bundler, which is part of the rubygems system
<JonnieCache>
ctor: it manages all this stuff for you
<shevy>
eh?
<JonnieCache>
gembundler.com
<shevy>
since when is bundler a part of rubygems?
s1n4 has joined #ruby
s1n4 has quit [Changing host]
s1n4 has joined #ruby
<ctor>
bundler is rails, yeah?
<Luceo>
Thanks, just what I needed
Axsuul has quit [Ping timeout: 245 seconds]
<shevy>
non-rails project use bundler too
<JonnieCache>
fucking hell this channel is pedantic. its not *part* of rubygems as such, but it is part of the rubygems "system"
<JonnieCache>
for the purposes of this conversation
macmartine has quit [Quit: macmartine]
<JonnieCache>
ctor: it started with rails but its now used accross the ruby community
zastaph has quit [Ping timeout: 265 seconds]
<JonnieCache>
(it should be an actual part of rubygems imo)
Fretta has joined #ruby
<shevy>
hopefully never
macmartine has joined #ruby
<shevy>
though given how big rails is, it probably will be eventually
theRoUS_ has joined #ruby
<ctor>
Ah. I had never touched ruby or rails until yesterday, so please forgive any stupid questions. I'm still going through the dox.
<JonnieCache>
ctor: open-uri is perfectly good for downloading a quick bit of html
<csmrfx>
I would like to play with Padrino
<JonnieCache>
httparty is good too
ABK has joined #ruby
Axsuul has joined #ruby
<JonnieCache>
ctor: but if you need to do more heavy duty downloading/requesting then the curl libraries are good
<csmrfx>
ah well I'm outta here
zastaph has joined #ruby
<ctor>
JonnieCache: I'll be doing a bit more requesting so I'm looking at the curl libraries. Namely curb at the moment.
Ontolog has joined #ruby
<JonnieCache>
curb is the more usual one i think
<ctor>
I'm running into an issue where the system can't find libcurl at the moment.
scastillo has joined #ruby
hekin has quit [Quit: hekin]
Goles has quit [Read error: Connection reset by peer]
<JonnieCache>
you have to install libcurl separately
schickung_ has joined #ruby
<JonnieCache>
what OS are you on?
<ctor>
Windows
<JonnieCache>
ah.
savage- has joined #ruby
<ctor>
I used the RubyInstaller and the DevKit
<JonnieCache>
cant help there im afraid.
<JonnieCache>
im sure there are many resources out there, curl is a common need
brasten has joined #ruby
macmartine has quit [Quit: macmartine]
aroman has quit [Quit: aroman]
schickung has quit [Ping timeout: 264 seconds]
schickung_ is now known as schickung
Jackneill_ has joined #ruby
fermion has quit [Ping timeout: 248 seconds]
axl_ has quit [Ping timeout: 240 seconds]
williamcotton_ has joined #ruby
billiamii has quit [Read error: Operation timed out]
conor_ireland has joined #ruby
adeponte has joined #ruby
zastaph has quit []
apok has joined #ruby
cakehero has joined #ruby
conor_ireland has quit [Client Quit]
davidpk has joined #ruby
conor_ireland has joined #ruby
T_Rex_ has joined #ruby
tewecske has joined #ruby
cjk101010 has joined #ruby
b26 has joined #ruby
`brendan has quit [Ping timeout: 245 seconds]
b26 is now known as `brendan
erichmenge has joined #ruby
m_3 has quit [Remote host closed the connection]
apok has quit [Remote host closed the connection]
apok has joined #ruby
socomm has joined #ruby
booginga has left #ruby ["Leaving"]
Ontolog has quit [Remote host closed the connection]
Ontolog has joined #ruby
jgrevich has joined #ruby
ABK has quit [Ping timeout: 248 seconds]
m_3 has joined #ruby
TheHairyWoodsman has joined #ruby
Ontolog has quit [Ping timeout: 245 seconds]
oscardelben has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
oscardelben has quit [Client Quit]
banghouse2 is now known as banghouse
itnomad has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
bluenemo has quit [Read error: Connection reset by peer]
Testish has joined #ruby
<Testish>
I want to add a global post-condition to my test-unit tests. I'd add this to Test::Unit::TestCase.startup/shutdown, except that some of the tests already use these hooks and I think I'd have to modify them to all call super... Is there a better way?
Vert has joined #ruby
TPFC-SYSTEM has joined #ruby
billiamii has joined #ruby
randomautomator has joined #ruby
bradhe has joined #ruby
chienpo has joined #ruby
hydrozen has joined #ruby
ABK has joined #ruby
mengu has quit [Quit: Konversation terminated!]
minijupe has quit [Quit: minijupe]
ABK has quit [Read error: Connection reset by peer]
bricker88 has joined #ruby
centipedefarmer has joined #ruby
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
kidoz has joined #ruby
ABK has joined #ruby
moshef has joined #ruby
a_a_g has quit [Quit: Leaving.]
<moshef>
I have an array and I want to go over each object and add it to an hash, and count how many times I added it. so lets say I got [2,0,1,2,3,1,2] and i go over each, and if it equals to 2 i will add to the hash, so i will eventually have something like {:2 => 3}
<moshef>
key being the number, and the value being the amount of times it was 'collected'
Yugo has quit [Quit: Computer has gone to sleep.]
ABK has quit [Read error: Connection reset by peer]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<TheHairyWoodsman>
@shevy : sorry for late response for gems naming/forking. I think the only option is to include a branch name or other qualifier in the gem name itself
<shevy>
TheHairyWoodsman: I don't like this, it seems to make gem names longer and more complicated or? I prefer require 'foo' over require 'new_foo'
apok_ has joined #ruby
stephenjudkins has quit [Client Quit]
gducharme has joined #ruby
<workmad3>
TheHairyWoodsman: ruby versions do allow that... e.g. bundler v 1.2.0.rc1
<TheHairyWoodsman>
I don't like it either; I'd rather do this: gem 'files', '0.2.0-branch_junk'
<TheHairyWoodsman>
do they?
<TheHairyWoodsman>
I know they allow it
<moshef>
canton7: thanks, now seems to work. weird
<TheHairyWoodsman>
but I didn't see 'latest' behvar work correctly
<workmad3>
TheHairyWoodsman: yup... they count as pre-release gems on rubygems
<gducharme>
I'm wondering what people here would recommend to debug a "exception reentered fatal" error?
jimeh has quit [Ping timeout: 265 seconds]
<workmad3>
TheHairyWoodsman: so you need to give it the --pre flag to install
apok has quit [Read error: Operation timed out]
apok_ is now known as apok
Ontolog has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 240 seconds]
<TheHairyWoodsman>
I tried this… 'master-0' and '0-master' as av ersion, and it gave me all sorts of errors
quest88 has joined #ruby
<TheHairyWoodsman>
give what, bundler?
<gducharme>
I just tried running gdb on the process to gain more info… nothing
stephenjudkins has joined #ruby
<gducharme>
And exception reentered doesn't give a stack trace
dhruvasagar has quit [Ping timeout: 246 seconds]
<TheHairyWoodsman>
wel, that's good though. if I fork gem X on github, and it's at version 0.2.1, then I could update the version to 0.2.1.myname or something
<workmad3>
TheHairyWoodsman: the --pre is for the gem install, for bundler if a pre-release version exists with that sort of thing in the number, you need to specify an exact version
cdavaz has joined #ruby
<TheHairyWoodsman>
fair enough
<workmad3>
TheHairyWoodsman: or, if you're pulling it from github, you can always pull the gem directly from github with bundler :)
niklasb has joined #ruby
<TheHairyWoodsman>
I know, I don't like that though :)
<TheHairyWoodsman>
ok ok I donl ike it
cdavaz is now known as Ontolog
<TheHairyWoodsman>
I do like it *
yoklov has joined #ruby
<TheHairyWoodsman>
but I do think the gem should be able to go to rubygems 'properly'
<TheHairyWoodsman>
and it soudns like it can…
<workmad3>
TheHairyWoodsman: well, it could... but you won't be able to do it
<workmad3>
TheHairyWoodsman: only the gem author can push new releases
stephenjudkins has quit [Client Quit]
<TheHairyWoodsman>
ohh! crap
<TheHairyWoodsman>
then I have to rename the gem
<shevy>
yeah
ringotwo has joined #ruby
<shevy>
which kinda sucks
<workmad3>
TheHairyWoodsman: otherwise you could have anyone releasing random crap under other peoples gems on github :P
<TheHairyWoodsman>
so rubygems.org needs to allow 'prereleases' to come from non-authors :)
<shevy>
something like a forking-scheme for rubygems.org would be nice
<workmad3>
TheHairyWoodsman: big, big security issues with that though
<TheHairyWoodsman>
if bundle rforces you to specify the exact version
<blazes816>
that would be horrible
<TheHairyWoodsman>
it's a deliberate act to get a prerelease
<Mon_Ouie>
So is getting the latest version of a gem
<workmad3>
TheHairyWoodsman: yeah, but bundler isn't the only way to install gems
<TheHairyWoodsman>
right, so what's the issue?
<TheHairyWoodsman>
oh
<TheHairyWoodsman>
well, idk what to tell you
<workmad3>
TheHairyWoodsman: gem install "bundler" --pre <-- that will get the 'latest' prerelease gem
<TheHairyWoodsman>
why do u trust anything from anywhere? it's all an issue imo
<TheHairyWoodsman>
its' just another way you can be screwed
saschagehlich has quit [Ping timeout: 265 seconds]
<TheHairyWoodsman>
nothing says a open source project on github doesn't have malicious code in it
<TheHairyWoodsman>
and no one 'noticed'. it's not safe inherently
<workmad3>
TheHairyWoodsman: no, but at least all the ways you *can* get that are explicit, opt-in
<blazes816>
it's about trust
<Mon_Ouie>
It's *way* safer than allowing a random guy to update it
<blazes816>
Rails may have massive vulnerabilities. Some could even be intentional. But probably not.
artOfWar has joined #ruby
chrismcg is now known as zz_chrismcg
graspee has quit [Quit: leaving]
<blazes816>
Whereas Pete's Swanky Framework on the hand is more suspect
<blazes816>
other hand*
<workmad3>
TheHairyWoodsman: whereas there are ways to get pre-release gems that don't require you to specify the exact version... therefore letting anyone update a gem, even with prerelease versions, means you now need to trust everyone, not just the gem author
<TheHairyWoodsman>
all of this is moot imo. If you agree that rubygems + gem naming should allow a forked gem to go up with another author, then fine, maybe the suggestion has security implimications but it doesn't change there may be value
<TheHairyWoodsman>
so, fine, make —pre only get stuff from the original author
<workmad3>
TheHairyWoodsman: I don't agree with that though
<TheHairyWoodsman>
gem —pre —anyauthor will look further?
artOfWar_ has joined #ruby
<blazes816>
Perhaps allow you specify author
<TheHairyWoodsman>
yeah
<TheHairyWoodsman>
there u go
<blazes816>
gem install rails --author ryanb
ttilley_off is now known as ttilley
<TheHairyWoodsman>
bottom line is, don't change gem's existing behavior. add a new flag
<TheHairyWoodsman>
no surprises
<workmad3>
and besides, authorship is an aspect of updating on rubygems.org, not an aspect of the rubygems tool
<shevy>
how can I enable "gem yank" again? yank is not recognized yet hmm
<blazes816>
yeah, it'd most likely need to work in conjunction with github
<TheHairyWoodsman>
i know there are separate, but the overall common workflow is intertwined with both
fowl has quit [Ping timeout: 246 seconds]
<TheHairyWoodsman>
but clearly they each have their own responsibility
<TheHairyWoodsman>
you could also extend the versioning scheme of gems. if you it's 0.0.0-branch_name
<TheHairyWoodsman>
version plus a '-' means 'not mainline'
<TheHairyWoodsman>
even different than prerelease
<TheHairyWoodsman>
that seems to be to be an important part of this overall suggestion
rramsden has joined #ruby
<blazes816>
That just ties forks to the trunks
rramsden has left #ruby [#ruby]
<workmad3>
yeah, and moves rubygems.org away from being a place to release gems
mwilson_ has quit [Excess Flood]
<TheHairyWoodsman>
the name of the gem and/or the version should 'semantically' indicate that this isn't the original authors work, necessarily
<workmad3>
to being a place for all and sundry gem development versions to be there
mwilson_ has joined #ruby
<TheHairyWoodsman>
ok, so, forked-rubygems.org )
<TheHairyWoodsman>
:) *
<workmad3>
TheHairyWoodsman: just set it up ;)
<TheHairyWoodsman>
with a different policy
<TheHairyWoodsman>
yeah np
<blazes816>
TheHairyWoodsman, I think the root issue is single-use naming. Me creating a gem called "awesome-o" shouldn't mean nobody else can every make a gem of that name that isn't related.
<workmad3>
TheHairyWoodsman: you wouldn't need to modify gem to do it, just set up a gem repository and let people use it
<blazes816>
yeah, rubygems.org is rollin the dough
kevinbond has quit [Quit: kevinbond]
<shevy>
hehe
<TheHairyWoodsman>
no no I mean they must pay alot for bandwidth :)
artOfWar has quit [Ping timeout: 248 seconds]
<TheHairyWoodsman>
not the other way around
<blazes816>
gotcha
<blazes816>
for sure
<workmad3>
I think they're supported by places like engineyard
<TheHairyWoodsman>
so blazes816, I don't relaly care if the gem name changes, or if the version changes
<TheHairyWoodsman>
in my way of thinking, they both combine to make the unique identifier. Pick one that stinks the least
<TheHairyWoodsman>
and then roll with that as your convention
khakimov has quit [Quit: Computer has gone to sleep.]
<TheHairyWoodsman>
but apparently there is no convention
<TheHairyWoodsman>
and this is all just jibber jabber atm :)
<workmad3>
TheHairyWoodsman: no, because then you're really getting outside of the point of a release repository :)
<TheHairyWoodsman>
some package formats do accounts for this, or, at least, give you enough flexibilty to handle this
apok has quit [Remote host closed the connection]
elhu has quit [Ping timeout: 252 seconds]
<TheHairyWoodsman>
ok, so I didn't appreciate that rubygems.org assumse 'release'
apok has joined #ruby
<TheHairyWoodsman>
so if that's a part of the equatinon
<TheHairyWoodsman>
there really should be a different domain for this
<TheHairyWoodsman>
that's fine
<blazes816>
, :git => 'http:github.com/foo/bar'
<workmad3>
TheHairyWoodsman: yeah... or you just use bundler to pull in gems from github for arbitrary, non-released versions ;)
<TheHairyWoodsman>
i hate u guys
<TheHairyWoodsman>
:)
saschagehlich has joined #ruby
<TheHairyWoodsman>
fine. I'll chew on that for a while
<TheHairyWoodsman>
I just don't like it. It assumes a git workflow (as do all these tools and ruby, these days)
<workmad3>
TheHairyWoodsman: and for your specifiers... ':git => 'https://github.com/foo/bar.git', :branch => "foobar" '
<TheHairyWoodsman>
I love and use git, but that feels fundamentally wrong, if not very expedient :)
<blazes816>
Add support for, :bzr, :svn, :merc
<workmad3>
^^
ABK has joined #ruby
Vert has quit [Ping timeout: 252 seconds]
<workmad3>
TheHairyWoodsman: also, you can push to github via svn and mercurial, and probably bazaar too :)
<blazes816>
if you.....really.......want to
brianpWins has joined #ruby
KL-7 has quit [Quit: This computer has gone to sleep]
<blazes816>
bzr and svn that is
<workmad3>
TheHairyWoodsman: or you have a deployment strategy that pulls the gem down with svn separately, and you use :path to specify it...
<TheHairyWoodsman>
I'm very repo centric as it relates to this problem. imo the repo mechanism should 'have a way'. but again, I'll obsess over it quietly for a bit. It bothers me though, today, that I forked a tree, and don't know what I should change the version to.. or the gem file to. I guess I'll just tack on .myname
<TheHairyWoodsman>
internally, our build server pushes gems to our own gem repo
<TheHairyWoodsman>
but even then, I can't version it in a way that doesn't stink
Jackneill_ has quit [Ping timeout: 246 seconds]
<TheHairyWoodsman>
look, it's not the end of the world, just asking :)
xbayrockx has quit []
adamkittelson has joined #ruby
<TheHairyWoodsman>
trying to understand better
<workmad3>
TheHairyWoodsman: if you have your own gem repo, you can shadow the rubygems version with your own version ;)
<TheHairyWoodsman>
yeah but the version!!
<TheHairyWoodsman>
i must rename the version.. I must!!
ABK has quit [Read error: Connection reset by peer]
<TheHairyWoodsman>
it bothers me so much to leave it the same :)
<blazes816>
once you've forked it, it's fundamentally a different gem
<TheHairyWoodsman>
hmmmm
<TheHairyWoodsman>
so I'll give it a new name!
<TheHairyWoodsman>
like I said initially! :)
<TheHairyWoodsman>
and make horrid horrid named gems
<blazes816>
fork Gem-3.3.2, to OurGem-0.0.1
<workmad3>
TheHairyWoodsman: think about it like this... the fact it's on a different gem repo gives you the fact it's a different gem ;)
<workmad3>
or change the name, yeah
<blazes816>
or fork Gem-3.3.2 to Gem-0.0.1 shadowed on your local repo
<TheHairyWoodsman>
you ever use maven?
<TheHairyWoodsman>
maven has concept of release repos… and snapshot repos
<blazes816>
ew
<TheHairyWoodsman>
lol
<workmad3>
TheHairyWoodsman: rails from funky-gem-repo.com shouldn't imply any relationship to rails from rubygems.org
patient has joined #ruby
<blazes816>
jk. i've never used it deeply
<workmad3>
and yes, I have touched on maven at times
<TheHairyWoodsman>
anyway, maven does versioning of dependencies very flexibly. Even better is ivy, but that's a different story
<TheHairyWoodsman>
workmad3: I agree
rippa has joined #ruby
<workmad3>
TheHairyWoodsman: it's things like this that make me think of bundler as more a provisioner than a dependency management tool, btw :)
vitoravelino`afk is now known as vitoravelino
<TheHairyWoodsman>
I do believe there is one level of granularity here missing. going to github is like ultra granularity, and powerful. going to rubygems.org is great for releases. But I can't permantely fork a project without renaming the gem. And maybe that's correct. It just feels a little odd
hynkle has joined #ruby
<TheHairyWoodsman>
well, it's both :)
<Testish>
Having looked around test-unit a bit I was considering using TestCase.inherited (overriding it) to use DerivedTestClass.setup/cleanup to register hooks on all tests without having to interfere with already written setup/teardown blocks. Does this seem reasonable?
yoklov has quit [Quit: computer sleeping]
<TheHairyWoodsman>
as long as it supports reading that gemfile…
Spooner_ has joined #ruby
claudiu has quit [Ping timeout: 246 seconds]
<workmad3>
TheHairyWoodsman: it does mean that the versions are being dual-used in bundler though... you're using it both as a tag saying "I need something that fulfils the job of rails 3.2.6" and as an actual version for dependency management
<blazes816>
Bundler is like a dependency injector
<blazes816>
shootin up your projects since 2010
Spooner has quit [Ping timeout: 250 seconds]
<TheHairyWoodsman>
maybe that is the work flow. If you fork, and u assume that the author will eventually merge, fine, go to github directly in gemfile . If you fork and they *never do*, eventually you have to say. Well. this is a new project. It's a permanent fork. So it's getting a new name. So I guess … I'm happy now :
<TheHairyWoodsman>
: )
<workmad3>
TheHairyWoodsman: which is really where your issue is coming from, I believe... you want to specify that you're using X to fulfil the job providing the (implicit) interface of Y v2 (for example)
<workmad3>
blazes816: heh :)
<TheHairyWoodsman>
I'm not really sure if I follow, but I think I'm ok… I guess I *don't* change a version of a just-forked repo, because I'm assuming I won't publish it officially. Only if and when they never merge, and I continue to care about that gem, do I rename it
hadees has joined #ruby
<TheHairyWoodsman>
bah. I will say this, though. internally, with our own gem repository, I make it so that the build server makes non-master gem builds have a modified gem name of gem_branch
<TheHairyWoodsman>
because I could see no better way to convey the branch
<TheHairyWoodsman>
but I guess it should be .branch on version
Spooner_ is now known as Spooner
<TheHairyWoodsman>
and force someone to do —pre or specify exact versin. I just don't like that, either, becuase often you actually want 'latest' version functionalty when you are in a tight iteratino
<TheHairyWoodsman>
so actually having a uniquely named gem for that branch is the only way I can omit the version and have bundle be happy
<TheHairyWoodsman>
…. and so that's what I di d:)
<TheHairyWoodsman>
in a tight iteration *
<TheHairyWoodsman>
< typo king
<workmad3>
well, as long as you're happy :)
<TheHairyWoodsman>
I'm not. I want the branch in the version. but I'll get over it
<TheHairyWoodsman>
and cry in my socks or something
b26 has joined #ruby
Enekoos has joined #ruby
Enekoos has quit [Remote host closed the connection]
`brendan has quit [Ping timeout: 265 seconds]
b26 is now known as `brendan
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
linoj_ has joined #ruby
kenichi has joined #ruby
shadoi has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
ABK has joined #ruby
davidw has joined #ruby
davidw is now known as Guest75876
<shevy>
hehe
<shevy>
better cry than pee in them
linoj has quit [Ping timeout: 240 seconds]
ABK has quit [Read error: Connection reset by peer]
linoj_ is now known as linoj
havenn has joined #ruby
<TheHairyWoodsman>
hey, you got 2 of em
<shevy>
I think the future would be a merger of github and rubygems... based on popularity
<TheHairyWoodsman>
just go big
<shevy>
rubyforge is pretty much dead
ABK has joined #ruby
mayankkohaley_ has joined #ruby
mayankkohaley has quit [Read error: Connection reset by peer]
mayankkohaley_ is now known as mayankkohaley
DDAZZA has joined #ruby
TheShadowFog has quit [Ping timeout: 264 seconds]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
kvirani has quit [Remote host closed the connection]
Dave has joined #ruby
wingy has joined #ruby
wingy has left #ruby ["WeeChat 0.3.6"]
Dave is now known as Guest75568
jstew has joined #ruby
carloslopes has joined #ruby
Guest75568 has left #ruby [#ruby]
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
williamcotton__ has joined #ruby
ABK has joined #ruby
DDAZZA has quit [Quit: Leaving]
williamcotton has quit [Ping timeout: 245 seconds]
williamcotton_ is now known as williamcotton
DDAZZA has joined #ruby
ABK has quit [Read error: Connection reset by peer]
greasegum has quit [Read error: Operation timed out]
mrsolo has joined #ruby
<gducharme>
has somebody dealt with "exception reentered"?
atmosx has quit [Remote host closed the connection]
AngryMan has quit [Ping timeout: 252 seconds]
atmosx has joined #ruby
tvw has quit [Remote host closed the connection]
Demego has quit [Read error: Connection reset by peer]
laen_ has quit [Read error: Operation timed out]
ken_barber has quit [Remote host closed the connection]
<Tasser>
wtf?
gauloises has joined #ruby
mdszy has quit [Quit: bye for now]
<shevy>
lol
arturaz has quit [Ping timeout: 246 seconds]
anothervenue has quit [Quit: WeeChat 0.3.8]
anothervenue has joined #ruby
kvirani has joined #ruby
fantazo has joined #ruby
Markvilla has joined #ruby
bigkevmcd has quit [Ping timeout: 245 seconds]
<atmosx>
again and again
<atmosx>
parapam
<atmosx>
2 internet connections in two countries and both sucks
level09 has joined #ruby
<atmosx>
how is this possible, am I lucky or what? heh
snearch has joined #ruby
ABK has joined #ruby
`brendan has quit [Ping timeout: 256 seconds]
bigkevmcd has joined #ruby
znow has joined #ruby
<znow>
goodevening! Ive encountered a weird problem after and rails update (I guess), Im using Ystock gem to fetch stocks from Yahoo Finance, using a rake task to update the stock information, though I get "cant convert symbol to integer", what could be the issue? https://gist.github.com/ab8650f6861ead915151
<level09>
i'm totally new to ruby, trying to run a server but got the following errors : http://pastie.org/4239176
<znow>
beaware this is not a rails problem though, could be ruby
<atmosx>
so there is people still using ruby1.9
<yxhuvud>
znow: did you upgrade ruby version as well?
<atmosx>
err 1.8
sunnybg has joined #ruby
<atmosx>
sad
ABK has quit [Read error: Connection reset by peer]
<znow>
yxhuvud: should be running at 1.9.3 :)
jfelchner has joined #ruby
<yxhuvud>
atmosx: we are, sadly.
<level09>
how do I upgrade ?
<atmosx>
level09: rvm
ABK has joined #ruby
<level09>
I just installed that
<atmosx>
cool
<yxhuvud>
znow: I see that you are, but symbol#to_int was removed in 1.9
<atmosx>
now tell yuour app to use it
<znow>
yxhuvud: yeah :S
linoj has quit [Quit: linoj]
<yxhuvud>
znow: meaning that anything tried to coerce it and succeded will now fail.
<level09>
atmosx: I'm actually watching a js screencast which uses ruby as a dev server , not really a ruby expert
<level09>
on my mac I think I made a mistake of having homebrew and macports together
<znow>
yxhuvud: oh :S
<znow>
yxhuvud: well, yes... hmm, made no sence to me though ;)
linoj has joined #ruby
<yxhuvud>
znow: what is happening is that someone is indexing an array by a symbol instead of an int.
<yxhuvud>
or something like that.
<znow>
yxhuvud: okay, how can I (try) to fix this?
larissa has joined #ruby
moshef has quit [Quit: moshef]
<yxhuvud>
follow the call chain. find the first method that gets incorrect arguments
ABK has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ABK has joined #ruby
Markvilla has quit [Ping timeout: 244 seconds]
Aaton_off is now known as Aaton
\k has joined #ruby
\13k has quit [Remote host closed the connection]
\k has quit [Client Quit]
<znow>
yxhuvud: ive gisted my output, would you please make my day and lead me through it? ;) I havent made this script though
adamkittelson has quit [Remote host closed the connection]
Doc_X has quit [Read error: Connection reset by peer]
Markvilla has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
dnyy has joined #ruby
ABK has quit [Read error: Connection reset by peer]
Doc_X has joined #ruby
krusty_ar has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
ABK has joined #ruby
greasegum has joined #ruby
<Synthead>
is there a way I can do class This; attr_accessor :that; def initialize(@that); ... end; end ? (with an instance variable?) I want to be able to do a = This.new('that') and have This's @that be declared as 'that'
ABK has quit [Read error: Connection reset by peer]
<Synthead>
s/This's/a's/
<yxhuvud>
start looking in /var/www/apps/advicecapital/releases/20120711175558/lib/tasks/stock_info_update.rake . Find the error. Try to find where the symbol comes from. I can't help more than that
btanaka has joined #ruby
ABK has joined #ruby
<yxhuvud>
Synthead: not in 1.9
<Synthead>
yxhuvud: what versions can you do it in?
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<yxhuvud>
1.8 iirc. I suggest you don't.
<Synthead>
yxhuvud: right on. I'll make something work.
ABK has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
ABK has joined #ruby
dr_bob has joined #ruby
ABK has quit [Read error: Connection reset by peer]
havenn has quit [Remote host closed the connection]
williamcotton has quit [Quit: williamcotton]
williamcotton__ is now known as williamcotton
stephenjudkins has joined #ruby
ABK has joined #ruby
c0rn_ has joined #ruby
grekkos has joined #ruby
grekkos is now known as Guest91217
ABK has quit [Read error: Connection reset by peer]
wintorez has left #ruby [#ruby]
ABK has joined #ruby
Eldariof-ru has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
ABK has quit [Remote host closed the connection]
mahlon has quit [Remote host closed the connection]
mahlon has joined #ruby
RainbowDashh has joined #ruby
oojr has joined #ruby
ananthakumaran has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
ananthakumaran has quit [Client Quit]
ananthakumaran has joined #ruby
atmosx has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
Niamkik has joined #ruby
johnlcox has joined #ruby
anothervenue has quit [Quit: WeeChat 0.3.8]
anothervenue has joined #ruby
havenn has joined #ruby
nachtwandler has quit [Ping timeout: 244 seconds]
<carloslopes>
shevy: are you there?
blazes816 has joined #ruby
<shevy>
yeah
<shevy>
trying to compile xchat... weechat is killing me
<carloslopes>
shevy: hahaha i was using xchat but now i'm trying pidgin :)
<carloslopes>
shevy: man.. what IDE you use for program in C?
saschagehlich has joined #ruby
<carloslopes>
to program*
<shevy>
dont really use any IDE so far
<shevy>
I alternate between the GTK based ones usually.... bluefish geany gedit... perhaps will give sublime a try next...
yy is now known as awayy
<carloslopes>
shevy: yes.. i use sublime when i'm programming ruby.. i will search if it has packages for improve the experience when programming in c
vlad_starkov has joined #ruby
<carloslopes>
shevy: i installed eclipse c /c++ but the ide interface is sucks here in my machine
`brendan has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<shevy>
I dunno, it feels as if someone designed it to purposely jump into my way everytime I try to do something with it
<sanjay7>
any body plz help me
sanjay7 has quit [Client Quit]
<ekaleido>
hard to help when a question is never asked :(
mdszy has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
greasegum has quit [Ping timeout: 245 seconds]
rizzy has joined #ruby
nachtwandler has joined #ruby
kenichi has quit [Remote host closed the connection]
berkes has joined #ruby
Niamkik has quit [Remote host closed the connection]
mrsolo has joined #ruby
<carloslopes>
shevy: yeah :/
adamkittelson has joined #ruby
<shevy>
people just got no patience these days
jimeh has joined #ruby
greasegum has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
laen_ has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
mredwtfe has joined #ruby
stephenjudkins has joined #ruby
mredwtfe has left #ruby [#ruby]
emanu has joined #ruby
davidamcclain has joined #ruby
sunnybg has quit [Quit: ChatZilla 0.9.88.2 [Firefox 13.0/2012060100]]
minijupe has joined #ruby
bbttxu_ has joined #ruby
johnlcox has quit [Ping timeout: 248 seconds]
bbttxu_ has quit [Read error: Connection reset by peer]
bbttxu has joined #ruby
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
mnaser has joined #ruby
thecreators has quit [Quit: thecreators]
mdszy has quit [Quit: bye for now]
stephenjudkins has quit [Quit: stephenjudkins]
kawaguchi has joined #ruby
Nilbus has joined #ruby
Nilbus has left #ruby ["AIEEE! Kernel panic!"]
dkissell_ has joined #ruby
zommi has quit [Remote host closed the connection]
seoaqua has quit [Ping timeout: 245 seconds]
jlwestsr has quit [Quit: Leaving]
dkissell has quit [Ping timeout: 265 seconds]
dkissell_ is now known as dkissell
williamcotton has quit [Ping timeout: 255 seconds]
williamcotton has joined #ruby
rizzy has quit [Ping timeout: 246 seconds]
strife25 has quit [Ping timeout: 248 seconds]
reuf has joined #ruby
PaciFisT has quit [Quit: Leaving.]
Berglund has joined #ruby
<theRoUS_>
Paradox: you have an opinion on bundler, yes?
thecreators has joined #ruby
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
theRoUS has quit [Disconnected by services]
theRoUS_ is now known as theRoUS
rizzy has joined #ruby
theRoUS_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
rking has quit [Quit: BRB - Restarting IRC client to check on memory footprint reduction.]
rizzy_ has joined #ruby
rking has joined #ruby
davidamcclain has quit [Quit: davidamcclain]
iamjarvo has joined #ruby
kristofferrr has joined #ruby
mahmoudimus has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
imami|afk is now known as banseljaj
<Testish>
If anyone else had wondered how to automatically wrap tests to check a global post-condition, I did it by aliasing Test::Unit::TestCase.inherited(klass) and adding klass.teardown(:after => :append) { check_goes_here } for all subclasses. It seems to work well.
zemanel has quit [Quit: zemanel]
dnyy has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
pygospa is now known as apsogyp
davidamcclain has joined #ruby
adamkittelson has quit [Remote host closed the connection]
pu22l3r has joined #ruby
davidamcclain has quit [Client Quit]
thecreators has quit [Quit: thecreators]
rizzy has quit [Remote host closed the connection]
rizzy_ has quit [Read error: Connection reset by peer]
awayy is now known as yy
oojr has quit [Quit: Page closed]
nachtwandler has quit [Ping timeout: 265 seconds]
minijupe has quit [Quit: minijupe]
strife25 has joined #ruby
snearch has quit [Quit: Verlassend]
dr_bob has left #ruby [#ruby]
fowl has joined #ruby
mwilson_ has quit [Excess Flood]
mdszy has joined #ruby
fermion has joined #ruby
mwilson_ has joined #ruby
minijupe has joined #ruby
znow has quit [Quit: Page closed]
davidamcclain has joined #ruby
bricker881 has joined #ruby
zemanel has joined #ruby
bricker882 has joined #ruby
bricker88 has quit [Ping timeout: 252 seconds]
zentrification has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
bricker881 has quit [Ping timeout: 255 seconds]
robbyoconnor has quit [Ping timeout: 246 seconds]
yxhuvud has quit [Ping timeout: 265 seconds]
DrShoggoth has joined #ruby
yoklov has joined #ruby
kirun has joined #ruby
kawaguchi has quit [Quit: Leaving]
anothervenue has quit [Quit: WeeChat 0.3.8]
anothervenue has joined #ruby
Eldariof-ru has quit []
thecreators has joined #ruby
mpereira has quit [Ping timeout: 240 seconds]
wobr has joined #ruby
itnomad has quit [Quit: Leaving]
jonathanwallace has joined #ruby
donsd has joined #ruby
ringotwo has quit [Read error: Connection reset by peer]
ringotwo has joined #ruby
stephenjudkins has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
TheFuzzball has quit [Quit: Leaving...]
jonatha__ has joined #ruby
conor_ireland has joined #ruby
Icoin has joined #ruby
rizzy has joined #ruby
<Icoin>
hi i try to install capybara-webkit get installed on ubuntu 12.04 do you guys have any hints ?
<blazes816>
Icoin: gem install capybara-webkit?
DDAZZA has quit [Ping timeout: 252 seconds]
<Icoin>
yeah doesnt work
jonathanwallace has quit [Ping timeout: 255 seconds]
aroman has joined #ruby
<blazes816>
in which of many possible ways?
patient has quit [Ping timeout: 246 seconds]
polysics_ has joined #ruby
<Icoin>
when i do gem install capybara-webkit i get a err msg: error installing capybara-webkit
ken_barber has joined #ruby
dnyy has joined #ruby
platzhirsch has joined #ruby
<Icoin>
what version of the webkit is usable for 12.04
<Icoin>
0.1.1 seems not to work
<platzhirsch>
Is it possible to define a block of variables and convert them into an array?
<Icoin>
and 0.12.1 not aswell
polysics has quit [Ping timeout: 248 seconds]
enroxorz has quit [Quit: Leaving]
linoj has quit [Ping timeout: 244 seconds]
<v0n>
hi
Z_Mass has quit [Quit: Leaving]
<v0n>
what's the simplest way to get a page title from an url?
<blazes816>
v0n, use net::http to load the html, then use regex to find the text between <title> and </title>?
<Mon_Ouie>
Do not use regex
niklasb has quit [Ping timeout: 245 seconds]
<Mon_Ouie>
Use a proper HTML parser, e.g. Nokogiri
<blazes816>
he asked for simplest, otherwise I would've said Nokogiri
lampe2 has joined #ruby
<lampe2>
some one know a gem to help with a non linera graph data structure ?
KL-7 has quit [Quit: Leaving]
<v0n>
Nokogiri requires to build C extensions and so on, that's quite boring
blazes816 is now known as blazes816_new
blazes816_new is now known as blazes816
<v0n>
is there a pure Ruby alternative otherwise?
<canton7>
v0n, for very simple things like that, regex is probably acceptable
<offby1>
banisterfiend: aw, I had to shut down "pry" after the prompt got up to 928
<canton7>
for *anything* more complex, get an xml parser
<v0n>
canton7, blazes816 is Net::HTTP better than open-uri?
<blazes816>
v0n, go for open-uri if you want
<canton7>
v0n, iirc open-uri is a wrapper around Net::HTTP. Use whatever you want (open-uri is easlier, at least for simple stuff)
<Mon_Ouie>
open-uri is just a fancy interface to access Net::HTTP and other libraries with open(…)
<blazes816>
that's fine
<v0n>
thanks
patient has joined #ruby
rippa has quit [Ping timeout: 255 seconds]
rdg has joined #ruby
sepp2k1 has joined #ruby
sepp2k has quit [Ping timeout: 264 seconds]
gee_totes has joined #ruby
fantazo has quit [Remote host closed the connection]
pk1001100011_ has joined #ruby
jonathanwallace has joined #ruby
pk1001100011_ has quit [Remote host closed the connection]
jonatha__ has quit [Ping timeout: 244 seconds]
kjellski_ has quit [Quit: Leaving]
minijupe has quit [Quit: minijupe]
jsilver has joined #ruby
vlad_starkov has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
polysics_ has quit [Ping timeout: 255 seconds]
rdg has quit [Quit: ttfn]
minijupe has joined #ruby
aroman has quit [Read error: Connection reset by peer]
aroman_ has joined #ruby
jsilver has quit [Remote host closed the connection]
aroman_ has quit [Read error: Connection reset by peer]
aroman has joined #ruby
platzhirsch has left #ruby [#ruby]
jsilver has joined #ruby
lampe2 has quit [Quit: Leaving]
dkissell_ has joined #ruby
nilg has quit [Remote host closed the connection]
sepp2k1 has quit [Quit: Leaving.]
dkissell has quit [Ping timeout: 240 seconds]
dkissell_ is now known as dkissell
jsilver has quit [Remote host closed the connection]
sepp2k has joined #ruby
jsilver has joined #ruby
`brendan has quit [Ping timeout: 246 seconds]
emanu has quit [Quit: emanu]
`brendan has joined #ruby
jlogsdon has joined #ruby
johnernaut has joined #ruby
Criztian has joined #ruby
TheFuzzball has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
g0bl1n has quit [Ping timeout: 240 seconds]
kristofferrr has quit [Quit: ❤]
polysics has joined #ruby
burgestrand has quit [Quit: Leaving.]
crates has joined #ruby
level09 has quit [Quit: level09]
schickung has quit [Quit: schickung]
jgrevich has quit [Read error: Connection reset by peer]
jgrevich has joined #ruby
randomau_ has joined #ruby
<luckyruby>
Hi, I have a ruby socket program that receives xml and converts it into an http GET request. I'm logging the xml request and generated http request. https://gist.github.com/3093516 What's a good way to replace the credit card # with [FILTERED] when using Logger?
Synthead has quit [Quit: p33 ba115]
tiripamwe has joined #ruby
robbyoconnor has joined #ruby
hynkle has quit [Quit: Computer has gone to sleep.]
randomautomator has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Remote host closed the connection]
<misza>
blazes816: 1. I dont "know in adcance the amount of data"; 2. Dont have termination sequence; 3. Client does not close socket after sending data to my server
gducharme has quit [Quit: gducharme]
<misza>
communication timeout is not rather perfect solution
<blazes816>
misza: so then you how can you know when you're done?
<blazes816>
you either need to send a term signal, have a communicated amount of data, or a closing of connections
<misza>
blazes816: after client send some data it waits for reply
<misza>
unfortunatly amount of data varies
<blazes816>
usually does
<blazes816>
so, for example, the server could wait until it has all the data
gauloises has quit [Quit: leaving]
banghouse is now known as banghouseAFK
<blazes816>
send x number of bytes communicated data length
<blazes816>
then the data
larissa has quit [Quit: Saindo]
bbttxu has quit [Quit: bbttxu]
Guest75876 has joined #ruby
conor_ireland has quit [Quit: conor_ireland]
Ankhers has quit [Remote host closed the connection]
<misza>
but server and client does not implement my own protocol
<misza>
they use ICAP
<misza>
my client is squid3
<misza>
and i write icap server
<misza>
icap is similar to httpp
<misza>
http
ryanf has joined #ruby
cmaujean_ has joined #ruby
<blazes816>
idk anything about ICAP
Morkel has quit [Quit: Morkel]
<misza>
it is very similar to http
<Paradox>
theRoUS_, it rocks
cmaujean has quit [Ping timeout: 252 seconds]
cmaujean_ is now known as cmaujean
Snugug has joined #ruby
<Snugug>
Hey Rubysts, how can I push a gem as a prerelease? gem push *gem* will push my gem to ruby gems, but I want to push a prerelease
<blazes816>
misza: havn't written an http server recently, not sure what to do. there's a python icap project you can check out for tips maybe
<shevy>
Snugug: what is a prerelease
minh1 has joined #ruby
emanu has joined #ruby
<misza>
blazes816: ok. i'll check it
<blazes816>
wish I could help more
<minh1>
Hi there! I wondered what's the reason for naming classes Foo::Bar instead of Bar? Is this merely a convention? Or is there some technical reason to do so? Any help is greatly appreciated.
<misza>
thanks for your time
emanu has quit [Client Quit]
<blazes816>
np, it's super cheap
misza has quit [Quit: leaving]
<shevy>
minh1: could be a module called Foo
<Snugug>
shevy: there are gems you can install, gem install gem --pre, that's a prerelease
<shevy>
aha Snugug, never saw that one before
davidamcclain has quit [Quit: davidamcclain]
<minh1>
shevy: so, does :: affect any scoping? Or is it just a convention?
<shevy>
minh1: :: is for scoping
<blazes816>
minh1: yes it does
<shevy>
it is more than a convention, it is valid ruby syntax
<blazes816>
Foo is a namespace
<blazes816>
it's the same as doing: module Foo; class Bar; end; end
<blazes816>
But, I think it will raise errors if you haven't defined Foo yet
<shevy>
minh1: without namespacing, class names could clash
<minh1>
blazes816, shevy: ah, I see! Thank you very much!
Guest75876 has quit [Ping timeout: 250 seconds]
<shevy>
clash is a bad word in ruby. in ruby a class would just be extended.
stewart_ has quit [Quit: Leaving.]
<shevy>
class Foo
<shevy>
then in another .rb file
<shevy>
class Foo
<shevy>
would extend the same class
<shevy>
but not if you would have a
<shevy>
Bla::Foo and a Ble::Foo class
stewart_ has joined #ruby
vlad_starkov has joined #ruby
<shevy>
dunno what happens in java or c#
<blazes816>
shevy: compiler error
nu7hatch has joined #ruby
<blazes816>
oh
<blazes816>
nevermind
<blazes816>
missed your last msg
banseljaj is now known as imami|afk
<blazes816>
I think that's fine, but that they can't be imported into the same namespace
<shevy>
hmmm I really should start to learn java
<shevy>
the verbosity scares me though :(
<offby1>
only if you want a job
<offby1>
shevy: I feel exactly the same way: a) I should learn it; b) the verbosity scares me
<blazes816>
mdszy: nice. I'm changing a random character and debugging it will be my new hiring test.
<mdszy>
and it outputs [5.0]
patient_ is now known as patient
<mdszy>
blazes816: haha, nice!
<hd1>
what does "Don't know how to reveal method 'methods'" mean? this is ruby 1.9, found only handwaving on the web without solution
<blazes816>
any reason for the []?
<mdszy>
blazes816: it's the stack
<mdszy>
it's initalized as empty
<blazes816>
ah
<blazes816>
nice
idegen has joined #ruby
<blazes816>
of course
<mdszy>
it's referenced throughout as _[1]
<blazes816>
that is a great name!
idegen has left #ruby [#ruby]
<mdszy>
XD
<mdszy>
and __ is the current input token, split by spaces (or whitespace, rather)
youdonotexist has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
andrewhl has quit [Remote host closed the connection]
<mdszy>
blazes816: You should get rid of the whitespace around the colons, and make that be your hiring test!
<blazes816>
lol
[Neurotic] has joined #ruby
<mdszy>
oh hey wait a second
* mdszy
tries something
<blazes816>
or just all spaces. "There are 101 spaces missing; add them"
<mdszy>
or not
krusty_ar has quit [Remote host closed the connection]
andrewhl has joined #ruby
<mdszy>
XD
<Snugug>
I figured it out. A gem version that contains alpha in its name gets released as a prerelease version. So versioning your your gem 1.0.alpha or 1.0.beta.0 will be released as a prerelease gem, installable through gem install mygem --pre
<mdszy>
is there any shorter way of making an array other than %w{stuff}?
chriskk has quit [Ping timeout: 264 seconds]
Snugug has quit [Quit: Snugug]
tommyvyo has quit [Read error: Connection reset by peer]
Doc_X has quit [Quit: Leaving.]
tommyvyo has joined #ruby
chriskk has joined #ruby
sonkei has quit [Ping timeout: 246 seconds]
<shevy>
mdszy: I think that is the shortest way
<shevy>
$w( cat dog ) == ['cat','dog']
<mdszy>
yeah
cmaujean_ has joined #ruby
<blazes816>
mdszy: but you can do a = %w~a b~ for fun if you like
cmaujean has quit [Read error: Connection reset by peer]
cmaujean_ is now known as cmaujean
<shevy>
%w%cat dog%
<hd1>
what does "Don't know how to reveal method 'methods'" mean? this is ruby 1.9, found only handwaving on the web without solution
<shevy>
tried %w cat dog
<shevy>
but this does not work
<shevy>
:(
<blazes816>
me too
<hd1>
1.9.3
<mdszy>
ah
<blazes816>
that was my first thought
<shevy>
hd1: reveal???
<blazes816>
which would BS
<workmad3>
shevy: bet it would work if you used a utf-8 non-breaking space :)
<shevy>
workmad3: hmm
<hd1>
%w('cat', 'dog')
<hd1>
that works
<blazes816>
mdszy: we're gonna cheat you into the history books
<mdszy>
XD
<mdszy>
hd1: but that's more characters than I want
<shevy>
well not a much of work saved when you use the '
<mdszy>
hd1: I'm golfing!
Progster has joined #ruby
<krz>
I've got ['foo', 'bar', 'bad'] how would i return foo, bar, baz?
<shevy>
:)
<hd1>
shevy: it seems to be one of those 1.9/1.8 thing
<krz>
join?
<shevy>
krz: what is this
<krz>
bad=baz
<krz>
array
<mdszy>
krz: a.join(', ')
<shevy>
but via .join he will get a string
alanp_ has joined #ruby
balki_ has joined #ruby
<mdszy>
shevy: that's what he wants
haskeller has joined #ruby
<mdszy>
krz: a.join(', ')
<mdszy>
=> "foo, bar, baz"
polysics has quit [Remote host closed the connection]
asobrasil has left #ruby [#ruby]
rizzy has quit [Quit: Leaving]
johnernaut has quit []
johnjohnson is now known as johnernaut
<workmad3>
shevy: bah, no it doesn't :(
greasegum has quit [Ping timeout: 255 seconds]
greasegum has joined #ruby
<mdszy>
whoop! all the way down to 156 now!
<Xethron>
Quick Q: I want to have a list of nicks for the people in a certain channel, and if they're identified. I thought of adding a hash inside a hash with the auth id or 0... so:
<Whoop>
mdszy: awesome!
<Xethron>
users["#Ruby"]["Xethron"] = "Xethron"
<mdszy>
XD
<Xethron>
Am I being crazy or does this seem good?
<mdszy>
Whoop: I feel bad for you, you must get hilighted a LOT XD
<shevy>
Xethron: dunno. seems superfluous as you already have the name or?
<shevy>
my_kill_list['Bill'] = 'Bill'
<otters>
well
<otters>
usually when I do that kind of thing, I do hash[room][username] = user object
<davidcelis>
Xethron: You're being crazy
<Whoop>
mdszy: only in here for some reason, despite being in ~200 channels. You guys get too excited
<Xethron>
shevy: I intend to populate it on join... So if it joins a channel, it creates the first hash. If it gets the list of users, it will whois everyone of them, and then set the nick and auth
<davidcelis>
Why would you have a hash where the key and value are identical
<davidcelis>
May as well be an array
<davidcelis>
Unless the value is a User object and not the same String as the key
balki has quit [Ping timeout: 265 seconds]
alanp has quit [Ping timeout: 265 seconds]
<otters>
yeah but it's easier to do hash[key] than array.include?(key)
berkes has quit [Quit: Ex-Chat]
<mdszy>
Whoop: I guess XD
<otters>
you could redefine [] but that would be silly
<davidcelis>
otters: Disagree
<otters>
let's count the characters shall we?
<Xethron>
davidcelis: Because you can identify for another nick or rename sometime.....
<otters>
hash[key] == 9
jsime has quit [Quit: Leaving]
<shevy>
you could name the hash h
<davidcelis>
otters: Disagree with your definition of "easier"
<shevy>
:P
<otters>
hash.include?(key) == 18
<shevy>
and you can omit the ()
<otters>
err wait
<otters>
16?
<otters>
i counted manually
<shevy>
dunno
conor_ireland has joined #ruby
<shevy>
I did not count at all, I'll let you count in good faith in you man
<davidcelis>
otters: you count the way you're now breathing
TheHairyWoodsman has quit [Quit: Leaving.]
Gavilan has joined #ruby
vlad_starkov has quit [Ping timeout: 246 seconds]
<shevy>
I am going to believe any number you will give me
<shevy>
except for 42
<mdszy>
Oh yeah! 145!
<otters>
davidcelis: I breathe that way constantly
<davidcelis>
otters: :(
wvms has joined #ruby
<mdszy>
boom! It can fit in a tweet now :D
<shevy>
wat
timonv has quit [Remote host closed the connection]
<atmosx>
I'll get my macbook air... but I'm not sure if they will have an internet connection. I hope I finally get to finnish my script (without intenret)
hynkle has joined #ruby
<atmosx>
so good night everyone :-)
<atmosx>
cya
<davidcelis>
jsilver: i like Messages, and Safari is better
<jsilver>
late
<jsilver>
ah
<scriabin>
I have an array of hashes like this: [{"name"=>"Bob", "age"=>41}, {"name"=>"Sally", "age"=>39}] I'm trying to figure out how to change each has so that "name" = "name" + "Smith". i.e. t.map {|e| e["name"] = "#{e['name'] Smith}"}
<jsilver>
davidcelis: do you know why you cant updgrade from preview to release like my co-worker is saying?
<scriabin>
but it doesn't work
<scriabin>
is map the right function for this?
<atmosx>
scriabin: not function, it's a 'method'
cjlicata has quit [Remote host closed the connection]
<davidcelis>
jsilver: Dunno, did it on my work machine and I quit my job. I'll be leaving before the full version comes out so I won't have to try lololol
<atmosx>
I was thinking that each was a cleaner solution, since I use :-P
<atmosx>
*use it
<atmosx>
anyway... good night rubiess
<weeb1e>
Hello World
ttilley is now known as ttilley_off
<weeb1e>
Has anyone ever created a global keyboard hook on Windows in ruby?
hadees has joined #ruby
<weeb1e>
Apparently it is possible using WinAPI, SetWindowsHookEx and WH_KEYBOARD_LL, but I have no experience with the Windows API or working with it from ruby :(
Snugug has joined #ruby
axiak has left #ruby [#ruby]
theRoUS has quit [Ping timeout: 244 seconds]
ttilley_off is now known as ttilley
hynkle has quit [Quit: Computer has gone to sleep.]
Snugug has quit [Client Quit]
Snugug has joined #ruby
Criztian has quit [Remote host closed the connection]
<reuf>
hello everyone - i was installing ruby using apt-get - the installation process got messed up - now whenever i try to install something else - it goes well, but at the end each time i get Errors were encountered while processing: ruby-rvm \n E: Sub-process /usr/bin/dpkg returned an error code (1)
<reuf>
how do i go about this?
<reuf>
to clean it
thecreators has joined #ruby
gducharme has quit [Ping timeout: 246 seconds]
gducharme has joined #ruby
dkissell_ has joined #ruby
robotmay has quit [Remote host closed the connection]
cmaujean has quit [Ping timeout: 246 seconds]
dkissell has quit [Ping timeout: 248 seconds]
dkissell_ is now known as dkissell
youdonotexist has quit [Quit: youdonotexist]
jlogsdon_ has joined #ruby
Croms has joined #ruby
krz has quit [Quit: krz]
cmaujean has joined #ruby
tommyvyo has joined #ruby
beilabs has quit [Ping timeout: 245 seconds]
level09 has joined #ruby
jlogsdon has quit [Ping timeout: 252 seconds]
Deele has quit [Ping timeout: 252 seconds]
minh1 has quit [Quit: WeeChat 0.3.8]
xaq has quit [Remote host closed the connection]
awarner has quit [Remote host closed the connection]
<Osum>
sudo aptitude clean
<Osum>
see if that heklps
<shevy>
shouldn't debian clean that up?
nari has quit [Read error: Operation timed out]
chienpo has left #ruby [#ruby]
<rking>
Oh wow. Debian + RVM ?
<rking>
That's a gnarly combo.
kevinbond has joined #ruby
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
kyktommy has joined #ruby
kenichi has quit [Remote host closed the connection]
catphish has joined #ruby
<catphish>
is it possible to ready response headers with net/http?
nopolitica has joined #ruby
bbttxu has joined #ruby
<catphish>
oh it is, it includes Net::HTTPHeader
<\13k>
response object has the []() method to access header fields
beilabs has joined #ruby
<catphish>
thanks, just saw in the docs it includes Net::HTTPHeader with provides []
<\13k>
yep :)
nopolitica has quit [Client Quit]
<\13k>
i'd recommend using faraday or rest-client tho, much easier