<forced_request>
Basically, I'm trying to figure out how to access the variable "@vars" that is defined in sim.rb (the main program) within the FunctionParser class
mephux has joined #ruby
artOfWar has quit [Remote host closed the connection]
<havenwood>
s/in a module/in a constant on a module
cableray has joined #ruby
Banistergalaxy has quit [Ping timeout: 272 seconds]
jodok has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
phantasm66 has quit [Quit: *poof*]
mmitchell has joined #ruby
d34th4ck3r has quit [Ping timeout: 272 seconds]
ryanf has quit [Read error: Connection reset by peer]
halfdan has left #ruby [#ruby]
ryanf has joined #ruby
<havenwood>
slyv: $~ is the global that points at the instance of the last match. You can edit that. You can't edit any of the globals that depend on $~.
<slyv>
Aight, thank you.
benlieb has quit [Quit: benlieb]
nari has quit [Ping timeout: 252 seconds]
<havenwood>
slyv: So no editing $&, $`, $+, $', or $1... except they change if you modify $~.
etcetera has quit [Read error: Operation timed out]
xlogic has quit [Remote host closed the connection]
<aedornm>
havenwood: but it only block RFID, and actually doesn't block just degrades the signal quality. Won't do much for NFC since you already have to be close
<havenwood>
Any OP on in the mood to update /title to ruby-2.0.0-rc2?? :)
biff_tannen has quit [Ping timeout: 252 seconds]
techhelp has joined #ruby
QKO has quit [Ping timeout: 260 seconds]
techhelp has quit [Remote host closed the connection]
<havenwood>
aedornm: Take emi-shielded bags from old graphics cards layered with copper mesh and make your own? :D
slainer68 has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 256 seconds]
<havenwood>
if microwave radiation as crowd deterrent gets more popular it might be nice to have some nice shielded-but-comfy clothing. >.>
icole has quit [Remote host closed the connection]
<aedornm>
lol
Pandaen has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
mythical has joined #ruby
maxmanders has joined #ruby
ilyam has quit [Quit: ilyam]
alvaro_o has joined #ruby
taoru has joined #ruby
niklasb has joined #ruby
danneu1 has joined #ruby
nari has joined #ruby
james__ has joined #ruby
Vektor has quit []
yshh has joined #ruby
Pandaen has quit [Ping timeout: 252 seconds]
willob has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 252 seconds]
<mr-rich>
I want to monitor a ruby cli app, but I don't want to fill the screen up with numbers or dots. Is there a way to put a simple counter that overwrites the output each time?
adman65 has quit [Quit: adman65]
mrsolo has quit [Quit: Leaving]
danneu1 is now known as danneu
ner0x has quit [Quit: Leaving]
<danneu>
mr-rich: could clear the screen each time
<danneu>
mr-rich: system("clear")
maxmanders has quit [Ping timeout: 260 seconds]
<danneu>
just like a frame buffer
onemanjujitsu has joined #ruby
<mr-rich>
danneu: a little overkill ... I've seen shell scripts do this ... wondered if ruby could do the same ... like a progress bar or something ...
<havenwood>
slyv: np, dunno why I assumed you wanted an array - if you're iterating nicer to not convert it to an array I guess: (5 - 1).downto(1) { |i| puts i }
otherj has quit []
<slyv>
Nah, was wanting it in an array
<havenwood>
slyv: aha! cool then ;)
<slyv>
:D
elaptics is now known as elaptics`away
samphippen has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
uris has joined #ruby
tensil has left #ruby [#ruby]
bttf has joined #ruby
etcetera has joined #ruby
kenneth has quit [Ping timeout: 272 seconds]
tensil has joined #ruby
breakingthings has joined #ruby
daniel_- has quit [Read error: Operation timed out]
eka has quit [Quit: Computer has gone to sleep.]
pdamer has joined #ruby
apoch632 has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
allaire has joined #ruby
fermion has joined #ruby
tensil has left #ruby [#ruby]
dagnachew has joined #ruby
tensil has joined #ruby
<breakingthings>
I'm working on an IRC bot application and am looking for some feedback on structure regarding my classes that maintain the connection and interact with the IRC server…
<breakingthings>
I want to establish a way to listen and respond to PING;
yacks has joined #ruby
tensil has quit [Client Quit]
<breakingthings>
I was thinking I would set up a Thread to read the socket and respond write "PONG" when it detects the server asking for a PING.
<breakingthings>
However, that seems out of the scope and purpose of Connection or IO. Should this be in my main class, where it can assemble the connection and handle it there?
inokenty has quit [Quit: Leaving.]
dallasm has joined #ruby
joofsh has quit [Remote host closed the connection]
ephemerian has left #ruby [#ruby]
tensil has joined #ruby
forced_request has quit [Quit: Leaving]
emmanuelux has quit [Quit: emmanuelux]
ilyam has quit [Quit: ilyam]
QKO has joined #ruby
Onii-san has quit [Ping timeout: 276 seconds]
QKO_ has quit [Ping timeout: 260 seconds]
arya has quit [Read error: Connection reset by peer]
arya has joined #ruby
joofsh has joined #ruby
<danneu>
mr-rich: i've actually used a few of the Ruby cli progress bar gems
<danneu>
mr-rich: might get the best answer just reading their source
<zzing>
I am using web development and system administration as an excuse to move away from php, not have to do much in perl, and learn a nicer looking language :-)
QKO has quit [Ping timeout: 252 seconds]
<shevy>
yeah
<shevy>
I started with perl, then php, then wanted a better language. I had to pick between python and ruby
<shevy>
matz had an old interview from 2003, that convinced me to try ruby first
<shevy>
I think python has quite a bit more developers though
adeponte has joined #ruby
<zzing>
It does, and it looks pretty, there is just something about it that bugs me.
otherj has joined #ruby
<jrabbit>
ruby and python are pretty related
<zzing>
I am a haskell fan as well.
onemanjujitsu has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
onemanjujitsu has quit [Remote host closed the connection]
moshee has joined #ruby
Bry8Star has joined #ruby
allaire has quit []
uris has quit [Quit: Leaving]
<shevy>
haskell seemed always very difficult
<shevy>
I think haskell is not for dumb people
<shevy>
I also think that ruby is too complex :P
<zzing>
shevy, haskell is one of those languages that is easy to get into, but you get stuck in the mud within half an hour
<shevy>
I dont know
<shevy>
the structure of i.e. C or java is conceptually fairly simple
<shevy>
haskell is very very different from that kind of flow
<zzing>
certainly
<shevy>
C is basically a bunch of functions doing things
<zzing>
Java always strck me as an overly verbose language developed at a time when C++ was small. Since then C++ has grown into the most flexible native compiler that I knwo.
marek_ has quit [Remote host closed the connection]
<shevy>
yeah Java is way too verbose
<zzing>
Its funny though, I like Objective C
<shevy>
I don't like that C++ is so complex and to be honest...
<shevy>
I think there should have never been a C++
<shevy>
they should have consolidated on a C like language
<zzing>
It is great that we have C++ that is so flexible. That flexibility has a high cost for knowledge mind you.
dmiller2 has joined #ruby
jlast has quit [Remote host closed the connection]
<shevy>
perhaps then we would not have suffered from java :-)
<shevy>
some things in C++ are cool
<zzing>
The C++ standards committee does amazing work, I wouldn't want their job.
<shevy>
the << operator, it sucks that C does not have it
<zzing>
C has the << operator
<shevy>
it has?
<zzing>
It is a binary shift left
<zzing>
C++ redefined it on ostreams
<shevy>
ah I see
marek_ has joined #ruby
<zzing>
You know how printf is unsafe?
<shevy>
nope, no real idea
<shevy>
I always struggle when I hit pointers to pointers
<zzing>
printf("%d"); that could crash
<zzing>
In C++11 it is possible to write a completely safe compile time [type] checked version of printf.
<zzing>
Thanks to template metaprogramming, that was discovered by accident in the 90s
dmiller1 has quit [Ping timeout: 255 seconds]
ilyam has joined #ruby
t0xik has joined #ruby
t0xik has quit [Remote host closed the connection]
dougireton has joined #ruby
octoberry has joined #ruby
ksinkar_ has joined #ruby
<shevy>
hehe
<shevy>
are you saying the C++ standards committee kind of works by accident as well? :D
<shevy>
"We plan and devise the future - but most of our old features were discovered by accident!"
<shevy>
or luck haha
slyv has quit [Quit: Computer has gone to sleep.]
<zzing>
shevy, well imagine the work that would have gone into C++11 over the last decade. They have to extend the language with new features that have to work, cannot break anything from before, in an already complex language. That is a really tall order considering that C++98 was already complex.
<shevy>
yeah
<shevy>
it would be nice to have languages not have to remain backwards compatible though
<zzing>
Look at Python 3 - they broke a lot.
ksinkar__ has joined #ruby
<shevy>
yeah, I hate them for this
<shevy>
it is no fun to learn python for me right now until the community has settled on one version
ksinkar_ has quit [Ping timeout: 260 seconds]
<zzing>
shevy, I believe your last two statements are contradictory :P
jeffreybaird_ has joined #ruby
ezkl has quit [Quit: out!]
<shevy>
zzing well
ksinkar__ has quit [Client Quit]
ezkl has joined #ruby
<shevy>
zzing the problem is, how much will a new language be the same, and how much will it have changed
<zzing>
C++ is a published international standard, if C++11 broke stuff, nobody would use it because of the installed base. The same thing with python3.
<shevy>
for instance, on #python I was told that python2 and python3 are basically different languages
<zzing>
I was warned about ruby updating can break things (whether or not this turns out to be true or a problem is yet to be seen)
<zzing>
They quite are
jeffreybaird has quit [Ping timeout: 256 seconds]
jeffreybaird_ is now known as jeffreybaird
dallasm has quit [Read error: Connection reset by peer]
<zzing>
C++11 feels like a different language, yet it is backwards compatible
<shevy>
perl5 vs. perl6 would be an even larger difference, ruby 1.8.x and 1.9.x is a medium difference, only a few things changed (new syntax, some different warnings, encoding)
<zzing>
What about this ruby2 in the topic?
dallasm has joined #ruby
<shevy>
zzing yeah some gems tend to be annoying when one updates them, or the ruby version
<shevy>
I think ruby2 will come in 2013
<shevy>
I mean
<shevy>
the finished one
aantix has joined #ruby
<zzing>
An ecosystem like ruby really needs to be the paragon of stability - or a way of achieving it
etcetera has quit []
<shevy>
hmm this is difficult
<aedornm>
ruby... stability... paragon.
<shevy>
i.e. how the different rails versions are incompatible
<zzing>
How long until php adds ==== and =====? :-)
dougireton has quit [Quit: Leaving.]
ozgura has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
<shevy>
dunno
<shevy>
I stopped reading php updates when they added namespace... how do you do it... I think with \ ?
<aedornm>
net/ftp appears to be slow for transfers. Can someone concur?
<zzing>
I was shocked when I learned that the php equality operator wasn't transitive.
<shevy>
php is like the ultimate glue language, even in its design
ryanf has joined #ruby
a_a_g has joined #ruby
caleb_io has quit [Quit: caleb_io]
<zzing>
shevy, I don't think it has a design
<shevy>
aedornm dunno, ruby is slow :D
bubblehead has quit [Remote host closed the connection]
<shevy>
zzing yeah I am not sure myself either. I think in a way it is just a melting pot for functions that *could* be "useful" on the web
<zzing>
probably
ngoldman has joined #ruby
josephholsten has quit [Ping timeout: 245 seconds]
gabrielrotbart has quit [Remote host closed the connection]
<shevy>
I dont like rails that much but I am curious if it will grow, and if so, if growth will come at the expense over php too
<zzing>
I would love something that was as easy as php to integrate into web pages, but was able to be compiled in a fashion like JSP watches for changes.
caleb_io has joined #ruby
<aedornm>
shevy: Yes. It is. There's no way I'll be able to serve real time Fibonacci sequences to millions of people at the same time.
<zzing>
I will give php that it is simple to get something basic going
<shevy>
yeah
<shevy>
test.php
<shevy>
I'd wish ruby would have something equivalent by default
<zzing>
There seems to be a lot of ruby implementations
h4mz1d has joined #ruby
browndawg1 has joined #ruby
<shevy>
right, but installing rails is not always without problems
<zzing>
shevy, take something like macruby, extract out the objective C bindings, and make use of the compilation and make it operate like a simple JSP
<shevy>
I'd rather like to see ruby come with something stronger than cgi by default
<aedornm>
Guess I'll just rewrite this to call curl instead until I can benchmark and figure out the discrepancy
browndawg has quit [Ping timeout: 255 seconds]
<zzing>
Are there not abilities to just run a web server and have apache proxy over to it?
<shevy>
zzing dunno really... I still use cgi myself
otherj has quit []
<zzing>
I liked php_fpm with nginx, but it wasn't very scalable for multiple users with things like wordpress. .htaccess files are expensive, but really handy in the environment I administer
Jonah11_ has joined #ruby
<zzing>
shevy, ever looked at thor?
SCommette has quit [Quit: SCommette]
ryanf has quit [Ping timeout: 245 seconds]
<Jonah11_>
I am confused about "self". From an irb prompt, self returns "main", whose class is Object. yet if i require 'sinatra', i am able to call "get" but "self.get" returns a NoMethodError. I thought a method call without "self." always had an implied self...
<shevy>
zzing not really, no
<shevy>
Jonah11_ do you call self. within a class? or outside
<zzing>
shevy, it seems to solve my problem of command line stuff really nicely. It seems to be aimed at a rake replacement but can be used in this way too.
ozgura has joined #ruby
jeffreybaird has quit [Quit: jeffreybaird]
<shevy>
zzing aha
<shevy>
I get away by not having to use rake
<shevy>
for instance, "iruby" is an alias I use, which installs all my ruby projects locally
<shevy>
"iruby" points to "invoke install_ruby"
<aedornm>
hmmm 103MB/s using Ruby net/ftp.. 98.4MB/s using curl. Okay, I'm confused now.
<shevy>
where install_ruby is a method in a .rb file I require
dhruvasagar has quit [Ping timeout: 256 seconds]
<shevy>
and "invoke" is the way I call ruby, with arguments, to load those .rb files
LouisRoR has joined #ruby
<shevy>
so I dont have to use rakefiles, I can just use my normal scripts and .rb files
<shevy>
aedornm curl is faster!!!
<shevy>
aedornm let's try the obvious question first
brucelee has joined #ruby
<shevy>
aedornm are you downloading pr0n? :P
<aedornm>
oooh it's the block
<brucelee>
what does the following syntax do "define :blahblah, :blahblah => foo do?
<brucelee>
trying to figure out some code, and theres nowhere i can find in google, or im not sure what to search google for, that would tell me the answer to the above q
<aedornm>
ooor not, it's only a tad bit less
micahgodbolt has joined #ruby
gommo has quit [Remote host closed the connection]
ebobby has joined #ruby
<aedornm>
So when we run this on actual production systems we only get around 1-6MB/s transfers, and curl gets ~50, but this machine will easily get 100+MB/s, and seems to be generally faster than curl. So confused
stopbit has quit [Quit: Leaving]
QKO has joined #ruby
<ezkl>
Net::FTP connects via plain old TCP or SOCKS sockets.
hackerdude has quit [Remote host closed the connection]
<shevy>
brucelee you must try to "think" how the ruby parser sees it
adeponte has quit [Remote host closed the connection]
<shevy>
brucelee so the first step is to try to find out what syntactic sugar is hiding what you see
<wmoxam>
programming is like 90210. Programmers get all catty about who is sleeping with what programming language
<shevy>
I really feel the scripting languages are way too close in terms of speed
<shevy>
the one I count to the scripting language family, but being much faster, is lua
yacks has quit [Ping timeout: 255 seconds]
<shevy>
so either one wants to be super fast, then one uses C. or one uses lua, for simplicity... and if not, then I really dont think there is a huge difference between perl php python or ruby (comparing most recent versions of all)
<havenwood>
Ruby will have HPC MRuby soon...
<shevy>
brucelee there are also a few tiny "tricks" one could make use
<shevy>
brucelee for instance, if you have a string object a = "bla"; and you want to append to it, you could use either << or +=
aantix has quit [Quit: aantix]
<shevy>
but += allocates one new string object so it is a tiny bit slower than <<
dougireton has quit [Read error: Connection reset by peer]
<wmoxam>
ugh
<brucelee>
ah
<aedornm>
I'm going to redo everything in Go, because it's trendy.
dougireton has joined #ruby
<wmoxam>
don't micro benchmark
<wmoxam>
it's pointless
hemanth has joined #ruby
ananthakumaran has joined #ruby
<wmoxam>
I mean if you're appending 20 trillion strings then maybe you've choosen the wrong tool to begin with
<RehpotsirhC>
shevy, Didn't think so. I'm trying a later revision to see if it was something patched.
backjlack has joined #ruby
brucelee has quit [Quit: Lost terminal]
arya has joined #ruby
justsee has quit [Quit: Leaving...]
b0oh has quit [Quit: Leaving.]
Jonah11_ has quit [Ping timeout: 272 seconds]
ryanf has joined #ruby
Jonah11_ has joined #ruby
<RehpotsirhC>
Update: Using p385 I was able to compile it w/ multiple threads.
tagrudev has quit [Remote host closed the connection]
tagrudev has joined #ruby
erdsa has joined #ruby
arya has quit [Ping timeout: 245 seconds]
brianpWins has joined #ruby
erdsa has quit [Client Quit]
crackfu has joined #ruby
timonv has joined #ruby
banjara has joined #ruby
<Gate>
chuck norris appends trillions of strings on a single line in an immutable string language using +.
goraxe has joined #ruby
ryanf has quit [Ping timeout: 260 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
b1rkh0ff has quit [Read error: Operation timed out]
arya_ has joined #ruby
<nat_home>
what is the right way in ruby to find an element in a collection ? I did something like websvr = ec2.security_groups.find 'webservers' ; websvr = websvr.first
davetherat1 has quit [Remote host closed the connection]
<nat_home>
but I'm pretty sure it can be done in 1 lnine
timonv has quit [Read error: Connection reset by peer]
aaronmacy has quit [Quit: Leaving.]
b1rkh0ff has joined #ruby
Elhu has joined #ruby
arya_ has quit [Ping timeout: 252 seconds]
clooth has joined #ruby
arya_ has joined #ruby
nilobject has joined #ruby
benlieb has quit [Quit: benlieb]
uxp has quit [Ping timeout: 276 seconds]
adeponte has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
ebobby has quit [Quit: Lost terminal]
benlieb has joined #ruby
vlad_starkov has joined #ruby
uxp has joined #ruby
Xeago has quit [Remote host closed the connection]
yacks has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ryanf has joined #ruby
workmad3 has joined #ruby
aganov has joined #ruby
crackfu has quit [Remote host closed the connection]
fasta_ is now known as fasta
d34th4ck3r has joined #ruby
puppeh has joined #ruby
relixx has joined #ruby
nomenkun has quit [Remote host closed the connection]
Marco has quit [Ping timeout: 272 seconds]
<cmyers>
I am having a weird problem - I just uncommented the asset pipeline in my Capfile, and when I do my rails deploy, I see: executing "cd -- /home/adms/apps/adms/releases/20130213072659 && #<Capistrano::Configuration::Namespaces::Namespace:0x00000001848360> RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/adms/apps/adms/shared/assets/manifest.yml /home/adms/apps/adms/releases/20130213072659/assets_manifest.yml"
<cmyers>
anyone know why it is running that weird thing instead of "rake"?
beliveyourdream has joined #ruby
mafolz has joined #ruby
<cmyers>
running capistrano v 1.8.24
ryanf has quit [Ping timeout: 252 seconds]
<danneu>
nat_home: check out ruby docs for enumerable and array (enumerable first)
<cmyers>
oops, wrong window, I meant that for #capistrano. my bad =(
havenwood has quit [Remote host closed the connection]
decoponio has joined #ruby
arturaz has joined #ruby
marr has joined #ruby
hoelzro|away is now known as hoelzro
gregory68 has left #ruby [#ruby]
chichou has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
aaronmacy has quit [Quit: Leaving.]
francisfish has joined #ruby
seba4 has quit [Remote host closed the connection]
Elhu has joined #ruby
blaxter has joined #ruby
bradhe has joined #ruby
Criztian has joined #ruby
adman65 has joined #ruby
yacks has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 272 seconds]
hmarr has joined #ruby
Xeago has joined #ruby
ozgura has quit [Remote host closed the connection]
<lewix>
shevy: textmate?
<lewix>
how to comment out an entire selection in one go
kristofers has joined #ruby
<lewix>
s/paragraph/selection
<lewix>
never mind
<lewix>
wrong channel
blacktulip has joined #ruby
adeponte has quit [Remote host closed the connection]
adeponte has joined #ruby
banjara has quit [Quit: Leaving.]
slainer68 has joined #ruby
ephemerian has joined #ruby
<Hanmac_>
lewix osx software is always wrong :P
bettor has left #ruby [#ruby]
main has joined #ruby
blacktulip has quit [Ping timeout: 245 seconds]
adeponte has quit [Ping timeout: 256 seconds]
Al___ has joined #ruby
elaptics`away is now known as elaptics
<lewix>
Hanmac_: hmm
yacks has joined #ruby
main has quit [Max SendQ exceeded]
main has joined #ruby
puppeh has quit [Read error: Connection reset by peer]
fixl has joined #ruby
mockra has joined #ruby
puppeh has joined #ruby
rdark has joined #ruby
<emocakes>
morning
main has quit [Max SendQ exceeded]
blacktulip has joined #ruby
atyz has joined #ruby
julian-delphiki has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 252 seconds]
chussenot has joined #ruby
DuoSRX has joined #ruby
robotmay has joined #ruby
Jalada is now known as vinym
jerikl has quit [Read error: Connection reset by peer]
samphippen has joined #ruby
main has joined #ruby
vinym is now known as Jalada
Elhu has quit [Quit: Computer has gone to sleep.]
main has quit [Max SendQ exceeded]
Vainoharhainen has joined #ruby
Elhu has joined #ruby
joeycarmello has joined #ruby
bradhe has joined #ruby
buscon has joined #ruby
veer has joined #ruby
xkx has joined #ruby
veer is now known as Guest35194
<weeb1e>
Anyone been able to get ruby-debug working on debian squeeze?
xkx has quit [Client Quit]
<weeb1e>
I have tried all sorts of versions of it and its dependencies without any luck
pyrac has joined #ruby
xkx has joined #ruby
codecaster has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
dallasm has quit [Remote host closed the connection]
_veer has quit [Ping timeout: 248 seconds]
main has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
d34th4ck3r has joined #ruby
tagrudev has quit [Remote host closed the connection]
QKO_ has joined #ruby
tagrudev has joined #ruby
razibog has joined #ruby
QKO has quit [Ping timeout: 256 seconds]
main has quit [Excess Flood]
lkba has joined #ruby
relixx has joined #ruby
buibex has joined #ruby
main has joined #ruby
rakaar has quit [Ping timeout: 252 seconds]
dkannan has joined #ruby
banjara has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 252 seconds]
Criztian has quit [Ping timeout: 276 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
ozgura has joined #ruby
codecaster has quit [Quit: Leaving.]
Xeago has quit [Remote host closed the connection]
predator117 has quit [Quit: leaving]
timonv has joined #ruby
Criztian has joined #ruby
pu22l3r_ has joined #ruby
pu22l3r_ has quit [Remote host closed the connection]
buibex has quit [Ping timeout: 240 seconds]
evenix has joined #ruby
eka has joined #ruby
bricker_ has joined #ruby
predator117 has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
mahmoudimus has joined #ruby
dhruvasagar has quit [Remote host closed the connection]
<shevy>
lewix I use bluefish 1.0.7
<shevy>
emocakes! where is my cakessss!!!
monkegji_ has joined #ruby
<shevy>
weeb1e is that a gem or built into ruby?
pu22l3r has quit [Ping timeout: 252 seconds]
evenix has quit [Read error: Operation timed out]
tensil_ has joined #ruby
<weeb1e>
shevy: gem, I need it to use ruby-debug-ide so that I can attach a remote debugger
rakaar has joined #ruby
<shevy>
aha, ok
bricker has quit [Ping timeout: 252 seconds]
<shevy>
what does "gem list" give you?
tensil has quit [Read error: Operation timed out]
yfeldblum has joined #ruby
tensil_ is now known as tensil
<shevy>
does it find that gem or not
mengu has joined #ruby
taoru_ has joined #ruby
<weeb1e>
I can install the gem, and have tried many versions of it and its dependencies shevy
samuel02 has joined #ruby
<weeb1e>
In the end I always get: gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type
relixx has quit [Quit: relixx]
<shevy>
weeb1e also, always include the specific error you can see, to the best of your knowledge, right now I dont think anyone knows what is the error
<shevy>
aha, ok, now we can see the error
jgrevich has quit [Remote host closed the connection]
<shevy>
hmm I just installed the gem, it works fine here
<weeb1e>
shevy: I also think I somehow broken rubygems while installing and uninstalling all these gems :|
<weeb1e>
shevy: Debian squeeze?
<shevy>
ruby-debug (0.10.4)
<shevy>
ruby-debug-base (0.10.4)
<weeb1e>
I installed it fine on an ubuntu box, but I need it working on debian
<shevy>
weeb1e nope, I compile and install everything from source
<shevy>
Hanmac uses debian
<shevy>
where is ruby_threadptr_data_type ?
<weeb1e>
I think it is part of linecache19, at least that is what I got from researching that error
<weeb1e>
But I've tried many versions of it
angusiguess has joined #ruby
<shevy>
well debian has a strict versioning scheme
<weeb1e>
I also seem to have broken rubygems now after uninstalling and reinstalling these gems so many times
<weeb1e>
shevy: I've tried so many combinations of these commands
<shevy>
Fetching: linecache19-0.5.12.gem (100%)
<shevy>
weeb1e it failed here
<weeb1e>
Even tried compiling the head of repos of this gem and its dependencies (linecache)
monkegji_ has quit [Remote host closed the connection]
<weeb1e>
shevy: clone and build git://github.com/mark-moseley/linecache
<weeb1e>
(I also tried installing a build gem version which was linked to in a report of someone solving the above native error, but same issue)
<weeb1e>
*built
<shevy>
this linecache thing refuses to compile
<weeb1e>
It compiled fine for me
<weeb1e>
$ sudo gem install ./linecache19-0.5.12.gem\nBuilding native extensions. This could take a while...\nSuccessfully installed linecache19-0.5.12\n1 gem installed
<shevy>
hmm no, it hates me
<weeb1e>
Meh
Hanmac_ has quit [Ping timeout: 245 seconds]
<weeb1e>
Hates me more
<shevy>
ohhhh
<shevy>
I see something
relixx has joined #ruby
<shevy>
a disguised error, a moment
<weeb1e>
Remote debugging would speed up development so much, since I do all my development remotely
<weeb1e>
Manual remote development with auto file syncing is a bit annoying
<shevy>
nope sorry
<shevy>
my 1.9.3 is broken in openssl
<shevy>
dunno why
<banister`sleep>
anyone here use s and ruby 2.0 ?
Elhu has quit [Quit: Computer has gone to sleep.]
<weeb1e>
Meh :(
codecop has joined #ruby
taoru_ has quit [Remote host closed the connection]
taoru has joined #ruby
brianpWins has quit [Quit: brianpWins]
hit has left #ruby [#ruby]
<banister`sleep>
weeb1e: perhaps pry-remote-em / pry-remote would work for u
dcwu has quit [Quit: Leaving.]
<weeb1e>
banister`sleep: It is a EM based application, so I use pry sometimes, as well as other RPC interfaces
nat_home has quit [Quit: Leaving.]
arya has joined #ruby
<banister`sleep>
weeb1e: then pry-remote-em is probably right for u
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Hanmac_>
shevy i am currently building my rwx binding against ruby2.0 :P
D4T has quit [Ping timeout: 272 seconds]
D4T_ is now known as D4T
hit has left #ruby [#ruby]
baphled has joined #ruby
adeponte has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
predator117 has quit [Quit: leaving]
Elhu has joined #ruby
banjara has joined #ruby
predator117 has joined #ruby
Qwakeree has joined #ruby
stormetrooper has joined #ruby
<weeb1e>
banister`sleep: You wouldn't happen to have experience using guard would you? I see it uses pry
lewix has quit [Ping timeout: 245 seconds]
<banister`sleep>
weeb1e: no i dont, sorry
QKO has joined #ruby
adeponte has quit [Ping timeout: 260 seconds]
<weeb1e>
Guard is doing something very strange to my gem requires, where it requires './lib/<gem_name>.rb' instead of the gem (even when using Bundler.require) and fails since my lib files are monkeypatches for the gems
poikon_ has joined #ruby
QKO_ has quit [Ping timeout: 255 seconds]
Amnesia has left #ruby [#ruby]
cha1tanya has joined #ruby
poikon has quit [Ping timeout: 272 seconds]
<weeb1e>
Oh it is in fact not guard at all, but rspec...
<weeb1e>
Maybe I should try a different testing framework
<Paradox>
rspec <3
arya has quit [Ping timeout: 276 seconds]
Criztian has joined #ruby
<weeb1e>
Does anyone know how to stop rspec from adding ./lib to the load path?
<workmad3>
weeb1e: check your .rspec file
<arturaz>
OT: What do people use for project/team management? Not only for tech tasks, but also design or "go to the bank to get the statement" or something.
<workmad3>
weeb1e: does that have '-I lib' in it?
<weeb1e>
I don't have such a file, I don't usually use rspec
lkba has quit [Ping timeout: 256 seconds]
<weeb1e>
I am only trying to use rspec to be able to use guard for simple automated testing
<banister`sleep>
arturaz: evernote
<weeb1e>
This is turning out to not be so simple
havenwood has joined #ruby
arya has joined #ruby
<weeb1e>
I think I'll try minitest, hopefully it won't go crazy and start adding random stuff to my load path
wyhaines_ has joined #ruby
wyhaines has quit [Read error: Connection reset by peer]
arturaz has quit [Remote host closed the connection]
bradhe has joined #ruby
havenwood has quit [Ping timeout: 244 seconds]
<banister`sleep>
weeb1e: i like bacon
<banister`sleep>
minitest is probably just as good though
dkannan_ has joined #ruby
daniel_- has joined #ruby
baphled has quit [Ping timeout: 256 seconds]
Norrin has left #ruby [#ruby]
dkannan has quit [Ping timeout: 252 seconds]
dkannan_ is now known as dkannan
beneggett has joined #ruby
hmarr has joined #ruby
banjara has quit [Ping timeout: 244 seconds]
samphippen has joined #ruby
baphled has joined #ruby
poikon_ has quit [Remote host closed the connection]
poikon has joined #ruby
<weeb1e>
banister`sleep: I like cucumber for large scale testing, but minitest seems pretty awesome
arya has quit [Ping timeout: 272 seconds]
<banister`sleep>
weeb1e: u're the only guy i've met who likes cucumber :)
<Xeago>
banister`sleep: what is wrong with cucumber?
beneggett has quit [Quit: Computer has gone to sleep.]
<banister`sleep>
Xeago: i dont use it, but the people who do who dont like say that it's aiming for a middle ground (between developers and stakeholders) that it doesnt quite reach. That it's neither useful for devs or stakeholders and that it's just unnecessary fluff that doesnt help
<Xeago>
I haven't constructed my own opinion about cucumber but I share in the idea that it feels like hot fluffy air to me
<hemanth>
[1,2,3,4].first(3) vs [1,2,3,4].take(3) hmm
<Xeago>
but, don't have enough experience for an opinion
matchaw_ has joined #ruby
arturaz has joined #ruby
<banister`sleep>
hemanth: i use take as it's back compatible
yfeldblum has quit [Ping timeout: 272 seconds]
<hemanth>
banister`sleep, ha ok, back compatibilty matter :)
Zespre_ has quit [Read error: Connection reset by peer]
joelroa has joined #ruby
<JonnieCa1he>
khismetix: learn to replace all your loops with things like map and inject
Qwak has joined #ruby
Zespre has joined #ruby
<khismetix>
ok.. that's good
Qwak has quit [Client Quit]
<JonnieCa1he>
it all kinda flows from there once you can think in those terms. at least for very basic FP anyway
joelroa has quit [Client Quit]
<khismetix>
One bit I've not grasped yet is the way they say a pure function shouldn't for example write to a stream
<khismetix>
sees that as a side effect
<workmad3>
khismetix: yes
<khismetix>
how, in practice do you structure code to write to a stream for example (in FP)
arya has quit [Ping timeout: 252 seconds]
<JonnieCa1he>
pure functional programming is a whole different level. best to just mix in functional stuff like map/inject into your imperative code at first
<JonnieCa1he>
ruby is good for mixing like that.
puppeh has quit [Client Quit]
<workmad3>
khismetix: ruby isn't a pure functional language though... ruby is an OO language with the ability to do some FP stuff if you like
yshh has quit [Remote host closed the connection]
<JonnieCa1he>
if you want to learn pure FP for its own sake you might be better off in a language that enforces it, like haskell
<khismetix>
ok sure
<jrabbit>
or a lisp
<khismetix>
so, if I had a ruby programme which contained a function which wrote to a file
<khismetix>
is that breaking fp ?
<JonnieCa1he>
well, all programs have to have side effects eventually, or they wouldnt be useful for anything
evenix has quit [Ping timeout: 272 seconds]
<khismetix>
yes.. that was what I was thinking
<workmad3>
JonnieCa1he: blasphemy!!!
<khismetix>
;)
arya has joined #ruby
<JonnieCa1he>
in pure FP you limit those side effects to things like IO
<khismetix>
ol
<khismetix>
ok
<khismetix>
can you give an example of stuff to avoid to stay within spirit of FP (within Ruby)?
<khismetix>
obviously… loops replaced as you say
<JonnieCa1he>
loops replaced only with things like map, which returns stuff
<JonnieCa1he>
no using .each
monolar has left #ruby [#ruby]
<JonnieCa1he>
.each exists explicitly for when you want side effects
<Xeago>
JonnieCa1he: why no .each?
<khismetix>
ok.. I had thought each was an FP feature within Ruby
<Xeago>
same here
<JonnieCa1he>
Xeago: what use is .each except for creating side effects? it doesnt return anything
banjara has joined #ruby
<JonnieCa1he>
(i know it returns an enumerator but lets ignore that here)
<Xeago>
JonnieCa1he: is that necessary for FP?
<JonnieCa1he>
Xeago: for pure FP, yes. which is what we're discussing
<Xeago>
you can pass in arbitrary functions (blocks), to be called on each block
arya has quit [Ping timeout: 248 seconds]
<workmad3>
Xeago: right, but .each returns the array again, unchanged
<workmad3>
Xeago: so without side-effects, the only thing you have to play with is the return value... if the return value remains unchanged, and you have no side effects, what you have is an identity function
d34th4ck3r has quit [Ping timeout: 240 seconds]
<Xeago>
workmad3: than how would you call a function on each element of an array in FP?
<workmad3>
Xeago: well, the only thing you'd care about in that case is the return value of those functions, in a new array
dkannan_ has joined #ruby
<workmad3>
Xeago: so you'd use map ;)
jaygen has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 245 seconds]
jaygen has joined #ruby
<JonnieCa1he>
basically use map all the time for everything because its the greatest concept in the history of CS
<JonnieCa1he>
and it makes java programmers weep
Udom0 has quit [Ping timeout: 244 seconds]
<Xeago>
interested in how to print the results of a function called on each element then
jaygen_ has joined #ruby
<Xeago>
.map(:to_s).map(:display) ?
<workmad3>
Xeago: display has side effects
<Xeago>
I am kinda aiming for sideeffects: printing to output
jaygen has quit [Read error: Operation timed out]
dkannan has quit [Ping timeout: 256 seconds]
<workmad3>
Xeago: exactly... but that has no place in pure FP
dkannan_ is now known as dkannan
<Xeago>
workmad3: then pure FP has no use for programming if it cannot output data?
anderson has quit [Read error: Connection reset by peer]
<workmad3>
Xeago: sure it can, but it has to output data only through the return value
relixx has joined #ruby
<JonnieCa1he>
in practise when making a real program in this way you keep all the code that does IO (side effects) in one place, carefully controlled and segregated so state cannot leak out of it
<workmad3>
Xeago: and when dealing with interfaces that aren't functional, then you have to break pure FP, but pure FP languages only allow you to do that in certain, controlled areas
anderson has joined #ruby
<JonnieCa1he>
i think languages like haskell have special features to allow that
inao has quit [Quit: Leaving...]
arya has joined #ruby
QKO has joined #ruby
evenix has joined #ruby
<Nuck>
Okay, how do I do those cool things like ActiveRecord does for validations, where a class method modifies the instance?
<workmad3>
JonnieCa1he: yeah, I believe haskell does that though 'IO Monads'
<workmad3>
JonnieCa1he: and in order to understand what they mean by a monad, you need more grounding in category theory then I have :)
atyz has quit [Quit: Leaving...]
QKO_ has quit [Ping timeout: 244 seconds]
<Nuck>
All I want to do is make a special property acessor via `foo 'bar'` instead of defining the crap manually every time
Konboi has quit [Remote host closed the connection]
<Hanmac_>
Nuck i think its a #rubyonrails question
<JonnieCa1he>
its all in that article
<Nuck>
This isn't Rails I'm working with
<workmad3>
Nuck: you want to know how to create class macros
<Nuck>
This is raw Ruby — I'm just trying to figure out how Rails does it so I can copy
<Nuck>
workmad3: I guess that's the term?
<ninegrid>
monads in general are not so much about strong speration of pure and stateful code, but enforcing a sequencing in the lazy functional environment by using partial application and continuations to build a function isomorphic to a linked list... think of the monad as the simicolon operator in languages where the simicolon denotes the termination of a statement... the monad syntax in haskell itself is just sugar over the underlying purely
<workmad3>
Nuck: similar to things like 'attr_accessor' too, I'd guess
<Nuck>
Ah yeah those!
<Nuck>
I like you workmad3, you get me :P
<JonnieCa1he>
well activesupport::concern exists to wrap that pattern in a handy module, so check out its source
krz has quit [Ping timeout: 255 seconds]
<workmad3>
Nuck: and in essence, attr_accessor just defines two new methods on the class
<weeb1e>
Ok, I'm done fighting with Guard
<weeb1e>
No idea why it refuses to work
<workmad3>
JonnieCa1he: AS::Concern exists to wrap the pattern of doing an 'extend ClassMethods' at the same time as including instance methods from a module
<weeb1e>
But I will not roll my own guard using my own inotify implementation
<workmad3>
JonnieCa1he: not to wrap around creating class macros
<weeb1e>
*now
<Nuck>
workmad3: I know, but I'm trying to figure out how — since it seems to be modifying the instance and adding methods and/or properties on it
<ninegrid>
the real paradigm shift between functional and object oriented code is such that in an object oriented approach, .each enumerates a collection of objects and sends a message to each of them serially, those objects in turn may or may not update their own internal state, they key here is that new objects are not created, existing objects are mutated
<workmad3>
JonnieCa1he: also, AS::Concern does that in a weird manner involving reimplementing its own module dependency system...
<weeb1e>
It seems there is a real need for a simple automatic testing solution that "just works"
<weeb1e>
At first glance Guard appeared to be just that, yet it is buggy and does not watch the files no matter what I do (which is its only job)
<ezkl>
weeb1e: What environment are you running it in?
<weeb1e>
ezkl: Linux
<ninegrid>
in the functional approach a map will recurse a list of values, it does not send these values messages but applies a function to them, which in turn yields a *new* value... this is analogous to the way light passes through a system of lenses, photons strike the material of the lense and do not pass through, instead the electron shells in the atoms of the lense produce *new" photons... the end result in FP is not of passing messages ar
<ezkl>
weeb1e: Hmm. I've never had issues w/ Guard in either Ubuntu LTS or Debian - OSX > 10.6 on the other hand
dkannan_ has joined #ruby
<weeb1e>
ezkl: I'm literally trying to get it to work with the simplest possible test case
<workmad3>
ninegrid: right, the functional approach basically builds up from different concepts compared to imperative or OO approaches
banjara has quit [Ping timeout: 248 seconds]
<Nuck>
workmad3: Oooh that's extremely clear. In fact, now I don't know what the fuck ActiveSupport was trying to do haha
<ninegrid>
the strong type system in a functional language combined with pure functions allow for a formal algebra, so in this way the functional program sees the peices of his program as a kind of projective geometry
<weeb1e>
I want it to watch a single file and run minitest, yet it just does not
<Nuck>
workmad3: Thanks for that!
<ninegrid>
which for the inclined can be abstracted over with something called category theory
<workmad3>
ninegrid: I've just never really internalised the alternative foundation :)
Kuifje has joined #ruby
Kuifje has joined #ruby
Kuifje has quit [Changing host]
<ninegrid>
anyone serious about programming as a way of life should really use both paradigms
<workmad3>
Nuck: well, that's one of the most basic ways to do a class macro with some metaprogramming :)
<Nuck>
... Now if only this damn vim bundle would syntax highlight define_method
<workmad3>
Nuck: it's just a method ;)
<Nuck>
workmad3: I knew that, but I still don't fully get how it mods an instance from within a class method
batlogg has joined #ruby
<workmad3>
Nuck: it doesn't 'mod an instance'
<workmad3>
Nuck: it defines a new instance method, same as using 'def' would
<Nuck>
workmad3: I know but how is it getting access to the instance?
bubblehead has joined #ruby
TheFuzzball has joined #ruby
wmoxam has quit [Ping timeout: 246 seconds]
dkannan has quit [Ping timeout: 256 seconds]
dkannan_ is now known as dkannan
<workmad3>
Nuck: well, in the same way that a body of a method defined with 'def' has the scope of a specific instance when you call the method
baphled has quit [Ping timeout: 252 seconds]
danieldocki has joined #ruby
<ezkl>
weeb1e: Ahh… I generally use autotest w/ minitest
<workmad3>
Nuck: the block you pass to 'define_method' has the scope of a specific instance when you call the method
jodok has quit [Ping timeout: 260 seconds]
batlogg is now known as jodok
<weeb1e>
ezkl: autotest seems even more complex than Guard, it'll be easier to roll my own watcher :/
nari has quit [Ping timeout: 255 seconds]
<Nuck>
workmad3: So basically the macros, instead of being run in context of the superclass, it's run in context of *this* class, and basically expands to a block which is evaluated within that?
<Nuck>
I think I'm just too used to lexical scope to comprehend this easily haha
wmoxam has joined #ruby
chussenot has quit [Quit: chussenot]
<workmad3>
Nuck: yes, when you call that 'attr_accessor' method, 'self' refers to the class you called it from
niklasb has joined #ruby
<workmad3>
Nuck: so it defines the new instance method on that class
<clocKwize>
hey
<Nuck>
workmad3: ahhh, that's interesting and incredibly handy.
hybris has joined #ruby
<workmad3>
Nuck: it's the same behaviour you get with any method call
<workmad3>
Nuck: part of the beauty of ruby is that all of this doesn't fall out of special behaviour... it's all the same behaviour you get with normal objects
<workmad3>
Nuck: because classes are themselves just objects ;)
<Nuck>
I come from JS prototypes — classes being objects is no alien concept to me!
<Nuck>
But this scoping certainly is
<workmad3>
Nuck: well, not really
<workmad3>
Nuck: if you define a method on a prototype, when you call that method, 'this' is the object you called the method on
<workmad3>
Nuck: not the prototype object
fflush has joined #ruby
<Nuck>
prototypes are a different form, but the base concept is still there
<Nuck>
Yeah, the rules are quite different
<workmad3>
Nuck: that's the exact behaviour you get here though ;) but instead of being a prototype chain of objects you have a class hierarchy ;)
idkazuma has joined #ruby
<workmad3>
Nuck: you define a method on the superclass, when you call the method on a subclass the context stays as the subclass
undersc0re97 has quit [Quit: "The destruction of balance constitutes leaping forward and such destruction is better than balance. Imbalance and headache are good things." - Mao]
jodok has quit [Quit: jodok]
bradhe has quit [Ping timeout: 244 seconds]
jonahR has joined #ruby
atyz has joined #ruby
relixx has quit [Quit: relixx]
<Nuck>
Okay, so I'm trying to create a class macro that sets something that can be getter'd but it's trying to resolve the local variable as a method... But aren't blocks lexically scoped?
<shock_one>
JonnieCa1he, # completely random, I just throwed a dice.
<cmyers>
so....it looked sorta like if i cloned a repo on github, I could just install the gem anywhere by doing `gem install githubuser-gemname`, but now it seems github isn't hosting gems anymore. is it easy to just go make a rubyforge acct? will it automatically pull versions of the gem? how do I "just solve my damn problem now"?
xemu has joined #ruby
francisfish has quit [Remote host closed the connection]
bradhe has joined #ruby
vierja_ has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
francisfish has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
clocKwize has quit [Quit: clocKwize]
arya has joined #ruby
vikhyat has joined #ruby
fuzai has joined #ruby
Zespre has quit [Read error: Connection reset by peer]
hmarr has quit [Read error: Operation timed out]
Zespre has joined #ruby
<cmyers>
isn't there anywhere I can host a gem where like, `git push` automatically causes a new version to be built?
<cmyers>
I want maximum un-safe-ness here.
mark_locklear has joined #ruby
djwonk has quit []
<fuzai>
Whats the proper way to pass an envrioment variable to EM.popen ? i've tried ("export TEST=testanswer; echo $TEST", callback) and from the normal popen example ([{ "TEST" => "testanswer"},"echo $TEST"]) with no luck]
nanothief has quit [Ping timeout: 252 seconds]
<cmyers>
fuzai: have you tried just setting the ENV hash before the call?
<fuzai>
no I haven't
<fuzai>
i'll try that now
<cmyers>
I think that might work =)
<cmyers>
no promises
arya has quit [Ping timeout: 248 seconds]
<fuzai>
np
palyer has joined #ruby
palyboy has quit [Read error: Connection reset by peer]
palyer has quit [Client Quit]
palyboy has joined #ruby
<fuzai>
that looks like the winner, thank you
<cmyers>
no problemo =)
robustus has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 256 seconds]
robustus has joined #ruby
vierja_ has joined #ruby
arya has joined #ruby
BizarreCake has joined #ruby
rakaar_ has joined #ruby
idkazuma has quit [Remote host closed the connection]
vierja_ has quit [Ping timeout: 252 seconds]
arya has quit [Ping timeout: 252 seconds]
rakaar has quit [Ping timeout: 252 seconds]
kpshek has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 252 seconds]
atyz has joined #ruby
banjara has joined #ruby
<fuzai>
if i have a webpage that spits out just JSON, what is an easy way to load it into a variable(s) ?
<cmyers>
hash = JSON.parse(response.body) # or something similar
<cmyers>
prob. need to require 'json'
<fuzai>
ty i'm googing now
baphled has joined #ruby
carraroj has joined #ruby
<cmyers>
grrr, peach is way less awesome than I anticipated
<cmyers>
dear self: write a better peach. that is all.
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
clocKwize has joined #ruby
x0F_ is now known as x0F
Elhu has joined #ruby
vierja_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
hmarr has joined #ruby
Qwak has joined #ruby
Qwak has quit [Client Quit]
robotmay_ has joined #ruby
relixx is now known as relix
havenwood has joined #ruby
robotmay has quit [Ping timeout: 272 seconds]
vierja_ has quit [Ping timeout: 276 seconds]
Guest__ has joined #ruby
johnpcamara has quit [Quit: johnpcamara]
Qwak has joined #ruby
dhruvasagar has quit [Ping timeout: 276 seconds]
atyz has quit [Quit: Leaving...]
QKO has joined #ruby
aef has quit [Remote host closed the connection]
<Hanmac_>
shevy guckguck
buibex has quit []
QKO_ has quit [Ping timeout: 272 seconds]
bradhe has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
joofsh has joined #ruby
haxrbyte has joined #ruby
alup has quit [Read error: Connection reset by peer]
<JonnieCa1he>
even gem 'foo', :git => "http://github.com/bar/foo", :ref => "abcdef12345654345rfgtryt"
octoberry has quit [Ping timeout: 256 seconds]
<cmyers>
JonnieCa1he: nice - ty, that is very helpful
<JonnieCa1he>
or gem 'foo', :path => "/home/cmyers/code/foo"
<JonnieCa1he>
that way you dont have to re-bundle each time
<cmyers>
that is perfect.
<JonnieCa1he>
beware of issues on deployment though
<cmyers>
yeah, still have to test
jodok has quit [Ping timeout: 260 seconds]
fuzai has quit [Quit: fuzai]
batlogg is now known as jodok
jerius has joined #ruby
robotmay_ has quit [Ping timeout: 260 seconds]
Banistergalaxy has joined #ruby
* Hanmac_
manages to install one of this C++ gems under ruby2.0trunk
theRoUS has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
bluenemo has joined #ruby
moos3 has joined #ruby
buibex has quit [Remote host closed the connection]
josh_keith has quit [Ping timeout: 272 seconds]
atyz has joined #ruby
<invisime>
ruby 2.0?
solidoodlesuppor has joined #ruby
<invisime>
oh man. that rc is only 5 days old.
<cmyers>
even more not-backwards-compatible-er than 1.9.X =D
<JonnieCa1he>
well 1.9 was pretty backwards compatible
moos3 has quit [Client Quit]
<Hanmac_>
invisime that why i sayd thats its a trunk
moos3 has joined #ruby
atyz has quit [Client Quit]
jpfuentes2 has joined #ruby
robotmay has joined #ruby
banisterfiend has quit [Remote host closed the connection]
EPIK has quit [Ping timeout: 248 seconds]
lurch_ has quit [Ping timeout: 260 seconds]
joshman_ has joined #ruby
hashmal has joined #ruby
imami|afk is now known as banseljaj
yacks has joined #ruby
samuelj has joined #ruby
kernel_panik has joined #ruby
<kernel_panik>
Hi to all!
vierja_ has joined #ruby
samphippen has joined #ruby
<kernel_panik>
strange question.. if I have " foo.each |name,hash| do ..... end" how is foo? could you please make an example ?
breakingthings has joined #ruby
<samuelj>
Hey everyone, I use the following snippet in quite a few different singleton classes. Is there a way I can extract it into a module and then include/extend that> http://pastie.org/6151592
geekbri has joined #ruby
<Muz>
>> foo = {:your => :mum, :loves => :cock}; foo.each |key, value| do puts "#{key} #{value}" end
<samuelj>
Might this be a case for SingleForwardable?
vierja_ has quit [Ping timeout: 256 seconds]
QKO has quit [Read error: Operation timed out]
josh_keith has joined #ruby
monkegji_ has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
QKO has joined #ruby
adambeynon has joined #ruby
eka has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
monkegjinni has joined #ruby
rmartin has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
jtharris has joined #ruby
SeanLazer has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
banjara has quit [Ping timeout: 252 seconds]
sailias has quit [Ping timeout: 240 seconds]
shock_one has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
banisterfiend has joined #ruby
Criztian has joined #ruby
peregrine81 has joined #ruby
the_mentat has joined #ruby
<kernel_panik>
thanks!
vierja_ has joined #ruby
tcstar has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
rakaar_ has quit [Ping timeout: 248 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
pavilionXP has joined #ruby
hbpoison has joined #ruby
postmodern has quit [Quit: Leaving]
Dwarf has quit [Quit: BNC shit itself]
vierja_ has quit [Ping timeout: 244 seconds]
x82_nicole has joined #ruby
johnpcamara has joined #ruby
havenwood has quit [Ping timeout: 260 seconds]
chussenot__ has joined #ruby
Marco has joined #ruby
carraroj has joined #ruby
aquaranto has joined #ruby
pavilionXP has quit [Remote host closed the connection]
chussenot has quit [Ping timeout: 272 seconds]
chussenot__ is now known as chussenot
danielpcox has joined #ruby
aquaranto has left #ruby [#ruby]
Dwarf has joined #ruby
maxmanders has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
atyz has joined #ruby
krz has quit [Ping timeout: 256 seconds]
Dwarf has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
clocKwize has quit [Quit: clocKwize]
sailias has joined #ruby
monkegjinni has joined #ruby
clocKwize has joined #ruby
daniel_- has quit [Ping timeout: 260 seconds]
Targen has quit [Ping timeout: 276 seconds]
mercwithamouth has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
himsin has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Dwarf has joined #ruby
bradhe has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
jgarvey has joined #ruby
otherj has quit []
pavilionXP has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
iambic has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
main has quit [Ping timeout: 240 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has joined #ruby
jrajav has joined #ruby
monkegjinni has joined #ruby
phantasm66 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
allaire has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
lewix has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
justsee has quit [Quit: Leaving...]
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has quit [Ping timeout: 248 seconds]
casheew has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
pdamer has joined #ruby
casheew has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
cdt has joined #ruby
samphippen has joined #ruby
banjara has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Jackneill has joined #ruby
LBRapid has joined #ruby
adambeynon has quit [Quit: Computer has gone to sleep.]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 260 seconds]
casheew has quit [Read error: Connection reset by peer]
enebo has joined #ruby
monkegjinni has joined #ruby
arya has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
arya has joined #ruby
monkegjinni has joined #ruby
casheew has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
cawaker has joined #ruby
cawaker has left #ruby [#ruby]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
beneggett has joined #ruby
v0n has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
nanothief has joined #ruby
prime has quit [Ping timeout: 264 seconds]
monkegjinni has joined #ruby
frogstarr78 has joined #ruby
stopbit has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
Hanmac_ has quit [Ping timeout: 245 seconds]
Jelco_ has quit [Ping timeout: 264 seconds]
alexhanh has quit [Ping timeout: 264 seconds]
Tarential has quit [Excess Flood]
alexhanh has joined #ruby
carloslopes has joined #ruby
Jelco_ has joined #ruby
evenix has quit [Read error: Connection reset by peer]
Tarential has joined #ruby
puppeh has joined #ruby
prime has joined #ruby
evenix has joined #ruby
samuelj has quit [Quit: Page closed]
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pavilionXP has quit [Ping timeout: 272 seconds]
beliveyourdream has quit [Remote host closed the connection]
nanothief has quit [Ping timeout: 252 seconds]
Dwarf has quit [Quit: BNC shit itself]
axl_ has joined #ruby
peteyg has joined #ruby
QKO_ has joined #ruby
chrisramon has joined #ruby
banjara has quit [Max SendQ exceeded]
ffranz has joined #ruby
quatar2 has joined #ruby
Dwarf has joined #ruby
djwonk has joined #ruby
banjara has joined #ruby
QKO has quit [Ping timeout: 244 seconds]
jjbohn has joined #ruby
<quatar2>
Hi all! Beginner question, how do i run a file from irb? i just get "indefined local variable or method" but i have assigned a variable, but it dosent work anyway?
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<quatar2>
Somebody? its seems like an easy question
Mchl has joined #ruby
etcetera has quit []
<hoelzro>
quatar2: let me guess
<hoelzro>
you have a variable in IRB
<hoelzro>
and you refer to it from a script
<puppeh>
I want to confirm that MRI 1.9.3 is not CoW-friendly
joshman_ has quit [Quit: Computer has gone to sleep.]
<hoelzro>
which you load from irb?
<hoelzro>
puppeh: correct
<puppeh>
I'm trying in IRB to fork a new process, and then inspect in memory in OS X via the activity monitor
<puppeh>
I watch it's shared memory going to 0
<puppeh>
is that it?
<quatar2>
hoelzro: exactly
banjara has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
<puppeh>
but then I disable the GC
<puppeh>
and fork again
<hoelzro>
quatar2: ok, local variables are local to the unit of compilation
<puppeh>
and again it goes to 0
moofy has joined #ruby
<hoelzro>
so your script won't see them
andikr has quit [Read error: Connection reset by peer]
tk_ has quit [Quit: ばいばい]
philcrissman has quit [Ping timeout: 255 seconds]
<quatar2>
ok, so how do i do it?
<puppeh>
why is that?
djwonk has quit [Read error: Connection reset by peer]
nomenkun has quit [Remote host closed the connection]
<hoelzro>
quatar2: well, what are you trying to do on a high level?
<hoelzro>
puppeh: that I don't know
clooth has quit [Quit: clooth]
dmerrick has joined #ruby
blaxter has joined #ruby
bean has joined #ruby
bean has quit [Max SendQ exceeded]
bean has joined #ruby
<quatar2>
hoelzro: Dude, im a total beginner, never done any programming before really. this is the first thing in the book im using, theres a script in the book, i saved it, and then i want to test it from irb, then i get that message.
<hoelzro>
ok
spaceships has joined #ruby
<hoelzro>
quatar2: could you paste the script?
jlast has joined #ruby
casheew has quit [Read error: Connection reset by peer]
<quatar2>
obj = Object.new
<quatar2>
def obj.title
<quatar2>
"Programmering i Ruby"
<quatar2>
end
casheew has joined #ruby
<quatar2>
def obj.author
<quatar2>
"Martin Leterius"
<quatar2>
end
<quatar2>
def obj.pages
<quatar2>
415
<quatar2>
end
<quatar2>
def obj.text
<quatar2>
"Denna text är mycket längre i en riktig bok."
<quatar2>
end
<quatar2>
def obj.current_page
<quatar2>
1
<quatar2>
end
<hoelzro>
um.
<quatar2>
hoelzro: So if you could explaine as you would to a child! :-) Heres the script :
<hoelzro>
ok, I know you didn't know any better
<hoelzro>
but, as is noted in the channel's message, please use a pastebin for pastes > 3 lines
<hoelzro>
so this book tells you to save that in a script, and tells you you can refer to obj from irb?
<quatar2>
yes
<hoelzro>
what book is this?
havenwood has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<quatar2>
Swedish book! "programming in Ruby"
<Nom->
Hey guys... i'm trying out writing a native C extension to wrap around a library i'm using, and I seem to have a memory leak... is there something I'm supposed to do to allow Data_Wrap_Struct()'s to be freed up properly? I am defining a free method, and it *is* correctly free()ing the struct.
<hoelzro>
quatar2: afaik, that is wrong
<hoelzro>
quatar2: what version of Ruby does it cover?
<hoelzro>
I don't think that ever worked, but I could be wrong
relix has quit [Read error: Connection reset by peer]
<hoelzro>
Nom-: care to paste your codde?
carlyle has joined #ruby
miskander has joined #ruby
relixx has joined #ruby
<quatar2>
dosent say wich version, cant find it anyway. but i use 1.9.2
<hoelzro>
ok, so what you could do is put obj in a global
<hoelzro>
ex. $obj
jrajav has quit [Quit: I tend to be neutral about apples]
<hoelzro>
then you can use it in irb
<quatar2>
its published 2007
djwonk has joined #ruby
monkegjinni has quit [Remote host closed the connection]
<quatar2>
so i put $ before obj?
<quatar2>
in the script?
monkegjinni has joined #ruby
allaire has quit []
monkegjinni has quit [Read error: Connection reset by peer]
<hoelzro>
quatar2: well, for now, just do $obj = obj at the end of the script
monkegjinni has joined #ruby
<quatar2>
ahh, cool
pu22l3r has joined #ruby
<hoelzro>
Nom-: hmm...I don't see anything terribly wrong there
monkegjinni has quit [Read error: Connection reset by peer]
carlyle has quit [Client Quit]
dallasm has joined #ruby
jodok has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
evenix has quit [Read error: Connection reset by peer]
<quatar2>
i will try it out, thanks alot, problebly will get backt to you! Thanks for now!!
ffranz1 has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
jodok has joined #ruby
jodok has quit [Changing host]
jodok has joined #ruby
<hoelzro>
best of luck =)
evenix has joined #ruby
monkegjinni has joined #ruby
<Nom->
hoelzro: That's disconcerting :) I suppose it's entirely possible the library i'm using is the one with the leak... i've tried doing an explicit free() on the struct, but it does a double free segfault if I do :(
monkegjinni has quit [Read error: Connection reset by peer]
relixx is now known as relix
<hoelzro>
Nom-: yeah, I'm not surprised about that =/
<hoelzro>
try seeing if the library has a leak, I guess
djwonk has quit [Client Quit]
braoru has quit [Quit: Leaving]
monkegjinni has joined #ruby
<Nom->
Which is about where my usefulness ends, because I'm not much of a C programmer :(
uris has joined #ruby
casheew has quit [Read error: Connection reset by peer]
casheew has joined #ruby
pavilionXP has joined #ruby
<hoelzro>
well, just try creating 100 of those objects, and freeing them
innohero has joined #ruby
<hoelzro>
and run valgrind on the program
<moofy>
uhm. hi. I'm new to ruby and i'm getting confused as to why my tiny script isn't working.
<hoelzro>
moofy: welcome
jodok has quit [Client Quit]
<moofy>
i made a file with a code_words variable and linked it with require_relative
monkegjinni has quit [Read error: Connection reset by peer]
<hoelzro>
moofy: local variables aren't visible between files
ffranz has quit [Ping timeout: 248 seconds]
<moofy>
ah.
pavilionXP has quit [Max SendQ exceeded]
<moofy>
yeah it errors on me
carlyle has joined #ruby
<moofy>
how do i make it see it?
evenix has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
pavilionXP has joined #ruby
evenix has joined #ruby
innohero has quit [Client Quit]
<quatar2>
hoelzro : still the same bloody error message
<hoelzro>
moofy: well, what does each script do?
<hoelzro>
quatar2: you're referring to $obj in irb?
JumpMast3r has quit [Quit: JumpMast3r]
<moofy>
the first one just puts things into code words. I'm trying to do part of _why's guide.
<hoelzro>
moofy: could you paste the two scripts somewhere?
<moofy>
so one file is just: code_words = { stuff here }
<quatar2>
yes my friend, dosent work, maby im lazy now, should do my research better. But its in the book, so should work.
<moofy>
then: code_words.each do |real, code|
<moofy>
idea.gsub!( real, code )
<moofy>
end
<quatar2>
stupid book
<moofy>
but i can't load it from the other file
<heftig>
require_relative 'other_file'
joshman_ has joined #ruby
<moofy>
yeah i have that. but i get the 'undefined local variable'
<heftig>
ah, right
<heftig>
use CODE_WORDS, not code_words
tcstar has joined #ruby
mengu_ has joined #ruby
mengu has quit [Read error: Connection reset by peer]
zz_chrismcg is now known as chrismcg
tagrudev has quit [Remote host closed the connection]
mcatch has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
philcrissman has joined #ruby
carlyle has quit []
slainer68 has joined #ruby
Norrin has joined #ruby
puppeh has quit [Remote host closed the connection]
<moofy>
why does putting it in capitals let me share it between files?
<heftig>
local variables don't carry over requires
vierja_ has joined #ruby
<heftig>
CONSTANTS do
<heftig>
(as will $global variables)
megha has joined #ruby
skum has joined #ruby
hbpoison has joined #ruby
matthewrobbins has joined #ruby
<moofy>
so if i had it in the same file i could use code_words?
Konboi has joined #ruby
<heftig>
yes
kaichanvong has joined #ruby
patricksroberts_ has joined #ruby
xerxas has joined #ruby
evenix_ has joined #ruby
strax has joined #ruby
Norrin has left #ruby [#ruby]
m3pow has quit [Read error: Connection reset by peer]
cool has joined #ruby
Vainoharhainen has quit [Ping timeout: 256 seconds]
vierja_ has quit [Ping timeout: 252 seconds]
banjara has joined #ruby
SCommette has joined #ruby
otherj has joined #ruby
dr_bob has quit [Ping timeout: 252 seconds]
freakazoid0223 has joined #ruby
evenix has quit [Ping timeout: 260 seconds]
otherj has quit [Client Quit]
dr_bob has joined #ruby
<Nom->
still reachable: 197,328 bytes in 144 blocks
<Nom->
Awesome. Looks like it's keeping some kind of global state. That'll be fun to get the vendor to fix.
<hoelzro>
oh joy
casheew has quit [Read error: Connection reset by peer]
ffranz1 has quit [Quit: Leaving]
<hoelzro>
glad you found it, though!
<Nom->
Thanks for the valgrind trick... that'll go into my mental notebook :)
<hoelzro>
;)
ffranz has joined #ruby
ffranz has quit [Client Quit]
casheew has joined #ruby
<Nom->
Oh here we go... utility functions... tibems_Close() frees up internal data structures
pu22l3r has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
haxrbyte_ has quit [Read error: Connection reset by peer]
monkegjinni has joined #ruby
haxrbyte has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
Guest___ is now known as Guest123
aganov has quit [Read error: Connection reset by peer]
swex_ has joined #ruby
monkegjinni has joined #ruby
<Hanmac_>
is it rubys fault when the developer unserialize untrusted user input?
monkegjinni has quit [Read error: Connection reset by peer]
vierja_ has quit [Ping timeout: 255 seconds]
Xeago has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
swex has quit [Read error: Operation timed out]
monkegjinni has quit [Read error: Connection reset by peer]
<TTilus>
programmer's
monkegjinni has joined #ruby
<workmad3>
innohero: the rails issue and the rubygems issue were both down to unserialising untrusted user input through a yaml load method that allowed execution of arbitrary code
peteyg has quit [Ping timeout: 252 seconds]
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3>
innohero: it wasn't an issue with the yaml parser, it was an issue with how both places were using it
Konboi has quit [Remote host closed the connection]
<TTilus>
the lib is to be blamed if it states to be "safe" (by whatever definition) but isnt
<JonnieCa1he>
it didnt state itself as safe
danneu has joined #ruby
miskander has quit [Read error: Connection reset by peer]
<JonnieCa1he>
its obviously not safe, its *designed* to create arbitrary objects
angusiguess has joined #ruby
<Hanmac_>
i readed rubys bug tracker ... and the rails user nearly spammed the tracker with another stupid ideas how to solv that ... some had the idea to GC symbols or other stupid shit
monkegjinni has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he>
lol who was that?
<TTilus>
yep, and programmers building upon it should take that into account
<JonnieCa1he>
do you mean rails developer or rails user?
pu22l3r has joined #ruby
monkegjinni has joined #ruby
<TTilus>
primarily rails devs
banisterfiend has quit [Read error: Connection reset by peer]
monkegjinni has quit [Read error: Connection reset by peer]
* workmad3
hides from the rails hate
<JonnieCa1he>
well the way rails used it was pretty obscure. the gemspec thing, i cant believe nobody noticed that
banisterfiend has joined #ruby
monkegjinni has joined #ruby
<JonnieCa1he>
it was staring every gem developer in the face for *years*, every single day
monkegjinni has quit [Read error: Connection reset by peer]
<TTilus>
dunno how widely the potential problems were known, prolly nobody really noticed
haxrbyte has quit [Read error: Connection reset by peer]
<TTilus>
JonnieCa1he: i dont think it was such a surprise
brimil01 has joined #ruby
monkegjinni has joined #ruby
<workmad3>
JonnieCa1he: yeah, although gotta wonder who's bright idea it was to allow XML parameters to be typehinted to YAML and deserialized a second time through that, before *anything* in the app was touched
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he>
workmad3: the way that came about was quite complex, to do with interactions between different libs
monkegjinni has joined #ruby
<JonnieCa1he>
the yaml gemspec thing was just blatant
<workmad3>
JonnieCa1he: because it wasn't just a side-effect of the XML parser... it was actually put in explicitly in a rails commit
interactionjaxsn has joined #ruby
bradhe has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Read error: Connection reset by peer]
Guest24761 has quit [Quit: leaving]
<TTilus>
commit security qa level isnt necessarily that guaranteed
<JonnieCa1he>
hmm wasnt it more that they forgot ot blacklist the yaml type?
monkegjinni has joined #ruby
ErsatzRyan has joined #ruby
<JonnieCa1he>
or did someone specifically enable it
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3>
JonnieCa1he: no, in a rails 2 commit, someone *added* the yaml type and passed it onto YAML.load
shock_one has joined #ruby
monkegjinni has joined #ruby
<JonnieCa1he>
that is an epic fail. but i still maintain not as epic as yaml in gemspecs, with hindsight of course :)
monkegjinni has quit [Read error: Connection reset by peer]
Uranio has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
<workmad3>
yeah, both are pretty epic fails tbh :)
monkegjinni has joined #ruby
ananthakumaran has quit [Ping timeout: 252 seconds]
geggam has quit [Ping timeout: 260 seconds]
anonymuse has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
<workmad3>
just pointing out that the XML params one wasn't quite so much a 'complex interaction of other libraries' as its been made out :)
monkegjinni has joined #ruby
<JonnieCa1he>
maybe im thinking of the second vuln, which was more complex wasnt it?
monkegjinni has quit [Read error: Connection reset by peer]
<JonnieCa1he>
we're up to 3 now :)
<nat_home>
shevy, danneu: thanks for the exponation… I was gone at the time of the answer but I read them this morning … thanks again
<workmad3>
I believe the latest was an attr_protected one, haven't looked into that one tbh
<JonnieCa1he>
thats number 3
monkegjinni has joined #ruby
<JonnieCa1he>
there were 2 different yaml ones iirc
yfeldblum has quit [Ping timeout: 272 seconds]
<workmad3>
the second one was the xml params that allowed remote code execution
<JonnieCa1he>
oh well ive patched them all so i dont care :D
monkegjinni has quit [Read error: Connection reset by peer]
joshman__ has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
aaronmacy has joined #ruby
allaire has quit []
beneggett has quit [Quit: Computer has gone to sleep.]
carloslopes has joined #ruby
beneggett has joined #ruby
<mr-rich>
Is it possible to write a hash to a file and then read it back in as a hash in another script?
etcetera has joined #ruby
joshman_ has joined #ruby
mockra has joined #ruby
guiocavalcanti has quit [Ping timeout: 272 seconds]
vainofanskap has quit [Quit: Leaving...]
sn0wb1rd has quit [Quit: sn0wb1rd]
<GeekOnCoffee>
mr-rich: convert it to json
io_syl has joined #ruby
bradleyprice has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
sn0wb1rd has joined #ruby
ananthakumaran has joined #ruby
philcrissman has quit [Remote host closed the connection]
etcetera has quit [Client Quit]
banjara has joined #ruby
ezkl has quit [Quit: out!]
brimil01 has quit [Read error: Operation timed out]
dmiller2 has joined #ruby
etcetera has joined #ruby
rakaar has joined #ruby
<mr-rich>
GeekOnCoffee: Is json built in to ruby 1.9.3 or does it require a gem to be installed? I ask because I don't have access to install gems on the system ...
RobW_ has joined #ruby
<shock_one>
mr-rich, it's called serialization.
Nanuq has quit [Read error: Operation timed out]
percival__ has quit [Read error: Operation timed out]
SegFaultAX has quit [Read error: Operation timed out]
dnyy has quit [Read error: Operation timed out]
tylersmith has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
robotmay_ has joined #ruby
<havenwood>
mr-rich: it is included, just: require 'json'
DarkFoxDK has quit [Read error: Operation timed out]
dotemacs has quit [Read error: Operation timed out]
<Spooner>
mr-rich, json is a standard lib in 1.9, gem in 1.8. You might be better mashalling it though.
seich has quit [Read error: Operation timed out]
sn0wb1rd has quit [Remote host closed the connection]
RJ3 has quit [Read error: Operation timed out]
bluehavana has quit [Read error: Operation timed out]
thejefflarson_ has quit [Read error: Operation timed out]
d2dchat has quit [Remote host closed the connection]
byped has joined #ruby
Kingy has joined #ruby
<havenwood>
mr-rich: Does it matter to you if the file is human-readable?
<havenwood>
mr-rich: Or readable by multiple languages?
Nanuq has joined #ruby
dnyy has joined #ruby
willob has quit [Quit: Leaving.]
banjara has quit [Read error: Connection reset by peer]
ixx has quit [Ping timeout: 264 seconds]
tylersmith has quit [Client Quit]
DarkFoxDK has joined #ruby
robotmay has quit [Ping timeout: 260 seconds]
wr has joined #ruby
<mr-rich>
havenwood: just need to read it in a different ruby script as a hash ... Human readable would be nice, though ...
<RobW_>
Heyo. I'm doing some work on a Sass extension, dipping into the Ruby environment with very little knowledge of Ruby. Looks like at the end of a function you assert a new value to be 'returned' with Sass::script::[type].new(value). Number, Bool, String work well for type — what would I use if I want to return an array?
dmiller2 has quit [Ping timeout: 255 seconds]
chrismcg is now known as zz_chrismcg
<Spooner>
mr-rich, YAML is another option (even more readable than JSON and more Ruby-friendly, such as supporting Symbols, but slower).
<Spooner>
RobW_, Probably Array ;)
seich- has joined #ruby
SegFaultAX has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
Spooner has quit [Remote host closed the connection]
Banistergalaxy has joined #ruby
<RobW_>
Spooner: Ha, that's what I tried first, but got the error "NameError: uninitialized constant Sass::Script::Array". Any thoughts?
<RobW_>
I don't know if it's a particularity of Sass itself, or if I'm missing important Ruby syntax.
atyz has joined #ruby
nga4 has joined #ruby
mahmoudimus has joined #ruby
tworkin has joined #ruby
nat_home has quit [Quit: Leaving.]
<shevy>
hmm did you pull it in
tylersmith has joined #ruby
<shevy>
does Sass in irb give you anything
<shevy>
if Sass works, next question is - does Sass::Script give you anything in irb
<shevy>
if Sass is inconsistent, btw, report a bug ;)
buscon has quit [Quit: Leaving]
pdamer has joined #ruby
<tworkin>
hey I'm having problems with a rakefile. rake is reporting "undefined (?….) sequence' in this regex m = r.match(/(?<name>.+)\t(?<url>.+) \((?<type>.+)\)$/)
dmiller2 has joined #ruby
<tworkin>
looks like im running 1.8
<RobW_>
shevy: First I've heard of the interactive shell. Thanks. Looks like I'm going to have to learn a little more than I bargained for.
<lectrick>
havenwood: shevy: ok good, so i'm not insane (yet)
<shevy>
lectrick I think I saw only two examples of where class vars might have made sense
<shevy>
one was to keep track of a counter (but which project needs that really?)
<lectrick>
shevy: ok so for THOSE examples, use them, otherwise no :)
<RobW_>
Thanks shevy. I'll poke around, wanted to ask here first in case I was missing something simple.
<shevy>
the other was some kind of toggleable open/closed state
<lectrick>
shevy: i bet they both could have been reimplemented as class-level attributes
<shevy>
lectrick perhaps, I am not sure yet. the last time I used them, I had a bug in one of them, and it took me an hour to find it (I was noobish back then), and when I finally found it, I had to ask myself why I was using a @@var
<RobW_>
Danke Schön.
<lectrick>
by which I mean something like class This; def this.something; @something; end; end
Qwak has quit []
innohero_ has quit [Client Quit]
<shevy>
lectrick yeah, I think that the @@class_vars are not really 100% needed
<lectrick>
shevy yeah i think they are too ambiguous to make sense.
<shevy>
I want to use only what is useful
<shevy>
and in the case of class variables, I just don't see them being sufficiently useful
cobragoat has joined #ruby
<lectrick>
should a class hold state, that's another debate haha
<shevy>
of course you could try to use them wherever you can :D
<shevy>
I even confused @foo with @@foo when I was not looking carefully at my code
<lectrick>
yeah for all those reasons and more I just avoid them
<shevy>
lectrick hmm perhaps it should hold state if it may be useful
<aboudreault>
there is no difference between File.exist and File.exists, right?
willob has joined #ruby
brandon|work has quit [Read error: Connection reset by peer]
<shevy>
aboudreault yeah, no difference. one is an alias to the main
willob has quit [Max SendQ exceeded]
<shevy>
but I think it is: File.exist?
<shevy>
not File.exist
anderse has quit [Quit: anderse]
<aboudreault>
yes that is
brianpWins has joined #ruby
brandon|work has joined #ruby
krz has quit [Quit: krz]
<shevy>
matz wanted to add only one
<shevy>
but people complained while he was talking hehehe
ahokaomaeha has quit [Ping timeout: 240 seconds]
<shevy>
it had to do with proper english style
<shevy>
"if file exists, do this"
<shevy>
versus
<lectrick>
well, english would ask "File exists?"
<shevy>
"if file exist, do this"
<lectrick>
right
<shevy>
yeah lectrick
rdark has quit [Quit: leaving]
<lectrick>
i don't see a problem with aliasing things like that
dmonjo has quit [Quit: Leaving]
willob has joined #ruby
<shevy>
might be that matz favoured "if file exist" hehehehe
willob has quit [Max SendQ exceeded]
<shevy>
lectrick yeah
<lectrick>
follows the ruby philosophy
<shevy>
I like aliases a lot
_nitti has quit [Remote host closed the connection]
<lectrick>
although if someone wanted to override it for some reason
<mattinahat>
I'm working on a script, and everything works fine most of the time. However, sometimes I get this error: https://gist.github.com/daswolle/e336bae0cc3e66c35924 and I have no idea why. Does anyone have an idea why it would say undefined method sometimes?
nfk has joined #ruby
willob has joined #ruby
willob has quit [Max SendQ exceeded]
<shock_one>
mattinahat, you better gist the script
DuoSRX has quit [Remote host closed the connection]
<mattinahat>
ok
adeponte has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
radq has joined #ruby
willob has joined #ruby
willob has quit [Max SendQ exceeded]
filipe has quit [Remote host closed the connection]
<mattinahat>
I'm parsing some information from emails both in the body and as attachments.
willob has joined #ruby
monkegji_ has joined #ruby
<mattinahat>
It pulls the information from outlook web access and clicks buttonos with watir.
mlr has left #ruby [#ruby]
<mattinahat>
buttons*
QKO has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
<havenwood>
mattinahat: Is it maybe matching /Sex:.*/ to "Sex: "? Same problem with /Sex: .*/?
gg4 has quit []
mlr has joined #ruby
<Agis__>
h
Agis__ is now known as popper
anonymuse has quit [Quit: Leaving...]
interactionjaxsn has joined #ruby
SCommette has quit [Quit: SCommette]
<mattinahat>
havenwood: It should match "Sex: " because that field showed up in either 2 locations, I just checked if the header was present before actually storing the data of M, F, or P.
<shock_one>
mattinahat, a[25].match(/^.*?:\s([MFP])/)[1] When it doesn' match, the match method returns nil. And you call [] on it
yekta has quit [Quit: yekta]
<mattinahat>
Ah
dhruvasagar has joined #ruby
<mattinahat>
I made a poor assumption then. I assumed if it found the header, then I would be able to match.
<graft>
mattinahat: use a block
<shock_one>
mattinahat, never trust user data
<graft>
a[25].match() { |m| ... }
sayan has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
vierja has joined #ruby
ahokaomaeha has joined #ruby
colonolGron has joined #ruby
<mattinahat>
shock_one: ya, that's what I've been starting to see.
d2dchat has joined #ruby
<mattinahat>
graft: could you point me to more info on that? I'm a bit new to ruby
generalissimo has quit [Remote host closed the connection]
cipherX123 has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
slainer68 has quit [Remote host closed the connection]
<cipherX123>
Programming Ruby 1.9 book Vs The Ruby Programming Language book? which is better for beginners?
<popper>
is any1 here familiar with how the GC in mri does mark-n-sweep? i'm particularly having trouble understanding the free list and the "next" pointer
<cipherX123>
better to develop code in a text editior or an ide for begineers?
<mattinahat>
graft: Great, thanks!
<fflush>
salut bonjour
d2dchat has joined #ruby
ananthakumaran has joined #ruby
<mattinahat>
cipherX123: read both?
<fflush>
cipherX123: essayer vim svp
<mr-rich>
Ok, I'm writing a hash to a file using YAML and trying to read it back in to a hash. It writes fine, but when I read, all I get is the last line of the file. Any ideas?
Rizzle has joined #ruby
<cipherX123>
mattinahat: i will read both but i need to start with one
<cipherX123>
Programming Ruby 1.9 book Vs The Ruby Programming Language book
SCommette has joined #ruby
<shock_one>
mr-rich, we need the code
<mr-rich>
shock_one: reading/writing or both?
<mattinahat>
cipherX123: I'm biased to O'Reilly, so I would read The Ruby Programming Language first
<shock_one>
mr-rich, reading, if writing works correct.
davetherat has quit [Remote host closed the connection]
Elhu has joined #ruby
davetherat has joined #ruby
khismetix has joined #ruby
<mr-rich>
shock_one: gimme a min ...
huoxito has joined #ruby
banisterfiend has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 256 seconds]
aantix has joined #ruby
robotmay_ has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
<ShellFu>
so I have 2 hashes. >h1 = { "hello" => "world", "foo" => nil }< and >h2 = { "hello" => "world", "foo" => "bar" }< Im trying to use merge! but am getting error >`merge': can't convert nil into Hash (TypeError)< I tried testing the value in the merge block, but I dont think it gets to that point. Any advice would be appreciated.
<mr-rich>
shock_one: wtf? Worked for me ... I can't get to pastbin.com on my company laptop, so I use paste.org ...
maxmanders has quit [Ping timeout: 252 seconds]
ananthakumaran has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
RobW_ has left #ruby [#ruby]
beneggett has quit [Quit: Computer has gone to sleep.]
jrajav has joined #ruby
freakazoid0223 has joined #ruby
<shock_one>
ShellFu, debug r and c right before this line. One of them is nel
<shock_one>
nel -> nil
vierja has joined #ruby
<shock_one>
mr-rich, gist
bigkevmcd has quit [Read error: No route to host]
<cipherX123>
which books did you guys read
davetherat has quit [Remote host closed the connection]
<shock_one>
cipherX123, all english books on the market
bigkevmcd has joined #ruby
<ShellFu>
r is hash contains the nil value. Id like to take that value and give it "" or something so merge can append the value of c
miked has joined #ruby
c0rn has joined #ruby
<ShellFu>
not sure where to address that. Was trying to do it in the merge block.
<ShellFu>
basically id like to avoid another hash iteration
joshman_ has joined #ruby
banisterfiend has joined #ruby
davetherat has joined #ruby
BRMatt has quit [Quit: Leaving]
<shock_one>
ShellFu, is r.class a 'Hash'?
Kingy has joined #ruby
d2dchat has quit [Remote host closed the connection]
<ShellFu>
shock_one, Yes this is r >{"class2"=> {"key1"=>"value1"}>, "class3"=>nil}><
cipherX123 has quit [Quit: Leaving]
<shock_one>
ShellFu, what about c?
ahokaomaeha has quit [Ping timeout: 252 seconds]
<mr-rich>
shock_one: gist doesn't play well with IE ... :(
khismetix has quit [Quit: Computer has gone to sleep.]
buibex has joined #ruby
<ShellFu>
shock_one, This is c >{"class3"=>{"key"=>"value"}}<
<shock_one>
ShellFu, in this case merge should work
<ShellFu>
it doesnt like the nil value in r
graft has quit [Ping timeout: 255 seconds]
wr has joined #ruby
<banisterfiend>
shock_one: what does your nickname mean
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
BizarreCake has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
stormetrooper has quit [Quit: brunch]
browndawg has quit [Quit: Leaving.]
<shock_one>
banisterfiend, nothing. When I was in 7th grade, I have found in some magazine a guy, who paint things on the walls (it was a popular theme these days), with a similar nickname. It looked very cool back then.
beiter has quit [Quit: beiter]
beardyjay has quit [Ping timeout: 255 seconds]
<mr-rich>
shock_one: Long story short: Company laptop running XP/IE 7. gist doesn't play well with IE. Try this one: http://codepaste.net/fartbs
grieve has joined #ruby
fflush has quit []
cpx_ has quit [Remote host closed the connection]
tworkin has left #ruby [#ruby]
mengu_ has quit [Changing host]
mengu_ has joined #ruby
Es0teric has joined #ruby
alex__c2022 has quit [Read error: Connection reset by peer]
<quatar2>
Hello! Need some beginner help. i get this : undefined local variable or method ’my’ for main:Object (NameError) here is the code https://gist.github.com/anonymous/4947309
alex__c2022 has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
<quatar2>
pretty please, wanna get to the next stage in my learnig process, getting tired of beeing a newbie! :-)
albakry has joined #ruby
albakry has quit [Changing host]
albakry has joined #ruby
timonv has quit [Remote host closed the connection]
<mr-rich>
quatar2: you have my.book instead of my_book on line 15 ...
Xeago has joined #ruby
<quatar2>
ahh thanks! my fault! Should have looked more closley, im lazy i suppose! :-) but now im gonna watch closer next time! Thanx alot!
octoberry has quit [Ping timeout: 272 seconds]
mattinahat has quit [Quit: Page closed]
<mr-rich>
shock_one: did that paste link work?
miked has quit [Quit: miked]
d2dchat has joined #ruby
<shock_one>
yes, but everything looks fine
adman65 has quit [Read error: Connection reset by peer]
<shock_one>
mr-rich, what is the ooga after assignment?
QKO_ has quit [Read error: Operation timed out]
elico has joined #ruby
Xeago has quit [Remote host closed the connection]
QKO has joined #ruby
a_a_g has quit [Quit: Leaving.]
<mr-rich>
shock_one: which line in the paste?
ssvo has joined #ruby
<shock_one>
mr-rich, there are no lines, but last before Smaple ...
<shock_one>
*no lines numbers
ananthakumaran has quit [Quit: Leaving.]
ryanh has quit [Quit: Computer has gone to sleep.]
dmiller2 has joined #ruby
<shock_one>
by the way, save it with .yaml extension
<mr-rich>
shock_one: the first ooga is initializing a hash. The seconed is reading the YAML file into the ooga hash ...
alup has joined #ruby
ryanf has joined #ruby
<shock_one>
I know. What is it content? do «p ooga»
popper has quit [Quit: popper]
apok has joined #ruby
<mehwork>
if everything in ruby is an object, why can't i do h.foo instead of h[:foo]?
chichou has quit [Remote host closed the connection]
<Mon_Ouie>
Because the Hash class doesn't have a #foo method
<shock_one>
mehwork, you can if you want
Elhu has quit [Quit: Computer has gone to sleep.]
<mr-rich>
shock_one: after that, I tried pp ooga and all I get is the last line of the YAML file ... even tried doing a pp on the YAML.load and got the same thing ...
<Mon_Ouie>
It has a #[] method which allows to retrieve the item for a key
<mehwork>
shock_one: how? h.foo = h[:foo] ?
razibog has quit [Ping timeout: 245 seconds]
<mehwork>
Mon_Ouie: i see
jerius has quit [Ping timeout: 260 seconds]
<shock_one>
mehwork, method_missing
_nitti has joined #ruby
<mehwork>
so i could just monkey patch Hash?
<mehwork>
oh
<mehwork>
like an magic setter?
<shock_one>
mehwork, but you shouldn't
<mehwork>
rails seems to do this somehow so i wanted to see if i could do it in ruby in general
jerius has joined #ruby
chussenot has quit [Quit: chussenot]
dmiller2 has quit [Ping timeout: 245 seconds]
shevy has quit [Ping timeout: 256 seconds]
<quatar2>
im getting this instead <main> : private method ’turn_page’ called for #<Book:0x007f95b984d . And this time ive looked cloesly, but im problebly blind, can you help me? https://gist.github.com/anonymous/4947420
artOfWar_ has joined #ruby
artOfWar has quit [Read error: Connection reset by peer]
tobor_one has joined #ruby
drumsrgr8forn8 has joined #ruby
cpruitt has joined #ruby
<Mon_Ouie>
OpenStruct is a class that's like a hash but dynamically defines new methods for setting/getting keys
<cpruitt>
If there's a better channel for this please forgive me. I seem to suddenly be unable to run 'bundle update'. I get a "Fetching gem metadata from https://rubygems.org/.………" then another "Fetching gem metadata from https://rubygems.org/.." at which point network activity stops and ruby spikes my processor. Anyone have any thoughts? Anything with the recent ruby gems hubbub causing me a problem?
m3pow has quit [Remote host closed the connection]
chichou has joined #ruby
<mr-rich>
shock_one: I see. Anything odd about the sample of the YAML file?
maxmande_ has quit [Quit: Computer has gone to sleep.]
cipasd has joined #ruby
<cipasd>
hi guys
grieve has quit []
<mr-rich>
shock_one: i don't see any curly brackets in that file ...
<cipasd>
any ide that provides autocompletion of the methods?
<shock_one>
mr-rich, yes, it doesn't look like just YAML keys-values
carraroj has quit [Quit: Konversation terminated!]
<shock_one>
cipasd, the best one is RubyMine, hands down
<mr-rich>
shock_one: anyway to correct that?
mark_locklear has quit [Ping timeout: 272 seconds]
anderse has joined #ruby
banjara has quit [Quit: Leaving.]
<mr-rich>
shock_one: seems to be writing all kinds of extrainious information that I don't need ...
banjara has joined #ruby
<shock_one>
mr-rich, I don't know. Try to correct the file manually, and then read it to see if it will help
cipasd has quit [Client Quit]
<mr-rich>
shock_one: can you dump the yaml file that was created in your code?
joofsh has quit [Remote host closed the connection]
joofsh has joined #ruby
etcetera has quit []
maxmanders has joined #ruby
elux has joined #ruby
<mr-rich>
shock_one: thanks so far. I think I know what the problem is. I'm getting data via SOAP and I think that is setting all kinds of esoteric data types that YAML can't seem to import back in ... I'll try cleaning up the data a bit ...
<shock_one>
mr-rich, no problem
shevy has joined #ruby
aces1up has joined #ruby
<aces1up>
can someone help me with this bit of code? Trying to sort one array by another array..
__BigO__ has quit [Remote host closed the connection]
<aces1up>
banisterfiend if i need to reference the assigned_to attribute to match inside the functions array would it be functions.sort_by{|v| v.assigned_to == run_order.index(v) }
pyrac has quit [Quit: pyrac]
<banisterfiend>
aces1up: i dont think that's what u want to do
<banisterfiend>
that would sort_by boolean true/false values according to that condition
<banisterfiend>
bbl
icole has joined #ruby
cableray has joined #ruby
chichou has quit [Remote host closed the connection]
<Mon_Ouie>
.index(v.assigned_to)
__BigO__ has joined #ruby
<aces1up>
functions is an array of objects where as run_order is an array of symbols didn't think you could compare that way.
nicoulaj has joined #ruby
<shock_one>
aces1up, describe what do you want to achieve in the end.
Elhu has joined #ruby
<aces1up>
run_order = [:funct1, funct2], so functions should == [funct_obj.assigned_to == :funct1, funct_obj.assigned_to == :funct2 ]
m3pow has joined #ruby
<shock_one>
it would be reduced to [true, true], for example
<aces1up>
shock_one that make snese?
<Mon_Ouie>
shock_one: I believe he means [the funct object for which assigned_to is :funct1, etc.]
<shock_one>
aces1up, I wanted you to describe your task at more abstract level.
<aces1up>
Mon_Ouie exactly yes.
<shock_one>
after sorting you can map an array
sailias has quit [Ping timeout: 272 seconds]
pyrac has joined #ruby
jphpsf has quit [Ping timeout: 276 seconds]
<shock_one>
I would write the code, but your Functions class' constructor doens't take any arguments
workmad3 has quit [Ping timeout: 252 seconds]
monkegji_ has quit [Read error: Connection reset by peer]
bluehavana has joined #ruby
ngoldman has quit [Remote host closed the connection]
<_bart>
Regexp problem, how do I select everything until \n\n (two newlines in a row)
goganchic has joined #ruby
<shock_one>
[^(\n){2}]
thejefflarson_ has joined #ruby
RJ3 has joined #ruby
<_bart>
shock_one: ah elegant, thanks!
<_bart>
shock_one: I mean an appearance of \n\n, not just two rows
<shock_one>
_bart, doesn't it work?
_nitti has joined #ruby
<_bart>
shock_one: it stops after passing just two single \n's
hbpoison has quit [Ping timeout: 252 seconds]
albakry has quit [Ping timeout: 260 seconds]
<shock_one>
_bart, give me test string
josh_keith has quit [Ping timeout: 256 seconds]
monkegji_ has joined #ruby
<Mon_Ouie>
/(.+?)\n\n/
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby
<Mon_Ouie>
(The interrogation mark is to make it non greedy; see what it matches on a string like "foo\n\nbar\n\n")
<mr-rich>
shock_one: That was it! Converted everything to standard strings and it works!
nomenkun has joined #ruby
<Mon_Ouie>
Might as well be .*? even
Uranio has quit [Quit: while you reading this, a kitty dies]
Morkel_ has joined #ruby
ryanf has quit [Read error: Connection reset by peer]
elico has quit [Ping timeout: 252 seconds]
dmiller2 has joined #ruby
autojack has joined #ruby
jphpsf has joined #ruby
Morkel has quit [Read error: Connection reset by peer]
Morkel_ is now known as Morkel
axl_ has quit [Read error: Operation timed out]
<_bart>
Why does the regexp . not pass a newline? :/
elico has joined #ruby
ryanf has joined #ruby
<shock_one>
_bart, you want a m option after regexp
axl_ has joined #ruby
<Mon_Ouie>
Yeah, forgot about that
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
<autojack>
asking out of curiosity: when we run the specs for one of our projects, the ruby process consumes upwards of 1.3G of RAM on 64 bit boxes, and around 800M on 32 bit ones. why the difference? using the same version of ruby compiled in rbenv with the same build options. (I am aware that there is something horribly wrong with these specs to be using that much RAM :)
robotmay has joined #ruby
sayan has joined #ruby
sayan has quit [Changing host]
sayan has joined #ruby
<autojack>
I suppose I should specify: Linux.
Lubinski has joined #ruby
<shock_one>
autojack, because some data structures on x64 (like pointers and ints ) take more memory
timonv has joined #ruby
<autojack>
I figured it was something like that.
skogis has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mahmoudi_ has joined #ruby
<shock_one>
autojack, You're lucky you don't know that. Some people can answer without a calculator how much is 2^32
dmiller2 has quit [Ping timeout: 244 seconds]
<autojack>
heh
rakaar has quit [Ping timeout: 256 seconds]
robotmay_ has joined #ruby
QKO has quit [Read error: Operation timed out]
<aedorn>
Trying to figure out why that's lucky ... hmmm never had to worry about unsigned integers?
mahmoudimus has quit [Ping timeout: 272 seconds]
tomask has quit [Quit: Išeinu]
Aristata has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
josh_keith has joined #ruby
<shock_one>
aedorn, integers overflow is only a tip of the iceberg. It means he never worked with pointers.
Cooler_ has joined #ruby
Cooler_ has quit [Remote host closed the connection]
caleb_io has quit [Quit: caleb_io]
<CrazyDog_>
tomorrow I'm alone with ruby
pavilionXP has joined #ruby
skattyadz has quit [Quit: skattyadz]
griffindy has joined #ruby
<Aristata>
Ok guys, I need some advice. I have some information that needs to be displayed, a number of lists if you will. One list may be something like a, b, and c, while another may be something like a, b, c, and d. What I want to do, is make it so I am only ever showing the longest common list, so in that case it would be a, b, c, d. I basically need to take all my lists, and reject the ones that are contained by a more specific (read: longer) list. Anyone have any
<autojack>
don't do anything dirty.
<aedorn>
oh.. hmm. I miss pointer arithmetic.
QKO has joined #ruby
mengu_ has quit [Quit: Konversation terminated!]
<shock_one>
Aristata, Do you want to take the longest list? array_of_lists.group_by(&:size).max.first
mercwithamouth has quit [Remote host closed the connection]
timonv has quit [Read error: Connection reset by peer]
elico has quit [Remote host closed the connection]
timonv has joined #ruby
beneggett has joined #ruby
ddv has quit [Changing host]
ddv has joined #ruby
<shock_one>
Aristata, oh, got it. Do your lists contain unique elements?
IceDragon has joined #ruby
<Aristata>
Sorry one second!
ngoldman has joined #ruby
zerba has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
autojack has left #ruby [#ruby]
skattyadz has joined #ruby
<Aristata>
shock_one: Well, the final element of each list will always be unique, but thats all
benlieb has joined #ruby
<Aristata>
shock_one: i will have things like: [a, b, c] and [a b c d], and [f, g h], [f]
vierja has quit [Ping timeout: 244 seconds]
<Aristata>
So in those my result would be [a b c d] and [f g h]
<Aristata>
If that make any sense!
<shock_one>
Aristata, it is. You need to reject subsets.
<Aristata>
Right
<Aristata>
Is there an easy method for that I have just overlooked?
<shock_one>
Does [b,a,c] count as subset of [a,b,c,d]?
mercwithamouth has joined #ruby
<Aristata>
These will always appear in the same order, but in the event that they are out of order no they should not count
<shock_one>
Aristata, no, there is no ready-made solution
SeanLazer has quit [Read error: Connection reset by peer]
punkrawkR^Home has joined #ruby
<shock_one>
Aristata, I woul'd be much easier if there couldn't be [a,a,b]
<danneu>
for some reason i can't tell waht you're trying to do. inputs: [a b c] [a b c d] [f g h] [f] ... output: [a b c d] [f g h] ?
SeanLazer has joined #ruby
Catbuntu has quit [Quit: Aranda56> Spanish music is the best ← LOLOL.]
JMcAfreak has joined #ruby
vierja has joined #ruby
beneggett has quit [Read error: Operation timed out]
<Aristata>
shock_one: There will never be an a, a, b, (the items in the list are parent child relationships)
<shock_one>
danneu, For each array, if there is a superset of it, then reject, otherwise select.
<Aristata>
[parent > child > child > child ]
arya_ has joined #ruby
miked__ has joined #ruby
<Aristata>
Correct
<shock_one>
Aristata, so, in a single array all elements are unique?
<Aristata>
Yup!
DrShoggoth has joined #ruby
<shock_one>
Aristata, hold on.
<shock_one>
Aristata, what if there is [a,b,c] and [a,b,c]
jpinnix has joined #ruby
<Aristata>
That should never be possible either, however, in the event that does happen, it wouldn't matter, pick one and discard the other
sailias has joined #ruby
jpinnix has quit [Client Quit]
yopp has joined #ruby
arya has quit [Ping timeout: 248 seconds]
evenix_ is now known as evenix
beneggett has joined #ruby
<danneu>
still dont understand the above input/output example, but you could intersect arrays ([a b] & [a b c]) #=> [a b] and then take the longest?
yopp has quit [Quit: yopp]
maxmanders has joined #ruby
kstephens has quit [Read error: Connection reset by peer]
xemu2 has joined #ruby
joshman_ has quit [Ping timeout: 244 seconds]
xemu has quit [Ping timeout: 272 seconds]
benlieb has quit [Quit: benlieb]
ngoldman has quit [Ping timeout: 240 seconds]
kstephens has joined #ruby
__BigO__ has quit [Remote host closed the connection]
mlr is now known as list
chussenot has joined #ruby
<TTilus>
explaining the usecase would prolly help :)
list is now known as mlr
joshman_ has joined #ruby
fedza has quit [Ping timeout: 248 seconds]
kold has joined #ruby
ixx has joined #ruby
<Aristata>
Well the use case is such: a user can select these "labels" and each label is either a child or a root of a tree of labels. On selecting a label, I am associating the parents all the way up
__BigO__ has joined #ruby
ixx is now known as Guest39035
objectivemo_ has joined #ruby
<Aristata>
now if a has two children c and d I want to display something like this
<Aristata>
a > c
<Aristata>
a > d
sailias has quit [Quit: Leaving.]
<Aristata>
I don't know if that makes a hell of a lot of sense
<Aristata>
:/
objectivemo has quit [Ping timeout: 260 seconds]
objectivemo_ is now known as objectivemo
swarley| has joined #ruby
rmartin has quit [Remote host closed the connection]
macmartine has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
mercwithamouth has quit [Ping timeout: 252 seconds]
<shock_one>
I have read somewhere there is a method strict_superset, but I can't remember the exact name. Or is it some ActiveSupport extension?
<Aristata>
This is going to work perfectly
<Aristata>
I can't thank you enough
<Joelk>
http://pastebin.com/nuPtifj2 - Thoughts on why I'm getting this error? If I run it by hand it works, in the failing situation it's being called by bundler, maybe order of something being installed?
<shock_one>
Aristata, it's not elegant enough for me :)
<JustinAiken>
If you have a string, such as "#<File:0xa3ad43c>", is there a way to the the File instance out of it?
<Aristata>
shock_one: It's elegant enough for me to get this stuff up and running for my client, I can pretty it up next iteration if need be!
moofy has joined #ruby
swarley| has quit [Ping timeout: 276 seconds]
SeySayux has joined #ruby
<moofy>
Hi. How would i go about searching through a file for a regular expression and returning only those strings that match?
<shock_one>
moofy, what's wrong with it except hardcoding and not closing the file?
DuoSRX has joined #ruby
Jackneill has quit [Remote host closed the connection]
hbpoison has joined #ruby
tenmilestereo has quit [Quit: Leaving]
miked__ has quit [Quit: miked__]
<moofy>
its just printing everything
<moofy>
not just the uppercase word
Villadelfia has joined #ruby
bawigga has joined #ruby
mercwithamouth has joined #ruby
<shock_one>
moofy, actually, you should replace open with readlines, if you have each word on the separate line. It will close the file automatically and also it returns array of strings instead of file
atyz has quit [Quit: Leaving...]
dmonjo has joined #ruby
martin_work has joined #ruby
<Hanmac_>
moofy why not using File.foreach ??
<dmonjo>
does ruby 1.9.3 install on rubymine 3.2.4?
sayan has quit [Ping timeout: 276 seconds]
mephux has quit [Excess Flood]
willob has quit [Quit: Leaving.]
khismetix has joined #ruby
<moofy>
I'm very new at this. so uhh, mainly because i didn't know it existed.
carloslopes has quit [Remote host closed the connection]
ryanf has quit [Read error: Connection reset by peer]
<Hanmac_>
in ruby you have a function for mostly everything :P
ryanf has joined #ruby
<moofy>
uhm, readlines gives nothing at all
mephux has joined #ruby
<martin_work>
hey all, whats the best way in 1.8.5 to sort a hash by its keys numerically, The keys are strings.
twoism has joined #ruby
mahmoudi_ is now known as mahmoudimus
<shock_one>
moofy, foreach is better for your purposes, because it doesn't create an array.
<Hanmac_>
martin_work update to newer ruby .... 1.8.5 dead for very long time
<moofy>
okay.
<martin_work>
yea, i wish
<moofy>
the text is mostly like this
<moofy>
pietr0, n. An advance agent of the reaper whose name is Indigestion.
<moofy>
sigh. it's grabling.
arturaz has quit [Remote host closed the connection]
<moofy>
pietr0, n Something blah blah blah….
<moofy>
hmm. autonick -_
<moofy>
PIE.
<martin_work>
this is to output a yaml file.
ryanf has quit [Read error: Connection reset by peer]
<Hanmac_>
banisterfiend then the pkg_config command in mkmf reakts different, for some reason they destroy the $LDFLAGS variable (so it does break my app)
alex__c2022 has quit [Ping timeout: 252 seconds]
<Hanmac_>
baniserfiend: nightly build
<aedorn>
assuming your text file is formatted the same way
alex__c2022__ has joined #ruby
alex__c2022_ has quit [Read error: Connection reset by peer]
<dmonjo>
anyone uses vim for coding ruby?
<dmonjo>
what is their feedback
<moofy>
hmm
dhruvasagar has quit [Ping timeout: 252 seconds]
<havenwood>
dmonjo: macvim is a popular option
dustint_ has joined #ruby
<danneu>
dmonjo: vim is da mutt's nuts!
<moofy>
that gives me a no method error
<dmonjo>
i am using linuxmint
<danneu>
dmonjo: type 'vimtutor' into a terminal.
<dmonjo>
danneu: whats a mutt;s nuts
<Hanmac_>
banisterfiend: what does [[1,2],[3,4]].map {||**v| v} returns on your newest ruby you have?
dustint has quit [Ping timeout: 248 seconds]
<havenwood>
dmonjo: Yeah, vim is popular with Ruby. But also emacs, TM2, ST2, etc.
geekbri has quit [Remote host closed the connection]
<Hanmac_>
banisterfiend: i mean [[1,2],[3,4]].map {|**v| v}
<aedorn>
I use sublime text 2 purely because of smooth scrolling. It's vain.
Umren has quit [Read error: Connection reset by peer]
ngoldman has quit [Ping timeout: 248 seconds]
bartj3 has quit []
d2dchat has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
sepp2k1 has joined #ruby
moshee has quit [Ping timeout: 252 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dmiller2 has quit [Ping timeout: 260 seconds]
Kingy_ has joined #ruby
<aedorn>
everytime I start work on this Ruby dbus interface to wpa_supplicant, I get about 1 line in and then stare off into space. At this rate it'll be done sometime by Christmas.
francisfish has joined #ruby
urrk has left #ruby [#ruby]
maxmanders has quit [Ping timeout: 256 seconds]
mahmoudi_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<danneu>
sounds fun!
joshman_ has quit [Ping timeout: 252 seconds]
Kingy has quit [Ping timeout: 272 seconds]
agarie has joined #ruby
<aedorn>
maybe it's just ruby-dbus
jsilver has joined #ruby
davidcelis has quit [Ping timeout: 246 seconds]
maxmanders has joined #ruby
guiocavalcanti has joined #ruby
mahmoudimus has quit [Ping timeout: 252 seconds]
ngoldman has joined #ruby
<dmonjo>
do you have vim autocompletion for ruby
bigmac has joined #ruby
djwonk has joined #ruby
davidcelis has joined #ruby
erlingur has joined #ruby
<Hanmac_>
dmonjo: for sample even vim cant du autocompletion for methodmissnig stuff
colonolGron has quit [Quit: leaving]
atyz has joined #ruby
<dmonjo>
i dont think the gui version is installed on my linuxmint
<dmonjo>
:version doesnt show gui
Qwak has joined #ruby
<shock_one>
Hanmac_, the only way to do it is execute the code on the fly.
<Hanmac_>
yeah thats why i find it funny that somone wants auto complete for an dynamic language like ruby
asobrasil has joined #ruby
<aedorn>
autocomplete slows me down, not sure about you guys
<shock_one>
Hanmac_, don't you think it's doable? Some sort of dry run, without any IO.
kofno has quit [Remote host closed the connection]
LBRapid has quit [Quit: Leaving]
ezkl has joined #ruby
<Hanmac_>
no
Xeago_ has joined #ruby
Xeago_ is now known as Xeago
<shock_one>
Hanmac_, OK, but IDE could have a special rule to parse method_missing
<Mon_Ouie>
Autocompleting using just words from current and others buffers has proved to be enough for me
agarie has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby
<Mon_Ouie>
I've always thought one solution would be to use a documentation tool like YARV to guess potential types and then completion candidates
<banisterfiend>
Mon_Ouie: YARV? :D
<Mon_Ouie>
YARD*
agarie has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
ezkl has quit [Client Quit]
philcrissman has quit [Remote host closed the connection]
sn0wb1rd has quit [Quit: sn0wb1rd]
philcrissman has joined #ruby
kofno has joined #ruby
psy_ has joined #ruby
workmad3 has joined #ruby
shock_one has quit [Ping timeout: 245 seconds]
<dmonjo>
you guys use gvim i think it is better than vim as command line for coding right
<psy_>
hello i have a little problem with my ruby version. it is ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] and on a debian 64bits. when i set net bind capability to ruby, and run it as an luser i got segmentation fault
luckyruby has joined #ruby
<psy_>
when i try with 1.8, i have no errors
<psy_>
any body has a clue?
angusiguess has quit [Ping timeout: 260 seconds]
<banisterfiend>
1.9.2p0 is ancient, use a 1.9.3
maxmanders has quit [Ping timeout: 256 seconds]
Aristata has quit [Quit: Leaving.]
_bart has quit [Ping timeout: 260 seconds]
<Hanmac_>
banisterfiend: did you try [[1,2],[3,4]].map {|**v| v} on a 2.0er ruby?
sepp2k1 has quit [Ping timeout: 264 seconds]
<psy_>
banisterfiend it isn't on debian repositories yet
<ShellFu>
this valid: if cond1 and (cond2 or cond3)
<ShellFu>
can you do something like that?
sayan has quit [Ping timeout: 252 seconds]
<banisterfiend>
psy_: dont use debian repos
Elhu has joined #ruby
<psy_>
banisterfiend you mean i download it from website, compile and install ?
<Hanmac_>
psy_ recent debians have newer ruby
<banisterfiend>
psy_: use rvm/rbenv/chruby
axl_ has quit [Quit: axl_]
<psy_>
banisterfiend hmm, i have to install rvm, don't have it installed
<psy_>
Hanmac_ which version? i'm still on 2.6.32-5-amd64 :}
sn0wb1rd has joined #ruby
maxmanders has joined #ruby
<Hanmac_>
psy i think its in sid branch
SeanLazer has quit [Quit: SeanLazer]
waxjar is now known as a
<Hanmac_>
i am on ubuntu and currently i have a nightly ruby :P
a is now known as waxjar
robotmay_ has quit [Ping timeout: 244 seconds]
ner0x has quit [Quit: Leaving]
<psy_>
curious! on ruby-lang.org is mentionned that last version of ruby on debian is 1.9.2
zigomir has quit [Quit: zigomir]
<psy_>
i'm installing rvm
chico_chicote has joined #ruby
<banisterfiend>
Hanmac_: why dont you use a version manager ?
dmiller2 has joined #ruby
<psy_>
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p385
<Hanmac_>
banister because i dont need one, and does the versions manager support "nightly"? and did you run my code??
maxmanders has quit [Ping timeout: 260 seconds]
alex__c2022 has joined #ruby
alex__c2022__ has quit [Read error: Connection reset by peer]
dustint_ has quit [Remote host closed the connection]
<Spooner>
whitequark, Depends if it takes 2s rather than 0.2s. Then compiling might be an issue. If it is 20s ratehr than 2 it probably isn't that important at all.
<lethjakman_lapto>
whitequark: I think it's execution time
<havenwood>
lethjakman_lapto: Your problem is likely in the way you're loading and parsing the csv. Can you paste a gist of the code you use to load and parse?
robotmay has joined #ruby
emergion has quit [Ping timeout: 264 seconds]
<whitequark>
Spooner: it scales linearly with code size
<whitequark>
Spooner: Python just has a really slow parser :)
maxmanders has quit [Quit: Computer has gone to sleep.]
<aedorn>
I love listening to sales guys talk about this Ruby project. Q: "Do you record logs in some format? like XML?" A: "Well, we use so-and-so version of Linux."
<Spooner>
whitequark, No, I mean that all we have is that it takes 10x longer, which could include compile time effects if the two times are very quick.
<lethjakman_lapto>
I'll try and work something something up tonight when I'm back home.
banisterfiend has quit [Ping timeout: 260 seconds]
<kylewiest>
workmad3: How do you mean?
<workmad3>
kylewiest: you're binding to instance variables, and I bet the callback runs as instance_eval(&blk) to ensure your callback gets the context of the object
<workmad3>
kylewiest: @run_callbacks is an instance variable, not a local variable
guyz has quit [Ping timeout: 245 seconds]
hashmal has joined #ruby
ssvo has quit [Quit: leaving]
digifiv5e has joined #ruby
digifiv5e is now known as Guest60518
djwonk has quit []
<kylewiest>
workmad3: The behavior in the second file on the gist is what I would expect, but I'm thinking it is instance_eval'd when the callback is run
nicoulaj has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
Guest89249 has quit [Ping timeout: 248 seconds]
philcrissman has quit [Remote host closed the connection]
QKO has quit [Read error: Operation timed out]
havenwood has quit [Ping timeout: 260 seconds]
nat_home has quit [Quit: Leaving.]
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
martin_work has quit [Quit: martin_work]
emocakes has joined #ruby
alanp has quit [Read error: Connection reset by peer]
QKO has joined #ruby
alanp_ has joined #ruby
Guest60518 has quit [Ping timeout: 260 seconds]
frem has quit [Quit: Computer has gone to sleep.]
alanp_ is now known as alanp
emmanuelux has joined #ruby
banjara has quit [Quit: Leaving.]
bawigga has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
gabrielrotbart has joined #ruby
michaelaguiar has quit [Quit: michaelaguiar]
Criztian has joined #ruby
tobor_one has quit [Quit: tobor_one]
bwlang has left #ruby [#ruby]
gabrielrotbart has quit [Remote host closed the connection]
tommyvyo has joined #ruby
bawigga has joined #ruby
Dwarf has quit [Ping timeout: 246 seconds]
jimeh has joined #ruby
jlast_ has joined #ruby
Kuifje has quit [Ping timeout: 252 seconds]
digifiv5e_ has joined #ruby
robotmay has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
Hanmac_ has quit [Ping timeout: 245 seconds]
jlast has quit [Ping timeout: 256 seconds]
kofno has joined #ruby
samuel02 has quit [Remote host closed the connection]
bricker_ has joined #ruby
zastern has quit [Remote host closed the connection]
danielpcox has quit [Ping timeout: 252 seconds]
bricker has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
chico_chicote has joined #ruby
Dwarf has joined #ruby
piotr__ has joined #ruby
peregrine81 has quit [Quit: Computer sleeping.]
jlast_ has quit [Remote host closed the connection]
etcetera has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
Morkel has quit [Quit: Morkel]
angusiguess has joined #ruby
monkegji_ has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
radic_ has quit [Ping timeout: 260 seconds]
bean has quit [Quit: Computer has gone to sleep.]
EPIK has joined #ruby
jonathanwallace has joined #ruby
postmodern has joined #ruby
casheew has quit [Ping timeout: 252 seconds]
nmeum has quit [Ping timeout: 252 seconds]
arya_ has quit [Ping timeout: 248 seconds]
cousine has quit [Remote host closed the connection]
Stilo has joined #ruby
Nisstyre_ is now known as Nisstyre
casheew has joined #ruby
matthewrobbins has quit [Quit: matthewrobbins]
nateberkopec has quit [Quit: Leaving...]
peteyg has quit [Ping timeout: 252 seconds]
subbyyy has quit [Ping timeout: 248 seconds]
bawigga has quit [Quit: Computer has gone to sleep.]
chimkan_ has joined #ruby
jjang has joined #ruby
chendo_ has quit [Ping timeout: 252 seconds]
arya has joined #ruby
daniel_- has quit [Quit: WeeChat 0.3.9.2]
nmeum has joined #ruby
poikon has joined #ruby
nari has joined #ruby
daniel_- has joined #ruby
bawigga has joined #ruby
chendo_ has joined #ruby
__BigO__ has quit [Remote host closed the connection]
<tjbiddle>
Anyone like to share how they handle configuration? I'd like to have sensible defaults that can be overridden by a config file. Used YAML before, but wondering if that's the best option - especially as opposed to pure ruby. Need to r+w to the config file from the application.
geggam has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
mlr has quit [Quit: leaving]
mlr has joined #ruby
maxmanders has joined #ruby
iambic has quit [Quit: leaving]
DrShoggoth has quit [Quit: Leaving]
samphippen has quit [Quit: Computer has gone to sleep.]
yshh has quit [Read error: Connection reset by peer]
<graft>
anyone have a nice gem that will do like 105125.to_human => "105K" or some such?
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
DuoSRX has joined #ruby
araujo has quit [Ping timeout: 260 seconds]
solidoodlesuppor has quit [Ping timeout: 272 seconds]
yshh has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
jerius has quit [Ping timeout: 255 seconds]
<aedorn>
tjbiddle: funny enough I'm contemplating that myself right now. We have 30 YAML files, but most contain a lot of duplication. Although, we don't have to worry about writing to the config from the application so configs based in Ruby is a good idea for us. I think for you, since you have to write back, probably not.
billiam has quit [Quit: Leaving]
_nitti has joined #ruby
<tjbiddle>
aedorn: Yeah. That's what I was thinking. Rails does a lot of their configuration with Ruby and it's extremely clean, but we're it doesn't write back to it obviously.
kofno has quit [Read error: Connection reset by peer]
khimera has quit [Quit: khimera]
kofno has joined #ruby
v0n has quit [Read error: Operation timed out]
beilabs has joined #ruby
QKO_ has joined #ruby
_br_ has quit [Excess Flood]
khimera has joined #ruby
maxmanders has quit [Ping timeout: 252 seconds]
tealmage has joined #ruby
banisterfiend is now known as banister`sleep
QKO has quit [Ping timeout: 244 seconds]
_nitti has quit [Ping timeout: 248 seconds]
<IceDragon>
>.> Is there a method that is invoked whenever you try to make a call to an object?
<IceDragon>
or rather before the actual method call
<banister`sleep>
IceDragon: no
<IceDragon>
>_> damn
<banister`sleep>
IceDragon: but people use proxy objects to accomplish the same thing
<banister`sleep>
IceDragon: or they decorate their methods after the fact
<banister`sleep>
using metaprogramming
ryanf has quit [Read error: Connection reset by peer]
<IceDragon>
;-; god damn it
khimera has quit [Client Quit]
ryanf has joined #ruby
_br_ has joined #ruby
<banister`sleep>
IceDragon: what are you trying to do?
poikon has quit [Remote host closed the connection]
<IceDragon>
Nothing really, I was looking over things like method_missing and method_added
<IceDragon>
and was thinking about it
<banister`sleep>
so why such extreme emotion? :)
<banister`sleep>
hehe
<IceDragon>
I kinda know the reason why, it doesn't exist. It would be a lag bastard
bttf has joined #ruby
tcstar has quit [Ping timeout: 255 seconds]
_br_ has quit [Excess Flood]
BrindleFly_ has joined #ruby
kofno has quit [Remote host closed the connection]
<banister`sleep>
IceDragon: if you want that functionality though it's very easy to fake
<IceDragon>
using method_added and a few eval tricks?