<pskosinski>
Or "a b c".gsub(/ /, "\\ ") should work if only spaces could be problem…
RagingDave has quit [Quit: Ex-Chat]
nari has joined #ruby
horofox has joined #ruby
otters has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
Spami has quit [Quit: This computer has gone to sleep]
h4mz1d has joined #ruby
hbpoison has quit [Ping timeout: 240 seconds]
bricker`LA has quit [Quit: leaving]
bricker`LA has joined #ruby
hbpoison has joined #ruby
reppard has quit [Ping timeout: 240 seconds]
<bigmac>
i got it with some quotes
<bigmac>
thanks for your help
<oblio>
apeiros_: heh
<oblio>
apeiros_: not really, just lost in it
<oblio>
apeiros_: thank you though
<oblio>
apeiros_: basically i have all of these association pairs which are short descriptions of what the entire tree looks like
<oblio>
apeiros_: and i've been playing with ruby tree
<oblio>
apeiros_: but my references for building the tree are all just individual string pairs, and i need to build the associations up in the tree with objects
<oblio>
so for each association i guess i need to test if the association exists or not
jibi has quit [Quit: .]
hbpoison has quit [Remote host closed the connection]
julian-delphiki has quit []
hbpoison has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
tomzx_ has joined #ruby
butblack has joined #ruby
butblack has quit [Client Quit]
pskosinski has quit [Quit: Learn Life's Little Lessons]
macmartine has joined #ruby
hackerdude has joined #ruby
jacktrick has quit [Quit: Leaving]
atmosx has joined #ruby
freeayu has joined #ruby
moos3 has joined #ruby
jacktrick has joined #ruby
samuelj has joined #ruby
nathancahill_ has joined #ruby
<samuelj>
Hey everyone, I'm trying to set an environmental variable with %x(GIT_SSH=./git_ssh) but i get this error: Errno::ENOENT at / No such file or directory - GIT_SSH=./git_ssh ---- does this mean anything to anyone? Getting extremely confused!
jwang has joined #ruby
statarb3 has quit [Quit: Leaving]
brianpWins has joined #ruby
nathancahill has quit [Ping timeout: 272 seconds]
nathancahill_ is now known as nathancahill
<waxjar>
you can do ENV['GIT_SSH'] if you just need it while your application is running
aytch has quit [Remote host closed the connection]
aytch has joined #ruby
hackerdude has quit [Remote host closed the connection]
mneorr has joined #ruby
nathancahill_ has joined #ruby
aytch has quit [Ping timeout: 256 seconds]
nathancahill has quit [Ping timeout: 248 seconds]
nathancahill_ is now known as nathancahill
Fretta has joined #ruby
aaronmacy has joined #ruby
Umren has quit [Ping timeout: 256 seconds]
bandu has joined #ruby
bandu is now known as Guest65430
Vert has quit [Remote host closed the connection]
hackerdude has joined #ruby
nari has quit [Ping timeout: 272 seconds]
cableray has quit [Quit: cableray]
Rym has quit [Quit: Rym]
ryanf has quit [Quit: leaving]
ryanf has joined #ruby
toekutr has quit [Remote host closed the connection]
AFlyingMonkey has quit [Read error: Connection reset by peer]
robotmay has quit [Remote host closed the connection]
karasawa has quit [Ping timeout: 265 seconds]
nathancahill_ has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
buibex has joined #ruby
karasawa has joined #ruby
maletor has joined #ruby
jds_ has joined #ruby
nathancahill has quit [Ping timeout: 272 seconds]
nathancahill_ is now known as nathancahill
ossareh has quit [Ping timeout: 244 seconds]
kenneth has joined #ruby
aytch has joined #ruby
c0rn has joined #ruby
Banistergalaxy has quit [Remote host closed the connection]
ossareh has joined #ruby
eka has joined #ruby
vlad_starkov has joined #ruby
jds_ has quit [Ping timeout: 255 seconds]
tomzx_ is now known as tomzx
linoj_ has joined #ruby
linoj has quit [Read error: Connection reset by peer]
jaywastaken has quit [Read error: Connection reset by peer]
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
brianpWins has quit [Quit: brianpWins]
huoxito has quit [Quit: Leaving]
karasawa has quit [Ping timeout: 264 seconds]
fyolnish has joined #ruby
karasawa has joined #ruby
bradhe has quit [Ping timeout: 256 seconds]
kil0byte has joined #ruby
MattRb has joined #ruby
MattRb has quit [Client Quit]
mikeycgto has joined #ruby
andrewhl has quit [Remote host closed the connection]
dustint has quit [Remote host closed the connection]
itsdavem has quit [Remote host closed the connection]
dustint has joined #ruby
DatumDrop has joined #ruby
itsdavem has joined #ruby
hbpoison has joined #ruby
itsdavem has quit [Remote host closed the connection]
Iszak has quit []
h4mz1d has quit [Ping timeout: 240 seconds]
WilfredTheGreat_ has joined #ruby
asteve has quit [Quit: Computer has gone to sleep.]
jaywastaken has quit [Remote host closed the connection]
main has quit [Ping timeout: 276 seconds]
rynkan has joined #ruby
h4mz1d has joined #ruby
WilfredTheGreat has quit [Ping timeout: 272 seconds]
DatumDrop has quit [Ping timeout: 252 seconds]
sross has joined #ruby
viuo has joined #ruby
DatumDrop has joined #ruby
dustint has quit [Remote host closed the connection]
zz_pacbard is now known as zz_zz_pacbard
karasawa has quit [Ping timeout: 256 seconds]
slothbear has joined #ruby
<shevy>
JohnTeddy in most cases, good ruby code does not need many "end"
<shevy>
I think the maximum tends to be 3 levels of end, normally i.e.
itsdavem has joined #ruby
<shevy>
module Foo; class Bar; def hi; puts 'hi'; end; end; end # 3x end
viuo has quit [Ping timeout: 252 seconds]
dustint has joined #ruby
<shevy>
depending on how the rest of the ruby code is
aapzak has quit [Ping timeout: 252 seconds]
<shevy>
I use arrac.each {} usually rather than do/end. I found it visually much easier to differ that way
<shevy>
def some_method
<shevy>
collection.each {|e|
noyb has joined #ruby
<shevy>
}
<shevy>
end
<shevy>
hmm array... not arrac :\
MattRb has joined #ruby
emmanuelux has quit [Read error: Connection reset by peer]
aapzak has joined #ruby
bradhe has joined #ruby
<graft_>
i usually only use {} if it fits on one line
noyb has quit [Ping timeout: 244 seconds]
<graft_>
otherwise i use do/end
horofox has quit [Quit: horofox]
iamjarvo1 has joined #ruby
r3nrut_ has joined #ruby
<SirFunk>
anyone here real familiar with the ri_cal gem? It's DSL is confusing the heck out of me
<r3nrut_>
i've messed with it a couple of times. not intimately familiar though.
ossareh has quit [Ping timeout: 265 seconds]
<SirFunk>
i'm trying to read one calendar and push all the events onto another.. but i can't figure out how to append an event other then using their calendar.event do |event| syntax
pooriaazimi has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
sambio has quit []
fyolnish has quit [Remote host closed the connection]
<zph>
thufir_: It's VERY helpful for seeing how stuff works, especially when getting errors. Also, pair it with tmux and a terminal text editor that can pass text straight to the Pry session… then it's heaven
savage- has joined #ruby
paul_k has quit [Remote host closed the connection]
itsdavem has joined #ruby
hackerdude has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
<thufir_>
interesting. ok, I'm all set. thanks very much :)
v0n has quit [Read error: Connection reset by peer]
ben_ has quit [Quit: ben_]
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
<zph>
thufir_: Good deal! Happy hacking
<thufir_>
:) tomorrow I think.
itsdavem has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
v0n has joined #ruby
<r3nrut_>
omg, pry looks awesome.
cisco has quit [Quit: Leaving.]
dustint has quit [Remote host closed the connection]
dustint has joined #ruby
itsdavem has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
slothbear has quit [Quit: Page closed]
itsdavem has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
savage- has quit [Ping timeout: 265 seconds]
hbpoison_ has joined #ruby
dustint has quit [Client Quit]
hbpoison has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
dustint has joined #ruby
itsdavem has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
DatumDrop has joined #ruby
apeiros_ has quit [Ping timeout: 244 seconds]
itsdavem has joined #ruby
itsdavem has quit [Read error: Connection reset by peer]
x82_nicole has joined #ruby
dankest is now known as dankest|away
dankest|away is now known as dankest
itsdavem has joined #ruby
ben_ has joined #ruby
dustint has quit [Remote host closed the connection]
doritostains has joined #ruby
doritostains has quit [Remote host closed the connection]
DatumDrop has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
ben_ has quit [Quit: ben_]
itsdavem has quit [Ping timeout: 265 seconds]
jaequery has joined #ruby
rakl has quit [Quit: sleeping]
dustint has joined #ruby
karasawa has joined #ruby
v0n has quit [Ping timeout: 265 seconds]
browndawg has joined #ruby
savage- has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
rh1n0 has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
h4mz1d has quit [Ping timeout: 272 seconds]
a_a_g has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
dustint_ has joined #ruby
bradhe has joined #ruby
crackfu has joined #ruby
a_a_g has quit [Client Quit]
savage- has quit [Ping timeout: 272 seconds]
savage- has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
IceDragon has quit [Quit: Space~~~]
evaryont has joined #ruby
jonahR has joined #ruby
kudos has quit [Ping timeout: 264 seconds]
<evaryont>
hey #ruby, hows it going? anyone know of a way to limit the number of lines File.readlines() loads? I would like to avoid managing a file reference, if possible. I thought File.readlines('foo', 4096) would work, but it doesn't seem so.
browndawg has joined #ruby
itsdavem has joined #ruby
apeiros_ has joined #ruby
jds_ has joined #ruby
davidokner has joined #ruby
h4mz1d has joined #ruby
<davidokner>
Is there a copy of VIM or macVIM that is all setup for ruby, just so I can see what it is like?
itsdavem has quit [Remote host closed the connection]
frogstarr78 has quit [Remote host closed the connection]
sie has quit [Read error: Connection reset by peer]
jgrevich has quit [Quit: jgrevich]
DatumDrop has joined #ruby
<thufir_>
https://gist.github.com/4521995 is this an indication that I need to install a logging gem? shouldn't gem install ____ pull in the required gems to resolve such dependencies? I'm using RVM ruby 1.9.3
apeiros_ has quit [Ping timeout: 260 seconds]
ViPi has joined #ruby
n1x has joined #ruby
<nathancahill>
this is driving my crazy. how do i see if a view was called with POST or GET in rails?
bradhe has quit [Ping timeout: 264 seconds]
dankest has quit [Quit: Leaving...]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<ryanf>
nathancahill: you can use request.post? or request.get?
<ryanf>
nathancahill: but you should consider not having actions that can be either posts or gets
<ryanf>
especially not if they mean different things
savage- has quit [Ping timeout: 260 seconds]
<nathancahill>
contact form
<ryanf>
normally the way to do that would be to have two routes with the same path, one for post and one for get, and then have completely separate actions
<ryanf>
yeah
rh1n0 has quit [Ping timeout: 264 seconds]
<nathancahill>
ah
<nathancahill>
yeah, that's probably better
jonathanwallace has joined #ruby
v0n has joined #ruby
itsdavem has joined #ruby
noyb has joined #ruby
uris has quit [Quit: Leaving]
cableray has joined #ruby
agarie has joined #ruby
shammancer has quit [Quit: Leaving.]
shammancer has joined #ruby
goganchic has joined #ruby
goganchic has quit [Client Quit]
nathancahill has quit [Quit: nathancahill]
jonathanwallace has quit [Ping timeout: 260 seconds]
hackerdude has quit [Remote host closed the connection]
apeiros_ has joined #ruby
bradhe has joined #ruby
iamjarvo1 has quit [Quit: Leaving.]
skaczor has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 276 seconds]
karasawa has joined #ruby
agarie has quit [Remote host closed the connection]
<SirFunk>
What is the best way to do this in ruby: Make an object that contains another object where the inner object can access properties on the outer?
<SirFunk>
I have a model that represents an Event currently the model has a bunch of twitter/facebook posting junk in it. I Want to refactor the twitter stuff and the facebook stuff into seperate classes. They need things like event.title though
<SirFunk>
yeah.. that's not really what i'm talking about
<thufir_>
SirFunk: I think it is. you want an Event, and then facebook even inherits from event. twitter inherits from event.
<macmartine>
+1
<SirFunk>
no.. that's not what i'm talking about
<SirFunk>
every event does twitter stuff and facebook stuff
<thufir_>
SirFunk: then put that code into the Event class.
Edward_ has quit [Ping timeout: 272 seconds]
* thufir_
gives up.
<SirFunk>
thufir_: that's where it is now.. i think the class is getting too big though. Trying to figure a way to refactor it and break it up
<SirFunk>
I'm imagining something like event.facebook.post and event.facebook.update ... and the first time event.facebook gets used it would make sure that it has an api key ... i'm not sure how to organize that though
<SirFunk>
the only way i can think of is putting @facebook and @twitter as instance vars on event and then having a method that either returns a facebook object or initalizes a new one (passing the event itself when initalizing a new one)
<SirFunk>
is that weird?
<thufir_>
SirFunk: I come from Java, but it's the same idea. all your methods which are "facebook this" or "twitter that" belong in a seperate class(es) which inherit from Event. I saw the code. you need three classes to my thinking.
<thufir_>
SirFunk: that's composition, that's ok.
<SirFunk>
the reason inheriting from event won't work is i need the _same_ event to do twitter things and facebook things
DatumDrop has quit [Ping timeout: 252 seconds]
<thufir_>
SirFunk: you could have a twitter object (class) which you pass to the event. then, the event calls methods on the twitter object.
danneu has quit [Ping timeout: 252 seconds]
<thufir_>
SirFunk: inside event, check to see the type of object which is passed. is it twitter or fb? then..
noyb has quit [Ping timeout: 264 seconds]
<SirFunk>
hmmm
<thufir_>
I think a factory is what you're after...
Richmond has quit [Max SendQ exceeded]
Richmond has joined #ruby
nathancahill has quit [Quit: nathancahill]
<macmartine>
SirFunk: it sounds like you're saying that there's one type of event, so making multiple types of objects doesn't make sense to me. you could separate the twitter and fb stuff into modules if you just want to clean up, or move it into an observer
dmiller has quit [Ping timeout: 248 seconds]
<macmartine>
or a FacebookService and TwitterService
<SirFunk>
macmartine: yeah that was my original thought... although from my understanding the 'need' to split one class into multiple modules is a 'code' smell and there should be a better way to refactor splitting the class up into smaller classes that do specific things
<SirFunk>
thus i'm trying to figure out the later
jonathanwallace has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
bricker is now known as bricker`away
danneu has joined #ruby
fumbe has quit [Ping timeout: 248 seconds]
<macmartine>
Not sure about the abstract factory here. Isn't that better suited to working with any one entity as long as it quacks like a duck? In this case it's always multiple entities that always need to do the work
<thufir_>
macmartine: that's my error. from the comments, it looks like ruby doesn't use factories like java does.
lateau has joined #ruby
bricker`away is now known as bricker`work
bricker`LA is now known as bricker_
bricker`work is now known as bricker`LA
<macmartine>
SirFunk: What calls methods like 'post_day_of_to_twitter'?
<macmartine>
and post_to_twitter
robustus has quit [Ping timeout: 255 seconds]
<SirFunk>
macmartine: a rails controller
<JohnTeddy>
What is a good way to reset all the instance variables in a class?
<JohnTeddy>
for say playing a new game.
jonathanwallace has quit [Ping timeout: 276 seconds]
<macmartine>
SirFunk: After an event gets saved, a presume?
robustus has joined #ruby
<SirFunk>
macmartine: yeah... not on save though
<macmartine>
SirFunk: The controller shouldn't need to know about that. I'd start with moving those calls into an observer on the event class. And moving the twitter and Facebook work into their own classes or modules.
<SirFunk>
the idea is they will be batched. Once a day it will post new ones (or some meta thing like "5 new events created")
<macmartine>
SirFunk: All the controller needs to know is that it needs to save an event
<macmartine>
or whatever
<SirFunk>
macmartine: yeah the controller doesn't
<SirFunk>
well i mean.. there is a controller to specificcly post it.. if i want to post it early.. otherwise there is rake task that runs once a day to post new ones
emergion has quit [Quit: Computer has gone to sleep.]
<macmartine>
SirFunk: The controller should know nothing about this
bricker`LA is now known as bricker`away
f03lipe has joined #ruby
<SirFunk>
macmartine: it doesn't
MattRb has quit [Quit: This computer has gone to sleep]
bricker_ is now known as bricker
<macmartine>
SirFunk: You said the controller calls post_to_twitter
<SirFunk>
it can
<SirFunk>
I want to have a button to post to twitter. How would you suggest i do that without a controller?
<macmartine>
SirFunk: I thought the social media calls were a result of an event action. If not, I'd move the social media stuff to their own controllers
<SirFunk>
they mostly are not the result of an event action
kiyoura has quit [Quit: Leaving]
<SirFunk>
hang on, i'm trying a refactor if I can get the code to work i'll re-gist it to see if makes sense
crackfu has quit [Remote host closed the connection]
f03lipe has quit [Quit: Leaving]
<SirFunk>
wth.. why can't it find my new class
<SirFunk>
if i call it directly it's fine but if i try to call it from the other class it says it doesn't exist
apeiros_ has joined #ruby
f03lipe has joined #ruby
S2kx has joined #ruby
S1kx has quit [Read error: Connection reset by peer]
MattRb has joined #ruby
<macmartine>
SirFunk: How're you liking Refinery?
<SirFunk>
macmartine: quite a bit
<SirFunk>
the back end is a little strange sometimes to setup but other than that it's been great
f03lipe has quit [Client Quit]
f03lipe has joined #ruby
DatumDrop has joined #ruby
<macmartine>
SirFunk: Is it going to be used by non-programmers?
<SirFunk>
it could be.. but no.. just me
<macmartine>
Meaning, is it dummy proof
<SirFunk>
I have a padrino app that my mom uses the backend to :-P
<SirFunk>
i think refinery could be simpler than padrino
f03lipe has quit [Remote host closed the connection]
<SirFunk>
I would say _using_ refinery is plenty idiot proof... It doesn't have a ton of functionality out of hte box though (fine for pages/blogs/images/etc.) but anything fancy you'll need to code yourself
f03lipe has joined #ruby
f03lipe has quit [Remote host closed the connection]
f03lipe has joined #ruby
<macmartine>
SirFunk: Cool. I just checked out a bunch of rails cms's last week. none seemed that great. I forget exactly what my issues with refinery were
charliesome has joined #ruby
dmiller has joined #ruby
<SirFunk>
if you remember let me know and i'll see if i can refute them :-P
coderhut has joined #ruby
f03lipe has quit [Remote host closed the connection]
f03lipe has joined #ruby
brianpWins has joined #ruby
blazes816 has joined #ruby
bradhe has joined #ruby
f03lipe has quit [Remote host closed the connection]
n1x has quit [Ping timeout: 260 seconds]
apeiros_ has quit [Ping timeout: 276 seconds]
<SirFunk>
ok, i think this refactor works let me gist it.. let me know if it makes sense
KernelDog has quit [Remote host closed the connection]
<SirFunk>
macmartine: is that a legitimate pattern i'm using? or did i make some bastardization up?
<macmartine>
SirFunk: You can remove some attr_accessible's from Activity
tommyvyo_ has joined #ruby
<SirFunk>
I don't like having stuff like #{@activity.event.group.name} inside the twitter class... that kinda bugs me
<macmartine>
SirFunk: there's still definitely room for improvement, but it's a process :)
<macmartine>
SirFunk: Lay of demeter
<macmartine>
Law of demeter
<SirFunk>
i'm not familiar with that?
<macmartine>
SirFunk: I highly, highly recommend this http://www.poodr.info/ no, i'm in no way affiliated
nomenkun has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<SirFunk>
ahh that was on ruby rogues recently, no?
<macmartine>
SirFunk: sounds likely
<SirFunk>
I wish i had time to read real programming books :-P Or i wish i made money from this so I could justify the time spent
bradhe has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
Rym has joined #ruby
n1x has joined #ruby
fyolnish has quit [Remote host closed the connection]
skcin7 has quit [Ping timeout: 252 seconds]
dmiller has quit [Ping timeout: 276 seconds]
itsdavem has quit [Remote host closed the connection]
<reactormonk>
SirFunk, coding is always useful.
<SirFunk>
eh, not so much for a musician :-P
<SirFunk>
other than for fun
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
apeiros_ has joined #ruby
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
<reactormonk>
SirFunk, oh, really? I once wrote some code that created chromatic music ;-)
<SirFunk>
haha
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
<SirFunk>
I'm not much of a composer, mostly a player
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
<reactormonk>
I'm sure you use a computer daily
rakl has quit [Quit: sleeping]
<macmartine>
SirFunk: Bass?
ViPi has joined #ruby
DatumDrop has joined #ruby
ViPi has quit [Max SendQ exceeded]
<SirFunk>
macmartine: yup, mostly upright
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
vilu has joined #ruby
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
nomenkun_ has joined #ruby
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
<reactormonk>
there's downright Bass?
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
dogweather has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
ViPi has quit [Max SendQ exceeded]
ViPi has joined #ruby
ViPi has quit [Max SendQ exceeded]
<SirFunk>
reactormonk: lol.. there's an album called "Downright Upright" :-P
ViPi has joined #ruby
<SirFunk>
I need to write better tests for this refinery extension... ok... i take that back.. I need to write any tests :-P
<macmartine>
SirFunk: Oh know. I went through that too Start now
<macmartine>
"Oh no"
<macmartine>
damn autocorrect
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
apeiros_ has quit [Ping timeout: 272 seconds]
<Quadlex>
Ugh
<Quadlex>
I promised someone a blog article expanding on a solution on Stack Overflow
<Quadlex>
And I'm way too drunk to write it now
<macmartine>
Quadlex: solution to what?
DatumDrop has quit [Ping timeout: 244 seconds]
<SirFunk>
macmartine: I need to get better at writing tests. I usually start trying to come up with factories and stuff and then i just get frustratd with the way objects relate and give up
<Quadlex>
macmartine: They wanted to know how to test a Monkeypatch to Kernel
<SirFunk>
takes 10x longer to write the tests than it does the code :-P
<macmartine>
Quadlex: Oh, unrelated
graft_ has quit [Ping timeout: 264 seconds]
<Quadlex>
I gave them a wee bit of explanation, the test code, and then the full test suite I'd write, promising I'de xplain the test suite later'
<Quadlex>
Oh, yeah. Sorry.
graft_ has joined #ruby
graft_ has quit [Changing host]
graft_ has joined #ruby
jonathanwallace has joined #ruby
<macmartine>
SirFunk: That's the issue you must overcome! It does only at first. Then you get in the groove, and on a roll, and the first time you change a simple thing and it breaks a bunch of shit you weren't expecting to break, you'll be hooked. Cause otherwise it would have taken 89 manual clicks to find the bugs and you stll would have missed some
<SirFunk>
yeah, i agree entirely
<macmartine>
SirFunk: Trust me, I have big production apps with no tests. It sucks
<SirFunk>
haha
_veer has quit [Read error: Connection reset by peer]
<SirFunk>
know any good tutorials that say.. build an entire (blog|twitter clone|whatever) with tdd?
bradhe has joined #ruby
MattRb has quit [Quit: This computer has gone to sleep]
macmartine has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
mneorr has quit [Remote host closed the connection]
TomyLobo has joined #ruby
mneorr has joined #ruby
hamed_r has joined #ruby
wallerdev has quit [Quit: wallerdev]
jonathanwallace has quit [Ping timeout: 244 seconds]
cableray has quit [Quit: cableray]
Rym has quit [Quit: Rym]
mercwithamouth has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
<Quadlex>
ffThat sounds like a meetup idea
jaequery has quit [Quit: Computer has gone to sleep.]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ossareh has quit [Ping timeout: 276 seconds]
<Donkeycoder>
hi all, could use some help on ruby and amqp.. I'm just stuck somewhere and can't figure out how to go an. as soon as a second webuser connects the process dies https://gist.github.com/7ea1a78834419741839c `subscribe': This queue already has default consumer. Please instantiate AMQP::Consumer directly to register additional consumers. (RuntimeError)
lateau has quit [Ping timeout: 252 seconds]
dmiller has quit [Ping timeout: 248 seconds]
a_a_g has quit [Read error: Connection reset by peer]
cableray has joined #ruby
a_a_g has joined #ruby
jaequery has joined #ruby
mahmoudimus has joined #ruby
cdt has joined #ruby
cdt has quit [Client Quit]
ben_ has quit [Quit: ben_]
bradhe has quit [Ping timeout: 248 seconds]
hotovson has joined #ruby
yacks has quit [Ping timeout: 265 seconds]
apeiros_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
DatumDrop has joined #ruby
Umren has joined #ruby
arietis has joined #ruby
vlad_starkov has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
browndawg has quit [Quit: Leaving.]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
apeiros_ has quit [Ping timeout: 272 seconds]
browndawg has joined #ruby
nari has joined #ruby
DatumDrop has quit [Ping timeout: 276 seconds]
x82_nicole has quit [Quit: Computer has gone to sleep.]
coderhut has quit [Ping timeout: 245 seconds]
hbpoison_ has quit [Ping timeout: 256 seconds]
Playground has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
sporkbomb has quit [Read error: Connection reset by peer]
sporkbomb has joined #ruby
dmiller has joined #ruby
hbpoison has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
bradhe has joined #ruby
a_a_g has joined #ruby
karasawa has quit [Ping timeout: 252 seconds]
subbyyy has quit [Ping timeout: 255 seconds]
dmiller has quit [Ping timeout: 244 seconds]
crazedpsyc has quit [Ping timeout: 265 seconds]
crazedpsyc has joined #ruby
hamed_r has quit [Ping timeout: 244 seconds]
cheez0r has quit [Ping timeout: 240 seconds]
buibex has joined #ruby
robert__ has joined #ruby
Fuzai has joined #ruby
<Fuzai>
b
cheez0r has joined #ruby
robert_ has quit [Ping timeout: 245 seconds]
Zolo has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Nisstyre-laptop has quit [Quit: Leaving]
blazes816 has quit [Quit: blazes816]
apeiros_ has joined #ruby
fyolnish has joined #ruby
reinaldob has joined #ruby
hamed_r has joined #ruby
DatumDrop has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
jaequery has quit [Quit: Computer has gone to sleep.]
<Fuzai>
Is there anything in ruby like the C variable++ convention ( example counter++; )?
<ryanf>
fuzai: no, just += 1
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
<Fuzai>
ok cool thank you
<Fuzai>
thats still shorter then var=var+1
thufir_ has left #ruby [#ruby]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
reinaldob has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
hbpoison has quit [Ping timeout: 264 seconds]
a_a_g has joined #ruby
TomyLobo has quit [Quit: Standby mode...]
apeiros_ has quit [Ping timeout: 252 seconds]
saschagehlich has joined #ruby
DatumDrop has quit [Ping timeout: 265 seconds]
karasawa has joined #ruby
slainer68 has joined #ruby
retro|cz has joined #ruby
jonathanwallace has joined #ruby
emergion has joined #ruby
Nss has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Vert has joined #ruby
slainer68 has quit [Ping timeout: 276 seconds]
browndawg has left #ruby [#ruby]
aaronmacy has joined #ruby
Jessykinz has quit []
browndawg has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
vilu has quit [Quit: leaving]
Playground has quit [Ping timeout: 255 seconds]
jonathanwallace has quit [Ping timeout: 264 seconds]
r0f0 has quit [Quit: Leaving]
Jackneill has joined #ruby
hamed_r has quit [Ping timeout: 272 seconds]
rakuN has joined #ruby
bradhe has joined #ruby
danneu has quit [Ping timeout: 252 seconds]
Zolo has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
hbpoison has joined #ruby
a_a_g has joined #ruby
lele has joined #ruby
generalissimo has quit [Remote host closed the connection]
nomenkun_ has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Spooner has joined #ruby
hamed_r has joined #ruby
tungd has joined #ruby
apeiros_ has joined #ruby
tungd has quit [Client Quit]
tungd has joined #ruby
tungd has quit [Client Quit]
DatumDrop has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
greenarrow has joined #ruby
daniel_- has joined #ruby
dmiller has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
atmosx has joined #ruby
swex has joined #ruby
swex_ has quit [Ping timeout: 244 seconds]
<atmosx>
good morning
apeiros_ has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 264 seconds]
dmiller has quit [Ping timeout: 244 seconds]
DatumDrop has quit [Ping timeout: 244 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
jonathanwallace has joined #ruby
main has joined #ruby
Zolo has joined #ruby
danneu has joined #ruby
adambeynon has joined #ruby
itsdavem has joined #ruby
osaut has joined #ruby
_hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
_hemanth_ has joined #ruby
hbpoison has joined #ruby
LouisGB has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
osaut has left #ruby [#ruby]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has quit [Read error: Connection reset by peer]
generalissimo has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
LouisGB has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Richmond has quit [Quit: Leaving]
<shevy>
hey atmosx my greek brother
a_a_g has quit [Read error: Connection reset by peer]
<atmosx>
How's life shevy ?
a_a_g has joined #ruby
<shevy>
I am confused, I have so many things to do, and am not sure where to start
Donkeycoder has quit [Quit: Computer has gone to sleep.]
pskosinski has joined #ruby
<atmosx>
shevy: I'm studying the prior biochemistry exams.
workmad3 has joined #ruby
<atmosx>
good things, microbiolgy, biochemistry and molecular are so closely related.
<atmosx>
s/things/thing
yacks has joined #ruby
tungd has joined #ruby
<shevy>
ah
LouisGB has quit [Ping timeout: 244 seconds]
<shevy>
yeah
<shevy>
is it a multiple choice exam? or one where you have to write down lots of things for each question
<atmosx>
you have to write down too many things. But almost 40% of the questions I know from molecular, at least in last years exam.
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
<atmosx>
but I think these questions will be the same, she'll change the more detailed ones.
<atmosx>
what are you doing anyway? Studying, programming or both?
<shevy>
that sounds good
Playground has joined #ruby
bradhe has joined #ruby
<robert__>
shevy :D
<shevy>
atmosx right now - have to fix 8 broken .mp3 files. have to look at what video files I lost (one hdd crashed on me). have to work through 3 biochemistry .pdf files, one anorganic chemistry. have to work through an old file with reallife quotes from some friends and turn this into a .pdf. have to understand how acoc.rb colourizes stdin-input
apeiros_ has joined #ruby
snearch has joined #ruby
<robert__>
it colorizes stdin? wow
<atmosx>
shevy: oh cool :-P maybe you should start aytime soon then haha
<shevy>
robert__ hmm well
<shevy>
it does something which I will need for a project
<shevy>
the code is odd though, I dont quite understand it yet
<robert__>
ah.
<robert__>
and grr
robert__ is now known as robert_
robert_ has quit [Changing host]
robert_ has joined #ruby
<shevy>
atmosx haha yeah... that list isn't finished either. I also have to work through two medium-sized science books... and the faster I am, the better, because more work waits the coming week :(
<robert_>
stupid connection
<atmosx>
shevy: good luck with that! :-p
<robert_>
shevy: aha, I see. I'm doing a CSV export from databases. Fun stuff, huh?
<shevy>
sounds simpler hehe
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
akemrir has joined #ruby
generalissimo has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
aaronmacy has quit [Quit: Leaving.]
daniel_- has quit [Ping timeout: 272 seconds]
<robert_>
shevy: I have to map fields in the database to fields in my CSV document. :p
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
pyro111 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 276 seconds]
DatumDrop has quit [Ping timeout: 248 seconds]
grw7 has joined #ruby
shtirlic has joined #ruby
<shevy>
sounds boring
<shevy>
:)
<grw7>
hey ;p have a quick question if you define a method with &block as a parameter, when you pass a block to the method does it automatically get converted to a proc?
jonathanwallace has joined #ruby
<grw7>
or perhaps a better thing to ask is, what's happening behind the scenes?
serhart has quit [Quit: Leaving.]
hotovson has quit [Remote host closed the connection]
bluOxigen has joined #ruby
ner0x has joined #ruby
a_a_g has quit [Quit: Leaving.]
nomenkun has joined #ruby
<robert_>
shevy: but the columns that the data goes in are all over the place x.x
bradhe has quit [Ping timeout: 260 seconds]
<shevy>
grw7 not sure... perhaps these objects have a #to_proc method?
<shevy>
grw7 what I think is, is that all those &foo objects can respond to .call
mdw has quit [Quit: [self sleep]]
Dann1 has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
akemrir has joined #ruby
jonathanwallace has quit [Ping timeout: 244 seconds]
cableray has quit [Quit: cableray]
a_a_g has joined #ruby
<grw7>
shevy: but a block isn't an object ;p
daniel_- has joined #ruby
<shevy>
grw7 why not
<grw7>
shevy: performance reasons apparently
<shevy>
def foo; result = yield if block_given?; puts result.class; end; foo { 'hi' } # => "String"
<shevy>
foo { 5 } # => "Fixnum"
<grw7>
shevy: that's what the block is returning, not the block itself
<apeiros_>
grw7: yes, when you define a method with a &block param, the block gets converted
<apeiros_>
grw7: and yes, that comes with a performance penalty
<apeiros_>
grw7: so if you just yield (or block.call) within your method, you shouldn't use &block and block.call, you should use plain yield
nomenkun has quit [Ping timeout: 272 seconds]
<apeiros_>
grw7: however, if you pass the block on, e.g. `def each; @foo.each do |x| yield x end; end`, then &block is more efficient: `def each(&block); @foo.each(█ end`
<grw7>
apeiros_: so if i go some_method_that_accepts_a_block(&some_lambda) then it's actually converting the lambda to a block, and then the block to a lambda again?
<apeiros_>
grw7: you need to distinguish between calling side and receiving side
<apeiros_>
when you call a method with foo(&some_obj), then the opposite happens as what I explained above. some_obj is converted to a block.
<apeiros_>
if some_obj is not a Proc, ruby will call some_obj.to_proc first
dmiller has joined #ruby
<grw7>
apeiros_: and then inside the method it converts the block into a proc again?
<apeiros_>
grw7: *only* if you defined it as def foo(&block)
<apeiros_>
if you defined it as `def foo()`, it won't be converted back to proc.
RagingDave has joined #ruby
<grw7>
apeiros_: yeah of course;) so its quite inefficient to pass a &lamda to a method with a &block parameter?
<apeiros_>
if there's no reason for the conversion, yes
<apeiros_>
I don't know how big the penalty is, though. I never measured it.
<grw7>
apeiros_: thank you ;)
brianpWins has quit [Quit: brianpWins]
xAndy is now known as xandy
emocakes has joined #ruby
<grw7>
apeiros_: so in the case of def x(&b); Proc.new(&b).call; its also doing a double conversion?
dmiller has quit [Ping timeout: 255 seconds]
<apeiros_>
totally uselessly so, yes. just b.call.
karasawa has quit [Ping timeout: 264 seconds]
hbpoison has quit [Ping timeout: 244 seconds]
<apeiros_>
and if you just b.call, `def x; yield; end` would be much more efficient.
<grw7>
apeiros_: was reading a blog post where the guy clearly has it wrong then. lol
<grw7>
apeiros_: noted ;)
karasawa has joined #ruby
<apeiros_>
sadly, that's the state of things usually :(
a_a_g has quit [Read error: Connection reset by peer]
Umren has quit [Ping timeout: 248 seconds]
<grw7>
apeiros_: though maybe he comes from a c background, so he is assuming that a reference to the block is being passed in
<grw7>
;.
<grw7>
;p
naquad has quit [Ping timeout: 260 seconds]
a_a_g has joined #ruby
<apeiros_>
no idea. I never know why people are ignorant of things, even more so if they're supposed to know… (not just IT)
<shevy>
I know everything
<grw7>
indeed... probably not questioning enough
DatumDrop has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
bluOxigen has quit [Ping timeout: 264 seconds]
<robert_>
shevy: I have to build a CSV document out of a database table and a list of file headers, and everything must be correct.
<robert_>
lol
a_a_g has joined #ruby
<shevy>
robert_ I see this gets to your head a lot :D
gyre008 has joined #ruby
<shevy>
I lately had to output something, in a table format
<shevy>
I built one object doing that :\
Spami has quit [Quit: This computer has gone to sleep]
<shevy>
a 4x4 table output
<robert_>
oh boy
<shevy>
how would you design a class for that actually? an array with 4x4 entries, one for a cell?
x82_nicole has quit [Quit: Computer has gone to sleep.]
<susuna>
hi guys, I'm writing some script that uses method "open" from open-uri. I'm running on windows, and have a local proxy server(fiddler). How can I make traffic generated from "open" to go through this proxy ? I want this for debugging purposes, thank you!
<atmosx>
in order to avoid making them install gems etc. manually
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
horofox has quit [Quit: horofox]
shtirlic has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
sn0wb1rd has quit [Quit: sn0wb1rd]
bbunny has joined #ruby
shtirlic has joined #ruby
a_a_g has joined #ruby
<shevy>
hmm
a_a_g has quit [Read error: Connection reset by peer]
shtirlic has quit [Remote host closed the connection]
a_a_g has joined #ruby
<shevy>
you mean
<shevy>
'ya2yaml' and require 'nokogiri' right?
<shevy>
thing is, they need to be somewhere where ruby can find it
hbpoison has quit [Ping timeout: 264 seconds]
<shevy>
one crappy solution could be to bundle both in your gem
solidresolve has quit [Remote host closed the connection]
<atmosx>
ehm, I don't have a gem
<atmosx>
you mean create a gem a bundle everything in
<atmosx>
and let them just do… "gen install blah blah"
lateau has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
<danneu>
give them a Gemfile.lock?
robotmay has quit [Read error: Connection reset by peer]
robotmay has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
tenmilestereo has joined #ruby
a_a_g has joined #ruby
DatumDrop has joined #ruby
horofox has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
daniel_- has joined #ruby
robert__ is now known as robert_
robert_ has quit [Changing host]
robert_ has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DrCode has quit [Remote host closed the connection]
<shevy>
atmosx well you need to distribute all code that you want your users to make use of
<atmosx>
yeap
nkts has joined #ruby
<shevy>
so you probably have to distribution a version of nokogiri as well in your project
<shevy>
*to distribute
<atmosx>
yeah you're right.
<shevy>
hmmm
<Dann1>
Using Nokogiri, how do I check, say, a meta description
<shevy>
most of the gems I know are only one-project
<Dann1>
And check if there is a meta description in the first place
<shevy>
atmosx you want to let people use "gem" to install your stuff?
DatumDrop has quit [Ping timeout: 248 seconds]
<atmosx>
shevy: no idea
<shevy>
hehe
<shevy>
ah
sie has quit [Ping timeout: 256 seconds]
<atmosx>
these are linux users, so they are accustomed to installing/configuring etc. But I'ld like to make it as easy as it gets for obvious reasons.
<shevy>
well, atmosx, what way do you envision for those users to install your project?
dogweather has quit [Remote host closed the connection]
<shevy>
ok, for all users
<shevy>
gimme one way
<atmosx>
I just want them to run my script :-P in their crontab to help me gather data.
<atmosx>
I guess a bundler would be good.
zph has joined #ruby
<atmosx>
just ruby in the system and bundle install
Targen has quit [Read error: Operation timed out]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
xemu has joined #ruby
<danneu>
atmosx: haha i submitted pull request for fun :)
<danneu>
feel free to close it
<danneu>
and delete forever
jonathanwallace has joined #ruby
<atmosx>
danneu: no worries, if you can find a way to upload without curl, give me a pull request :-P
<danneu>
oo
<danneu>
lemme look
hamed_r has quit [Ping timeout: 272 seconds]
lateau has quit [Remote host closed the connection]
<ViPi>
I was wondering, is there any good+free ruby VM that support native threads?
<danneu>
ViPi: beyond jruby and rubinius?
<ViPi>
I know jruby does the job and is quite efficient but you still need java
<ViPi>
rubinius
<ViPi>
mmmh
<ViPi>
let me see ;) thx
browndawg has quit [Quit: Leaving.]
<danneu>
ViPi: got rvm? `rvm install rbx`
<ViPi>
thx i'll look into that
<ViPi>
I actually gave up ruby because of native threads in the standard vm
blaxter has joined #ruby
<danneu>
ViPi: what's your use case?
<ViPi>
math
blaxter is now known as dumdedum
<danneu>
yeah, i think that's fair
Nss has quit [Read error: Connection reset by peer]
<ViPi>
simulation etc....
slainer68 has joined #ruby
<ViPi>
I like ruby for prototyping but sometines its just too slow
lateau has joined #ruby
<danneu>
ViPi: i dont have much experience needing that kind of performance. what did you use instead?
<ViPi>
R amd Matlab
<ViPi>
or Java
<danneu>
dang, ruby had to compete against r and matlab, eh :P
<ViPi>
haha I love ruby syntax
jonathanwallace has quit [Ping timeout: 248 seconds]
<danneu>
ViPi: jruby seems to tuck java away pretty nicely.
<ViPi>
if it had the power of r and matlab it'll be perfect
<ViPi>
yeah
<ViPi>
I played with it too
<danneu>
ViPi: i would look into what the rest of the ruby community does about your requirements.
horofox has quit [Quit: horofox]
Neomex has joined #ruby
<ViPi>
I use a lot of matrices
dumdedum has quit [Quit: foo]
blaxter has joined #ruby
a7x has joined #ruby
horofox has joined #ruby
<ViPi>
so kind of heavy calculus sometimes
daniel_- has quit [Ping timeout: 264 seconds]
a7x has left #ruby [#ruby]
vlad_sta_ has quit [Remote host closed the connection]
<ViPi>
basically im looking for ruby syntax and objects + native threads and easy manipulation of matrices (mat[3,] to get the 3rd row, mat[,4:5] to extract the 4th to 5th column, apply and sapply R functions, etc...)
<ViPi>
and if possible a good math and stat library ;)
<danneu>
ViPi: ever look at scala?
<ViPi>
nope
<ViPi>
im looking now
<ViPi>
:)
hamed_r has joined #ruby
blaxter is now known as dumdedum
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
<danneu>
atmosx: can you gist a sample howdb_words.yml so i can see what the data looks like?
<atmosx>
sure
xandy is now known as xAndy
<ViPi>
Note in particular the syntactic differences shown by this code:
robotmay has quit [Remote host closed the connection]
a_a_g has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
a_a_g has joined #ruby
coderhut has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
reppard has joined #ruby
hamed_r has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
ale`` has joined #ruby
DatumDrop has joined #ruby
a_a_g has joined #ruby
ale`` has quit [Remote host closed the connection]
nari has quit [Ping timeout: 260 seconds]
ale` has joined #ruby
jds_ has joined #ruby
tommyvyo has joined #ruby
PragCypher has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
arietis has joined #ruby
robotmay has joined #ruby
WilfredTheGreat_ has joined #ruby
freeayu has quit [Remote host closed the connection]
DatumDrop has quit [Ping timeout: 252 seconds]
ViPi has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
WilfredTheGreat has quit [Ping timeout: 272 seconds]
linoj has joined #ruby
Mch1 is now known as Mchl
reppard has quit [Ping timeout: 276 seconds]
serhart has joined #ruby
razibog has joined #ruby
jonathanwallace has joined #ruby
robotmay has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
emmanuelux has joined #ruby
nathancahill has joined #ruby
jonathanwallace has quit [Ping timeout: 256 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
main has quit [Remote host closed the connection]
saschagehlich has quit [Quit: saschagehlich]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
dmiller has joined #ruby
postmodern has quit [Quit: Leaving]
a_a_g has quit [Read error: Connection reset by peer]
buibex has joined #ruby
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
a_a_g has joined #ruby
horofox has quit [Quit: horofox]
Spami has quit [Quit: This computer has gone to sleep]
dmiller has quit [Ping timeout: 252 seconds]
cha1tanya has quit [Ping timeout: 248 seconds]
a_a_g has quit [Read error: Connection reset by peer]
Spami has joined #ruby
a_a_g has joined #ruby
subbyyy has joined #ruby
pyro111 has joined #ruby
jds_ has quit [Remote host closed the connection]
DatumDrop has joined #ruby
horofox has joined #ruby
jds_ has joined #ruby
horofox has quit [Client Quit]
bradhe has quit [Ping timeout: 260 seconds]
buibex has quit [Ping timeout: 264 seconds]
NsOmNiAc has quit [Quit: Leaving]
cha1tanya has joined #ruby
Playground has joined #ruby
delinquentme has joined #ruby
hiroyuki has quit [Remote host closed the connection]
<delinquentme>
how to do a map on only the top level elements on a multi-dim array?
karasawa has quit [Ping timeout: 256 seconds]
<Spooner>
delinquentme, That is how map works already. You need to work harder to map deeper things.
colonolGron has joined #ruby
<colonolGron>
hello
karasawa has joined #ruby
ebouchut has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
a_a_g has quit [Read error: Connection reset by peer]
Jackneill has quit [Remote host closed the connection]
robotmay has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
a_a_g has joined #ruby
DatumDrop has quit [Ping timeout: 246 seconds]
Guest25886 has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
a_a_g has joined #ruby
reppard has joined #ruby
<shevy>
emocakes! cakes ought to be silent anyway!
jaywastaken has joined #ruby
sie has joined #ruby
sie has joined #ruby
sie has quit [Changing host]
<pskosinski>
wrong number of arguments(1 for 0) in to_s. For code: content = content.to_s.split(/\./).each where content = IPAddr.new
<pskosinski>
what is wrong?
klip has quit [Ping timeout: 276 seconds]
<pskosinski>
it's in a sinatra app, if it can help
<pskosinski>
In doc there isto_s for IPAddr and is not taking argument… And I don't see me passing any argument...
ale` has quit [Ping timeout: 276 seconds]
banisterfiend has quit [Remote host closed the connection]
<pskosinski>
ah, nvm
Playground has quit [Ping timeout: 264 seconds]
<pskosinski>
I was looking at wrobg to_str...
hotovson_ has joined #ruby
reppard has quit [Ping timeout: 264 seconds]
fram has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
<fram>
hi
a_a_g has joined #ruby
<fram>
I heard that function calls are rather expansive in Ruby, any way to inline a function call as we would in C?
<fram>
Or do I have to copy / paste..
<Spooner>
fram, Nope. But equally, unless your code isn't fast enough, method calls are plenty fast enough in Ruby ;)
a_a_g has quit [Read error: Connection reset by peer]
<fram>
yes I know but it's for a highly critical region
a_a_g has joined #ruby
<Banistergalaxy>
Fram if this is an issue you're using the wrong language
robotmay has quit [Remote host closed the connection]
<Spooner>
There are likely other bottlenecks, fram.
hamed_r has quit [Quit: Leaving]
<fram>
Yes I'm hunting them down :) But I noticed I gain a few 100 ms everytime I remove a function call frow my loop ;)
<fram>
Banistergalaxy: not really an issue, I'm trying to optimize mostly for fun
neku has joined #ruby
<Spooner>
fram, You won't find any functions in Ruby ;) Worrying about the time it takes to call methods isalmost certainly looking in the wrong place.
<Spooner>
That is, the actual calling of those methods, rather than what the methods actually do.
<fram>
I'm just pissed because the standard library parses CSVs 4 times faster than my lib ;)
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
<Spooner>
Yeah, the standard library probably uses C if it has any sense ;)
<fram>
Nope it uses Regexes, but I guess regexes use C
matthias_ has joined #ruby
<fram>
i'm 4 times slower but I have 10 times less code though
<Spooner>
Well, at some point everything uses C, but I wouldn't count it in this case.
bradhe has joined #ruby
<Spooner>
fram terse code isn't faster.
<fram>
I know
<fram>
Yes everything boils down to C but regexes is something heavy so I consider it cheating in this case :)
<Spooner>
You consider regexps cheating? Why exactly are you drawn to Ruby? :D
colonolGron has quit [Ping timeout: 248 seconds]
<Spooner>
fram My CSV code would be more terse and quicker than yours. It would start off: require 'csv'
matthias_ has quit [Remote host closed the connection]
<fram>
yeah yeah I know don't reinvent the wheel
matthias_ has joined #ruby
matthias_ is now known as matti_
matti_ is now known as mgeorgi
<Spooner>
It is likely you can't outperform the standard library without going to C then.
<fram>
seems so
<yxhuvud>
well, or without using regexes yourself.
sewa has joined #ruby
<Spooner>
Yeah, avoiding regexps is definitely a way to make something a lot slower.
colonolGron has joined #ruby
sayan has joined #ruby
WilfredTheGreat has joined #ruby
<fram>
yes and no, I'm using a very simple DFA, probably much simpler than the ones embedded in the regexes, but I'm not doing in C...
hiroyuki has joined #ruby
<fram>
I've got 5 states, one loop
arietis has joined #ruby
WilfredTheGreat_ has quit [Ping timeout: 240 seconds]
<Spooner>
Good for you.
DatumDrop has joined #ruby
sie has quit [Ping timeout: 255 seconds]
jds_ has quit [Remote host closed the connection]
jds_ has joined #ruby
<fram>
Hell I'm rewriting it in C, I need to see it through ;)
cr3 has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
hbpoison has quit [Ping timeout: 255 seconds]
jaywastaken has quit [Remote host closed the connection]
<cr3>
when I run rake spec in the root of a project, should I epxect dependencies to be pulled in automatically?
a_a_g has joined #ruby
jds___ has joined #ruby
jds___ has quit [Remote host closed the connection]
jds_ has quit [Read error: Connection reset by peer]
eldariof has joined #ruby
<Spooner>
No, the _spec files should require what they need, often by requiring a common helper file that requires what is needed.
jds_ has joined #ruby
nomenkun has joined #ruby
joofsh has joined #ruby
bluOxigen has quit [Ping timeout: 248 seconds]
<cr3>
Spooner: oh, I meant dependencies on external gems
bluOxigen has joined #ruby
solidoodlesuppor has joined #ruby
DatumDrop has quit [Ping timeout: 260 seconds]
<Spooner>
cr3, All rake spec does is run the spec task. What it does it entirely dependent on your rakefile and in the _spec files.
kevinfagan has quit [Remote host closed the connection]
reppard has joined #ruby
jds_ has quit [Ping timeout: 255 seconds]
<cr3>
Spooner: I need to spend more time looking rakefiles, which shouldn't be too bad considering it's just ruby
<Spooner>
It is Ruby all the way down (until you hit the bedrock of C :D).
<horrror>
i ran a ruby file through shell but it went in this infinite loop. is there a way to break that certain loop and continue coding inside the shell using the code written inside the file?
<Spooner>
Hanmac, Not as exciting as binding.eval("binding").eval("self")
DatumDrop has joined #ruby
<Spooner>
horrror, Not sure exactly what you mean, but you might look at pry and/or pry-debugger.
emocakes has quit [Quit: emocakes]
akl_ has joined #ruby
<Hanmac>
Spooner: its useful on TOPLEVEL_BINDING
<horrror>
Spooner: The file is already running regularly (ruby file.rb - in cli) . The question is if is there a way that I can stop the current loop
<horrror>
and move on
razibog has quit [Ping timeout: 252 seconds]
<horrror>
bcd CTRL+C will stop the entire proccess
<Spooner>
Well, you can set breakpoints in a debugger or catch the SIGINT signal in your code. You can't just magically make code work or skip around externally though ;)
a_a_g has quit [Read error: Connection reset by peer]
adambeynon has joined #ruby
F1skr has joined #ruby
a_a_g has joined #ruby
<horrror>
damn :(
<horrror>
I just processed a huge 8gb rdf file and a few lines to end it stopped
<banisterfiend>
Hanmac: pry does things with Binding objects that will make your toes curl
horrror has quit [Quit: horrror]
<Spooner>
You'd need to have started it under a debugger or put code in it to help with such situations. Maybe someone else knows of magic though...
ViPi has joined #ruby
<cr3>
what's the difference between keeping dependencies in *.gemspec or in Gemfile?
<Spooner>
gemspecs are for if you are developing a gem. Gemfiles are for actual applications.
BizarreCake has joined #ruby
<cr3>
Spooner: so, if I don't intend to upload a project onto rubygems or a custom gem repository, then I should only maintain a Gemfile, right?
itsdavem has joined #ruby
DatumDrop has quit [Ping timeout: 264 seconds]
<Spooner>
Yep.
<cr3>
Spooner: thanks!
bradhe has joined #ruby
<Spooner>
You still use a Gemfile if you are making a gem though. You just tell it to get the dependencies from the gemspec to save replicating it.
mikeycgto has joined #ruby
<cr3>
Spooner: yeah, I just read about that (just have the Gemfile contain gemspec), but it still wasn't clear when to use one, the other, or both
cr3 has quit [Quit: leaving]
Squarepy has quit [Quit: Leaving]
Proshot has joined #ruby
Edward_ has joined #ruby
hackeron has quit [Ping timeout: 246 seconds]
gyre008 has quit [Remote host closed the connection]
jfl0wers has joined #ruby
codebiff has quit [Quit: Leaving]
<Fuzai>
Could anyone familiar with DateTime.now explain to me how to convert that into a more human readable format?
<Fuzai>
ah see i was on the right page at least :)
<ruzu>
yea there's a big strftime block toward the bottom with a lot of info
berserkr has joined #ruby
itsdavem has quit [Remote host closed the connection]
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
b1rkh0ff has joined #ruby
talwas has joined #ruby
<Fuzai>
Yep found it thanks guys :)
<talwas>
Is it possible to encrypt a string with openssl without a initialization vector?
nrt- has quit [Remote host closed the connection]
<Fuzai>
Is there anything like perltidy for ruby?
shtirlic has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
ale` has quit [Remote host closed the connection]
serhart has quit [Ping timeout: 256 seconds]
a_a_g has quit [Read error: Connection reset by peer]
amaya_the has joined #ruby
a_a_g has joined #ruby
<Spooner>
fuzai Yeah, write decent scripts ;)
<Fuzai>
HA
b1rkh0ff has quit [Quit: Leaving]
b1rkh0ff has joined #ruby
nrt- has joined #ruby
shtirlic has quit [Ping timeout: 260 seconds]
<shevy>
hehe
<shevy>
fuzai avoid the ugly stuff
<shevy>
$globals
<shevy>
@@stinkers
<shevy>
and especially the kinky way of coding
<shevy>
oh and 100 procs per class... that style of coding makes me want to stab people
<Spooner>
shevy That isn't something that has anything to do with tidy code. "tidy" is indentation and layout, since an automated script isn't going to rewrite your logic for you :D
<Fuzai>
i was looking for something that just formatted white space into something "consistant"
<shevy>
and the meta-meta-meta-eval faction
<shevy>
ohhh that is easy then
<shevy>
white space?
<Fuzai>
tabs and what not
<shevy>
!!!
<shevy>
ARE YOU A TABBER fuzai!!!
<Fuzai>
I plead the 5th?
<Fuzai>
:)
<shevy>
I shant speak to you no more!
DatumDrop has joined #ruby
<Spooner>
Yeah, just follow the style guide and you never need a tidy. The only possible excuse for one is if you are forced to work on legacy code written by morons and need to make it not hurt to look at :D
<shevy>
the most evil of them all is the meta-meta-meta-eval-looping-tab faction
<shevy>
did you make a dirty... now you need a tidy
<Spooner>
But if they are that daft, it will probably be logically and structurally unreadable anyway.
<Fuzai>
it's more from me copy and pasting code around
<Fuzai>
i've went though it once and cleaned it up
<shevy>
well, legacy code, I find it very difficult to understand some code written by others
<Fuzai>
i was just opening there was an automated process for it
<shevy>
fuzai I'd wish there was one, I do the same with old scripts written by me :(
<Fuzai>
hoping geez i can't type this morning at all
<Spooner>
shevy I've seen _your_ legacy code earlier. It would make Chuck Norris cry!
<shevy>
yeah
<shevy>
but I wrote better code too
<shevy>
the thing just is, it seems as if my brain is sleeping, unless it can build from zero again
<shevy>
it's like you build a house from basic blocks, you can add new blocks of different shape lateron but the house will look very funny...
bradhe has quit [Ping timeout: 255 seconds]
r3nrut has joined #ruby
<shevy>
so then you take a sledgehammer AND TEAR THE AWFUL STUFF ALL DOWN
adambeynon has quit [Quit: Computer has gone to sleep.]
<shevy>
then you can go for a smoke, then you start to rebuild
<r3nrut>
talking about DSL's again?
viario has joined #ruby
<pskosinski>
Why a user doesn't have access to an installed gem?
dmiller has joined #ruby
jds_ has joined #ruby
cheez0r has quit [Ping timeout: 264 seconds]
Mon_Ouie has quit [Ping timeout: 272 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
a_a_g has quit [Read error: Connection reset by peer]
<pskosinski>
In case of Ruby 1.8…
<talwas>
Is it possible to encrypt a string with openssl without a initialization vector?
a_a_g has quit [Read error: Connection reset by peer]
<pskosinski>
require 'openssl/digest' before…
DatumDrop has quit [Ping timeout: 265 seconds]
a_a_g has joined #ruby
<talwas>
pskosinski: that doesn't look like encryption at all that would create a MD5 hash of my string...I guess?
dmiller has quit [Ping timeout: 264 seconds]
jds_ has quit [Ping timeout: 260 seconds]
<pskosinski>
yeah…
<Spooner>
pskosinski, You need to manually: require 'rubygems' -- in 1.8
ale` has joined #ruby
RagingDave has joined #ruby
orluke has joined #ruby
andrewhl has joined #ruby
talwas has quit [Quit: Page closed]
apeiros has joined #ruby
<pskosinski>
Spooner: Doesn't help. Still: `gem_original_require': no such file to load -- sinatra (LoadError)
<ale`>
hi, I'm fixing an old rspec formatter I wrote around 8 months ago. I used to use this method https://gist.github.com/4524879 to calculate the example nesting, but it looks like it is not working correctly anymore, and for some reason I am getting huge numbers out of it. Any clue on how to fix this?
<pskosinski>
When running from root works. When running from different user: no.
gyre007 has joined #ruby
<Spooner>
Right, then it probably means that the way Ruby is installed and/or its gems are fubar.
pyro111 has quit [Quit: Leaving]
<Spooner>
Are they using "sudo gem install" but Ruby is installed via rvm or similar to the user - this would explain it.
apeiros_ has quit [Read error: Operation timed out]
tvw has joined #ruby
joofsh has quit [Remote host closed the connection]
<pskosinski>
Hm… so I have to install locally. Ok, thanks. ッ
<Spooner>
You only install gems with sudo if you've installed ruby as root.
<Spooner>
Common mistake though, since lots of docs suggest "sudo gem install", which is correct if you used apt-get ruby or similar.
<Spooner>
Aaanyway.
<pskosinski>
Well… I was installing Ruby as root… and gem too.
<pskosinski>
"but Ruby is installed via rvm or similar to the user" I understood that gem, not Ruby, sorry…
browndawg has quit [Quit: Leaving.]
browndawg has joined #ruby
<pskosinski>
I was installing both from root, in Debian Squeeze, ruby from apt-get, sinatra from gem install, and on root works…
randym has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
<pskosinski>
I see that sinatra is in Debian repo, so maybe I will try to install it from there…
akl_ has quit [Remote host closed the connection]
<pskosinski>
hm… but I did same on my pc on Debian 7 and works. :( on vps with Debian 6 doesn't, well, will try…
* Spooner
shrugs.
cam` has quit [Remote host closed the connection]
<Spooner>
I always use rvm/rbenv.
browndawg has quit [Max SendQ exceeded]
karnowski has quit [Remote host closed the connection]
<Spooner>
Installed as the user, not root.
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<pskosinski>
I hear about that thing first time, will read ^^
browndawg has joined #ruby
<Spooner>
Its main advantage is that it allows you to maintain multiple versions of ruby and switch, which is critical for a dev; less so for clients.
reppard has joined #ruby
a_a_g has quit [Read error: Connection reset by peer]
tvw has quit [Read error: Connection reset by peer]
v0n has joined #ruby
tvw has joined #ruby
a_a_g has joined #ruby
heyitsdave has joined #ruby
bradhe has joined #ruby
nathancahill has quit [Quit: nathancahill]
jonathanwallace has quit [Ping timeout: 276 seconds]
<pskosinski>
what is ms library, it has different name?
<Spooner>
Huh?
<pskosinski>
ruby: No such file or directory -- ms (LoadError)
randym has joined #ruby
amaya_the has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121128204232]]
<pskosinski>
it can't have worse name, even apple would be better
reppard has quit [Ping timeout: 276 seconds]
<pskosinski>
now I am finding only info about ruby in windows when looking for ms
wf2f has quit []
joofsh has joined #ruby
kirun has joined #ruby
serhart has joined #ruby
<Spooner>
No idea. Probably a file in the application. Who knows?
<Spooner>
Not a gem, anyway.
cam` has joined #ruby
karnowski has joined #ruby
cha1tanya has quit [Quit: Leaving]
heyitsdave has quit [Ping timeout: 264 seconds]
BRMatt has joined #ruby
<Fuzai>
I have a string that looks like this "/ls A username with spaces" and i'm trying to remove the "/ls " at the front of the string could someone point me in the right direction? I was using scan and shift to do something similar but i could predict what it was going to look like
buibex has joined #ruby
Iszak has quit []
<Spooner>
fuzai str.sub /\A\/ls /, ''
tomzx has joined #ruby
<Fuzai>
oh nice nice
<Fuzai>
thank yo0u
<Fuzai>
thats exactly what i'm looking for
WilfredTheGreat has quit [Read error: Connection reset by peer]
DatumDrop has joined #ruby
jaequery has joined #ruby
DatumDrop has quit [Read error: Connection reset by peer]
<Spooner>
Or str[0, 4] = '' or any number of other ways.
DatumDrop has joined #ruby
<pskosinski>
If not from a gem, then why I have it when running on root but not when running on diffrent user… My app is same. So it must be in a gem.
DatumDrop has quit [Read error: No route to host]
workmad3 has joined #ruby
Ghostring has joined #ruby
<pskosinski>
Screw it, faster I will make chroot than configure ruby on squeeze. >.>
Ghostring has quit [Client Quit]
reppard has joined #ruby
akl_ has joined #ruby
seich- has quit [Ping timeout: 276 seconds]
berserkr has quit [Ping timeout: 264 seconds]
danneu has quit [Ping timeout: 252 seconds]
Ghostring has joined #ruby
Ghostring has quit [Client Quit]
seich- has joined #ruby
main has joined #ruby
sewa has quit [Remote host closed the connection]
baphled has quit [Ping timeout: 248 seconds]
a_a_g has quit [Read error: Connection reset by peer]
heyitsdave has joined #ruby
a_a_g has joined #ruby
seich- has quit [Ping timeout: 260 seconds]
a_a_g has quit [Read error: Connection reset by peer]
a_a_g has joined #ruby
Guest22367 has joined #ruby
seich- has joined #ruby
pavilionXP has quit [Read error: Connection timed out]
pavilionXP has joined #ruby
r3nrut_ has joined #ruby
seich- has quit [Read error: Operation timed out]
jonathanwallace has joined #ruby
PragCypher has quit [Quit: Leaving]
Fretta has joined #ruby
amacgregor_osx has joined #ruby
a_a_g has quit [Client Quit]
seich- has joined #ruby
v0n has quit [Ping timeout: 255 seconds]
MattRb has joined #ruby
slainer68 has quit [Remote host closed the connection]
fyolnish has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
delinquentme has quit [Read error: Connection reset by peer]
krz has joined #ruby
Vainoharhainen has joined #ruby
berserkr has joined #ruby
staafl has joined #ruby
moos3 has joined #ruby
baphled has joined #ruby
sayan has quit [Quit: Leaving]
v0n has joined #ruby
generalissimo has joined #ruby
moos3 has quit [Client Quit]
reppard has quit [Ping timeout: 255 seconds]
staafl has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
ananthakumaran has joined #ruby
dmiller has joined #ruby
ben_ has joined #ruby
squidBits has quit [Quit: squidBits]
[0x1a] has quit [Remote host closed the connection]
mfaeh has quit [Remote host closed the connection]
stevechiagozie has joined #ruby
bricker has quit [Read error: Connection reset by peer]
bricker has joined #ruby
Guest22367 has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
MattRb has joined #ruby
SCommette has quit [Quit: SCommette]
daniel_- has quit [Ping timeout: 240 seconds]
<Fuzai>
is there an easy way with ruby to figure out what the local timezone is for the computer that the code is running on?
<Fuzai>
nm i think i found it
Xeago has quit [Remote host closed the connection]
neersighted has joined #ruby
Nisstyre-laptop has joined #ruby
linoge has joined #ruby
<linoge>
Hi, suppose I want to do a simple plot app (got a few data that I want to graph in a cartesian fashion), is this archievable with the Shoes toolkit?
cableray has joined #ruby
<linoge>
And, is there any way to "Zoom in" and "out" in it?
<Fuzai>
I dunno about Ruby, but have you looked into the processing language?
<Fuzai>
I used it a month ago to graph stats coming out of an audrino and had wonderful results
jaequery has quit [Quit: Computer has gone to sleep.]
<linoge>
I'll check it, thanks :)
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has joined #ruby
<linoge>
Wow, 163mb
<maxmanders>
Having trouble parsing an ini file using IniParse. The file is the ini-format ~/.awsconfig file used by the newly released AWS-CLI tool. Can anyone recommend an ini file parser Gem?
<linoge>
Another thing, when a program zooms an element,
<linoge>
oh, nvm
<linoge>
found it
<Fuzai>
puts DateTime.now.strftime('%b %e, %Y %I:%M:%S %p %Z') reading the docs they say "%Z - Time zone abbreviation name" but when i run this I get "Jan 13, 2013 09:46:18 AM -08:00" is there a way to convert -8:00 into PST?
DatumDrop has quit [Ping timeout: 240 seconds]
<Fuzai>
etc/timezone says America/Los_Angeles which is PST so i'm not sure what to do other then read that file, but even then it's not saying PST
<Fuzai>
when i run date on the command line it does say PST
neersighted has quit [Quit: neersighted]
neersighted has joined #ruby
<Fuzai>
Sun Jan 13 09:53:55 PST 2013, Maybe it would just be smarter to grab the output of date executed from a shell?
aloshkarev has joined #ruby
blazes816 has joined #ruby
<RubyPanther>
fuzai: google "ruby locale"
<Fuzai>
thank you :)
bradhe has quit [Ping timeout: 264 seconds]
cableray has quit [Quit: cableray]
h4mz1d has joined #ruby
snearch_ has joined #ruby
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
<Fuzai>
Yea so i'm sure someone has a really good reason why this is a really bad idea but `date` seemed to be alot simpler and alot easier to implement
Astralum has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
Astralum has joined #ruby
adambeynon has joined #ruby
rakl has joined #ruby
hackeron has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
osaut has quit [Quit: osaut]
emocakes has joined #ruby
dankest has joined #ruby
workmad3 has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
colonolGron has quit [Ping timeout: 255 seconds]
Xeago has joined #ruby
__DOGBERT__ has joined #ruby
BRMatt has quit [Remote host closed the connection]
<Fuzai>
is there a special way to do string compares with an if statement? if variable == 'on
<Fuzai>
if variable == 'on' doesn't seem to be doing it
blueOxigen has quit [Ping timeout: 264 seconds]
__DOGBERT__ has quit [Client Quit]
v0n has quit [Ping timeout: 276 seconds]
<yfeldblum>
fuzai, no, that's the right way
buibex has quit [Remote host closed the connection]
jaequery has quit [Quit: Computer has gone to sleep.]
<Fuzai>
hmmmm
ebouchut has quit [Quit: This computer has gone to sleep]
generalissimo has quit [Remote host closed the connection]
colonolGron has joined #ruby
bluOxigen has joined #ruby
coderhut has joined #ruby
bradhe has joined #ruby
cjs226 has quit [Ping timeout: 276 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
jaywastaken has quit [Remote host closed the connection]
slainer68 has joined #ruby
picca_ has joined #ruby
afd__ has quit [Ping timeout: 252 seconds]
havenn has joined #ruby
crackfu has joined #ruby
osaut has joined #ruby
WilfredTheGreat_ has joined #ruby
WilfredTheGreat_ has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
jds_ has quit [Remote host closed the connection]
MattRb has quit [Quit: This computer has gone to sleep]
b1rkh0ff has joined #ruby
slainer68 has quit [Ping timeout: 272 seconds]
h4mz1d has joined #ruby
crackfu has quit [Remote host closed the connection]
<Fuzai>
http://pastie.org/5679610 The first client.room.say shows everything that I expect, but the if statements ever execute their code. Can anyone explain why?
<Fuzai>
s/ever/never/
viario has quit [Remote host closed the connection]
<Hanmac>
fuzai do an "pp vote.direction"
<Fuzai>
ok let me try that
MattRb has joined #ruby
scruple has joined #ruby
<havenn>
fuzai: Is the interpolated vote.direction on line 2 working?
Morkel has joined #ruby
jds_ has joined #ruby
<Fuzai>
yes
<Fuzai>
#2 works, nothing past it does
<Fuzai>
it doesn't throw an error or anything
emmanuelux has quit [Quit: emmanuelux]
AtoxIO has quit [Remote host closed the connection]
<Fuzai>
so does pp need a puts infront of it or does it drop it to stdout on its own?
dwu1 has joined #ruby
<heftig>
latter
<Fuzai>
cool
lolcathost has quit [Read error: Connection reset by peer]
pmros has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
<havenn>
fuzai: Ah, "'up'"
<Fuzai>
stupid vote counts
<Fuzai>
i've got the output of it, i'm pastie'ing it nwo
<Fuzai>
What they need to do is dump the whole flash concept
<Quadlex>
Fair enough
<workmad3>
fuzai: it isn't even 'kinda'
<workmad3>
fuzai: it's a flat-out no :)
browndawg has quit [Quit: Leaving.]
<Fuzai>
they have api's that they have open that's where i got the kinda
<workmad3>
yeah, but no source code
<Fuzai>
Anyways it's a really cool site for the most part, the music is usally really good and it's hard to find a bad song when you have five people taking turns on the tables
<havenn>
dnsmasq ftw
mneorr_ has joined #ruby
<workmad3>
allowing access to the data through APIs is good, but in no way related to open source ;)
<workmad3>
and I'm being an annoying sunday-night pedant btw :P
sulaco_ has joined #ruby
KevinSjoberg has joined #ruby
subbyyy_ has joined #ruby
bitZero_1 has joined #ruby
dwu2 has joined #ruby
Fretta_ has joined #ruby
<workmad3>
(and I'm in no way criticising them for not being open-source, just being a pedant about terminology :) )
_dnyy has joined #ruby
TomyLobo has quit [Disconnected by services]
TomyLobo2 has joined #ruby
Morkel_ has joined #ruby
TomyLobo2 is now known as TomyLobo
weeb1e_ has joined #ruby
aloshkarev has quit [Quit: aloshkarev]
<RubyPanther>
I don't think it is pedantic at all, just like 2 not being 3 isn't
reppard has joined #ruby
xAndy| has joined #ruby
tomzx has quit [Quit: tomzx]
jonathanwallace1 has joined #ruby
plu_ has joined #ruby
BizarreCake has quit [Remote host closed the connection]
aapzak_ has joined #ruby
mackinto1h has joined #ruby
kloeri_ has joined #ruby
asuka_ has joined #ruby
Freijo has joined #ruby
graft__ has joined #ruby
justinwe1ss has joined #ruby
<Fuzai>
like i said i wasn't trying to declare them open source or even open source friendly. I just know that the tt-api's started with one of them at tt opening up what they had made for the world to use
brandon has joined #ruby
ejnahc_ has joined #ruby
<ruzu>
but 2 is 2/3 of 3... so it's almost 3 :D
<Fuzai>
and everything is based off that first library when it comes to the api's
brandon is now known as Guest85653
<Xeago>
apeiros: yo
<Fuzai>
Honestly turntable is alot of artists that are way in over their head with a site they bearly understand how to run
<apeiros>
how Xeago
Mon_Ouie has joined #ruby
<Spooner>
class Fixnum; def ==(o); true; end; end; puts 2 == 3 # Don't do this!
<banisterfiend>
Mon_Ouie: 'lut
<Fuzai>
I considered going to work for them as an administrator but I didn't want to move to new york
_class_ has joined #ruby
<apeiros>
*howdy Xeago
<Xeago>
just got stuffed on brusselsprouts with peanutsauce
<Fuzai>
Oh and for the record, this community has been a hell of alot more patient with my questions then just about any other language room
<ruzu>
heh... monkeypatch for true equality for all numbers! egalitarian maths!
<apeiros>
fuzai: your luck it wasn't my trying to help ;-p
a_a_g has joined #ruby
<Fuzai>
HA
<Spooner>
ruzu actually, it works in irb. Breaks shoddy pry though ;)
dmiller has quit [Ping timeout: 244 seconds]
<Fuzai>
and i'm sure that alot of my questions have been simple syntax questions
bluOxigen has quit [Ping timeout: 244 seconds]
<Fuzai>
i understand coding theroy for the most part i'm just really rusty
JoeJulian_ has joined #ruby
<Spooner>
fuzai, Just wait until you get the invoice for tutoring from #ruby
tris- has joined #ruby
<linoge>
It's because ruby makes programmers less violent :P
<Fuzai>
The check is in the mail :)
tenmilestereo[aw has joined #ruby
tenmilestereo has quit [Ping timeout: 272 seconds]
hash| has joined #ruby
<Fuzai>
Now if i could just understand heroku
<Fuzai>
I really want to push this bot over to them but I just dont' get how to shoe horn it in
<Fuzai>
soon enough i guess
dwu1 has quit [*.net *.split]
Morkel has quit [*.net *.split]
b1rkh0ff has quit [*.net *.split]
Fretta has quit [*.net *.split]
jonathanwallace has quit [*.net *.split]
subbyyy has quit [*.net *.split]
mneorr has quit [*.net *.split]
dnyy has quit [*.net *.split]
n1x has quit [*.net *.split]
weeb1e has quit [*.net *.split]
aapzak has quit [*.net *.split]
mackintosh has quit [*.net *.split]
ejnahc has quit [*.net *.split]
graft has quit [*.net *.split]
bitZero__ has quit [*.net *.split]
Fraeon has quit [*.net *.split]
tris has quit [*.net *.split]
swinburnesque81 has quit [*.net *.split]
mikekelly has quit [*.net *.split]
sulaco has quit [*.net *.split]
brandon_ has quit [*.net *.split]
Tarential has quit [*.net *.split]
JoeJulian has quit [*.net *.split]
kloeri has quit [*.net *.split]
matrixise has quit [*.net *.split]
asuka has quit [*.net *.split]
__class__ has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
justinweiss has quit [*.net *.split]
xAndy has quit [*.net *.split]
plu has quit [*.net *.split]
t_hash has quit [*.net *.split]
plu_ is now known as plu
Morkel_ is now known as Morkel
Fretta_ is now known as Fretta
tris- is now known as tris
_class_ is now known as __class__
<Fuzai>
Who ordered the Banana?
<banisterfiend>
fuzai: your mom
Morkel has quit [Quit: Morkel]
<Fuzai>
Awesome, I love your mom jokes, i think people take them way to personal sometimes
<linoge>
lol
matrixise has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
kloeri_ is now known as kloeri
<linoge>
Yeah, my favorite one is "Your mom is so hairy the only language she speaks is wookie"
f03lipe has joined #ruby
<Fuzai>
hahaha
<Spooner>
linoge, But your mom is so lovely, I'm sure she's really nice.
bluOxigen has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
nateberkopec has joined #ruby
<linoge>
lol
snearch has quit [Quit: Verlassend]
ebobby has joined #ruby
mikekelly has joined #ruby
karasawa has quit [Ping timeout: 276 seconds]
r3nrut has quit [Ping timeout: 264 seconds]
<Fuzai>
my mother is not nice or lovely :(
afd__ has joined #ruby
<Fuzai>
but she's also an rpg/400 coder so go figure
<Fuzai>
if i had to write in that language i'd be a bitter bitch too
krz has quit [Quit: krz]
f03lipe has quit [Read error: Connection reset by peer]
<workmad3>
fuzai: you saying that just reminded me that I meant to dig out a cobol compiler for my mother :)
<Fuzai>
hahaha
jds_ has quit [Remote host closed the connection]
<Fuzai>
Does anyone still use that language?
Tarential has joined #ruby
<Fuzai>
Thats like me digging out the old Turbo Pascal compilier
kidoz has quit [Read error: Connection reset by peer]
<Fuzai>
RPG 1959 - 2010
<workmad3>
fuzai: there's still cobol code in the wild, from all reports, and it's more a case of my mum remembering the coding side, bringing it to more recent memory, and then hopefully being able to pick up more modern stuff if she desires
<workmad3>
fuzai: but for recollection purposes, I figure familiarity is good :)
afd__ has quit [Ping timeout: 264 seconds]
<Fuzai>
RPG is one of the few languages created for punched card machines that is still in common use today. This is because the language has evolved considerably over time. It was originally developed by IBM in 1959. The name Report Program Generator was descriptive of the purpose of the language: generation of reports from data files, including matching record and sub-total reports.
<Hanmac>
workmad3 "there's still cobol code in the wild" like there are still living fosiles outside :P
<Spooner>
It may be a crap language, but I'm sure if you are one of the 3 people in the world that can use it, you are in very high demand.
h4mz1d has joined #ruby
bradhe has joined #ruby
<Fuzai>
RPG I think is the programing language of hell
<Fuzai>
most errors are whitespace errors
<Fuzai>
and i remember doing more debugging with a ruler on green bar then anything
<davidokner>
Is there anything for Ruby and VIM that I can download where it is ready to go to see how people use VIM for Ruby programming?
ebobby has quit [Quit: Lost terminal]
swinburnesque81 has joined #ruby
pmros has quit [Quit: Konversation terminated!]
<Fuzai>
i use vim it seems to detect rb and do syntax highlighting without me doing anything to it
workmad3 has quit [Ping timeout: 255 seconds]
Donkeycoder has joined #ruby
yfeldblum has joined #ruby
itsdavem has quit [Remote host closed the connection]
<Donkeycoder>
hi all, could use some help on ruby and amqp.. I'm just stuck somewhere and can't figure out how to go on. as soon as a second webuser connects the process dies https://gist.github.com/7ea1a78834419741839c `subscribe': This queue already has default consumer. Please instantiate AMQP::Consumer directly to register additional consumers. (RuntimeError)
shtirlic has quit [Remote host closed the connection]
graft_ has quit [Ping timeout: 256 seconds]
cr3 has joined #ruby
<cr3>
hi folks, might anyone know how or have an example on how to unit test code that uses net/ssh without having to run an actual ssh server which would make the test brittle :(
itsdavem has quit [Remote host closed the connection]
<cr3>
how can I write a function called "foo" so that I can use it like: foo do |bar| puts "bar: #{bar}" end
<cr3>
I tried just having the function "foo" return a value, but ruby doesn't seem to work that way
<arturaz>
def foo; yield 3; end
<Spooner>
You yield to a block.
<arturaz>
or
seanwash has joined #ruby
<reppard>
def foo &block
<arturaz>
def foo(&block); block.call(3); end
<cr3>
interesting, thanks folks!
colonolGron has joined #ruby
mactkg_znc has joined #ruby
mactkg_znc has left #ruby [#ruby]
<arturaz>
guys. fun OT of the day: can any of you elaborate on in what country you live and how much do you pay for your flat rent + utilities (and the size of it, if possible?) :)
seanwash has quit [Client Quit]
<reppard>
usa, state: georgia, 785 for a 3 bed room house
seanwash has joined #ruby
<Spooner>
I live in an 18-bedroom house in the Hamptons and pay just over $14 a year for it.
<cr3>
is there a preference for the ordering of require lines for core modules, other modules installed with rubygems and custom modules part of the project?
ViPi has quit [Quit: Computer has gone to sleep.]
KevinSjoberg has joined #ruby
zph has joined #ruby
jaywastaken has quit [Remote host closed the connection]
a_a_g has quit [Client Quit]
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
afd__ has quit [Ping timeout: 264 seconds]
<Xeago>
cr3: yes, usually in that order
jaequery has joined #ruby
<cr3>
Xeago: thanks!
eduardordm has joined #ruby
bradhe has joined #ruby
ebouchut has joined #ruby
Chryson has joined #ruby
yacks has quit [Remote host closed the connection]
eduardordm has quit [Remote host closed the connection]
tommyvyo_ has joined #ruby
jds_ has joined #ruby
osaut has quit [Quit: osaut]
osaut has joined #ruby
digitalcakestudi has joined #ruby
robotmay has quit [Remote host closed the connection]
Playground has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
tomzx has quit [Disconnected by services]
inokenty has quit [Remote host closed the connection]
jaywastaken has quit [Remote host closed the connection]
f03lipe has quit [Quit: Leaving]
Goles has quit [Quit: Out.]
f03lipe has joined #ruby
jaequery has quit [Quit: Computer has gone to sleep.]
seanwash has quit [Quit: Computer has gone to sleep.]
f03lipe has quit [Max SendQ exceeded]
wallerdev has joined #ruby
hybris has joined #ruby
Guest25886 has quit [Quit: Guest25886]
zph has quit [Quit: Computer has gone to sleep.]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
klip has joined #ruby
linoge has quit [Quit: WeeChat 0.3.9.2]
f03lipe has joined #ruby
f03lipe has quit [Remote host closed the connection]
bricker_ has joined #ruby
f03lipe has joined #ruby
Mon_Ouie has quit [Ping timeout: 272 seconds]
nateberkopec has joined #ruby
Targen has joined #ruby
afd__ has joined #ruby
jds_ has quit [Ping timeout: 246 seconds]
VegetableSpoon has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
amro__ has joined #ruby
ebouchut has quit [Quit: This computer has gone to sleep]
amacgregor_osx has quit [Read error: Connection reset by peer]
karasawa has joined #ruby
JoeJulian_ is now known as JoeJulian
jasonkuhrt has joined #ruby
amacgregor_osx has joined #ruby
cr3 has quit [Quit: leaving]
amacgregor_osx has quit [Read error: Connection reset by peer]
<jasonkuhrt>
Can someone refer me the URL for the ruby gems code-quality platform
<jasonkuhrt>
that auto letter-grades coding aspects of ruby gems
<jasonkuhrt>
it may be a new service, or I just heard about it recently
generalissimo has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
<ruzu>
is there any trick to do something like a substring grep while in irb?
thisirs has quit [Remote host closed the connection]
digitalcakestudi has quit [Quit: Leaving.]
cheese1756 has quit [Changing host]
cheese1756 has joined #ruby
picca has joined #ruby
healpay has joined #ruby
n1x has joined #ruby
<ruzu>
hm, this kind of works `echo '#{m}' | grep find`
bricker_ is now known as bricker
bradhe has joined #ruby
drago757 has joined #ruby
skcin7 has quit []
emergion has quit [Quit: Computer has gone to sleep.]
gabrielrotbart has joined #ruby
eldariof has quit []
joofsh has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
joofsh has joined #ruby
elico has joined #ruby
<Hanmac>
ruzu you want something like that? "this is a string"[/\s(\w+)\s/,1] #=> "is"
blacktulip has quit [Remote host closed the connection]
<ruzu>
regex... why didn't i think of that? i'm such a noob sometimes.
* ruzu
highfives Hanmac
Dann1 has quit [Quit: Dann1]
itsdavem has quit [Remote host closed the connection]
rubyasker has quit [Quit: Page closed]
itsdavem_ has joined #ruby
horofox has joined #ruby
generalissimo has joined #ruby
DatumDrop has joined #ruby
sgupta has quit [Ping timeout: 252 seconds]
baphled has quit [Ping timeout: 252 seconds]
KevinSjoberg has quit [Quit: Leaving]
delinquentme has joined #ruby
<delinquentme>
i feel like theres a way to DRY this up: @biome_data["native"]["tropical peat forest"] = @name_indexed_ecosystems["tropical peat forest"]
itsdavem_ has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 245 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
<ruzu>
is there a mushroom biome?
jekotia has joined #ruby
Umren has quit [Read error: Connection reset by peer]
DatumDrop has quit [Ping timeout: 276 seconds]
itsdavem has joined #ruby
jimeh has joined #ruby
horrror has quit [Read error: Connection reset by peer]
horrror has joined #ruby
horrror has quit [Client Quit]
DaZ has quit [Ping timeout: 246 seconds]
itsdavem has quit [Read error: Connection reset by peer]
Shrink has joined #ruby
tenmilestereo has joined #ruby
lunchtime has joined #ruby
<lunchtime>
If anyone hasn't seen http://c9.io yet, I advice you check it! IT's a collaborative web IDE for js, html, css, php, python and ruby.
jaequery has quit [Quit: Computer has gone to sleep.]
picca has quit [Quit: picca]
dmiller has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
baphled has joined #ruby
robert__ has joined #ruby
generalissimo has quit [Remote host closed the connection]
jondot` has quit [Quit: Leaving]
andrewhl has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 246 seconds]
dumdedum has quit [Quit: foo]
robert___ has quit [Ping timeout: 245 seconds]
DaZ has joined #ruby
baphled has quit [Ping timeout: 264 seconds]
nomenkun has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
Zolo has quit [Remote host closed the connection]
lunchtime has quit [Quit: peace]
Goopyo has quit [Ping timeout: 256 seconds]
nomenkun has quit [Ping timeout: 264 seconds]
rburton- has joined #ruby
vlad_starkov has joined #ruby
elico has quit [Remote host closed the connection]
nathancahill has joined #ruby
locriani has joined #ruby
ryannielson has quit [Quit: ryannielson]
sepp2k1 has quit [Remote host closed the connection]
Vainoharhainen has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
rezzack has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
digitalcakestudi has joined #ruby
<shevy>
are Proc.new objects real objects? all they seem to have in common is the .call method or? so it is more an object, wrapped around a bit of data structure
<shevy>
and if this is true, I wonder what is special about them
statarb3 has quit [Ping timeout: 272 seconds]
tps_ has quit [Quit: tps_]
iamjarvo has joined #ruby
<robert__>
shevy: hai. :D
<shevy>
hey robert__
<shevy>
still having fun with your databases?
robert__ is now known as robert_
<robert_>
yes. :p
<robert_>
I'm grappling with calling functions dynamically now
kirun has quit [Quit: Client exiting]
ryannielson has joined #ruby
<robert_>
but I'm approaching, "Wow, I'm done?"
<robert_>
:p
zph has quit [Quit: Computer has gone to sleep.]
<shevy>
how do you call them dynamically? .send ?
<robert_>
functions, not objects.
<yfeldblum>
shevy, instances of Proc are objects that respond to #call
<robert_>
or does Object handle that for me?
zph has joined #ruby
<yfeldblum>
shevy, they wrap blocks, so that you can use them from code
arturaz has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 244 seconds]
tbrock has joined #ruby
tbrock has quit [Client Quit]
seich- has joined #ruby
c0rn has joined #ruby
tomzx_ has joined #ruby
ryanjh has quit [Quit: Computer has gone to sleep.]
shufflebot has joined #ruby
sidoaight has joined #ruby
ryannielson has quit [Quit: ryannielson]
workmad3 has quit [Ping timeout: 252 seconds]
c0rn has quit [Client Quit]
subbyyy_ has quit [Ping timeout: 256 seconds]
alanp has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
sidoaight has left #ruby [#ruby]
<robert_>
shevy: any ideas?
<shevy>
robert_ sorry... am still pondering what is special about procs
<robert_>
ah.
<shevy>
method .call, and blocks can be used for any object hmmm
<shevy>
robert_ you want to dynamically call objects?
<shevy>
robert_ but you dont store them in a container/variable?
reppard has quit [Ping timeout: 264 seconds]
<shevy>
oh
<robert_>
okay, so here's a bit of background
<shevy>
you want to call any-function?
<robert_>
I have an INI file that has a file format definition contained in it
<shevy>
they are special properties of class Objects right? like when you do... def foo; puts 'hi'; end, it becomes part of class Object, but hidden, or?
<robert_>
and a section for mapping data around
<robert_>
mappings can be any one of three forms:
<robert_>
A.) Column = tanle_column
<robert_>
er
<robert_>
A.) Column = table_column
<robert_>
B.) Column = table_column,function
<robert_>
B.) Column = table_column,classname,method
<robert_>
...
<robert_>
just pretend that second B is a C. :p
<robert_>
I have A and C covered
<robert_>
what I'm grappling with is being able to take form B and execute it correctly
shtirlic has joined #ruby
orluke has quit [Quit: orluke]
<shevy>
hmmmm
<shevy>
and where does that function reside?
EPIK has joined #ruby
<robert_>
in the ruby script
sidoaight has joined #ruby
h4mz1d has joined #ruby
c0rn has joined #ruby
<robert_>
I'm basically trying to be thorough in supporting callables in my data
<robert_>
"So what if I want to call a function?"
<robert_>
"Uhh.. well, I dunno. Try it and see?"
<robert_>
that's bad practice, imo
nateberkopec has quit [Quit: Leaving...]
perun_ has quit [Ping timeout: 252 seconds]
c0rn has quit [Client Quit]
<robert_>
shevy: so yes, I'm trying to call my_custom_function()
hackerdude has joined #ruby
perun_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<swarley>
I'm getting this in a C extension, suggestions?
<swarley>
bignum too big to convert into `long'
x82_nicole has quit [Quit: Computer has gone to sleep.]
hackerdude has quit [Remote host closed the connection]
busybox42 has quit [Ping timeout: 244 seconds]
horofox has quit [Quit: horofox]
baroquebobcat has quit [Quit: baroquebobcat]
noyb has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
Vainoharhainen has quit [Quit: Leaving...]
itnomad has joined #ruby
tommyvyo_ has joined #ruby
stevechiagozie has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
dmiller has quit [Ping timeout: 264 seconds]
itnomad has quit [Client Quit]
<heftig>
swarley: if you used a long as an argument, use a value instead
Kuifje has quit [Ping timeout: 252 seconds]
<swarley>
i didn't
<swarley>
VALUE modular_power(VALUE self, VALUE exponent, VALUE modulus)
<heftig>
jm
<heftig>
hm
zph has joined #ruby
<heftig>
how do you register that function?
<swarley>
I mean, I tried to get a long from NUM2INT but really that shouldn't give me such a vague backtrace
jaywastaken has quit [Remote host closed the connection]
<swarley>
Well, I'm changing it to long long to see if it's any different
<heftig>
that's a 64-bit integer
<swarley>
only available on x64?
<heftig>
emulated by the compiler on ia32
<swarley>
ah. Well.. I wonder how I should approach this with compatibility in mind lol
<swarley>
Only intel supports ia32 yes?
mengu has joined #ruby
macmartine has quit [Quit: Computer has gone to sleep.]
reppard has joined #ruby
<heftig>
no, i was referring to x86 in general
BoomCow has joined #ruby
<heftig>
(not x86-64, obviously that has native 64-bit)
Spaceghostc2c has quit [Read error: Operation timed out]
baroquebobcat has joined #ruby
jaywastaken has joined #ruby
jaywastaken has quit [Changing host]
jaywastaken has joined #ruby
<swarley>
ah, so I'm fairly fine to use a long long?
<shevy>
robert_ hmmm my head isn't quite adjusted to that problem domain yet... it sounds as if you need ... eval (haha)
Guest65430 has quit [Ping timeout: 245 seconds]
<heftig>
swarley: too compiler-dependent, IMO
<robert_>
aha.
<swarley>
:/ damn
<robert_>
but it's slow... eww.
<swarley>
Suggestions then?
<heftig>
stick to long. if it doesn't fit, use bignum-processing
Guest73945 has quit [Read error: Operation timed out]
Daman has quit [Read error: Connection reset by peer]
<swarley>
What would that be?
<heftig>
method calls
<swarley>
ah
G has quit [Quit: Reconnecting]
<swarley>
well that seems like it would kill some optimization
<heftig>
of course
<heftig>
it probably won't be faster than pure ruby in this case
noc` has quit [Quit: Bye]
<swarley>
damn
stoicsquirrel has joined #ruby
mele- has joined #ruby
cschneid has quit [Ping timeout: 260 seconds]
coyo has joined #ruby
coyo is now known as Guest75627
reppard has quit [Ping timeout: 240 seconds]
<robert_>
shevy: nevermind. :D
<robert_>
(I got it.)
rburton- has quit [Read error: Operation timed out]
aytch has quit [Ping timeout: 264 seconds]
macmartine has joined #ruby
<shevy>
robert_ how!!!
reppard has joined #ruby
SCommette has joined #ruby
aedorn has quit [Quit: Leaving]
gyre007 has quit [Remote host closed the connection]
bradhe has joined #ruby
sidoaight has left #ruby [#ruby]
moos3 has joined #ruby
<havenn>
For prepending to $LOAD_PATH, why File.expand_path(File.dirname(__FILE__)) instead of Dir.pwd??
slainer68 has quit [Remote host closed the connection]
<swarley>
Because you can be in a different directory
noc` has joined #ruby
<havenn>
swarley: Seems to be the same with the former though. If you chdir, it still reports new dir, no?
nateberkopec has joined #ruby
lunchtime has joined #ruby
lunchtime has quit [Client Quit]
<swarley>
If your file is in /lib/ruby/this/path/is/fake.rb and the user loads a script from /foo/bar/baz.rb then it will give you /foo/bar/
<swarley>
instead of where the script you are writing the code in
<apeiros>
havenn: pwd != dirname(__FILE__)
<apeiros>
and you should expand_path any path you put into $LOAD_PATH
<swarley>
you shouldn't chdir
<apeiros>
relative paths == bad
shtirlic has quit [Remote host closed the connection]
<swarley>
not in a library file at least
<swarley>
If you're going to change directories you should have a very good reason for doing so
<apeiros>
swarley: chdir is evil afair - can't be done in a thread-local way e.g.
s1n4 has quit [Quit: leaving]
<swarley>
yeah, i wouldn't use it
<apeiros>
so I agree, shouldn't chdir unless explicitly told to
<apeiros>
that said, I use it for globs :-/
<havenn>
swarley: I was just changing dir to try to figure out why Dir.pwd falls short.
<apeiros>
(Dir.chdir(base) { Dir.glob(pattern) })
<swarley>
You can expand the path in a dir glob
<havenn>
$: << Dir.pwd is just so much nicer, too bad.
<swarley>
why not Dir[base + "/" + pattern]
<swarley>
?
h4mz1d has quit [Ping timeout: 252 seconds]
cschneid has joined #ruby
<swarley>
err File::SEPARATOR instead of "/"
robert__ has joined #ruby
Guest75627 has quit [Ping timeout: 245 seconds]
<havenn>
Fetching the absolute path of __FILE__'s dir seems like something that would be extremely nice to have some sugar for. It is Perlishly fugly how we do it now.
<heftig>
File.join(base, pattern)
G has joined #ruby
bandu has joined #ruby
vlad_starkov has joined #ruby
bandu is now known as Guest76736
noc` has quit [Quit: Bye]
cschneid has quit [Ping timeout: 246 seconds]
robert_ has quit [Ping timeout: 276 seconds]
krisfremen has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
<robert__>
shevy: send('foo')
maxmanders has quit [Quit: Computer has gone to sleep.]