apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste >3 lines of text on gist.github.com || Rails is in #rubyonrails || Log: http://irclog.whitequark.org/ruby
mrFrog has joined #ruby
<RubyPanther> Well, once in awhile I do have to reboot to upgrade my kernel. This isn't the 90s, I'm not going to get 1000 days of uptime, it just isn't going to happen
<mrFrog> if i run "rake test", and any 1 test fails, then rake aborts with an error: Command failed with status (1): [/Users/example/.rbenv/versi...] - any ideas on why this is happening? i think it's affecting me so i don't get growl notifications if any test fails (which seems to defeat the purpose)… i get notifications if all tests pass
nazty has quit [Quit: Leaving]
QaDeS has quit [Quit: Ex-Chat]
stevechiagozie has joined #ruby
chrxn_ has joined #ruby
eph3meral has quit [Quit: Leaving]
Draco_ has quit [Ping timeout: 246 seconds]
gmci has quit [Ping timeout: 255 seconds]
gmci has joined #ruby
mobilegamelabs has quit [Quit: (NEW! iPhone/iPad Version is released!!) http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
vlad_starkov has quit [Remote host closed the connection]
Z_Mass has joined #ruby
stevechiagozie has quit [Quit: stevechiagozie]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
vertroa has joined #ruby
pk1001100011 has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
vertroa has joined #ruby
g_rotbart has quit [Ping timeout: 245 seconds]
hunglin has quit [Quit: Leaving.]
mrFrog has left #ruby [#ruby]
SegFaultAX has quit [Quit: Lost terminal]
baroquebobcat has joined #ruby
kedai has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Client Quit]
vladr has quit [Ping timeout: 248 seconds]
ringotwo has quit [Remote host closed the connection]
vladr has joined #ruby
ringotwo has joined #ruby
mockra has joined #ruby
Baen has joined #ruby
rdx has quit [Quit: leaving]
chrxn_ has quit [Ping timeout: 252 seconds]
zodiac1111 has joined #ruby
TheShadowFog has joined #ruby
nari has quit [Ping timeout: 252 seconds]
mockra has quit [Remote host closed the connection]
stevechiagozie has joined #ruby
mxweas_ has joined #ruby
obryan1 has joined #ruby
stevechiagozie has left #ruby [#ruby]
obryan has quit [Quit: Konversation terminated!]
_cb has joined #ruby
<_cb> newbie question. I can see how the views hold the html for different pages. How do I share html across multiple pages? is there something like an include?
fridim_ has quit [Ping timeout: 246 seconds]
mdszy_ has joined #ruby
ringotwo has quit [Remote host closed the connection]
mockra has joined #ruby
mdszy has quit [Disconnected by services]
<GarethAdams> _cb: I think you meant to join #rubyonrails for that one
mdszy_ is now known as mdszy
<_cb> must have ;)
<_cb> join #rubyonrails
_cb has left #ruby ["Leaving"]
blazes816 has quit [Ping timeout: 246 seconds]
vladr has quit [Ping timeout: 255 seconds]
vladr has joined #ruby
Targen has joined #ruby
mockra has quit [Remote host closed the connection]
stevechiagozie has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
CmdrTallen has quit [Quit: Leaving]
blazes816 has joined #ruby
ZachBeta has joined #ruby
g_rotbart has joined #ruby
ZachBeta has quit [Client Quit]
abdulkarim has quit [Ping timeout: 244 seconds]
andrewhl has quit [Remote host closed the connection]
chrxn_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
mpereira_ has joined #ruby
mpereira_ has quit [Client Quit]
emmanuelux has joined #ruby
RobBennett has joined #ruby
<RobBennett> Here's the deal. I have $32 dollars that I am going to pay to get to the maximum amount of free dropbox space. I get an extra 500mb for each person who signs up using my referral link(below). Dropbox tells me what email you use to sign up with when I get credit for the referral. If you successfully sign up, I will send $1 via paypal to that email address. Here is what you have to do: 1. go to http://db.tt/s5UJRt2P 2. Sign up using yo
<RobBennett> in a fake I get no space and you get no cash. 3. You must download and install the dropbox app, it is just a few mbs. 4. Sync ONE file-can be anything. create a random .txt file or stick a photo in there or something. That's it. I'll get notice within a day or two and will promptly send out payment. This is no scam. I need about 13gb of dropbox space and paying you all to do this once is a lot cheaper than paying $10/month in the l
zodiac1111 has quit [Ping timeout: 252 seconds]
<seanstickle> No soliciting man.
cdavaz has quit [Read error: Connection reset by peer]
cdavaz_ has joined #ruby
abdulkarim has joined #ruby
RichieEvan has joined #ruby
hadees has quit [Ping timeout: 246 seconds]
<mksm> assuming I have rendered a text file using .erb template and some vars, is there any way I can extract the rendered vars from the text file by using the template?
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<mksm> sort of ... un-rendering
<seanstickle> Parsing and comparing, I suppose
<mksm> so a template engine won't be able to do this?
<banisterfiend> RobBennett: $13/month is really not very much..and it's less humiliating than doing what u're doing :)
<seanstickle> mksm: right
<banisterfiend> RobBennett: 13/month gets me 100 gigs on dropbox
<banisterfiend> pretty good deal if u ask me :)
<RobBennett> it is good, but I only need about 10gb
<RobBennett> and I don't want to pay monthly. I'm cheap
<RobBennett> I never pay for anything monthly if I can avoid it
RichieEvan has quit [Quit: RichieEvan]
RORgasm has joined #ruby
RichieEvan has joined #ruby
<seanstickle> This seems like one of those times that an op should kick someone
<mksm> Can Thread.exclusive {} be used instead of mutex.synchronize {} ?
nari has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
minijupe has joined #ruby
banghouse has quit [Remote host closed the connection]
Z_Mass has quit [Ping timeout: 248 seconds]
ZachBeta has joined #ruby
igotnolegs has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
ZachBeta has quit [Client Quit]
RobBennett has left #ruby [#ruby]
emmanuel__ has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
otters has joined #ruby
hunglin has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
RichieEvan has joined #ruby
wallerdev has quit [Quit: wallerdev]
fayimora has quit [Quit: Busy…..zzzzz]
seitensei has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
zodiac1111 has joined #ruby
sailias has joined #ruby
vladr has quit [Ping timeout: 265 seconds]
vladr has joined #ruby
rizzy has joined #ruby
sebicas has quit [Quit: sebicas]
TorpedoSkyline has joined #ruby
wallerdev has joined #ruby
zigidias has joined #ruby
Progster has joined #ruby
Baen has quit []
fixl has joined #ruby
crodas has quit [Ping timeout: 250 seconds]
mikeric has quit [Quit: mikeric]
Hanmac has joined #ruby
Spooner has quit [Ping timeout: 246 seconds]
samnang_ has joined #ruby
freeayu has joined #ruby
emmanuel__ has quit [Ping timeout: 246 seconds]
zodiac1111 has quit [Ping timeout: 248 seconds]
Croms has left #ruby ["Linkinus - http://linkinus.com"]
gnarmis has quit [Quit: gnarmis]
angelixd has quit [Ping timeout: 240 seconds]
emmanuelux has joined #ruby
angelixd has joined #ruby
perryh is now known as perry
greyEAX has joined #ruby
centipedefarmer has quit [Quit: Leaving]
drmegahertz has quit [Read error: Operation timed out]
jmccune has quit [Ping timeout: 240 seconds]
td123 has joined #ruby
zodiac1111 has joined #ruby
derrida has quit [Ping timeout: 260 seconds]
drmegahertz has joined #ruby
sailias has quit [Quit: Leaving.]
iamjarvo has joined #ruby
_justin has joined #ruby
angelixd has quit [Ping timeout: 265 seconds]
noganex has quit [Read error: Operation timed out]
Z_Mass has joined #ruby
derrida has joined #ruby
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
syamajala has quit [Read error: Connection reset by peer]
syamajala has joined #ruby
kryptek_ has quit [Ping timeout: 260 seconds]
vladr has quit [Ping timeout: 246 seconds]
jmccune has joined #ruby
vladr has joined #ruby
noganex has joined #ruby
pk1001100011 has quit [Ping timeout: 246 seconds]
oxyxian has quit [Quit: oxyxian]
emmanuelux has quit [Ping timeout: 246 seconds]
angelixd has joined #ruby
dagnachewa has joined #ruby
wvms has quit [Quit: wvms]
wvms has joined #ruby
choffstein has quit [Remote host closed the connection]
bglusman has quit [Remote host closed the connection]
minijupe has quit [Quit: minijupe]
bglusman has joined #ruby
bglusman has quit [Remote host closed the connection]
bglusman has joined #ruby
mwilson_ has quit [Excess Flood]
crodas has joined #ruby
olrrai has joined #ruby
mwilson_ has joined #ruby
olrrai has quit [Read error: Connection reset by peer]
dagnachewa has quit [Remote host closed the connection]
xpot-station has joined #ruby
CmdrTallen has joined #ruby
ringotwo has joined #ruby
ringotwo has quit [Remote host closed the connection]
sebicas has joined #ruby
patient has quit [Quit: leaving]
banisterfiend has quit [Read error: Connection reset by peer]
noyb has joined #ruby
mengu has quit [Remote host closed the connection]
crodas has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
fixl has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
reuf has quit [Read error: Operation timed out]
Fretta has quit [Ping timeout: 246 seconds]
niklasb has joined #ruby
Fretta has joined #ruby
yy is now known as dshin
chrxn_ has quit [Ping timeout: 252 seconds]
dshin is now known as Guest64800
Guest64800 is now known as yy
<_justin> i was wondering if we could nest template inside another in sinatra
angelixd has quit [Ping timeout: 252 seconds]
<_justin> like
<_justin> get '/'
<_justin> haml :index
cableray has joined #ruby
<_justin> haml :index_inside
<_justin> is this possible??
<_justin> if, not wots the workaround ?
kevinbond has joined #ruby
choffstein has joined #ruby
Fretta has quit [Ping timeout: 250 seconds]
choffstein has quit [Remote host closed the connection]
<_justin> when i attempted it gives me localjumperror
<_justin> no block given
<banisterfiend> _justin: krisskross would be so upset
<_justin> banisterfiend: !!!
radic has quit [Disconnected by services]
radic_ has joined #ruby
<tiripamwe> banisterfiend: so would the daddy mac
radic_ is now known as radic
potato333 has joined #ruby
niklasb has quit [Ping timeout: 248 seconds]
cantonic has joined #ruby
Fretta has joined #ruby
angelixd has joined #ruby
<_justin> banisterfiend: thats possible is it not? isn' t it how layout works
macgregor_ has joined #ruby
crodas has joined #ruby
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Z_Mass has quit [Ping timeout: 248 seconds]
Fretta has quit [Ping timeout: 248 seconds]
<potato333> Hi I jumped onto #rubyonrails, but after some thought I think this chan might be more appropriate. Can somebody provide a resource or some explanation about when 'class scope' method calls are evaluated/loaded (proper terminology would help). I might be investigating the wrong issue. Specifically, I've got a class_eval on an already defined class that calls a method in it's body (belongs_to [actually, delegates_belongs_to, but I think
cableray has quit [Quit: See you 'round like a donut.]
stefanp_ has joined #ruby
zodiac1111 has quit [Ping timeout: 240 seconds]
<potato333> I would like to erase that call from existence. Is there a way to reopen a class and say 'forget everything you've learned' and redefine it? (Actually, "forget this one thing you've learned" would be better). There's probably some conceptual jump I have to make.
<potato333> *its
zodiac1111 has joined #ruby
stevechiagozie has quit [Quit: stevechiagozie]
awarner has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
Fretta has joined #ruby
<ryanf> this is really a rails question. ruby doesn't care that you called belongs_to; the only thing that matters is the effects that call has on the various class-level state that rails maintains
<ryanf> (the list of associations, etc)
cdavaz_ has quit [Quit: cdavaz_]
dhruvasagar has joined #ruby
<ryanf> so there's not going to be a simple way to remove it at the ruby level
blazes816 has quit [Quit: Leaving]
yoklov has joined #ruby
<ryanf> if you actually want to just completely remove the class, you could use remove_const
<ryanf> but the association itself will be a lot messier
stefanp_ has quit [Ping timeout: 265 seconds]
vladr has quit [Ping timeout: 244 seconds]
mahmoudimus has joined #ruby
<banisterfiend> Hanmac: we released new pry, now have slop 3 support, just for u
rvmeier has joined #ruby
vladr has joined #ruby
markamber has joined #ruby
Fretta has quit [Ping timeout: 246 seconds]
<markamber> How should I learn ruby? I like videos, short attention span...
<markamber> I know python well
vitor-br has joined #ruby
<seanstickle> Get a book on Ruby
<_justin> codeschool!!
<seanstickle> And a computer
<seanstickle> And then move forward
<seanstickle> Easy
<seanstickle> This is not rocket surgery.
<markamber> seanstickle: the problem is that I don't like books… I just had to read a book on how to learn haskell and I want videos for this one...
<seanstickle> markamber: hmm, ok
<seanstickle> markamber: you're going to fail
<seanstickle> markamber: perhaps you would like a career in HR?
mahmoudimus has quit [Client Quit]
<markamber> seanstickle: the thing is that I don't actually have to learn this language… so if there are no good video tutorials you guys recommend I will look for one myself, and if it is not any good I will never learn ruby
<seanstickle> Sounds about right.
<markamber> I would just rather use Ruby on Rails than Django… Seems more well respected
owned_ has joined #ruby
<fowl> is this a generational thing
<markamber> fowl: exactly
<ryanf> haha
<fowl> i'll only learn your language if its presented to me by my favorite celebrity
Fretta has joined #ruby
<ryanf> ......dhh
<seanstickle> There's probably a market for "Megan Fox Teaches You Ruby"
Banistergalaxy has joined #ruby
<ryanf> as long as you don't have to see her hands typing?
sebicas has left #ruby [#ruby]
indian has joined #ruby
perry is now known as perryh_away
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
CmdrTallen has quit [Ping timeout: 252 seconds]
andrewhl has joined #ruby
<markamber> Ok, so what is the ultimate book for learning ruby
tiripamwe has quit [Ping timeout: 240 seconds]
zodiac1111 has quit [Ping timeout: 255 seconds]
<seanstickle> Ultimate? None.
<seanstickle> But the Well-Grounded Rubyist is good, as is the O'Reilly one
macgregor_ has quit [Ping timeout: 246 seconds]
<fowl> i would say pickaxe but i dont think the 1.9 version is free
banisterfiend has quit [Ping timeout: 240 seconds]
<markamber> seanstickle: so what you are telling me is that there is no good way to learn ruby
Progster has quit [Ping timeout: 244 seconds]
angelixd has quit [Ping timeout: 265 seconds]
<fowl> holy christ
nick_ has joined #ruby
<seanstickle> markamber: no, I am telling you that learning things don't involve words like "The Ultimate"
nick_ is now known as Guest82503
<seanstickle> markamber: and might require that you read something
<fowl> if you had the ruby bible would you even be able to finish it?
<fowl> you need to get different perspectives
Draco_ has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
<seanstickle> This isn't the late 90s and you don't go buy QUE's Ruby SuperBible Special Edition
<seanstickle> If you "know Python well" as you claimed earlier, Ruby is not going to be a challenge to pick up from any reasonably good book.
<seanstickle> If you want "Ruby in 20 Simple Videos" from the Computer Professor, well, that's something else.
<markamber> seanstickle: is it like python?
<seanstickle> In some ways.
<seanstickle> More than Haskell is.
<fowl> i've heard good things about ruby koans
TheMoonMaster has quit [Ping timeout: 260 seconds]
<markamber> seanstickle: of course, I don't expect it to be like that
<seanstickle> fowl: yeah, those aren't bad
<fowl> you should be able to fly through it with prior programming knowledge
TheMoonMaster has joined #ruby
RORgasm has joined #ruby
cdavaz has joined #ruby
<markamber> Basically I just need to know the syntax for data structures and what I am allowed to do (in python it is pretty much free for all, in my experience with java, not so much, c is kinda weird since you are manipulating the memory so much you can just muck around with bits and cast things as whatever you feel like) I am sick of python being so lenient on things, sometimes I just want public and private and interfaces so I can write what I
<markamber> think is better code, is ruby a step in that direction?
syamajala has quit [Read error: Connection reset by peer]
syamajala has joined #ruby
<seanstickle> Sure.
<ryanf> yes, ruby is more like that than python is
<ryanf> although it is always possible to get around restrictions, so if that bothers you you might want to learn something else
<seanstickle> It's no APL, but it's a pretty good language
angelixd has joined #ruby
dnyy has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
Fretta has quit [Ping timeout: 244 seconds]
Guest82503 has quit [Read error: Connection reset by peer]
Fretta has joined #ruby
<markamber> Well Ruby has what I think is the best in class web app thing (ruby on rails) I have deployed lots of web applications and the ones on rails had the most desirable blend between using my own web server software, but not sucking like PHP
stkowski_ has quit [Quit: stkowski_]
Chryson has quit [Ping timeout: 246 seconds]
choffstein has joined #ruby
andoriyu has quit [Quit: This computer has gone to sleep]
Draco_ has quit [Ping timeout: 246 seconds]
Draco_ has joined #ruby
frogstarr78 has quit [Remote host closed the connection]
ken_barber has quit [Remote host closed the connection]
tiripamwe has joined #ruby
williamcotton has quit [Quit: williamcotton]
Fretta has quit [Ping timeout: 246 seconds]
reuf has joined #ruby
Fretta has joined #ruby
sepp2k has quit [Remote host closed the connection]
bluenemo has quit [Ping timeout: 246 seconds]
blast_hardcheese has quit [Ping timeout: 244 seconds]
mdszy has quit [Quit: nini]
abra has quit [Ping timeout: 276 seconds]
cdavaz has quit [Quit: cdavaz]
abra has joined #ruby
blast_hardcheese has joined #ruby
jeff_sebring has joined #ruby
yoklov has quit [Quit: computer sleeping]
_justin has quit [Ping timeout: 244 seconds]
sebastorama has joined #ruby
Chryson has joined #ruby
cdavaz has joined #ruby
cdavaz is now known as Ontolog
hunglin has quit [Quit: Leaving.]
bluenemo has joined #ruby
mahmoudimus has joined #ruby
Beoran_ has quit [Ping timeout: 240 seconds]
mneorr has quit [Quit: Leaving.]
mahmoudimus has quit [Client Quit]
tk_ has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
nocturne7 has joined #ruby
nocturne7 has left #ruby ["Leaving"]
null- has joined #ruby
kevinbond has quit [Quit: kevinbond]
classix has joined #ruby
choffstein has quit [Remote host closed the connection]
minijupe has joined #ruby
Beoran_ has joined #ruby
oscardelben has joined #ruby
samnang_ has quit [Quit: Linkinus - http://linkinus.com]
_justin has joined #ruby
UNIXgod has quit [Changing host]
UNIXgod has joined #ruby
psino has quit [Ping timeout: 265 seconds]
mikeycgto has quit [Remote host closed the connection]
psino has joined #ruby
vladr has quit [Ping timeout: 265 seconds]
vladr has joined #ruby
Guest5382 has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
cpruitt has quit [Quit: cpruitt]
freeayu has quit [Ping timeout: 240 seconds]
kevinbond has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
ananthakumaran has joined #ruby
Banistergalaxy has joined #ruby
kevinbond has quit [Client Quit]
Fretta has quit [Ping timeout: 248 seconds]
Fretta has joined #ruby
freeayu has joined #ruby
abstrusenick has joined #ruby
Draco_ has quit [Ping timeout: 246 seconds]
markamber has quit [Quit: markamber]
cantonic_ has joined #ruby
cantonic_ has left #ruby [#ruby]
cantonic has quit [Ping timeout: 252 seconds]
vladr has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
erichmenge has quit [Quit: erichmenge]
vladr has joined #ruby
artOfWar has joined #ruby
Banistergalaxy has quit [Ping timeout: 250 seconds]
artOfWar_ has joined #ruby
tiripamwe has quit [Ping timeout: 244 seconds]
khakimov has joined #ruby
savage- has joined #ruby
perryh_away is now known as perryh
kedai has quit [Ping timeout: 252 seconds]
artOfWar has quit [Ping timeout: 246 seconds]
perryh is now known as perry
andoriyu has joined #ruby
Fretta has quit [Ping timeout: 246 seconds]
Nisstyre has quit [Ping timeout: 264 seconds]
zodiac1111 has joined #ruby
Fretta has joined #ruby
sdwrage has joined #ruby
jfelchner1 has joined #ruby
matled has quit [Read error: Connection reset by peer]
matled- has joined #ruby
matled- is now known as matled
vectorshelve has joined #ruby
tiripamwe has joined #ruby
jfelchner has quit [Ping timeout: 244 seconds]
a_a_g has joined #ruby
alek_b has joined #ruby
gtuckerkellogg has joined #ruby
<vectorshelve> Good Morning :)
vladr has quit [Ping timeout: 244 seconds]
andoriyu has quit [Quit: This computer has gone to sleep]
vladr has joined #ruby
andoriyu has joined #ruby
banisterfiend has quit [Remote host closed the connection]
choffstein has joined #ruby
oscardelben has quit [Quit: oscardelben]
chrxn_ has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
choffstein has quit [Ping timeout: 250 seconds]
andrewhl has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
Kabaka has quit [Quit: Rebooting for updatess]
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
nobitanobi has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
savage- has quit [Remote host closed the connection]
rvmeier has quit [Quit: Saliendo]
g_rotbart has quit [Remote host closed the connection]
Kabaka has joined #ruby
a_a_g has quit [Quit: Leaving.]
vladr has quit [Ping timeout: 250 seconds]
vladr has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
nobitanobi has joined #ruby
nobitanobi has quit [Read error: Connection reset by peer]
gnarmis has joined #ruby
emanu has joined #ruby
maletor has joined #ruby
minijupe has quit [Quit: minijupe]
Draco_ has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
wmoxam has quit [Quit: Lost terminal]
Draco_ has quit [Read error: No route to host]
Draco_ has joined #ruby
tewecske has joined #ruby
seanstickle has quit [Quit: seanstickle]
syamajala has quit [Remote host closed the connection]
Sou|cutter has quit [Quit: WeeChat 0.3.0]
iamjarvo has joined #ruby
Squee-D has joined #ruby
dhruvasagar has quit [Ping timeout: 250 seconds]
Draco__ has joined #ruby
Draco_ has quit [Read error: No route to host]
EzeQL has quit []
quest88 has quit [Quit: quest88]
bricker881 has joined #ruby
vladr has quit [Ping timeout: 246 seconds]
vladr has joined #ruby
bricker88 has quit [Ping timeout: 244 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
sdwrage has quit [Quit: geekli.st/programmer]
vectorshelve has joined #ruby
bricker881 has quit [Ping timeout: 252 seconds]
Banistergalaxy has joined #ruby
Bonkers has quit [Ping timeout: 246 seconds]
<vectorshelve> Banistergalaxy: Hai :)
abdulkarim has quit [Ping timeout: 250 seconds]
Progster has joined #ruby
Draco__ has quit [Ping timeout: 248 seconds]
jfelchner1 has quit [Quit: WeeChat 0.3.7]
Draco_ has joined #ruby
bobcatz has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
nai has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
Bonkers has joined #ruby
mpereira has quit [Ping timeout: 246 seconds]
wmoxam has joined #ruby
abstrusenick_ has joined #ruby
abstrusenick has quit [Read error: Connection reset by peer]
abstrusenick_ is now known as abstrusenick
vladr has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
vladr has joined #ruby
mockra has joined #ruby
iamjarvo has joined #ruby
mockra has quit [Ping timeout: 246 seconds]
a_a_g has joined #ruby
Nisstyre has joined #ruby
mockra has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
\13k has joined #ruby
Banistergalaxy has quit [Ping timeout: 246 seconds]
twinturbo has joined #ruby
OoTLink has joined #ruby
OoTLink has left #ruby [#ruby]
Criztian has joined #ruby
mohits has joined #ruby
Draco_ has quit [Ping timeout: 252 seconds]
Squee-D has quit [Quit: The computer fell asleep]
igotnolegs has quit [Quit: Computer has gone to sleep.]
Draco_ has joined #ruby
<Paradox> herrrrrrrrro
dnyy_ has joined #ruby
mockra has quit [Remote host closed the connection]
dnyy has quit [Read error: Operation timed out]
vladr has quit [Ping timeout: 240 seconds]
zodiac1111 has quit [Ping timeout: 246 seconds]
bobcatz has quit [Remote host closed the connection]
Icoin has quit [Quit: Icoin]
vladr has joined #ruby
Progster has quit [Ping timeout: 248 seconds]
a_a_g has quit [Quit: Leaving.]
mikeric has joined #ruby
<shevy> hey vectorshelve
<shevy> you ought to ask questions on #ruby ;P
fayimora has joined #ruby
<vectorshelve> shevy: hai mate.. :)
Draco_ has quit [Ping timeout: 246 seconds]
<shevy> I am hacking away on two projects right now
emanu has quit [Quit: emanu]
Banistergalaxy has joined #ruby
Banistergalaxy has quit [Client Quit]
Banistergalaxy has joined #ruby
drmegahertz has quit [Ping timeout: 248 seconds]
drmegahertz has joined #ruby
reuf has quit [Ping timeout: 248 seconds]
vectorshelve has quit [Ping timeout: 245 seconds]
RORgasm has joined #ruby
banisterfiend has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
crates has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 246 seconds]
crates has joined #ruby
vladr has quit [Ping timeout: 250 seconds]
vladr has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
vladr has quit [Ping timeout: 250 seconds]
vladr has joined #ruby
tiripamwe has quit [Ping timeout: 246 seconds]
guyvdb_ has joined #ruby
mikeric has left #ruby [#ruby]
AlbireoX has quit [Remote host closed the connection]
xscc has joined #ruby
imami|afk is now known as banseljaj
xscc has quit [Client Quit]
vladr has quit [Ping timeout: 246 seconds]
guyvdb_ has quit [Remote host closed the connection]
nachtwandler has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
jlwestsr has joined #ruby
hell_razer has joined #ruby
_justin has quit [Ping timeout: 255 seconds]
tayy has joined #ruby
kyktommy has joined #ruby
yxhuvud has joined #ruby
vladr has joined #ruby
Banistergalaxy has joined #ruby
chrxn_ has quit [Ping timeout: 265 seconds]
fayimora has quit [Ping timeout: 255 seconds]
jlwestsr has quit [Quit: Leaving]
subbyyy has quit [Quit: Leaving.]
tiripamwe has joined #ruby
hell_razer has quit [Read error: Connection reset by peer]
gtuckerkellogg has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
gtuckerkellogg has joined #ruby
ryanf has quit [Quit: leaving]
fayimora has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
justin_ has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
eywu has quit [Quit: Leaving.]
vladr has quit [Ping timeout: 240 seconds]
pk1001100011 has joined #ruby
vladr has joined #ruby
hell_razer has joined #ruby
vertroa has quit []
workmad3 has joined #ruby
iamjarvo has quit [Quit: Computer has gone to sleep.]
justin_ has quit [Ping timeout: 246 seconds]
LennyLinux has joined #ruby
Spooner has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
lkba has quit [Ping timeout: 252 seconds]
<hell_razer> hello, i am new at ruby, i am looking something like python virtualenv for ruby
<banisterfiend> Spooner: good day, sir
wallerdev has quit [Quit: wallerdev]
sebastorama has quit [Ping timeout: 244 seconds]
vladr has quit [Ping timeout: 250 seconds]
saschagehlich has joined #ruby
vladr has joined #ruby
thone_ has joined #ruby
<hell_razer> hello, i have installed https://rvm.io/rvm/install/#explained then, installed some gems, according to setup guid of some app, i need to run bundle install, but i get an "Could not locate Gemfile"
<GarethAdams> hell_razer: is there a Gemfile in the app directory, and is that the directory you're running `bundle install` from?
<hell_razer> Gadgetoid: i am running from ~
thone has quit [Ping timeout: 248 seconds]
<GarethAdams> hell_razer: your tab completion is a bit out there ;)
<GarethAdams> you need to be in the directory with the Gemfile
<hell_razer> i am truing setup https://github.com/steelThread/redmon
<hell_razer> so i need go to ?
<hell_razer> how i can find in which directory its located?
<GarethAdams> hell_razer: have you cloned that project down to your computer using git?
<GarethAdams> oh
maletor has quit [Quit: Computer has gone to sleep.]
<hell_razer> Gadgetoid: is cloned != gem install?
<GarethAdams> ok the documentation is a bit misleading
<GarethAdams> I assume you're trying to use this gem inside another project?
<hell_razer> Gadgetoid: i am complete new to ruby, thats first time, i am trying to follow guide from that app
<hell_razer> Gadgetoid: i need to isntall gem and clone this project?
justin_ has joined #ruby
<GarethAdams> I'm not Gadgetoid
<hell_razer> ohhh
<hell_razer> sory
nachtwandler has quit [Quit: leaving]
<hell_razer> tab missed
lkba has joined #ruby
<hell_razer> Gadgetoid: sorry miss
<GarethAdams> hell_razer: if you've installed the redmon gem, you should be able to just type `redmon`
<hell_razer> GarethAdams: oh, yes)
<GarethAdams> bundler works as a mini package manager and is an alternative way to get bundles of gems installed
<GarethAdams> you don't have to use it, but if you were building a project and wanted to list all of the gems it depends on, bundler is a good approach
<hell_razer> GarethAdams: if i typed bundle install in directory app it downloads all needed gems to that directory?
<GarethAdams> kind of
<hell_razer> so that something lijke virtualenv for python?
omry has quit [Remote host closed the connection]
<GarethAdams> virtualenv is more like RVM
<GarethAdams> bundler is specifically for gem management, not whole ruby environments
<GarethAdams> so, if I type `bundle exec my_program`, the only gems available to my_program are the specific versions of the gems which are defined for that project
<GarethAdams> no matter what other gems I have installed.
RichieEvan has joined #ruby
<hell_razer> thnx
vladr has quit [Ping timeout: 248 seconds]
hell_razer has quit [Read error: Connection reset by peer]
Ontolog has quit [Quit: Ontolog]
cantbecool has joined #ruby
vladr has joined #ruby
kyktommy has quit [Quit: kyktommy]
federic has joined #ruby
ZachBeta has joined #ruby
ZachBeta has quit [Client Quit]
wvms has quit [Ping timeout: 255 seconds]
cantbecool has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
pygospa has quit [Disconnected by services]
pygospa has joined #ruby
monkegjinni has joined #ruby
RORgasm has joined #ruby
Helius has joined #ruby
jimeh has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
justin_ has quit [Ping timeout: 265 seconds]
lkba has quit [Remote host closed the connection]
vladr has quit [Ping timeout: 265 seconds]
vladr has joined #ruby
workmad3 has joined #ruby
vectorshelve has joined #ruby
yonggu has joined #ruby
federic has quit [Remote host closed the connection]
tayy has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 250 seconds]
lkba has joined #ruby
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
reuf has joined #ruby
heftig has quit [Ping timeout: 246 seconds]
heftig has joined #ruby
JohnBat26 has joined #ruby
saschagehlich has quit [Remote host closed the connection]
LennyLinux has quit [Ping timeout: 248 seconds]
yonggu has quit [Remote host closed the connection]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
fridim_ has joined #ruby
Axsuul has quit [Ping timeout: 244 seconds]
Squee-D has joined #ruby
Jackneill has joined #ruby
mahmoudimus has joined #ruby
Criztian has quit [Remote host closed the connection]
vladr has quit [Ping timeout: 246 seconds]
vladr has joined #ruby
yugui_zzz is now known as yugui
kozy has quit [Quit: kozy]
RichieEvan has quit [Quit: RichieEvan]
apeiros_ has joined #ruby
<Spooner> I'm passing Float::INFINITY to a C extension and putting it into a float/double with NUM2DBL(), but it is becoming NaN. Any ideas?
gtuckerkellogg has quit [Ping timeout: 255 seconds]
Ionic` has quit [Ping timeout: 248 seconds]
Jackneill has quit [Ping timeout: 244 seconds]
burgestrand has joined #ruby
tiripamwe has quit [Remote host closed the connection]
<Hanmac> Spooner you are right... this is not okay oO
Ionic` has joined #ruby
<Spooner> Quite :)
<banisterfiend> burgestrand: sup burg
mobilegamelabs has joined #ruby
<burgestrand> banisterfiend: \o.
mengu has joined #ruby
owned_ has quit [Ping timeout: 246 seconds]
mobilegamelabs has quit [Client Quit]
saschagehlich has joined #ruby
indian has quit [Ping timeout: 265 seconds]
vladr has quit [Ping timeout: 248 seconds]
workmad3 has joined #ruby
<Hanmac> Spooner ... what ruby version? and can you make me a pastie?
yugui is now known as yugui_zzz
<Spooner> 1.9.3 - Not sure what I would paste (you just want to see snippet, or you need to have something you can run?).
<Spooner> On win64
noyb has quit [Ping timeout: 248 seconds]
<Hanmac> my first test was this: DBL2NUM(NUM2DBL(obj))
<Spooner> Actually also on lubuntu64, whuch is where I'm gdbing it.
vladr has joined #ruby
<Spooner> That does seem to work though :) I'll see if I can throw together a working RubyInline for you (I'm building a gem with rake-compiler).
<Hanmac> ... i test this: (std::numeric_limits<double>::infinity() == NUM2DBL(obj)) and it works :D
<Hanmac> ... Spooner do you want something to suprise? then run this: (1 / -Float::INFINITY) :D
<Spooner> hanmac Ah, I was aware of +0.0 and -0.0 in floats, but I didn't expect them to flop out into Ruby :D
vectorshelve has quit [Ping timeout: 245 seconds]
liluo has joined #ruby
workmad3 has quit [Read error: Operation timed out]
vladr has quit [Ping timeout: 246 seconds]
<Mon_Ouie> You know, there's a much simpler way to write -0.0 in Ruby… that's -0.0 :p
yugui_zzz is now known as yugui
<Hanmac> oO you are right! i thought its resolved to 0.0
<Hanmac> the bad thing is that you cant ask the easy way if an variable is -0.0 :P
<Spooner> value = 0.0 if value == 0.0 # Just to make sure? :D
zodiac1111 has joined #ruby
fuleo has joined #ruby
SqREL has joined #ruby
<apeiros_> value.abs?
justin_ has joined #ruby
<Hanmac> the problem: -0.0 == 0.0 is true, while NaN == NaN is false :D
niklasb has joined #ruby
<Spooner> (-0.0).abs #=> 0.0 # but that seems a bit overkill.
<apeiros_> NaN.abs # => NaN -- I have no idea what you guys actually want, though…
<Mon_Ouie> Is there any reason for having both -0.0 and +0.0?
<Spooner> Hanmac: I have to assume my code is at fault regarding Infinity/NaN, not anything ruby. I'll try to drill down a bit more. Sorry!
<apeiros_> limes changes
<apeiros_> Mon_Ouie: in maths, for some limes expressions where x -> 0 the result depends on whether x starts negative or positive
<Spooner> Mon_Ouie : They are in the IEEE float specification and when I got taught about it I knew why they both existed.
JohnBat26 has quit [Read error: Operation timed out]
<Hanmac> Spooner about -0.0 yeah its possible to make 0.0 out of it, but i cant check if a value is -0.0
<Spooner> It is an implementation detail, not a mathematical one, though.
<Spooner> If I recall correctly.
lkba has quit [Quit: Bye]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
turgu1 has joined #ruby
canton7 has quit [Ping timeout: 246 seconds]
Ionic` has quit [Ping timeout: 240 seconds]
<apeiros_> Spooner: there are mathematical reasons to have pos & neg zero
<apeiros_> compare 1/0.0 and 1/-0.0
jimeh has quit [Ping timeout: 246 seconds]
<Spooner> Running that in Ruby proves that the implementation is that, not that you need it mathematically. However, you are right, there are reasons for it: http://en.wikipedia.org/wiki/Signed_zero
<apeiros_> Spooner: um, no. implementation reflects maths there, not the other way round.
<apeiros_> division by zero is inferred by limes, and if you have 1/x for +x -> 0, then the result is +∞, whereas for -x -> 0, the result is -∞
<apeiros_> meh, seems 'limes' is not used as a term in english…
<Spooner> No idea what it means.
<apeiros_> literally 'limit'
<apeiros_> it means you let x approach 0
<apeiros_> once starting from a positive x, once from a negative x
yugui is now known as yugui_zzz
<apeiros_> and the result differs
<Spooner> I don't disagree, but the effect is because of the limitation of implementation in floats, not in "real" numbers.
<banisterfiend> except if i was doing an actual math exam i would just put '0' in both cases
<apeiros_> Spooner: you're wrong though. and the article you linked to actually mentions it.
<apeiros_> "Negatively signed zero echoes the mathematical analysis concept of approaching 0 from below as a one-sided limit,"
<apeiros_> as I said, implementation echoes maths there.
<banisterfiend> apeiros_: same article always says this: "On the other hand, the concept of signed zero runs contrary to the general assumption made in most mathematical fields (and in most mathematics courses) that negative zero is the same thing as zero. "
<apeiros_> banisterfiend: I think that's poorly worded, since "negative zero and positive zero should compare as equal"
<apeiros_> anyway, may want to talk with an actual math master about that :-p
mohits has quit [Read error: Connection reset by peer]
<banisterfiend> apeiros_: note that the 'negative 0' is just used in a limit notation to show which direct 0 is being approached from. It's not actually saying that a 'negative 0' exists as a mathematical concept distinct from just 'zero' afaict
<banisterfiend> which direction*
<apeiros_> yes, as I said
<apeiros_> right from the beginning
perry is now known as perryh_away
lxsameer has joined #ruby
liluo has quit [Remote host closed the connection]
SqREL has quit [Remote host closed the connection]
<Spooner> 5 * -0.0 => -0.0 /// 5 * -0 => 0 /// Makes good mathematical sense? :D
<banisterfiend> Spooner: because only floats have a concept of negative/positive zero
<banisterfiend> fixnums dont
<apeiros_> Spooner: you may want to visit some math classes in your local university :-p or talk to a mathematician. not everything about maths is intuitive.
<banisterfiend> it's a quirk of floats
<Spooner> Oh well, I have to give up. -0.0 has a reason to be, even if it is only in certain circumstances.
<apeiros_> and I'm by far not qualified enough to properly explain the reasons and implications.
<Spooner> And yes, I am not a mathematician :/
<banisterfiend> Spooner: it's probably mentioned in the IEEE float page on wikipedia
<banisterfiend> the rationale for negative positive zero and so on
RORgasm has joined #ruby
blacktulip has joined #ruby
turgu1 has quit [Ping timeout: 240 seconds]
RORgasm has quit [Ping timeout: 246 seconds]
potato333 has quit [Quit: Page closed]
Squee-D has quit [Quit: The computer fell asleep]
justin_ has quit [Ping timeout: 246 seconds]
mucker has joined #ruby
AndChat| has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
emmanuelux has joined #ruby
zodiac1111 has quit [Ping timeout: 248 seconds]
baphled has quit [Ping timeout: 244 seconds]
wrapids has joined #ruby
schaerli has joined #ruby
nachtwandler has joined #ruby
freeayu has quit [Ping timeout: 248 seconds]
<wrapids> I'm starting a fairly large project, and was interested in using rails. I've been trying to find reasons to leave PHP/Zend to use rails instead. Rails is supposed to be robust and easily readable and maintainable vs PHP. I can't help but to notice some problems with that. For instance variable declaration. $x is obviously a variable in PHP, whereas x could be a number of things in ruby. The same could be said with properties and methods. $x
<wrapids> ->y/$x->y() whereas ruby simply has x.y . These are just the examples I have with my limited knowledge of ruby (I'm not bashing it). What is it that makes ruby easier to maintain, what makes it more readable? Why should I choose rails over zend? I'd like to broaden my approach and learn a new language (ruby) but I'm not sure of it's benefits or long term usefulness.
tama has joined #ruby
<banisterfiend> wrapids: i assume, based on that, that PHP is the only language you know? :) Most langauges dont have the $ sigil, and they get along just fine
<banisterfiend> wrapids: however, ruby does use the @ sigil for instance variables
<wrapids> banisterfiend, That's just an example. I'm familiar with c and java as well, a little experience with some lower level languages and python.
<banisterfiend> wrapids: @x is guaranteed to be an ivar
<apeiros_> wrapids: that x can be either a method or a variable is in practice only a problem if you create dozens of lines long methods. as long as you code sanely it's practically never an issue.
reuf has quit [Quit: Leaving]
freeayu has joined #ruby
<wrapids> And sorry I'm bothering you with this, Google results seem very biased in phps favor, but it makes sense as it also seems that statistically php developers are more common
<banisterfiend> wrapids: i assume why they say rails is more maintainable than zend is more to do with the architecture/design of the framework than with the syntax of the language
<wrapids> banisterfiend, I can't be too sure of that, my experience with the Zend framework has shown that it is highly maintainable, it has a very modular design. As I said also though, I have no experience with rails, and not much more with ruby
<apeiros_> wrapids: as to why ruby is easier to maintain: people.sort_by { |person| person.first_name }
<apeiros_> show me the equivalent code in php
lxsameer has quit [Ping timeout: 240 seconds]
<wrapids> apeiros_, Yes, it does seem to have quite a bit built in, I don't see how that makes it more maintainable. Although it does save quite a bit of time to not have to worry about such.
<banisterfiend> wrapids: less boilerplate == less code to maintain, i guess :)
<wrapids> banisterfiend, true
<apeiros_> wrapids: you don't see how 10k lines vs. 100k lines of code are easier to maintain? are you serious? :)
<apeiros_> I mean I guess if all your projects stay below 1k line even with boilerplate - sure. but maintainability of baby projects isn't an issue in any language I'd say.
zodiac1111 has joined #ruby
<apeiros_> also, it's not just about *less* code. it's also about *readable* code. you write code once, you read it ten times.
<apeiros_> and `people.sort_by { |person| person.first_name }` leaves little questions open.
<apeiros_> the code is concise - not only short, but also expressive.
<wrapids> apeiros_, If you're familiar with the syntax :p
<apeiros_> wrapids: not true
<wrapids> apeiros_, I mean, I know what it does for the most part.
<apeiros_> anybody who knows english will be able to guess what this does.
<wrapids> apeiros_, But I am curious as to the purpose of the pipe character, as well as what 'person' is
<wrapids> I suppose the sorted list is being stored in the variable person?
<apeiros_> no, the sorted list is returned by this expression
<wrapids> What is person?
<apeiros_> people -> person - you get a single person out from the people collection
cads has quit [Ping timeout: 246 seconds]
<apeiros_> and you tell sort_by that the value to sort_by is person.first_name
reuf has joined #ruby
<wrapids> If I'm not mistaken then, this returns the value but doesn't save it in the persons collection? In this case {...} is iterated upon? The abstraction is confusing me I think.
<apeiros_> yes. {} is a piece of code that is evaluated once for every person in the people collection. and no, as said, the sorted list is the return value of the expression. it is not stored anywhere.
<apeiros_> you can use sort_by! to sort people in-place. or you can reassign: sorted_people = people.sort_by…
<wrapids> apeiros_, I belive that is what I sad?
<wrapids> It returns the value but doesn't save <-quote
<wrapids> well, this returns*
<apeiros_> yes, I confirmed your assumption
<wrapids> Ah
gry has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<wrapids> I imagine since the language was influenced a great deal by readability and ease of developoment that |...| or <...>.fistName could vary? Could you give me an example?
<Hanmac> i tihnk this is the shortest :P people.sort_by &:first_name
<wrapids> As in { |this| that.firstName}
lxsameer has quit [Max SendQ exceeded]
<apeiros_> people.sort_by { |p| p.first_name }
<apeiros_> the || contain the arguments passed to the {} code block
mpereira has joined #ruby
<Mon_Ouie> On a sidenote, the convention is ruby is to use snake_case over camelCase
<apeiros_> just the same as with a function in php, where you have function($person) { … }
<wrapids> Mon_Ouie, I'll keep that in mind
<apeiros_> wrapids: do you know javascript?
<wrapids> apeiros_, I think I understand
<wrapids> apeiros_, Bits and peices. Most of my experience is with php frameworks. I've used it here and there but nothing too in depth.
<apeiros_> js: people.sortBy(function(person) { return person.firstName }) --> ruby: people.sort_by { |person| person.first_name }
<apeiros_> if that helps
<wrapids> apeiros_, lol Nope :D
<apeiros_> too bad :)
ij has joined #ruby
<wrapids> Oh, well hang on I missed the first lien somehow
<wrapids> I have a rough idea
<ij> How does ruby know it has to search for stuff in ~/.gem, if ~/.gem isn't in $:
<apeiros_> ij: rubygems patches Kernel#require
<Tasser> ij, it shouldn't
<Tasser> oh
<apeiros_> and rubygems doesn't rely on $:
<ij> Sweet.
<apeiros_> ij: run `gem env` to see where gem looks for gems.
<Tasser> apeiros_, it changes $: for soe point
<Tasser> ehh at some point
<apeiros_> Tasser: yes, at the moment a gem is activated
<wrapids> apeiros_, That's another question I suppose that I have, I've deployed a couple of rails products and I'm not sure exactly what gems are. My experience with it I guess you could say is purely from a sysadmin perspective.
kyrylo has left #ruby ["WeeChat 0.3.8"]
<apeiros_> wrapids: gems are just code packages
<Tasser> wrapids, ruby packages
umttumt has quit [Remote host closed the connection]
<wrapids> Oh
<apeiros_> similar to .rpms, e.g.
<ij> How can I make X use rubygems and find stuff in ~/.gem? I required rubygems, but it didn't do the trick.
<apeiros_> rubygems also comes with a search & load mechanism for that code. php's rough equivalent is pear.
<Tasser> ij, example code?
mpereira has quit [Ping timeout: 248 seconds]
<Tasser> ij, you could tinker around wiht $GEM_PATH
<apeiros_> ij: GEM_PATH env variable is read by rubygems
mneorr has joined #ruby
<apeiros_> but I don't think it's advisable if you mess with that stuff yourself unless you know what you do.
<ij> Myeah, well I would know how to use GEM_PATH, but that seems wrong.
<apeiros_> well, ~/.gem needs the right structure
<ij> Gem created it.
<apeiros_> o0
Criztian has joined #ruby
<apeiros_> then gem should install stuff in there and requiring from there should work just fine…
<ij> Me calling ruby: http://sprunge.us/ARbJ?c
zommi has joined #ruby
JohnBat26 has joined #ruby
mdszy has joined #ruby
vladr has joined #ruby
mneorr has quit [Quit: Leaving.]
<wrapids> I'm doing some reading and playing around with this a bit. The resource I've found says that Time.new's hour attribute should return 0-7 with 0 being sunday. I'm gettinig a 7 for sunday it looks like.
grekkos has joined #ruby
grekkos is now known as Guest72861
reuf has quit [Read error: Connection reset by peer]
<wrapids> Actually, that would be a too tired mistake on my part
vladr has quit [Quit: leaving]
<shevy> wat
<shevy> .hour returns the hour of the day
<shevy> Time.now.hour # => 14
<ij> apeiros_: Any ideas?
<shevy> Time.now.wday # => 0
<wrapids> shevy, I screwed that all sorts of up in my head, my code, and on here. I meant to say the wday was returning 7. I was calling hour in my code instead of wday.
<wrapids> shevy, It's about 730 and haven't been to bed yet. My thought process isn't at its best
<apeiros_> ij: a bit busy, but check Gem.paths.path instead of shelling out. maybe your required rubygems picks up different settings (for whatever reason)
etehtsea has joined #ruby
Criztian has quit [Remote host closed the connection]
<shevy> wrapids: well you can always look at the method names ;)
<shevy> if .wday would return hours then this would indeed be strange
<apeiros_> (Gem.paths.path corresponds with the output of "GEM PATHS" from `gem env`)
<shevy> In the future I will only code when drunk
<shevy> that's quite some path in there
<shevy> going to file a suggestion to use Gem.paths.paths.path
wvms has joined #ruby
<wrapids> If I were to want to print two integer variables from one line, how would I do that?
<apeiros_> wrapids: depends on how the output should look
<apeiros_> puts "#{var1} #{var2}"
<apeiros_> or: puts var1, var2
<apeiros_> or: p var1, var2
yugui_zzz is now known as yugui
<apeiros_> or: printf "%5d %5d\n", var1, var2
yugui is now known as yugui_zzz
fixl has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<wrapids> apeiros_, You keep that last one away from me
<wrapids> Is there a strikeout in your W?
<apeiros_> printf? that's quite useful for simple textual reports
<wrapids> Oh god, yeah keep that away.
<apeiros_> my W?
<wrapids> Hrm... %5d %5d_W_n?
<ij> wat
<apeiros_> \n ?
<wrapids> Yes, that
<apeiros_> backslash n
<wrapids> Oh
<wrapids> \
<apeiros_> your irc client doesn't properly display backslashes?
<wrapids> Hrm.
<wrapids> apeiros_, xchat, and apparently no
<apeiros_> that's quite a problem in a programming related channel… :)
<ij> Get weechat.
<wrapids> ij, It's moot, I'll be switching this box to *nix pretty soon
<apeiros_> wrapids: iirc xchat has settings to interpret some backslash-sequences
<wrapids> At least for everything that should involve using IRC
<wrapids> apeiros_, If it doesn't by default somethings wrong.
<ij> apeiros_: I noticed that it's searching in .gem/ruby/1.9.1 instead of 1.9.3.
<apeiros_> wrapids: agreed. defaulting to process backslashes is rather bad…
zommi has quit [Ping timeout: 250 seconds]
Spooner has quit []
maahes has joined #ruby
mneorr has joined #ruby
<shevy> xchat is nice
<shevy> I am on weechat right now and I hate it
<ij> Why?
<shevy> I don't get a nice and simmple overview with it
<shevy> I only have this horribly small blue status bar
* ij shrugs.
<wrapids> I much preefer konversation
<shevy> that one I couldn't stand much
<ij> Oh, god.
<wrapids> lol oh?
<shevy> if ruby-gtk wouldn't break for me every half a year, I'd write one in ruby-gtk
* apeiros_ has yet to find an irc client which makes him happy
<shevy> maintaining bindings in ruby seems way much work. I wonder why python is ahead of ruby here
<ij> apeiros_: Where does rubygems' version of require exist?
<wrapids> If I'm not mistaken, gnome is being phased out is it not?
andrewhl has joined #ruby
<wrapids> I believe Ubuntu and Arch are already trying to move away
<apeiros_> ij: in irb, run: method(:require).source_location
zastaph has joined #ruby
<apeiros_> ij: you may want to talk to drbrain in #ruby-lang, he maintains rubygems
cloud|windoze has joined #ruby
<apeiros_> meeeh, js… all those creepy is* has* get* and set* prefixes again :(
kirun has joined #ruby
<wrapids> Actually now that I think about it, it's ubuntu time again
<shevy> ewww ubuntu
<shevy> the distribution that hates ruby
<wrapids> shevy, Oh?
<shevy> sure. they hate gems
<shevy> it provides an out-of-distribution way to handle dependencies
<Tasser> shevy, debian hates gems
<shevy> yeah
<Kwpolska> ubuntu, the distribution that is hated by everyone with a bit of skills in linux
<wrapids> shevy, Recommendations?
<Tasser> wrapids, archlinux
<shevy> wrapids: not very useful ones. I say all distributions must die but this is the minority opinion
<Tasser> # --user-install is used to install to $HOME/.gem/ by default since we want to separate
<apeiros_> wrapids: ask 20 people. get 20 different replies. enjoy.
<Tasser> # pacman installed gems and gem installed gems
<Tasser> gem: --user-install
<Tasser> archlinux solution to rubygems :-)
<shevy> wrapids: my main complaint is that debian/ubuntu change gems, and modify ruby, then people come here and ask how to update ruby, or make things work with gem. it is unfair to put the burden on other people, and the developers who made those changes are to blame
Spooner has joined #ruby
objlinks has joined #ruby
<objlinks> hello rubyists
<wrapids> shevy, Would, RVM(Not sure that's correct) be a proper solution to that problem?
<shevy> if debian would work, RVM would barely be needed :)
<ij> What doesn't hate gems?
<objlinks> i came across an example like, search(:titles, name: 'abc')
<shevy> wrapids: it's an improve compared to debian, it's not really a good solution IMO. or, it won't be needed for everyone. I for instance install gems on my own, compile ruby always from source etc...
<objlinks> they have mentioned that ':titles' is return value
<wrapids> shevy, I don't forsee any problems then
<Mon_Ouie> ij: Rubyists? Gold miners?
<objlinks> can someone pls explain me?
<shevy> with RVM? people didnt like it and preferred rbenv
<shevy> so we are then back to what apeiros_ wrote, ask 20 people, get at least 20 different replies ;)
* apeiros_ likes rvm
<wrapids> shevy, My experience with ruby on Ubuntu hasn't involved aptitude
<wrapids> shevy, Everything from source, or using bundle
<objlinks> if seach method return a single or arrray of values, it will be stored in titles?
<shevy> wrapids: but then you already work in the outside-distribution world
joast has quit [Ping timeout: 244 seconds]
<shevy> I am surprised that system ruby works for you easily
<wrapids> shevy, ?
<wrapids> shevy, Works easily? no. I've had nothing but problems with it.
<shevy> ah ok
<wrapids> shevy, That's not even development, just from a sysadmin perspective
<shevy> thought everything was fine, which surprised me cuz I wondered why people here had problems before. I would not know as I don't use debian myself
nai has quit [Remote host closed the connection]
<wrapids> shevy, There may be ruby problems, but ruby is a small portion of what I'll be doing.
avandendorpe has quit [Quit: Connection closed for inactivity]
<shevy> hehe
<wrapids> php works just fine with debian :p
<shevy> they like php more I suppose
<shevy> but then again php is used more widely than ruby too
<wrapids> shevy, By a fairly large margin from what I was reading
<shevy> yeah
<shevy> if I were matz I'd focus on the www first, before doing mruby
<wrapids> But I'd rather not have to deal with zend outside of work at this point
<wrapids> I'd like to see rails destroy php
<shevy> not going to happen
<wrapids> The frameworks are painful. At least zend is.
<shevy> rails is too specialized
<wrapids> shevy, How so?
<shevy> ruby would have to compete with php directly for the www
<wrapids> Why couldn't rails?
<shevy> wrapids: rails forces you into a specific working mode
<shevy> php does not really
Gurpartap has joined #ruby
<shevy> php is like the ultimate www glue
gtuckerkellogg has joined #ruby
<wrapids> I don't see how any of the php frameworks are different than rails
Maher4Ever has joined #ruby
<shevy> phpbb mediawiki ... i dont see any equivalents here
<Gurpartap> i don't see how any of the frameworks are different from mvc
CmdrTallen has joined #ruby
<Gurpartap> (in context of what wrapids said)
<Gurpartap> hi all
<wrapids> shevy, that's just a matter of the software hasn't been written.
<wrapids> shevy, If rails grows in popularity, it will come
alekst has joined #ruby
<Gurpartap> and then ruby will become the next php
Sweet-P has joined #ruby
budhram has joined #ruby
budhram has quit [Client Quit]
<shevy> wrapids: rails has been popular since many years
<wrapids> I'd like to see it happen personally. I'm not very capable with ruby at this point, but I have a fairly strong dislike for php at this point. That may just be magento at this point though.
<Hanmac> Gurpartap: you could use ruby without rails, but you could not use php without php :P
<shevy> but I just dont see any real replacement for mediawiki or phpbb. one replacement for trac that I see used more and more is redmine
<Hanmac> imo mediawiki is not THAT bad
<wrapids> shevy, I don't care. It's the community's fault. For instance spree vs magento.
indian has joined #ruby
owned_ has joined #ruby
<Gurpartap> Hanmac: i never talked about rails :p
<Gurpartap> Hanmac: although in that context, it would be comparable to php frameworks like symphony etc
<wrapids> If the features for spree were more robust on the business end magento would be phased out
<Gurpartap> it's a messy discussion
<shevy> if rails would be integrated into ruby, now that would change things :)
* Hanmac thinks that he should write a wiki software in ruby
<apeiros_> that'd make no sense
jonathanwallace has quit [Remote host closed the connection]
budhram has joined #ruby
<Gurpartap> Hanmac: the ruby zombies will come for you
<Gurpartap> since ruby community's all about making frameworks and letting individual developer make a wiki or forum out of it
<Gurpartap> :p
<shevy> one just has to look at the days when we did not have rubygems
<Gurpartap> you know better
<Gurpartap> meh
<shevy> then in 1.8.x one had to do require 'rubygems'
<shevy> nowadays it just works
<wrapids> Gurpartap, Could you explain the making frameworks and letting individual developers statement a bit?
<wrapids> I'm not familiar with ruby's conventions
<Gurpartap> wrapids: the ruby community does not create one off packages that let you make a forum or wiki
<Gurpartap> wrapids: what they make it the building blocks, which forms a framework in total
<Gurpartap> wrapids: using these blocks, you can tube them together to form a wiki or anything desirable
<Gurpartap> wrapids: that is why this community survives
<Gurpartap> and of course, there's more to do in ruby than just work on/with frameworks
<wrapids> Gurpartap, I was under the impression that rails essentially WAS the framework
<shevy> my take is that rails does not make things really as simple as they ought to be
<Gurpartap> wrapids: it's the most popular one, that's all
* Hanmac could make a ruby forum software from nothing
<shevy> Hanmac: on my todo list too!
<Gurpartap> wrapids: if you have used drupal (php) in the past, you might realize that with each new version and the major modules, they want to abstract things into building blocks
<Hanmac> shevy next to a ruby wiki?
<shevy> there are two ways to climb a mountain
<shevy> one is to prepare to walk over it, the other one is to be lazy, not train mountaineering and instead make the mountain smaller :P
<wrapids> Gurpartap, My experience with web developoment is rather shallow, my framework experience is limited to zend at this point.
<shevy> Hanmac: yeah!
<Gurpartap> shevy would take the helicopter option
<Hanmac> shevy c) elevator
<rking> shevy: Federated Wikis are going to replace regular wikis, and BTW the reference server for it is in Sinatra
<shevy> Hanmac: but many other things come first. I am rewriting my biggest ruby project still, I think it will take a few more days before I will make it a gem (for its first time btw, no idea how to do that yet, it's quite huge, I even split it into two separates projects with different concerns now)
dpollen has joined #ruby
<shevy> Gurpartap: yeah helicopter, but perhaps that option is too expensive
<shevy> there are always tradeoffs
<Gurpartap> wrapids: the community here wants to "program" everything
<shevy> in ruby I want to be lazy
<Gurpartap> wrapids: unlike in php where everything is programmed and you just have to go through an installation wizard putting in the mysql details etc
<Gurpartap> anyone here wants to do a proof reading of my gem?
<Gurpartap> *an unreleased gem*
<Gurpartap> i need some opinions on the conventions i'm assuming/using
<wrapids> Gurpartap, I don't see why. If you need a particular set of software, and the software exists to your needs. Why not just use it?
<wrapids> Reinventing the weel is pointless.
objlinks has left #ruby [#ruby]
<wrapids> wheel*
jimeh has joined #ruby
<shevy> Gurpartap: sure. can you use pastie.org just for one or two .rb files. and perhaps a link to the main docu?
<Hanmac> shevy: how to get on a mountain: the ruby way: sitting on the back of a C-guy
<wrapids> Unless you invent it better
<Gurpartap> wrapids: yeah but i want to change the alloy material in that wheel
<Gurpartap> wrapids: in that case editing a php project would suck
<shevy> Hanmac: yeah. I like it too. I'd wish ruby could replace C one day too
freeayu has quit [Quit: This computer has gone to sleep]
cloud|windoze has quit [Quit: Leaving.]
<Gurpartap> wrapids: and if that php project has a framework underneath, which lets your edit using plugins/modules, then why not just learn from ruby (or something) and program yourself?
<wmoxam> shevy: lol wat
<wrapids> Gurpartap, Well take for example my previous one. Magento. That would be pointless.
<Gurpartap> wrapids: what's pointless?
<Gurpartap> magento is a fine software
<wrapids> Gurpartap, No.
<Gurpartap> sometimes you do need such packages
<wrapids> Gurpartap, Don't you ever call it that.
<wrapids> From the business end it's great. From the developer standpoint it's a total disaster
budhram has quit [Quit: Page closed]
<wrapids> Which is why I'm here in #ruby
<Gurpartap> shevy: there are 19 entries for lib/**/*.rb
<Gurpartap> wrapids: that's what i have been saying :)
<Gurpartap> some people want to get work done without programming
<wrapids> Gurpartap, I may have misunderstood your statement then. Software like Magento is not a framework. It's essentially a finished package.
<Gurpartap> ruby community has the least of such people
RORgasm has joined #ruby
<wrapids> As far as that goes, you don't program in magento. You hack it and pray.
Spooner has quit [Ping timeout: 246 seconds]
<wrapids> Gurpartap, If that's the case then what would be wrong with ^person^ creating a wiki software? I suppose that's what I'm confused about.
<shevy> Gurpartap: hmm a bit too much to read it all... how about just one or two .rb files for me to look at and the main documentation?
<shevy> or
freeayu has joined #ruby
<shevy> you make it a gem already, then I download it all and have a look, then I can give feedback
<shevy> I am really lazy :P
<shevy> wrapids: we need to be ambitious
<wrapids> shevy, I don't see what that has to do with wiki software -.-
<shevy> if ruby is to dethrone php it needs to (a) offer the same amount of quality working where php is strong at (I suppose only the www area) and (b) provide good alternatives to the lead showcase apps... phpbb mediawiki... dunno what else, probably a few more php frameworks
<shevy> wrapids: well. there is nothing that really comes close to replace mediawiki
<wrapids> Right. A good wiki software would do as such.
<Maher4Ever> Hey there, I'm developing a ruby gem which would hopefully make it into 'guard/listen' (used in Guard and SASS). I'm curious what ruby developers think about it's API so could you please look at this gist I made: https://gist.github.com/3116933
<wrapids> shevy, it's not just a matter of getting people to switch, it's a matter of getting new users. That's a matter of advertising and a great deal with the private sector.
<shevy> wrapids: do you know TWiki? I hate that thing
Spooner has joined #ruby
<shevy> there was an even worse wiki years ago... phpwiki
RORgasm has quit [Ping timeout: 246 seconds]
<wrapids> shevy, Nope.
<shevy> man that thing SUCKED...
<shevy> TWiki is like mediawiki... 8 years ago hehe
<wrapids> There's plenty of crappy php everything. There's just so much some of it has been good.
<wrapids> Magento is turning a lot of us away from php ecommerce however.
<wrapids> A few guys in #magento are doing some work with getting magento-type functionality put into spree to push it along.
ben_alman has quit [Excess Flood]
* Hanmac could write a wiki in C
fantazo has joined #ruby
<wrapids> Trying to move something like 220 stores over at the moment.
burgestrand has quit [Quit: Leaving.]
dpollen has quit [Quit: dpollen]
<wrapids> We're all hoping it can make a difference of some kind and get people off of that trash softwar
akem has joined #ruby
workmad3 has joined #ruby
<shevy> whoa I just noticed
<shevy> TWiki is written in perl, or at least requires it
<shevy> "Ensure that Perl 5 and the Perl CGI library are installed on your system. "
<shevy> now I am no longer surprised that I dont like it at all
mmsequeira_ has joined #ruby
bier has quit [Ping timeout: 265 seconds]
mmsequeira_ has quit [Client Quit]
<Hanmac> "this software runs on ruby 1.8, but it could be more worse"
mmsequeira_ has joined #ruby
<shevy> lol
alekst has quit [Ping timeout: 248 seconds]
<shevy> I find ruby 1.8 much better than any perl
hackeron has quit [Read error: Connection reset by peer]
<Maher4Ever> Could you please look at the following gist and give me your feedback? https://gist.github.com/3116933
vertroa has joined #ruby
<Maher4Ever> It's for a ruby C extention to monitor changes in directories on Windows
fowl has quit [Ping timeout: 248 seconds]
<shevy> puts "#{change.type.to_s.upcase}:
<shevy> hmm
ben_alman has joined #ruby
seanstickle has joined #ruby
<Maher4Ever> shevy: change.type is a Symbol :)
<Hanmac> Maher4Ever ... either \\ or / in the path
<shevy> yeah, still a bit odd. one usually uses #{} to avoid having to call .to_s manually
<shevy> in this example you could even do:
<shevy> puts change.type.to_s.upcase+':
vlad_starkov has joined #ruby
<shevy> I'd replace all 'C:\Users\Maher\Desktop\test' with one constant btw
<shevy> WATCH_THIS_TARGET = 'C:\Users\Maher\Desktop\test'
<Maher4Ever> Hanmac: I know, but I made this very quickly so I did it wrong. The gem takes care of replacing / to \ internally and \ to / when it reports the change to the user
<Hanmac> it was my fault ... i thought it were "" strings
<Maher4Ever> shevy: Great idea! I just wanted to get feedback from ruby devs about the options I listed below, which one do you prefer?
<Hanmac> when you replace ther change.type.to_s with an hash or something, you could use i18n :P
<Hanmac> Maher4Ever: does multible WDM::Monitor instances make sense?
mmsequeira_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
<shevy> Maher4Ever: the one to have to type the least of course :)
<Maher4Ever> Hanmac: yeah, in multiple threads for example... it's thread safe
<shevy> though
<shevy> I'd even prefer just one method instead
<shevy> monitor = WDM::Monitor.new <-- could be a MONITOR constant
<shevy> and then somethingl ike
<shevy> watch_this("some/path")
bier has joined #ruby
<shevy> and perhaps handle the block in it
<shevy> watch_this("some/path") { do_this; puts 'yippie ey yo'; end_this }
<Hanmac> i think: WDM::Monitor.watch("path"){ ... } or WDM.watch("path"){ ... } could be fine too
<Maher4Ever> shevy: you could do that now, but an instance of the monitor class is needed: WDM::Monitor.new.watch('path') { ... }
<Maher4Ever> the instance is needed because in Guard we might need multiple instances of the monitor
<Maher4Ever> so that if a thread is killed, other monitors won't be stopped
bowlowni has joined #ruby
<Maher4Ever> BTW: if you don't know what Guard is, check it out :) http://github.com/guard
raluxgaza has joined #ruby
* Hanmac mostly does not care about thread safe, because the libs i bind a mostly non-thread-safe too
<wrapids> Generally accepted method of string concatenation in ruby?
bowlowni has quit [Ping timeout: 250 seconds]
<wrapids> Essentially as string += stringtoadd
Mchl has quit [Quit: ZNC - http://znc.sourceforge.net]
omry has joined #ruby
<Mon_Ouie> That's if you want to create a new string. If you want to mutate an existing string, it would be string << string_to_add
<wrapids> Mon_Ouie, Thank you
<shevy> wrapids: use <<, also for arrays.
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<shevy> foo << 'lala'
Mchl has joined #ruby
<wrapids> shevy, To add a new element, or to append to an existing?
cads has joined #ruby
<shevy> both appends here
<shevy> with += you create a new object
<shevy> with << not
<wrapids> Would string << addstring create string if it does not already exist?
<GarethAdams> wrapids: no
ashp has joined #ruby
<wrapids> doing something like string "" seems dirty, what would I want to do there?
lxsameer has quit [Max SendQ exceeded]
<GarethAdams> wrapids: << isn't exclusive to strings, so it wouldn't know what to create
<shevy> wrapids: << is a method call
<shevy> your object has to exist for this to work
<ashp> I'm hoping someone can help me with a bit of regexp - I have a file, /etc/ssh/ssh_host_ecdsa_key, and a regexp I'm using against it: /.*(ecdsa|rsa|dsa).*/
<shevy> non_existing_bla += 'lala' would not work either if non_existing_bla is nil
<Mon_Ouie> string += foo creates a new string because it expands to string = string + foo
lxsameer has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
<ashp> $1 only ever becomes dsa as it keeps going to the smallest match - is there a way I can make it more specific?
<Mon_Ouie> i.e. it changes the objects the string variable references
<shevy> wrapids: your objects must exist, before you can invoke a method on them
<ashp> I want to effecitvely say "stop at first match."
<wrapids> I've basically got while line = file.gets append line to string
<Mon_Ouie> ashp: That's because .* is greedy, use .*?
lxsameer has quit [Max SendQ exceeded]
<shevy> wrapids: I hate while loops :)
<Mon_Ouie> Or just use /ecdsa|rsa|dsa/, actually
<shevy> only for loops are worse
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<wrapids> shevy, I'm unaware of the alternatives.
obryan1 has quit [Ping timeout: 246 seconds]
<GarethAdams> wrapids: is `file` an actual File? as in, on disk?
<wrapids> GarethAdams, yes.
<GarethAdams> wrapids: then just file.read
<ashp> Mon_Ouie: If I just use /ecdsa|rsa|dsa does it set $1 to the entire match?
<shevy> wrapids: I dunno what you do. I use loop { user_input = gets.chomp } usually. or, actually, I put this into a method, where I then decide what to do. if the argument given is a file, then I can read that one in
lxsameer has quit [Max SendQ exceeded]
<GarethAdams> wrapids: that will give you the whole file as a string
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Mon_Ouie> ashp: No, but you don't have to use a capture group. You can get the entire match directly.
raluxgaza has quit [Remote host closed the connection]
<wrapids> GarethAdams, That is what I will do for this then.
<wrapids> shevy, What terminates that loop?
habib has joined #ruby
<ashp> Mon_Ouie: How do I refer to the entire match? that's what I'm unsure about
<Mon_Ouie> You can use string[regexp]
mengu has quit [Ping timeout: 252 seconds]
lxsameer has quit [Max SendQ exceeded]
<habib> hey
<Mon_Ouie> Or the $& variable (but I had to search for its name, so I'd recommend the former, clearer solution :p)
liluo has joined #ruby
<habib> what ruby ide do u use in linux?
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<habib> exept vim
<ashp> Mon_Ouie: Sorry if I'm just being dumb, http://pastebin.com/Gzt46FXF is the code in question. What I'm trying to do is a regexp on the file and then use that to build a sshkey variable
<Hanmac> habib i use eclipse for my bindings
<habib> what is bindings?
<ashp> Mon_Ouie: so I'd do the if file =~ etc, then use it again later like Facter.add(file[/regexp/]) or something?
<GarethAdams> Mon_Ouie: $& is also called $MATCH, but avoiding the globals is still better
lxsameer has quit [Max SendQ exceeded]
<Mon_Ouie> GarethAdams: Is it? $MATCH is nil here
lxsameer has joined #ruby
<shevy> wrapids: I usually use break for that
<Hanmac> habib c++ bindlings from c++ libs
<Mon_Ouie> And I'm pretty sure there's no alias, since rb_protect(eval_code, Qnil, &error);
<GarethAdams> oh, http://ruby.runpaint.org/globals lists it as method-local which I'm guessing means inside the block of a gsub, for example
<Mon_Ouie> global_variables.find { |g| eval(g.to_s) == "ecdsa" }*
<shevy> wrapids: or a large case menu, then exit
<wrapids> shevy, You mean like if string = x break?
<Mon_Ouie> (damn those two different clipboards actually)
<shevy> wrapids: kinda but I use methods usually. and really large case when structures
<Mon_Ouie> The previous code only prints one variable here, when using select
<shevy> loop { user_input = gets.chomp; break if user_input == 'q' } # for a simple example
<GarethAdams> hmm
choffstein has joined #ruby
<Mon_Ouie> You could of course do alias $MATCH $& if you wanted
VegetableSpoon has joined #ruby
<GarethAdams> Mon_Ouie: ah, you have to require 'english' to get english names of globals
lxsameer has quit [Max SendQ exceeded]
<Mon_Ouie> And for the record, they're not really "globals" — even though they use the same syntax as globals
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Hanmac> i never used $& or something similar, i prefer the matchdata object
<GarethAdams> > require 'english'; "foo".match(/o+/); $MATCH # => "oo"
VegetableSpoon has quit [Client Quit]
lxsameer has quit [Max SendQ exceeded]
<GarethAdams> but yes that's a technicality, not a style guide
VegetableSpoon has joined #ruby
lxsameer has joined #ruby
<Mon_Ouie> It's odd that some of those special variables are aliased in core, and some aren't
<Mon_Ouie> (e.g. $LOAD_PATH is in core)
VegetableSpoon has quit [Client Quit]
lxsameer has quit [Read error: Connection reset by peer]
VegetableSpoon_ has joined #ruby
<shevy> hmmmmm
<habib> Hanmac, can i use it for pure ruby coding?
<shevy> why do they not want to provide all english aliases already?
<shevy> I can never remember in the slightest what $& means
<shevy> perhaps they thought that $LOAD_PATH is much more important than the other variable names
<Hanmac> habib you could use it too (after you add the plugins for ruby)
<habib> Hanmac, thnx.
<habib> Hanmac, how do i install ruby plugin for eclipse?
<Hanmac> Menu->Help->Install new Software-> select Source, and then type ruby in the search field
<shevy> whoa
<shevy> an eclipse user :)
liluo has quit [Remote host closed the connection]
VegetableSpoon_ is now known as VegetableSpoon
mneorr has quit [Quit: Leaving.]
obryan has joined #ruby
akem has quit [Ping timeout: 250 seconds]
<habib> hey how do i install ruby plugin for eclipse?
<shevy> ack
vertroa has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
mneorr has joined #ruby
<wrapids> I'm liking this quite a bit so far
vertroa has joined #ruby
kedare has joined #ruby
ryan28 has joined #ruby
ryan28 has quit []
oxyxian has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
jimeh has quit [Ping timeout: 248 seconds]
Ionic` has joined #ruby
<habib> does anyone use eclipse for ruby coding?
Fretta has quit [Ping timeout: 252 seconds]
<seanstickle> Hell no
<seanstickle> That's like using a cat for helicopter
<habib> ok i'll use gedit then
Poapfel has quit [Quit: WeeChat 0.3.7]
IceDragon has joined #ruby
louraine has joined #ruby
louraine has quit []
indian has quit [Read error: Operation timed out]
owned_ has quit [Read error: Operation timed out]
Poapfel has joined #ruby
sepp2k has joined #ruby
shevy has joined #ruby
RudyValencia has joined #ruby
<Hanmac> habib didnt i say to you how you install plugins?
abstrusenick has joined #ruby
nateberkopec has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
Icoin has joined #ruby
Guest72861 has quit [Ping timeout: 244 seconds]
LennyLinux has joined #ruby
Draco_ has joined #ruby
Fretta has joined #ruby
mwilson_ has quit [Excess Flood]
nari has quit [Ping timeout: 245 seconds]
mwilson_ has joined #ruby
Fretta has quit [Ping timeout: 246 seconds]
Draco_ has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
emanu has joined #ruby
<wrapids> seanstickle, Hey, don't knock eclipse.
hunglin has joined #ruby
<seanstickle> I am knocking eclipse
<seanstickle> It's a piece of shit
<seanstickle> I knock it!
<wrapids> seanstickle, Any particular reason?
<seanstickle> Almost probably.
<wrapids> habib, Go to help, install new software, all available sites and add ruby to the filter.
<seanstickle> habib: look forward to help from about 2 or 3 people in a community of thousands if you use Eclipse.
<seanstickle> Or use vim or emacs and have the help of a world of good programmers
<seanstickle> :)
<wrapids> lol@ vim/emacs
VegetableSpoon has quit [Quit: Leaving]
<wrapids> habib, Feel free to use whatever IDE/editor you feel most comfortable with.
<seanstickle> That's ok, I am laughing at the prospect of someone using a bloated Java-based local IDE that sucks up memory and scatters tons of "project" files around just to edit some text.
<seanstickle> Well, of course he is free to use what he wants.
<seanstickle> It's not like he needs us to tell him that
<seanstickle> "Feel free" habib !
<seanstickle> You *are* free
<seanstickle> Which doesn't obviate people's desire to ask for opinions and assistance
sailias has quit [Ping timeout: 246 seconds]
vectorshelve has joined #ruby
<wrapids> seanstickle, Ugh so bloated. This isn't some long ago era where software like eclipse is going to make a difference in a put together dev environment. It's like driving out of your way to save 10 cents on gas. My time is worth more than vim.
<seanstickle> wrapids: Feel free to use what you like
<seanstickle> :P
Fretta has joined #ruby
yoklov has joined #ruby
radic has quit [Ping timeout: 248 seconds]
<shevy> hmm
<shevy> I dont like eclipse either
<shevy> but to say the alternative is vim and emacs is also annoying
<mdszy> Neither do I.
<shevy> there ought to exist a level of software between these extremes
freeayu has quit [Quit: 离开]
oscardelben has joined #ruby
<mdszy> shevy: There kind of is. Things like Notepad++
<seanstickle> ed?
<mdszy> Or Gedit or Geany.
<shevy> mdszy: well notepad++ is ok... I also like geany... bluefish ... sublime...
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
* mdszy shrugs, prefers his Vim.
<ctor> vim ftw
<seanstickle> I suppose ed would be even more extreme
<seanstickle> Which makes Vim a nice mean
<mdszy> I tried using emacs. Then discovered it is impossible to get line numbers without writing a boatload of stuff in lisp.
<Hanmac> seanstickle show me another IDE that could manage +100files with syntaxhighlighting, method completion, and with git & hg support
<shevy> see, that's my gripe too
<shevy> emacs is centered around lisp
<shevy> vim centered around its pseudo language
twinturbo has quit [Quit: twinturbo]
<shevy> I want ruby! :(
<mdszy> yep.
<seanstickle> Hanmac: well, I've done that with Vim
<mdszy> Plus, my left arrow key doesn't work.
<seanstickle> Hanmac: so I suppose that's the one I would show you
<shevy> lol
<mdszy> So I really need vim for the cursor movements XD
rakunHo has joined #ruby
<ctor> Do you use vim macros?
<Hanmac> yeah ..."open 100 files with vim and dont lose the orientation - unpayable"
<shevy> I want something closer to an IDE level, without being an IDE. something like a merger of sublime and geany ... but extendible in ruby too... and ideally more features too... while still not being an IDE!
<GarethAdams> shevy: textmate snippets and bundles are mainly written in Ruby
<seanstickle> Hanmac: you're opening 100 files at once?
<seanstickle> Hanmac: maybe you're just not very good at what you do
<shevy> I am stuck with linux mostly :(
<shevy> I tried to go back to windows... but it is too horrible
<Hanmac> no, but but i need to jump fast between that many files
<shevy> GarethAdams: I keep on hearing good things about textmate though
<ctor> Windows is no fun to dev on. I even find my current windows IDE just points to remote servers
<seanstickle> Oh, I just use smart complete and open up the hfiles I want
<seanstickle> When I need them
S1kx has quit [Read error: No route to host]
<shevy> a bit overkill just to get a mac for an editor IMO
<seanstickle> But I suppose if you need some IDE to accommodate a broken workflow, you're welcome to use Eclipse
<shevy> seanstickle: what do you use? vim?
diegoviola has joined #ruby
<seanstickle> shevy: ya
<shevy> interesting, most people here seem to use vim. only few emacsers
<seanstickle> shevy: I have tried (and continue to try) emacs
<Kwpolska> long time vim user here.
<shevy> hehe
<Mon_Ouie> I sometimes do have 100+ files open — because I just never restart Emacs.
<seanstickle> shevy: something just doesn't click
<seanstickle> shevy: I think it's the orthogonal orientation to Unix
<Hanmac> seanstickle: did you write an ruby ext as a binding from an c++ lib?
<seanstickle> Where Vim is quite aligned with Unix
<ctor> Whoa. A sub$300 42'' LCD is today's woot. That would make for a sick tri-monitor setup
<seanstickle> Hanmac: not that I remember
patient has joined #ruby
<shevy> seanstickle: hehe I heard that someone say on #vim a few days ago too. he was using emacs, but annoyed at something. then he said that emacs does not care much about the UNIX philosophy
<shevy> I think it was something with his mobile... he was connected to IRC with emacs or something like that
<seanstickle> shevy: a popular sentiment, I think
<shevy> ctor: you are on windows?
blacktul_ has joined #ruby
blacktulip has quit [Ping timeout: 252 seconds]
ohcibi has quit [Ping timeout: 240 seconds]
<ctor> shevy: I'm on Windows, CentOS and OSX. I have multiple machines running
<ctor> Windows is my primary machine, with SSH opened to the CentOS box if I need to dev
ohcibi has joined #ruby
<shevy> cool
seanstickle has quit [Quit: Nihil sub sole novum]
mdszy_ has joined #ruby
<shevy> I keep on wondering what I ought to do in order to return to windows
seanstickle has joined #ruby
mdszy has quit [Disconnected by services]
<shevy> my gripe is that the default workflow on windows is very annoying for me
mdszy_ is now known as mdszy
<shevy> I'd like to use windows more as a development-station
<shevy> but it feels much more like an office-suite or gaming-platform...
<seanstickle> shevy: Maybe with Windows 8
<seanstickle> shevy: you can use MetroVim
<Kwpolska> seanstickle: what is that?
<seanstickle> Kwpolska: Windows 8?
abra has quit [Remote host closed the connection]
<seanstickle> Kwpolska: the next version of Windows
sailias has joined #ruby
radic has joined #ruby
<Kwpolska> seanstickle: no, metrovim.
<Kwpolska> seanstickle: I know what Windows 8 is and I know it is a piece of shit.
<seanstickle> Kwpolska: Vim done in the Metro framework thing
<Kwpolska> seanstickle: any links?
<seanstickle> Kwpolska: Nope
daster has joined #ruby
<seanstickle> You don't get this thing we call "humor" do you?
<seanstickle> Perhaps on your planet it is outlawed
vectorshelve has quit [Ping timeout: 245 seconds]
Constant_ has joined #ruby
Constant_ has quit [Remote host closed the connection]
tayy has joined #ruby
emmanuelux has joined #ruby
kedare has quit [Quit: kedare]
cakehero has joined #ruby
<shevy> man
<shevy> metrovim sounds gay
<shevy> but yeah, win 8 looks totally like "hey, web apps are cool, we at microsoft jump on the train rather than innovate anything. we have become a copy-cat."
<shevy> as long as ruby will work on it I dont mind too much
emmanuelux has quit [Remote host closed the connection]
<seanstickle> shevy: well, it won't
quest88 has joined #ruby
<shevy> it won't????
<seanstickle> shevy: not on Windows RT anyways
<shevy> !!!
<shevy> how can I use an OS without ruby :(
mdszy has quit [Read error: Connection reset by peer]
<seanstickle> Doesn't work on iOS either
RORgasm has joined #ruby
mdszy has joined #ruby
<seanstickle> That's an interesting change by Matz
<seanstickle> What's the reasoning there?
<amacgregor_osx> can anyone recommend me some good tutorials for building non rails apps ?
<seanstickle> By non-Rails apps, you mean Ruby apps in general?
<seanstickle> Or something else
IceDragon has quit [Ping timeout: 246 seconds]
<amacgregor_osx> yup ruby apps in general, trying to figure out how to create an app properly
<amacgregor_osx> seanstickle: specially since what I'm building is too large to place in a single file
IceDragon has joined #ruby
<mdszy> amacgregor_osx: Learn about changing the loadpath, and then you'll be able to `require` other files into one.
<mdszy> you might also want to make a gem
<Hanmac> use a text editor, add a shebang line, add an exceutable flag to the file and finish ... you created a ruby app
RORgasm has quit [Ping timeout: 246 seconds]
Stalkr_ has joined #ruby
<amacgregor_osx> Hanmac: lol
ConstantineXVI has quit [Remote host closed the connection]
<amacgregor_osx> mdszy: thank you, yeah right now is a bit of a mess how I'm loading my config.yml and the models that I need to use
<abstrusenick> anyone familiar with nginx?
<abstrusenick> why doesn't proxy cache support byte range request?
<abstrusenick> the nginx channel is like so dead
<amacgregor_osx> mdszy: is there a way to have one single file where I load all the gems that my app requires ? Instead of having to add the require 'gem_name' to each class?
Tricks has quit [Read error: Connection reset by peer]
<seanstickle> amacgregor_osx: look into Bundler
<mdszy> ^
emmanuelux has joined #ruby
Tricks has joined #ruby
<shevy> amacgregor_osx: just stick to a basic, simple layout
niklasb has quit [Quit: WeeChat 0.3.8]
<shevy> amacgregor_osx: for instance, a lib/ dir, then the name-of-the-app dir, and a name-of-the-app.rb file at the same level of that named dir
grekkos has joined #ruby
Testy has quit [Ping timeout: 245 seconds]
<shevy> in name-of-the-app.rb you just load the components you need
<shevy> then others can require your app my doing require 'name-of-the-app-here'
grekkos is now known as Guest44160
<shevy> like foo.rb
<shevy> require 'foo'
<amacgregor_osx> shevy: thank that is exactly what I'm looking for
<shevy> amacgregor_osx: I think it becomes much easier for you if you try that on your own
<shevy> or, look at some other .gem how the developers did that
<shevy> often you will find a spec/ directory too
sailias has quit [Ping timeout: 246 seconds]
<shevy> or test/
<shevy> sometimes bin/ too, but not that often
<shevy> I still dont know what to do with documentation... should I put that into its own directory?
<shevy> like README...
cdavaz has joined #ruby
tayy has quit [Ping timeout: 246 seconds]
tayy has joined #ruby
habib has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
zodiac1111 has quit [Ping timeout: 250 seconds]
<shevy> I kinda don't like to have docu files scattered on the base level
<shevy> but what directory to create otherwise? docu/ ? documentation/ ? hmmmmm
nateberkopec has quit [Ping timeout: 265 seconds]
emanu has quit [Quit: emanu]
kidoz has joined #ruby
<Kwpolska> shevy: I use /docs/.
banisterfiend has quit [Read error: Connection reset by peer]
emmanuelux has quit [Remote host closed the connection]
yoklov has quit [Quit: computer sleeping]
banisterfiend has joined #ruby
<amacgregor_osx> shevy: so on my lib/myapp.rb file I would add all the requires for my gems and any initialization configuration needed, while on lib/myapp/ I would have subdirs for models,etc ? and then I would have on my root folder application.rb I can do require 'myapp'
<amacgregor_osx> is that correct or I'm getting confussed?
<Hanmac> use require_relative
<shevy> Kwpolska: hmm.
<shevy> who else uses docs/ ?
tayy has quit [Remote host closed the connection]
<kapowaz> So, I've recently upgraded to Lion and irb has lost history and tab-completion — any ideas why?
<shevy> amacgregor_osx: not needed. you can decide actually. I myself use lib/myapp.rb to load another .rb file, which then does the real require work
nicoulaj has joined #ruby
dhruvasagar has joined #ruby
<shevy> sometimes I even make a require/ directory to put in .rb files there which only load other files
<shevy> and then lib/myapp.rb would require the main .rb file there.
<shevy> amacgregor_osx: I dont really have one single standard right now either :)
nari has joined #ruby
<amacgregor_osx> shevy: interesting, by any chance would you have examples of those setup ? maybe a github project?
<shevy> amacgregor_osx: most important thing to remember is to try to see that require 'name' works for your project
<shevy> sometimes project like bundler break that. require 'bundler' alone does not work for me for instance
<shevy> amacgregor_osx: hehehe not yet! I am rewriting that project right now
<amacgregor_osx> cool
<shevy> I could make it an incomplete gem right now perhaps...
oscardelben has quit [Quit: oscardelben]
<amacgregor_osx> :)
centipedefarmer has quit [Quit: This computer has gone to sleep]
abstrusenick has quit [Quit: abstrusenick]
<amacgregor_osx> this is the first weekend in a while that I had time to do some ruby coding ... really nice chance after working with PHP and Magento for weeks
ctp has joined #ruby
ConstantineXVI has joined #ruby
sailias has joined #ruby
<Hanmac> ... shevy what did you break? require 'bundler' works for me
Rizzle has joined #ruby
Protected has quit [Disconnected by services]
dhruvasagar has quit [Ping timeout: 246 seconds]
<shevy> require 'bundler'
<shevy> NoMethodError: undefined method `root' for Bundler:Module
<shevy> amacgregor_osx: I dont have a good example right now, but try this: gem install pry
<shevy> then go to the cache/ dir
<shevy> lib/ruby/gems/1.9.1/cache/
<shevy> for instance
<shevy> cd /usr/lib/ruby/gems/1.9.1/cache/
RichieEvan has joined #ruby
<shevy> (depends on your ruby version)
<amacgregor_osx> shevy: cool
<shevy> there you will find pry*.gem
Vert has joined #ruby
<shevy> you can unextract it via: gem unpack pry*.gem
<shevy> then go to that directory and look around at the structure
<shevy> you will see a few directories
<shevy> one is lib/
<shevy> if you go into lib/ you will see:
<shevy> pry.rb
<shevy> and pry/
<shevy> which is the structure I told you earlier
<shevy> most ruby projects use such a structure
<shevy> then look at pry.rb
* Hanmac my gems has a ext dir
<shevy> you will find many lines such as:
<shevy> require "pry/version"
<shevy> require "pry/core_extensions"
<shevy> etc...
<shevy> yeah Hanmac you are the C++ man
jgrevich has joined #ruby
<Hanmac> shevy is your bundler still installed?
centipedefarmer has joined #ruby
<shevy> Hanmac: I think so.
<shevy> bundler (1.1.3) according to gem list
ctp has quit [Quit: Linkinus - http://linkinus.com]
<Hanmac> hm i has an newer bundler 1.1.4 ... install it an then require "bundler" again
justin_ has joined #ruby
GarethAdams has quit [Quit: Leaving...]
RichieEvan has quit [Quit: RichieEvan]
Helius has quit [Remote host closed the connection]
Icoin has quit [Quit: Icoin]
tk_ has quit [Quit: ばいばい]
<shevy> hah
<shevy> bundler (1.1.4, 1.1.3)
<shevy> I guess I have two now :D
<shevy> cool
<shevy> gem uninstall gives you the choice to select the right one
iamjarvo has joined #ruby
<Hanmac> shevy try gem cleanup
Boondox has joined #ruby
Draco_ has joined #ruby
kaiwu has joined #ruby
DrShoggoth has joined #ruby
Draco__ has joined #ruby
rmc3 has quit [Remote host closed the connection]
Draco_ has quit [Read error: Connection reset by peer]
twu1 has joined #ruby
mockra has joined #ruby
twu1 has quit [Read error: Connection reset by peer]
ConstantineXVI has quit [Remote host closed the connection]
Draco__ has quit [Read error: Connection reset by peer]
workmad3 has quit [Read error: Operation timed out]
yoklov has joined #ruby
Draco_ has joined #ruby
kaiwu has quit [Quit: leaving]
justin_ has quit [Ping timeout: 244 seconds]
ConstantineXVI has joined #ruby
joast has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
<shevy> hmm hey
<shevy> when I have:
<shevy> b = 'blaa'
<shevy> and then:
<shevy> a = b
<shevy> could I say that a is an alias to b?
<Mon_Ouie> I'd rather say that a and b reference the same object
Constant_ has joined #ruby
Constant_ has quit [Client Quit]
<amacgregor_osx> shevy: ok interesting this is making sense
<amacgregor_osx> is there a cleaner way of doing this require File.join(File.dirname(__FILE__), '../models/link')
<Gurpartap> no.
<Mon_Ouie> That's not unclean
<Gurpartap> ^
<Mon_Ouie> You can do File.expand_path("../../models/link", __FILE__) which may be a bit shorter
<Gurpartap> I think File.dirname is more directive than adding another ".."
<Gurpartap> since this one signifies a step back form a file
<Gurpartap> s/form/from/
minijupe has joined #ruby
wallerdev has joined #ruby
<amacgregor_osx> Gurpartap: ty
Draco_ has quit [Remote host closed the connection]
Tricks has quit [Read error: Connection reset by peer]
Draco_ has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
Tricks has joined #ruby
JohnBat26 has quit [Remote host closed the connection]
mdszy_ has joined #ruby
mdszy has quit [Disconnected by services]
mdszy_ is now known as mdszy
Draco_ has quit [Read error: No route to host]
Draco_ has joined #ruby
<shevy> I dont like it
<shevy> it is so verbose
<shevy> I used to do ... YAML.load(File.new('bla.yaml'))
<shevy> until I found out there was YAML.load_file
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
khakimov has joined #ruby
<Hanmac> amacgregor_osx why didnt you look at require_relative?
workmad3 has joined #ruby
subbyyy has joined #ruby
daster has quit [Ping timeout: 248 seconds]
oxyxian has quit [Quit: oxyxian]
davidpk has joined #ruby
<amacgregor_osx> Hanmac: I did
<Hanmac> and why dont you use it?
<amacgregor_osx> I'm using it just not in that file :P
ken_barber has joined #ruby
biesiad has joined #ruby
wubino has joined #ruby
<wubino> I need to create a map of a city, layer a grid over the map, map lat lon points to the box in the grid. where do I start?
<shevy> sounds as if you either need an array or a hash
<shevy> you need to translate the requirements into ruby structures
<shevy> those latton points can point to the grid-boxes
<wubino> yeah, i was getting lost in the woods of GIS but I could just focus on the grid and lat lon points
<wubino> lost on the mapping layers
<amacgregor_osx> btw has anyone used bayesian classifiers?
<shevy> keep the data structure simple and the solution is almost already there
Tricks has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
<Hanmac> wubino: depend on other informations: is the map growing or does it have fix size? do you have many infos on the map or few
rakunHo has quit [Remote host closed the connection]
<shevy> question: is it bad to use several aliases to a method?
mpereira has joined #ruby
biesiad has quit [Remote host closed the connection]
<shevy> I have a method called "def sanitize"... but I also have "sanitize_dataset" to it
<shevy> an alias
biesiad has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
ctp has joined #ruby
pedm has joined #ruby
* Hanmac does not care about alias ... but i try to avoid them
<workmad3> shevy: I don't see a problem as long as they make more readable code
<wubino> Hanmac: fixed size map of san antonio metro area
<wubino> I want to layer a grid over it and the determine the grid box points with lat lons belong to (spatial binning)
<workmad3> wubino: is it a small enough area that assuming it's square is accurate enough?
<Hanmac> i think then you should use an array and access it like this: data[y*@width + x]
awarner has joined #ruby
<workmad3> wubino: the answer to that depends on your requirements for accuracy btw :)
mahmoudimus has joined #ruby
<wubino> 467 sq miles
maletor has joined #ruby
<wubino> what is the most accurate projection system for this amount surface?
khakimov has quit [Quit: Computer has gone to sleep.]
centipedefarmer has quit [Ping timeout: 248 seconds]
Eldariof-ru has joined #ruby
centipedefarmer has joined #ruby
abdulkarim has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Ping timeout: 265 seconds]
jgrevich_ is now known as jgrevich
khakimov has joined #ruby
hackeron has joined #ruby
sofi| has joined #ruby
<shevy> workmad3: yeah hmm... I have noticed that, when I use aliases, I tend to use sometimes this alias, sometimes that alias
<shevy> I am not yet sure if it is a problem or not hmm
<workmad3> wubino: I don't know in all honesty, and I expect there are algorithms that will account for it if you work with just lat/long positions
<shevy> perhaps the code is more readable, I dont know. It seems to be easier for my brain to not have to lookup and remember
<shevy> :)
<workmad3> wubino: it's just whether you need to go for a more complex algorithm or a simple linear interpolation to calculate your grid
<workmad3> shevy: I'd determine it by if it makes the code a better approximation to english in that instance :)
centipedefarmer has quit [Quit: This computer has gone to sleep]
fuleo has quit []
nateberkopec has joined #ruby
<shevy> hehe ok
nateberkopec has quit [Client Quit]
Limb has quit [Quit: ZNC - http://znc.in]
<shevy> I think it does, at least for the shorter method names
<shevy> cat.meow
<shevy> cat.make_noise
<shevy> cat.open_mouth_and_make_noise
<workmad3> heh
vectorshelve has joined #ruby
<workmad3> I wouldn't class that last one as a good method name tbh
<workmad3> too much implementation detail in the name
<vectorshelve> shevy: workmad3 Hai mates :)
<workmad3> oh great, it's vectorshelve...
joast has quit [Quit: Leaving.]
IcyDragon has joined #ruby
IceDragon has quit [Disconnected by services]
<vectorshelve> workmad3: been busy coding for thoughtworks first round... the famous salex tax problem :)
<workmad3> hmm, can you imagine that last comment in a dry, emotionless tone please? sort of like marvin the paranoid android
IcyDragon is now known as IceDragon
Berglund has joined #ruby
wubino has quit [Quit: Leaving]
mpereira has quit [Ping timeout: 240 seconds]
sofi| has quit []
<shevy> oh no it is vectorshelve
<shevy> he is writing only rails code
<shevy> :(
<vectorshelve> shevy: no pure ruby as of now dear
<shevy> workmad3: I read it very enthusiastic
<shevy> you know like an old lover returning and workmad3 making a happy kissing face
<vectorshelve> shevy: https://github.com/fj/thoughtworks-sales-tax this solution... but this guy has added so many classes... thats boring and unnecessary
<shevy> depends
<workmad3> shevy: but... but... the ellipsis at the end should make it dry and dripping with sarcasm... if I'd done a !, then it would be enthusiastic
<shevy> classes can actually simplify things
mockra has quit [Remote host closed the connection]
<vectorshelve> shevy: thats too much
<shevy> hmmmm
<shevy> is self.name = i the same as @name = i ?
<vectorshelve> shevy: yeah
<shevy> odd
<shevy> perhaps that guy hates @
ryanf has joined #ruby
ananthakumaran has quit [Ping timeout: 244 seconds]
Criztian has joined #ruby
<workmad3> shevy: no
withnale has left #ruby [#ruby]
<workmad3> self.name= calls the name= method, @name = assigns the ivar directly
pedm has quit [Quit: pedm]
banghouse has joined #ruby
<workmad3> in the case of that initializer, it's just using the attr_accessor in that situation... but that can change
<vectorshelve> shevy: given http://pastie.org/4255070 to be the problem I decided to go with product.rb has product name and rate then recipet_line_item would have product and quantity and reciept will have list of reciept_line_item
<workmad3> vectorshelve: seems pretty reasonably organised to me tbh
<shevy> workmad3: oh yeah good point
mockra has joined #ruby
ananthakumaran has joined #ruby
<vectorshelve> shevy: but the tax calculation part is confusing... i dont know why that guy has 3 separate classes for it.. we can have it all as methods in a single class ryt ?
Progster has joined #ruby
kedai has joined #ruby
<vectorshelve> shevy: I could have two attribute is_imported and is_tax_applicable
mobilegamelabs has joined #ruby
nateberkopec has joined #ruby
biesiad has quit [Read error: Connection reset by peer]
biesiad has joined #ruby
<shevy> no idea at all
<shevy> other people's code often confuses me a lot
<vectorshelve> shevy: me too
<shevy> I really think his style focuses on classes a lot
<shevy> sometimes my own, older code confuses me too :)
<workmad3> vectorshelve: looks like he's going for a strategy pattern to allow an open-closed system
<vectorshelve> workmad3: hmm... is it better to do as I mentioned above ?.
<workmad3> vectorshelve: really depends
<workmad3> vectorshelve: if I thought this was a standalone bit of code... possibly
<vectorshelve> workmad3: they give importance to design patterns and oops concepts
RORgasm has joined #ruby
jgrevich has quit [Ping timeout: 246 seconds]
<shevy> yah well
<vectorshelve> workmad3: it is.. for a given problem
<workmad3> vectorshelve: if it was part of a larger system, I would be looking for context from that
<shevy> it is like napoleon fighting on the battlefield against julius caesar
<shevy> both use different patterns
<vectorshelve> shevy: hmm
<workmad3> vectorshelve: and if it was for an interview exercise, I would want to demonstrate that I knew design considerations
<workmad3> vectorshelve: and that gives a different set of concerns to just doing it for a small tool
<vectorshelve> workmad3: yeah..
<workmad3> vectorshelve: basically you need to be able to defend your design though
mockra has quit [Remote host closed the connection]
<workmad3> vectorshelve: and be able to show that you've taken considerations like exempt items, different taxable rates, etc. into account
<Hanmac> shevy: for the TaxWorks::Product i would use an Stuct
Draco_ has quit [Ping timeout: 240 seconds]
<vectorshelve> workmad3: is there solutions which doesnt come under any defined patterns as such ?
<workmad3> vectorshelve: there's an infinite number of solutions
<workmad3> vectorshelve: trying to find the 'best' one is an infinite trawl and you'll never finish
<workmad3> vectorshelve: you just need to come up with one that you can defend
<workmad3> vectorshelve: and that's *your* job, not ours
strnx has quit [Excess Flood]
<workmad3> vectorshelve: even brain-dead naive solutions are fine, if you can defend them in your context
<vectorshelve> workmad3: thanks man :)
<workmad3> (it's all about context :) )
RORgasm has quit [Ping timeout: 246 seconds]
<workmad3> vectorshelve: hell, even considerations like who is going to maintain the code, or other team members, drives what is a good design
<vectorshelve> workmad3: ok ok
<workmad3> vectorshelve: for example, I'd probably be more tempted into a design-pattern heavy solution with strategies and factories when I know I'm looking at more java background people, as opposed to more metaprogramming, modules and mixins when looking at a more ruby background
oxyxian has joined #ruby
<workmad3> vectorshelve: it's also what makes coming into an IRC channel and asking 'is design X good and design Y bad' annoying, impossible to answer and basically nonsensical
Dreamer3 has quit [Ping timeout: 240 seconds]
<workmad3> vectorshelve: additionally, it's why in order to understand a design, you need to examine the context that drove it into existence
centipedefarmer has joined #ruby
vectorshelve has quit [Ping timeout: 245 seconds]
hunglin has quit [Quit: Leaving.]
Dreamer3 has joined #ruby
biesiad has quit [Read error: Connection reset by peer]
sdwrage has joined #ruby
strnx has joined #ruby
Gurpartap has quit [Quit: Page closed]
Icoin has joined #ruby
mockra has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
sebicas has joined #ruby
yoklov has quit [Quit: computer sleeping]
gtuckerkellogg has joined #ruby
abra has joined #ruby
Z_Mass has joined #ruby
centipedefarmer has quit [Quit: This computer has gone to sleep]
Tricks has quit [Read error: Connection reset by peer]
Tricks has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
justin_ has joined #ruby
patient has quit [Quit: reboot]
cads has quit [Read error: Connection reset by peer]
snearch has joined #ruby
patient has joined #ruby
mpereira has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
zeromodulus has quit [Ping timeout: 246 seconds]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
justin_ has quit [Ping timeout: 252 seconds]
Osum has joined #ruby
mockra has quit [Remote host closed the connection]
ElderFain has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
iamjarvo has joined #ruby
saschagehlich has quit [Quit: saschagehlich]
bbloom has quit [Quit: Computer has gone to sleep.]
Z_Mass has quit [Quit: Leaving]
niklasb has joined #ruby
mxweas_ has joined #ruby
grekko has joined #ruby
twinturbo has joined #ruby
syamajala has joined #ruby
zeromodulus has joined #ruby
nopolitica has quit [Quit: Leaving.]
mockra has joined #ruby
mockra has quit [Remote host closed the connection]
grekko has quit [Client Quit]
_justin has joined #ruby
nopolitica has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
nari has quit [Ping timeout: 244 seconds]
ryanf has quit [Quit: leaving]
twinturbo has quit [Quit: twinturbo]
nopolitica has quit [Quit: Leaving.]
chrxn_ has joined #ruby
richardStokes has joined #ruby
schaerli has quit [Ping timeout: 250 seconds]
andoriyu_ has joined #ruby
_justin has quit [Ping timeout: 240 seconds]
andoriyu has quit [Ping timeout: 240 seconds]
fridim_ has quit [Ping timeout: 246 seconds]
reuf has joined #ruby
mobilegamelabs has quit [Quit: http://youtu.be/Tu-mSpFmx7g http://www.MGGGGG.com/ap Angry Polygon - my first Android/iOS/Mac game!]
sebicas has left #ruby [#ruby]
ananthakumaran has quit [Quit: Leaving.]
ken_barber has quit [Remote host closed the connection]
workmad3 has joined #ruby
cpruitt has joined #ruby
Maher4Ever has quit [Quit: Ik ga weg]
Jackneill has joined #ruby
<Jackneill> hi
baphled has joined #ruby
Axsuul has joined #ruby
<Jackneill> if i have require_relative "irc" and in irc.rb class Irc, and in that file where i have the require.. Sender < Irc how can i get unintialized constant Irc?
straind has quit [Read error: Connection reset by peer]
byronb has joined #ruby
<Hanmac> make a pastie of your sender file
<Jackneill> Hanmac: http://pastebin.com/ZMq06pca
awarner has quit [Remote host closed the connection]
nate__ has joined #ruby
nate__ has quit [Remote host closed the connection]
lxsameer has joined #ruby
<workmad3> Jackneill: and your irc.rb file?
cpruitt has quit [Quit: cpruitt]
<Jackneill> workmad3
<Hanmac> "cycle require detected"
<workmad3> Hanmac: +1 :)
<heftig> yep
<heftig> sender requires irc requires sender
<workmad3> Jackneill: I wouldn't trust that the 'require_relative "sender" ' in irc.rb isn't going to cause weirdness
dnyy_ is now known as dnyy
<Jackneill> thats just because sender needs stuff from irc, and irc needs stuff from sender
<workmad3> Jackneill: yeah... I'd sort that out
<workmad3> Jackneill: cyclic dependencies like that are almost never either actually required or a good idea
<Hanmac> put require_relative "sender" at the end of irc.rb
strnx is now known as sterNiX
sterNiX has quit [Changing host]
sterNiX has joined #ruby
<Jackneill> Hanmac: it works
<Jackneill> thanks :)
gtuckerkellogg has joined #ruby
* Hanmac gains exp
<workmad3> Jackneill: also, it's a bit weird... Sender is a subclass of Irc, and Irc creates an instance of Sender (so in essence, an instance of itself) on construction...
<Hanmac> workmad3 you are right ... thats an loop with full the RAM :P
ryanf has joined #ruby
_justin has joined #ruby
<workmad3> Hanmac: well, the initialize of Irc doesn't get called automatically because Sender has its own initialize
Spooner has quit [Read error: Connection timed out]
<workmad3> Hanmac: so it shouldn't cause an infinite recursion... but it's still a big boatload of odd :)
Berglund has quit [Quit: Computer died.]
richardStokes has left #ruby ["Leaving"]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Jackneill> workmad3: the parent class' initialize just called with super keyword isnt it?
<workmad3> Jackneill: yes, but it's still a very strange design for a class to require an instance of a subclass of itself in order to work...
williamcotton has joined #ruby
<Jackneill> yep, im getting started so i need more experience :(
Progster has quit [Ping timeout: 272 seconds]
<workmad3> Jackneill: and if you add a super call into your sender class's initialize (or remove it completely) then you'll have an infinite recursion issue
thecreators has quit [Ping timeout: 248 seconds]
<Jackneill> :)
<workmad3> Jackneill: my suspicion is that you have a bad split of responsibilities if this is the way you need to get things working
maletor has quit [Quit: Computer has gone to sleep.]
<Jackneill> ok
IcyDragon has joined #ruby
IceDragon has quit [Disconnected by services]
IcyDragon is now known as IceDragon
Jackneill has quit [Quit: Jackneill]
workmad3 has quit [Ping timeout: 248 seconds]
RORgasm has joined #ruby
lxsameer has quit [Quit: Leaving]
tatsuya_o has joined #ruby
mmsequeira_ has joined #ruby
ryanf has quit [Ping timeout: 240 seconds]
RORgasm has quit [Ping timeout: 246 seconds]
mpereira has quit [Read error: Connection reset by peer]
linoj has joined #ruby
dnyy has quit []
Draco_ has joined #ruby
mpereira has joined #ruby
dnyy has joined #ruby
<mdszy> make
<mdszy> whoops, derp
flip_digits has joined #ruby
Draco_ has quit [Remote host closed the connection]
<davidcelis> ^C
<mdszy> color
<mdszy> That's what ^C does for me :>
<mdszy> ^C + irssi color code + text
<davidcelis> WHAT SHELL ARE YOU ON
<mdszy> irssi XD
<mdszy> not in my shell XD
<davidcelis> ^C should quit
<mdszy> It's handled separately by irssi
<mdszy> I can just do /quit
<mdszy> or ^Z + kill %1
dcope has left #ruby [#ruby]
ringotwo has joined #ruby
cresso has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
Draco_ has joined #ruby
_justin has quit [Ping timeout: 248 seconds]
Vert has quit [Remote host closed the connection]
CmdrTallen has quit [Quit: Leaving]
<minijupe> I've developed in RoR for 3 years, but I'm getting a bit tired of making web applications. Can anyone recommend a starting point for discover what other types of development that can be done with ruby?
<minijupe> apart from web apps, what is Ruby often used for, and what markets are out there?
<apeiros_> minijupe: do what everybody did 5y ago - write an irc bot
<apeiros_> do what twitter did - write a message service (yes, yes, it can have an http backend, doesn't really need to)
banisterfiend has joined #ruby
<minijupe> are any desktop apps written in ruby?
<apeiros_> limechat was
<apeiros_> there are a couple of macruby apps afaik, don't know which, though.
<minijupe> I love working with ruby, I'm just starting to explore what other kids of work I could do with ruby apart from web apps. Any resource recommendations?
Draco_ has quit [Ping timeout: 240 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
mxweas_ has joined #ruby
<Tasser> minijupe, ruby is mac or web. choose your poison.
Berglund has joined #ruby
<Tasser> minijupe, kde got some nice ruby bindings last time I checked...
<minijupe> Tasser: what kind of things are being done with ruby / mac?
<Tasser> minijupe, no idea, I'm a linux guy.
mxweas_ has quit [Client Quit]
williamcotton has quit [Read error: Connection reset by peer]
<Tasser> minijupe, you could also jump to another language :-)
williamcotton_ has joined #ruby
<Mon_Ouie> Yeah, there are Qt and KDE bindings for Ruby
webusnix has joined #ruby
Speed has joined #ruby
abra has quit [Remote host closed the connection]
<minijupe> Tasser: true. Just wondering what's out there where ruby really shines, or is at least useful. I recently started looking into Arduino micro-controller programming, but no Ruby there :(
<oddmunds> minijupe: it shines on the command line
_justin has joined #ruby
<minijupe> Here's another take on the same question. Does anyone here work with ruby professionally, but not making web apps?
Draco_ has joined #ruby
<Tasser> minijupe, I heard of manveru doing some things with ruby and tk (he's written his own ffi-tk)
<oddmunds> doesn't nasa use ruby?
<Tasser> ruby to test fortran :D
<Tasser> why not.
IceDragon has quit [Quit: Restarting]
ryanf has joined #ruby
Z_Mass has joined #ruby
<minijupe> Anyone using MacRuby ? http://macruby.org/
<Mon_Ouie> does it have to be professionally? I haven't done any web-related stuff, but I did do stuff in Ruby — e.g. playing with OpenGL
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
Fretta has quit [Quit: Fretta Be Gone!]
<minijupe> Mon_Ouie: not necessarily, but I'm brainstorming how to expand the types of projects I can work in. If I have to learn other languages, that's fine, but I'm first exploring what's possible in Ruby, which I've spent the last 3/4 years in.
Criztian has quit [Remote host closed the connection]
geekbri has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> Well, that OpenGL stuff *was* in Ruby (well, at least partly)
ElderFain has joined #ruby
ryanf has quit [Ping timeout: 250 seconds]
Spooner has joined #ruby
snearch has quit [Quit: Verlassend]
cpruitt has joined #ruby
reuf has quit [Ping timeout: 246 seconds]
fowl has joined #ruby
centipedefarmer has joined #ruby
khakimov has quit [Ping timeout: 255 seconds]
LyonJT has joined #ruby
linoj has quit [Quit: linoj]
geekbri has quit [Remote host closed the connection]
mxweas_ has joined #ruby
geekbri has joined #ruby
mxweas_ has quit [Ping timeout: 265 seconds]
fantazo has quit [Remote host closed the connection]
TorpedoSkyline has joined #ruby
Eldariof-ru has quit []
centipedefarmer has quit [Quit: This computer has gone to sleep]
Norrin has joined #ruby
emmanuelux has joined #ruby
nachtwandler has quit [Quit: leaving]
centipedefarmer has joined #ruby
hoelzro|away is now known as hoelzro
byronb has quit [Quit: Leaving...]
IceDragon has joined #ruby
byronb has joined #ruby
byronb has quit [Excess Flood]
perryh_away is now known as perryh
LennyLinux has quit [Remote host closed the connection]
perryh is now known as perry
geekbri_ has joined #ruby
geekbri has quit [Ping timeout: 246 seconds]
cantonic has joined #ruby
mmsequeira_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
hoelzro is now known as hoelzro|away
iamjarvo has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
vertroa has joined #ruby
seatea has joined #ruby
indian has joined #ruby
owned_ has joined #ruby
nicoulaj has quit [Remote host closed the connection]
rlomax has joined #ruby
fridim_ has joined #ruby
baroquebobcat has joined #ruby
nej has joined #ruby
sepp2k has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
tomb has quit [Quit: Computer has gone to sleep.]
tomb has joined #ruby
nopolitica has joined #ruby
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
thecreators has joined #ruby
tomb has quit [Client Quit]
gtuckerkellogg has joined #ruby
stewart_ has quit [Quit: Leaving.]
noyb has joined #ruby
bricker88 has joined #ruby
stewart_ has joined #ruby
noyb has quit [Remote host closed the connection]
noyb has joined #ruby
tomb has joined #ruby
syamajala has quit [Remote host closed the connection]
kylemcgill has joined #ruby
geekbri has joined #ruby
banseljaj is now known as imami|afk
geekbri_ has quit [Ping timeout: 246 seconds]
ryanf has joined #ruby
etehtsea has quit []
RichieEvan has joined #ruby
ryanf has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
linoj has joined #ruby
maxwellE has joined #ruby
nateberkopec has joined #ruby
RORgasm has joined #ruby
nateberkopec has quit [Client Quit]
Vert has joined #ruby
centipedefarmer has quit [Read error: Connection reset by peer]
<maxwellE> Anyone here know anything about ruby daemons?
ringotwo has joined #ruby
ringotwo has quit [Remote host closed the connection]
ringotwo has joined #ruby
lovelace_ has joined #ruby
lovelace_ is now known as TheHypnotist-lhs
Tricks_ has joined #ruby
Tricks has quit [Read error: Connection reset by peer]
<TheHypnotist-lhs> hmm, is there a correct way for 1.9.x to download a webpage for parsing?
<maxwellE> I would use mechanize for that
<maxwellE> mechanize pages come back as nokogiri objects
<Mon_Ouie> There isn't a single one, but one would be require 'open'; open(url) { |io| Nokogiri::HTML(io) }
<apeiros_> TheHypnotist-lhs: there's a ton of ways
<Mon_Ouie> (Assuming that webpage is an HTML page)
<apeiros_> Mon_Ouie: s/require 'open'/require 'open-uri'/
<maxwellE> If it has JS you need waitr
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
RORgasm has quit [Ping timeout: 246 seconds]
<Mon_Ouie> Oh, yeah
cdavaz has quit [Quit: cdavaz]
<maxwellE> I use mechanize and waitr 90% of the time
Draco_ has quit [Read error: Connection reset by peer]
<maxwellE> I have a question about ruby processes in linux
<TheHypnotist-lhs> that's interesting
gtuckerkellogg has joined #ruby
Draco_ has joined #ruby
<TheHypnotist-lhs> hmm, I'm new to ruby and was thinking I should probably ask the best way to go about it :)
<TheHypnotist-lhs> yeah, i think it would be a html page generally speaking - I could then scrape with regex or whatever
<maxwellE> I am trying to understand why when I run a long process, several days, ruby run time is around a minute
<maxwellE> No regex, use nokogiri, way easier
ZachBeta has joined #ruby
<TheHypnotist-lhs> okies ill take a look at it
<maxwellE> So sick, firebug + nokogiri == leet parsing
<ctor> Does anyone here have experience using curb?
<TheHypnotist-lhs> :D
<maxwellE> ctor: YES
<maxwellE> sorry caps
<ctor> Can I PM you with some questions about it?
<maxwellE> How do you PM here?
sdwrage has quit [Quit: geekli.st/programmer]
<maxwellE> Sure
<fowl> /query user
<fowl> to open a new window, or
<fowl> /msg user text
<fowl> to send a message
<mksm> apeiros_: still, th code should finish but it doesnt https://gist.github.com/3118745
andoriyu_ has quit [Quit: This computer has gone to sleep]
reuf has joined #ruby
ZachBeta has quit [Client Quit]
<maxwellE> Anyone here a pro about linux processes and ruby?
<apeiros_> mksm: it doesn't finish - you mean you haven't waited long enough? :)
kyle__ has joined #ruby
reuf has quit [Read error: Connection reset by peer]
<apeiros_> btw., `while not i == 1_000_000` <-- fugly
<apeiros_> until i == 1_000_000
<apeiros_> or just 1_000_000.times do …
minijupe has quit [Quit: minijupe]
<kyle__> Does the standard ruby zip library have a way of reading data from a zipfile into memory (a variable) instead of dumping it to a file first? I'm digging through the docs and I can't see a way.
<apeiros_> mksm: works fine for me. I replaced that 1_000_000 with 10
<fowl> what? ruby comes with a zip library?
<apeiros_> only gzip afaik
<kyle__> fowl: either that or I gem installed it at some point without thinking... It's the library that comes up when you require 'zip'.
nej has quit [Read error: Connection reset by peer]
minijupe has joined #ruby
nej has joined #ruby
<kyle__> apeiros_: zlib I'm down with :) that library is incredibly streightforward to work with.
minijupe has quit [Client Quit]
<mksm> apeiros_: if you replace the limit with 100_000 it finishes almost instantly. I've waited ~30secs with 1_000_000 and nothing
<kyle__> fowl: It's pretty easy to use this zip library, but it wants to dump the file to disc, which i then have to re-read as uncompressed data.
gnarmis has quit [Quit: gnarmis]
<apeiros_> mksm: well, if you replace it with 10_000, it takes about 2s, so it'd probably be ~3min20s with 1e6
tatsuya_o has quit [Remote host closed the connection]
<apeiros_> (for me, that is, don't know, maybe your machine is even slower…)
<fowl> mksm, print('.') if i % 1000 == 0
<mksm> right, one sec
<apeiros_> fowl: don't forget the flush/sync
<kyle__> if you want speed in ruby, you either come up with a better algorithm, or write it as a C extension.
<apeiros_> mksm: ^
<kyle__> The second option is often easier actually.
<apeiros_> kyle__: dunno, option 1 usually saves me from option 2
byronb has joined #ruby
byronb has quit [Excess Flood]
<apeiros_> the common reason for option 2 for me is usually not even performance, but memory footprint
<kyle__> apeiros_: Except when you realize you're already using a pretty good one :)
tatsuya_o has joined #ruby
<kyle__> apeiros_: Oooh good point.
<apeiros_> kyle__: maybe your "good one" isn't that good then :-p
<apeiros_> but who knows
<apeiros_> maybe your scenarios just differ from mine, and you really need it more often
<kyle__> apeiros_: It's mostly for when I'm doing things in ruby that really should be done in another language. Like writing a ray-tracer.
byronb has joined #ruby
byronb has quit [Excess Flood]
<apeiros_> ok. I can see a raytracer in ruby being hilariously slow :)
<apeiros_> audio-processing in pure ruby isn't the real deal either
<apeiros_> mksm: you missed to flush/sync
<mksm> it's ignoring the limit for some reason
<kyle__> apeiros_: It was :) but it wasn't as painfully bad as I thought it would be. It beat out some poorly written C# implementations I've seen.
<apeiros_> print "#{i}." <-- wtf? :)
<apeiros_> the idea of the . is that you get a line of dots
<apeiros_> just `puts i` if you want i to be included…
byronb has joined #ruby
<mksm> I understood what fowl suggested ... the "." there is just to separated the numbers
<apeiros_> mksm: yes of course
<apeiros_> one thread will increase it to 100_000
<apeiros_> the next to 100_001
<apeiros_> and for no other thread will it ever be == 100_000 anymore :-p
_justin has quit [Ping timeout: 246 seconds]
<apeiros_> mksm: remember, your Thread.exclusive is not covering the loop condition. so it's entirely possible that many threads already passed the loop condition and are waiting for their turn to get the exclusive lock
gnarmis has joined #ruby
<maxwellE> Anyone here a pro about linux processes and ruby?
Z_Mass has quit [Ping timeout: 248 seconds]
Draco_ has quit [Ping timeout: 246 seconds]
<mksm> apeiros_: *sigh*, true
<fowl> mksm, the outputting . lets you know that its still working
ZachBeta has joined #ruby
<fowl> i dunno if you already had output i didnt see it/dont remember it
<apeiros_> he didn't
<fowl> maxwellE, whats the question? use IO.popen if you need to communicate between processes
<maxwellE> fowl: its more a question about ps output from a ruby daemon
<maxwellE> fowl: ps output is saying the ruby process has run for 1 min when the daemon has been running for days
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
<fowl> maxwellE, ps time doesnt seem to work for me ive been running pry for a couple days and it says 0:00:00
neku has joined #ruby
alanp_ has joined #ruby
balki_ has joined #ruby
balki_ has quit [Read error: Connection reset by peer]
alanp_ has quit [Read error: Connection reset by peer]
alanp has quit [Read error: Connection reset by peer]
<maxwellE> fowl: strange, this script uses waitr-webdriver and my firefox run time is massive but the ruby run time is so small
<apeiros_> mksm: concurrency is hard… you sure you need it? :)
alanp has joined #ruby
balki_ has joined #ruby
<fowl> says xfwm has been running for 16 minutes, more like a day or so
<apeiros_> (serious question - remember, you'll only be able to make use of it if your problem is IO bound - or if you use jruby)
<heftig> or rubinius
<apeiros_> afaik they're still on GIL
<apeiros_> only head doesn't
<maxwellE> yes
<maxwellE> fowl: yes
<maxwellE> fowl: is this just a ruby issue?
mpereira has quit [Ping timeout: 255 seconds]
balki has quit [Read error: Connection reset by peer]
<mksm> apeiros_: yep, but atm i'm trying to compare Thread.exclusive/Mutex
<fowl> maxwellE, i would say that ps' time is inaccurate
gnarmis has quit [Quit: gnarmis]
<mksm> hmmm, the 1.9.3 source for Thread.exclusive says it uses a mutex internally
<apeiros_> mksm: Thread.exclusive is something you really never should use. only if you build your own concurrency primitives. or really really know what you're doing.
<apeiros_> mksm: of course it has to. rubys threads are built on os/native threads
blownapart has joined #ruby
<maxwellE> fowl: Thank for the help man, I will stop worrying
blacktul_ has quit [Remote host closed the connection]
fantazo has joined #ruby
<blownapart> fowl: hey fowl remember me, varreli?
<fowl> hows it goin gramps
maxwellE has left #ruby ["Leaving"]
<blownapart> good glad you remember the important things. you doing alright?
<fowl> :d
<fowl> :D yea
timonv has quit [Remote host closed the connection]
<blownapart> fowl: cool I gave up ruby after someone told me I needed 10000 hours of study to be worth a damn.
<fowl> well the only real losers are quitters
<fowl> im disappointed
sdwrage has joined #ruby
<blownapart> fowl: sorry it was something other stuff that coincided with that, that put me off it...but the main thing is that you are thriving.
<blownapart> some other stuff, that is.
<blownapart> you can see fowl that my name is now Napolean blownapart.
<fowl> lol
<blownapart> fowl: who was the guy living in Kathmandu Nepal?
khakimov has joined #ruby
<mksm> apeiros_: what i mean is that it's using the Mutex class. My point is that some time ago, Thread/Queue relied on Thread.critical and now they're using Mutex.
<fowl> i dont know
vertroa has quit [Read error: Connection reset by peer]
wvms has quit [Read error: Connection reset by peer]
<mksm> well ... not some time ago, more like 6 years ago :/
obryan has quit [Read error: Connection reset by peer]
wvms has joined #ruby
obryan1 has joined #ruby
zastaph has quit []
andrewhl has quit [Remote host closed the connection]
vertroa has joined #ruby
<blownapart> fowl: thanks I'll figure it out. I have really basic questions re: the setup of osX term: to create a symlink to sublime2 text editor.
ZachBeta has quit [Quit: Computer has gone to sleep.]
linoj has quit [Quit: linoj]
<blownapart> fowl: btw like a true geezer I forgot a vast chunk of ruby.
GarethAdams has joined #ruby
<apeiros_> mksm: as said, it has to. with native threads, Thread.critical doesn't work that well anymore.
ravoly_90 has joined #ruby
<ravoly_90> Hello
byronb has quit [Read error: Connection reset by peer]
<fowl> if it is like linux' symlinks its `ln -s /path/to/subl /where/to/put/the/symlink`
<ravoly_90> I am new to programming and I use Ubuntu, should I install ruby via apt-get or the installer on the website?
<fowl> ravoly_90, its recommended to use a version manager such as rvm, rbenv or rbfu
<ravoly_90> fowl: which is the correct method for later upgrades when new versions hit the road?
<ravoly_90> rvm, rbenv, rbfu
<fowl> ravoly_90, they all support having multiple versions of ruby installed
byronb has joined #ruby
<ravoly_90> fowl: I am looking for an easy way to install/update my ruby interpreter once needed
<ravoly_90> I will check on rvm
<ravoly_90> Thanks any way
<mksm> apeiros_: right. thanks for the help
LyonJT has quit [Quit: Linkinus - http://linkinus.com]
blazes816 has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<apeiros_> ravoly_90: `curl -L https://get.rvm.io | bash -s stable --ruby` then `rvm install ruby-1.9.3`, then `rvm docs generate`
<ravoly_90> apeiros_: super cool :D
geekbri has quit [Remote host closed the connection]
<apeiros_> to update your ruby, you can either just `rvm install NEWERRUBY`, or use the rvm upgrade command.
<blownapart> fowl: et al hey echo $PATH tells me that my path is: "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin" can that be right?
<blownapart> fowl: can that be right?
<fowl> looks right to me
Stalkr_ has quit [Remote host closed the connection]
<fowl> im not an osx user though
<ravoly_90> apeiros_: thanks man, note saved
williamcotton_ has quit [Read error: Connection reset by peer]
williamcotton has joined #ruby
<apeiros_> ravoly_90: yw, also #rvm is usually very helpful, should you run into problems
tatsuya_o has joined #ruby
mneorr has quit [Quit: Leaving.]
<ravoly_90> apeiros_: once I am done installing I 'll keep #rvm in mind
<blownapart> fowl: et al. thanks. if you have time, this is what the tutorial says to do: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl ....provided that bin is in my path. But I don't how to do much in terminal, so provided that I have the app in applications, how much of that command do I use?
Stalkr_ has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<fowl> do ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl since /usr/local/bin is in your path
Stalkr_ has quit [Changing host]
Stalkr_ has joined #ruby
<blownapart> fowl: so I use quotes in term?
<fowl> yes because the sublime path has spaces in it
ravoly_90 has quit [Quit: Page closed]
mneorr has joined #ruby
<blownapart> got it. thanks I'll try it fowl
idolick has joined #ruby
idolick has quit [Client Quit]
sailias has joined #ruby
Jake232 has joined #ruby
andoriyu has joined #ruby
ryanf has joined #ruby
Araxia has quit [Read error: Connection reset by peer]
Araxia has joined #ruby
Z_Mass has joined #ruby
_whitelogger has joined #ruby
Cache_Money has joined #ruby
igotnolegs has joined #ruby
[Neurotic] has joined #ruby
sailias has quit [Ping timeout: 246 seconds]
kirun has quit [Quit: Client exiting]
monkegjinni has quit [Remote host closed the connection]
sailias has joined #ruby
maletor has joined #ruby
Draco_ has joined #ruby
xiphiasx_ has quit [Read error: Operation timed out]
xiphiasx_ has joined #ruby
khakimov has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
xiphiasx_ has quit [Client Quit]
khakimov has joined #ruby
iamjarvo has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xiphiasx_ has joined #ruby
xiphiasx_ has quit [Changing host]
xiphiasx_ has joined #ruby
fridim_ has quit [Ping timeout: 246 seconds]
bier has quit [Remote host closed the connection]
bier has joined #ruby
jimeh has joined #ruby
stewart_ has left #ruby [#ruby]
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
igotnolegs has quit [Quit: Computer has gone to sleep.]
sailias has quit [Ping timeout: 248 seconds]
williamcotton has quit [Quit: williamcotton]
krz has joined #ruby
ddbt-nl has joined #ruby
Norrin has quit [Quit: Zzz]
td123 has joined #ruby
cdavaz has joined #ruby
<ddbt-nl> is rubinius similar to facebooks hiphop for php?
<apeiros_> no
<apeiros_> quite the opposite actually
<apeiros_> it's ruby implemented in (as much) ruby (as possible)
baphled has quit [Quit: leaving]
<ddbt-nl> then how should i understand both projects?
g_rotbart has joined #ruby
baphled has joined #ruby
<apeiros_> don't know what you're asking for
<blownapart> fowl: still on fowl?
jjang has joined #ruby
hippyphysicist has joined #ruby
hippyphysicist has quit [Client Quit]
baphled has left #ruby [#ruby]
williamcotton has joined #ruby
ryanf has quit [Ping timeout: 265 seconds]
baphled has joined #ruby
yxhuvud has quit [Ping timeout: 244 seconds]
sdwrage has quit [Quit: geekli.st/programmer]
Jake232 has quit [Quit: Computer has gone to sleep.]
williamcotton has quit [Client Quit]
cableray has joined #ruby
khakimov has quit [Ping timeout: 240 seconds]
RORgasm has joined #ruby
baphled has quit [Client Quit]
baphled has joined #ruby
sdwrage has joined #ruby
ddbt-nl has quit [Quit: Page closed]
wrapids has quit [Quit: I quit.]
linoj has joined #ruby
khakimov has joined #ruby
RORgasm has quit [Ping timeout: 246 seconds]
williamcotton_ has joined #ruby
vertroa has quit [Read error: Connection reset by peer]
<blownapart> hi all newbie (returned) very basic question: how to set up my path for a symlink for sublime2 editor. thanks, details at: http://pastie.org/4263166
nej has quit [Quit: Leaving...]
chrxn_ has quit [Ping timeout: 244 seconds]
williamcotton has joined #ruby
vertroa has joined #ruby
18VAAZHEB has quit [Ping timeout: 250 seconds]
linoj has quit [Quit: linoj]
ryanf has joined #ruby
mneorr has quit [Quit: Leaving.]
williamcotton has left #ruby [#ruby]
noyb has quit [Ping timeout: 244 seconds]
neku has quit [Ping timeout: 240 seconds]
sdwrage has quit [Quit: geekli.st/programmer]
neku has joined #ruby
sepp2k has joined #ruby
apeiros_ has quit [Remote host closed the connection]
reuf has joined #ruby
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
reuf has quit [Read error: Connection reset by peer]
akem has quit [Ping timeout: 248 seconds]
ryanf has quit [Ping timeout: 255 seconds]
pk1001100011 has joined #ruby
linoj has joined #ruby
khakimov has quit [Ping timeout: 246 seconds]
fayimora has quit [Quit: Busy…..zzzzz]
akem has joined #ruby
g_rotbart has quit [Remote host closed the connection]
vectorshelve has joined #ruby
khakimov has joined #ruby