<eam>
I have automation that gives me all rubygems, cpan modules, and many others at cutting edge versions
<eam>
it's more or less a solved problem
<ged>
I guess I'd be glad if someone did the work to make distributing via arbitrary package formats as easy as packaging a gem, but until that happens, I'm glad there's gems instead of the 10 different setup.rb/install.rb/mkrf.rb/whatever there was before Rubygems.
Ethan has joined #ruby
<RubyPanther>
Sure, but it is downstream, software isn't packaged for each distro during development, it is packaged after it has been chosen to be in the stable distro version. Then it makes it into the unstable version. At this point the software is already fairly old, or at least, the dependencies are no longer the latest dev version
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
jxpx777 has joined #ruby
andrewhl has joined #ruby
<RubyPanther>
that is why there are language-specific tools for maintaining your dev environment, and then package manager ones for dependencies. Looking over the fence at Perl they do the same thing, you develop against CPAN and then things that make it into a distro there will be a distro version of each dependency
<eam>
on the contrary, many products produce distro packages at every cycle
kirun has quit [Quit: Client exiting]
<eam>
I'm well aware Perl has made the same mistake, though to be fair CPAN predates the distro architectures we have today
rasbonics has quit [Quit: rasbonics]
<eam>
gem does not
<RubyPanther>
Nonsense, a very small number of things that are mostly not developer tools maintain distro versions, things like flash plugin, or google chrome
<eam>
RubyPanther: yes *because* that effort goes into a langauge specific packaging platform
<eam>
which is unnecessary
<eam>
and cumbersome
<eam>
it's not the end of the world because it can be adapted to a distro target
<eam>
but remember, this conversation started because someone complained that ruby libraries ought not exist in distro packages at all
<RubyPanther>
Sure, sure, everybody else is wrong, developers suck, your idea is better, blah blah blah, not
<eam>
which is entirely backwards
<RubyPanther>
Well, they ought not exist in distro packages at all, excepting for the fact that in a good distro the only ones that are there are the ones that have something in the distro that has them as a requirement
<eam>
RubyPanther: clearly everybody isn't wrong -- there are many people working to make distro platforms effective and useful
<eam>
the issue is that there are many unaware developers
Maniacal has quit [Ping timeout: 265 seconds]
<eam>
(many more people than which work on ruby specific packaging, I might add)
<RubyPanther>
It is clearly true that packages shouldn't be in the distro _unless_. But, "unless" comes up often enough that there are enough distro packages around to lead poor folks like yourself astray.
jxpx777 is now known as jxpx777|afk
<eam>
no, that's incorrect. Packages belong in the distro -- otherwise dependencies cannot be properly satisfied in an automatic fashion
jrist is now known as jrist-afk
<eam>
mixing your underlying distro packaging (deb, rpm, etc) with gem leads to a crappy UX involving manual monkeying around
<eam>
this is a well understood issue I hope
<RubyPanther>
eam: You should put more effort into understanding why it is done the way it is, because you're missing the claimed benefits and then making wrong assertions about the duplication of effort
<eam>
one of us should put more effort in, certainly
<eam>
how many packaging systems have you created?
mikeric has joined #ruby
<RubyPanther>
Well, if I am supporting the existing Ruby way, the effort of understanding has already been put in by others. It is a much lower bar to learn how things are done and why than it is to claim that things are being done wrong.
ben_alman has quit [Excess Flood]
vlad_starkov has joined #ruby
<eam>
RubyPanther: I might s/ruby/distro/ and make the same point -- except my point would apply to the foundational undertaking in creating gem in the first place
niku4i has joined #ruby
niku4i has quit [Read error: Connection reset by peer]
<RubyPanther>
"derp, derp, how many did you invent from raw photons on your home-built bicycle-powered CPU"
gregorg_taf has joined #ruby
<eam>
RubyPanther: you raised the issue of relevent experience, not me
Agis__ has quit [Quit: Agis__]
<eam>
please don't complain
mikeric has quit [Client Quit]
niku4i has joined #ruby
niku4i has quit [Read error: Connection reset by peer]
<RubyPanther>
You can invest seventeen thousand three hundred and sixty four ways of package management, you will still see "everybody" using language-specific tools for development, even where what they are developing will eventually make its way into distros where the prereqs will be distro packages
wilmoore has quit [Remote host closed the connection]
wilmoore has joined #ruby
khakimov has joined #ruby
niku4i has joined #ruby
niku4i has quit [Read error: Connection reset by peer]
ben_alman has joined #ruby
gregorg has quit [Read error: Connection reset by peer]
kenperkins has quit [Ping timeout: 244 seconds]
niku4i has joined #ruby
niku4i has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Ping timeout: 265 seconds]
Markvilla has quit [Quit: Markvilla]
<eam>
I agree, and I propose it's because 1) most developers don't understand the tools which already exist and 2) Because NIH is a widespread phenomena
<eam>
I'm not *surprised* at the state of things -- I'm merely noting that it's unfortunate
<RubyPanther>
You don't need to create anything, all you have to do is picture in your head the problem... you have Ruby-based product Foo, and the author uses distro Pony. But some other contributors use distro Donkey. Users use any of 42 different distros. Using the language-specific package manager, there is one package to manage. Using distro-specific package managers there are 42 different packages to manage, 40 of which currently have no (know
<RubyPanther>
n) users.
niku4i has joined #ruby
<RubyPanther>
You are wrong^42*n
<eam>
yes it appears you don't see the difference between a build toolchain and a packaging toolchain, and how they might be interfaced in a generic fashion
kenichi has quit [Remote host closed the connection]
<shevy>
there are not so many package managers
wilmoore has quit [Ping timeout: 264 seconds]
<eam>
shevy: when you ignore language specific ones, that is :^)
<RubyPanther>
Perhaps I cannot comprehend the difference. Or, perhaps we have a single easy one-step process instead of crufty two step process where the second step has to be replicated for every known and unknown distro
<shevy>
dpkg uses perl, emerge uses python. not sure what else can be used... some like sourcemage use shell scripts, then there is this replacement for emerge written in C++ I think. pacman is written in C... hmm
<Eiam>
whats that thing in ruby method parameters where its like def fun(a,b, *c)
<Eiam>
the *c part where it takes everything else
<shevy>
eam: do you count machomebrew as package manager?
<shevy>
Eiam splat operator
niku4i_ has joined #ruby
niku4i has quit [Ping timeout: 255 seconds]
xaq has quit [Remote host closed the connection]
<shevy>
hmm rpm written in C
<shevy>
quite none in ruby which is sad
<shevy>
:(
<Eiam>
shevy: ah right. is there a way to use the splat with rake tasks? =)
maxmmurphy has quit [Quit: maxmmurphy]
<RubyPanther>
one is O(0) the other is O(2n)
<shevy>
no idea, dont use rake tasks myself
<shevy>
but rake uses ruby code
<shevy>
so everything that works in ruby should work in rake as well
niku4i_ has quit [Remote host closed the connection]
mikeric has joined #ruby
niku4i has joined #ruby
niku4i has quit [Remote host closed the connection]
MoMo_ has joined #ruby
niku4i has joined #ruby
niku4i has quit [Remote host closed the connection]
MoMo_ is now known as MoMo
randoma__ has quit [Remote host closed the connection]
niku4i has joined #ruby
dnyy has quit [Remote host closed the connection]
EzeQL has quit [Ping timeout: 252 seconds]
<Eiam>
args are a bit wonky for rake tasks unfortunately
<eam>
shevy: generally speaking they're all implemented in C or C++
<Eiam>
think maybe ill just read in a file instead
MissionCritical has quit [Ping timeout: 245 seconds]
jeff_sebring has joined #ruby
EzeQL has joined #ruby
jamesaxl has joined #ruby
<jamesaxl>
hello
bwlang has joined #ruby
<jamesaxl>
i hope that when you update Ruby, keep the old modulles work with it, as in perl and python
<jamesaxl>
many modules won't run with new ruby :(
<mdszy>
Which ones in particular, jamesaxl?
mikeric has quit [Quit: mikeric]
bwlang has quit [Client Quit]
<jamesaxl>
mdszy, webkit for example
<mdszy>
Ah.
ckrailo has quit [Quit: Computer has gone to sleep.]
dkissell_ has joined #ruby
niku4i has quit [Ping timeout: 248 seconds]
aszurom has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
dkissell has quit [Ping timeout: 252 seconds]
dkissell_ is now known as dkissell
emmanuelux has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
liluo has joined #ruby
emmanuelux has joined #ruby
mneorr has quit [Ping timeout: 250 seconds]
jonathanwallace has quit [Remote host closed the connection]
SegFaultAX|work2 has quit [Ping timeout: 246 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
jfoley has joined #ruby
bradhe has quit [Remote host closed the connection]
Mission-Critical has joined #ruby
jblack has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
liluo has quit [Remote host closed the connection]
ePirat_ has joined #ruby
kevinbond has quit [Ping timeout: 264 seconds]
musl has quit [Remote host closed the connection]
Mission-Critical is now known as MissionCritical
ePirat_ has quit [Remote host closed the connection]
dankest has quit [Quit: Leaving...]
ePirat_ has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
banisterfiend has joined #ruby
thedonvaughn has quit [Ping timeout: 244 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
perryh_away is now known as perryh
r126l has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
mpereira has quit [Ping timeout: 255 seconds]
mikeric has joined #ruby
CheeToS has joined #ruby
cakehero has joined #ruby
iori 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]
blazes816 has quit [Quit: Leaving]
dbgster has quit [Quit: dbgster]
chienpo has quit [Quit: Leaving.]
davidpk has joined #ruby
jblack has quit [Quit: Lost terminal]
darthdeus has quit [Quit: Leaving...]
kenperkins has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Aaton is now known as Aaton_off
adamkittelson has quit [Remote host closed the connection]
zodiac1111 has joined #ruby
jxpx777|afk has quit [Quit: Mac is sleeping…]
codective has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
akem has joined #ruby
adeponte has quit [Remote host closed the connection]
ringotwo_ has quit [Remote host closed the connection]
cyong has joined #ruby
liluo has joined #ruby
cirwin has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
jrist-afk has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
mpereira has joined #ruby
beilabs_ has joined #ruby
ringotwo has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
manizzle_ has quit [Read error: Operation timed out]
bradhe has joined #ruby
SYNTActiX has joined #ruby
manizzle has quit [Ping timeout: 248 seconds]
<SYNTActiX>
should i learn ruby or python
<SYNTActiX>
or perl
<mdszy>
Ruby!
<SYNTActiX>
what benefits does it have,(note i am coming from java)
<ged>
shevy: the ports tools on FreeBSD use Ruby.
<SYNTActiX>
of the three, is ruby best at OOP?
emmanuelux has quit [Ping timeout: 245 seconds]
<ged>
SYNTActiX: That's a highly subjective question. Perhaps if you gave some indication as to what you considered the critical features of "OOP"...?
<ged>
And in general, all three are pretty much equivalent in their functionality.
ePirat_ has quit [Remote host closed the connection]
mikeric has quit [Quit: mikeric]
t3hk0d3 has quit [Read error: Connection reset by peer]
<SYNTActiX>
i want to use a language, instead of java, to simulate baseball games, involving parsing data and setting game states
<ged>
You should pick a simple task, learn enough of all of them to implement it, then judge based on which you find more pleasing.
<SYNTActiX>
thanks, that sounds like a good idea
ePirat_ has joined #ruby
t3hk0d3 has joined #ruby
SYNTActiX has quit [Client Quit]
fbernier has joined #ruby
stkowski has quit [Quit: stkowski]
Araxia has quit [Ping timeout: 255 seconds]
<ged>
And try out some other fun ones like io and Lua, too.
ringotwo has quit [Remote host closed the connection]
ringotwo has joined #ruby
ryanf has joined #ruby
dankest has joined #ruby
cherrypeel has quit [Quit: Leaving]
dnyy has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
shadoi has quit [Quit: Leaving.]
c0rn_ has quit [Quit: Computer has gone to sleep.]
Zespre has joined #ruby
nari has joined #ruby
randomubuntuguy has joined #ruby
ePirat_ has quit [Remote host closed the connection]
tomb has quit [Read error: Connection reset by peer]
thomas is now known as Thomas
ringotwo has quit [Remote host closed the connection]
dbgster has joined #ruby
austinbv1 has quit [Ping timeout: 244 seconds]
voodoofish430 has quit [Quit: Leaving.]
freeayu has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
mnaser has quit [Quit: Computer has gone to sleep.]
tomb has joined #ruby
gtuckerkellogg has joined #ruby
headius has quit [Quit: headius]
mohits has joined #ruby
sekati has joined #ruby
cakehero has joined #ruby
Spooner has quit []
frishi has quit [Quit: Leaving...]
tomb has quit [Ping timeout: 250 seconds]
perryh is now known as perry
JustinCampbell has quit [Remote host closed the connection]
subbyyy has joined #ruby
freeayu has quit [Ping timeout: 250 seconds]
adeponte has joined #ruby
iori has quit [Remote host closed the connection]
banisterfiend` has joined #ruby
Chryson has joined #ruby
pen has quit [Remote host closed the connection]
fc has joined #ruby
williamcotton_ has joined #ruby
fc has left #ruby ["WeeChat 0.3.7"]
banisterfiend has quit [Ping timeout: 250 seconds]
williamcotton has quit [Ping timeout: 255 seconds]
williamcotton_ is now known as williamcotton
mobilegamelabs has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
freeayu has joined #ruby
mobilegamelabs has quit [Client Quit]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
mobilegamelabs has joined #ruby
maletor has joined #ruby
jamesaxl has quit [Ping timeout: 240 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
udante_ has quit [Quit: Leaving...]
radic_ is now known as radic
apok_ has joined #ruby
tiripamwe has quit [Ping timeout: 248 seconds]
apok has quit [Ping timeout: 240 seconds]
hunglin has left #ruby [#ruby]
apok_ has quit [Ping timeout: 246 seconds]
noganex has quit [Ping timeout: 246 seconds]
maxmmurphy has joined #ruby
Peregrinu5 has quit []
williamcotton has quit [Quit: williamcotton]
bgupta has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
noganex has joined #ruby
mrsolo has quit [Quit: Leaving]
smw_ has quit [Remote host closed the connection]
khakimov has joined #ruby
ringotwo has joined #ruby
Guest33108 has quit [Read error: Operation timed out]
twinturbo has quit [Quit: twinturbo]
akem has quit [Ping timeout: 265 seconds]
liuchong has joined #ruby
xclite_ has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
xclite__ has joined #ruby
hackingoff has joined #ruby
Tricks has joined #ruby
Guest18330 has joined #ruby
xclite__ has quit [Client Quit]
lkba has quit [Ping timeout: 248 seconds]
wilmoore has joined #ruby
nai has joined #ruby
minijupe has joined #ruby
<mjb2k>
ged: I think that's great advice, it's exactly what I did to choose between Python and Ruby
tomb has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Transformer has joined #ruby
akem has joined #ruby
Transformer has quit [Excess Flood]
eywu has quit [Quit: Leaving.]
mobilegamelabs has quit [Quit: http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
alek_b has quit [Read error: Operation timed out]
Eiam has quit [Read error: Operation timed out]
khakimov has quit [Quit: Computer has gone to sleep.]
<banisterfiend`>
williamherry: if oyu really need that put 'nil' by itself on a line
SegFaultAX|work2 has quit [Ping timeout: 252 seconds]
<bnagy>
or # do nothing
stefanp_ has joined #ruby
<bnagy>
cause, you know, doing nothing is kind of built into computers
<banisterfiend`>
boobah: i really dont think a 'sleep' is teh right approach here... :P
<hackingoff>
Ruby seems kind of high level to be needing an explicit no-op. I'm used to that being used to burn a fixed # of cycles in asm.
<boobah>
banisterfiend`: yeah, it's kind of difficult to guess at what he wants
<hackingoff>
Just having a line with nothing but "true" on it would also do nothing (assuming it's not in danger of being returned), but the real question is what your goal is.
dnyy has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<bnagy>
williamherry: when is pass used in python? As in, why do they need an explicit statement to not do anything?
<bnagy>
We have Thread.pass in ruby as well, but it's a hint to the scheduler that's only really relevant in multithreaded apps
<hackingoff>
"pass is a null operation -- when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed..."
<hackingoff>
The only thing I could think of on that level of stubbing is passing an empty block.
<bnagy>
oic.. needs to compensate for not having def...end and if ...end
<banisterfiend`>
bnagy: they need it to create like emtpy class/method deifnitions
<banisterfiend`>
iirc
<williamherry>
python use pass because it not use end, i think, i just find out, in ruby just not write any thing mean do nothing
manizzle has quit [Read error: Connection reset by peer]
stefanp has quit [Ping timeout: 265 seconds]
manizzle has joined #ruby
<hackingoff>
You can just do if x; end or class Y; end and be fine.
<hackingoff>
pass might be a vestige of python's whitespace-sensitivity.
<bnagy>
... yes that's what everyone just said :)
minijupe has quit [Quit: minijupe]
<bnagy>
banisterfiend`: you know how I don't click on shortened URLs? That goes double when they're from you :D
<bnagy>
srsly though, I hate zenburn
<hackingoff>
bnagy: Was trying to give him the direct syntax.
<banisterfiend`>
bnagy: haha ok
<hackingoff>
monokai ftw
<hackingoff>
Tried solarized; couldn't stick to it.
banisterfiend` has quit [Remote host closed the connection]
<bnagy>
solarized dark is an abortion
<hackingoff>
I can't use light themes.
<any-key>
I don't mind it sometimes, I love the light one for when I have my brightness down
<any-key>
Solarized light is the only light theme I can use
<bnagy>
"I'ma put some muddy blues and greens on this murky blue background, and then, maybe, have like BRIGHT FUCKING EYESTAB RED for quotation marks"
<ggreer>
it probably depends on your monitor
<ggreer>
solarized dark doesn't look good on my laptop screen, but on my main monitor it's nice
<bnagy>
I use solarized light when I am working outside in the sun, same reason as any-key probably
mmokrysz has joined #ruby
<bnagy>
I'm on a modified monokai now
<ggreer>
I like the django theme
mmokrysz has left #ruby [#ruby]
tomb has quit [Ping timeout: 250 seconds]
<any-key>
bnagy: pretty much
<bnagy>
ST2 highlighting for interpolated strings is a bit broken, by default
<bnagy>
also ivars
<hackingoff>
Bonus: monokai goes well with the Sublime Text chrome.
<ggreer>
in what language are quotes red in solarized dark? I'm only seeing light gray quotes
banisterfiend has joined #ruby
<ggreer>
"def" is red tohugh
<bnagy>
in sublime text 2 for ruby
<ggreer>
ah. I'm using textmate
<bnagy>
yeah, they messed up the colours I think
hemanth has quit [Read error: Connection reset by peer]
<ggreer>
sublime text can use textmate themes, right?
<hackingoff>
ggreer: Was about to say that.
<ggreer>
maybe grab the textmate solarized theme and try it out in st2?
<ggreer>
great lemmings think alike
<bnagy>
but I just spent ages making monokai better :(
Thomas is now known as thomas
sharenothing has quit [Quit: .]
hackingoff has quit [Remote host closed the connection]
tomb has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
williamcotton has joined #ruby
cakehero has joined #ruby
cakehero has quit [Client Quit]
cakehero has joined #ruby
cakehero has quit [Client Quit]
cakehero has joined #ruby
cakehero has quit [Remote host closed the connection]
remmy444 has left #ruby ["Leaving"]
bglusman has joined #ruby
bglusman has quit [Read error: Connection reset by peer]
bglusman has joined #ruby
cakehero has joined #ruby
thomas is now known as tdubz
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
tdubz is now known as thomas
Nick_ has joined #ruby
Nick_ is now known as Guest65037
cakehero has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
CheeToS has quit []
hemanth has joined #ruby
austinbv2 has joined #ruby
coderhut has joined #ruby
vitoravelino is now known as vitoravelino`afk
chson has quit [Remote host closed the connection]
dnyy has joined #ruby
davidcelis has quit [Ping timeout: 244 seconds]
Tricks has quit [Read error: Connection reset by peer]
Tricks_ has joined #ruby
Tricks_ has quit [Read error: Connection reset by peer]
<passbe>
why would NET::HTTP on a post request not use zlib to gzip / deflate the response, looking at the code a get request does deflate the response ?
mjb2k has quit [Quit: Leaving]
<fowl>
denstark, the original pickaxe is still good
AlbireoX has quit [Ping timeout: 245 seconds]
ryanf has quit [Quit: leaving]
liuchong has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
liuchong has joined #ruby
<denstark>
fowl: is that the 1.8 book?
<fowl>
denstark, it might be good to run into the differences
<fowl>
hit them like a wall
<fowl>
feel them
<denstark>
haha
<denstark>
ok
ananthakumaran has quit [Quit: Leaving.]
AlbireoX has joined #ruby
invsblduck has quit [Quit: Lost terminal]
graspee has quit [Quit: leaving]
jeff_sebring has quit [Quit: Leaving]
jeff_sebring has joined #ruby
kduensing has joined #ruby
itnomad has quit [Quit: Leaving]
mockra has joined #ruby
kduensing has quit [Client Quit]
tonini has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Chryson has quit [Quit: Leaving]
randomubuntuguy has quit [Ping timeout: 246 seconds]
lolmaus has joined #ruby
<dekz>
Is there a way to 'parse' a sinatra app file and list the routes it has defined, similar to rake -T?
manhunter has joined #ruby
<manhunter>
Hi, i don't like the inherit syntax of ruby, can you change it?
<manhunter>
class a < Core
<manhunter>
Can you change/make it to class a extends Core ?
manhunter is now known as tintin
cherrypeel has quit [Quit: Leaving]
ghanima has joined #ruby
xclite_ has quit [Remote host closed the connection]
mikeycgto_ has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
savage- has joined #ruby
gtuckerkellogg has joined #ruby
tiripamwe has joined #ruby
ghanima has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
ghanima has joined #ruby
strnx has quit [Excess Flood]
ringotwo has joined #ruby
Agis__ has quit [Quit: Agis__]
CheeToS has left #ruby [#ruby]
williamcotton has quit [Quit: williamcotton]
strnx has joined #ruby
ringotwo has quit [Remote host closed the connection]
<Hanmac>
vectorshelve one way would be replace " with \" or use %r{^I should see "([^"]*)"$}
<Hanmac>
vectorshelve ... sorry the first is wrong
<Hanmac>
its only an error in the pastie parser ... (i think)
<vectorshelve>
Hanmac: so what could be line 9 correctly ?
<vectorshelve>
Then /^I should see "([^"]*)"$/ do |greeting| Hanmac this is it as of now so the below lines are becoming comments
shadoi has quit [Quit: Leaving.]
<Hanmac>
as i say ... your like is currect, only the pastie parser is to dump
mockra has quit [Remote host closed the connection]
mockra has joined #ruby
<vectorshelve>
Hanmac: I didnt get you.. how can I correct it ? :)
mockra has quit [Remote host closed the connection]
<Hanmac>
you cant, pastie has no error reporting :D
<Axsuul>
I have an array of about 4,500 integers, and I need to check if a specific integer is in the array. What is the most performant way of doing this? Should I be making a hash with the key being each integer and checking if the key exists? Or is .include? fine
<bnagy>
you could use a Set
<bnagy>
which is more or less what you suggested (it uses Hash)
<bfig>
Axsuul, i don't know if your question pertains ruby specifically but i'd suggest amortizing the cost of doing that search and make ordered inserts
<Axsuul>
Yep, this is a ruby question
<Axsuul>
Cool, looks like Set is what I want
jeff_sebring has quit [Quit: Leaving]
<bnagy>
even if you keepa sorted array you'd still have to binary search or something
<Axsuul>
thanks bnagy
dhruvasagar has joined #ruby
mneorr has left #ruby [#ruby]
mneorr has joined #ruby
<bnagy>
if entries are unique Set is dfefinitely better
<Axsuul>
aye, they are unique
mneorr has left #ruby [#ruby]
mneorr has joined #ruby
<bnagy>
I actually do a lot of stuff with large sets of integeers, so I got some assorted libs for compression, serialisation etc
chriskk has quit [Quit: chriskk]
xnm has quit [Ping timeout: 246 seconds]
webusnix has joined #ruby
<Axsuul>
Ah neat
<Axsuul>
4,500 isnt considered large right? :p
<bnagy>
not so much, no
hoelzro|away is now known as hoelzro
bfgun has joined #ruby
burgestrand has joined #ruby
Juul has joined #ruby
Jackneill has quit [Ping timeout: 240 seconds]
qwerxy has joined #ruby
dekroning has joined #ruby
bfig has quit [Ping timeout: 265 seconds]
Jackneill has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
AlbireoX has quit [Remote host closed the connection]
t3hk0d3 has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
AlbireoX has joined #ruby
andrewhl has joined #ruby
wilmoore has quit [Remote host closed the connection]
Tricks has joined #ruby
t3hk0d3|2 has quit [Ping timeout: 252 seconds]
darthdeus has joined #ruby
Rochefort has joined #ruby
gilead has joined #ruby
federic has joined #ruby
TPFC-SYSTEM has joined #ruby
burgestrand has quit [Ping timeout: 246 seconds]
burgestrand has joined #ruby
schovi has joined #ruby
prathamesh` has left #ruby ["Leaving"]
joshman_ has quit [Quit: Computer has gone to sleep.]
igotnolegs has quit [Quit: Computer has gone to sleep.]
freeayu has quit [Ping timeout: 246 seconds]
Guest23349 has joined #ruby
kawa_xxx has quit [Ping timeout: 245 seconds]
zommi has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
qwerxy has quit [Quit: offski]
andrewhl has quit [Remote host closed the connection]
freeayu has joined #ruby
mohits has quit [Remote host closed the connection]
ph^ has joined #ruby
apeiros_ has joined #ruby
wobr has joined #ruby
jamesaxl has joined #ruby
KevinSjoberg has joined #ruby
hukl has quit [Quit: Leaving...]
mneorr has quit [Quit: Leaving.]
banisterfiend has quit [Read error: Connection reset by peer]
kawa_xxx has joined #ruby
ryanf has quit [Quit: leaving]
EzeQL has quit [Ping timeout: 265 seconds]
elhu has joined #ruby
tvw has joined #ruby
banisterfiend has joined #ruby
Eldariof-ru has joined #ruby
Helius has joined #ruby
artOfWar has quit [Ping timeout: 255 seconds]
fixl has joined #ruby
Gavilan has left #ruby [#ruby]
gtuckerkellogg has quit [Ping timeout: 252 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
<zeroXten>
so, what is the best way to do stuff with IP addresses in ruby? ipaddr seems reasonable, except that it doesn't seem to be able to just return a mask (i'd have to substring or something) and it certainly doesn't easily return CIDR notation
welterde has quit [Ping timeout: 264 seconds]
d3vic3 has quit [Quit: leaving]
QKO has quit [Read error: Connection reset by peer]
QKO has joined #ruby
jeff_sebring has quit [Quit: Leaving]
jeff_sebring has joined #ruby
RudyValencia has joined #ruby
mvangala_ has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
Ethan has quit [Read error: Connection reset by peer]
<zeroXten>
ok, so ipaddr is amazingly useless
tonini has quit [Remote host closed the connection]
<burgestrand>
It’s awesome for testing ip ranges
Ethan has joined #ruby
<burgestrand>
inclusion in ip ranges, that is
ixti has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
justinmcp has quit [Read error: Connection reset by peer]
<burgestrand>
Paradox: ah, yes, URI.escape only escapes values to make the URI valid, but it does not escape characters that ought to be escaped when it comes to keys and values in query strings (e.g. ?, =, &)
<Paradox>
ah
<Paradox>
yeah
<Paradox>
URI.escape is for YOUR dealing with urls
<Paradox>
such as with Net::HTTP and craps
* burgestrand
nods
<burgestrand>
Not confusing at all
* burgestrand
coughs
ph^ has quit [Remote host closed the connection]
lxsameer has quit [Max SendQ exceeded]
ph^ has joined #ruby
Agis__ has quit [Quit: Agis__]
eurek has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
saschagehlich has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
mohits has quit [Read error: No route to host]
az7ar has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Max SendQ exceeded]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
liuchong has quit [Ping timeout: 246 seconds]
cousine has quit [Remote host closed the connection]
mucker has joined #ruby
nanderoo has joined #ruby
saschagehlich has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
thecreators has joined #ruby
clockwize has quit [Quit: clockwize]
Progster has quit [Read error: Operation timed out]
pk1001100011 has quit [Ping timeout: 246 seconds]
Agis__ has joined #ruby
Agis__ has quit [Client Quit]
pk1001100011 has joined #ruby
MekkisScreen has quit [Ping timeout: 248 seconds]
icrazyhack has joined #ruby
emmanuelux has joined #ruby
EzeQL has joined #ruby
Markvilla has joined #ruby
Markvilla has quit [Client Quit]
mneorr has left #ruby [#ruby]
mneorr has joined #ruby
Markvilla has joined #ruby
Progster has joined #ruby
lamks has joined #ruby
mneorr has quit [Quit: Leaving.]
saschagehlich has quit [Read error: Connection reset by peer]
Markvilla has quit [Client Quit]
saschagehlich has joined #ruby
Markvilla has joined #ruby
saschagehlich has quit [Read error: Connection reset by peer]
saschagehlich has joined #ruby
Markvilla has quit [Client Quit]
iaj has joined #ruby
Markvilla has joined #ruby
Markvilla has quit [Client Quit]
Markvilla has joined #ruby
jprovazn has joined #ruby
gtuckerkellogg has joined #ruby
liluo has joined #ruby
mnaser has joined #ruby
eurek has quit [Quit: Computer has gone to sleep.]
[Neurotic] has quit [Quit: Leaving]
saschagehlich_ has joined #ruby
brendan` has joined #ruby
<banisterfiend>
Paradox: ping
neglesaks has joined #ruby
<banisterfiend>
Paradox: can u show me a screenshot of your theme including ivars
<apeiros_>
a paradox banisterping
<banisterfiend>
:))
mobilegamelabs has joined #ruby
<the-newsman>
what does that mean "class Metasploit3 < Msf::Exploit::Remote" ?
<the-newsman>
can u kindly explain it to me ?
<hoelzro>
the-newsman: Metasploit3 is a subclass of Msf::Exploit::Remote
<the-newsman>
hoelzro what is Msf ?
mobilegamelabs has quit [Client Quit]
<the-newsman>
module ?
saschagehlich has quit [Ping timeout: 246 seconds]
saschagehlich_ is now known as saschagehlich
Criztian has joined #ruby
mobilegamelabs has joined #ruby
fbernier has joined #ruby
<sepp2k>
the-newsman: Either that or a class.
jstew has joined #ruby
justinmcp has quit [Remote host closed the connection]
krusty_ar has joined #ruby
justinmcp has joined #ruby
krusty_ar_ has joined #ruby
tommyvyo has joined #ruby
jxpx777 has joined #ruby
mdszy has joined #ruby
Hello has joined #ruby
MatthewGA has quit [Quit: Leaving]
tommyvyo has quit [Client Quit]
ij has quit [Quit: WeeChat 0.3.8]
nari has joined #ruby
neglesaks has quit [Quit: Leaving]
jxpx777 has quit [Client Quit]
plastics has joined #ruby
<hoelzro>
the-newsman: I have no idea
<hoelzro>
I've never seen it
workmad3 has quit [Ping timeout: 265 seconds]
strife25 has joined #ruby
Helius has quit [Remote host closed the connection]
unixabg has left #ruby [#ruby]
mnaser has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
welterde has joined #ruby
wubino has quit [Quit: Leaving]
dekroning has quit [Quit: leaving]
liuchong has joined #ruby
vitoravelino`afk is now known as vitoravelino
Morkel has quit [Quit: Morkel]
Targen has joined #ruby
Targen_ has quit [Ping timeout: 245 seconds]
elhu has quit [Ping timeout: 240 seconds]
elhu has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
krusty_ar has quit [Remote host closed the connection]
Axsuul has quit [Ping timeout: 252 seconds]
crankycoder has joined #ruby
tommyvyo has joined #ruby
Helius has joined #ruby
mneorr has joined #ruby
pygospa has quit [Ping timeout: 246 seconds]
ij has joined #ruby
lkba has joined #ruby
eurek has joined #ruby
subbyyy has joined #ruby
subbyyy has quit [Max SendQ exceeded]
elhu_ has joined #ruby
ixti has quit [Read error: Connection reset by peer]
<Jackneill>
what does it mean? i have a class "Irc", and a variable @tcpsocket, i want to use it in another class, so i did Irc.new, but i got that error message
<Jackneill>
the Irc class already has an instance
<Jackneill>
that will be the second.
<bnagy>
Jackneill: usually means you've got recursion that's too deep, but it can also be nested objects
<ccooke>
Jackneill: stack level too deep means that your code is recursing, probably forever
<bnagy>
impossible to tell without the code
<Jackneill>
ok i will paste it.
JustinCampbell has joined #ruby
ixti has joined #ruby
ixti has quit [Read error: Connection reset by peer]
mohits has quit [Read error: Connection reset by peer]
<bnagy>
so the program won't exit until all those threads finish, if ever
<bnagy>
or until it's killed etc
<the-newsman>
shevy
<shevy>
the-newsman: hmm the problem is, you are trying to use a program written by others here, right?
<the-newsman>
no
<the-newsman>
did u look at the page ?
<shevy>
yup. a very large and complex project it is
federic has quit [Remote host closed the connection]
krusty_ar_ is now known as krusty_ar
<the-newsman>
nice
<the-newsman>
now remote is class. right ?
<shevy>
I do not know, I have not written it and I don't see the source. It could be a module too, Msf::Exploit::Remote, but you can find out anyway by doing .class on it, Msf::Exploit::Remote.class
mnaser has quit [Ping timeout: 252 seconds]
<shevy>
if it is a class, you can call .new on it
<shevy>
ah
<shevy>
it has <
<shevy>
so yes, it is a class
<the-newsman>
now. there r many modules in this page
<the-newsman>
they r very different of course
<shevy>
just as in any other project too
<the-newsman>
does this class have the defintion for those modules ?
<shevy>
Msf::Exploit::Remote -> module Msf; module Explit; class Remote
mnaser has joined #ruby
strife25 has joined #ruby
<shevy>
depends on how the author layouted the structure
<shevy>
usually, you would split things up
<the-newsman>
man
<shevy>
I write one class for one .rb file usually
<the-newsman>
bnagy do u say class=module and vice versa ?
ixti has joined #ruby
<bnagy>
banisterfiend: I can still code, depending on where I cut myself
<spirat>
Hello, I am experiencing problems with redmine, I don't know much about ruby so i'm a little lost and can't figure out how to debug... Can someone look at this backtrace and point me in the right direction? http://dpaste.org/8NMFX/
<bnagy>
and how much :|
<bnagy>
the-newsman: I say a Class is a kind of Module .. kind of
baphled has quit [Remote host closed the connection]
<bnagy>
Module is a bit special
Markvilla has quit [Ping timeout: 246 seconds]
Markvilla_ is now known as Markvilla
baphled has joined #ruby
<bnagy>
go use google and become enlightened
<the-newsman>
bnagy module is just wrapper. not real class
tzvi has joined #ruby
Criztian has quit [Remote host closed the connection]
<the-newsman>
my q is, how can class have some modules inside
<banisterfiend>
the-newsman: u prob shouldn't correct bnagy when he's a veteran and you're still a tourist from noobcity ;)
ixti has quit [Read error: Connection reset by peer]
<the-newsman>
correct me banisterfiend please
ixti has joined #ruby
<banisterfiend>
the-newsman: buy a book
lamks has quit []
imami|afk is now known as banseljaj
ixti has quit [Read error: Connection reset by peer]
ken_barber has joined #ruby
Targen has quit [Ping timeout: 240 seconds]
<shevy>
the-newsman: class Foo; module Bla; end; end
uris has joined #ruby
<shevy>
the-newsman: you can use a class just like you can use a module too when it comes to namespacing
<shevy>
the-newsman: as long as you dont understand it, so long will you just run in circles here
<the-newsman>
shevy thanx
<the-newsman>
shevy some in here r worethelss. thanx again shevy
jsime has joined #ruby
<shevy>
Namespace access is always done via :: no matter if it is a class or module. Foo::Bla could both be a class or a module, one would have to use .class to find out for sure, or look at the source. I dont think there is any other way to know, just by looking at "Foo::Bla" alone, that does not seem to have sufficient information in itself to deduce.
<bnagy>
I feel so worethelss. How will I go on?
<shevy>
bnagy: it's ok. google likes you.
<bnagy>
shutupshutupshutup
<shevy>
I want to be friends on google+ with you bnagy!!!
schovi_ has quit [Remote host closed the connection]
<bnagy>
ok, you create an account and wait for me there
<bnagy>
I'll be along right after I set up the twitter, facebook and linkedin I don't have
<shevy>
:(
fantazo has joined #ruby
<shevy>
I tried to use twitter... then I realized, my true nature is to be lazy
wobr has quit [Ping timeout: 248 seconds]
<banisterfiend>
Mon_Ouie: u here?
schovi has joined #ruby
wobr has joined #ruby
schovi has quit [Remote host closed the connection]
plastics has quit [Ping timeout: 264 seconds]
S1kx has quit [Quit: Leaving]
apok has joined #ruby
ryan0x2 has joined #ruby
mobilegamelabs has quit [Quit: http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
spirat has quit [Quit: leaving]
joel has joined #ruby
joel has quit [Client Quit]
kpshek has joined #ruby
mnaser has quit [Ping timeout: 245 seconds]
webusnix has joined #ruby
bbttxu has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
ixti has joined #ruby
mnaser has joined #ruby
cpruitt has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
krusty_ar has joined #ruby
<shevy>
hmm
<shevy>
do I have to do anything special when wanting to distribute some yaml files in a gem project?
cakehero has joined #ruby
<mdszy>
shevy: I think you just have to make sure they're recognized as files in the gemspec
<JustinCampbell>
shevy: more context?
<JustinCampbell>
^
<mdszy>
make sure they're in the gem.files array
cakehero has quit [Client Quit]
<mdszy>
if you're using git, and the YAML files are in the repo, you can use this to make sure everything in git is in the gem:
<mdszy>
gem.files = `git ls-files`.split($\)
<mdszy>
(not my code, that's in the default gemspec that `bundle gem` creates)
<shevy>
JustinCampbell: yeah, not sure yet... I never made a gem so far with yaml files, so I am not sure what I have to do or whether I have to do anything special :)
<shevy>
hmm ok mdszy
tk___ has joined #ruby
iamlacroix has quit [Remote host closed the connection]
<mdszy>
shevy: yeah, you don't have to do anything special except making sure that somehow the yaml files are showing up in the gem.files array
<JustinCampbell>
do you have any ruby code in the gem?
<shevy>
ok mdszy, cool
<shevy>
JustinCampbell: yeah, the .rb files will make use of the yaml files in that gem
<JustinCampbell>
i mean, are you trying to just package and distribute data as a gem, or is there ruby code in the gem that accesses the data as a proxy
<rking>
I do weird things to my configs, so I'm not sure if it's in the ballpark. Actually now that I think about it I think my keyword-yellow is very brown relative to the normal one.
<hoelzro>
rking: depends on your colorscheme, but it doesn't look out of the ordinary
<rambda>
thanks man, I'm pretty new to ruby to please excuse my ignorance, what do the hashes do there?
<offby1>
string interpolation
<offby1>
i.e., they do what you hope they do.
<offby1>
"three plus two is #{3 + 2}" => "three plus two is 5"
selvakumaran has joined #ruby
<offby1>
if there were a ruby bot in this channel it'd be easy to demonstrate
<rambda>
cool thanks
rouss has joined #ruby
elhu has joined #ruby
<shevy>
what do you guys use when wanting to output coloured text in a sentence, to the user?
<shevy>
like, it makes use of more than one colour in the same sentence
<rambda>
why doesn't ruby just accept the variables without the hashes and brackets? When I first started learning, I could do simple things like puts variablename and my output would be whatever the variable had been assigned to
SQLStud has joined #ruby
<shevy>
rambda you can use + too
<shevy>
puts var1+' '+var2+' '+var3
<Hanmac>
no ... "text" + number does fail
<shevy>
and print should use , ... print var1,' ',var2,' ',"\n"
<shevy>
fine, here we go then puts var1.to_s+' '+var2.to_s+' '+var3.to_s
<rambda>
that's basically what I had tried, putting variables to a socket in that way threw that error
<cakehero>
I have an app loaded into memory with unicorn - at some point unicorn workers start dying because of OOM errors. Is there a way to debug the application so I can see where the memory leak is?
<canton7>
obviously, replace line 8 with your instance_eval
Travis-42 has joined #ruby
artOfWar has joined #ruby
schovi has joined #ruby
<lexy0202>
canton7: thanks
wmoxam has joined #ruby
<Travis-42>
I'm having some trouble understanding the splat operator I think. Can someone help me understand why this gives "unexpected tSTAR, expecting ')'": https://gist.github.com/3671502c850573f09f69
<canton7>
lexy0202, pastie updated
jxpx777 has quit [Ping timeout: 244 seconds]
<wmoxam>
Travis-42: you want to pass args
<wmoxam>
not *args
<Travis-42>
wmoxam: wouldn't passing args alone just pass an array as a single argument?
<canton7>
Travis-42, I suspect you might need curly braces around lines 4-7?
cakehero has quit [Quit: Leaving...]
lexy0202 has quit [Quit: Page closed]
gry has quit [Changing host]
gry has joined #ruby
<wmoxam>
Travis-42: I guess it depends on what args search_tank takes :p
sonkei has quit [Quit: WeeChat 0.3.8]
anothervenue has quit [Quit: WeeChat 0.3.7]
apeiros_ has joined #ruby
sonkei has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
liluo has joined #ruby
digitalcakestudi has joined #ruby
jfoley has joined #ruby
bradhe has quit [Remote host closed the connection]
etehtsea has quit []
Targen has joined #ruby
ABK has joined #ruby
baphled has quit [Quit: leaving]
baphled has joined #ruby
baphled has quit [Client Quit]
carloslopes has quit [Quit: Leaving.]
greyEAX has quit [Read error: Connection reset by peer]
mneorr1 has joined #ruby
Rochefort has quit [Remote host closed the connection]
maletor has joined #ruby
plastics has quit [Ping timeout: 240 seconds]
apok has joined #ruby
saschagehlich has joined #ruby
mdszy has joined #ruby
mneorr has quit [Ping timeout: 250 seconds]
baphled has joined #ruby
kenichi has joined #ruby
greyEAX has joined #ruby
mrsolo has joined #ruby
baphled_ has joined #ruby
adeponte has joined #ruby
baphled has quit [Read error: Connection reset by peer]
burgestrand has quit [Quit: Leaving.]
bricker88 has joined #ruby
bradhe has joined #ruby
ringotwo has joined #ruby
b26 has joined #ruby
SegFaultAX|work2 has joined #ruby
brendan` has quit [Ping timeout: 265 seconds]
liluo has quit [Remote host closed the connection]
ABK has quit [Ping timeout: 248 seconds]
bglusman has joined #ruby
mockra has joined #ruby
stephenjudkins has joined #ruby
akem has quit [Ping timeout: 246 seconds]
liuchong has quit [Ping timeout: 240 seconds]
bglusman has quit [Ping timeout: 246 seconds]
mvangala_ has quit [Remote host closed the connection]
banghouse has joined #ruby
baphled_ has quit [Ping timeout: 240 seconds]
ianbrandt has joined #ruby
lorandi has joined #ruby
chrismcg is now known as zz_chrismcg
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
lorandi has quit [Client Quit]
blacktulip has joined #ruby
lorandi has joined #ruby
timonv has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
tvw has quit [Ping timeout: 245 seconds]
twinturbo has joined #ruby
sailias has quit [Quit: Leaving.]
mockra has quit [Remote host closed the connection]
mjb2k has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
berserkr has quit [Read error: Connection reset by peer]
tsou has joined #ruby
schaerli has joined #ruby
tommyvyo has joined #ruby
renanoronfle has joined #ruby
mrsolo has joined #ruby
shadoi has joined #ruby
fulmato has quit [Ping timeout: 244 seconds]
stkowski has joined #ruby
TorpedoSkyline has joined #ruby
jgrevich has joined #ruby
arturaz has joined #ruby
savage-_ has joined #ruby
ephemerian has left #ruby [#ruby]
mneorr1 has quit [Quit: Leaving.]
mneorr has joined #ruby
savage- has quit [Read error: Operation timed out]
Araxia has quit [Read error: Connection reset by peer]
fridim_ has joined #ruby
<Synthead>
mjb2k: there we go :) thanks!
stephenjudkins has joined #ruby
savage-_ has quit [Ping timeout: 248 seconds]
nachtwandler has quit [Ping timeout: 265 seconds]
Araxia has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
fridim_ has quit [Ping timeout: 264 seconds]
adamkittelson has joined #ruby
WhereIsMySpoon has quit [Remote host closed the connection]
jlogsdon has joined #ruby
npn47 has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
npn47 has quit [Client Quit]
rippa has joined #ruby
Squarepy has quit [Quit: Leaving]
mockra has joined #ruby
kidoz has joined #ruby
williamcotton has joined #ruby
evenix has joined #ruby
<evenix>
hey all
Kevin_ has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
bluenemo has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
tatsuya_o has joined #ruby
rippa has quit [Ping timeout: 246 seconds]
TPFC-SYSTEM has joined #ruby
mdszy has quit [Quit: bye for now]
dhruvasagar has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
tatsuya_o has quit [Ping timeout: 246 seconds]
schovi has quit [Remote host closed the connection]
cjlicata has joined #ruby
savage-_ has joined #ruby
markab1 has quit [Remote host closed the connection]
mrsolo has quit [Quit: This computer has gone to sleep]
Targen has joined #ruby
savage- has quit [Read error: Operation timed out]
carlyle has quit [Ping timeout: 246 seconds]
WhereIsMySpoon has joined #ruby
mrsolo has joined #ruby
rouss has quit [Read error: Operation timed out]
avandenhoven has joined #ruby
TrahDivad_ has joined #ruby
axl_ has joined #ruby
bglusman has joined #ruby
carlyle has joined #ruby
gift has joined #ruby
Kevin_ has quit [Remote host closed the connection]
<TrahDivad_>
I'm fairly new to ruby and I'm trying to decide on a ORM to use with padrino. Can somebody point me to an article that discuses the pros and cons of the major ruby ORMs?
<itz>
PING
markab has joined #ruby
selector has joined #ruby
peregrine81 has joined #ruby
fridim_ has joined #ruby
jfoley has quit [Quit: jfoley]
b26 has quit [Read error: Operation timed out]
rking has quit [Quit: Shutting down. To migrate servers. Because of… a leap-second bug.]
<mjb2k>
TrahDivad_: in case you're entirety unaware, I'm going to let you know that is a terrible question
<TrahDivad_>
mjb2k: why's that?
Eiam has joined #ruby
cjlicata has quit [Ping timeout: 246 seconds]
<Eiam>
alright, I need a quick sanity check here. if I make a request to a server, and it gives me a response with some cookies, its generally accepted that my next response is going to include those cookies, correct?
<mjb2k>
you're not even asking the opinion of experience of any one here, what you're asking for is provided by any one of numerous search engines
<Eiam>
as in, almost every http library is going to do that automatically (include domain cookies with future requests)
<mjb2k>
Eiam, no
<mjb2k>
dont expect that to happen automatically
<mjb2k>
but yes, it should be done, which means you have to do it
<Eiam>
if the response has a set-cookie:blah
brendan` has joined #ruby
cousine has joined #ruby
<Eiam>
right, it should be done
<mjb2k>
you read the set-cookie header and send it back in a header
<Eiam>
mjb2k: nah, I *AM* doing it, the server is saying 'uhm, don't send this cookie back to me'
<Eiam>
and im saying 'uh, you sent me the cookie, of course im going to send it back to you'
<TrahDivad_>
mjb2k: I've searched Google before coming here and I'm having a hard time finding the kind of article I'm asking for. That's why I was hoping that somebody had a bookmark to one.
<gift>
[ "foo", { :bar => "baz", :baz => "foo" }, "bar", { :baz => "foo", :bar => "baz" } ] --- How can I get that array to look like this: [ [ "foo", { :bar => "baz", :baz => "foo" } ], [ "bar", { :baz => "foo", :bar => "baz" } ] ]
<mjb2k>
Eiam: ah ok, not sure then would need more specifics, how are you sending the cookie data and what exactly is the server responding with?
<gift>
every other element in the array should be paired and pushed onto a higher array with the following element. 2 x 2 x 2, etc
the-newsman has quit [Ping timeout: 264 seconds]
<Eiam>
mjb2k: don't think we need to dig further, its literally their fault. I make 20 async requests, but the time the 6th request is sent, I get back my first response.. 7th request goes out with the cookies they set, and it fails. all requests that go out with their cookies set fail
<Eiam>
and they are saying 'oh don't send those cookies back to us'
<Eiam>
then don't send me the cookie dummies!
Spooner has quit [Ping timeout: 246 seconds]
cbuxton1 has joined #ruby
<mjb2k>
Eiam: lol, ok then. I don't get the point of cookies that never go back to the server, that is what they're supposed to do
<Eiam>
mjb2k: right, exactly. I honestly wanted a sanity check before tearing into them =)
<Eiam>
I hit up google, read some stuff, figured i'd get a final confirmation
cbuxton has quit [Ping timeout: 264 seconds]
Targen has quit [Ping timeout: 245 seconds]
<mjb2k>
yes, the entire point of a cookie is for the server to store data on the client for later retrieval
lorandi has quit [Ping timeout: 265 seconds]
Eldariof-ru has joined #ruby
cousine has quit [Remote host closed the connection]
khakimov has joined #ruby
Kevin_ has joined #ruby
<apeiros_>
mjb2k: not that it'd make much sense, but you can read cookies using js too. (it doesn't make much sense since you have to be on the right domain to do that…)
alexim has joined #ruby
blacktulip has quit [Remote host closed the connection]
twinturbo has quit [Quit: twinturbo]
fridim_ has quit [Ping timeout: 264 seconds]
blacktulip has joined #ruby
sailias has joined #ruby
fantazo has quit [Remote host closed the connection]
cespare has quit [Ping timeout: 264 seconds]
<tds>
if I have a class A::B::C, is there a method I can call on C that will give me its namespace (i.e. A::B)?
anothervenue has joined #ruby
<Eiam>
mjb2k: thanks
voodoofish430 has joined #ruby
maxmmurphy has quit [Quit: maxmmurphy]
<evenix>
Hey guys anyone played with paypal express checkout recently?
Kesava has quit [Read error: Connection reset by peer]
Kevin_ has quit [Remote host closed the connection]
Kesava has joined #ruby
pk1001100011_ has joined #ruby
pk1001100011 has quit [Read error: Connection reset by peer]
schovi has joined #ruby
<mjb2k>
apeiros_: yes I do tend to forget that since I more commonly work with HTTP only cookies, for security reasons.
blazes816 has joined #ruby
ksinkar has quit [Quit: Konversation terminated!]
pk1001100011_ is now known as pk1001100011
lorandi has joined #ruby
mockra has quit [Remote host closed the connection]
Tricks has joined #ruby
philoserf_ has left #ruby [#ruby]
gianlucadv has quit [Excess Flood]
schovi has quit [Ping timeout: 252 seconds]
gianlucadv has joined #ruby
<shevy>
tds: hmm not sure. try .ancestors
adamkitt_ has joined #ruby
adamkittelson has quit [Read error: Operation timed out]
stat1x has quit [Remote host closed the connection]
<apeiros_>
tds: since C could be referenced by X::Y::C just as well - no
stat1x has joined #ruby
Progster has quit [Ping timeout: 248 seconds]
cespare has joined #ruby
<apeiros_>
tds: you can use C.name and parse that
Aaton_off is now known as Aaton
<tds>
apeiros_: for your first point, do you mean if I did Y.const_set(:C, A::B::C)
ramblex_ has joined #ruby
<tds>
or sorry X::Y.const_set(:C, A::B::C)
<apeiros_>
tds: module X; module Y; C = A::B::C; end; end
<tds>
right
<apeiros_>
X::Y::C == A::B::C
<tds>
that's a much easier way ;)
<tds>
little tired this morning
<apeiros_>
assuming X::Y exists already, then a plain X::Y::C = A::B::C is sufficient even
tiripamwe has quit [Ping timeout: 250 seconds]
<tds>
yeah
<tds>
so I guess the somewhat naive but only practicable way of determining this is just parsing C.name
tiripamwe has joined #ruby
ramblex has quit [Ping timeout: 252 seconds]
jxpx777 has joined #ruby
Araxia_ has joined #ruby
tiripamwe has quit [Read error: Connection reset by peer]
chienpo has joined #ruby
ramblex_ has quit [Ping timeout: 255 seconds]
Araxia has quit [Read error: No route to host]
Araxia_ is now known as Araxia
qo has joined #ruby
manizzle has quit [Read error: No route to host]
keithcelt has joined #ruby
<shevy>
I have two files like http://pastie.org/4194457 - the problem I have is with __FILE__ right now.
maxmmurphy has joined #ruby
<shevy>
it outputs "From ./file2.rb" right now, but I'd like to output the filename of whatever .rb file calls that method instead
SegFaultAX has joined #ruby
<shevy>
hmm guess I'll use caller
heftig has joined #ruby
jsime has quit [Quit: Leaving]
cakehero has joined #ruby
havenn has joined #ruby
berserkr has joined #ruby
cirwin has joined #ruby
ken_barber has quit [Remote host closed the connection]
kava has joined #ruby
carloslopes has joined #ruby
carloslopes has quit [Client Quit]
jfoley has joined #ruby
<Synthead>
is there a way to shorten x = x / 5?
<Synthead>
could I do something like x +/ 5?
carloslopes has joined #ruby
tiripamwe has joined #ruby
<cirwin>
x /= 5
awarner has joined #ruby
<Synthead>
niiiiiceeee
dnyy has joined #ruby
<Synthead>
cirwin: thank you!
<xclite>
curious about that leap of logic, though =p
kava has quit [Quit: Leaving]
DrShoggoth has joined #ruby
cantonic_ has joined #ruby
warlock_handler has joined #ruby
dkissell_ has joined #ruby
patrick_ has joined #ruby
patrick_ has quit [Client Quit]
kidoz has quit [Quit: Ухожу я от вас]
kava has joined #ruby
schovi has joined #ruby
<warlock_handler>
can I directly execute GIMP filters (image manipulation filters) in ruby? there is a GIMP lib in ruby... but thats to create ruby plugins for gimp
dkissell has quit [Ping timeout: 245 seconds]
dkissell_ is now known as dkissell
niklasb has joined #ruby
warlock_handler has quit [Client Quit]
cantonic has quit [Ping timeout: 245 seconds]
cantonic_ is now known as cantonic
SYNTActiX has joined #ruby
<shevy>
now he didnt stay long :P
macmartine has joined #ruby
neersighted is now known as neersighted|AFK
banisterfiend has quit [Read error: Connection reset by peer]
bglusman has quit [Remote host closed the connection]
<rambda>
so I'm looping through a file I've opened, line by line and performing a socket connection based on that input from the file...now I want to take output gained from the socket connection and append it to the end of the line the loop has finished with...can someone point me in the right direction?
<blazes816>
rambda: just throwing this out there (never worked with sockets in ruby), but do you want to map instead of iterate?
<blazes816>
unless you're lazy loading
banisterfiend has joined #ruby
baphled has joined #ruby
<rambda>
blazes816: let me read up on map and the rest of what you mentioned there :D
<rambda>
thanks
<blazes816>
lol
jsime has joined #ruby
schovi has quit [Remote host closed the connection]
<rambda>
(yeah, I'm almost completely new to all this..)
mockra has joined #ruby
<blazes816>
I assume you're doing something like file.each do |line|. map is just like each, but the element is replaced with whatever you return from inside.
mucker has quit [Remote host closed the connection]
<blazes816>
it took me a while to understand the functional type methods (map/inject/etc)
<mjb2k>
I'd kinda like to see if that would actually work, file.lines.map!{ |line| line << socket_method(line) }
havenn has quit [Remote host closed the connection]
friskd_ has joined #ruby
jwbuurlage has joined #ruby
jwbuurlage has left #ruby [#ruby]
baphled has quit [Client Quit]
<blazes816>
as long as they're synchronous
<blazes816>
i think it should work
<apeiros_>
mjb2k: you realize that using the bang method there is somewhat pointless?
baphled has joined #ruby
coderhut has joined #ruby
friskd has quit [Ping timeout: 244 seconds]
<apeiros_>
you could even use each…
friskd_ is now known as friskd
jfoley has quit [Quit: jfoley]
<blazes816>
apeiros_, if it was ! it wouldn't set files.lines
<apeiros_>
blazes816: it doesn't need to
<apeiros_>
he mutates the lines
<mjb2k>
aperios_: no I really didnt put much thought into, just a ballpark methodology
<apeiros_>
mjb2k: tab completion ftw.
<blazes816>
he mutates the line
<blazes816>
not the collection
baphled has quit [Client Quit]
<mjb2k>
apeiros_: lol
<apeiros_>
blazes816: and of what do you think the collection consists?
<blazes816>
but if strings are immutable, how does it work that way?
<apeiros_>
*if*
baphled has quit [Client Quit]
<apeiros_>
I said in his case
<blazes816>
interesting
<apeiros_>
I didn't make any speculative musings
baphled has joined #ruby
<blazes816>
I thought strings in ruby were always immutable
<apeiros_>
hu?
<apeiros_>
I have no idea from where you've got that idea
<apeiros_>
immutable strings are quite the exception in ruby
baphled has quit [Client Quit]
<blazes816>
hmm. idk were i got that idea from either.
baphled has joined #ruby
<blazes816>
too much language switching I guess
arturaz has quit [Remote host closed the connection]
theRoUS has quit [Ping timeout: 265 seconds]
<Synthead>
with PTY.spawn in a block, is there a way I can wait for all child processes to exit?
Targen has joined #ruby
neersighted|AFK is now known as neersighted
<Synthead>
and keep the block open until then?
<shevy>
blazes816: think of strings are objects that respond to methods and whose main data is stored in self, which can be changed, even with replace()
<shevy>
*as
<blazes816>
I think i'm thinking of R_STRING or whatever
<rambda>
went AFK, but reading up on the discussion...does map mean that it will replace each line I'm looping over with output from the socket?
tiripamwe has quit [Ping timeout: 246 seconds]
<blazes816>
the under the hood. but again, I could be completely wrong
kvirani has joined #ruby
<blazes816>
rambda: yes, but as pointed out you don't need map in this case.
<rambda>
blazes816: ok, still reading...
<blazes816>
you can do line << socket_operation(line)
baphled has quit [Client Quit]
<blazes816>
but don't ask me why ;)
baphled has joined #ruby
<rambda>
lol
musl has joined #ruby
musl has quit [Client Quit]
ePirat_ has joined #ruby
musl has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
ePirat_ has quit [Remote host closed the connection]
Kevin_ has joined #ruby
ePirat_ has joined #ruby
<shevy>
rambda: think of .map as .apply_on_each_line or on_each_element
awarner has quit [Remote host closed the connection]
musl has quit [Client Quit]
ramblex has joined #ruby
prtksxna has joined #ruby
musl has joined #ruby
monvillalon has joined #ruby
burgestrand has joined #ruby
<monvillalon>
I need a y Ruby tidbit for a Chef recipe that saves the response of an url into a variable, can some body help
<Synthead>
any thoughts about PTY.spawn?
bosphorus has quit [Remote host closed the connection]
* offby1
watches the tumbleweeds skitter down Main St
wobr has joined #ruby
samuel02 has quit [Remote host closed the connection]
ryannielson has joined #ruby
<mjb2k>
monvillalon: take a look at OpenURI in the Ruby Std-Lib
<monvillalon>
mjb2k: thanks
kevinbond has quit [Quit: kevinbond]
Axsuul has joined #ruby
mobilegamelabs has joined #ruby
bfgun has quit [Ping timeout: 244 seconds]
Ionic` has joined #ruby
<monvillalon>
mjb2k: it seems to be what I need, but since I don't know ruby I don't know how to import it?
<Ionic`>
does ruby use pass by value or by reference?
<Ionic`>
(i.e. can I safely alter parameters passed to my function without worrying about it changing outside stuff?)
ryanf has joined #ruby
mikepack has joined #ruby
havenn has joined #ruby
mikepack has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
plastics has joined #ruby
<Ionic`>
ah, by value
<Ionic`>
hm, no, by reference
<any-key>
I prefer to pass by dereference
wunz has joined #ruby
tsou has left #ruby [#ruby]
Cicloid has quit [Remote host closed the connection]
<Ionic`>
any-key: don't make me unwrap you
<any-key>
>.>
khakimov has quit [Quit: Computer has gone to sleep.]
<yxhuvud>
Ionic`: neither. It passes the reference by value. This differs from pass by reference in that some values are stored in the reference itself.
carlyle has quit [Remote host closed the connection]
<monvillalon>
mjb2k: thanks, i was trying module and somehow in irb output stopped working
<mjb2k>
unless you're using ruby 1.8.x, then you may need to find the 1.8.x version of the docs
carlyle has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<any-key>
...then punch yourself in the face for still using 1.8.x
Eldariof-ru has quit []
<Tasser>
and install 1.9
<rambda>
starting to think it would be easier to simply pull my columns out of the csv file and just create a new file with those variables + the output from the loop
zommi has quit [Remote host closed the connection]
Foxandxss has joined #ruby
ephemerian has joined #ruby
niklasb has quit [Ping timeout: 265 seconds]
Relikahm has joined #ruby
SYNTActiX has quit [Read error: Operation timed out]
Progster has joined #ruby
emanu has joined #ruby
swistak35 has quit [Ping timeout: 246 seconds]
emanu has quit [Client Quit]
Tony_Sidaway has quit [Quit: leaving]
stephenjudkins has joined #ruby
baphled has quit [Quit: leaving]
baphled has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
luckyruby has joined #ruby
xaq has joined #ruby
baphled has quit [Client Quit]
tatsuya__ has joined #ruby
Relikahm has quit [Quit: Leaving]
baphled has joined #ruby
gry has quit [Changing host]
gry has joined #ruby
nanderoo has quit [Quit: Leaving.]
gry has quit [Changing host]
gry has joined #ruby
tatsuya_o has quit [Ping timeout: 246 seconds]
kava has quit [Quit: Leaving]
whitenoise has quit [Quit: Leaving]
baphled has quit [Client Quit]
baphled has joined #ruby
<cakehero>
I have unicorn processes w/a preloaded app that are running out of memory (can't spawn new workers) - any smart ways for me to profile the setup to debug this?
<Tasser>
cakehero, #rubyonrails might have more expirience with that kind of fun
ePirat_ has quit [Ping timeout: 264 seconds]
<cakehero>
okay cool, it happens to not be rails but I can ask there
baphled has quit [Client Quit]
<cakehero>
Same difference I'm sure
cpruitt has quit [Quit: cpruitt]
manizzle has joined #ruby
kirun has quit [Ping timeout: 245 seconds]
baphled has joined #ruby
dekroning has joined #ruby
<mjb2k>
what is a unicorn process?
<any-key>
it involves rainbows
<Tasser>
and their processing to shitty rainbows
<havenn>
mjb2k: when enough raindrops form, unicorns appear
geekbri has quit [Remote host closed the connection]
prtksxna has quit [Ping timeout: 246 seconds]
raluxgaza has quit [Remote host closed the connection]
<tintin>
Can i suggest to change feature/syntax or something of ruby here? Is this channel to say this?
<any-key>
mimay: first things first, try condensing that regex...
kjellski has joined #ruby
mockra has quit [Remote host closed the connection]
<any-key>
or break that up into multiple lines and use gsub! and sub!
<any-key>
assuming sub! is a function :P
beneggett has joined #ruby
thecreators has joined #ruby
<mjb2k>
Ionic`: convert your matchdata to an array with .to_a, then you can use .each ( I think (
<any-key>
that .each {} deserves to be on multiple lines, use "do" instead of curlies
<any-key>
mjb2k: you are correct
<havenn>
tintin: This is the IRC for the American documentary style reality television series on the Style Network about an overweight Southerner. You probably want #ruby-lang
<tintin>
So please remove this sign (<) and add extends to indicate inheritance
<mimay>
can someone improve it on the pastie?
dnyy has quit [Remote host closed the connection]
<tintin>
class a extends Core
<tintin>
The < is a special arithmatic/comparison operator
arturas has joined #ruby
mwilson_ has quit [Excess Flood]
<Ionic`>
mjb2k: ah, yeah, that may be an idea
mwilson_ has joined #ruby
mimay has left #ruby [#ruby]
avandenhoven has quit [Quit: avandenhoven]
Jackneill has quit [Remote host closed the connection]
<Ionic`>
yeah, but I want to go through it... or... well...
amh345 has quit [Changing host]
amh345 has joined #ruby
<any-key>
to_a.each will work
<Ionic`>
sure, it does
<Tasser>
so is your code, the only thing we'll ever see of you
carloslopes has quit [Ping timeout: 264 seconds]
<any-key>
hehehe
baphled has quit [Quit: leaving]
<Ionic`>
Tasser: hm? :p
<shevy>
now I want to see pics from any-key
<any-key>
nope
<any-key>
I prefer anonyminity
ryannielson has left #ruby [#ruby]
<Ionic`>
any-key is a hot redhead
mobilegamelabs has quit [Quit: http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
bradhe has quit [Read error: Connection reset by peer]
<amh345>
im trying to clean up a phone number field. is phone_number.delete('^0-9') the best way to ensure that only numbers are saved? it looks like .delete('^0-9') removed hyphens and spaces without issue. i just want ti make sure there arent any gotchas
<Ionic`>
like adam (savage)
<Tasser>
any-key, fitting, there was just a part in the track where the singer kind of puked in the micro...
<shevy>
there are no girls here
bradhe has joined #ruby
<keppy>
I have a noob active record questions the #rails people wont help me with. If anyone is interested...
<shevy>
keppy: activerecord is too tightly coupled to rails, I dont know many who use it without also using rails
cpruitt has joined #ruby
baphled has joined #ruby
carloslopes1 has quit [Client Quit]
<any-key>
it's not unheard of but rails people know it much better
<amh345>
any-key: ill check out that link.
carloslopes has joined #ruby
<any-key>
it's just a tool for trying out regex
<shevy>
it's like a big octopus that grows... rails
<amh345>
keppy: out of curiosity, what is the question?
<Tasser>
amh345, don't feed the troll!!
<amh345>
oh. it's a troll?
<amh345>
oppps
clockwize has quit [Quit: clockwize]
<keppy>
nope
<tintin>
havenn: What is many things
<shevy>
that is a philosophical question
<shevy>
:D
<keppy>
amh345: my spec is giving me an undefined method 'proposition' for #<User:xxxxxxxxx> when I try to do this: https://gist.github.com/3042484
baphled has quit [Client Quit]
williamcotton_ has joined #ruby
baphled has joined #ruby
williamcotton has quit [Ping timeout: 244 seconds]
williamcotton_ is now known as williamcotton
clockwize has joined #ruby
<keppy>
amh345: Propositions and Oppositions both belong_to :debate, but a User has_many :propositions and has_many :oppositions. Anyway this is only my 2nd rails project and I am most likely being retarded so feel free to flame me if you have the answers. Will take flaming for answers
dhruvasagar has quit [Ping timeout: 245 seconds]
<Ionic`>
mh nah I don't even need to iterate through the matchdata object, sorry
codeAdmiral has joined #ruby
bosphorus has joined #ruby
yoklov has joined #ruby
jxpx777 is now known as jxpx777|afk
<keppy>
seattle.rb tonight? anyone going?
<havenn>
tintin: Ruby uses the same character in difference context for different meanings. The '<' character has many meanings in different contexts.
<tintin>
havenn: Yes, that's why i suggest to use 'extends' keyword to indicate inheritance
<tintin>
So change the rule/grammer/syntax
<havenn>
tintin: Mixins!
mimay has joined #ruby
<havenn>
Isn't it just Rails who even use the This < That these days? =P
xbigdanx has left #ruby [#ruby]
robert_ has joined #ruby
<havenn>
tintin: There is an extends btw.
<amh345>
keppy, so it fails on line 11?
<tintin>
No, that is extend, not extends
<keppy>
amh345: yes
prtksxna has joined #ruby
<tintin>
So if the grammer changes, so you have to re-write a lot of ruby program/code including rails and rails app, right?
<codeAdmiral>
Alright, i'm a freshman who has writen Java for a couple of years, and i am just starting Ruby. Does anybody have any suggestions on a good starting place?
<mjb2k>
hmm, i just noticed this: "You have “mixin’s” instead of interfaces." on that page, I think that is a bit of a stretch, there are significant differences between ruby mixins and java interfaces
<Ionic`>
hmm, ruby's String class lacks mid/left/right? :/
<Tasser>
Ionic`, what would they do?
<Ionic`>
well... you could emulate it with [] I guess
<tintin>
They would re-write rails , so what's wrong?
<amh345>
^0-9. why no detect spaces/hyphens?
<tintin>
havenn: They would re-write rails replacing < to extends , so what's wrong?
<Ionic`>
indeed, [1..-0] SHOULD work, if life was perfect :(
<Ionic`>
but ruby returns "", oh well
<apeiros_>
amh345: because you want [^0-9]
<apeiros_>
just ^0-9 means match "start of string", "0", "-", "9"
robert_ has quit [Ping timeout: 265 seconds]
<amh345>
oh FFS
<tintin>
havenn: ?
<amh345>
apeiros_: thanks dude
bosphorus has quit [Remote host closed the connection]
<tintin>
cpruitt has quit [Quit: cpruitt]
keithcelt has quit [Remote host closed the connection]
SegFaultAX|work2 has quit [Ping timeout: 264 seconds]
<Tasser>
Ionic`, [1..-1]
<Ionic`>
Tasser: uh... why is it -1?
<havenn>
tintin: Ruby core will not break thousands of Ruby apps, when the '<' used as such isn't really ambiguous.
<Tasser>
Ionic`, because -0 doesn't work
<Ionic`>
Tasser: yeah, but... hm
<Ionic`>
shouldn't -1 stop before the last char?
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<havenn>
tintin: No apps are broken because people thing Rails is greater than Activerecord. But backwards compatibility is really important.
<tintin>
havenn: If they re-write apps, would it be broken, replaing < to other keyword should not be a hard way
schovi has quit [Remote host closed the connection]
<amh345>
interesting. in console >> "12-4 555".delete('^0-9') removes anything not 0-9 . in rubular i have to use [^0-9] to make it function. but using brackets[^0-9] in console "12-4 555".delete('[^0-9]') actually returns "- " . it mist be something in the delete method.
<Ionic`>
oh well...
<Tasser>
Ionic`, 0..-1 is the whole string
mdszy has joined #ruby
<Ionic`>
Tasser: yep, I get that
khakimov has quit [Quit: Computer has gone to sleep.]
<Ionic`>
Tasser: I wonder why they use -1 instead of -0 though
<Tasser>
because -0 => 0.@- => 0
<Ionic`>
0.@?
<Tasser>
try it. 0.send(:@-)
nachtwandler_ has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
<Ionic`>
that's giving me a parse error
<tintin>
havenn: Is re-writing/replacing < to other keyword a hard way?
<Tasser>
Ionic`, 0.send("@-")
<Ionic`>
ah
kava has quit [Quit: Leaving]
fantazo has joined #ruby
<Ionic`>
undefined method @- for FixNum
<Ionic`>
letssee what the fixnum doc says
khakimov has joined #ruby
moshee has quit [Ping timeout: 265 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
<Ionic`>
ok
<havenn>
tintin: It would require tens of thousands of lines of code to change. I think the question is, why? Is it worth it? Is it even something we want to be doing?
<Ionic`>
0.send("-@") == 0
<Tasser>
fuck
<Ionic`>
well... ook
<Tasser>
well, you see the point
<Ionic`>
that explains it
<Ionic`>
sure
<apeiros_>
0.send(:-@)
manizzle_ has joined #ruby
<havenn>
tintin: if you'd like to extends, it is trivial to alias it
maahes has quit [Read error: Operation timed out]
<tintin>
havenn: Yes, but you will just replace with a IDE like eclipse or netbeans , just one command and wait
<apeiros_>
and you can actually even call it by 0.-@()
<Ionic`>
0, too, yeah
<apeiros_>
irb doesn't seem to like it, though
Tearan has quit [Ping timeout: 250 seconds]
<Ionic`>
apeiros_: likes it for me
<mjb2k>
or you could spend your time doing something useful
friskd has quit [Quit: friskd]
<apeiros_>
Ionic`: my irb fails to print the return value for it
bradhe has quit [Read error: Connection reset by peer]
<Ionic`>
apeiros_: 1.9.3 doesn't
bradhe_ has joined #ruby
Tearan has joined #ruby
<Ionic`>
err
ixti has quit [Read error: Connection reset by peer]
friskd has joined #ruby
<Ionic`>
irb 0.9.6 v/ ruby 1.9.3
<Tasser>
apeiros_, works in pry
friskd has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
<tintin>
Tasser: calm down and watch your language
<deryl>
oh no, its tintin again
thyagu has joined #ruby
<Tasser>
tintin, speed up with your comments, they're a screen behind
ixti has joined #ruby
<thyagu>
my cap deploy is not producing files in the releases sub directory in the server, any pointers what went wrong?
<havenn>
<- troll food
<tintin>
lol
<Hanmac>
Information: "-0" is a number, "- 0" is a method call
jamesaxl has quit [Ping timeout: 248 seconds]
<tintin>
lol food
tintin has quit [Quit: tintin]
<Ionic`>
hrm
tar_ has joined #ruby
<keppy>
I'm writing a book on ruby called "What Went Wrong"
<Ionic`>
I hate writing parsers
<havenn>
You had me at NetBeans.
joast has quit [Ping timeout: 244 seconds]
<wmoxam>
keppy: Chapter 1: Rails
<Tasser>
Ionic`, lex/yac ?
baphled has quit [Quit: leaving]
<keppy>
Chapter 2: JavaScript
baphled has joined #ruby
<Ionic`>
Tasser: I'm trying it with ruby, though probably not the most intelligent way
<wmoxam>
Chapter 3: Hipsters
<keppy>
lol
wobr has quit [Quit: Leaving.]
<the_jeebster>
lmao
<amh345>
Chapter 4: Dongs
<the_jeebster>
definitely hipsters
<wmoxam>
Chapter 5: Zed Shaw
<the_jeebster>
can't knock ruby :o
<Tasser>
would explain the 90% apple coverage at ruby conferences :-)
<keppy>
but can knock Zed Shaw's hipster dong
<the_jeebster>
yup
<deryl>
dong gone wrong
<anothervenue>
hipster...dong?
ixti has quit [Read error: Connection reset by peer]
<amh345>
holla at yo dong
workmad3 has joined #ruby
<keppy>
i went to seattle.rb once and was scared away by hipsters. trying again tonight
<keppy>
i felt so uncool that I lied and blurted out "I'm developing an iphone app" :(
<Tasser>
keppy, just grab a huge joint and you're ok
<mjb2k>
Ionic`: I got it to expand just fine: al = "[a-z]"; num = "[0-9]"; regex = /#{al}+#{num}+/
jcrocetta has joined #ruby
<Ionic`>
mjb2k: yes, but I don't want it to escape :)
ben_alman has joined #ruby
<Ionic`>
imagine num was just "("
<Hanmac>
why not using \w and \d ?
<shevy>
the last one to have called me hipster is no longer alive
minijupe has quit [Quit: minijupe]
fbernier has quit [Ping timeout: 246 seconds]
davidpk has joined #ruby
<keppy>
shevy: your ex wife?
<shevy>
no
<Ionic`>
lol
alexim has quit [Quit: bye]
<anothervenue>
shevy: Are you running Haiku or Menuet as your main OS?
<shevy>
hmm no... linux :(
<shevy>
haiku is nice as idea, but they are too slowly evolving
<anothervenue>
shevy: Pshhhh, you can't wear the scarf then
<anothervenue>
:D
<Ionic`>
they are evolving?
<shevy>
I dont think ruby works on haikus out of the box
<anothervenue>
Glacier pace
<mjb2k>
Ionic`: like this: s = "("; e = ")"; r = /\w#{s}\d+#{e}\w/ ?
<Ionic`>
mjb2k: this will work, but I want to match a literal s
saschagehlich has quit [Quit: saschagehlich]
<Ionic`>
so Regexp.escape it is
<mjb2k>
I got this resulting regex: /\w(\d+)\w/
<Ionic`>
yeah... but again, not what I wanna do :)
ringotwo has quit [Remote host closed the connection]
myth17 has quit [Ping timeout: 265 seconds]
jcrocetta has left #ruby [#ruby]
<shevy>
we need a language to replace C
<keppy>
Ionic & mjb2k, pair regex programmers 4 life
<Ionic`>
shevy: C++ :p
<mjb2k>
so you want to expand the var, but not let it interpret what ever character is might be as a special char
ixti has joined #ruby
<Ionic`>
mjb2k: yep
<mjb2k>
i wonder if you could use \\
<Ionic`>
nope
<Ionic`>
this won't expand #{foo}
voodoofish430 has quit [Quit: Leaving.]
<shevy>
Ionic`: well that is not really a substantial improve IMO :\
<Ionic`>
shevy: good enough, I'd say?
<Ionic`>
then again, I have no idea what you need
<shevy>
C++ vs C, I don't feel it can really take the edge
<shevy>
Ionic`: one language to rule them all!
ringotwo has joined #ruby
<shevy>
one language to bind them and in the darkness spank them
<Ionic`>
lol
lorandi has quit [Quit: Leaving]
<shevy>
ruby is unfortunately too slow :(
sepp2k has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
plastics has quit [Ping timeout: 252 seconds]
havenn has quit [Remote host closed the connection]
<mjb2k>
seems that \\#{foo} gives the same result as Rexep.escape, but maybe I'm missing something else, oh well, I now understand the problem but I've lost interest in solving it, lol
clockwize has quit [Quit: clockwize]
<Ionic`>
hehe :p
<Ionic`>
Regexp.escape *is* the resolution
qwerxy has quit [Ping timeout: 244 seconds]
dekroning has quit [Ping timeout: 248 seconds]
<mjb2k>
yes i see that, it just didn't appear to be the only solution, I was a little confused when you said \\#{foo} didn't work when it appeared to work to me
tar_ has quit [Quit: farewell]
flowerhack has joined #ruby
myth17 has joined #ruby
friskd has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
<Ionic`>
oh
<Ionic`>
\\#{foo} does work
x0F_ is now known as x0F
<Ionic`>
but then \\ is not "expanded" to a single \
<mjb2k>
r = "^(.*)\\#{i}(.*)"; if (a =~ /#{r}/); p "yay"; else p "nay"; end
<mjb2k>
that works
baphled has joined #ruby
camilo has quit [Remote host closed the connection]
<Ionic`>
mjb2k: ah, yeah, cause \\ is then expanded to \
<mjb2k>
maybe not a better solution, but an explanation to the inconsistency I was seeing
tatsuya_o has joined #ruby
stephenjudkins has joined #ruby
atmosx has joined #ruby
baphled has quit [Client Quit]
<the_jeebster>
I have a variable that holds an arel query. is it possible to pass an argument to that variable or can I only pass args in a method?
bandu has joined #ruby
<bandu>
hey all.
tatsuya__ has quit [Ping timeout: 248 seconds]
flowerhack has left #ruby [#ruby]
sailias has quit [Quit: Leaving.]
<friskd>
Hey guys i'm looking for some terms to google for as i'm new to this space. We have a database of products. fields: name, description i want to start building something that would allow for users to type say "Toilet" and get Toilet Paper as the first result. Not Toilet Bowl etc.
<friskd>
What is that called?
<friskd>
What do i need to learn about to build a system that can bring relavent and related data to my users.
<blazes816>
the_jeebster: you can't pass things to the variable directly. what are you trying to do?
tatsuya__ has joined #ruby
<bandu>
friskd: fuzzy logic?
<blazes816>
friskd: why not Toilet Bowl?
<the_jeebster>
I'm trying to loop through an array and pass each items attribute to the query
<friskd>
ok. ill add that to my list.
<the_jeebster>
blazes816: I'm trying to loop through an array and pass each items attribute to the query
<friskd>
blazes816: because when people are on my site, they are more likely looking for toilet paper than toilet bowls
tatsuya_o has quit [Ping timeout: 246 seconds]
<blazes816>
friskd, gotcha
<friskd>
like go to amazon, type in toilet
<friskd>
it suggest toilet paper first.
<friskd>
out of all the possible things.
<bandu>
interesting.
<blazes816>
friskd: you do that by tracking what people search for, and ranking results accordingly
<bandu>
search IS important. i'm sure there's a field of study for that alone.
<blazes816>
friskd: if everyone search for toilet bowls and not toilet paper, they'd come up
davidpk has quit [Quit: Computer has gone to sleep.]
<blazes816>
the_jeebster: you can pastie or gist your code? I don't quite get what you mean
tatsuy___ has quit [Read error: Connection reset by peer]
tatsuya_o has joined #ruby
ryanf has quit [Quit: leaving]
gogiel2 is now known as gogiel
carlyle has quit [Ping timeout: 248 seconds]
DrShoggoth has quit [Quit: Leaving]
bbttxu has quit [Quit: bbttxu]
PaciFisT has quit [Quit: Leaving.]
tcopp has left #ruby [#ruby]
<Stumilowy>
i prefer more specific tutorials
<Stumilowy>
that one is too generic
sharenothing has joined #ruby
peregrine81 has joined #ruby
selector has quit [Quit: Leaving]
baphled has joined #ruby
<mjb2k>
Do you mean it's too basic? click the Documentation link on that page and there are plenty more to choose from
scb has quit [Ping timeout: 255 seconds]
<offby1>
banisterfiend: is there a way that I can run "pry" so that it can see all the stuff my tests would see, if I were running my tests via "rspec"?
minijupe has quit [Quit: minijupe]
tatsuya__ has joined #ruby
rking has quit [Quit: I suck: started outside of tmux.`]
<workmad3>
Ionic`: ^ <-- only matches start of string... wouldn't surprise me if that's what's failing
<Ionic`>
indeed... what the hell?
<Ionic`>
uhm, actually... that doesn't even what I intended it to do
<Ionic`>
*sigh*
<Ionic`>
even more manual work
<blazes816>
workmad3: surely that's a bug, right?
<blazes816>
if it is in fact the issue
<Ionic`>
blazes816: it is the issue
<mjb2k>
(.+?), isn't that 2 quantifiers in a row?
brendan` has quit [Remote host closed the connection]
<Ionic`>
and even more, match(bla, 1) returns o kenizr...
<Ionic`>
mjb2k: non-greedy match
atmosx has joined #ruby
<blazes816>
mjb2K: match any character, once or more, greedily
<mjb2k>
oh, ok
<workmad3>
blazes816: is it? should the regex matcher create a new substring when you tell it you want to start matching at the second character of the string?
Aaton is now known as Aaton_off
<blazes816>
workmad3: perhaps it's intentional. but I feel like if you're specifying to start matching in a different place, then THAT should be considered the beginning of the search string.
<Ionic`>
I'd expect it to no create a new substring but ignore everything up to pos
<blazes816>
but perhaps others disagree.
zastaph has quit []
<Ionic`>
instead, match creates a new substring or something
ringotwo has quit [Remote host closed the connection]
RainbowDashh has joined #ruby
kvirani has quit [Remote host closed the connection]
<shevy>
wish the ruby bindings to qt and gtk would be better and more uptodate
ringotwo has joined #ruby
ilyam has joined #ruby
EzeQL has quit []
<mjb2k>
whoo hooo!! Emerging from JAXB hell, going home to work on one of my Ruby projects now!!! ( sorry for the digression, just had to share my elation )
chienpo has quit [Quit: Leaving.]
<shevy>
what ruby projects
Progster has quit [Ping timeout: 252 seconds]
adeponte has quit [Remote host closed the connection]
<mjb2k>
favorite one right now is a "Enterprise Ready" password manager
<mjb2k>
rails app
RainbowDashh has quit [Client Quit]
banseljaj is now known as imami|afk
macmartine has quit [Quit: macmartine]
<mjb2k>
I'm hoping to use it to replace the pile of crap we're using now and be the first app in the door in my long term goal of pushing php out and ruby in
ben_alman has quit [Excess Flood]
sepp2k has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
cherrypeel has quit [Quit: Leaving]
<mjb2k>
unfortunately it's nothing I will be releasing public any time soon, due to employment agreements. I do plan to ask for ownership of the app at some point though. Then I would definitely release it
Stumilowy has quit [Ping timeout: 245 seconds]
<shevy>
oh railsy
<shevy>
closed source railsy
<shevy>
:D
axl_ has quit [Quit: axl_]
monvillalon has quit [Quit: monvillalon]
<shevy>
I'd wish .cgi wouldn't be so annoying to use
jxpx777|afk has quit [Quit: Mac is sleeping…]
<Tasser>
shevy, rails needs AGPL ;-)
<Ionic`>
shevy: .cgi is ok, .fcgi is worse
<mjb2k>
2nd place personal project is a GUI in ruby / GTK2 for a media server front end, but I'm still unsure if it's going to stay on ruby/GTK or move to java/swing
<shevy>
what is AGPL?
thecreators has quit [Quit: thecreators]
<atmosx>
good night everyone
<shevy>
atmosx!!! dont leave us!!!!!
thecreators has joined #ruby
<Ionic`>
though generally... I have no idea how to debug cgi stuff
<shevy>
yeah Ionic`
<Ionic`>
that's a pain in the (are we PG?)
<atmosx>
shevy: I know that ruby's future depends on my heavily, but I have to get some sleep :-P I'm working at the pharmacy tomorrow
moshee has quit [Ping timeout: 248 seconds]
<shevy>
hehe ok cya atmosx
moshee has joined #ruby
<atmosx>
shevy: do you want me to kill someone by supplying the wrong drug? :-P
<atmosx>
hahaha
<atmosx>
good night ppl :-)
<Ionic`>
atmosx: I'd like to have some drugs, please
<Ionic`>
pain relief ones, preferably
<atmosx>
Ionic` sure, you can pay via paypal and mail me the address
<atmosx>
I can send you a natural drugs that requires no prescription
btanaka has quit [Remote host closed the connection]
<atmosx>
i'ts a sort of painkiller
<atmosx>
with a sort of natural narcotic
yannis has joined #ruby
<Ionic`>
urgh, no thanks, I like me chemical stuff ;P
v0n has quit [Read error: Connection reset by peer]
<atmosx>
hahaha
<mjb2k>
like some vicodin
<atmosx>
ask shevy I'm sure he knows how to prepare cocaine ;-)
Criztian has quit [Remote host closed the connection]
schickung has joined #ruby
<graspee>
vicodin sucks because it has paracetemol in it
pk1001100011_ has joined #ruby
ben_alman has joined #ruby
thecreators has quit [Ping timeout: 246 seconds]
<mjb2k>
i actually had vicodin prescribed and it did great for me, but when my wife had it for back problems and didn't do anything for her
<blazes816>
mjb2k: I got vicodin prescribed once and it just made my heart race really bad. my mother eats the stuff like candy
<shevy>
atmosx: I am more interested in designing new biomolecular machines (enzymes), not so much in classical chemistry
pk1001100011 has quit [Ping timeout: 240 seconds]
ghanima has quit [Quit: Leaving.]
<fowl>
shevy, machines that wil massage your synapses to release dopamine and induce euphoria
<mjb2k>
(whoa, deleted overly political comment), servlet fixed, now I'm really leaving, I'll miss you shevy... ( tear )
bradhe has joined #ruby
mjb2k has quit [Quit: Leaving]
bradhe has quit [Remote host closed the connection]
tramm has joined #ruby
<Paradox>
particularly
<Paradox>
i'm looking for coolline's config on OS X
yoklov has joined #ruby
ryanf has joined #ruby
<tramm>
can anybody advise me where i should put my "require 'i18n'" in a ruby application like octopress... ?
<Paradox>
sigh octopress
* Paradox
hides
residentwhackjob has joined #ruby
<residentwhackjob>
\o
<tramm>
i manage to get my test application work, but without any real knowledge of ruby it's hard to understand how the whole application with all the gems runs together and where i should define this requirement.
<tramm>
Paradox, what's so scary about octopu... press?
davidcelis has joined #ruby
Markvilla has quit [Quit: Markvilla]
randomautomator has quit [Remote host closed the connection]
yannis has quit [Quit: yannis]
<Paradox>
tramm, its just a giant nightmare to work with if you want to do anything non-standard
monvillalon has joined #ruby
<Paradox>
since its built atop jekyll, nothing quite works right
<Paradox>
like…try using haml templates with it
mneorr has quit [Quit: Leaving.]
mneorr has joined #ruby
mneorr has quit [Remote host closed the connection]
artOfWar has quit [Remote host closed the connection]
freeayu has joined #ruby
gloriaC991 has joined #ruby
m104 has joined #ruby
andrewhl has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
<gloriaC991>
hey, is there a build-in way to convert a escape a string the way it would be escaped if it were a unix filename? example: filename".txt becomes "filename\".txt" (all quotes included)
<gloriaC991>
built-in*
m104 has left #ruby [#ruby]
<gloriaC991>
wow let me rewrite that message entirely
<gloriaC991>
hey, is there a built-in way to escape a string the way it would be escaped if it were a unix filename? example: filename".txt becomes "filename\".txt" (all quotes included)
ramblex has quit [Quit: ramblex]
yoklov has quit [Quit: computer sleeping]
tiripamwe has joined #ruby
ackz has quit [Quit: Leaving...]
fulmato has joined #ruby
kirun has quit [Quit: Client exiting]
liluo has joined #ruby
Natch has joined #ruby
kenichi has quit [Remote host closed the connection]
ephemerian has quit [Quit: Leaving.]
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
<shadoi>
gloriaC991: that has nothing to do with unix filenames and everything to do with how your shell handles certain characters in filenames.
seanstickle has joined #ruby
<gloriaC991>
shadoi: yep i know. i'm just trying to duplicate the algorithm
<shadoi>
And the answer is no. :)
<gloriaC991>
actually
<gloriaC991>
inspect/dump do the right thing
JustinCampbell has quit [Remote host closed the connection]
austinbv2 has quit [Ping timeout: 245 seconds]
Targen has quit [Ping timeout: 245 seconds]
<shadoi>
This works as you'd expect: 'filename".txt'
<gloriaC991>
they just don't do it intelligently
<shadoi>
But it may not mirror every case for shells and filenames.
<gloriaC991>
(they do it even if there are no special chars)
austinbv2 has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
avandenhoven has joined #ruby
MekkisScreen has joined #ruby
xaq has quit [Remote host closed the connection]
the_jeebster1 has quit [Quit: Leaving.]
nari has quit [Ping timeout: 246 seconds]
<tramm>
i suppose i have to put my require in the Rakefile or something to make it work...
apok has quit [Remote host closed the connection]
apok has joined #ruby
bfgun is now known as bfig
monvillalon has left #ruby [#ruby]
crankycoder has quit [Remote host closed the connection]